TCS
Company
Aditya has 35 computer files that he wants to store on floppy disks. Each floppy disk has a capacity of 1.44 megabytes (MB). 2 of the files have size 0.8MB, 16 have size 0.7MB and the remaining 17 have size 0.4MB. No file can be split across floppy disks. What is the minimal number of floppy disks that will hold all these files?
16
18
14
15
17
Read Solution (Total 8)
-
- since no files can b split into two floppy disks
1st disk=.8+.4=1.2MB
2 such disks are required
3rd disk=.7*2=1.4MB
8 such disks are required
next disk=.4*3=1.2MB
5 such disks are required
hence total of 2+8+5=15 disks required (minimum) - 12 years agoHelpfull: Yes(47) No(1)
- let A be the type of those two files having size 0.8MB
B type of files having size 0.7MB
C type of files having size 0.4MB
max capacity of 1 floppy is 1.44MB
now, for type B files we can save 2 files in 1 floppy ,coz .7+.7=1.4 if we try to add 3rd value will exceed the maximum capacity..hence we will save the next 2 files in next floppy..as from pattern we can say 1 floppy is required to save 2 files of type B..so total 8 floppy req. to save 16 files of type B.
now, for type C we can save 3 files in 1 floppy, coz .4+.4+.4 = 1.2, if we try to save 4th file value will agai exceed the max. capacity of floppy..similarly next 3 will be saved in 2nd floppy..and so on..as the total files of type C is 17, and we can save 3 files in 1 floppy so, 15 files can be saved in 5 floppy and 2 will be left..
now these 2 can be saved with the files of type A having size 0.8 MB
so, 0.8(1 file of type A)+0.4(1 file of type C) = 1.2
0.8(2nd file of type A) + 0.4(2nd file of type C) = 1.2
here in last condition we used 2 floppy
so, toal disks used are = 8+5+2 = 15 - 12 years agoHelpfull: Yes(28) No(0)
- ans is 15
- 12 years agoHelpfull: Yes(4) No(0)
- 16 files of .7 mb takes 11.2mb and 2 files of .8mb takes 1.6 mb and 4 files of .4 mb takes 1.6mb so total space till now we use 11.2+1.6+1.6=14.4 mb means 10 floppy disks and now 13 .4mb files are left.. so for 13 files of .4 mb we require 13*.4=5.2mb space for which we require minimum 4 disks of 1.44mb so total minimum disk require =10+4=14
- 12 years agoHelpfull: Yes(3) No(10)
- total mb's=2*8 +16*.7+17*.4=19.6
numbr of dics=19.6/1.44=13.6
so 13 disc are cnfrm
storge in 13 discs=13*1.44=18.72
remaining mb's=19.6-18.72=.88
so for .88mb,we have to use 1 more disc..
so ans is 13+1=14discs - 12 years agoHelpfull: Yes(2) No(15)
- its 15 or 14???????
- 12 years agoHelpfull: Yes(2) No(2)
- shouldnt d answer b 16 as remaining 17 files require 6 disks....
- 12 years agoHelpfull: Yes(1) No(9)
- ans is 15
0.7*2=1.4 -------> 8 floppies
0.8+0.4=1.2 -----> 2 floppies
0.4*3=1.2 -------> 5 floppies
total = 8+2+5=15 floppies - 8 years agoHelpfull: Yes(1) No(0)
TCS Other Question