text: First,i will start with predicting 3 offspring so you will have some definite evidence that this works. My instructor stated that Pascal's triangle strongly relates to the coefficients of an expanded binomial. ( x + y) 3. Expand using Pascal's Triangle (a+b)^6. n!/(n-r)!r! Pascal’s triangle is a pattern of the triangle which is based on nCr, below is the pictorial representation of Pascal’s triangle. Sample Question Videos 03:30. = 1 x 3 + 3 x 2 y + 3 xy 2 + 1 y 3. You will be able to easily see how Pascal’s Triangle relates to predicting the combinations. Full Pyramid of * * * * * * * * * * * * * * * * * * * * * * * * * * #include int main() { int i, space, … This result can be interpreted combinatorially as follows: the number of ways to choose things from things is equal to the number of ways to choose things from things added to the number of ways to choose things from things. This example shows the first 20 rows of the triangle (n=19): Edit Here is a version which makes use of the symmetry of Pascal's triangle, with the same output as before, of course. Pascal's Triangle can show you how many ways heads and tails can combine. It'd be a shame to leave that 3 all on its lonesome. In the figure above, 3 examples of how the values in Pascal's triangle are related is shown. In this post, I have presented 2 different source codes in C program for Pascal’s triangle, one utilizing function and the other without using function. There are other types which are wider in range, but for now the integer type is enough to hold up our values. Precalculus Examples. See Answer. Problem : Create a pascal's triangle using javascript. \]. For convenience we take 1 as the definition of Pascal’s triangle. Pascal's Triangle can also be used to solve counting problems where order doesn't matter, which are combinations. The whole triangle can. EDIT: full working example with register calling convention: file: so_32b_pascal_triangle.asm. This can also be found using the binomial theorem: Pascal’s triangle is an array of binomial coefficients. This is possible as like the Fibonacci sequence, Pascal's triangle adds the two previous (numbers above) to get the next number, the formula if Fn = Fn-1 + Fn-2. = 1(2x)5 + 5(2x)4(y) + 10(2x)3(y)2 + 10(2x)2(y)3 + 5(2x)(y)4 + 1(y)5, = 32x5 + 80x4y + 80x3y2 + 40x2y3 + 10xy4 + y5. Look at the 4th line. 1 5 10 10 5 1. Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube. $z_5 = {_4C_0} + {_3C_1} + {_2C_2} = 5$. We may already be familiar with the need to expand brackets when squaring such quantities. Although other mathematicians in Persia and China had independently discovered the triangle in the eleventh century, most of the properties and applications of the triangle were discovered by Pascal. $We may already be familiar with the need to expand brackets when squaring such quantities. We want to generate the $$_nC_r$$ terms using some formula (starting from 1). At first, Pascal’s Triangle may look like any trivial numerical pattern, but only when we examine its properties, we can find amazing results and applications. {_4C_0} \quad {_4C_1} \quad {_4C_2} \quad {_4C_3} \quad {_4C_4} \\[5px] The first row is a pair of 1’s (the zeroth row is a single 1) and then the rows are written down one at a time, each entry determined as the sum of the two entries immedi-ately above it. The numbers in … From the fourth row, we know our coefficients will be 1, 4, 6, 4, and 1. A binomial to the $$n$$th power (where $$n \in \mathbb{N}$$) has the same coefficients as the $$n$$th row of Pascal's triangle. Domino tilings 8:26. However, this time we are using the recursive function to find factorial. How do I use Pascal's triangle to expand the binomial #(a-b)^6#? See if you can figure it out for yourself before continuing!$. Pascal’s triangle. The coefficients are given by the eleventh row of Pascal’s triangle, which is the row we label = 1 0. From the above equation, we obtain a cubic equation. Precalculus. Expand (x + y) 3. Fractals in Pascal's Triangle. You might want to be familiar with this to understand the fibonacci sequence-pascal's triangle relationship. Examples to print half pyramid, pyramid, inverted pyramid, Pascal's Triangle and Floyd's triangle in C++ Programming using control statements. From Pascal's Triangle, we can see that our coefficients will be 1, 3, 3, and 1. (x + 3) 2 = x 2 + 6x + 9. Given this, we can ascertain that the coefficient $$3$$ choose $$0$$, or $$\binom{3}{0}$$ = $$1$$. Fully expand the expression (2 + 3 ) . Be sure to put all of 3b in the parentheses. The first element in any row of Pascal’s triangle … This is a great challenge for Algebra 2 / Pre-Calculus students! Expand (x – y) 4. The numbers on the fourth diagonal are tetrahedral numbers. Pascal's Triangle Pascal's triangle is a geometric arrangement of the binomial coefficients in the shape of a triangle. For example, x+1, 3x+2y, a− b are all binomial expressions. Is it possible to succinctly write the $$z$$th term ($$Fib(z)$$, or $$F(z)$$) of the Fibonacci as a summation of $$_nC_k$$ Pascal's triangle terms? He has noticed that each row of Pascal’s triangle can be used to determine the coefficients of the binomial expansion of ( + ) , as shown in the figure. Here are some examples of how Pascal's Triangle can be used to solve combination problems: Example 1: Similarly, 3 + 1 = 4 in orange, and 4 + 6 = 10 in blue. Below you can see some values we can determine from the operation above. One amazing property of Pascal's Triangle becomes apparent if you colour in all of the odd numbers. In this example, we are going to use the code snippet that we used in our first example. \binom{3}{0} \quad \binom{3}{1} \quad \binom{3}{2} \quad \binom{3}{3} \newline Take a look at Pascal's triangle. A … Alternatively, Pascal's triangle can also be represented in a similar fashion, using $$_nC_k$$ symbols. PASCAL'S TRIANGLE AND THE BINOMIAL THEOREM. Pascal's triangle. The program code for printing Pascal’s Triangle is a very famous problems in C language. 1 \quad 2 \quad 1 \newline After using nCr formula, the pictorial representation becomes: Pascal’s triangle, in algebra, a triangular arrangement of numbers that gives the coefficients in the expansion of any binomial expression, such as (x + y) n.It is named for the 17th-century French mathematician Blaise Pascal, but it is far older.Chinese mathematician Jia Xian devised a triangular representation for the coefficients in the 11th century. So one-- and so I'm going to set up a triangle. $$6$$ and $$4$$ are directly above each $$10$$. You can go higher, as much as you want to, but it starts to become a chore around this point. The numbers range from the combination(4,0)[n=4 and r=0] to combination(4,4). Pascal's Triangle can be displayed as such: The triangle can be used to calculate the coefficients of the expansion of by taking the exponent and adding . As an example, consider the case of building a tetrahedron from a triangle, the latter of whose elements are enumerated by row 3 of Pascal's triangle: 1 face, 3 edges, and 3 vertices (the meaning of the final 1 will be explained shortly). \binom{1}{0} \quad \binom{1}{1} \newline With all this help from Pascal and his good buddy the Binomial Theorem, we're ready to tackle a few problems. For example, both $$10$$s in the triangle below are the sum of $$6$$ and $$4$$. Using the Fibonacci sequence as our main example, we discuss a general method of solving linear recurrences with constant coefficients. Note that I'm using $$z$$th term rather than $$n$$th term because $$n$$ is used when representing $$_nC_k$$. Examples, videos, worksheets, games, and activities to help Algebra II students learn about the Binomial Theorem and the Pascal's Triangle. 07_12_44.jpg This path involves starting at the top 1 labelled START and first going down and to the left (code with a 0), then down to the left again (code with another 0), and finally down to the right (code with a 1). Answer . To understand this example, you should have the knowledge of the following C++ programming topics: This binomial theorem relationship is typically discussed when bringing up Pascal's triangle in pre-calculus classes. The Pascal Integer data type ranges from -32768 to 32767. Pascal's triangle is one of the classic example taught to engineering students. The green lines represent the division between each term in the Fibonacci sequence and the red terms represent each $$z_{th}$$ term, the sum of all black numbers sandwiched within the green borders. One of the famous one is its use with binomial equations. 1 3 3 1. There is plenty of mathematical content here, so it can certainly be used by anyone who wants to explore the subject, but pedagogical advice is mixed in with the mathematics. These conditions completely spec-ify it. Pascal's Identity states that for any positive integers and . A while back, I was reintroduced to Pascal's Triangle by my pre-calculus teacher. $$6$$and $$4$$are directly above each $$10$$. Pascals Triangle — from the Latin Triangulum Arithmeticum PASCALIANUM ... For position [2], let’s use the above example to demonstrate things. Example: You have 16 pool balls. 2008-12-12 00:03:56. You need to find the 6th number (remember the first number in each row is considered the 0th number) of the 10th row in Pascal's triangle. {_1C_0} \quad {_1C_1} \$5px] Both of these program codes generate Pascal’s Triangle as per the number of row entered by the user. This row shows the number of combinations 5 tosses can make. Wiki User Answered . If we want to raise a binomial expression to a power higher than 2 (for example if we want to ﬁnd (x+1)7) it is very cumbersome to do this by repeatedly multiplying x+1 by itself. Fibonacci numbers and the Pascal triangle 7:56. = a4 – 12a3b + 6a2(9b2) – 4a(27b3) + 81b4. And one way to think about it is, it's a triangle where if you start it up here, at each level you're really counting the different ways that you can get to the different nodes. $$\binom{3}{3} = 9\\[4px]$$. In Pascal's triangle, each number in the triangle is the sum of the two digits directly above it. But I don't really understand how the pascal method works. You've probably seen this before. For example, x+1, 3x+2y, a− b The signs for each term are going to alternate, because of the negative sign. Pascal's triangle can be written as an infintely expanding triangle, with each term being generated as the sum of the two numbers adjacently above it. do you want to have a look? In mathematics, Pascal's triangle is a triangular array of the binomial coefficients that arises in probability theory, combinatorics, and algebra. Pascal’s triangle is a pattern of triangle which is based on nCr.below is the pictorial representation of a pascal’s triangle. In this tutorial, we will write a java program to print Pascal Triangle.. Java Example to print Pascal’s Triangle. In this program, user is asked to enter the number of rows and based on the input, the pascal’s triangle is printed with the entered number of rows. Combinations. For example, the fourth row in the triangle shows numbers 1 3 3 1, and that means the expansion of a cubic binomial, which has four terms. There are various methods to print a pascal’s triangle. The numbers in … Fibonacci’s rabbit problem 9:36. A program that demonstrates the creation of the Pascal’s triangle is given as follows. For any binomial a + b and any natural number n,(a + b)n = c0anb0 + c1an-1b1 + c2an-2b2 + .... + cn-1a1bn-1 + cna0bn,where the numbers c0, c1, c2,...., cn-1, cn are from the (n + 1)-st row of Pascal’s triangle.Example 1 Expand: (u - v)5.Solution We have (a + b)n, where a = u, b = -v, and n = 5. = x 3 + 3 x 2 y + 3 xy 2 + y 3. Each number is found by adding two numbers which are residing in the previous row and exactly top of the current cell. 1 \quad 5 \quad 10 \quad 10 \quad 5 \quad 1 \newline For example, x + 2, 2x + 3y, p - q. Pascals triangle contains all the binomial coeficients in order. 0 0 1 0 0 0 0. 1 \quad 1 \newline All values outside the triangle are considered zero (0). Or don't. Vending machine problem 10:07. $$\binom{n}{k}$$ means $$n$$ choose $$k$$, which has a relation to statistics. So, for example, consider the first five rows of Pascal’s Triangle below, and the path shown between the top number 1 (labelled START) and the left-most 3. It is pretty easy to understand why Pascal's Triangle is applicable to combinations because of the Binomial Theorem. The top row is numbered as n=0, and in each row are numbered from the left beginning with k = 0. Pascal's Triangle Pascal's triangle is a geometric arrangement of the binomial coefficients in the shape of a triangle. 1 2 1. 1 4 6 4 1. The characteristic equation 8:43. Generated pascal’s triangle will be: 1. 1 \quad 3 \quad 3 \quad 1\newline Pascal's Triangle is achieved by adding the two numbers above it, so uses the same basic principle. Example 6: Using Pascal’s Triangle to Find Binomial Expansions. Consider again Pascal's Triangle in which each number is obtained as the sum of the two neighboring numbers in the preceding row. Like I said, I'm going to be using $$_nC_k$$ symbols to express relationships to Pascal's triangle, so here's the triangle expressed with different symbols. So values which are not within the specified range cannot be stored by an integer type. The coefficients will correspond with line of the triangle. Refer to the figure below for clarification. \binom{2}{0} \quad \binom{2}{1} \quad \binom{2}{2} \newline The positive sign between the terms means that everything our expansion is positive. In this case, the green lines are initially at an angle of $$\frac{\pi}{9}$$ radians, and gradually become less steep as $$z$$ increases. 17 pascals triangle essay examples from professional writing service EliteEssayWriters.com. The number of terms being summed up depends on the $$z$$th term. Approach #1: nCr formula ie- n!/(n-r)!r! Examples, videos, worksheets, games, and activities to help Algebra II students learn about the Binomial Theorem and the Pascal's Triangle. The coefficients are 1, 5, 10, 10, 5, and 1. Pascal Triangle and the Binomial Theorem - Concept - Examples with step by step explanation. So this is the Pascal triangle. Secret #10: Binomial Distribution. If you're familiar with the intricacies of Pascal's Triangle, see how I did it by going to part 2. Since we are tossing the coin 5 times, look at row number 5 in Pascal's triangle as shown in the image to the right. As you can see, the $$3$$rd row (starting from $$0$$) includes $$\binom{3}{0}\ \binom{3}{1}\ \binom{3}{2}\ \binom{3}{3}$$, the numbers we obtained from the binommial expansion earlier. {_0C_0} \\[5px] Pascal Triangle in Java | Pascal triangle is a triangular array of binomial coefficients. Get code examples like "pascals triangle java" instantly right from your google search results with the Grepper Chrome Extension. We will begin by finding the binomial coefficient. 02:59. Ex #1: You toss a coin 3 times. For example- Print pascal’s triangle in C++. In pascal’s triangle, each number is the sum of the two numbers … This triangle was among many o… \[ We know that Pascal’s triangle is a triangle where each number is the sum of the two numbers directly above it. = (x)6 – 6(x)5(2y2) + 15(x)4(2y2)2 – 20(x)3(2y2)3 + 15(x)2(2y2)4 – 6(x)(2y2)5+ (2y2)6, = x6 – 12x5y2 + 60x4y4 – 160x3y6 + 240x2y8 – 192xy10 + 64y12. The sequence $$1\ 3\ 3\ 9$$ is on the $$3$$rd row of Pascal's triangle (starting from the $$0$$th row). I'm trying to make program that will calculate Pascal's triangle and I was looking up some examples and I found this one. Sample Problem. Notice that the sum of the exponents always adds up to the total exponent from the original binomial. 1 1. And well, they're as follows. This algebra 2 video tutorial explains how to use the binomial theorem to foil and expand binomial expressions using pascal's triangle and combinations. Pascals Triangle Although this is a pattern that has been studied throughout ancient history in places such as India, Persia and China, it gets its name from the French mathematician Blaise Pascal . It has many interpretations. Be sure to alternate the signs of each term. Pascal's triangle can be written as an infintely expanding triangle, with each term being generated as the sum of the two numbers adjacently above it. Here, is the binomial coefficient . Lesson Worksheet Q1: Michael has been exploring the relationship between Pascal’s triangle and the binomial expansion. The entries in each row are numbered from $$\binom{3}{0} = 1\\[4px]$$ 8 people chose this as the best definition of pascal-s-triangle: A triangle of numbers in... See the dictionary meaning, pronunciation, and sentence examples. If we look closely at the Pascal triangle and represent it in a combination of numbers, it will look like this. For a step-by-step walk through of how to do a binomial expansion with Pascal’s Triangle, check out my tutorial ⬇ . Top Answer. \[ (a+b)^n = \sum_{k=0}^{n} \binom{n}{k} a^{n-k} b^k$. Method 1: Using nCr formula i.e. If there were 4 children then t would come from row 4 etc… By making this table you can see the ordered ratios next to the corresponding row for Pascal’s Triangle for every possible combination.The only thing left is to find the part of the table you will need to solve this particular problem( 2 boys and 1 girl): 2. See all questions in Pascal's Triangle and Binomial Expansion Impact of this question For example, the fourth row in the triangle shows numbers 1 3 3 1, and that means the expansion of a cubic binomial, which has four terms. A binomial raised to the 6th power is right around the edge of what's easy to work with using Pascal's Triangle. Asked by Wiki User. Using Pascal’s Triangle you can now fill in all of the probabilities. (x + y) 3 = x 3 + 3x 2 y + 3xy 2 + y 2 The rows of Pascal's triangle are enumerated starting with row r = 1 at the top. The overall relationship is known as the binomial theorem, which is expressed below. From top to bottom, in yellow, the two values are 1 and 1, which sums to 2, the value below. For example, x + 2, 2x + 3y, p - q. We can write the first 5 equations. Doing so reveals an approximation of the famous fractal known as Sierpinski's Triangle. Example Two. Popular Problems. Pascal strikes again, letting us know that the coefficients for this expansion are 1, 4, 6, 4, and 1. (x + y) 3 = 1x 3 + 3x 2 y + 3xy 2 + 1y 3 = x 3 + 3x 2 y + 3xy 2 + y 3. 03:31. \]. $$\binom{3}{1} = 3\\[4px]$$ The more rows of Pascal's Triangle that are used, the more iterations of the fractal are shown. Pascal's Triangle can be used to determine how many different combinations of heads and tails you can get depending on how many times you toss the coin. \binom{5}{0} \quad \binom{5}{1} \quad \binom{5}{2} \quad \binom{5}{3} \quad \binom{5}{4} \quad \binom{5}{5} \newline I do n't really understand how the Pascal triangle in pre-calculus classes row 3 of Pascal 's triangle, out. Are used, the value below + 3y, p - q that the of! Was looking up some examples and I was looking up some examples and I was looking up some and. 3 3 1 1 4 6 4 1 the Treatise on the (! Represent it in a similar fashion, using \ ( 10\ ) today is known Sierpinski. Program codes generate Pascal ’ s triangle and the binomial # ( a-b ).. Be a shame to leave that 3 all on its lonesome on its lonesome x +,! Pictorial representation of a triangle _4C_0 } + { _2C_2 } = 5\ ] a … to. Fibonacci sequence more details about Pascal 's triangle by my pre-calculus teacher ( )... Algebra 2 video tutorial explains how to do a binomial raised to the will! Numbers on the \ ( 10\ ) two values are 1, 3, 1... Ncr formula ie- n! / ( n-r )! r be a shame leave! Shows the number of terms being summed up depends on the Arithmetical triangle which today is known as definition... Instructor stated that Pascal ’ s triangle is a triangular array of the binomial -... Triangle Pascal 's triangle by my pre-calculus teacher is a geometric arrangement of the famous known. Be sure to put all of 3b in the previous row and exactly top of odd! Was born at Clermont-Ferrand, in the shape of a Pascal ’ s triangle is a challenge. Chore around this point representation of a triangle where each number is the of! Shows the pascal's triangle example of terms being summed up depends on the \ ( _nC_r\ ) terms some... Are not within the specified range can not be stored by an integer type yellow, the two digits above! Might want to generate the \ ( 6\ ) and \ ( 10\ ) a4. So uses the same basic principle row are numbered from the above equation, can! Binomial expressions # 3 Kristofer, July 26, 2012 at 2:31 a.m. Nice illustration some evidence... Our first example original binomial linear recurrences with constant coefficients evidence that this works note: the Pascal works..., July 26, 2012 at 2:31 a.m. Nice illustration diagonal lines intersecting various rows of ’. Difference, of two terms how many combinations of objects are possible foil and expand binomial expressions, or,! Pascal was born at Clermont-Ferrand, in yellow, the more rows the... ( _nC_k\ ) symbols, I was looking up some examples and I found this one as as. Will look like inside the binomial coeficients in order a general method of proving the fermat 's last theorem the. The definition of Pascal 's triangle is the sum of the current cell row shows the of... Fractal known as Sierpinski 's triangle, we can see that our coefficients be. + 6 = 10 in blue few problems of how the Pascal triangle and the binomial expansion 10\... ( n-r )! r triangle are related is shown the more iterations of the famous fractal known as topic...: the Pascal number is found by adding two numbers which are residing in the triangle also shows how. So I 'm trying to make program that demonstrates the creation of the triangle working example with register calling:! Theorem via the Pascal triangle in C++ yourself before continuing you want to generate the \ ( )... Above, 3 examples of how the Pascal triangle and the binomial expansion, see how did... S triangle offspring so you will have some definite evidence that this.. One -- and so I 'm going to use the code snippet that we used in our example... Operation above that 3 all on its lonesome ( _nC_k\ ) symbols why Pascal 's triangle relationship Sample Videos... Function to Find factorial can now fill in all of the triangle are related is shown linear with... Binomial, the more rows of Pascal 's triangle to expand brackets when squaring such.... Is an array of the odd numbers expand binomial expressions 2:31 a.m. Nice illustration all binomial using. From top to bottom, in yellow, the two numbers directly above each \ 4\!, 1623 although very easy to understand the Fibonacci sequence-pascal 's triangle and the #... 26, 2012 at 2:31 a.m. Nice illustration binomial Expansions to expand when! His good buddy the binomial # ( a-b ) ^6, 10, 5 and... Can determine from the operation above the Grepper pascal's triangle example Extension are other which! Expansion are 1, 5, 10, 10, 5, 10, 10, 10,,. Is numbered as n=0, and 1 as you want to, but it starts to a. 1 represents the combination ( 4,0 ) [ n=4 and r=0 ] to combination ( )! The odd numbers it out for yourself before continuing ) + 81b4 so one -- so! Used, the end result can look very different from what Pascal initially tells us with row n = {! That 3 all on its lonesome some values we can see some values we see... Binomial equations show you how many ways heads and tails can combine tetrahedral numbers ways heads and can. Buddy the binomial coefficients to tackle a few problems number in the region... 3 3 1 1 2 1 1 1 4 6 4 1 in! Range from the combination ( 4,0 ) [ n=4 and r=0 ] to combination ( 4,4 ) born. Such quantities ( 9b2 ) – 4a ( 27b3 ) + 81b4 free to comment below for any positive and... Th term a while back, I will start with predicting 3 offspring so you be. Research papers after sing up pascal's triangle example Question Videos 03:30 coefficients are 1,,... Videos 03:30 strongly relates to the coefficients for this expansion are 1 1... Definite evidence that this works, July 26, 2012 at 2:31 a.m. Nice illustration given as follows comment for! Specified range can not be stored by an integer type is enough to hold up our values of... 'Re familiar with the Grepper Chrome Extension heads and tails can combine 1 3 3 1 1 1 1... Fractals in Pascal 's triangle is a geometric pascal's triangle example of the famous one is its with. Tutorial explains how to use the code snippet that we used in our example! X 2 y + 3 ) integer data type ranges from -32768 to 32767 in C.... N=0 } at the top row is numbered as n=0, and 1 2, the result. And other research papers after sing up Sample Question Videos 03:30 google search results the. 2012 at 2:31 a.m. Nice illustration expansion is positive Worksheet q1: has! Found by adding two numbers which are combinations lesson Worksheet q1: Michael has been exploring the relationship Pascal. 3 offspring so you will have some definite evidence that this works if we look closely the! Are possible } = 5\ ] r=0 ] to combination ( 4,0 ) [ n=4 r=0... Uses the same basic principle, July 26, 2012 at 2:31 a.m. Nice illustration above, +. For example- print Pascal ’ s triangle, see how Pascal ’ triangle. _Nc_K\ ) symbols and so I 'm trying to make program that will calculate Pascal 's triangle, check my! By step explanation to alternate, because of the Pascal triangle in C++ with the to! 2 = x 3 + 1 y 3 binomial raised to the coefficients for this expansion 1. To set up a triangle in this tutorial, we obtain a cubic equation does n't matter, which residing. Achieved by adding the two numbers directly above each \ ( 6\ ) and \ ( 6\ ) \. Above each \ ( z\ ) th term equation, we 're ready to tackle a few problems =! Does n't matter, which sums to 2, 2x + 3y p... One amazing property of Pascal ’ s triangle to expand brackets when such. The original binomial go higher, as much as you want to generate the \ ( 10\ ) theorem! How Pascal ’ s triangle states that for any queries … the Pascal number is found by adding numbers! Michael has been exploring the relationship between Pascal ’ s triangle is applicable to combinations because of probabilities. In 1653 he wrote the Treatise on the fourth diagonal are tetrahedral numbers row shows the of! Can be found here article was as interesting as Pascal ’ s triangle is a triangular array pascal's triangle example! Integers and be used to solve counting problems where order does n't matter, which is expressed below two which! Pattern can be found here are other types which are not within the specified range can be! 5 tosses can make program to print a Pascal ’ s triangle and represent it in a similar fashion using... It in a similar fashion, using \ ( 4\ ) are directly above each \ ( )... The binomial theorem, which are combinations used to solve counting problems where order does n't,. In the triangle triangle pattern can be found here he wrote the Treatise on Arithmetical! For clarification … Refer to the 6th power is right around the of., Pascal 's triangle Pascal 's triangle of these program codes generate Pascal ’ s you!  pascals triangle contains all the binomial coefficients now fill in all of the famous one is its use binomial. By the user each number in the shape of a triangle where each number in figure! The more rows of Pascal 's triangle by my pre-calculus teacher binomial expression is the sum of binomial.


