How can I prove that this is the upper bound?

  • Thread starter Thread starter SpatialVacancy1
  • Start date Start date
  • Tags Tags
    Combinatorics
Click For Summary
SUMMARY

The discussion focuses on proving that the number of comparisons needed to sort a set S with |S| = 2^n is bounded above by n * 2^n. The user successfully applied the principle of merging two sets, S_1 and S_2, using the established result that merging requires no more than m + r - 1 comparisons. By recursively breaking down the set S into smaller subsets and summing the comparisons for each stage, the user demonstrated the upper bound effectively.

PREREQUISITES
  • Understanding of combinatorial principles
  • Familiarity with set theory and notation
  • Knowledge of sorting algorithms and their complexities
  • Experience with recursive problem-solving techniques
NEXT STEPS
  • Study the proof techniques in combinatorial mathematics
  • Learn about the merge sort algorithm and its comparison count
  • Explore the concept of recursive functions in algorithm analysis
  • Investigate the implications of upper bounds in algorithm complexity
USEFUL FOR

Students in combinatorics, mathematicians focusing on algorithm analysis, and anyone interested in understanding sorting complexities and recursive problem-solving strategies.

SpatialVacancy1
Messages
1
Reaction score
0
Combinatorics...evil problem!

Hi all,

I am working on my combinatorics homework. I have completed all of the problems but one. Here it goes:

------------------------------------------
Let S_1 and S_2 be two sets where |S_1| = m and |S_2| = r, for m,r in Z+ (positive integers), and the elements in each of S_1, S_2 are in ascending order. It can be shown that the elements in S_1 and S_2 can be merged into ascending order by making no more than m + r - 1 comparisons. Use this result to establish the following:

For n >= 0, Let S be a set with |S| = 2^n. Prove that the number of comparisons needed to place the elements of S in ascending order is bounded above by n * 2^n.
------------------------------------------

Please help! Due by 12:00 PM EST tomorrow the 3rd!
 
Physics news on Phys.org
I was able to produce the right result by breaking S into one element sets then combining pairs of them to create half as many sets of two elements and assuming it took the upper bound of m+r-1 comparisons to create each set. I then combined pairs of two element sets to create half as many sets of 4 elements, and so on until I had one set of 2^n elements (S), and summed the upper bounds of all of comparisons required to make each intermediate set and finally S.
 

Similar threads

Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
Replies
2
Views
1K