Write a program for optimal merge pattern in c or c

broken image
broken image

Not have any spanning tree, as it cannot be spanned Have cycles and it cannot be disconnected.īy this definition, we can draw a conclusion thatĮvery connected and undirected Graph G has at

broken image

Thus selection of least files will be done as well as new files that we get at everyĮxample of the optimal merge tree algorithm:Ī spanning tree is a subset of Graph G, which hasĪll the vertices covered with minimum possible The second way of performing merging is faster then first way

broken image

Way2: Merge F1 and F3, get a new file NF4. Way1: Merge F1 and F2, get a new file NF4. Let we have three sorted files F1, F2, F3 of length(number of records) 25, 35, 15 record each.

broken image