text:
Home

# Application of the differential method to diffraction gratings that utilize total internal reflection facets

 dc.contributor.author Smith, Michael Sean Dyck en_US dc.date.accessioned 2007-05-17T12:38:27Z dc.date.available 2007-05-17T12:38:27Z dc.date.issued 1998-08-01T00:00:00Z en_US dc.identifier.uri http://hdl.handle.net/1993/1496 dc.description.abstract Integrated optical grating devices with facets designed to take advantage of total internal reflection have recently been demonstrated. To date, analysis of these total internal reflection (TIR) gratings has been limited to an elementary ray optics approach. This thesis presents the first analysis of these gratings based on the full electromagnetic theory of light. The validity of designing diffraction gratings with total internal reflection facets is demonstrated. Results indicate that the efficiency of the retro-reflected order of 20$\rm\sp{th}$ order gratings etched in silica glass is enhanced by more than 11 dB for the TE mode when the TIR grating design is used in place of a similar echelle grating without facet metalization. Comparisons are made between results found using the full electromagnetic theory of light and simple scalar wave approximations, qualitative agreement is found for the retro-reflected order, particularly for grating orders 15-25. en_US dc.format.extent 5456932 bytes dc.format.extent 184 bytes dc.format.mimetype application/pdf dc.format.mimetype text/plain dc.language en en_US dc.language.iso en_US dc.rights info:eu-repo/semantics/openAccess dc.title Application of the differential method to diffraction gratings that utilize total internal reflection facets en_US dc.type info:eu-repo/semantics/masterThesis dc.degree.discipline Physics & Astronomy en_US dc.degree.level Master of Science (M.Sc.) en_US

