Math, asked by Anonymous, 1 day ago

✌️_ A machine took 200 sec to sort 200 names, using bubble sort. in 800 sec, it can approximately sort ?_✌️
________________________
❥Nᴏ Cᴏᴘʏ Pᴀsᴛᴇ..!❤️⭐
❥Dᴏ Nᴏᴛ Sᴘᴀᴍ..!❤️⭐ _________________________

ONLY ANSWER MY FOLLOWING ♥️​

Answers

Answered by ThatThinker
4

\qquad \huge{\underline{\underline{\boxed{\sf{\purple{❥︎sᴏʟᴜᴛɪᴏɴ ࿐}}}}}}

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

For sorting 200 names bubble sort makes 200 * 199/2 = 19900 comparisons. So,the time needed for 1 comparison is 200 sec approx.In 800 sec it can make 80,000 comparisons.We have to find n, such that n(n-1)/2=80,000. solving n is approx 400.

\red{ \longmapsto\:} 200 sec for 200 records

\red{ \longmapsto\:} 200 <= c * [200]^2

\red{ \longmapsto\:} c = 1/200

\red{ \longmapsto\:} in 800 sec, records, n = ?

\red{ \longmapsto\:} 800 <= [1/200]*[n]^2

\red{ \longmapsto\:} n = 400

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Answered by ChitranjanMahajan
0

In 800 sec, machine can approximately sort 400 names.

Given,

A machine took 200 sec to sort 200 names, using bubble sort.

To find,

In 800 sec, it can approximately sort ?

Solution,

For sorting 200 names bubble sort makes 200 199/2 = 19900 comparisons.So,the time needed for 1 comparison is 200 sec approx. In 800 sec it can make 80,000 comparisons. We have to find n, such that   n(n-1)/2 = 80,000. solving n is approx 400.

* 200 sec for 200 records

200 sec for 200 records200 <= c * [200]^2

200 sec for 200 records200 <= c * [200]^2c = 1/200

200 sec for 200 records200 <= c * [200]^2c = 1/200in 800 sec, records, n = ?

200 sec for 200 records200 <= c * [200]^2c = 1/200in 800 sec, records, n = ?800 <= [1/200]*[n]^2

200 sec for 200 records200 <= c * [200]^2c = 1/200in 800 sec, records, n = ?800 <= [1/200]*[n]^2n = 400

#SPJ3

Similar questions