Find the shortest sequence of numbers between 1 and K (K=99) such that each pair of numbers are adjacent somewhere in the sequence (1231 is an answer if K=3).

piacolgatis

piacolgatis

Answered question

2022-09-29

Find the shortest sequence of numbers between 1 and K (K=99) such that each pair of numbers are adjacent somewhere in the sequence (1231 is an answer if K=3).

Answer & Explanation

Phoenix Owen

Phoenix Owen

Beginner2022-09-30Added 6 answers

Try to arrange the students of the class into two groups so that at least half a student's friends are in the other group.
(Assume friendship in mutual).
This can be done by starting with a random split, and then refining the split by moving around students who don't 'fit' in the group.
The proof it works is by looking at the size of the cut between the groups and by showing that it reduces each time.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?