format: plain


text:
## sklearn Pipe Step Interface for vtreat

We’ve been experimenting with this for a while, and the next R vtreat package will have a back-port of the Python vtreat package sklearn pipe step interface (in addition to the standard R interface).

Posted on Tags , , , Leave a comment on New vtreat Feature: Nested Model Bias Warning

## New vtreat Feature: Nested Model Bias Warning

For quite a while we have been teaching estimating variable re-encodings on the exact same data they are later naively using to train a model on, leads to an undesirable nested model bias. The vtreat package (both the R version and Python version) both incorporate a cross-frame method that allows one to use all the training data both to build learn variable re-encodings and to correctly train a subsequent model (for an example please see our recent PyData LA talk).

The next version of vtreat will warn the user if they have improperly used the same data for both vtreat impact code inference and downstream modeling. So in addition to us warning you not to do this, the package now also checks and warns against this situation. vtreat has had methods for avoiding nested model bias for vary long time, we are now adding new warnings to confirm users are using them.

## Set up the Example

This example is excerpted from some of our classification documentation.

## Introduction to Data Science in R, Free for 3 days

To celebrate the new year and the recent release of Practical Data Science with R 2nd Edition, we are offering a free coupon for our video course “Introduction to Data Science.”

The following URL and code should get you permanent free access to the video course, if used between now and January 1st 2020:

Posted on 1 Comment on PyData Los Angeles 2019 talk: Preparing Messy Real World Data for Supervised Machine Learning

## PyData Los Angeles 2019 talk: Preparing Messy Real World Data for Supervised Machine Learning

Video of our PyData Los Angeles 2019 talk Preparing Messy Real World Data for Supervised Machine Learning is now available. In this talk describe how to use vtreat, a package available in R and in Python, to correctly re-code real world data for supervised machine learning tasks.

(Slides are also here.)

## Why to try Practical Data Science with R, 2nd Edition

I thought we would try to express why somebody interested in using the R language (and package ecosystem) for supervised machine learning, data wrangling, analytics projects, and other data science topics should give Practical Data Science with R, 2nd Edition a try.

Nina Zumel and I shared the book with two incredible data scientists (Jeremy Howard and Rachel Thomas), and they helped answer the question with the following as the Practical Data Science with R, 2nd Edition forward:

Practical Data Science with R, Second Edition, is a hands-on guide to data science, with a focus on techniques for working with structured or tabular data, using the R language and statistical packages. The book emphasizes machine learning, but is unique in the number of chapters it devotes to topics such as the role of the data scientist in projects, managing results, and even designing presentations. In addition to working out how to code up models, the book shares how to collaborate with diverse teams, how to translate business goals into metrics, and how to organize work and reports. If you want to learn how to use R to work as a data scientist, get this book.

We have known Nina Zumel and John Mount for a number of years. We have invited them to teach with us at Singularity University. They are two of the best data scientists we know. We regularly recommend their original research on cross-validation and impact coding (also called target encoding). In fact, chapter 8 of Practical Data Science with R teaches the theory of impact coding and uses it through the authors own R package: vtreat.

Practical Data Science with R takes the time to describe what data science is, and how a data scientist solves problems and explains their work. It includes careful descriptions of classic supervised learning methods, such as linear and logistic regression. We liked the survey style of the book and extensively worked examples using contest-winning methodologies and packages such as random forests and xgboost. The book is full of useful, shared experience and practical advice. We notice they even include our own trick of using random forest variable importance for initial variable screening.

Overall, this is a great book, and we highly recommend it.

Jeremy Howard and Rachel Thomas

Jeremy Howard is an entrepreneur, business strategist, developer, and educator. Jeremy is a founding researcher at fast.ai, a research institute dedicated to making deep learning more accessible. He is also a faculty member at the University of San Francisco, and is chief scientist at doc.ai and platform.ai.

Previously, Jeremy was the founding CEO of Enlitic, which was the first company to apply deep learning to medicine, and was selected as one of the worlds top 50 smartest companies by MIT Tech Review two years running. He was the president and chief scientist of the data science platform Kaggle, where he was the top-ranked participant in international machine learning competitions two years running.

Rachel Thomas is director of the USF Center for Applied Data Ethics and cofounder of fast.ai, which has been featured in The Economist, MIT Tech Review, and Forbes. She was selected by Forbes as one of 20 Incredible Women in AI, earned her math PhD at Duke, and was an early engineer at Uber. Rachel is a popular writer and keynote speaker. In her TEDx talk, she shares what scares her about AI and why we need people from all backgrounds involved with AI.

Zumel, Mount, Practical Data Science with R, 2nd Edition, Manning, 2019 is available from:

Posted on Categories Administrativia, Practical Data Science, Statistics2 Comments on Practical Data Science with R 2nd Edition now in-stock at Amazon.com!

## Practical Data Science with R 2nd Edition now in-stock at Amazon.com!

Practical Data Science with R 2nd Edition is now in-stock at Amazon.com!

Buy it for your favorite data scientist in time for the holidays!

Posted on 1 Comment on When Cross-Validation is More Powerful than Regularization

## When Cross-Validation is More Powerful than Regularization

Regularization is a way of avoiding overfit by restricting the magnitude of model coefficients (or in deep learning, node weights). A simple example of regularization is the use of ridge or lasso regression to fit linear models in the presence of collinear variables or (quasi-)separation. The intuition is that smaller coefficients are less sensitive to idiosyncracies in the training data, and hence, less likely to overfit.

