CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2008
    Posts
    1

    Concave down array ....

    I am doing this problem that requires me to write an log n algorithm to find the maximum element in a 'STRICTLY CONCAVE DOWN ARRAY' .....

    writing the algorithm is not a problem ... however am not able to find (this includes google as well ) what a strictly concave down array means ??

    i am presuming that i simply write a mergesort and pop the last element of the array as the maximum ...

    please advise ... thanks

  2. #2
    Join Date
    Feb 2008
    Posts
    966

    Re: Concave down array ....

    Personally I have never heard of such a thing. I know about concave up / down functions f(x) but not a concave down array for finding the max element in the array.



    I think you should ask your Prof what it means, and why he made up such a silly term

  3. #3
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Concave down array ....

    Just a hunch but I think that the array has values such as they are describing a concave down function. I.e. if plotted in x-y with array index as x and array value as y.

  4. #4
    Join Date
    Feb 2008
    Posts
    966

    Re: Concave down array ....

    Actually, I think you are absolutely right. I am willing to be that is exactly what the person who coined the term meant. I can see a O(logn) algorithm for solving such a case.

  5. #5
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: Concave down array ....

    What is concave up / down functions f(x) ?

    Sorry for my stupidity.

  6. #6
    Join Date
    Jun 2002
    Location
    Moscow, Russia.
    Posts
    2,176

    Re: Concave down array ....

    Quote Originally Posted by Peter_APIIT
    What is concave up / down functions f(x) ?

    Sorry for my stupidity.
    Google gives this answer at first line: http://www.mathwords.com/c/concave_down.htm

  7. #7
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: Concave down array ....

    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured