Question: (20 points) Consider a switch with two inputs A and B and two outputs C and D. Each input is a single bit. Each
(20 points) Consider a switch with two inputs A and B and two outputs C and D. Each input is a single bit. Each output is also a single bit. The switch has two settings. In one setting, A is connected to C, and B is connected to D. That is, the outputs C and D are just the inputs A and B, respectively. In the other setting, A is connected to D, and B is connected to C. That is, the outputs C and D are the inputs B and A, respectively. Let n be a positive power of 2. Describe how to assemble such switches into one device such that the device has n inputs and n outputs, and by setting the switches appropriately in the device, the ouptuts can be any of the n! permutations of the inputs. Your device should not use more than O(nlogn) switches. Explain the correctness of your device.
Step by Step Solution
3.52 Rating (149 Votes )
There are 3 Steps involved in it
To construct a device with n inputs and n outputs capable of producing any of the n permutations of ... View full answer
Get step-by-step solutions from verified subject matter experts
