The problem is now that i need to express big theta as a function of of the length of N (the number
of bits in N). I have no idea what I am supposed to do here? I would greatly appreciate if anyone could help.

Re: Big theta notation

Posted 04 October 2008 - 03:15 PM

I am supposed to make an algoritm that finds the factors of a number.
So I made an algoritm that checks if modulus of that number and any number up to and including the number/2. I then need to make big theta notation to express how long
my algorithm takes.
Since the number of calculations is directly proportional to how high the input number is, the big theta notation must be O(N).
Then I need to express this as a function of the length of N (the number
of bits in N).
This is the part where I am lost. Like you say an int in fx java is 32bits so no matter what value N has, it will always be 32 bits?