English
Source / code snippets

CATALAN-numbers: amount unterschiedlicher ways of A to B in a Grid

 

p.specht

Erläuterungen find itself in the program. Routenplaner for Navis need such a thing ...
Window Title "**************    CATALAN-ZAHLEN   ******************"
Font 2:randomize:cls rnd(8^8)
set("Decimals",0)
Declare nmax&,n&,p!
zugross:
locate 1,1
print " Catalan-numbers to charge (n_max=511): n =      ";
locate 1,45
input nmax&
case nmax&>511:goto "zugross"
n&=0

While n&<=nmax&

    p!=1

    WhileLoop 1,2*n&-1,2

        p!=p!*&Loop/(&Loop+1)

    EndWhile

    p!=p!*2^(2*n&)/(n&+1)
    'print " C("+st$(n&)+") = ";
    print n&;":";st$(p!)+"  ";
    case %pos>40: print

    if %csrlin>22 : WaitInput 2000: cls rnd(8^8): endif

        inc n&

    EndWhile

    print "\n\nEs follow some Info..."
    WaitInput 6000
    Cls rnd(8^8)
    print " 1.                                            "
    print " Catalan-numbers are benannt to              "
    print " charles Catalan, belgischer Mathematiker      "
    print " (1814-1894). it worked on Kettenbrüchen,   "
    print " Geometrie, Zahlentheorie and Kombinatorik.    "
    print " (Anm.: numbers this follow get already     "
    print " 1751 of Leonhard Euler in a letter on     "
    print " Christian Goldbach described. Euler sought  "
    print " The Number of Opportunities, one konvexes n- "
    print " Eck through Diagonalen in Dreiecke To decompose.)"
    print " --------------------------------------------  "
    print " Catalan-numbers having similar weight       "
    print " How z.B. the Pascal'sche Dreieck or         "
    print " The Fibonacci-follow.                          "
    print " --------------------------------------------  "
    print "                                               "
    WaitInput 20000
    cls rnd(8^8)
    print " 2.                                            "
    print " further Zuschreibungen:                       "
    print " --------------------------------------------  "
    print " The Catalanische supposition (1844) watts       "
    print " first 2002 of Mihailescu proved:            "
    print " 'except 2^3 and 3^2 there no real      "
    print " Potenzen, which circa very 1 discern'  "
    print " --------------------------------------------  "
    print " The Catalan'sche Constant G is the          "
    print " Grenzsumme of -1^n/(2*n+1)^2 for n=0..+Inf.  "
    print " G = 0,915965594177219015054603514932384110::  "
    print " ::77414937428167... (follow A006752 in OEIS)   "
    print " on the 16. april 2009 were  31026000000 comma-   "
    print " to put famous.                              "
    print " --------------------------------------------  "
    print "                                               "
    WaitInput 20000
    cls rnd(8^8)
    print " 3.                                            "
    print " Berechnung of Catalan-numbers:                "
    print " --------------------------------------------  "
    print " The n. Catalan-number C_n errechnet itself To     "
    print " 1/(n+1) * (2n OVER n) = (2*n)!/((n+1)!*n!)    "
    print " where 2n over n = Mittlerer Binomialkoeff.    "
    print " above-mentioned Formel is equivalent To                "
    print " C(n)=(2n OVER n) - (2n OVER n+1)              "
    print " --------------------------------------------  "
    print " only C2=2 and C3=5 are Primzahlen.         "
    print " --------------------------------------------  "
    print "                                               "
    WaitInput 20000
    cls rnd(8^8)
    print " 4.                                            "
    print " Applications with Catalan-numbers:               "
    print " --------------------------------------------  "
    print " Catalan-numbers zurück with Abzählungsaufgaben  "
    print " on, graphentheoretisch with undertow. Bäumen.      "
    print " --------------------------------------------  "
    print " C_n is too The Number of Klammerungen eines"
    print " Produktes,in the n Multiplikationen vorkommen,"
    print " or with n+1 factors so, that always only The  "
    print " Multipl. two factors durchzuführen is. "
    print " --------------------------------------------  "
    print "                                               "
    WaitInput 20000
    cls rnd(8^8)
    print " 5.                                            "
    print " Paths and Irrfahrten                          "
    print " too eindimensionale Irrfahrten of 0 to 2n "
    print " with initially-& Endpunkt in 0 so, that itself the "
    print " way never below the x-axis befindet: 2n=6:"
    print "  ///\\\\\  //\/\\\\ //\\\\/\ /\//\\\\ /\/\/\: C(3)=5  "
    print " --------------------------------------------  "
    print " C_n gives The number the Gitterwege of A to B."
    print " --------------------------------------------  "
    print " amount unterschiedlicher Binärbäumen with 2n+1 "
    print " nodes (or. n+1 flaking):   C(n)            "
    print " --------------------------------------------  "
    print "                                               "
    print "                   end                        "
    WaitInput
    End
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/01/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

607 Views

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie