Question
A Young tableau is a 2D array of integers increasing from left to right and from top to bottom. Any unfilled entries are marked with , and hence there cannot be any entry to the right of, or below a . The following Young tableau consists of unique entries.
| 1 | 2 | 5 | 14 |
| 3 | 4 | 6 | 23 |
| 10 | 12 | 18 | 25 |
| 31 |
When an element is removed from a Young tableau, other elements should be moved into its place so that the resulting table is still a Young tableau (unfilled entries may be filled in with ). The minimum number of entries (other than 1) to be shifted, to remove 1 from the given Young tableau is _____.
Official answer and solution
- Official answer
- 5
- From
- Official GATE 2015 answer key
Solution
Simulate the standard Young tableau deletion procedure starting at .
Deleting the minimum element at cell leaves a vacancy. To restore the Young tableau invariant, repeatedly compare the right neighbor and the bottom neighbor , shifting the smaller of the two into the vacant cell .
Trace of shifts:
- At , right neighbor is , down neighbor is .
- . Shift from to . Vacancy moves to . (Shift 1)
- At , right neighbor is , down neighbor is .
- . Shift from to . Vacancy moves to . (Shift 2)
- At , right neighbor is , down neighbor is .
- . Shift from to . Vacancy moves to . (Shift 3)
- At , right neighbor is , down neighbor is .
- . Shift from to . Vacancy moves to . (Shift 4)
- At , right neighbor is , down neighbor is .
- . Shift from to . Vacancy moves to . (Shift 5)
- At , down neighbor is , right is boundary. The vacancy is filled with .
The elements shifted into place are .
The total number of shifted entries (other than 1) is 5.
5
Counting the removal of 1 as one of the shifts, answering 6 instead of 5.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2015 Computer Science and Information Technology (CS) Session 2
- Question
- 41 of 65, printed as CS Q.31
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.