Find sequence Term For set of Numbers
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Find sequence Term For set of Numbers

  1. #1
    Join Date
    Feb 2013
    Posts
    1

    Post Find sequence Term For set of Numbers

    hi!
    how we can find an sequence Term for set of numbers
    1-numbers are always in order
    2-if we have n numbers n/2 numbers are always present
    for example we have:

    Input:0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30

    And Result:

    Output-->2*X,x=[0..15]

    i think this is very difficult whats your comment?
    what computer field or algorithm can help me?
    thank you

  2. #2
    Join Date
    Feb 2013
    Posts
    13

    Re: Find sequence Term For set of Numbers

    it fully depends upon what operations you permitted to use. Just arithmetic ones???

  3. #3
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,005

    Re: Find sequence Term For set of Numbers

    The general term for inferring a relationship between two variables based only one a number of observations is regression. For the example you listed, it can be expressed as a line equation (i.e. y = a*x + b). Linear regressions are quite simple to calculate. See https://en.wikipedia.org/wiki/Simple_linear_regression

    For relationships that cannot be expressed in that format, you can try using non-linear regression. The algorithms for such regressions are approximate and not always guaranteed to find an optimal solution. Nevertheless, they can be (and are) used effectively in virtually all fields of science and engineering. In general, though, you'll need to have an idea of the functional form (and perhaps some guesses at the approximate constants) to generate high quality fits.

    You can read about the issue in detail at the Wikipedia page: https://en.wikipedia.org/wiki/Regression_analysis
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center