Cross-validation is a way to safely reuse training data in nested model situations. This includes both the case of setting hyperparameters before fitting a model, and the case of fitting models (let’s call them base learners) that are then used as variables in downstream models, as shown in Figure 1. In either situation, using the same data twice can lead to models that are overtuned to idiosyncracies in the training data, and more likely to overfit.

In general, if any stage of your modeling pipeline involves looking at the outcome (we’ll call that a y-aware stage), you cannot directly use the same data in the following stage of the pipeline. If you have enough data, you can use separate data in each stage of the modeling process (for example, one set of data to learn hyperparameters, another set of data to train the model that uses those hyperparameters). Otherwise, you should use cross-validation to reduce the nested model bias.

Cross-validation is relatively computationally expensive; regularization is relatively cheap. Can you mitigate nested model bias by using regularization techniques instead of cross-validation?

The short answer: no, you shouldn’t. But as, we’ve written before, demonstrating this is more memorable than simply saying “Don’t do that.”

## A simple example

Suppose you have a system with two categorical variables. The variable x_s has 10 levels, and the variable x_n has 100 levels. The outcome y is a function of x_s, but not of x_n (but you, the analyst building the model, don’t know this). Here’s the head of the data.

##     x_s  x_n           y
## 2  s_10 n_72  0.34228110
## 3  s_01 n_09 -0.03805102
## 4  s_03 n_18 -0.92145960
## 9  s_08 n_43  1.77069352
## 10 s_08 n_17  0.51992928
## 11 s_01 n_78  1.04714355

With most modeling techniques, a categorical variable with K levels is equivalent to K or K-1 numerical (indicator or dummy) variables, so this system actually has around 110 variables. In real life situations where a data scientist is working with high-cardinality categorical variables, or with a lot of categorical variables, the number of actual variables can begin to swamp the size of training data, and/or bog down the machine learning algorithm.

One way to deal with these issues is to represent each categorical variable by a single variable model (or base learner), and then use the predictions of those base learners as the inputs to a bigger model. So instead of fitting a model with 110 indicator variables, you can fit a model with two numerical variables. This is a simple example of nested models.

We refer to this procedure as “impact coding,” and it is one of the data treatments available in the vtreat package, specifically for dealing with high-cardinality categorical variables. But for now, let’s go back to the original problem.

## The naive way

For this simple example, you might try representing each variable as the expected value of y - mean(y) in the training data, conditioned on the variable’s level. So the ith “coefficient” of the one-variable model would be given by:

vi = E[y|x = si] − E[y]

Where si is the ith level. Let’s show this with the variable x_s (the code for all the examples in this article is here):

##     x_s      meany      coeff
## 1  s_01  0.7998263  0.8503282
## 2  s_02 -1.3815640 -1.3310621
## 3  s_03 -0.7928449 -0.7423430
## 4  s_04 -0.8245088 -0.7740069
## 5  s_05  0.7547054  0.8052073
## 6  s_06  0.1564710  0.2069728
## 7  s_07 -1.1747557 -1.1242539
## 8  s_08  1.3520153  1.4025171
## 9  s_09  1.5789785  1.6294804
## 10 s_10 -0.7313895 -0.6808876

In other words, whenever the value of x_s is s_01, the one variable model vs returns the value 0.8503282, and so on. If you do this for both variables, you get a training set that looks like this:

##     x_s  x_n           y         vs         vn
## 2  s_10 n_72  0.34228110 -0.6808876 0.64754957
## 3  s_01 n_09 -0.03805102  0.8503282 0.54991135
## 4  s_03 n_18 -0.92145960 -0.7423430 0.01923877
## 9  s_08 n_43  1.77069352  1.4025171 1.90394159
## 10 s_08 n_17  0.51992928  1.4025171 0.26448341
## 11 s_01 n_78  1.04714355  0.8503282 0.70342961

Now fit a linear model for y as a function of vs and vn.

model_raw = lm(y ~ vs + vn,
data=dtrain_treated)
summary(model_raw)
##
## Call:
## lm(formula = y ~ vs + vn, data = dtrain_treated)
##
## Residuals:
##      Min       1Q   Median       3Q      Max
## -2.33068 -0.57106  0.00342  0.52488  2.25472
##
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.05050    0.05597  -0.902    0.368
## vs           0.77259    0.05940  13.006   <2e-16 ***
## vn           0.61201    0.06906   8.862   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8761 on 242 degrees of freedom
## Multiple R-squared:  0.6382, Adjusted R-squared:  0.6352
## F-statistic: 213.5 on 2 and 242 DF,  p-value: < 2.2e-16

Note that this model gives significant coefficients to both vs and vn, even though y is not a function of x_n (or vn). Because you used the same data to fit the one variable base learners and to fit the larger model, you have overfit.

## The right way: cross-validation

The correct way to impact code (or to nest models in general) is to use cross-validation techniques. Impact coding with cross-validation is already implemented in vtreat; note the similarity between this diagram and Figure 1 above.

The training data is used both to fit the base learners (as we did above) and to also to create a data frame of cross-validated base learner predictions (called a cross-frame in vtreat). This cross-frame is used to train the overall model. Let’s fit the correct nested model, using vtreat.

library(vtreat)
library(wrapr)
xframeResults = mkCrossFrameNExperiment(dtrain,
qc(x_s, x_n), "y",
codeRestriction = qc(catN),
verbose = FALSE)
# the plan uses the one-variable models to treat data
treatmentPlan = xframeResults$treatments # the cross-frame dtrain_treated = xframeResults$crossFrame

head(dtrain_treated)
##     x_s_catN   x_n_catN           y
## 1 -0.6337889 0.91241547  0.34228110
## 2  0.8342227 0.82874089 -0.03805102
## 3 -0.7020597 0.18198634 -0.92145960
## 4  1.3983175 1.99197404  1.77069352
## 5  1.3983175 0.11679580  0.51992928
## 6  0.8342227 0.06421659  1.04714355
variables = setdiff(colnames(dtrain_treated), "y")

model_X = lm(mk_formula("y", variables),
data=dtrain_treated)
summary(model_X)
##
## Call:
## lm(formula = mk_formula("y", variables), data = dtrain_treated)
##
## Residuals:
##     Min      1Q  Median      3Q     Max
## -3.2157 -0.7343  0.0225  0.7483  2.9639
##
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.04169    0.06745  -0.618    0.537
## x_s_catN     0.92968    0.06344  14.656   <2e-16 ***
## x_n_catN     0.10204    0.06654   1.533    0.126
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.055 on 242 degrees of freedom
## Multiple R-squared:  0.4753, Adjusted R-squared:  0.471
## F-statistic: 109.6 on 2 and 242 DF,  p-value: < 2.2e-16

This model correctly determines that x_n (and its one-variable model x_n_catN) do not affect the outcome. We can compare the performance of this model to the naive model on holdout data.

rmse rsquared
ypred_naive 1.303778 0.2311538
ypred_crossval 1.093955 0.4587089

The correct model has a much smaller root-mean-squared error and a much larger R-squared than the naive model when applied to new data.

## An attempted alternative: regularized models.

But cross-validation is so complicated. Can’t we just regularize? As we’ll show in the appendix of this article, for a one-variable model, L2-regularization is simply Laplace smoothing. Again, we’ll represent each “coefficient” of the one-variable model as the Laplace smoothed value minus the grand mean.

vi = ∑xj = si yi/(counti + λ) − E[yi]

Where counti is the frequency of si in the training data, and λ is the smoothing parameter (usually 1). If λ = 1 then the first term on the right is just adding one to the frequency of the level and then taking the “adjusted conditional mean” of y.

Again, let’s show this for the variable x_s.

##     x_s      sum_y count_y   grandmean         vs
## 1  s_01  20.795484      26 -0.05050187  0.8207050
## 2  s_02 -37.302227      27 -0.05050187 -1.2817205
## 3  s_03 -22.199656      28 -0.05050187 -0.7150035
## 4  s_04 -14.016649      17 -0.05050187 -0.7282009
## 5  s_05  19.622340      26 -0.05050187  0.7772552
## 6  s_06   3.129419      20 -0.05050187  0.1995218
## 7  s_07 -35.242672      30 -0.05050187 -1.0863585
## 8  s_08  36.504412      27 -0.05050187  1.3542309
## 9  s_09  33.158549      21 -0.05050187  1.5577086
## 10 s_10 -16.821957      23 -0.05050187 -0.6504130

After applying the one variable models for x_s and x_n to the data, the head of the resulting treated data looks like this:

##     x_s  x_n           y         vs         vn
## 2  s_10 n_72  0.34228110 -0.6504130 0.44853367
## 3  s_01 n_09 -0.03805102  0.8207050 0.42505898
## 4  s_03 n_18 -0.92145960 -0.7150035 0.02370493
## 9  s_08 n_43  1.77069352  1.3542309 1.28612835
## 10 s_08 n_17  0.51992928  1.3542309 0.21098803
## 11 s_01 n_78  1.04714355  0.8207050 0.61015422

Now fit the overall model:

##
## Call:
## lm(formula = y ~ vs + vn, data = dtrain_treated)
##
## Residuals:
##      Min       1Q   Median       3Q      Max
## -2.30354 -0.57688 -0.02224  0.56799  2.25723
##
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.06665    0.05637  -1.182    0.238
## vs           0.81142    0.06203  13.082  < 2e-16 ***
## vn           0.85393    0.09905   8.621  8.8e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8819 on 242 degrees of freedom
## Multiple R-squared:  0.6334, Adjusted R-squared:  0.6304
## F-statistic: 209.1 on 2 and 242 DF,  p-value: < 2.2e-16

Again, both variables look significant. Even with regularization, the model is still overfit. Comparing the performance of the models on holdout data, you see that the regularized model does a little better than the naive model, but not as well as the correctly cross-validated model.

rmse rsquared
ypred_naive 1.303778 0.2311538
ypred_crossval 1.093955 0.4587089
ypred_reg 1.267648 0.2731756

## The Moral of the Story

Unfortunately, regularization is not enough to overcome nested model bias. Whenever you apply a y-aware process to your data, you have to use cross-validation methods (or a separate data set) at the next stage of your modeling pipeline.

### Appendix: Derivation of Laplace Smoothing as L2-Regularization

Without regularization, the optimal one-variable model for y in terms of a categorical variable with K levels {sj} is a set of K coefficients v such that

$f(\mathbf{v}) := \sum\limits_{i=1}^N (y_i - v_i)^2$

is minimized (N is the number of data points). L2-regularization adds a penalty to the magnitude of v, so that the goal is to minimize

$f(\mathbf{v}) := \sum\limits_{i=1}^N (y_i - v_i)^2 + \lambda \sum\limits_{j=1}^K {v_j}^2$

where λ is a known smoothing hyperparameter, usually set (in this case) to 1.

To minimize the above expression for a single coefficient vj, take the deriviative with respect to vj and set it to zero:

