Results 1 to 3 of 3

Math Help - Bit operations algorithm question

  1. #1
    Member
    Joined
    Jan 2010
    Posts
    232

    Bit operations algorithm question

    Suppose that an algorithm uses 3n^2+2^n bit operations to solve a problem of size n.

    Suppose that your machine can perform one bit operation in 10^{-9} seconds, how long does it take your algorithm to solve a problem of size given below.

    Note, if your algorithm takes more than 60 seconds, answer in minutes. For more than 60 minutes, answer in hours. For more than 24 hours, answer in days. For more than 365 days, answer in years. For more than 100 years, answer in centuries.
    a) 10
    b) 20
    c) 50
    d) 100

    Our class has been taught nothing so far concerning algorithm size, so I really need help on this. I've listed the question word for word.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member Deadstar's Avatar
    Joined
    Oct 2007
    Posts
    722
    Surely subbing in the n value will give you total amount of bit operations need then multiplying by 10^-9 will give you the amount of seconds it takes.

    Ex.

    for n = 100 you get...

    3 \cdot 100^2 + 2^{100} = 1267650600228229401496703235376 bit operations.

    Multiply by 10^-9 to get roughly 1.2676 \times 10^{21} seconds.

    By the way I got that to be 4.01969368413314759 \times 10^{11} centuries!
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Jan 2010
    Posts
    232
    Quote Originally Posted by Deadstar View Post
    Surely subbing in the n value will give you total amount of bit operations need then multiplying by 10^-9 will give you the amount of seconds it takes.

    Ex.

    for n = 100 you get...

    3 \cdot 100^2 + 2^{100} = 1267650600228229401496703235376 bit operations.

    Multiply by 10^-9 to get roughly 1.2676 \times 10^{21} seconds.

    By the way I got that to be 4.01969368413314759 \times 10^{11} centuries!
    Thanks for confirming what I thought was meant for us to do. The question wasn't really worded well for me. I thought it'd be a lot worse.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Thomas algorithm number operations
    Posted in the Advanced Math Topics Forum
    Replies: 6
    Last Post: November 25th 2011, 05:08 AM
  2. [SOLVED] Algorithm and elementary operations
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: March 30th 2011, 08:25 AM
  3. Basic Question about Operations on Sets
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: February 1st 2010, 02:36 PM
  4. Question on set operations
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: November 15th 2009, 08:02 PM
  5. perform basic operations on large numbers algorithm?
    Posted in the Advanced Math Topics Forum
    Replies: 2
    Last Post: October 17th 2008, 08:50 AM

Search Tags


/mathhelpforum @mathhelpforum