# How can merging two sorted arrays of N items require at least 2N - 1 comparisons in every case?

The HW question, on page 362 of Data Structures and Algorithms in C++: Fourth Editionby Mark Allen Weiss, reads as follows:

Prove that merging two sorted arrays of N items requires at least 2 * N - 1 comparisons. You must show that if two elements in the merged lists are consecutive and from different lists, then they must be compared

If we are trying to find the lower bound then wouldn't the number of comparisons be N, not 2 * N - 1? If the largest element is some array Ais smaller than the smallest element in some array B then at most you would only have to do N comparisons since after all of A's elements are placed in the merged array then the remaining elements in B's can simply be appended in to the merged array.

The lower bound has to be something that is true for every possible N and every possible combination of elements in both arrays, right? 2 * N - 1 seems more like it would be the upper bound since there is no way there can be more comparisons than that.

Note: I am not asking for an answer to the HW question itself as I know that is deprecated. I am confused about the implied assertion the question is making about the lower bound

For example, when we say that $$\Omega(n \log n)$$ is a lower bound for sorting, this does not mean that every array requires $$\Omega(n\log n)$$ comparisons. It just means that some arrays require that many comparisons, and thus there is no $$o(n\log n)$$-time algorithm for sorting.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9618907,"math_prob":0.96266454,"size":1159,"snap":"2022-40-2023-06","text_gpt3_token_len":252,"char_repetition_ratio":0.123809524,"word_repetition_ratio":0.00913242,"special_character_ratio":0.22088008,"punctuation_ratio":0.060606062,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9850866,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-03T14:52:19Z\",\"WARC-Record-ID\":\"<urn:uuid:9cb0b0fc-cd34-420d-aba5-4f8f12c74644>\",\"Content-Length\":\"224639\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ea020088-ccf3-4897-a3d5-1badfbd5b178>\",\"WARC-Concurrent-To\":\"<urn:uuid:a0c2bfbc-ca5f-45fa-be0a-cf977ef1bed9>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://cs.stackexchange.com/questions/120187/how-can-merging-two-sorted-arrays-of-n-items-require-at-least-2n-1-comparisons/120191#120191\",\"WARC-Payload-Digest\":\"sha1:DYM5AACLXLHW442K345YQJBANX5EP3A4\",\"WARC-Block-Digest\":\"sha1:MQVFEX5R7U4UJDHE2LYV7DIY43QSUJWX\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337421.33_warc_CC-MAIN-20221003133425-20221003163425-00264.warc.gz\"}"}