Show that among 5 arbitrarily chosen integers a, a2,a3M4,a5, there must exist two integers ai ,aj,...
Prove the following: Show that for any given 92 integers there exist two of them whose sum, or else whose difference, is divisible by 180.
Prove the following: Show that for any given 107 integers there exist two of them whose sum, or else whose difference, is divisible by 210.
pigeonhole
1. Show that in every sequence (ai,a2, a100) of the letters A,B,C,D, there are two indices 1i< j < 98 such that (ai, ai+1,aj+2) = (aj, aj+1, aj+2).
Problem 13. (1 point) [3 Marks] Prove the following: Show that for any given 42 integers there exist two of them whose sum, or else whose difference, is divisible by 80.
Discrete math question
2. Consider to the following two algorithms procedure SortA(a1,a2, ..., an: a list of real numbers with n 2 2) 1, for j := 2 to n 2. i:= 1 3. while aj > ai 4. 5. m: 6. or k 0toj -i-1 7. i:-i+1 aj-k:aj-k-1 ai := m
#3 and 5 only
3. Prove that if six natural numbers are chosen at random, then the sum or difference of two of them is divisible by 9. 4. Consider a square whose side-length is one unit. Select any five points from inside this square. Prove that at least two of these points are within 2 units of each other. 5. Prove that any set of seven distinct natural numbers contains a pair of numbers whose sum or difference is...
Someone help please Let A be an array of 5 integers, whose contents are as follows: 3, 2, 1, 5, 4 We will apply quick sort to sort this array. Show all of the element-wise comparisons made by the algorithm in the correct order. Here an element-wise comparison means the comparison of one element of the array with another element of the array or the key set in a particular step of the algorithm. Since the algorithm may move the...
Please show work clearly. Thanks
4. Suppose you had n matrices with dimensions: ai xbi ,a2 x b2. . . . ,a,, X bn. Your goal is to determine, given two integers s and t, whether it is possible to multiply a sequence from the list of given matrices together, in any order and possibly not using all of the matrices, to end up with a matrix with dimensions s × t. For example, if the list of matrix dimensions...
The input consists of n numbers a1, a2, . . . , an and a target value t. The goal is to determine in how many possible ways can we add up two of these numbers to get t. Formally, your program needs to find the number of pairs of indices i, j, i < j such that ai+aj = t. For example, for 2, 7, 3, 1, 5, 6 and t = 7, we can get t in two...
nat I &0, then at 0 l c and i c l< b imply c = 0 (5) Show that a set of integers closed under addition need not consist of all multiples of a single fixed element. (6) Show that any two integers a and b have a least common multiple m a, b which is a divisor of every common multiple of a and b and which is itself a common multiple of a and b. (Hint: see...