computer program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • anuj

    computer program

    plz people help me in writing theses programs

    Write a computer program (in C or C++) that computes langrange
    interpolation polynomials for the function f(x) = Cos(x) at 10 equally
    spaced points of the interval [0,2].

    Write a computer program (in C or C++) that reads n coefficients of
    each of the n linear equations and solves these equations, using gauss
    Elimination method and prints appropriate solution

  • Richard Bos

    #2
    Re: computer program

    "anuj" <anujkairati@gm ail.comwrote:
    plz people help me in writing theses programs
    plz st00dents do yr own homework L0L!!!11!

    Richard

    Comment

    • mark_bluemel@pobox.com

      #3
      Re: computer program


      anuj wrote:
      plz people help me in writing theses programs
      You've phrased your request wrongly (apart from the obscenity of "plz"
      and "theses").

      What you meant was "please write these programs for me" - to which the
      answer is "no". We don't offer a "do your homework for free" service.

      If you do some work, make an attempt and post what you've written
      together with a description of the problems you've encountered, we'll
      help.

      Comment

      • osmium

        #4
        Re: computer program

        "anuj" wrote:
        Write a computer program (in C or C++) that computes langrange
        interpolation polynomials for the function f(x) = Cos(x) at 10 equally
        spaced points of the interval [0,2].
        >
        Write a computer program (in C or C++) that reads n coefficients of
        each of the n linear equations and solves these equations, using gauss
        Elimination method and prints appropriate solution
        Could you, given enough time, do this with pencil and paper and a scientific
        calculator? If not, this is a math question, not a computer programming
        question. Wikipedia is often a good starting point for questions such as
        this.

        Did you mean LaGrange? Spelling is important when dealing with computers,
        they are very unforgiving. There are tons of hits on <lagrange
        interpolationon Google.


        Comment

        • dcorbit@connx.com

          #5
          Re: computer program


          anuj wrote:
          plz people help me in writing theses programs
          >
          Write a computer program (in C or C++) that computes langrange
          interpolation polynomials for the function f(x) = Cos(x) at 10 equally
          spaced points of the interval [0,2].
          Def:


          Do it this way:
          Neville's algorithm is an interpolation algorithm which proceeds by first fitting a polynomial of degree 0 through the point (x_k,y_k) for k=1, ..., n, i.e., P_k(x)=y_k. A second iteration is then performed in which P_i and P_(i+1) are combined to fit through pairs of points, yielding P_(12), P_(23), .... The procedure is repeated, generating a "pyramid" of approximations until the final result is reached P_1; P_2; P_3; P_4P_(12); P_(23); P_(34)P_(123); P_(234)P_(1234). The final result is

          Write a computer program (in C or C++) that reads n coefficients of
          each of the n linear equations and solves these equations, using gauss
          Elimination method and prints appropriate solution
          Gaussian elimination is a method for solving matrix equations of the form Ax=b. (1) To perform Gaussian elimination starting with the system of equations [a_(11) a_(12) ... a_(1k); a_(21) a_(22) ... a_(2k); | | ... |; a_(k1) a_(k2) ... a_(kk)][x_1; x_2; |; x_k]=[b_1; b_2; |; b_k], (2) compose the "augmented matrix equation" [a_(11) a_(12) ... a_(1k); a_(21) a_(22) ... a_(2k); | | ... |; a_(k1) a_(k2) ... a_(kk)|b_1; b_2; |; b_k][x_1; x_2; |; x_k]. (3) Here, the column...



          The first exercise is trivial, and the second one is harder.

          Once you have some code, show it to us and we will offer handy
          suggestions.

          Comment

          • Lars Rune Nøstdal

            #6
            Re: computer program

            On Thu, 02 Nov 2006 11:02:47 +0000, Richard Bos wrote:
            "anuj" <anujkairati@gm ail.comwrote:
            >
            >plz people help me in writing theses programs
            >
            plz st00dents do yr own homework L0L!!!11!
            >
            Richard
            OMG .. OH NOOES!! WHAT EVER SHALL WE DOES NOW?! I NEED THIZ EDJUCÆISHÅN
            FÃ…R MAI FUTURE EMPLÃ…YMENT! PLZ GIVEZ IT TO ME -- PLEEEZ!

            --
            Lars Rune Nøstdal


            Comment

            • Christopher Benson-Manica

              #7
              Re: computer program

              Lars Rune N?stdal <larsnostdal@gm ail.comwrote:
              OMG .. OH NOOES!! WHAT EVER SHALL WE DOES NOW?! I NEED THIZ EDJUC?ISH?N
              F?R MAI FUTURE EMPL?YMENT! PLZ GIVEZ IT TO ME -- PLEEEZ!
              S1f, f00! Mai d3gr33 R teh pr3ciousssss!!

              (It's rather nice that programming is somewhat more difficult to cheat
              at than, say, English. All those free essay sites should be
              imprisoned for contributing to the delinquency of minors.)

              --
              C. Benson Manica | I *should* know what I'm talking about - if I
              cbmanica(at)gma il.com | don't, I need to know. Flames welcome.

              Comment

              • dcorbit@connx.com

                #8
                Re: computer program


                Christopher Benson-Manica wrote:
                Lars Rune N?stdal <larsnostdal@gm ail.comwrote:
                >
                OMG .. OH NOOES!! WHAT EVER SHALL WE DOES NOW?! I NEED THIZ EDJUC?ISH?N
                F?R MAI FUTURE EMPL?YMENT! PLZ GIVEZ IT TO ME -- PLEEEZ!
                >
                S1f, f00! Mai d3gr33 R teh pr3ciousssss!!
                >
                (It's rather nice that programming is somewhat more difficult to cheat
                at than, say, English. All those free essay sites should be
                imprisoned for contributing to the delinquency of minors.)
                A google search will turn up source code for both of his assignments
                (and a few thousand hits each at least).
                --
                C. Benson Manica | I *should* know what I'm talking about - if I
                cbmanica(at)gma il.com | don't, I need to know. Flames welcome.

                Comment

                • Christopher Benson-Manica

                  #9
                  Re: computer program

                  dcorbit@connx.c om wrote:
                  A google search will turn up source code for both of his assignments
                  (and a few thousand hits each at least).
                  But it does require a bit of understanding to pick a program that
                  actually solves the problem; picking an essay that is at least *about*
                  King Lear is not too difficult.

                  --
                  C. Benson Manica | I *should* know what I'm talking about - if I
                  cbmanica(at)gma il.com | don't, I need to know. Flames welcome.

                  Comment

                  • dcorbit@connx.com

                    #10
                    Re: computer program


                    Christopher Benson-Manica wrote:
                    dcorbit@connx.c om wrote:
                    >
                    A google search will turn up source code for both of his assignments
                    (and a few thousand hits each at least).
                    >
                    But it does require a bit of understanding to pick a program that
                    actually solves the problem; picking an essay that is at least *about*
                    King Lear is not too difficult.
                    Back in the day, we would trudge on down to the Academic Computer
                    Center and crack open TAOCP (Knuth) volume <1/2/3as needed, and
                    translate his algorithm from MIX into whatever we need, put in a
                    citation and turn it in. {I even wrote my own MIX emulator so that I
                    could be sure I had it right.} One has to wonder deeply if there has
                    ever been a computer science problem posed that has not already been
                    solved by Knuth back in the 1970's.

                    Which goes to show -- when you tell where you found it, it's research.
                    When you just snag it and turn it in, it's plagiarism.
                    ;-)
                    --
                    C. Benson Manica | I *should* know what I'm talking about - if I
                    cbmanica(at)gma il.com | don't, I need to know. Flames welcome.

                    Comment

                    Working...