nine million and two integer numbers

You are given a set of 9,000,002 (nine million and two) full positive integer values in ascending order. They start at the number one (n=1) and all of the integers have different values, which are unknown. All the integers have the same number of increments between them. Without knowing the value of any other numbers in the set, except for the first value, what is the quickest way of starting the process of finding the highest number value, at least from the given solutions put forward? (An easier and more direct solution can be found in the discussions).

scanning the set in half scanning half of the values plus one value in the set scanning half of the values in the set scanning for the median value scanning all values in the set scanning the set in half and then scanning upwards in ascending order scanning for the value 9,000,0002

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

A K
Nov 21, 2020

As you are given 9,000,002 full integer number values which start at the number 1 in ascending order - to allow for the possibility that they might increase in increments of one, you must first scan for the value 9,000,002, to see whether it occurs in the set, before proceeding, to find the highest integer value. (If the number does not occur in the set then you know for certain that at least one of the integers is greater than 9,000,002). (If the number 9,000,002 does occur in the set then you have found at least one of the values which is higher than 1, but must perform further scan to ascertain the highest integer value).

It is trial and error to an extent, but by using the simplest example of two full positive integers, where n=1 and n+1 is an unknown integer value, we can illustrate that the largest integer must be found in this instance, and this also applies with three values, or four values, or five values, and so on, indefinitely.....

The given problem is made a little easier by the fact that the integers increase by the same proportion of increments throughout. So, they could increase by one, or two, or three, or so on, indefinitely.....

If the set of integers is EVEN and equivalent to two integers, with n=1 and n=3 the total value combined = 4. ...... Two integers multiplied by two. ......... Dividing by 2, will give the value of the increments.

If the set of integers is ODD and equivalent to three integers, e.g. (n)=1, (n+1)=4, (n+2)=7 -.... finding the median value = 6, ...... Divide by 2. = 3 = the value of the increments = 3.

Once we know the value of the increment(s), we can simply multiply the number of integers in the set by the increment value, to get the highest value.

So, when the increment increases by one, 9.000.002 is the highest value. 9,000,002 x 1.

When the increment increases by two , it is 9,000,002 multiplied by two.

When the increment is three, the highest value is 9,000,002 x 3

When the increment is four, the highest value is 9.000.002 x 4

When the increment is five, the highest value is 9,000,002 x 5

............................................. So....... it appears that the key to solving this problem and to finding the highest /last value in the integer set, is to find the increment value first ! .......... ........... Then multiply the increment value by the number of integers in the set.

SO, the quickest solution is: ...... Add the first two numbers together to find the increment value, using the following formula : [(n) + (n+1)] - [ (n+1) - (n) -1 ] = Increment.Value. (I.v)

Multiply the Increment.value by the number of integers, in this instance, by 9,000,002. to get the highest/last value in the set.

- - - - - - - - - Any comments, criticisms, objections, other solutions, etc, - welcomed !

A K - 6 months, 3 weeks ago

Add together the first two positive integers and find the Common difference ( or Increment Value ) [which remains the same throughout the set/ series] and then Multiply it by the total number of integers - to give the highest number in the set/series.

A K - 6 months, 3 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...