# some questions about Algorithms! • ### Question

• hello

i`m a student,and i also develope codes in c#,

it has things like O(n),Omega and...

Wednesday, February 14, 2007 6:15 PM

### All replies

• I think the best place to ask things about C# algorithms is the Visual C# Language Forum.

What questions do you have anyways ?
Wednesday, February 14, 2007 10:03 PM
• Hummmm.....

Thought I'd tag along here - I have a traditional bute force algorithm to a problem, but I think it's the travelling salesman problem,  can't quite see how to apply it (and I haven't implemented it in 15 yrs so I'm pulling y hair out - I'm amazed I have any left).

Imagine hotel booking system, where group booking neeed to be able to ensure they are next door to their friends (assume that the booking ystem knows that the rooms are next to each other.)

At the moment I search for each individual booking to find room which suit them , then start to look at room which are close (using recursion) to each other from those results.  That seems to give the lowest permutations but still takes along time.  Is there anything better?

Thursday, February 15, 2007 1:57 AM
• ooops man

Friday, February 16, 2007 4:42 PM
• Hi

i`m a computer science student,

thank you for your help,but this questions are similar to maths problems,you know

i mean they are really some questions that are in some books about designing algorithms

like nipulitan`s and horitz`s books,i`m looking for the answers to put them in my project.

Friday, February 16, 2007 4:55 PM
• Hi Bardia,

Sorry but I think I haven't understood your question. It seems to me that you are trying to determinate an algorithm's complexity. Is it correct?

Rgds,

Sergio

Friday, February 16, 2007 8:41 PM
• Hi sergio

you are right,i`v some questions about algorithm`s complexities,just look at these questions,

1)we can solve sample problems with the length of 100 in 1 minutes,with the A algorithm which is an θ(2^n) algorithm.on the other hand ,soon we should solve sample problems with the two times bigger length in 1 minutes again.Do you think we need a faster and more expensive Computer?

2)write an algorithm for this problem and determine it`s complexity.

we have a list having n positive different integer number,divide it in two smaller list with the length of n/2,but the defference between the sum of the numbers in the two smaller list will be maximum.you can assume that n=2^k

3)write an θ(n*lg(n)) algorithm which calculates the rest of the division between x^n  and p.

n=2^k

4)determine which math functions exist in these sets?

a)n^(O(1))

b)O(n^O(1))

c)O(O(n^(O(1))))

5)show  that the f(n)=|(n^2)*Sin (n)| doesn`t exist in neither θ(n) nor Ω(n) .