Talk:Pascal's triangle

Code

Hello, I've just replaced the program with a much shorter, and, I hope, more comprehensible program. The goal here is to help people understand Pascal's triangle. I don't think the gyrations needed to get the numbers to line up were aiding that understanding. I also don't think the standard Java cruft (class name, imports, try/catch) was helping either. Anyway I'm sure that the floodgates are open now, and we're going to have 200 versions of this program in different languages... which is OK by me, as long as everybody is striving towards comprehension of Pascal's triangle. I claim the existing program is an improvement over the previous one. I don't claim it's the best possible. Happy editing, Wile E. Heresiarch 05:57, 8 Jun 2004 (UTC)

As I mentioned on Wikipedia: Wikicode/Specification, I really don't mind you reverting to the Python code; in fact, I probably shouldn't have converted it in the first place, since it's against my policy of leaving real-language code alone. Sorry about that. Derrick Coetzee 17:57, 10 Oct 2004 (UTC)


More about the code. I see the C code has been restored. I don't think this is an improvement. Why don't we just cut out the code altogther (in any language). Having an algorithm to print out some rows of the triangle doesn't have much to do with Pascal's triangle. I originally put in the Python because it replaced a Java program that was about 10 times as long; but in any event having a program is optional, so let's just cut it and avoid the language wars. Wile E. Heresiarch 06:47, 6 Mar 2005 (UTC)

So algorithms (though tied to a specific language) are not encyclopedia worthy? Cburnett 08:36, 6 Mar 2005 (UTC)
I agree with Wile that the code does not add any information on Pascal's triangle. The algorithm, based on Pascal's identity is already explained in English in the lead section, and it is straightforward to translate it in a specific programming language. -- Jitse Niesen 15:23, 6 Mar 2005 (UTC)
I've cut the section with the computer code. As I said in the edit summary, "source code doesn't shed any light on Pascal's triangle, and it's a language war magnet". For what it's worth, Wile E. Heresiarch 15:14, 7 Mar 2005 (UTC)

Two Questions

  1. Are the schemes for row numbering American and Candian??
  2. Has anyone proposed a new scheme that has names with no ambiguity??

66.32.251.248 23:12, 17 Oct 2004 (UTC)

Question about a listed property

The page lists the following claim:

"the sum of the squares of the elements of the nth row equals the middle element of the 2nth."

But it appears to me that the claim should be "the sum of the squares of the elements of the nth row equals the middle element of the 2nth-1."

Am I wrong? This assumes that the row numbering starts at one (which is consistent with other parts of the text). In particular, only the odd numbered rows have a "middle element", and odd numbered rows must be of the form 2n-1, not 2n.

I believe you're right — this is an off-by-one error. Deco 08:37, 24 Mar 2005 (UTC)
Some further explanations prompted by the edits of Chad.nezar: The article assumes that the row with just one 1 is row number one. It then follows that row number n has the binomial coefficients
<math> {n-1 \choose 0}, {n-1 \choose 1}, {n-1 \choose 2}, \ldots, {n-1 \choose n-1}. <math>
Hence, the text "the sum of the squares of the elements of the nth row equals the middle element of the (2n - 1)th" means
<math> \sum_{k=0}^{n-1} {n-1 \choose k}^2 = {2n-2 \choose n-1}. <math>
Substituting <math>m = n-1<math> yields
<math> \sum_{k=0}^{m} {m \choose k}^2 = {2m \choose m}, <math>
which is the formula given in the text. -- Jitse Niesen 10:57, 6 Apr 2005 (UTC)
Jitse, thanks for that example, which helps clarify some things for me. However, it also points out the other inconsistencies of this article. The crux of the problem is that the text uses the letter n to indicate rows as the nth row, where the row numbering starts at 1. However, clearly the math formulas and notation require that n start at 0. In the example you gave above, you have to define <math>m = n -1<math> for just this purpose.
This truth is demonstrated by the example in this section, showing that squares of the terms of the 5th row (where row numbering starts from 1) add up to 70. However, the math formula demonstrating this sums over k which starts at zero. Thus, if n is equal to 5 (as the text would indicate), that sum has a total of 6 terms, not 5. Clearly it is written assuming that the nth row numbering starts with the 0th row.
In the first section, there is also some confusion in that the page states "for positive integers n and k where nk", however the examples require k to start at 0, and implicitly that n start at zero (otherwise, the case of <math>{n \choose n}<math> is irrelevant). I therefore think the wording should be "for non-negative integers n and k where nk", with all the math formulas based on n starting at zero, and the text should be updated to not use the phrase "nth row", but something more appropriate. Either the text should be changed to indicate that we consider the first row to be the 0th row, or use another variable (like m) to indicate the row number and give it's relationship to n. Or just change nth row in the text, to <math>(n+1)<math>th row, where needed. Comments? Chad.netzer 22:07, 8 Apr 2005 (UTC)
I think your (Chad.netzer's) edits make the article clearer, so thanks for that. -- Jitse Niesen 11:51, 11 Apr 2005 (UTC)
Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools