All pastes #37964 Raw Edit

Anonymous

public text v1 · immutable
#37964 ·published 2006-01-22 07:14 UTC
rendered paste body
	

What is the probability of two people arriving at a restaurant withing 6 minutes of each other between 1 PM and 5 PM?The answer needs to be rounded to 4 decimal places with no trailing zeroes. (e.g .15 needs to be represented as 0.15, 0.154567 needs to be represented as 0.1546)


	
Ans:- 		


2	

5 people got on a train at its starting point. There are 8 stations on which they can get off (excluding the starting point. What is the total number of different ways they can do this considering that no more than 2 people get off at the same station?


	
Ans:- 		


3	

A machine has 64 KB of virtual memory and 1 KB of physical memory. This machine uses a set-associative page table with a page size of 64 bytes and 4 sets. The low order bits of the virtual page number are used to decide the set in which a virtual page is placed. The page replacement algorithm in each set is round-robin: on the first page fault, the first page in the set is replaced. On the second page fault, the second page in the set is replaced and so on. The contents of the page table are given in increasing order of physical page number below, where the virtual page number is in hex: 0x168, 0x22c, 0x1a0, 0x204, 0x99, 0x19d, 0x51, 0x2f5, 0x2ca, 0xe, 0x202, 0x2e6, 0x3fb, 0x17f, 0x2b3, 0x1d7. A program issues the following virtual addresses in hex: 0x6830, 0xb108, 0x5a28, 0xabf0, 0xb798, 0x1454, 0x266c, 0x9d78. What are the final contents of the Page Table?


	
Ans:- 		


4	

I have a 4 bit number "n" in mind (that is, 0 <= n <= 15). To help you guess this number, I have answered seven questions below (the least significant bit is bit 1 and the most significant bit is bit 4):

Q1. Is bit 1 equal to 1? Yes
Q2. Is bit 2 equal to 1? No
Q3. Is bit 3 equal to 1? Yes
Q4. Is bit 4 equal to 1? No
Q5. Is the sum of bits 1, 2 and 4 even? Yes
Q6. Is the sum of bits 1, 3 and 4 even? No
Q7. Is the sum of bits 2, 3 and 4 even? No

The catch here is that the answer to exactly one of the seven questions above is wrong, the other six are correct.
Which answer is wrong? (For example, if the answer to Q6 above is wrong, your response should be 6.)


	
Ans:- 		


5	

9 0s are placed from 0th cell to 8th cell of an array; 6 1s are placed from 10th cell to end of the array. On the whole, there are 16 cells, so that just one cell remains unoccupied. 0s only move rightward; 1s move leftward. Every move is either a move to the next empty cell or a jump over one cell which has different value. In any case, no two values are allowed in the same square. The goal is to move 1s into 6 leftmost positions and the 0s into 9 rightmost positions. How many minimum moves are needed to achieve this?


	
Ans:- 		


6	

All 7 digit permutations of number 1234567 are sorted and kept in an array of 5040 elements. (0th element is 1234567, 1st element is 1234576 and 5039th element is 7654321.) What is the 1252th element in this array?


	
Ans:- 		


7	

A character in an alphabet is represented in 12 bits. How many characters are there in the alphabet which have at least one sequence of 3 adjacent 1s?


	
Ans:- 		


8	

Given a 9 X 9 sided square(rows 0 to 8, columns 0 to 8) where the cell(7,1) contains a RED dot (rest of the cells dont contain the RED dot). How many squares are present of any size without having the RED dot in them?


	
Ans:- 		
	
	
	
	
	
	
	
Today's Brain Teaser	
		
	
	
	
	
	An array of size N has distinct values 1&#8230;N in random order. You have only operator called rev(X) (where X is any value from 0 to N-1) which reverses all values from 0 to X (example values 2,3,1,4 and rev(2) gets you 1,3,2,4). Our objective is to sort the array using minimum number of Rev(X) functions. How many permutations of N size array require exactly N number of rev(X) operators to get sorted 

      a.      for size 3 only 1,3,2 requires 3                  moves. 		
	
	
	
			
	
	
	
	
	
	
Interesting Intern Projects	
		
	
	
	
	
	
	
	
	
Ashish Aggarwal	
	
IIT-Kanpur	
	
Area of Work	
	
Operating Systems	
	
	
	The Problem:		
Interix subsystem on windows provides a rich set of UNIX semantic api&#8217;s, SDK and utilities which helps in UNIX application to migrate to Windows. (http://www.microsoft.com/windows serversystem/sfu/default.mspx).

But the above scenario requires user to recompile the source code using Interix SDK generating windows PE format before execution. We required a way where user can execute the UNIX binaries (ELF format) on windows without going through the recompilation phase.		
	
More about Ashish's Work >>		
	
	
	
	
	
	
	
Nitin Awasthi	
	
IIIT-Allahabad	
	
Area of Work	
	
Software Verification	
	
	
	The Problem:		
Identifying lock orders of the software and finding lock order violations. Also improving the lock window for data protection		
	
More about Nitin's Work >>		
	
	
	
	

Manage Your Profile