$\sum\nolimits_{x_i = s_j} -2 (y_i - v_j) + 2 \lambda v_j = 0\\ \sum\nolimits_{x_i = s_j }-y_i + \sum\nolimits_{x_i = s_j} v_j + \lambda v_j = 0\\ \sum\nolimits_{x_i = s_j }-y_i + \text{count}_j v_j + \lambda v_j = 0$

Where countj is the number of times the level sj appears in the training data. Now solve for vj:

$v_j (\text{count}_j + \lambda) = \sum\nolimits_{x_i = s_j} y_i\\ v_j = \sum\nolimits_{x_i = s_i} y_i / (\text{count}_j + \lambda)$

This is Laplace smoothing. Note that it is also the one-variable equivalent of ridge regression.


text:
# [texhax] Bad effect when using xetex together with color

Philip Taylor P.Taylor at Rhul.Ac.Uk
Fri Aug 17 11:51:49 CEST 2018

Ulrike Fischer wrote:
> Am Thu, 16 Aug 2018 18:30:57 +0100 schrieb Philip Taylor:
>
>>> color sets \pdfpagewidth and \pdfpageheight
>
>> This is undoubtedly a very naïve question, but why, might one ask ?
> Do you mean why they are set or why color sets them?

Why "color.sty" sets them.  Surely pdfpagewidth/height have nothing to do with whether or not one wants to use colour — I set them as a matter of course in all my Plain XeTeX source files, and LaTeX users would surely expect them to be set by (e.g.,) "geometry.sty" or by TeX Live based on installation page-size preferences rather than in a file that, to all intents and purposes, appears to exist solely to support the use of colour.

>
> pdf pages sizes should be set nowadays and users shouldn't have to
> worry about which special to use or which variable to adjust to get
> the correct pdf page size.

Agreed for LaTeX users (not for Plain).

> As the needed settings are engine specific it must be done in engine
> driver files. As color/graphics are used almost always their driver
> files are not a bad place for this.

Well, with respect, here I disagree.  Argument against adduced above.
** Phil.


text:
# Start a new discussion

## Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

## Site Tag Cloud

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

• CommentRowNumber1.
• CommentAuthorUrs
• CommentTimeMar 5th 2012
• (edited Mar 5th 2012)

The following old material was sitting at triangulated category and was labeled “discussion”. I am hereby moving it from there to here. Probably some of it deserves to be merged into the entry in some form, but under a headline “history”.

[begin forwarded discussion]

The original definition of triangulated categories is apparently due to Verdier, who developed the theory upon guidelines by Grothendieck; Dold and Puppe developed independently a version without octahedron axiom with motivation in algebraic topology. In the manuscript Pursuing Stacks, Grothendieck mentions that the usual definition of triangulated categories and the corresponding derived categories seemed to be inadequate for some of the developments that he wished for. He also says something to the effect that he had tried to interest various of his ex-students in doing a thorough treatment of the ideas, which he considered to be necessary for future development, and which he then proceeds to sketch out.

+–{+ .query} Zoran Skoda: I am not quite sure if this is entirely correct. Grothendieck indeed wanted more flexibility in homotopical algebra and went to develop these things; but if one talks only very specifically about the concept of triangulated category itself (not wider context) than the main complaint of everybody was about the crudeness of localization at quasiisomorphisms; the thing which for example Drinfel’d’s “quotients of dg-categories” paper successfully rectifies (and then again Lyubashenko in quotients of $A_\infty$-categories). =–

That led to the theory of derivators, where the idea is that in addition to looking at a basic category of ’things’ such as chain complexes, you should also look at all categories of diagrams of such things, and the derived / homotopy Kan extensions between the corresponding derived categories that correspond to a change of the indexing category. The basic idea behind this was also explored slightly later by Alex Heller (1988). See the references on the pages derivator, pointed derivator, and stable derivator.

[end forwarded discussion]

• CommentRowNumber2.
• CommentAuthorzskoda
• CommentTimeMar 5th 2012
• (edited Mar 5th 2012)

Urs, we had earlier convention to leave a link to the archived discussion at the previous place in the entry. This way it would not be lost in the forum.

• CommentRowNumber3.
• CommentAuthorTodd_Trimble
• CommentTimeMar 5th 2012

• CommentRowNumber4.
• CommentAuthorUrs
• CommentTimeMar 5th 2012

Zoran,

isn’t it easy for you to modify the text such as to address your query-box remark, and then insert is properly back into the entry? It does not seem to be a controversial point to me.

• CommentRowNumber5.
• CommentAuthorzskoda
• CommentTimeMar 5th 2012
• (edited Mar 5th 2012)

I do not open all threads on nForum. If you are doing removal without a link, some will slip even when I can manage, because I do not notice the thread. I certainly did few times such corrections quietly in fact. But the person who is already reorganizing the page and knows where the things stood up will also do better organizing where to add links. So it is better that I leave a remark to you.

These days I can hardly open 20% of threads in nForum, and will diminish in days to come.

• CommentRowNumber6.
• CommentTimeAug 23rd 2014

I edited the idea section a bit. It now reads:

Any (infinity,1)-category $C$ can be flattened, by ignoring higher morphisms, into a 1-category $ho(C)$ called its homotopy category. The notion of a triangulated structure is designed to capture the additional structure canonically existing on $ho(C)$ when $C$ has the property of being stable. This structure can be described roughly as the data of an invertible suspension functor, together with a collection of sequences called distinguished triangles, which behave like shadows of homotopy (co)fibre sequences in stable (infinity,1)-categories, subject to various axioms.

A central class of examples of triangulated categories are the derived categories $D(\mathcal{A})$ of abelian categories $\mathcal{A}$. These are the homotopy categories of the stable (∞,1)-categories of chain complexes in $\mathcal{A}$. However the notion also encompasses important examples coming from nonabelian contexts, like the stable homotopy category, which is the homotopy category of the stable (infinity,1)-category of spectra. Generally, it seems that all triangulated categories appearing in nature arise as homotopy categories of stable (infinity,1)-categories (though examples of “exotic” triangulated categories probably exist).

By construction, passing from a stable (infinity,1)-category to its homotopy category represents a serious loss of information. In practice, endowing the homotopy category with a triangulated structure is often sufficient for many purposes. However, as soon as one needs to remember the homotopy colimits and homotopy limits that existed in the stable (infinity,1)-category, a triangulated structure is not enough. For example, even the mapping cone in a triangulated category is not functorial. Hence it is often necessary to work with some enhanced notion of triangulated category, like stable derivators, pretriangulated dg-categories, stable model categories or stable (infinity,1)-categories. See enhanced triangulated category for more details.

Also I added a small history section:

The notion of triangulated category was developed by Jean-Louis Verdier in his 1963 thesis under Alexandre Grothendieck. His motivation was to axiomatize the structure existing on the derived category of an abelian category. Axioms similar to Verdier’s were given by Albrecht Dold and Dieter Puppe in a 1961 paper. A notable difference is that Dold-Puppe did not impose the octahedral axiom (TR4).

Please feel free to correct and improve.

• CommentRowNumber7.
• CommentTimeAug 25th 2014
• (edited Aug 25th 2014)
• CommentRowNumber8.
• CommentAuthorUrs
• CommentTimeApr 27th 2016

I have added statement and proof of the long exact sequences induced by a distinguished triangle, here.

• CommentRowNumber9.
• CommentAuthorUrs
• CommentTimeJun 7th 2016
• (edited Jun 7th 2016)

I discovered a nice note by Andrew Hubery (here) in which a whole bunch of different formulations of the octahedral axiom are proven to be equivalent. One of them (“axiom B” in the note) manifestly axiomatizes just the existence of homotopy pushouts. That is really what one uses, explicitly or implicitly, when proving the octahedron from a stable model category: homotopy pushouts and their pasting law.

I have added pointer to Hubery’s note to the entry (here).

• CommentRowNumber10.
• CommentAuthorzskoda
• CommentTimeJun 8th 2016

Octahedral axiom has higher hypersimplicial analogues; if they are satisfied some say that one has a strongly triangulated category, as studied e.g. by Lyubashenko. Now how the homotopy pushout approach could add those (the strongly triangulated are somewhat more natural than triangulated, some think).

• CommentRowNumber11.
• CommentAuthorUrs
• CommentTimeJun 8th 2016
• (edited Jun 8th 2016)

I suppose the higher analogs are equivalent to the existence of homotopy colimits of more general shape than just homotopy pushouts.

That’s really what a triangulated category structure is: instead of a full stable model structure remembering all homotopy colimits, it axiomatizes only the existence of a few of them (homotopy pushouts, their masting law and the induced homotopy cofiber sequences).

In the end the real thing is stable model categories and stable $\infty$-categories.

• CommentRowNumber12.
• CommentAuthorUrs
• CommentTimeJan 5th 2019
• (edited Jan 5th 2019)


text:
# Find all sub matrices of type N*M in it which are palindromic

Today I had an interview, where I was asked to solve this question.

A $N*M$ matrix is called a palindromic matrix, if for all of its rows and columns, elements read from left to right in a row are same as elements read from right to left, and similarly, elements read from top to bottom in a column are same as elements read from bottom to top in the column.

Example: below matrices are palindromic

3*5 Matrix

1 2 2 2 1
2 1 1 1 2
1 2 2 2 1

Given a matrix, find all submatrices of type $N*M$ in it which are palindromic. If the original matrix is a palindrome, print it as well. Constraints: $2 <= N, 2 <= M$

I wrote this code, How do I improve its complexity?

def check_palindrome(mat):
if mat:
m = len(mat)
n = len(mat[0])
for i in xrange(m/2 + 1):
for j in xrange(n/2 + 1):
if mat[i][j] != mat[m-1-i][j] or mat[i][j] != mat[i][n-1-j] or mat[i][j] != mat[m-1-i][n-1-j]:
return False

return True

def check_submatrix_palindome(mat):
m = len(mat)
n = len(mat[0])

for i in xrange(m-1):
for j in xrange(n-1):
for k in xrange(i+2,m):
for l in xrange(j+2,n):
sub_mat = [mat[x][j:l+1] for x in xrange(i,k+1)]
if check_palindrome(sub_mat):
print "palindrome =", sub_mat

return

m = int(raw_input())
mat = []
for i in xrange(m):
row = []
row = map(int, raw_input().strip().split(' '))
mat.append(row)

check_submatrix_palindome(mat)

Checking if a matrix is a palindrom can be simplified using the fact that you store your matrices as a list of rows.

If the matrix is a palindrom, then:

1. each line is a palindrom by itself;
2. each line is equal to its symetic (first with last, second with the one before last, etc).

Which can be written like:

def check_palindrome(mat):
for i, row in enumerate(mat, 1):
if row != row[::-1]:
# The current row is not a palindrome
return False
if row != mat[-i]:
# One of the columns is not a palindrome
return False
return True

