Re: [algogeeks] value of n

2010-05-03 Thread Sundeep Singh
oops 

On Sat, May 1, 2010 at 5:50 PM, Sundeep Singh singh.sund...@gmail.comwrote:

 Hi Amit,

 here's the answer: (I am assuming in your equation lg implies log to the
 base 10)
 n  8 log(n)
 = n/8  log(n)
 = 10 ^(n/8)  n


The final deduction was incorrect!!
for log base 10, the answer is:
2 = n = 6

--Sudneep.



 = n  8

 --Sundeep.



 On Sat, May 1, 2010 at 10:43 AM, Amit Agarwal lifea...@gmail.com wrote:

 I could not get you properly. This is an equation comes from the problem
 statement where I need to find out cut-off value of n between insertion and
 merge sort. I think equation is part of basic mathematics but I don't
 remember how do I solve it.


 -Regards
 Amit Agarwal
 Contact: 09765348182
 www.amitagrwal.com




 On Sat, May 1, 2010 at 9:13 AM, abhijith reddy 
 abhijith200...@gmail.comwrote:

 binary search on n

 On Fri, Apr 30, 2010 at 10:15 PM, Amit Agarwal lifea...@gmail.comwrote:

 how do I compute n from this equation.
 n  8lg(n)

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] value of n

2010-05-03 Thread Amit Agarwal
yeah, you are right. It comes from 2 to 6. But is there any way to solve it
on paper?
-Regards
Amit Agarwal
Contact: 09765348182
www.amitagrwal.com



On Mon, May 3, 2010 at 3:02 PM, Sundeep Singh singh.sund...@gmail.comwrote:

 oops 

 On Sat, May 1, 2010 at 5:50 PM, Sundeep Singh singh.sund...@gmail.comwrote:

 Hi Amit,

 here's the answer: (I am assuming in your equation lg implies log to the
 base 10)
 n  8 log(n)
 = n/8  log(n)
 = 10 ^(n/8)  n


 The final deduction was incorrect!!
 for log base 10, the answer is:
 2 = n = 6

 --Sudneep.



 = n  8

 --Sundeep.



 On Sat, May 1, 2010 at 10:43 AM, Amit Agarwal lifea...@gmail.com wrote:

 I could not get you properly. This is an equation comes from the problem
 statement where I need to find out cut-off value of n between insertion and
 merge sort. I think equation is part of basic mathematics but I don't
 remember how do I solve it.


 -Regards
 Amit Agarwal
 Contact: 09765348182
 www.amitagrwal.com




 On Sat, May 1, 2010 at 9:13 AM, abhijith reddy abhijith200...@gmail.com
  wrote:

 binary search on n

 On Fri, Apr 30, 2010 at 10:15 PM, Amit Agarwal lifea...@gmail.comwrote:

 how do I compute n from this equation.
 n  8lg(n)

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] value of n

2010-05-03 Thread Sundeep Singh
Hi Amit,
This particular example was quite simple.. just required using calculator
couple of times.
We know log 1 =0 and log 10 = 1, so given the above equation, it was clear
that the answer had to lie within the range (1,10) and then I used the
calculator couple of times to narrow down the range.

For a more generic/complicated equation of this nature, u'll need to plot
the functions as people have suggested earlier.

Regards,
Sundeep.

On Mon, May 3, 2010 at 4:51 PM, Amit Agarwal lifea...@gmail.com wrote:

 yeah, you are right. It comes from 2 to 6. But is there any way to solve it
 on paper?
 -Regards
 Amit Agarwal
 Contact: 09765348182
 www.amitagrwal.com



 On Mon, May 3, 2010 at 3:02 PM, Sundeep Singh singh.sund...@gmail.comwrote:

 oops 

 On Sat, May 1, 2010 at 5:50 PM, Sundeep Singh singh.sund...@gmail.comwrote:

 Hi Amit,

 here's the answer: (I am assuming in your equation lg implies log to
 the base 10)
 n  8 log(n)
 = n/8  log(n)
 = 10 ^(n/8)  n


 The final deduction was incorrect!!
 for log base 10, the answer is:
 2 = n = 6

 --Sudneep.



 = n  8

 --Sundeep.



 On Sat, May 1, 2010 at 10:43 AM, Amit Agarwal lifea...@gmail.comwrote:

 I could not get you properly. This is an equation comes from the problem
 statement where I need to find out cut-off value of n between insertion and
 merge sort. I think equation is part of basic mathematics but I don't
 remember how do I solve it.


 -Regards
 Amit Agarwal
 Contact: 09765348182
 www.amitagrwal.com




 On Sat, May 1, 2010 at 9:13 AM, abhijith reddy 
 abhijith200...@gmail.com wrote:

 binary search on n

 On Fri, Apr 30, 2010 at 10:15 PM, Amit Agarwal lifea...@gmail.comwrote:

 how do I compute n from this equation.
 n  8lg(n)

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] value of n

2010-05-01 Thread Amir hossein Shahriari
this equation is true for 32 but not for 64 so i used a linear search
for 43 the right side is 43.410118 and for 44 its 43.675453
so this equation means n44

On Sat, May 1, 2010 at 9:43 AM, Amit Agarwal lifea...@gmail.com wrote:

 I could not get you properly. This is an equation comes from the problem
 statement where I need to find out cut-off value of n between insertion and
 merge sort. I think equation is part of basic mathematics but I don't
 remember how do I solve it.


 -Regards
 Amit Agarwal
 Contact: 09765348182
 www.amitagrwal.com




 On Sat, May 1, 2010 at 9:13 AM, abhijith reddy 
 abhijith200...@gmail.comwrote:

 binary search on n

 On Fri, Apr 30, 2010 at 10:15 PM, Amit Agarwal lifea...@gmail.comwrote:

 how do I compute n from this equation.
 n  8lg(n)

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] value of n

2010-05-01 Thread Afroz Mohiuddin
An easy way to do would be to plot both functions in matlab, n and 8log(n)
... just see when y = x is below y = 8log(x) happens between 3= n = 25
if log is to natural base  if it was log base 2 ... 3= n = 43

On Sat, May 1, 2010 at 10:43 AM, Amit Agarwal lifea...@gmail.com wrote:

 I could not get you properly. This is an equation comes from the problem
 statement where I need to find out cut-off value of n between insertion and
 merge sort. I think equation is part of basic mathematics but I don't
 remember how do I solve it.


 -Regards
 Amit Agarwal
 Contact: 09765348182
 www.amitagrwal.com




 On Sat, May 1, 2010 at 9:13 AM, abhijith reddy 
 abhijith200...@gmail.comwrote:

 binary search on n

 On Fri, Apr 30, 2010 at 10:15 PM, Amit Agarwal lifea...@gmail.comwrote:

 how do I compute n from this equation.
 n  8lg(n)

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
We are here on earth to do good for others. What the others are here for, I
don't know.

Afroz Mohiuddin
Final Year Masters Student
Dept Computer Science and Engineering
Indian Institute of Technology Kanpur
Kanpur - 208016
INDIA

Address:  F-112 Hall 9
Telephone: [91]9838773891
Email: afrozena...@gmail.com
  a...@iitk.ac.in
  a...@cse.iitk.ac.in

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] value of n

2010-04-30 Thread Amit Agarwal
how do I compute n from this equation.
n  8lg(n)

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] value of n

2010-04-30 Thread abhijith reddy
binary search on n

On Fri, Apr 30, 2010 at 10:15 PM, Amit Agarwal lifea...@gmail.com wrote:

 how do I compute n from this equation.
 n  8lg(n)

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.