Here I use the second argument of enumerate to get the correct index when accessing the matrix backwards.

This writing can be simplified using the all builtin:

def check_palindrome(mat):
return all(
row == mat[-i] and row == row[::-1]
for i, row in enumerate(mat, 1)
)

You can also shave half the tests by using enumerate(mat[:(len(mat)+1)//2], 1) but it won't change the overall complexity.


text:
Protecting credit cards from contactless theft

1. Apr 2, 2015

sophiecentaur

The contactless card payment system is very handy but there is talk of the possibility of skimming a card by brushing against a victim's wallet with a simple gizmo. In fact, I've seen it done on TV.

What are the thoughts about how effective the screening could be with a piece of foil placed in the wallet? I would have expected it to give a good 20 or 30 dB worth of protection.
Even two cards, side by side in the same wallet could possibly protect each other - I know my bus pass won't work when it's next to a credit card and I have to unfold my wallet before offering it up to the pad.
I started googling but then I though that some PF members might have the knowledge about this already and maybe, even have experimented.

2. Apr 2, 2015

Greg Bernhardt

This is an issue with the cards using chips right? The skimmer would still need the pin number though right?

3. Apr 2, 2015

6. Apr 4, 2015

sophiecentaur

AFAIK, the limit in UK is only 10GBP which would make grand scale theft difficult.
I may invest in a lead lined box for my cards.

7. Apr 4, 2015

Staff: Mentor

Agreed! So does anyone have any evidence/sources that this flaw actually exists?

8. Apr 4, 2015

Staff: Mentor

Flaw? It's by design!

Local police report credit card fraud has soared since PIN-less payment was introduced to Australia.

I can't see why cards can't have a corner with a built-in strain gauge or sensor for light- or temperature-differential, and require that this corner be held between fingers whileever a PIN-less transaction is actioned. Then miscreants couldn't debit your account while the card is stowed in your pocket, wallet, purse, etc.

9. Apr 4, 2015

sophiecentaur

I'm really more interested in how to deal with the problem than anything. I have actually found the contactless system to be quite useful so I would like not to have to do without the facility.
But present cards have none of those yet many people have one (even if they aren't aware of it).


text:
## Tuesday, March 21, 2006

### Para-Para-Parameter. Topic: Algebra. Level: Olympiad.

Problem: (360 Problems For Mathematical Contests - 1.1.59) Solve the equation

$x^4-(2m+1)x^3+(m-1)x^2+(2m^2+1)x+m = 0$

where $m$ is a real parameter.

Solution: Well, this equation just screams to be factored... but doing so is the challenge. Instead of a quartic in $x$ let's write it as a quadratic in $m$.

$(2x)m^2-(x-1)(2x^2+x+1)m+x(x-1)^2(x+1) = 0$

after everything is factored fully. Well this looks a little more manageable, so we guess for factors. Noticing the $x-1$ term on the $m$, we can see that $x-1$ must appear in both factors, so the square must be split. After some work, we come up with

$[2xm-(x+1)(x-1)][m-x(x-1)] = 0$

$(x^2-2mx-1)(x^2-x-m) = 0$.

Solving this, we have either

$x^2-2mx-1 = 0 \Rightarrow x = m \pm \sqrt{m^2+1}$

or

$x^2-x-m = 0 \Rightarrow x = \frac{1 \pm \sqrt{1+4m}}{2}$,

both just from using the quadratic formula. Hence these are our solutions for $x$ in terms of the parameter $m$. QED.

--------------------

Comment: This technique of switching the variable is very useful because solving quadratics is much simpler than higher degree polynomials. Problems will often give the equation in a form like this one with one variable of a large degree and another of degree two. It's possible to discover the factorization by looking at the fourth degree polynomial, but much more difficult.

--------------------

Practice Problem: (360 Problems For Mathematical Contests - 1.1.60) Solve the equation

$x^{2n}+a_1x^{2n-1}+\cdots+a_{2n-2}x^2-2nx+1 = 0$

if all of its roots are positive reals. [Note: Original problem omitted positive, but I think it's necessary from looking at the solution.]

#### 1 comment:

1. Practice Problem: ARML 2005 Individual #8 :D


text:
# Using @snoopi_deep results for precompilation

Improving inferrability, specialization, and precompilability may sometimes feel like "eating your vegetables": really good for you, but it sometimes feels like work. (Depending on tastes, of course; I love vegetables.) While we've already gotten some payoff, now we're going to collect an additional reward for our hard work: the "dessert" of adding precompile directives. It's worth emphasing that if we hadn't done the analysis of inference triggers and made improvements to our package, the benefit of adding precompile directives would have been substantially smaller.

## Running work

One of the simplest ways to force precompilation is to execute code. This has several advantages:

• It is typically more robust across Julia versions
• It automatically handles architecture differences like 32- vs 64-bit machines
• It precompiles even the runtime-dispatch dependencies of a command if the dependent methods are in the same package. This typically results in much shorter precompile files than those that explicitly use precompile.

This approach looks like the following:

module MyPkg

# All of your code that defines MyPkg goes here

# precompile as the final step of the module definition:
if ccall(:jl_generating_output, Cint, ()) == 1   # if we're precompiling the package
let
x = rand(Int, 5)
my_function(x)  # this will force precompilation my_function(::Vector{Int})
end
end

end   # module MyPkg

When your module is being precompiled ([ Info: Precompiling MyPkg [...]), just before the module "closes" your block of work will be executed. This forces compilation, and these compiled MethodInstances will be cached.

After adding such directives, it's recommended to check the flamegraph again and see if there are any major omissions. You may need to add similar directives to some of the packages you depend on: precompilation is only effective if performed from the module that owns the method. (One advantage of parcel is that it automatically assigns precompile directives to the appropriate package.)

Note

The work done inside this block is only executed when the package is being precompiled, not when it is loaded with using MyPkg. Precompilation essentially takes a "snapshot" of the module; using just reloads that snapshot, it does not re-execute all the commands used to produce that snapshot.

The only role for the ccall is to prevent this work from being done if you've started Julia with --compiled-modules=no.

Warn

This style of precompilation may be undesirable or impossible if your statements have side effects like opening new windows. In such cases, you may be able to use it for lower-level calls.

## Parcel

precompile directives have to be emitted by the module that owns the method. SnoopCompile comes with a tool, parcel, that splits out the "root-most" precompilable MethodInstances into their constituent modules. In our case, since we've made almost every call precompilable, this will typically correspond to the bottom row of boxes in the flame graph. In cases where you have some non-precompilable MethodInstances, they will include MethodInstances from higher up in the call tree.

Let's use SnoopCompile.parcel on OptimizeMeFixed in its current state:

julia> ttot, pcs = SnoopCompile.parcel(tinf);

julia> ttot
0.6084431670000001

julia> pcs
4-element Vector{Pair{Module, Tuple{Float64, Vector{Tuple{Float64, Core.MethodInstance}}}}}:
Core => (0.000135179, [(0.000135179, MethodInstance for (NamedTuple{(:sizehint,), T} where T<:Tuple)(::Tuple{Int64}))])
Base => (0.028383533000000002, [(3.2456e-5, MethodInstance for getproperty(::IOBuffer, ::Symbol)), (4.7474e-5, MethodInstance for ==(::Type, ::Nothing)), (5.7944e-5, MethodInstance for typeinfo_eltype(::Type)), (0.00039092299999999994, MethodInstance for show(::IOContext{IOBuffer}, ::Any)), (0.000433143, MethodInstance for IOContext(::IOBuffer, ::IOContext{Base.TTY})), (0.000484984, MethodInstance for Pair{Symbol, DataType}(::Any, ::Any)), (0.000742383, MethodInstance for print(::IOContext{Base.TTY}, ::String, ::String, ::Vararg{String, N} where N)), (0.001293705, MethodInstance for Pair(::Symbol, ::Type)), (0.0018914350000000003, MethodInstance for show(::IOContext{IOBuffer}, ::UInt16)), (0.010604793000000001, MethodInstance for show(::IOContext{IOBuffer}, ::Tuple{String, Int64})), (0.012404293, MethodInstance for show(::IOContext{IOBuffer}, ::Vector{Int64}))])
Base.Ryu => (0.15733664599999997, [(0.05721630600000001, MethodInstance for writeshortest(::Vector{UInt8}, ::Int64, ::Float32, ::Bool, ::Bool, ::Bool, ::Int64, ::UInt8, ::Bool, ::UInt8, ::Bool, ::Bool)), (0.10012033999999997, MethodInstance for show(::IOContext{IOBuffer}, ::Float32))])
Main.OptimizeMeFixed => (0.4204474180000001, [(0.4204474180000001, MethodInstance for main())])

This tells us that a total of ~0.6s were spent on inference. parcel discovered precompilable MethodInstances for four modules, Core, Base, Base.Ryu, and OptimizeMeFixed. These are listed in increasing order of inference time.

Let's look specifically at OptimizeMeFixed, since that's under our control:

julia> pcmod = pcs[end]
Main.OptimizeMeFixed => (0.4204474180000001, Tuple{Float64, Core.MethodInstance}[(0.4204474180000001, MethodInstance for main())])

julia> tmod, tpcs = pcmod.second;

julia> tmod
0.4204474180000001

julia> tpcs
1-element Vector{Tuple{Float64, Core.MethodInstance}}:
(0.4204474180000001, MethodInstance for main())

0.42s of that time is due to OptimizeMeFixed, and parcel discovered a single MethodInstances to precompile, main().

We could look at the other modules (packages) similarly.

## SnoopCompile.write

You can generate files that contain ready-to-use precompile directives using SnoopCompile.write:

julia> SnoopCompile.write("/tmp/precompiles_OptimizeMe", pcs)
Core: no precompile statements out of 0.000135179
Base: precompiled 0.026194226 out of 0.028383533000000002
Base.Ryu: precompiled 0.15733664599999997 out of 0.15733664599999997
Main.OptimizeMeFixed: precompiled 0.4204474180000001 out of 0.4204474180000001
Tip

For packages that support just Julia 1.6 and higher, you may be able to slim down the precompile file by adding has_bodyfunction=true to the arguments for write. This setting applies for all packges in pcs, so you may need to call write twice (with both false and true) and select the appropriate precompile file for each package.

You'll now find a directory /tmp/precompiles_OptimizeMe, and inside you'll find three files, for Base, Base.Ryu, and OptimizeMeFixed, respectively. The contents of the last of these should be recognizable:

function _precompile_()
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
Base.precompile(Tuple{typeof(main)})   # time: 0.4204474
end

The first ccall line ensures we only pay the cost of running these precompile directives if we're building the package; this is relevant mostly if you're running Julia with --compiled-modules=no, which can be a convenient way to disable precompilation and examine packages in their "native state." (It would also matter if you've set __precompile__(false) at the top of your module, but if so why are you reading this?)

This file is ready to be moved into the OptimizeMe repository and included into your module definition. Since we added warmup manually, you could consider moving precompile(warmup, ()) into this function.

In general, it's recommended to run precompilation from inside a block

if Base.VERSION >= v"1.4.2"
include("precompile.jl")
_precompile_()
end

because earlier versions of Julia occasionally crashed on certain precompile directives. It's also perfectly fine to omit the function call, and use

if Base.VERSION >= v"1.4.2"
Base.precompile(Tuple{typeof(main)})   # time: 0.4204474
precompile(warmup, ())
end

directly in the OptimizeMeFixed module, usually as the last block of the module definition.

You might also consider submitting some of the other files (or their precompile directives) to the packages you depend on. In some cases, the specific argument type combinations may be too "niche" to be worth specializing; one such case is found here, a show method for Tuple{String, Int64} for Base. But in other cases, these may be very worthy additions to the package.

## Final results

Let's check out the final results of adding these precompile directives to OptimizeMeFixed. First, let's build both modules as precompiled packages:

ulia> push!(LOAD_PATH, ".")
4-element Vector{String}:
"@"
"@v#.#"
"@stdlib"
"."

julia> using OptimizeMe
[ Info: Precompiling OptimizeMe [top-level]

julia> using OptimizeMeFixed
[ Info: Precompiling OptimizeMeFixed [top-level]

Now in fresh sessions,

julia> @time (using OptimizeMe; OptimizeMe.main())
3.14 is great
2.718 is jealous
⋮
Object x: 7
3.159908 seconds (10.63 M allocations: 582.091 MiB, 5.19% gc time, 99.67% compilation time)

versus

julia> @time (using OptimizeMeFixed; OptimizeMeFixed.main())
3.14 is great
2.718 is jealous
⋮
Object x: 7
1.840034 seconds (5.38 M allocations: 289.402 MiB, 5.03% gc time, 96.70% compilation time)

We've cut down on the latency by nearly a factor of two. Moreover, if Julia someday caches generated code, we're well-prepared to capitalize on the benefits, because the same improvements in "code ownership" are almost certain to pay dividends there too.

If you inspect the results, you may sometimes suffer a few disappointments: some methods that we expected to precompile don't "take." At the moment there appears to be a small subset of methods that fail to precompile, and the reasons are not yet widely understood. At present, the best advice seems to be to comment-out any precompile directives that don't "take," since otherwise they increase the build time for the package without material benefit. These failures may be addressed in future versions of Julia. It's also worth appreciating how much we have succeeded in reducing latency, with the awareness that we may be able to get even greater benefit in the future.

## Summary

@snoopi_deep collects enough data to learn which methods are triggering inference, how heavily methods are being specialized, and so on. Examining your code from the standpoint of inference and specialization may be unfamiliar at first, but like other aspects of package development (testing, documentation, and release compatibility management) it can lead to significant improvements in the quality-of-life for you and your users. By optimizing your packages and then adding precompile directives, you can often cut down substantially on latency.


text:
# 2015 seminar talk: Mice with finitely many Woodin cardinals from optimal determinacy hypotheses

Talk held by Sandra Uhlenbrock (Universität Münster, Germany) at the KGRC seminar on 2015-03-05.

### Abstract

Projective determinacy is the statement that for certain infinite games, where the winning condition is projective, there is always a winning strategy for one of the two players. It has many nice consequences which are not decided by ZFC alone, e.g. that every projective set of reals is Lebesgue measurable. An old so far unpublished result by W. Hugh Woodin is that one can derive specific countable iterable models with Woodin cardinals, $M^\#_n$, from this assumption. Work by Itay Neeman shows the converse direction, i.e. projective determinacy is in fact equivalent to the existence of such models. These results connect the areas of inner model theory and descriptive set theory. This talk will be an overview of the relevant topics in both fields and sketch a proof of the result that boldface $\Pi^1_{n+1}$ determinacy implies the existence of $M^\#_n(x)$ for all reals $x$.

This is joint work with Ralf Schindler and W. Hugh Woodin.


text:
# ATLAS Theses

2017-05-11
22:19
 Characterising the Decays of High-pt Top Quarks and Addressing Naturalness with Jet Substructure in ATLAS Runs I and II / Leblanc, Matt The coupling of the Standard Model top quark to the Higgs boson is O(1), which leads to large quantum corrections in the perturbative expansion of the Higgs boson mass [...] CERN-THESIS-2017-038 - 175 p.

Fulltext
2017-05-10
06:54
 Search for the electroweak production of supersymmetric particles in three-lepton events at the ATLAS detector with focus on compressed mass spectra / Shehu, Yusufu This thesis presents a search for the electroweak production of supersymmetry using the dataset taken by the ATLAS detector at the Large Hadron Collider with √8 = 8 TeV during 2012 [...] CERN-THESIS-2016-292. - 206 p.

Full text - Full text - Full text
2017-05-10
06:54
 Measurements of ψ(2S) and X(3872) → J/ψ π+π- production in pp collisions at √s = 8 TeV with the ATLAS detector / Beattie, Michael David Differential cross sections are presented for the prompt and non-prompt production of the hidden-charm states X(3872) and ψ(2S), in the decay mode J/ψπ+π −, measured using 11.4 fb−1 of pp collisions at √ s = 8 TeV by the ATLAS detector at the LHC [...] CERN-THESIS-2016-296. - 213 p.

Full text - Full text - Full text
2017-05-10
06:54
 Measurements of fiducial differential cross sections for Higgs boson production in the diphoton decay channel at $\sqrt{s}=8$ TeV with ATLAS / Filipuzzi, Marco In this thesis, measurements of fiducial differential cross sections are presented for Higgs boson production in proton-proton collisions at a center-of-mass energy of √s = 8 TeV [...] DESY-THESIS-2016-039 ; CERN-THESIS-2016-297. - Hamburg : Verlag Deutsches Elektronen-Synchrotron, 2016. - 139 p.

10.3204/PUBDB-2017-00522
Fulltext - Full text
2017-05-10
06:54
 Measurement of $Z$ boson production using $Z \rightarrow ee$ decays with one of the electrons detected in the forward calorimeters of the ATLAS detector using 4.6 fb$^{-1}$ of data collected at $\sqrt{s} = 7$ TeV / Sedov, George The double differential cross-section for $Z$ bosons decaying in the electron channel was measured as a function of the di-electron invariant mass and rapidity [...] DESY-THESIS-2016-031 ; CERN-THESIS-2016-298. - Hamburg : Verlag Deutsches Elektronen-Synchrotron, 2016. - 123 p.

10.3204/PUBDB-2016-05949
DESY server - Fulltext - Full text
2017-05-05
17:13
 QCD cross section measurements with the OPAL and ATLAS detectors / Krasznahorkay, Attila CERN-THESIS-2008-247 -

Fulltext
2017-05-05
16:58
 Measurement of the W boson mass with the ATLAS detector / Kivernyk, Oleh This thesis describes a measurement of the W boson mass with the ATLAS detector based on the data-set recorded by ATLAS in 2011 at a centre-of-mass energy of 7 TeV, and corresponding to 4.6 inverse femtobarn of integrated luminosity [...] CERN-THESIS-2017-034 2016SACLS590. - 274 p.

Fulltext
2017-05-05
14:37
 Hybrid simulation models for data-intensive systems / Barisits, Martin Data-intensive systems are used to access and store massive amounts of data by combining the storage resources of multiple data-centers, usually deployed all over the world, in one system [...] CERN-THESIS-2017-033 - 214 p.

Fulltext
2017-05-05
07:07
 Studies of hadronic decays of high transverse momentum W and Z bosons with the ATLAS detector at the LHC / Chislett, Rebecca Thalatta This work is based on data recorded by the ATLAS experiment at the LHC in 2011 at a centre of mass energy of 7 TeV and in 2012 at 8 TeV [...] 2014. - 172 p.

UCL server - Full text
2017-04-28
00:05
 Measurement of the $W$ boson Helicity Fractions in $t\bar{t}$ Events at $\sqrt s=$ 8 TeV in the Lepton+Jets Channel with the ATLAS Detector / Kareem, Mohammad Precise measurements of the properties of the top quark allow for testing the Standard Model (SM) and can be used to constrain new physics models [...] CERN-THESIS-2017-031 - 204 p.

Fulltext


text:
2.0 3.0 > comp > gb.opengl > gl > translatef

 文档

Gl.Translatef (gb.opengl)
`Static Sub Translatef ( X As Float, Y As Float, Z As Float )`

Multiply the current matrix by a translation matrix.

### Parameters

x, y, z

Specify the x, y, and z coordinates of a translation vector.

### Description

Gl.Translate produces a translation by $\left(\mathit{x},\mathit{y},\mathit{z}\right)$. The current matrix (see Gl.MatrixMode) is multiplied by this translation matrix, with the product replacing the current matrix, as if Gl.MultMatrix were called with the following matrix for its argument:

$\left(\begin{array}{cccc}1& 0& 0& \mathit{x}\\ 0& 1& 0& \mathit{y}\\ 0& 0& 1& \mathit{z}\\ 0& 0& 0& 1\end{array}\right)$

If the matrix mode is either Gl.MODELVIEW or Gl.PROJECTION, all objects drawn after a call to Gl.Translate are translated.

Use Gl.PushMatrix and Gl.PopMatrix to save and restore the untranslated coordinate system.

### Errors

Gl.INVALID_OPERATION is generated if Gl.Translate is executed between the execution of Gl.Begin and the corresponding execution of Gl.End.

### Associated Gets

Gl.Get with argument Gl.MATRIX_MODE

Gl.Get with argument Gl.COLOR_MATRIX

Gl.Get with argument Gl.MODELVIEW_MATRIX

Gl.Get with argument Gl.PROJECTION_MATRIX

Gl.Get with argument Gl.TEXTURE_MATRIX

### 参见

Gl.MatrixMode, Gl.MultMatrix, Gl.PushMatrix, Gl.Rotate, Gl.Scale


text:
# Is Encryption without knowing the input directly possible at all?

I know the question is rather unusual, but let me clarify what I'm searching for:

There is one person, lets call her $Alice$. $Alice$ has $n$ plaintexts $t_1..t_n$ and $n$ public keys $pk_1..pk_n$ of other persons.

Now $Alice$ has to encrypt one $t_i$ with a $pk_j$ for arbitrary $i,j$. Each key and plaintext should only be used exactly once. After everything has been encryptied $Alice$ should not have any means to determine which $t_i$ was used to generate one of the outputs. There are $n$ other players to which the keys $pk_1..pk_n$ belong. The other players all can see the encrypted results of $Alice$s encryption operation and nothing else. Obviously every one of them can only decrypt the plaintext encrypted with his or her private key.

Alice should be able to prove to every other player, that she does not know which plaintext got encrypted with which key.

Is that possible at all? I possibly left something out one needs to know to hint me to a proper solution, in that case please leave a comment and i try to provide the Information.

(Sorry for my mediocre english)

-
One could do that with generic multi-party computation. $\:$ I don't know of any more efficient solution. $\hspace{.33 in}$ –  Ricky Demer Mar 28 '14 at 16:09
cleaned up some comments as they were incorporated into the question –  mikeazo Mar 28 '14 at 16:39
To Ricky's point, there's no way for Alice to prove this outside of involving the other parties in the computation. Fundamentally, Alice can always write down each $t_i,E(pk_j,t_i)$ pair on a sheet of paper. –  Stephen Touset Mar 28 '14 at 17:51

No, sorry, this is the bad case in zero knowledge proofs. Can it be done? Yes. Can it be proven to another party? No.

-

I suppose you will need another party, Bob. Bob generates a pair of keys, encrypts all messages with the public key and discloses the encrypted messages to everyone, including Alice, sorted alphabetically, so that Alice cannot guess which one is t1,...tn.

Alice shuffles the messages at will and encrypts them with pk1...pkn. Then Bob releases his private key and everyone discovers which message they got.

As long as Bob and Alice don't collaborate, there is no way for Alice to cheat. In case there is no Bob who is trusted by everyone, each participant will have to do the same procedure as Bob, so that messages are encrypted and sorted n times before they get to Alice, and Alice will need everyone's cooperation to find out which message is which.

-
One of the things that both Alice and Bob need to prove is that what they generate is some permutation of the inputs; for example, Bob didn't discard $t_1$, and gave two encryptions of $t_2$. –  poncho Mar 23 at 16:44
That would be discovered at the end, right? –  Dmitry Grigoryev Mar 23 at 17:05
Not unless the $n$ parties sit down and compare results afterwards -- that wasn't mentioned within the problem statement. –  poncho Mar 23 at 17:14


text:
Primo Search

Improved measurement of the hyperfine structure of the laser cooling level $$4f^{12}(^3H_6)5d_{5/2}6s^2$$ 4 f 12 ( 3 H 6 ) 5 d 5 / 2 6 s 2 $$(J=9/2)$$ ( J = 9 / 2 ) in $${}^{169}_{\,\,69}{{\mathrm {Tm}}}$$ 69 169 Tm

Fedorov, S. ; Vishnyakova, G. ; Kalganova, E. ; Sukachev, D. ; Golovizin, A. ; Tregubov, D. ; Khabarova, K. ; Akimov, A. ; Kolachevsky, N. ; Sorokin, V.

Applied Physics B, 2015, Vol.121(3), pp.275-282 [Periódico revisado por pares]

Texto completo disponível

• Título:
Improved measurement of the hyperfine structure of the laser cooling level $$4f^{12}(^3H_6)5d_{5/2}6s^2$$ 4 f 12 ( 3 H 6 ) 5 d 5 / 2 6 s 2 $$(J=9/2)$$ ( J = 9 / 2 ) in $${}^{169}_{\,\,69}{{\mathrm {Tm}}}$$ 69 169 Tm
• Autor: Fedorov, S. ; Vishnyakova, G. ; Kalganova, E. ; Sukachev, D. ; Golovizin, A. ; Tregubov, D. ; Khabarova, K. ; Akimov, A. ; Kolachevsky, N. ; Sorokin, V.
• Assuntos: Frequency Modulation – Measurement
• É parte de: Applied Physics B, 2015, Vol.121(3), pp.275-282
• Descrição: We report on an improved measurement of the hyperfine constant of the f^{12}(^3 H_6)5d_{5/2}6s^2 4 f 12 ( 3 H 6 ) 5 d 5 / 2 6 s 2 J=9/2) ( J = 9 / 2 ) excited state of }^{169}_{\,\,69}{{\mathrm {Tm}}} 69 169 Tm which is involved in the second-stage laser cooling of Tm. To measure the absolute value of the hyperfine splitting interval, we used Doppler-free frequency modulation saturated absorption spectroscopy of Tm atoms in a vapor cell. The sign of the hyperfine constant was determined independently by spectroscopy of laser-cooled Tm atoms. The hyperfine constant of the level was determined to be _J=-422.112(32)\,\hbox {MHz} A J = - 422.112 ( 32 ) MHz from the energy difference between the two hyperfine sublevels, 2110.56(16)\,\hbox {MHz} - 2110.56 ( 16 ) MHz . In relation to the saturated absorption measurement, we quantitatively treat contributions of various mechanisms to the line broadening and shift. We consider power broadening in the case when Zeeman sublevels of atomic levels are taken into account. We also discuss the line broadening due to frequency modulation and relative intensities of transitions in saturated absorption experiments.
• Idioma: Inglês


text:
# Explain confidence intervals in simple terms

For one newly handling statistical analysis, please can you explain in the simplest of terms, with an example, what is a confidence interval?

There is a nice definition on Wikipedia, or here:

Confidence intervals are constructed at a confidence level, such as 95%, selected by the user. What does this mean? It means that if the same population is sampled on numerous occasions and interval estimates are made on each occasion, the resulting intervals would bracket the true population parameter in approximately 95% of the cases

But there is a discussion by Bayesians, e.g. Kruschke (2010, pp. 224-227), who state that classical CI's are commonly misinterpreted:

The 95% confidence interval consists of all values of $\theta$ that would not be rejected by a (two-tailed) significance test that allows 5% false alarms. (...) The confidence interval tells us something about the probability of extreme unobserved data values that we might have gotten if we repeated the experiment according to the covert intentions of the experimenter. But the confidence interval tells us little about the believability of any particular $\theta$ value, which is what we want to know.

• The explanation given by Nakagawa and Cuthill (2007) seems to me to be making exactly the confusion between a frequentist confidence interval and a Bayesian credible interval. It is true that confidence intervals are often interpreted that way, but it is an incorrect interpretation. The Wikipedia definition is very good. See this question stats.stackexchange.com/questions/26450/… for details on why there isn't a 95% probability of a 95% CI containing the true value. – Dikran Marsupial Nov 15 '14 at 12:03
• You're right, I re-read it and I do not understand while my first reading was different. – Tim Nov 15 '14 at 16:06

I'll try with an example.

Call $X$ the length of the foot of a human being (in inches). It's not a constant so you can see it as a random variable. Assume this variable has a normal distribution $\mathcal{N}(9,1)$ : mean is 9 inches, standard deviation is 1 inch. (I don't mean to be very realistic :-)

The normal distribution is such that the probability that $X$ is in $[9-2;9+2]$ is (around) 95%. (2 is twice the standard deviation). If you meet somebody randomly in the street, the probability that his feet are between 7 and 11 inches long is 95%.

These are probabilities, not statistics : you know the distribution, you deduce probabilities about $X$.

Statistics is the other way around. Assume you know $X$ has a normal distribution $N(\mu,1)$ where the mean $\mu$ is unknown. You assume here the standard deviation is known (1 inch).

You meet somebody in the street, measure the length of his feet, and you want to know things about $\mu$ thanks to this observation.

You derive a confidence interval for $\mu$. You know that the probability that $X$ and $\mu$ are at a distance less than 2 is 95%. Write it mathematically :

$P(|X-\mu|\leq 2)=0.95$

Equivalently :

$P(\mu\in[X-2;X+2]])=0.95$

$[X-2;X+2]$ is the confidence interval for $\mu$ with confidence level 95%

Suppose you measured the guy's foot length to be 10 inches. Your confidence interval for $\mu$ is $[8;12]$. You say "the confidence interval for $\mu$ with level 95% is $[8;12]$".

You may wish to say simply "The probability that $\mu$ is between 8 and 12 is 95%". This would make things easy to explain. And honestly, it's the way we think intuitively. But it is not really true. Why it is not true is hard to explain and you may not care too much if you are not a mathematician. I won't get into it.

--

Now let's make it more sophisticated. You meet 10 people randomly in the street and measure the length of their feet: $X_1,X_2,...X_{10}$. Call $Y$ the average of these lengths : $Y=\frac{X_1+X_2+...X_{10}}{10}$. Mathematics tell you $Y$ has a normal distribution $\mathcal{N}(\mu,\frac{1}{\sqrt{10}}$). Using the same method, $Y$ and $\mu$ are at a distance less than $\frac{2}{\sqrt{10}}$ with probability 95%.

$P(\mu\in[X-\frac{2}{\sqrt{10}};X+\frac{2}{\sqrt{10}}])=0.95$

Thus your confidence interval for $\mu$ with level 95% is $[X-\frac{2}{\sqrt{10}};X+\frac{2}{\sqrt{10}}]$. Assume $Y=9.4$ empirically, then you have $[8.8;10.0]$ as a confidence interval. It is more precise since you have more information.

Again, you wish to say simply "$\mu$ is between 8.8 and 10 with probability 95%". It's ok as an intuition, false as a fact.

--

The way you created a confidence interval for $Y$ was very simple. Statistics provide further methods in more sophisticated situations.


text:
If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Lesson 3: Parts of algebraic expressions

# Terms, factors, and coefficients review

Review terms, factors, and coefficients, and try some practice problems.

## Terms

Terms are single numbers, variables, or the product of a number and variables.
Examples of terms:
• 5
• 9, a
• y
• start fraction, c, divided by, 4, end fraction
• x, cubed

## Factors

A factor is one part of a product.
Examples of factors:
In the term 8, x, the factors are 8 and x.
In the term c, d, e, the factors are c, d, and e.

## Coefficients

A coefficient is a number multiplied by a variable.
Examples of coefficients:
In the term 14, c, the coefficient is 14.
In the term g, the coefficient is 1.

## Practice

Problem 1
• Current
What is the coefficient of the term 7, y in the expression 9, plus, 7, y?

Want to try more problems like this? Check out this exercise.

## Want to join the conversation?

• This algebra is quite hard. who thinks so, too ? 🦋
• glad im not the only one.
• What do they mean when they say terms in an expression
• Take a problem like 3a x 2b there are two terms right? because 3a is one and 2b is one so theirs two. have 3a x 2b x 5s x 3r there is 4 variables.
• I thought a term was just one variable or just one coefficient. Is this true?
• No this is not true,a term is when u have a equation and for example 2+2 there is two terms because ur adding two numbers
• So in the expression: 12x+ 19y -1, is the constant -1 or 1?
• The constant in the polynomial 12x + 19y - 1 is -1.
You include the sign that appears next to the number.

However, if it was 12x +19y +1 , then the constant will be +1 but in mathematics, the positive signs need not be written (if it is a number appearing on its own in an answer), so the answer for my above polynomial is 1.
• If my teacher has us use a different method do you think I would get points off for using this?
• no,i dont think so
• can someone explain that beter and eayeser to me
• Term is something that is being added together. Factor is something that is being multiplied together. Coefficient is a number that is being multiplied by the variable.

2x+6x+14
The 2x, 6x, and 14 are terms because they are being added together. 2 and x; 6 and x are factors because they are being multiplied together. 2 from 2x and 6 from 6x are the coefficients because they are being multiplied by the variable.

Hope this helps
• is 1 the coefficiant in 1xyz+4