url
stringlengths
5
5.75k
fetch_time
int64
1,368,854,400B
1,726,893,797B
content_mime_type
stringclasses
3 values
warc_filename
stringlengths
108
138
warc_record_offset
int32
873
1.79B
warc_record_length
int32
587
790k
text
stringlengths
30
1.05M
token_count
int32
16
919k
char_count
int32
30
1.05M
metadata
stringlengths
439
444
score
float64
2.52
5.13
int_score
int64
3
5
crawl
stringclasses
93 values
snapshot_type
stringclasses
2 values
language
stringclasses
1 value
language_score
float64
0.05
1
https://vegandivasnyc.com/tag/problem/
1,679,898,981,000,000,000
text/html
crawl-data/CC-MAIN-2023-14/segments/1679296948609.41/warc/CC-MAIN-20230327060940-20230327090940-00791.warc.gz
688,835,064
10,586
# Tag: Problem ## Introduction Solving 6th grade math worksheets can be a daunting task for students and parents alike. With the ever-changing math curriculum, it can be hard to keep up with the latest material. Fortunately, it is possible to make math worksheets easier and faster to solve, if you just know the right techniques. ## Understand the Problem The first step in solving 6th grade math worksheets is to understand the problem. What is the equation or problem that needs to be solved? Is it an equation or a word problem? Understanding the problem can help you figure out how to solve it and make sure you don’t make any mistakes. Focusing on the problem can also help you identify which sections of the worksheet you need to focus on and which parts you can skip. ## Break Down the Problem Once you understand the problem, it’s time to break it down into smaller parts. Breaking down the problem can make it easier to understand and solve. For example, if you have a long equation, you can break it down into smaller steps and solve each step one at a time. This can make the problem much easier to solve and less intimidating. ## Use the Right Resources When solving 6th grade math worksheets, it’s important to use the right resources. There are many websites and books available that provide extra help with math problems. These resources can provide additional practice problems and solutions and can help you understand the material better. Additionally, there are online tutorials and videos that can help you learn the material. ## Practice Finally, practice makes perfect. The more practice you get with solving math worksheets, the better you’ll become at it. Try to do several problems a day and review any problems you didn’t understand. This will help improve your overall understanding of the material and make it easier to solve future problems. # Solving Trigonometric Ratios: 8-2 Worksheet Answers ## Introduction Trigonometric ratios are mathematical equations that help to solve angles and sides of triangles. They are essential for anyone who needs to calculate distances, angles, and much more. The 8-2 worksheet answers are a helpful resource for those who need to solve trigonometric ratios. This worksheet provides the answers for problems related to trigonometric ratios. ## What is a Trigonometric Ratio? A trigonometric ratio is a type of mathematical equation that uses the ratio of two sides of a triangle to calculate the angle or length of the third side. It is a very useful tool for solving many different types of problems, including calculating the area of a triangle. ## What is the 8-2 Worksheet? The 8-2 worksheet is a resource that provides the answers to trigonometric ratio problems. It is designed to help students and professionals understand and solve trigonometric ratios. The worksheet includes a variety of problems and their solutions. ### How to Use the 8-2 Worksheet The 8-2 worksheet can be used to solve trigonometric ratios. To use the worksheet, first read the problem carefully. Then, use the information provided to calculate the answers. Once the answers are found, check them against the answers provided on the worksheet. If the answers match, the problem is solved correctly. ## Conclusion The 8-2 worksheet answers are a great resource for those who need to solve trigonometric ratios. They provide an easy way to check and verify answers to trigonometric ratio problems. By using the 8-2 worksheet, students and professionals can become more confident in their trigonometry skills.
723
3,575
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.890625
4
CC-MAIN-2023-14
latest
en
0.926355
https://cycling74.com/forums/substitute-numbers-in-list/
1,516,637,006,000,000,000
text/html
crawl-data/CC-MAIN-2018-05/segments/1516084891485.97/warc/CC-MAIN-20180122153557-20180122173557-00110.warc.gz
657,034,710
8,241
## substitute numbers in list Apr 08 2013 | 9:04 am I have a message object which fills itself with a list. This list can contain the number 1-48. However, the numbers the list shows, and the length of the list vary, depending on sensor input. My goal is to cluster the data in this list. I want all numbers in a range of 4 to be substituted with its mean number. So 1 2 3 4 = 2.5 = 3 (no floats allowed) or 2 4 7 10 12 = 7 or 44 45 = 44.5 = 45 However, a list can contain more numbers that the ones merged together. For instance: 1 2 3 4 44 45 = 3 45 2 4 7 10 12 21 28 44 45 = 7 21 28 45 How can I program this? • Apr 08 2013 | 9:25 am Hello, I'm not sure some of the arithmetic in your examples is correct- either that or I don't understand what you want. I think this is what you're after. I strongly suggest you look at zl.maxhelp for a clear understanding of what it does. Richard • Apr 08 2013 | 9:43 am Sorry I wasn't totally clear. It is a bit more complicated. With number in a range of 4 I mean x+4 or x-4. Not the length of the amount of numbers. So in this series of numbers: 2 4 7 10 12 21 28 44 45 2 4 7 10 12 vary with 4 or less. (12-10= 2, 10-7=3, 7-4=3 etc.) so I want the mean of these numbers to show. 21-12 = 9 which is higher than 4, and therefore makes the start of the next range. 28-21 = 7 so is also the start of a next range. 44-28 is also higher than 4 45-44 = 1 so the mean should be shown. So: 2 4 7 10 12 21 28 44 45 Results in: 7 21 28 45 • Apr 08 2013 | 9:54 am Try this - notice how the [t] and [-] objects are connected, that is the trick, all the rest is plain fare! hth aa • Apr 08 2013 | 9:59 am Thanks!! I had been working on it for ages, you made my day!
586
1,695
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.140625
3
CC-MAIN-2018-05
latest
en
0.931936
www.sunrisehealthcoach.com
1,726,516,969,000,000,000
text/html
crawl-data/CC-MAIN-2024-38/segments/1725700651710.86/warc/CC-MAIN-20240916180320-20240916210320-00288.warc.gz
928,169,641
187,730
top of page # When is a Calorie Not a Calorie? Question: When is a calorie a calorie Answer: When it is in a lab. To calculate how many calories are in a certain food, the food is dried and burned in a lab. The resulting heat from the burning of the food is measured in a calorimeter to obtain the number of calories in the food. That number is included on food labels, and we assume that 140 calories in the lab are 140 calories in our bodies. It does not work that way. Let’s take two different foods containing 140 calories and evaluate them. I picked 140 for a reason—it is the number of calories in a 12 ounce can of Coke. When you drink a can of Coke, your body absorbs almost every one of those 140 calories the lab found. Let us then take 140 calories of sugar snap peas, which is about 5 cups. There are approximately 8 grams of fiber in the sugar snap peas. That fiber surrounds the sugars, slows the absorption of the sugars and some of those calories (about 15%) will pass through your system. Each of the calories in sugar snap peas is then about 0.85 calories. In this case, 140 calories of snap peas is essentially 119 calories (140 x 0.85 = 119) in our bodies. Can you imagine eating 5 cups of snow peas? And most servings of Coke are much larger than 12 ounces. ## Recent Posts See All lksclark Oct 27, 2023 This is fascinating! I wish I had a break down of more foods so I could make even better choices. Even though I do like snow peas - I know I couldn't eat 5 cups. Like Dave Oct 27, 2023
375
1,520
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.421875
3
CC-MAIN-2024-38
latest
en
0.946125
https://www.physicsforums.com/threads/flow-in-pipe.870452/
1,519,440,208,000,000,000
text/html
crawl-data/CC-MAIN-2018-09/segments/1518891815034.13/warc/CC-MAIN-20180224013638-20180224033638-00520.warc.gz
920,685,957
17,693
# Flow in pipe 1. May 5, 2016 ### foo9008 1. The problem statement, all variables and given/known data in this network of pipe , the author make the attempts to solve it using ( Q1 = Q2 + Q3) , so delta Q = Q1 -(Q2 +Q3) , the value of head of junction that he gt is 25.2 , with delta Q = (3x10^-3) ( not shown in the working) 2. Relevant equations 3. The attempt at a solution however, when i tried to solve it using ( Q1 + Q2 = Q3) , which means ( Q1 +Q2 - Q3 ) , thae ans that i gt is hj = 28 , with delta Q = 0.07 P/s : we have to find the delta Q = 0 for the ans so that water from inlet = water from outlet so , question has two ans depending on the flow of water ??? or i am wrong ? File size: 22.3 KB Views: 77 File size: 30.3 KB Views: 63 File size: 38.7 KB Views: 68 File size: 19.4 KB Views: 67 File size: 15.1 KB Views: 66 2. May 5, 2016 3. May 5, 2016 ### foo9008 is it wrong to have 2 answer for such question , i find it work by using ( Q1 = Q2 + Q3) and ( Q1 + Q2 = Q3) 4. May 6, 2016 ### foo9008 Anyone can comment ? 5. May 7, 2016 bump 6. May 7, 2016 deleted 7. May 7, 2016 Bump 8. May 7, 2016 ### foo9008 i have done this question in 2 ways , which is ( Q1 - (Q2 + Q3) ) and ( Q1 +Q2 - Q3 ) which is correct ? or both are correct ? please refer to post 1 9. May 22, 2016 ### foo9008 pls ignore the question i posted above .... now , i have new question with the same figure.. from the diagram , we know that the junction is lower than the pipe at B . why the author wanna make an assumption that the junction is located at 20m from the datum ? is it correct to do so ? 10. May 22, 2016 ### foo9008 can i start a new thread and delete this thread ? how to delete this thread ??
577
1,721
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.21875
3
CC-MAIN-2018-09
longest
en
0.923068
https://www.detroitnews.com/story/sports/mlb/tigers/2015/06/29/feng-how-gambling-markets-view-tigers-al-central-foes/29463029/
1,670,513,206,000,000,000
text/html
crawl-data/CC-MAIN-2022-49/segments/1669446711344.13/warc/CC-MAIN-20221208150643-20221208180643-00121.warc.gz
751,420,562
52,591
SPORTS # Feng: How gambling markets view Tigers, AL Central foes By Ed Feng, Special to The Detroit News How will the Tigers finish in the AL Central this season? Can they make up the 6.5 games they trail Kansas City in the standings? In a previous column, I looked at how the AL Central teams ranked according to expected runs adjusted for strength of schedule. You can find the latest rankings here. Here, we'll use a different source of information to rank AL Central teams: the gambling markets. These markets give an expected record for each team, which we can calculate from a price on each game called the moneyline. For example, Detroit opened at -175 against the Chicago White Sox on Friday night. This means one would have to bet \$175 to win \$100 (in addition to the return of the original \$175). This moneyline implies a win probability for each game. The \$175 investment brings a total return of \$275. Dividing 175 by 275 gives a fraction of .636, which implies a win probability of 63.6% for the Tigers. Once the sports book set this moneyline, investors put money on both teams. This market activity moves the moneyline until the price closes before the start of the game. This closing moneyline is an accurate predictor because of the collective wisdom of people willing to put money behind either team. To evaluate a team, I took win probability from the closing moneyline and added these numbers for all games to get an expected win total. The expected loss total is the number of games minus the expected win total. This market record shown below, as well as all other statistics, are through games on Saturday, June 28. The records implied by the markets have some surprises for the AL Central. Let's take a look. DETROIT TIGERS Market record: 38.3-35.7 Actual record: 38-36 The markets have accurately predicted the Tigers record so far this season. It's interesting to look at how this market prediction has evolved month to month. When the Tigers got off to a hot 15-8 start in April, the market didn't get too high on the team. They gave an expected record of 12.3-10.7. In May, the Tigers fell back to earth with a 13-16 record. The markets still predicted a better than .500 record at 15.0-14.0. The markets weren't as optimistic on the Tigers in May as in April, which could have resulted from a number of factors. The Tigers were unlikely to sustain their run production from April in May. In addition, the markets could have adjusted due to the injury to Alex Avila, who had an impressive .342 on base percentage despite a .200 batting average. Now, after almost three full months of baseball, the markets still tends to favor Detroit more than its opponent. This might seem nuts to fans that have watched the seemingly erratic play of the team, but it shows how the markets tend to stay consistent in their predictions. KANSAS CITY ROYALS Market record: 35.9-35.1 Actual record: 43-28 The Royals have been the darlings of baseball. With their 43-28 record, they have shown that their World Series run from last season wasn't a fluke. Eric Hosmer graced the cover of the June 1 issue of Sports Illustrated. The numbers also seem on their side as well. They have a run differential of +56 through Saturday's games, second in the AL to Toronto. However, the markets aren't buying into this hype, as they have predicted a slightly better than .500 record. The markets expect the Royals to come back to the pack in the AL Central. Perhaps they see the problems with the starting pitching. The Royals starters have the fifth-worst ERA in the AL. By the predictive pitching statistic xFIP, their starting staff drops to 14th of 15 AL teams ahead of only Texas. CLEVELAND INDIANS Market record: 38.7-33.3 Actual record: 33-39 The markets have Cleveland as the best team in the AL Central. It's a stark contrast to their fourth place in the actual standings. While starting pitching might sink Kansas City, it represents the best hope for a Cleveland rebound in the standings. Cleveland's starters have been striking out batters at a record pace, which gives them the best fielding independent pitching numbers (xFIP) in the AL. However, Cleveland can't catch the ball. As a result, Cleveland's starters have the second-worst ERA, a shocking difference from their elite fielding independent pitching statistics. If new SS Francisco Lindor and 3B Giovanny Urshela can make the defense better, Cleveland can make a run in the standings. MINNESOTA TWINS Market record: 32.9-41.1 Actual record: 40-34 The markets do not see Minnesota as a contender for the AL Central, as the Twins have the worst expected record in the division. The Twins have gotten extraordinarily lucky in the sequencing of hits, as the offense as clustered hits while their pitchers have scattered them. They have had the most cluster luck of any MLB team by a wide margin, and the markets seem to recognize this. CHICAGO WHITE SOX Market record: 35.9-37.1 Actual record: 32-41 It's surprising the markets view the White Sox as an almost .500 team. They made big waves this offseason with the signings of Melky Cabrera and Adam LaRoche. However, the White Sox are tied for last in the AL in runs scored this season. OVERVIEW As we approach July, the standings give the following rankings of AL Central teams: 1. Kansas City 2. Minnesota 3. Detroit 4. Cleveland 5. Chicago White Sox The markets have quite a different opinion: 1. Cleveland 2. Detroit 3. Kansas City 4. Chicago White Sox 5. Minnesota This is the same order of teams by win totals released by the Las Vegas Hilton in March. (Data courtesy of Joe Peta, ESPN guru of preseason MLB win totals and author of "Trading Bases". After three months of the season, the markets haven't budged from their preseason expectations for the AL Central. Ed Feng has a Ph.D. in chemical engineering from Stanford and runs the sports analytics site The Power Rank. Have a question about the Tigers you want addressed in this column? Email Ed Feng here.
1,361
6,046
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.671875
3
CC-MAIN-2022-49
latest
en
0.947543
http://www.kerrywong.com/2009/03/07/matrix-multiplication-performance-in-c/
1,639,010,517,000,000,000
text/html
crawl-data/CC-MAIN-2021-49/segments/1637964363641.20/warc/CC-MAIN-20211209000407-20211209030407-00108.warc.gz
115,690,317
26,396
A few days ago, I ran across this article by Dmitri Nesteruk. In his article, he compared the performance between C# and C++ in matrix multiplication. From the data he provided, matrix multiplication using C# is two to three times slower than using C++ in comparable situations. Even though a lot of optimizations have been done in the .Net runtime to make it more efficient, it is apparent that scientific programming still favors C and C++ because that the performance advantage is huge. In this article, I will examine some matrix multiplication algorithms that are commonly used and illustrate the efficiencies of the various methods. All the tests are done using C++ only and matrices size ranging from 500×500 to 2000×2000. When the matrix sizes are small (e.g. <50), you can pretty much use any matrix multiplication algorithms without observing any significant performance differences. This is largely due to the fact that the typical stable matrix multiplication algorithms are O(n^3) and sometimes array operation overheads outweigh the benefit of algorithm efficiencies. But for matrices of larger dimensions, the efficiency of the multiplication algorithm becomes extremely important. Since Dmitri’s article has already captured pretty detailed data using the standard matrix multiplication algorithm, I will not repeat his findings in this article. What I intended to show was the performance data of uBLAS, OpenMP, cBLAS and MATLAB. The following sample code are compiled under Ubuntu 8.10 64 bit (kernel 2.6.24.23) on Intel Q9450@3.2GHz. #### Standard Matrix Multiplication (Single Threaded) This is our reference code. Later on, I will only show the critical portion of the code and not repeat the common portion of code that initializes/finalizes the arrays. Similarly, the timing method used is also the same across all the tests and will be omitted later on. float **A, **B, **C; A = new float*[matrix_size]; B = new float*[matrix_size]; C = new float*[matrix_size]; for (int i = 0 ; i < matrix_size; i++) { A[i] = new float[matrix_size]; B[i] = new float[matrix_size]; C[i] = new float[matrix_size]; } for (int i=0; i<matrix_size; i++) { for (int j = 0 ; j < matrix_size; j++) { A[i][j]=rand(); B[i][j]=rand(); } } timeval t1, t2, t; gettimeofday(&t1, NULL); for (int i = 0 ; i < matrix_size; i++) { for (int j = 0; j < matrix_size; j++) { C[i][j] = 0; for (int k = 0; k < matrix_size; k++) { C[i][j] += A[i][k] * B[k][j]; } } } gettimeofday(&t2, NULL); timersub(&t2, &t1, &t); cout << t.tv_sec + t.tv_usec/1000000.0 << " Seconds -- Standard" << endl; for (int i = 0 ; i < matrix_size; i++) { delete A[i]; delete B[i]; delete C[i]; } delete A; delete B; delete C; #### OpenMP With Two Dimensional Arrays Using OpenMP, we are able to multiple threads via the #pragma omp directives. For the simple algorithm we used here, the speed increase is almost proportional to the number of available cores within the system. ... #pragma omp parallel for shared(a,b,c) for (long i=0; i<matrix_size; i++) { for (long j = 0; j < matrix_size; j++) { float sum = 0; for (long k = 0; k < matrix_size; k++) { sum +=a[i][k]*b[k][j]; } c[i][j] = sum; } } ... #### OpenMP With One Dimensional Arrays Cache locality is poor using the simple algorithm I showed above. The performance can be easily improved however by improving the locality of the references. One way to achieve better cache locality is to use one dimensional array instead of two dimensional array and as you will see later, the performance of the following implementation has as much as 50% speed gains over the previous OpenMP implementation using two dimensional arrays. float *a, *b, *c; a = new float[matrix_size * matrix_size]; b = new float[matrix_size * matrix_size]; c = new float[matrix_size * matrix_size]; for (long i=0; i<matrix_size * matrix_size; i++) { a[i]=rand(); b[i] = rand(); c[i] = 0; } #pragma omp parallel for shared(a,b,c) for (long i=0; i<matrix_size; i++) { for (long j = 0; j < matrix_size; j++) { long idx = i * matrix_size; float sum = 0; for (long k = 0; k < matrix_size; k++) { sum +=a[idx + k]*b[k * matrix_size +j]; } c[idx + j] = sum; } } delete a; delete b; delete c; #### Boost Library uBLAS (Single Threaded) Boost library provides a convenient way to perform matrix multiplication. However, the performance is very poor compared to all other approaches mentioned in this article. The performance of the uBLAS implementation is largely on par with that using C# (see benchmarks towards the end of the article). Intel’s Math Kernal Library (MKL) 10.1 does provide functionality to dynamically convert code using uBLAS syntax into highly efficient code using MKL by the inclusion of header file mkl_boost_ublas_matrix_prod.hpp. I have not tried it myself though, but the performance should be comparible to algorithms using the native MKL BLAS interface. By default (without using MKL’s uBLAS capability) though, uBLAS is single threaded and due to its poor performance and I would strongly suggest avoid using uBLAS in any high performance scientific applications. matrix<float> A, B, C; A.resize(matrix_size,matrix_size); B.resize(matrix_size,matrix_size); for (int i = 0; i < matrix_size; ++ i) { for (int j = 0; j < matrix_size; ++ j) { A(i, j) = rand(); B(i, j) = rand(); } } C =prod(A, B); #### Intel Math Kernel Library (MKL) cBLAS Intel’s Math Kernel Library (MKL) is highly optimized on Intel’s microprocessor platforms. Given that Intel developed this library for its own processor platforms we can expect significant performance gains. I am still surprised at how fast the code runs using cBLAS though. In fact, it was so fast that I doubted the validity of the result at first. But after checking the results against those obtained by other means, those doubts were putting into rest. The cBLAS matrix multiplication uses blocked matrix multiplication method which further improves cache locality. And it is more than thirty times faster then the fastest OMP 1D algorithm listed above! Another benefit is that by default it automatically detects the number of CPUs/cores available and uses all available threads. This behavior greatly simplifies the code since threading is handled transparently within the library. float *A, *B, *C; A = new float[matrix_size * matrix_size]; B = new float[matrix_size * matrix_size]; C = new float[matrix_size * matrix_size]; for (int i = 0; i < matrix_size * matrix_size; i++) { A[i] = rand(); B[i] = rand(); C[i] = 0; } cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, matrix_size, matrix_size, matrix_size, 1.0, A,matrix_size, B, matrix_size, 0.0, C, matrix_size); MATLAB is known for its efficient algorithms. In fact it uses BLAS libraries for its own matrix calculation routines. The version of MATLAB I have is a little dated (7.0.1), but nevertheless it would be interesting to see how its performance compares with that of latest MKL’s. MATLAB 7 is single threaded, and given the same matrix size, it runs roughly three times slower than the fastest MKL routine listed above (per core). a = rand(i,i); b = rand(i,i); tic; c = a*b; t = toc The following table shows the results I obtained by running the code listed above. The results are time in seconds. (note, S.TH means single threaded and M.TH means multi-threaded). Size/Algorithm uBLAS S.TH STD S.TH OMP 2D OMP 1D MATLAB S.TH cBLAS M.TH 500×500 3.2435 0.5253 0.1939 0.0536 0.0810 0.0206 600×600 5.7854 0.9349 0.3223 0.1655 0.1410 0.0093 700×700 9.2292 1.2928 0.3529 0.2797 0.2230 0.0122 800×800 13.7711 2.3746 0.7259 0.4135 0.3320 0.0310 900×900 20.3245 3.4983 1.0146 0.7449 0.4740 0.0306 1000×1000 28.8345 3.4983 1.4748 1.0548 0.6530 0.0700 1100×1100 38.2545 7.0240 1.9383 1.6257 0.8620 0.1250 1200×1200 50.4964 9.9319 2.8411 2.1215 1.1170 0.0440 1300×1300 64.5064 12.8344 3.6277 2.9720 1.4250 0.0440 1400×1400 81.1826 17.1119 4.8309 3.5977 1.7760 0.0938 1500×1500 100.1330 21.0622 6.1689 4.8022 2.1870 0.1111 1600×1600 120.3400 26.4316 7.3189 5.0451 2.6490 0.1699 1700×1700 145.8550 31.2706 8.7525 6.8915 3.1870 0.1452 1800×1800 174.6860 38.9293 11.1060 8.1316 3.7940 0.1989 1900×1900 206.0520 45.8589 13.0832 9.9527 4.4450 0.2725 2000×2000 240.7820 55.4392 16.0542 11.0314 5.1820 0.3359 The following figure shows the results. Since uBLAS and single threaded matrix multiplications took significantly longer to compute, I did not include them in the figure below. The following figure shows the same data but uses log-scale Y axis instead so that all the data can show up nicely. You can get a sense of various algorithms’ efficiencies here: Be Sociable, Share! ## 17 Thoughts on “Matrix Multiplication Performance in C++” • Oscar Fraxedas says: Nice work. Thanks for sharing this. I was looking for this kind of comparison for a co-worker. I did recommend him to use MKL, but I did not know that the difference was this big. Have you tried the Matrix Multiplication using intel intrinsics functions (SSE,SSE2,…)? • To my knowledge, the Intel MKL uses SSE instructions (1,2,3 and 4) extensively, so I wouldn’t be surprised that the matrix multiplication routines utilize these instructions as well. • oliver says: Hi, I am trying to reproduce the same results on my own Intel machine. I get a significant speedup with the Intel MKL, but not nearly as good as yours. Can you please tell me which compiler you used (gcc? icc?) and which compiler flags you used? Thanks. oliver • I am using the latest MKL 10.1 and gcc 4.3.2 (64 bit) with -O3 optimization and optimization for Intel Core 2 processor families enabled. The data was collected on a quad core PC (Q9450@3.2GHz) with 8GB memory installed. I wouldn’t be surprised that Intel relied on SSE2 SSE3 heavily and that would explain huge performance discrepancies among different processors. • oliver says: Thank you. I fixed my problem (my compilation flags were not quite right). Thanks for the great blog entry. • Thanks for a very high quality post. I currently do most of my work on an oldish PC with 2*1.4Ghz P4 Xeons running Windows 2000. I have downloaded an evaluation copy of the latest MKL, but also have a proper licence for an old version of it (from about 1999). I tried to evaluate performance using both the old and new MKL and my own multiplication both naive and as good as I could make it, and for both float and double matrices. I don’t have a C++ compiler with #pragma omp (indeed I was not familiar with that at all before seeing your article) In every case the latest MKL is about 10* faster than my best C++ code. With the older MKL it is only 2* faster, so I could get close to that my multi-threading. My best C++ code takes about 22 seconds for a 2000*2000 multiply using floats, and 24 seconds using doubles. Since this is on a 1.4GHz machine and I’m not using threads my code might be of interest to anyone who cannot afford MKL and who doesn’t have a multi-core machine or a compiler that supports OMP. The main thing wrong with “naive” multiplication, as implemented by your standard matrix multiplication code is that it utilises the CPU cache poorly, and this effect becomes very pronounced for large matrices. Simply interchanging the j and k loops (which means initialisation has to be done separately) will give a *3 performance improvement. I managed to get a further *2 improvement by using a “blocked” algorithm and unrolling the inner loop. Final code looks like this: template class Large_Matrix { private: unsigned nr_rows; unsigned nr_columns; T * data; public: Large_Matrix(unsigned nr_rows_,unsigned nr_columns_) : nr_rows(nr_rows_), nr_columns(nr_columns_), data(new T[nr_rows_*nr_columns_]) {} ~Large_Matrix() { delete [] data; } T * operator[](unsigned row) { return &data[row*nr_columns]; } const T * operator[](unsigned row) const { return &data[row*nr_columns]; } const Large_Matrix & lhs, const Large_Matrix & rhs) { if (lhs.nr_columns != rhs.nr_rows) return false; { Large_Matrix temp(lhs); } { Large_Matrix temp(rhs); } unsigned nr_elements = lhs.nr_rows * rhs.nr_columns; { } { for (unsigned i = 0; i data[i] = 0; } unsigned i0,j0,k0,i,j,k,imax,jmax,kmax,jmax1; const unsigned IBLOCK=100; const unsigned JBLOCK=128; const unsigned KBLOCK=40; for (i0 = 0; i0 lhs.nr_rows) imax = lhs.nr_rows; for (k0 = 0; k0 lhs.nr_columns) kmax = lhs.nr_columns; for (j0 = 0; j0 rhs.nr_columns) jmax = rhs.nr_columns; jmax1 = jmax & ~15; for (i = i0; i <imax;i++,lrow += lhs.nr_columns,arow += rhs.nr_columns) { const T * rrow = rhs[k0]; for (k = k0; k < kmax;k++,rrow += rhs.nr_columns) { T v = lrow[k]; for (j = j0; j < jmax1;j+=16) { arow[j] += v*rrow[j]; arow[j+1] += v*rrow[j+1]; arow[j+2] += v*rrow[j+2]; arow[j+3] += v*rrow[j+3]; arow[j+4] += v*rrow[j+4]; arow[j+5] += v*rrow[j+5]; arow[j+6] += v*rrow[j+6]; arow[j+7] += v*rrow[j+7]; arow[j+8] += v*rrow[j+8]; arow[j+9] += v*rrow[j+9]; arow[j+10] += v*rrow[j+10]; arow[j+11] += v*rrow[j+11]; arow[j+12] += v*rrow[j+12]; arow[j+13] += v*rrow[j+13]; arow[j+14] += v*rrow[j+14]; arow[j+15] += v*rrow[j+15]; } for (j = jmax1; j < jmax;j++) arow[j] += v*rrow[j]; } } } } } return true; } }; The right values for IBLOCK,JBLOCK,KBLOCK will vary from machine to machine, though there doesn’t seem to be a sharp minimum, and probably depend on the size of the matrices as well. JBLOCK should be a multiple of 16. If you know in advance the size of the matrices you will be using making the values a factor of this size is probably a good idea. • Unfortunately my code has got mangled by the comment posting process. i0,j0,k0 should be iterated up to the relevant number of rows and columns as can still be seen in the post, and then either incremented by the relevant XBLOCK variable or equivalently set to the relevant Xmax variable. If anyone is interested I’ll be happy to send the code in an email. • wesmo says: Thanks for the comparision; a useful insight. In your comparison, a very old version of matlab selected was. Have updated the MATLAB BLAS and LAPACK libraries used Use more recent AMD and Intel MKL Allow the user to specify an external Intel MKL Have introduced multithreaded implementations as default for some mathematical functions • nasos says: Did you try to compile the ublas code with -DNDEBUG? Because I get those figures only if I don’t use -DNDEBUG. • dq87jg says: You may also want to have a look at the Armadillo C++ library: http://arma.sourceforge.net It has its own matrix multiply, but optionally links with ATLAS which uses optimised and hardware specific routines. • Steve says: The Intel MKL library is very fast, but a warning to all of the .Net developers out there. Its a real pig to work with. Intel do provide a sample set of example library calls, but they don’t provide the wrapper. You have to compile it yourself. I am currently using MKL and wish I’d found a proper .Net compliant version or atleast a provider who does recognise that .Net does exist. I’ve wasted so much time trying to get the wrapper compiled for 32 bit then 64 bit. It is not easy. Intel fail to tell you that you must register MKLROOT as a global variable plus the Bin eg Intel\MKL\10…\em64t\bin should be in your path variable along with Intel\MKL\10… Fast but painful. • Alexander Rau (@AR0x7E7) says: Thank you very much for your article! It helps me a lot. this is nice! the analysis that is done on quad core PC (Q9450@3.2GHz) with 8GB memory is interesting. Thanks, • Sergey Kostrov says: Here are test results for multiplication of two 2048×2048 matrices. A single-threaded Strassen Heap Based Complete ( Strassen HBC ) algorithm is used in a 32-bit test application: *** BCC – Matrix Size 2048×2048 / Single precision ( float ) data type *** Strassen HBC Matrix Size : 2048 x 2048 Matrix Size Threshold: 128 x 128 Matrix Partitions : 2801 ResultSets Reflection: Enabled Calculating… Strassen HBC – Pass 1 – Completed: 11.95000 secs Strassen HBC – Pass 2 – Completed: 11.10700 secs Strassen HBC – Pass 3 – Completed: 11.10700 secs Strassen HBC – Pass 4 – Completed: 11.10700 secs Strassen HBC – Pass 5 – Completed: 11.09200 secs ALGORITHM_STRASSEN_HBC – Passed Compiler: Borland C++ v5.5 Library: ScaLib v1.13.02 ( ScaLib stands for Set of Common Algorithms ) OS: Windows 7 Professional Hardware: Dell Precision M4700 ( CPU Core i7-3840QM / 16GB ) Note to a Moderator: Please delete my previous post. Thanks. • ahmed says: i want the source code for matrix-matrix multiplication using cBLAS M.TH can you help me
4,660
16,500
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.84375
3
CC-MAIN-2021-49
longest
en
0.907976
https://psgolfcourses.com/ejk1186u1/
1,623,507,040,000,000,000
text/html
crawl-data/CC-MAIN-2021-25/segments/1623487584018.1/warc/CC-MAIN-20210612132637-20210612162637-00520.warc.gz
420,890,220
9,727
# 7th Grade Math Common Core Worksheets Dyann Leya May 30, 2021 Worksheet For goals to be met and accomplished, they need to be developed effectively. The way that you set up goals, strongly affects their effectiveness. There are some plain guidelines to follow, once setting goals. First off, always be positive and express your goals positively. Secondly, be exact. Environment a precise goal, by incorporating dates, times and correct amounts, you can in that case measure your achievements. On that occasion, you know the specific goal you need to achieve as well as can take pride when you have completely achieved the goal. Next, be sure to create priorities. Whenever you have several goals, yield them each a number of importance. This will help you to refrain from feeling overwhelmed by too many goals. It will also help you direct your focus on the more effective goals. Be sure to always write down your goals. This will help you refrain from any confusion. Keep the goals little. The smaller the goals are, the more achievable they are. If the goal it too lavish, you can quickly become overwhelmed, therefore, environment yourself up for failure. And this is where a goal setting worksheet comes into play. Let‘s start with the same vision statement above and turn it into something you can actually achieve. Your first step is to create the goal statement itself. Don‘t be afraid to think big here. Afterall, the purpose of this exercise is not to limit your potential. As Richard Bach said in his book, Jonathan Livingston Seagull, ”state your limitations are, and they are yours.” On many occasions people will develop their goals lower, in order to avoid failure. If you have a fear of failure, you will not take the demanded dangers for top performance. As you apply as well as achieve your goals, your self-confidence should increase as well as will help you take larger dangers. Failure can be a positive thing. It can show you the areas you need to improve your skills as well as performance. Another grounds for setting goals too little is since you are taking it too easy. It is repeatedly easier to take the road less traveled. Although, if you are not prepared to test the waters as well as work hard, at that moment it is highly unlikely you will achieve anything of real worth. There needs to be more concrete assurances. You could write your goals down, and that can be great. But, without a system, this can easily be forgotten. Steps can be left out, and now you have problems. A part of the solution is goal setting worksheets. Because goal setting worksheets are like a system, they can produce much more results. After all, think about doing something that works, you can pretty sure be confident that it can work again! If goal setting worksheets work for you, as they have for others, then you can rest assured that they can work with other similar goals. So, worksheets used to achieve a goal to buy a car can likely work for buying a house. There are a lot of uses for goal setting worksheets. The simplicity in them is what makes them successful, not to mention the steps that it gets you to go in. These steps are essential for success. This makes the worksheets a kind of goal setting system. There are many different types of worksheet for setting goals. For example, some of these worksheets are designed for day to day. Many people do not know the effectiveness of a wedding planning worksheet. The fact of the matter is that a wedding planning worksheet will aid you in organizing your wedding properly without any hassles. A wedding planning worksheet will actually make the planning of your wedding less stressful. A wedding planning worksheet will help you breakdown the wedding plans and tasks into small manageable ones so that you can easily remember them and execute them. Most of us have never planned a wedding before and most probably the first wedding we will plan will be our own. This is the reason why none of know the details and the preparation that goes into planning a wedding. Even the smallest detail is important to have the perfect wedding and it should not be neglected. That why a wedding planning worksheet is important. The next step is to create a formula to calculate your total balance of all columns. In the H13 textbox enter the formula =sum(f11:h11), what this will do is total the negative expenses and the positive deposits, creating a grand total amount. You will also want to create a beginning balance (start of the month balance) at J2. If you are using this template for a new project, then your beginning balance will be zero. Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Archive Categories Static Pages Most Popular Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Latest Review Jun 11, 2021 Jun 11, 2021 Jun 11, 2021 Latest News Jun 11, 2021 Jun 11, 2021 Jun 11, 2021
1,099
4,953
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.578125
3
CC-MAIN-2021-25
latest
en
0.967571
https://db0nus869y26v.cloudfront.net/en/Domain_of_a_function
1,719,058,090,000,000,000
text/html
crawl-data/CC-MAIN-2024-26/segments/1718198862396.85/warc/CC-MAIN-20240622112740-20240622142740-00897.warc.gz
165,636,120
17,089
In mathematics, the domain of a function is the set of inputs accepted by the function. It is sometimes denoted by ${\displaystyle \operatorname {dom} (f)}$ or ${\displaystyle \operatorname {dom} f}$, where f is the function. In layman's terms, the domain of a function can generally be thought of as "what x can be".[1] More precisely, given a function ${\displaystyle f\colon X\to Y}$, the domain of f is X. In modern mathematical language, the domain is part of the definition of a function rather than a property of it. In the special case that X and Y are both sets of real numbers, the function f can be graphed in the Cartesian coordinate system. In this case, the domain is represented on the x-axis of the graph, as the projection of the graph of the function onto the x-axis. For a function ${\displaystyle f\colon X\to Y}$, the set Y is called the codomain: the set to which all outputs must belong. The set of specific outputs the function assigns to elements of X is called its range or image. The image of f is a subset of Y, shown as the yellow oval in the accompanying diagram. Any function can be restricted to a subset of its domain. The restriction of ${\displaystyle f\colon X\to Y}$ to ${\displaystyle A}$, where ${\displaystyle A\subseteq X}$, is written as ${\displaystyle \left.f\right|_{A}\colon A\to Y}$. ## Natural domain If a real function f is given by a formula, it may be not defined for some values of the variable. In this case, it is a partial function, and the set of real numbers on which the formula can be evaluated to a real number is called the natural domain or domain of definition of f. In many contexts, a partial function is called simply a function, and its natural domain is called simply its domain. ### Examples • The function ${\displaystyle f}$ defined by ${\displaystyle f(x)={\frac {1}{x))}$ cannot be evaluated at 0. Therefore, the natural domain of ${\displaystyle f}$ is the set of real numbers excluding 0, which can be denoted by ${\displaystyle \mathbb {R} \setminus \{0\))$ or ${\displaystyle \{x\in \mathbb {R} :x\neq 0\))$. • The piecewise function ${\displaystyle f}$ defined by ${\displaystyle f(x)={\begin{cases}1/x&x\not =0\\0&x=0\end{cases)),}$ has as its natural domain the set ${\displaystyle \mathbb {R} }$ of real numbers. • The square root function ${\displaystyle f(x)={\sqrt {x))}$ has as its natural domain the set of non-negative real numbers, which can be denoted by ${\displaystyle \mathbb {R} _{\geq 0))$, the interval ${\displaystyle [0,\infty )}$, or ${\displaystyle \{x\in \mathbb {R} :x\geq 0\))$. • The tangent function, denoted ${\displaystyle \tan }$, has as its natural domain the set of all real numbers which are not of the form ${\displaystyle {\tfrac {\pi }{2))+k\pi }$ for some integer ${\displaystyle k}$, which can be written as ${\displaystyle \mathbb {R} \setminus $$(\tfrac {\pi }{2))+k\pi :k\in \mathbb {Z}$$)$. ## Other uses The term domain is also commonly used in a different sense in mathematical analysis: a domain is a non-empty connected open set in a topological space. In particular, in real and complex analysis, a domain is a non-empty connected open subset of the real coordinate space ${\displaystyle \mathbb {R} ^{n))$ or the complex coordinate space ${\displaystyle \mathbb {C} ^{n}.}$ Sometimes such a domain is used as the domain of a function, although functions may be defined on more general sets. The two concepts are sometimes conflated as in, for example, the study of partial differential equations: in that case, a domain is the open connected subset of ${\displaystyle \mathbb {R} ^{n))$ where a problem is posed, making it both an analysis-style domain and also the domain of the unknown function(s) sought. ## Set theoretical notions For example, it is sometimes convenient in set theory to permit the domain of a function to be a proper class X, in which case there is formally no such thing as a triple (X, Y, G). With such a definition, functions do not have a domain, although some authors still use it informally after introducing a function in the form f: XY.[2]
1,070
4,107
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 27, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.4375
4
CC-MAIN-2024-26
latest
en
0.892714
http://www.markedbyteachers.com/gcse/maths/gcse-maths-coursework-cross-numbers.html
1,529,295,432,000,000,000
text/html
crawl-data/CC-MAIN-2018-26/segments/1529267860041.64/warc/CC-MAIN-20180618031628-20180618051628-00353.warc.gz
464,257,941
26,831
• Join over 1.2 million students every month • Accelerate your learning by 29% • Unlimited access from just £6.99 per month Page 1. 1 1 2. 2 2 3. 3 3 4. 4 4 5. 5 5 6. 6 6 7. 7 7 8. 8 8 9. 9 9 10. 10 10 11. 11 11 12. 12 12 13. 13 13 14. 14 14 15. 15 15 16. 16 16 17. 17 17 18. 18 18 19. 19 19 20. 20 20 21. 21 21 22. 22 22 23. 23 23 24. 24 24 25. 25 25 26. 26 26 27. 27 27 28. 28 28 • Level: GCSE • Subject: Maths • Word count: 3674 # GCSE Maths coursework - Cross Numbers Extracts from this document... Introduction ## Cross Numbers Here is a number square. It shows all the numbers from 1 to 100. I can form cross numbers by placing a cross on this grid. I will use the cross shown below. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 In this investigation, I will try to find a master formula for various functions that I use with a certain cross shape. To do this, I will follow the procedure given below: 1. I will then pick a number on the grid, (labelled as X). 1. Use a mathematical formula using the 4 numbers around it.                           E.g. (24+33)-(22+13). 1. When an answer is found, I will repeat the formula but pick a different value for X. Repeat this 3 times. If the same answer is achieved, then I will assign an algebraic formula for each number around X. 1. Once I have assigned an algebraic formula for each square, I will replace the numbers in the formula with the algebraic form and justify this mathematically. 1. I will also be changing the horizontal grid value (g) to further my investigation. 1. This will therefore give me a master formula. ## I will use the following symbols X=center number. g=number of squares across the horizontal axis. e.g. 91 92 93 94 95 96 97 98 99 100 g=10 ## Prediction I predict that whichever grid size I use the number above always = X-g, the number below always = X+g, the number on the left always = (X-1) Middle (X+1) X+g [(X-1) + (X+1)] + [(X-g) + (X+g)] = X-1 + X+1 + X-g + X+g = 4x If I replace the centre number, I get the following results. If X=87 then [(87-1) + (87+1)] + [(87-4) + (87+4)] = 87-1 + 87+1 + 87-4 + 87+4 = 4x87 = 348 If X=52 then [(52-1) + (52+1)] + [(52-4) + (52+4)] = 52-1 + 52+1 + 52-4 + 52+4 = 4x52 = 208 If X=16 then [(16-1) + (16+1)] + [(16-4) + (16+4)] = 16-1 + 16+1 + 16-4 + 16+4 = 4x16 = 64 This tells me that whenever I use the above formula, the solution is always 4X ,and if I replace X with any number (apart from the outside edge numbers) I always get 4xX as an answer. Therefore this is a master formula for this shape, and grid sizes 10x10, 6x10 and 4x10. X-g (X-1) X (X+1) X+g c) [(X+g) - (X-g)] – [(X+1) - (X-1)] = [X+g – X+g] – [X+1 – X+1] = 2g – 2 If I replace X, I get the following results. If X = 33 then [(33+4) - (33-4)] – [(33+1) - (33-1)] = [33+4 – 33+4] – [33+1 – 33+1] = 2x4–2 =6 If X=83 then [(83+4) - (83-4)] – [(83+1) - (83-1)] = [83+4 – 83+4] – [83+1 – 83+1] = 2x4–2 = 6 If X=49 [(49+4) - (49-4)] – [(49+1) - (49-1)] = [49+4 – 49+4] – [49+1 – 49+1] = 2x4–2 = 6 This tells me that whenever I use the above formula, the solution is always 2g – 2, hence I always get 4 as an answer. Therefore this is a master formula for this shape and this grid. Overall so far, the only formula that works for all three grid sizes (4x10, 6x10 and 10x10) to give the same answer is: [(X-1) + (X+1)] + [(X-g) + (X+g)] = X-1 + X+1 + X-g + X+g = 4x (addition formula) All other formulas work but give a different figure but the same algebraic solution. For the subtraction formula the solution is g²-1 and for multiplication it is 2g-2. Dsfsd Fsd Fsd F Sdf Sd F Sdf Dsf Sdf ## Proving that all Algebraic formulas work with all grid sizes Grid size 4x10: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 If  X=10 and g=4 X-g (X-1) X (X+1) X+g The number above x is X-g because 10-4=6 The number below x is X+g because 10+4=14 . The number to the left is (X-1) because 14-1=13. The number to the right is (X+1) because                                         14+1=15. Grid size 8x10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 If  X=10 and g=4 X-g (X-1) X (X+1) X+g The number above x is X-g because 20-8=12 and g=8. The number below x is X+g: 20+8=28 and g=8 The number to the  left is (X-1) because 20-1=19. Grid size 6x10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 If  X=39 and g=6 X-g (X-1) X (X+1) X+g The number to the right is (X+1)  because 20+1=21 The number above x is X-g because 39-6=33 and g=6. The number below x is X+g because 39+6=45 and g=6. The number to the left is (X-1) because 39-1=38. The number to the right is (X+1)     because 39+1=40. X-g (X-1) X (X+1) X+g This shows that these are the master formulas for all values of (g)  with this shape. To show that this works, If X=8 for g=4 then: X-g (X-1) X (X+1) X+g Conclusion Grid size 8x10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 If X=14 The top left will always be X-(g+1) because 14-(8+1) = 5 The top right will always be X-(g-1) because 14-(8-1)= 7 The bottom left will always equal X+(g-1) because 14+(8-1)=21 The bottom right will equal X+(g+1) because 14+(8+1)=23 Grid size 4x10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 If X=14 The top left will always be X-(g+1) because 14-(4+1) = 9 The top right will always be X-(g-1) because 14-(4-1)= 11 The bottom left will always equal X+(g-1) because 14+(4-1)=17 The bottom right will equal X+(g+1) because 14+(4+1)=19 This shows that these X-(g+1) X-(g-1) X+(g-1) X+(g+1) are the master formulas for all grid size variations with this shape. Conclusions: In this investigation I found several different master formulas and one Universal formula. These are summarised in the table below. shape type of formula master formulas universal formulas + Subtraction [(X-1) (X+1)] – [(X+g) (X-g) = g²-1 + & x [(X-1) + (X+1)] + [(X-g) + (X+g)] = 4x + Multiplication [(X+g) - (X-g)] – [(X+1) - (X-1)] = 2g-2 x Subtraction ## [{X+(g+1)}- {X-(g+1)}] – [{X+(g-1)}-{X-(g-1)}] = 4 x Multiplication {X-(g-1)} {X+(g-1)} – {X+(g+1)} {X-(g+1)} = 4g g= grid size , X= center number of a cross A master formula is a formula that works for a specific shape on all the three grid sizes ( 10 x 10, 6 x10 and 4 x 10) that I investigated. A universal formula is a formula that can be used for all shapes and all grid sizes that I investigated. I would have liked to further my investigation by using a three dimensional grid. This student written piece of work is one of many that can be found in our GCSE Number Stairs, Grids and Sequences section. ## Found what you're looking for? • Start learning 29% faster today • 150,000+ documents available • Just £6.99 a month Not the one? Search for your essay title... • Join over 1.2 million students every month • Accelerate your learning by 29% • Unlimited access from just £6.99 per month # Related GCSE Number Stairs, Grids and Sequences essays 1. ## Mathematics Coursework: problem solving tasks 3 star(s) back to page 3 will confirm that the formula used for the squares is too the same. Finding the formulas for the rectangles by taking the idea from the squares was not so obvious. Now I feel that if I had have started this assignment with firstly investigating different rectangle 2. ## GCSE Maths Sequences Coursework 4 5 When you do the same for stage 2, we find that there are two columns of 3, two columns of 4 and one column of 5. which means that: 2x3=6 2x4=8 1x5=5 6+8+5 =6+12+1 =3x2�+3x2+1 =3N�+3N+1 Therefore this works in all cases and therefore; Nth term for total 1. ## Number Grids Investigation Coursework m a+w(m-1) a+w(m-1)+(n-1) Top Left = a Top Right = a + (n - 1) = a + n - 1 Bottom Left = a + w (m - 1) Bottom Right = a + w (m - 1) + (n - 1) 2. ## Number Grid Investigation. The following formula can be used... 10 ( n - 1 )� n = width of square. 2. To calculate 3 X 2, 4 X 2, 5 X 2 etc. The following formula can be used... 10 ( n - 1 ) 3. To calculate any sized square inside a 10 wide grid. 1. ## Number Grid Coursework 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 2. ## Maths-Number Grid 8 � 8 Grid:- (A + 11) (A + 18) (A + 81) (A + 88) An 8 � 8 grid has been drawn to show the algebra, to prove that the product difference is 490. I have correctly identified this answer on this algebra grid because 1458 minus 968 is 490. 1. ## Number Grid Maths Coursework. Here are the corners for a 2x2 square, which is why all they all have the same difference also. n n+1 n+10 n+11 The 3x3 square n n+2 n+20 n+22 The 4x4 square n n+3 n+30 n+33 But these formulae only work for each individual square but as all squares 2. ## For other 3-step stairs, investigate the relationship between the stair total and the position ... (n - 1). For example 15 x - 20 (n - 1) We can again test this using the above 5-step grid. (15 x 61) - (20 x (15 - 1) 915 - 280 = 635 635 = 635 therefore the result from our equation is the same as it is by adding up the numbers. • Over 160,000 pieces of student written work • Annotated by experienced teachers • Ideas and feedback to
4,040
10,110
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.09375
4
CC-MAIN-2018-26
latest
en
0.645532
http://ccm.net/faq/10910-excel-a-macro-to-repeat-rows-and-fill-series
1,508,772,396,000,000,000
text/html
crawl-data/CC-MAIN-2017-43/segments/1508187826114.69/warc/CC-MAIN-20171023145244-20171023165244-00515.warc.gz
54,595,265
18,560
# Excel - A macro to repeat rows and fill series October 2017 ## Issue This is variation of a question that has been answered previously. Does anybody know how I can repeat rows in a spreadsheet by n number of times specified in a cell in that row AND then fill a series - so that: Column A Column B Peter 3 James 7 David 4 Will then produce this table: Column A Column B Column C Peter 3 1 Peter 3 2 Peter 3 3 James 7 1 James 7 2 James 7 3 James 7 4 James 7 5 James 7 6 James 7 7 I'd appreciate any help I can get with this. ## Solution ```Sub repeat() Dim n As Integer Dim counter As Integer Let n = 1 Let counter = 1 While Cells(n, 1) <> "" For x = 1 To Cells(n, 2) Cells(counter, 10) = Cells(n, 1) Cells(counter, 11) = Cells(n, 2) Cells(counter, 12) = x Let counter = counter + 1 Next x n = n + 1 Wend End Sub ``` ## Note that Solved by RayH on the forum. ## Related Published by aakai1056. Latest update on June 25, 2012 at 07:38 AM by aakai1056.
324
964
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.953125
3
CC-MAIN-2017-43
latest
en
0.884569
https://rc0rc0.wordpress.com/tag/remez-exchange/
1,566,770,674,000,000,000
text/html
crawl-data/CC-MAIN-2019-35/segments/1566027330907.46/warc/CC-MAIN-20190825215958-20190826001958-00328.warc.gz
611,003,121
9,219
Home » Posts tagged 'remez exchange' # Tag Archives: remez exchange ## Minimax approximation to arctan / atan / atan2 Even during 10 years in a past life working in a group that designed FIR filters, I never grappled with the Remez exchange algorithm hands-on.  This week I finally found the excuse I needed. A while ago, I needed a crude but very fast approximation to arctan.  In fact it was atan2, but I’ll start with the easier problem first.  With a release of the application imminent, I wanted to credit the original source I got the formula from, but I couldn’t find it any longer.  So I set about recomputing the formula for myself. The version I found a while ago looked like this: `atan(x) ≈ (0.97179803008 * x) - (0.19065470515 * x**3)` for x in the range [-1,+1], i.e. the result is in the range [-pi/4,+pi/4].  The maximum error in the result is just less than the equivalent of 0.3 degrees. [If the person behind these coefficients gets in touch, I’ll be more than happy to give credit and link to the original work here.] Having now got the Remez exchange algorithm working, I found a slightly improved version is `atan(x) ≈ (0.97239 * x) - (0.19195 * x**3)` which has a worst-case error of 0.2837 degrees.  Even better, a plot shows the 6 extrema all have this absolute error, as expected. Moving to the original atan2 problem, the requirement was rather unusual.  Starting with the x and y arguments as integers, the answer is to be expressed as a 32-bit integer, where 2**32 represents 360 degrees.  This allows subsequent rotations to be done using integer add and subtract, with the convenient property that multiples of 360 degrees are lost by the modulo wraparound at 2**32.  The resulting function looks like this, with the coefficients as shown earlier: ```#define K1 (0.97239) #define K2 (0.19195) #define K3 ((float)((double)(1<<29) * 4.0 * K1 / M_PI)) #define K4 ((float)((double)(1<<29) * 4.0 * K2 / M_PI)) int32_t atan2i_approx2(int32_t y, int32_t x) { int32_t u, v, s; uint32_t w; float f, f2, g; int32_t r; float fx, fy; float tt, bb; fx = (float) x; fy = (float) y; u = x + y; v = x - y; w = (u ^ v) >> 31; tt = ? -fx : fy; bb = ? fy : fx; f = tt / bb; f2 = f * f; g = f * (K3 - K4*f2); s = (((u >> 30) & 3) ^ ((v >> 31) & 1)) << 30; r = s + (int32_t) g; return r; }```
696
2,319
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.140625
3
CC-MAIN-2019-35
latest
en
0.857225
http://www.expertsmind.com/library/what-is-babcock-times-interest-earned-5294450.aspx
1,653,552,599,000,000,000
text/html
crawl-data/CC-MAIN-2022-21/segments/1652662604495.84/warc/CC-MAIN-20220526065603-20220526095603-00696.warc.gz
90,264,094
11,389
What is babcock times interest earned Assignment Help Finance Basics Reference no: EM13294450 What is Babcock's times interest earned, if its total interest charges are \$20,000, sales are \$220,000, and its net profit margin is 6 percent? Assume a tax rate of 40 percent. a. 2.65 b. 1.1 c. 2.1 d. 1.2 What is the discount yield and the annual rate of interest If a six-month Treasury bill is purchased for \$0.9675 on a dollar (i.e., \$96,750 for a \$100,000 bill), what is the discount yield and the annual rate of interest? What will What is the effective annual rate on the loan Suppose Community Bank offer to lend you \$10,000 for one year at a nominal annual rate of 8%, but you must make interest payments at the end of each quarter and then pay off How much interest would you be paying in year 2 Your bank offers to lend you \$100,000 at an 8.5% annual interest to start your new business. The terms require you to amortize the loan with 10 equal end-of-year payments. H Find the after-tax return to a corporation that buys a share of preferred stock at \$43, sells it at year-end at \$43, and receives a \$6 year-end dividend. The firm is in the What are the net payments of carter and brence Would Carter be better off if it issued floating-rate debt and engaged in the swap? Would Brence be better off if it issued floating-rate debt or if it issued fixed-rate deb What is the monthly payment amount on this loan AirJet Best Parts, Inc. has decided to take a \$6,950,000 loan being offered by Regions Best at 8.6% APR for 5 years. What is the monthly payment amount on this loan? Do you What was the market risk premium during these 10 years The average annual return on the S& P 500 Index from 1986 to 1995 was 15.8 percent. The average annual T- bill yield during the same period was 5.6 percent. What was the mar Calculate the change in ebit and the change in sales Coca Cola reported 30.99 billion in sales in 2009 and 31.94 in 2008. Operating costs were 8.23 billion in 2009 and 8.45 in 2008. How do I calculate the change in EBIT and th
548
2,073
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.75
3
CC-MAIN-2022-21
latest
en
0.96812
https://www.devskill.com/CodingProblems/ViewProblem/504
1,575,920,316,000,000,000
text/html
crawl-data/CC-MAIN-2019-51/segments/1575540521378.25/warc/CC-MAIN-20191209173528-20191209201528-00188.warc.gz
683,560,277
10,569
# DCP-504: Gazor and City Hype Back to All Problems Easy Math > Modular Arithmetic The story is about one of the fastest racing video game Need for Speed Most Wanted where the gamer needs to defeat the blacklist members to prove the gamer him/herself best.<br> A Hype is moving around in the air of NFS city from some days ago – <br> <blockquote>**NFSMW top black List member Gazor can be defeated if you have the boosters installed in your car.**</blockquote> You are the clever one. And you own some of the boosters.<br> The boosters are with the initial power **1, 2, … …, P**. You can raise the power level of boosters up to a certain exponent level ( **N** ). You have decided to raise the power level of boosters, sum up all of the powers after raising and apply to your vehicle’s engine. But the vehicle has a weird power display window. It shows the **applied power modulo 5**. You have to find out the number that will be shown on the display? Interesting Huh!! Input: ------ Input starts with an integer **T** which denotes the number of test cases.<br> Each of the next **T** lines will contain two integers **P** and **N**, where **P** denotes the boosters you owned with initial power **( 1, 2 . . . P )** and **N** denotes the level of power you want to raise. Constraints ------- 1<= **T** <= 100000<br> 1<= **P** <= 9<br> 0<= **N** <= 10^15<br> Output: ------- For each test case, you need to print **(1^N + 2^N + …. + P^N)** modulo **5**. Sample Input ------------ 2 4 0 7 1 Sample Output ------------- 4 3 <b>Explanation</b><br> <ul> <li>For the first test case, ( 1^0 + 2^0 + 3^0 + 4^0)%5 = 4%5 = 4</li> <li>For the second test case, ( 1^1 + 2^1 + 3^1 + 4^1 + 5^1 + 6^1 + 7^1)%5 = (1+2+3+4+5+6+7)%5 = 28%5 = 3.</li> </ul> ### Problem Limits Language Time Limit (seconds) C 1.00 C++ 1.00 C++14 1.00 C# 1.00 Go 2.00 Java 1.00 JavaScript 2.00 Objective-C 2.00 Perl 2.00 PHP 2.00 Python 1.00 Python3 1.00 Ruby 2.00 VB.Net 2.00 # 138/524 Solve/Submission ### Ranking # User Language Timing 01 ss1230 Cpp14 0.03s 02 feodorv C 0.03s 03 pulak_ict_mbstu Cpp 0.03s 04 ssavi Cpp 0.03s 05 Bappy Cpp14 0.04s 06 yasirnabil534 Cpp 0.04s 07 tariqiitju Cpp14 0.04s 08 _GhOstMan_ Cpp 0.04s 09 Dragon_Curve Cpp 0.04s 10 mhiceiuk Cpp 0.06s 11 kakarotto Cpp 0.07s 12 t0whid Cpp 0.08s 13 Silent_Warrior Cpp 0.13s 14 milon019 Cpp 0.17s 16 rayhan50001 Cpp14 0.19s 17 skmonir Cpp 0.19s 18 fayedanik Cpp 0.20s 19 mohibur Cpp14 0.20s 20 S_Saqib Cpp 0.29s 21 wajiul Cpp 0.31s 22 Chayti_Saha98 Cpp 0.33s 23 SAIF_IIT8_JU C 0.33s 24 Roll_no_152 C 0.34s 25 maxhasan Cpp 0.35s 26 we7d Cpp 0.35s 27 Rijoanul_Shanto Cpp14 0.36s 28 MRITuhin Cpp 0.37s 29 Sakhawat_CoU Cpp 0.38s 30 deloar1 Cpp 0.39s 31 L1nK1n Cpp 0.39s 32 sparrow C 0.40s 33 masba Python 0.40s 35 prateepm Cpp14 0.41s 37 loser_123 Cpp 0.43s 38 Khayrul_34 Cpp 0.43s 39 asif04 Cpp14 0.43s 40 prodipdatta7 Cpp14 0.43s 41 Abu_Bakar Cpp 0.44s 43 duronto20 Cpp 0.45s 44 Limon_88 Cpp 0.46s 45 Raka143 Cpp 0.47s 46 joy25896 Cpp 0.48s
1,195
2,982
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.515625
4
CC-MAIN-2019-51
latest
en
0.756793
https://www.tutorialspoint.com/geometry-for-entrance-and-competitive-exams/index.asp
1,695,855,872,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233510326.82/warc/CC-MAIN-20230927203115-20230927233115-00109.warc.gz
1,130,323,059
47,963
# Geometry for entrance and competitive exams A comprehensive course Updated on Sep, 2023 Language - English 30-days Money-Back Guarantee Training 5 or more people ? ## Course Description • Geometry is one of the most important topics. • In entrance exams like CAT /GRE/GMAT, and Competitive Exams like Bank P.O and Clerk/ SSC/CRT, Geometry topic is the key topic. • In this course the following sub topics have been discussed comprehensively • Lines , Angles • Polygons • Triangles: Basic Properties, Types of triangles, Basic proportionality   theorem, similarity and congruency of triangles, Orthocenter,   Centroid, Incenter, Circumcenter • Circles • Mensuration: Two-dimensional figures and three-dimensional figures ### Goals What will you learn in this course: • This course is ideal for those who are appearing for entrance exams and who want to learn Geometry in the limited time that they have. This course is also well-suited for those who want to revise all the key concepts and practice examination level questions in a short span. ### Prerequisites What are the prerequisites for this course? • Since I am covering the topic right from the basics, there are no prerequisites. ## Curriculum Check out the detailed breakdown of what’s inside the course Introduction 6 Lectures • Intro 03:11 03:11 • Lines 06:02 06:02 • Types of angles 09:59 09:59 • Polygons 05:35 05:35 • Introduction-Practice Questions-Part1 08:20 08:20 • Introduction-Practice Questions-Part2 07:42 07:42 Triangles 16 Lectures 7 Lectures Circles 4 Lectures Mensuration 10 Lectures ## Instructor Details Srinivasa Rao Gorantla •For the past 25 years, I have trained thousands of students in Quantitative Aptitude for CAT / GMAT/ GRE® and competitive exams like Bank PO & Clerk/ Staff Selection Commission Exams/ CSAT/CRT and other exams •I have 30,000+ hours of classroom teaching experience. •I have more than two decades of experience in training faculty members, at India's leading test-preparation institute. •I have more than two decades of experience in training students for Group Discussions & Personal Interviews. ## Course Certificate User your certification to make a career change or to advance in your current career. Salaries are among the highest in the world.
536
2,279
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.53125
3
CC-MAIN-2023-40
latest
en
0.871484
https://oeis.org/A054146
1,624,319,463,000,000,000
text/html
crawl-data/CC-MAIN-2021-25/segments/1623488504838.98/warc/CC-MAIN-20210621212241-20210622002241-00252.warc.gz
368,830,251
3,961
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!) A054146 a(n) = A054145(n)/2. 3 0, 1, 6, 29, 128, 536, 2168, 8556, 33152, 126640, 478304, 1789840, 6646272, 24519680, 89956224, 328437184, 1194102784, 4325299456, 15615510016, 56209986816, 201798074368, 722731821056, 2582790830080, 9211619462144 (list; graph; refs; listen; history; text; internal format) OFFSET 0,3 LINKS G. C. Greubel, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (8,-20,16,-4). FORMULA From G. C. Greubel, Aug 01 2019: (Start) a(n) = ((n-2)*((2 + sqrt(2))^n + (2 - sqrt(2))^n) + sqrt(2)*((2 + sqrt(2))^n - (2 - sqrt(2))^n))/16. G.f.: x*(1 - x)^2/(1 - 4*x + 2*x^2)^2. (End) MATHEMATICA LinearRecurrence[{8, -20, 16, -4}, {0, 1, 6, 29}, 30] (* G. C. Greubel, Aug 01 2019 *) PROG (PARI) my(x='x+O('x^30)); concat([0], Vec(x*(1-x)^2/(1-4*x+2*x^2)^2)) \\ G. C. Greubel, Aug 01 2019 (MAGMA) R:=PowerSeriesRing(Integers(), 30); [0] cat Coefficients(R!( x*(1-x)^2/(1-4*x+2*x^2)^2 )); // G. C. Greubel, Aug 01 2019 (Sage) (x*(1-x)^2/(1-4*x+2*x^2)^2).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Aug 01 2019 (GAP) a:=[0, 1, 6, 29];; for n in [5..30] do a[n]:=8*a[n-1]-20*a[n-2] +16*a[n-3]-4*a[n-4]; od; a; # G. C. Greubel, Aug 01 2019 CROSSREFS Cf. A054144, A054145. Sequence in context: A111644 A225618 A081278 * A172062 A081674 A173413 Adjacent sequences:  A054143 A054144 A054145 * A054147 A054148 A054149 KEYWORD nonn AUTHOR Clark Kimberling, Mar 18 2000 STATUS approved Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent The OEIS Community | Maintained by The OEIS Foundation Inc. Last modified June 21 19:12 EDT 2021. Contains 345365 sequences. (Running on oeis4.)
793
1,979
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.359375
3
CC-MAIN-2021-25
latest
en
0.520821
https://tutorialedge.net/compsci/memoization-for-beginners/
1,547,678,141,000,000,000
text/html
crawl-data/CC-MAIN-2019-04/segments/1547583657907.79/warc/CC-MAIN-20190116215800-20190117001800-00463.warc.gz
704,066,132
8,618
# Memoization For Beginners In this tutorial we are going to look at a concept in computer science called `memoization`. This is a really cool concept that allows us to optimize the runtime performance of some of our recursive algorithms by effectively caching the results of previous computations so that they don’t have to be continuously re-computed. # The Fibonacci Example Calculating Fibonacci in a recursive manner is quite possibly the best example I’ve come across when it comes to showing the power of `memoization`. Imagine we had a function that computed the fibonacci number `n` like so: ``````1 2 3 4 5 6 7 8 `````` ``````# Basic fibonacci function # 1 + 1 + 2 + 3 + 5 + 8 + 13 def fib(n): if n <= 0: return 0 if n == 1: return 1 return fib(n-1) + fib(n-2)`````` When we then tried to run our `fib(7)` function it would then compute the following answer. ``````1 2 3 `````` ``````>>> import fibonacci >>> fibonacci.fib(7) 13`````` Now the runtime complexity of this relatively simple function above would be `O(2^n)` which is incredibly inefficient as we start to compute larger and larger fibonacci numbers. # The Memoization Optimization Through the use of `memoization` we could effectively store the results of previous computations. In order to store our results we will use a `dict` in Python. `````` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 `````` ``````def fib_with_memo(n, memo): if n <= 0: return 0 if n == 1: return 1 if n not in memo: print("Memo Computed") memo[n] = fib_with_memo(n-1, memo) + fib_with_memo(n-2, memo) return memo[n] memo = {} print(fib_with_memo(9, memo)) print(memo)`````` When you run this you should get the following output. As you can see from the number of times `Memo Computed` is printed out, we have been able to effectively optimize the number of times we have to recursively call `fib()`. `````` 1 2 3 4 5 6 7 8 9 10 11 `````` `````` \$ python3.6 fibonacci.py Memo Computed Memo Computed Memo Computed Memo Computed Memo Computed Memo Computed Memo Computed Memo Computed 34 {2: 1, 3: 2, 4: 3, 5: 5, 6: 8, 7: 13, 8: 21, 9: 34}`````` We have been able to modify our program and change is runtime performance from `O(2^N)` to `O(N)` which is a huge saving. # Entire Program The entire Python file can be found below. `````` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 `````` ``````import time def fib(n): if n <= 0: return 0 if n == 1: return 1 return fib(n-1) + fib(n-2) def fib_with_memo(n, memo): if n <= 0: return 0 if n == 1: return 1 if n not in memo: memo[n] = fib_with_memo(n-1, memo) + fib_with_memo(n-2, memo) return memo[n] memo = {} start_time = time.time() print(fib(35)) end_time = time.time() print("Total Time: {}".format(end_time - start_time)) start_time = time.time() print(fib_with_memo(35, memo)) end_time = time.time() print("Total Time: {}".format(end_time - start_time)) print(memo)`````` The outputs of this are: ``````1 2 3 4 5 6 `````` `````` \$ python3.6 fibonacci.py 9227465 Total Time: 7.323758840560913 9227465 Total Time: 0.00010204315185546875 {2: 1, 3: 2, 4: 3, 5: 5, 6: 8, 7: 13, 8: 21, 9: 34, 10: 55, 11: 89, 12: 144, 13: 233, 14: 377, 15: 610, 16: 987, 17: 1597, 18: 2584, 19: 4181, 20: 6765, 21: 10946, 22: 17711, 23: 28657, 24: 46368, 25: 75025,26: 121393, 27: 196418, 28: 317811, 29: 514229, 30: 832040, 31: 1346269, 32: 2178309, 33: 3524578, 34: 5702887, 35: 9227465}`````` As you can see the `memoized` version of the fibonacci function returns in a fraction of the time. # Conclusion If you found this tutorial useful or need further explanation then please feel free to let me know in the comments section below!
1,259
3,676
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.3125
4
CC-MAIN-2019-04
longest
en
0.864837
http://sepwww.stanford.edu/sep/prof/pvi/conj/paper_html/node6.html
1,603,534,081,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107882103.34/warc/CC-MAIN-20201024080855-20201024110855-00582.warc.gz
95,200,795
3,618
Next: Kirchhoff modeling and migration Up: FAMILIAR OPERATORS Previous: Product of operators ## Convolution end effects In practice, filtering generally consists of three parts: (1) convolution, (2) shifting to some preferred time alignment, and (3) truncating so the output has the same length as the input. An adjoint program for this task, is easily built from an earlier program. We first make a simple time-shift program advance(). ```# signal advance: y(iy) = x(iy+jump) # real xx(nx), yy(ny) do iy= 1, ny { ix = iy + jump if( ix >= 1 ) if( ix <= nx ) yy( iy) = yy( iy) + xx( ix) else xx( ix) = xx( ix) + yy( iy) } return; end ``` Although the code is bulky for such a trivial program, it is easy to read, works for any size of array, and works whether the shift is positive or negative. Since filtering ordinarily delays, the advance() routine generally compensates. Merging advance() with the earlier program contran() according to the transpose rule ,we get contrunc(). ```# Convolve, shift, and truncate output. # subroutine contrunc( conj, add, lag, np,pp, nf,ff, nq,qq) integer ns, conj, add, lag, np, nf, nq real pp(np) # input data real ff(nf) # filter (output at ff(lag)) real qq(nq) # filtered data temporary real ss( np+nf-1) ns = np + nf - 1 if( conj == 0 ) { call contran( 0, 0, np,pp, nf,ff, ss) } else { call advance( 1, 0, lag-1, ns,ss, nq,qq) call contran( 1, add, np,pp, nf,ff, ss) } return; end ``` For a symmetrical filter, a lag parameter half of the filter length would be specified. The output of a minimum-phase filter is defined to be at the beginning of the filter, ff(1), so then lag=1. The need for an adjoint filtering program will be apparent later, when we design filters for prediction and interpolation. The program variable add happens to be useful when there are many signals. Our first real use of add will be found in the subroutine stack1() . Another goal of convolution programs is that zero data not be assumed beyond the interval for which the data is given. This can be important in filter design and spectral estimation, when we do not want the truncation at the end of the data to have an effect. Thus the output data is shorter than the input signal. To meet this goal, I prepared subroutine convin(). ```# Convolve and correlate with no assumptions off end of data. # real xx(nx) # input signal real bb(nb) # filter (or output crosscorrelation) real yy(nx-nb+1) # filtered signal (or second input signal) ny = nx - nb + 1 # length of filtered signal if( ny < 1 ) call erexit('convin() filter output negative length.') do iy= 1, ny { do ib= 1, nb { yy( iy) = yy( iy) + bb(ib) * xx( iy-ib+nb) }} else do ib= 1, nb { do iy= 1, ny { bb( ib) = bb( ib) + yy(iy) * xx( iy-ib+nb) }} return; end ``` By now you are probably tired of looking at so many variations on convolution; but convolution is the computational equivalent of ordinary differential equations, its applications are vast, and end effects are important. The end effects of the convolution programs are summarized in Figure 1. conv Figure 1 Example of convolution end effects. From top to bottom: (1) input; (2) filter; (3) output of convin(); (4) output of contrunc() with no lag (lag=1); and (5) output of contran(). Next: Kirchhoff modeling and migration Up: FAMILIAR OPERATORS Previous: Product of operators Stanford Exploration Project 10/21/1998
954
3,638
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.8125
3
CC-MAIN-2020-45
latest
en
0.721134
http://clay6.com/qa/44972/two-point-charges-4q-q-are-separated-by-1-m-in-air-at-what-point-on-the-lin
1,513,442,602,000,000,000
text/html
crawl-data/CC-MAIN-2017-51/segments/1512948588294.67/warc/CC-MAIN-20171216162441-20171216184441-00559.warc.gz
55,922,797
25,630
# Two point charges 4Q, Q are separated by 1 m in air. At what point on the line joining the charges is the "electric field intensity zero? Also calculate the electrostatic potential energy of the system of charges, taking the value of charge, $Q = 2 × 10^{-7}\; C.$ $x= \large\frac{1}{3}$$m$ $U= 1.44 mj$
93
306
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.234375
3
CC-MAIN-2017-51
longest
en
0.8447
https://lavelle.chem.ucla.edu/forum/search.php?author_id=6985&sr=posts
1,586,027,776,000,000,000
text/html
crawl-data/CC-MAIN-2020-16/segments/1585370524604.46/warc/CC-MAIN-20200404165658-20200404195658-00430.warc.gz
563,158,531
13,932
## Search found 20 matches Tue Mar 08, 2016 2:45 pm Forum: Appications of the Nernst Equation (e.g., Concentration Cells, Non-Standard Cell Potentials, Calculating Equilibrium Constants and pH) Topic: 2013 Final Question 4A + B Clarifications Replies: 2 Views: 425 ### Re: 2013 Final Question 4A + B Clarifications Why in part b do you subtract the initial value of O2 instead of adding it? Sun Feb 28, 2016 3:46 pm Forum: *Cycloalkanes Topic: Exercise 1.16 Numbering Carbons in Parent Chain Replies: 6 Views: 935 ### Re: Exercise 1.16 Numbering Carbons in Parent Chain Would it be wrong to name this 1,1-dimethyl-2-propylcyclopentane? Does there need to be the iso- in front of the propyl or is it sufficient enough to just say propyl since there are 3 carbons on that substituent. Wed Feb 24, 2016 11:14 pm Forum: *Alkanes Topic: Naming Substituents and Carbon Pair Replies: 1 Views: 268 ### Re: Naming Substituents and Carbon Pair When figuring out which number carbon a substituent is bonded to, you always count so that it will be the lowest number carbon. If there are more than one substituents, the same rule still applies. If you are deciding between, for example, 3, 6, 7 and 2, 6, 9 you would not add them up and see which ... Tue Feb 16, 2016 12:35 pm Forum: Method of Initial Rates (To Determine n and k) Topic: Homework 15.23 (c) Replies: 1 Views: 676 ### Homework 15.23 (c) Determine the rate constant for each of the following first-order reactions, in each case expressed for the rate of loss of A: (c) 2A --> B + C, given that [A] 0 =0.153 mol/L and that after 115s the concentration of B rises to 0.035mol/L. Why, in order to find [A] 115s must you subtract the initial ... Sun Feb 07, 2016 12:11 pm Forum: Galvanic/Voltaic Cells, Calculating Standard Cell Potentials, Cell Diagrams Topic: Winter 2015 Midterm Q8C Replies: 1 Views: 224 ### Winter 2015 Midterm Q8C Assuming the carbon atoms in glucose have 0 oxidation state whereas each H is +1, and each O -2, how many electrons are involved in glucose oxidation? C 6 H 12 O 6 (aq) +O 2 (g) --> H 2 O (l) +CO 2 (g) The answer says that C in CO 2 has a +4 oxidation state Since ther... Sun Jan 24, 2016 8:28 pm Forum: Reaction Enthalpies (e.g., Using Hess’s Law, Bond Enthalpies, Standard Enthalpies of Formation) Topic: Homework 8.57 Replies: 2 Views: 373 ### Homework 8.57 How do you know that you need to write the balanced equation for each of the reactants and products first instead of just saying that delta H = the sum of the enthalpy of the products - the sum of the enthalpy of the reactants? From doing the second way you get the same answer but positive (312 kJ/m... Thu Jan 21, 2016 1:41 am Forum: Reaction Enthalpies (e.g., Using Hess’s Law, Bond Enthalpies, Standard Enthalpies of Formation) Topic: 8.53- Calculating the change in internal energy Replies: 3 Views: 317 ### Re: 8.53- Calculating the change in internal energy If U = q + w, why is the work=0 for this problem? Thu Jan 21, 2016 12:13 am Forum: Reaction Enthalpies (e.g., Using Hess’s Law, Bond Enthalpies, Standard Enthalpies of Formation) Topic: Textbook Example 8.31 Replies: 1 Views: 272 ### Textbook Example 8.31 Example 8.13 Estimate the enthalpy of the reaction between bromine and propene to form 1, 2-dibromopropane. The enthalpy of vaporization is Br 2 is 29.96 kJ/mol, and that of CH 3 CHBrCH 2 Br is 35.61kJ/mol. The reaction is Br 2 + CH 3 CH=CH 2 --> CH 3 CHBrCH 2 Br I understand that you have to find t... Tue Jan 19, 2016 1:11 am Forum: Phase Changes & Related Calculations Topic: Extensive vs. Intensive Replies: 2 Views: 284 ### Extensive vs. Intensive What does it mean that something is an extensive property of matter versus intensive? Sun Jan 10, 2016 6:36 pm Forum: Phase Changes & Related Calculations Topic: Homework 8.27 Replies: 5 Views: 1218 ### Homework 8.27 Calculate the work for each of the following processes beginning with a gas sample in a piston assembly with T=305K, P=1.79atm, and V=4.29L: (a) irreversible expansion against a constant external pressure of 1.00atm to a final volume of 6.52L (b) isothermal, reversible expansion to a final volume of... Tue Dec 01, 2015 1:26 pm Forum: Polyprotic Acids & Bases Topic: HW 12.77 (Calculating pH of alanine) Replies: 3 Views: 628 ### HW 12.77 (Calculating pH of alanine) 12.77 A 3.38 sample of the sodium salt of alanine, NaCH 3 CH(NH 2 )CO 2 is dissolved in water and then the solution is diluted to 50.0mL. For alanine, K a1 =4.57 x 10 -3 , K a2 =1.30 x 10 -10 . What is the pH of the resulting solution? The answer key uses the equation pH = 1/2(pK a1 + pK a2 ) but I ... Sun Nov 29, 2015 8:58 pm Forum: Conjugate Acids & Bases Topic: Fundamentals J.5 (Writing ionic equations) Replies: 1 Views: 379 ### Fundamentals J.5 (Writing ionic equations) J.5 Complete the overall equation and write the complete ionic equation and the net ionic equation for each of the following acid-base reactions. If the substance is a weak acid or base, leave it in its molecular form in the equations. (b) (CH 3 ) 3 N + HNO 3 --> (CH 3 ) 3 NHNO 3 How do you know tha... Thu Nov 19, 2015 12:15 am Forum: Equilibrium Constants & Calculating Concentrations Topic: 2013 Quiz 3 Preparation #10 Replies: 10 Views: 1073 ### Re: 2013 Quiz 3 Preparation #10 You don't have to convert the bars to any other units. I understand that in order to get the right answer you have to flip the reaction and inverse the K value but I don't understand why that works and why that gets you the right answer as opposed to leaving it the normal way and solving it without ... Wed Nov 11, 2015 9:47 pm Forum: Equilibrium Constants & Calculating Concentrations Topic: Partial Pressure Calculation? Replies: 1 Views: 300 ### Re: Partial Pressure Calculation? The equation is like that because K= (PPCl3)(PCl2)/(PPCl5) and so when you're solving for the partial pressure of PPCl3 you can rearrange the equation to be this: PPCl3= (K)(PPCl5)/(PCl2) After plugging in the values you will get PPCl3=(25)(1.18)/(5.43) Mon Nov 02, 2015 12:09 pm Forum: Ionic & Covalent Bonds Topic: How do you know if a compound is ionic? Replies: 2 Views: 1007 ### How do you know if a compound is ionic? Which compound is more ionic? (a) Cl2O or Na2O (b) InCl3 or SbCl3 (c) LiH or HCl (d) MgCl2 or PCl3 How can you determine which compound is more ionic? Is there a trend we should know? Wed Oct 28, 2015 4:03 pm Forum: *Molecular Orbital Theory (Bond Order, Diamagnetism, Paramagnetism) Topic: Valence electron configuration Replies: 1 Views: 355 ### Re: Valence electron configuration The B2 configuration skipped the third sigma bond because B has a less than 8 electrons. When at least one of the elements has less than 8 electrons the pi bonds and sigma bonds are flipped and the pi bonds will have lower energy. This is also shown on pages 97 & 98 of the course reader if you w... Sat Oct 24, 2015 6:55 pm Forum: Hybridization Topic: 4.39 from Homework Replies: 1 Views: 314 ### Re: 4.39 from Homework This is due to the fact that the problem stated "each P atom is connected to 3 other P atoms." The only way that this can be possible is if there is a diamond that connects in the middle (like an X). It is different from most other Lewis structures that we see. Mon Oct 19, 2015 10:48 am Forum: Ionic & Covalent Bonds Replies: 1 Views: 327 Can someone explain the difference between an ion being highly polarizable and having high polarizing power? Mon Oct 05, 2015 10:56 pm Forum: Electron Configurations for Multi-Electron Atoms Topic: Homework 2.43 - Electron configuration Replies: 2 Views: 351 ### Homework 2.43 - Electron configuration For letter (a) Silver (Ag) why is the electron configuration [Kr] 4d^10 5s^1 versus [Kr] 4d^9 5s^2? Also, if this is the case, for letter (f) Iodine (I) why is the electron configuration [Kr] 4d^10 5s^2 5p^5 and not [Kr] 4d^10 5s^1 5p^6? Sun Oct 04, 2015 10:32 pm Forum: Properties of Light
2,459
7,953
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.03125
3
CC-MAIN-2020-16
longest
en
0.851404
http://www.dreamincode.net/forums/topic/250639-getting-functions-to-play-together/
1,524,646,741,000,000,000
text/html
crawl-data/CC-MAIN-2018-17/segments/1524125947759.42/warc/CC-MAIN-20180425080837-20180425100837-00383.warc.gz
380,254,300
20,341
# getting functions to play together. Page 1 of 1 ## 5 Replies - 2617 Views - Last Post: 10 October 2011 - 05:07 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=250639&amp;s=28ab72362f0aa0dd8c8be867eed9e97d&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]> ### #1 apejam Reputation: 1 • Posts: 12 • Joined: 18-February 11 # getting functions to play together. Posted 10 October 2011 - 07:49 AM Hello all. I have a school assignment that I could use some help on. I need to write a program that converts a user input distance to various other measurement units based on a "menu" with 4 choices. Seems simple enough, but I am limited in what I can use. The menu and every conversion needs to be a separate function and I cannot have any global variables. here is what I have so far. it works and converts, but it asks the user to enter a number in twice. Is this because in my conversion function I am recalling the distance function that asks for the input? I'm not sure if it is my understanding of functions thats lacking or what, hoping you guys can point me in the right direction. ```def distance(): distMeters =float(input('enter the distance in meters')) if distMeters <= 0: print ('that is an invalid distance, please enter another') return distMeters def kilometers(): km = distance() * 0.001 print('your distance conversion in kilometers is ' + str(km) + ' km') def inches(): inch = distance() * 39.37 print (inch) def feet(): ft = distance() * 3.281 print (ft) print ('choose which units you would like to convert to from the menu') print () print ('1. Convert to kilometers') print ('2. Convert to inches') print ('3. Convert to feet') print ('4. Exit the program') def conversions(): loop =1 while loop ==1: choice = int(input('what menu option do you choose? ')) print () if choice >= 5: print ('that is not a choice in the listing. Try Again.') if choice == 1: print ('you chose to convert meters to kilometers') kilometers() if choice == 2: print ('you chose to convert meters to inches') inches() if choice == 3: print ('you chose to convert meters to feet') feet() if choice == 4: print ('Thank you for using the converter, program is now quitting') break conversions() ``` Is This A Good Question/Topic? 0 ## Replies To: getting functions to play together. ### #2 Simown • Blue Sprat Reputation: 322 • Posts: 650 • Joined: 20-May 10 ## Re: getting functions to play together. Posted 10 October 2011 - 08:27 AM That is correct, every time you call distance() it will ask the user to enter the distance. You need to separate the code asking for input, and calculations into different sections (or functions) so you can call them when you need to. Another thing, you say "that is an invalid distance, please enter another" but don't ask for it again, you return the value regardless. You want to only return the distance when it's > 0. Not sure you want me to provide any code for you, so I'll leave it for now. Ask if you have any more questions This post has been edited by Simown: 10 October 2011 - 08:48 AM ### #3 apejam Reputation: 1 • Posts: 12 • Joined: 18-February 11 ## Re: getting functions to play together. Posted 10 October 2011 - 09:00 AM Thanks so much for the fast reply simown! As far as I can tell the function to get just input and calculations are already separated? what do you mean? also how could i get it to return only if its higher than 0 another if statement specifying that? please do use code examples! it's easier for me to understand how something works by seeing how its implemented. ### #4 Simown • Blue Sprat Reputation: 322 • Posts: 650 • Joined: 20-May 10 ## Re: getting functions to play together. Posted 10 October 2011 - 09:29 AM The function distance() takes the input and returns the distance, therefore you can't use it in the other functions, such as inches() and kilometers() A better way would be to split them up even further: ```def inputMeters(): while True: distMeters =float(input('enter the distance in meters')) if distMeters > 0: return distMeters def kilometers(meters): km = meters * 0.001 return km def inches(meters): inch = meters * 39.37 return inch #Then you could convert to any measurement without asking for the input again # For example: distMeters = inputMeters() print('The distance in kilometers is ' + str(kilometers(distMeters)) + ' km.') print('The distance in inches is ' + str(inches(distMeters)) + ' inches.') ``` You'll notice I fixed your input "problem" it will ask for the input as long as the number entered is <= 0. You only need 1 return for this, a return breaks out of the loop too. while True: will keep going until the return statement is reached, and that's when distMeters > 0. It doesn't check for wrong input such as Strings, do you need to do that? This post has been edited by Simown: 10 October 2011 - 09:33 AM ### #5 apejam Reputation: 1 • Posts: 12 • Joined: 18-February 11 ## Re: getting functions to play together. Posted 10 October 2011 - 04:40 PM Once again thanks for your help simown! I now have a proper program! unfortunately I still have some questions. My main problem is I don't understand how to pass data from one function to another. for instance, in the example you give me. how does the return of "distMeters" end up in the other functions "(meters)" parameters? I don't see anything specifying it. since it was returned before defining the other functions does it just go down the line and place itself in the empty parameters? is there something I am not seeing? (the finished product) ```def menu(): print ('choose which units you would like to convert to from the menu') print () print ('1. Convert to kilometers') print ('2. Convert to inches') print ('3. Convert to feet') print ('4. Exit the program') repeat = 0 while repeat == 0: choice = int(input('from the menu choose a conversion ')) print() if choice >=5: print ('that selection is not in the listing') if choice ==1: print ('your conversion to kilometers is ' + str(kilometers(distMeters)) +' km') if choice ==2: print ('your conversion to inches is ' + str(inches(distMeters)) + ' in') if choice ==3: print ('your conversion to feet is ' + str(feet(distMeters)) + ' ft') if choice ==4: print ('You are now exiting the program') break def inputMeters(): while True: distMeters =float(input('enter the distance in meters')) if distMeters > 0: return distMeters else: print('invalid distance') def kilometers(meters): km = meters * 0.001 return km def inches(meters): inch = meters * 39.37 return inch def feet(meters): ft = meters * 3.281 return ft distMeters = inputMeters() ``` This post has been edited by apejam: 10 October 2011 - 04:42 PM ### #6 Martyr2 • Programming Theoretician Reputation: 5186 • Posts: 13,916 • Joined: 18-April 07 ## Re: getting functions to play together. Posted 10 October 2011 - 05:07 PM You can put calls to functions inside of other function calls or you store the value in a variable and just pass that to the other function. For example... ```# Store the value returned by inputMeters() distMeters = inputMeters() # Call another function and give it the value km = kilometers(distMeters) ``` And the example of putting one call in another... ```km = kilometers(inputMeters()) ``` Here inputMeters is called, the user enters the value, it returns distMeters which is then immediately passed to the function kilometers.
2,000
7,636
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.84375
3
CC-MAIN-2018-17
latest
en
0.818432
https://www.experts-exchange.com/questions/27640534/Excel-Formula-to-Selectively-Sum-Data.html
1,544,501,658,000,000,000
text/html
crawl-data/CC-MAIN-2018-51/segments/1544376823565.27/warc/CC-MAIN-20181211040413-20181211061913-00202.warc.gz
856,518,363
20,524
Excel Formula to Selectively Sum Data I have a sheet that has text in column A, a amounts in column B and dates in column C. In row 1, columns O through Z I have the names of Months (January..December). In the January column, row 2 (cell O2), I want to create a formula that will SUM all values in column B where MONTH(C#) = 1. Likewise in cell P2, I want to sum all rows in column B where MONTH(C#) = 2. And so on. The result is 12 formulas, one for each month, that displays the total amount in colukmn B for that month (or 0 if nothing exists yet for the month). LVL 15 Who is Participating? x I wear a lot of hats... "The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S. Commented: Try this formula in O2 copied across =SUMPRODUCT((TEXT(\$C\$2:\$C\$100,"mmmm")=O\$1)+0,\$B\$2:\$B\$100) assumes data in rows 2 to 100, adjust as required regards, barry Commented: You can use this formula in O2 and copy across columns: =SUMPRODUCT(--(MONTH(\$C\$2:\$C\$6)=COLUMN()-COLUMN(\$O1)+1),\$B\$2:\$B\$6) (rows from 2 to 6 - you can change) (nb: "mmmm" in TEXT formula is language-dependent, it will not work in some non-english environment.) Cheers, Kris Experts Exchange Solution brought to you by Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle. Database DeveloperAuthor Commented: Both, in my case work and produce the same results. I've accepted Kris' as the best solution as he does take language into consideration, even though I am not considering running this code in a computer with Chinese set as the language any time in the near future, it may help others. I've split the points evenly. Thanks to both of you. Commented: Thank you! The problem is not just Chinese but for example my Hungarian, where "hhhh" stands for "mmmm" Cheers, Kris (she :-) Commented: It's a fair point :) You could possibly use COLUMNS function to avoid having 2 COLUMN functions, i.e. =SUMPRODUCT(--(MONTH(\$C\$2:\$C\$6)=COLUMNS(\$O2:O2)),\$B\$2:\$B\$6) regards, barry It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today Microsoft Excel From novice to tech pro — start learning today.
713
2,842
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.0625
3
CC-MAIN-2018-51
latest
en
0.923949
https://ch.mathworks.com/matlabcentral/cody/problems/44311-number-of-even-elements-in-fibonacci-sequence/solutions/2052204
1,582,792,174,000,000,000
text/html
crawl-data/CC-MAIN-2020-10/segments/1581875146665.7/warc/CC-MAIN-20200227063824-20200227093824-00313.warc.gz
303,112,989
15,888
Cody # Problem 44311. Number of Even Elements in Fibonacci Sequence Solution 2052204 Submitted on 9 Dec 2019 by Petr Stieber This solution is locked. To view this solution, you need to provide a solution of the same size or smaller. ### Test Suite Test Status Code Input and Output 1   Pass d = 14; y_correct = 4; assert(isequal(evenFibo(d),y_correct)) 2   Pass d = 20; y_correct = 6; assert(isequal(evenFibo(d),y_correct)) 3   Pass d = 50; y_correct = 16; assert(isequal(evenFibo(d),y_correct)) 4   Pass d = 100; y_correct = 33; assert(isequal(evenFibo(d),y_correct)) 5   Pass d = 150; y_correct = 50; assert(isequal(evenFibo(d),y_correct)) 6   Pass d = 200; y_correct = 66; assert(isequal(evenFibo(d),y_correct)) 7   Pass d = 500; y_correct = 166; assert(isequal(evenFibo(d),y_correct)) 8   Pass d = 1000; y_correct = 333; assert(isequal(evenFibo(d),y_correct)) 9   Pass d = 1e4; y_correct = 3333; assert(isequal(evenFibo(d),y_correct)) 10   Pass d = 2e4; y_correct = 6666; assert(isequal(evenFibo(d),y_correct)) 11   Pass d = 3e5; y_correct = 1e5; assert(isequal(evenFibo(d),y_correct)) 12   Pass d = 6e6; y_correct = 2e6; assert(isequal(evenFibo(d),y_correct)) % % %% % d = 9223372036854775807; % y_correct = 3074457345618258432; % assert(isequal(evenFibo(d),y_correct))
464
1,290
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.453125
3
CC-MAIN-2020-10
latest
en
0.398447
https://dotcms1.dev.anr.msu.edu/search?page=3&contentTypeOption=Article,DigitalDocument&datePublished=&author=&tag=4-h&tagUsage=and&siteContext=&hideHomePage=true
1,642,382,762,000,000,000
text/html
crawl-data/CC-MAIN-2022-05/segments/1642320300253.51/warc/CC-MAIN-20220117000754-20220117030754-00119.warc.gz
295,092,743
18,567
Separate tags by commas. 4-H Animal Science 4-H Careers & Entrepreneurship 4-H Environmental & Outdoor Education Early Childhood Development • ### Heads In, Hearts In: Measuring Liquids - Exploring Volume Published on May 25, 2021 In this activity you will practice using liquid measuring cups to find the volume of the water inside each bottle. • ### Heads In, Hearts In: Skippy Clippy Published on May 25, 2021 You will use clothespins to practice skip counting. Remember that skip counting can be done by a variety of different numbers. • ### Heads In, Hearts In: Pie Die Published on May 25, 2021 This activity will help you practice counting and grouping items and then displaying or graphing your results. • ### Heads In, Hearts In: 3D Shapes Published on May 25, 2021 This activity will help youth practice identifying and naming 3D shapes and then making models of those shapes using play dough. • ### Heads In, Hearts In: Photo-Graph Published on May 25, 2021 This activity will help you practice counting and grouping items and then displaying or graphing your results. In this activity, you will identify shapes, count the number of matching pictures, and then use a bar graph to display the results. • ### Heads In, Hearts In: Gumball Equations Published on May 25, 2021 In this activity you will practice counting objects, adding them together to get the total and completing equations. • ### Heads In, Hearts In: Guess What Shape Published on May 25, 2021 In this activity, you will try to guess a mystery shape that you can’t see by asking questions about the shape’s attributes. • ### Heads In, Hearts In: Marshmallow Structures Published on May 25, 2021 In this activity you will practice building models of 2D and 3D shapes using marshmallows and toothpicks. • ### Heads In, Hearts In: Hungry Hedgehogs Published on May 25, 2021 In this activity, you will help feed crickets to a hedgehog. You will take two groups of crickets and decide which symbol to use to describe whether one number is greater than, less than or equal to. • ### Heads In, Hearts In: Measure A Room Published on May 25, 2021 In this activity, you will choose a room (tote) and measure commonly found items in that room for length, width or height using two different units of measurement. • ### Heads In, Hearts In: Math Full Activity Book Published on May 25, 2021 Heads In, Hearts In: Math Activities are designed to help Michigan State University Extension staff members to involve partners in facilitating a family enrichment program around the topic of math. This packet contains all 16 mindfulness activities. • ### Japan Golden Week: A cultural learning opportunity for youth and adults Published on May 24, 2021 Explore the Japanese holiday of Golden Week, which begins with the Showa Day and ends with Children’s Day. • ### Tips for successful hybrid 4-H meetings Published on May 24, 2021 Planning for success in blending in-person and online environments. • ### Why are youth development organizations important? Published on May 24, 2021 Parents may ask, “Should I get my child involved in a youth development organization?” The answer is yes! • ### Crafts Around the World Series Asia: Japanese Origami 4-H Clover Published on May 21, 2021 This activity provides youth the opportunity to learn about cultural activities as well as practice Japanese origami paper folding. • ### Crafts Around the World Series Europe: Polish Wycinanki Traditional Cut-Paper Published on May 21, 2021 This activity provides youth the opportunity to learn about cultural activities as well as practice traditional cut-paper. • ### Build a Bank Activity Published on May 20, 2021 Learn how to make a 4-part bank, and the 4 uses of money, in this youth activity for middle school aged youth. • ### MSU Extension 4-H Volunteer Guide to Re-Enrollment Published on May 20, 2021 Michigan 4-H volunteers can use this helpful guide to ensure they have completed all necessary steps in order to begin engaging as a volunteer in a new program year! • ### COVID-19 Modifications to Michigan 4-H Shooting Sports Programs Published on May 20, 2021 Michigan 4-H Shooting Sports programs must adhere to all MSU Extension guidelines for in-person engagements. The following are additional guidelines specific to 4-H shooting sports experiences. • ### 2021 Michigan 4-H Exploration Days: Expanded Free Time Choices Published on May 20, 2021 Choose your own adventure during 4-H Exploration Days: Expanded by selecting one of our great free time options!
1,036
4,563
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.328125
3
CC-MAIN-2022-05
latest
en
0.797647
https://www.buffalobrewingstl.com/pressure-drop/info-enf.html
1,579,691,562,000,000,000
text/html
crawl-data/CC-MAIN-2020-05/segments/1579250606975.49/warc/CC-MAIN-20200122101729-20200122130729-00092.warc.gz
800,609,029
5,012
Info Evidently a temperature rise of 70C would not be a safe design because the equilibrium line nearly touches the operating line near the bottom of the tower, creating a pinch. A temperature rise of 60C appears to give an operable design, and for this case LM = 349 kmol per 100 kmol of feed gas. The design diagram for this case is shown in Fig. 14-10, in which the equilibrium curve is drawn so that the slope at the origin m2 is equal to 2.09 and passes through the point x1 = 0.02/3.49 = 0.00573 at y° = 0.00573 x 2.79 = 0.0160. The number of transfer units can be calculated from the adiabatic design equation, Eq. (14-46): Evidently a temperature rise of 70C would not be a safe design because the equilibrium line nearly touches the operating line near the bottom of the tower, creating a pinch. A temperature rise of 60C appears to give an operable design, and for this case LM = 349 kmol per 100 kmol of feed gas. The design diagram for this case is shown in Fig. 14-10, in which the equilibrium curve is drawn so that the slope at the origin m2 is equal to 2.09 and passes through the point x1 = 0.02/3.49 = 0.00573 at y° = 0.00573 x 2.79 = 0.0160. The number of transfer units can be calculated from the adiabatic design equation, Eq. (14-46): The estimated height of tower packing by assuming HOG = 0.70 m and a design safety factor of 1.5 is hT = (14.4X0.7X1.5) = 15.1 m (49.6 ft) For this tower, one should consider the use of two or more shorter packed sections instead of one long section. Another point to be noted is that this calculation would be done more easily today by using a process simulator. However, the details are presented here to help the reader gain familiarity with the key assumptions and results.
473
1,743
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.609375
3
CC-MAIN-2020-05
latest
en
0.938045
https://www.dostips.com/forum/viewtopic.php?f=3&p=69992&sid=145fff71ac3b9ee38d55b46379230310
1,718,228,779,000,000,000
text/html
crawl-data/CC-MAIN-2024-26/segments/1718198861261.53/warc/CC-MAIN-20240612203157-20240612233157-00558.warc.gz
679,912,741
18,896
## (nearly) ieee 754 floating point single precisition Discussion forum for all Windows batch related topics. Moderator: DosItHelp Message Author einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition Thanks penpen! I have tested the Sin(x) of previus post for see the error. The result on single test is VERY GOOD! Code: Select all ``@echo  offrem sin(x)call :sin "1.73"goto :eof:sin %1=x radiantsset x=%~1rem calculate SIN(x) ~ x * ( 1 - x^2 * (1/6 - x^2 * (1/120 - x^2 * (1/5040 - x^2 * (1/362880 - x^2 * 1/39916800 )))))rem calculate x^2call :floatTestMul2 "%x%" "%x%"  "xx"call :floatTestMul2 "%xx%" "2.5052108385441718775052108385442e-8" "sinp"call :floatTestSub2 "2.7557319223985890652557319223986e-6" "%sinp%" "sinp2"call :floatTestMul2 "%xx%" "%sinp2%" "sinp3"call :floatTestSub2 "1.984126984126984126984126984127e-4" "%sinp3%" "sinp4"call :floatTestMul2 "%xx%" "%sinp4%" "sinp5"call :floatTestSub2 "0.00833333333333333" "%sinp5%" "sinp6"call :floatTestMul2 "%xx%" "%sinp6%" "sinp7"call :floatTestSub2 "0.16666666666666666" "%sinp7%" "sinp8"call :floatTestMul2 "%xx%" "%sinp8%" "sinp9"call :floatTestSub2 "1" "%sinp9%" "sinp10"call :floatTestMul2 "%x%" "%sinp10%" "sin"echo Sin(%x%)=%sin%pausegoto :eof:: functions add for return a value in variable:floatTestMul2::   %~1 float string multiplicand1::   %~2 float string multiplicand2   setlocal   set "value1=%~1"   set "value2=%~2"     call :str2float "%value1%" "float1"   call :str2float "%value2%" "float2"   call :floatMul "%float1%" "%float2%" "float3"   call :intToHex "hex1" "%float1%"   call :intToHex "hex2" "%float2%"   call :intToHex "hex3" "%float3%"   call :float2str "%float3%" "string1"   rem echo %value1% * %value2% = %float1% * %float2% == %hex1% * %hex2% == %hex3% == %float3% == %string1%   endlocal & set "%~3=%string1%"   goto :eof:floatTestSub2::   %~1 float string minuend::   %~2 float string subtrahend::       else echo hex value if undefined   setlocal   set "value1=%~1"   set "value2=%~2"   call :str2float "%value1%" "float1"   call :str2float "%value2%" "float2"   call :floatSub "%float1%" "%float2%" "float3"   call :intToHex "hex1" "%float1%"   call :intToHex "hex2" "%float2%"   call :intToHex "hex3" "%float3%"   call :float2str "%float3%" "string1"   rem echo %value1% - %value2% = %float1% - %float2% == %hex1% - %hex2% == %hex3% == %float3% == %string1%   endlocal & set "%~3=%string1%"   goto :eof`` result: Code: Select all ``Sin(1.73)=0.9873535`` the windows calculator return: 0,98735383970071645108567767622206 0.9873535 I'm very happy You have done a very good work! EDIT: We have the SIN(x)!!!! einstein1969 einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition Hi penpen, There is another correction to do: If the second operand %2 of FLOATSUB is 0 the inv is calculated: Code: Select all ``   set /A "inv=(1<<31)^%~2"`` result: Code: Select all ``inv = -2147483648`` and when this is assigned at variables get the error like "The numbers are limitated at 32bit precision etc..." einstein1969 penpen Expert Posts: 2009 Joined: 23 Jun 2013 06:15 Location: Germany ### Re: (nearly) ieee 754 floating point single precisition einstein1969 wrote:We have the SIN(x)!!!! Nice ! einstein1969 wrote:(...) when this is assigned at variables get the error like "The numbers are limitated at 32bit precision etc..." This is one of the reasons, why i have to revise the code: This not only could happen in the function :floatSub, ... it could also happen in many other locations; for example near the starts of :floatAdd :floatMul :intToHex, :float2str - but also within these functions there are some locations where this may happen. So this time you have to wait for the bugfix; sorry for that. You should avoid using the float representation of "-0", a hotfix for the floatSub function could be this: Code: Select all ``:floatSub::   %~1 minuend float in int coding::   %~2 subtrahend float in int coding::   %~3 resulting float in int coding   setlocal   set /A "value=%~2"   if "%value%" == "0" (      set "inv=0"   else (      set /A "inv=(1<<31)^%~2"   )   call :floatAdd "%~1" "%inv%" "inv"   endlocal & set "%~3=%inv%"   goto :eof`` But i think this time i won't change the source above, as it doesn't solve the whole problem, and as the solution of the problem i plan to use seems to work without changing this function. penpen einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition Hi penpen, For give a sense at these functions (and test these functions) i have realized a "Plasma" effect. This is an effect that can show error on visive method. But is nice to look and the work on this is more motivating (at least for me) Since there is some my workaround on the complete code i don't know if this work. plasma.cmd (use the ieee754 work): Code: Select all ``@echo off& setlocal EnableDelayedExpansion&Goto :Init_System:: developed on windows 7 32bit. :: Use Lucida console 5 for best view:Main  call :create_palette  set /a e=Lenp/2  for /L %%y in (-30,1,30) do (    call :str2float "%%y" "fy"    :: newy=fy/8    call :floatMul "!fy!" "0x3E000000" newy    call :float2str "!newy!" "newy"    call :sin2 "!newy!" siny    call :str2float "!siny!" "fy"    call :str2float "!e!" "fe"    call :floatMul "!fy!" "!fe!" y1    call :float2str "!y1!" "y1"    :: get integer part    set app=!y1:*.=!    for %%a in (!app!) do set app=!y1:.%%a=!    if "!app!"=="." set app=0    set /a iy=e+!app!    for /L %%x in (-60,1,60) do (      call :str2float "%%x" "fx"      call :floatMul "!fx!" "0x3E000000" newx      call :float2str "!newx!" "newx"      call :sin2 "!newx!" sinx      call :str2float "!sinx!" "fx"      call :str2float "!e!" "fe"      call :floatMul "!fx!" "!fe!" x1      call :float2str "!x1!" "x1"      :: get integer part      set app=!x1:*.=!      for %%a in (!app!) do set app=!x1:.%%a=!      if "!app!"=="." set app=0      set /a ix=e+!app!       set /a "c=(ix+iy)/2"      call :plot !c!    )   echo(  )Goto :EndMain:sin2 %1=x radiants   set x=%~1   if "%x:~0,1%"=="-" (     set r=-1     set x=!x:~1!   ) else (     set r=1   )   rem calculate SIN(x) ~ x * ( 1 - x^2 * (1/6 - x^2 * (1/120 - x^2 * (1/5040 - x^2 * (1/362880 - x^2 * 1/39916800 )))))   call :str2float "%x%" "fx"   :: 0x40490FDB=3.14159265....   call :floatSub "%fx%" "0x40490FDB" "tx"   if !tx! gtr 0 set /A fx=tx, r=-r   call :floatMul "%fx%"       "%fx%"       "fxx"   call :floatMul "%fxx%"      "0x32D7322B" "fsinp"   call :floatSub "0x3638EF1D" "%fsinp%"    "fsinp2"   call :floatMul "%fxx%"      "%fsinp2%"   "fsinp3"   call :floatSub "0x39500D01" "%fsinp3%"   "fsinp4"   call :floatMul "%fxx%"      "%fsinp4%"   "fsinp5"   call :floatSub "0x3C088889" "%fsinp5%"   "fsinp6"   call :floatMul "%fxx%"      "%fsinp6%"   "fsinp7"   call :floatSub "0x3E2AAAAB" "%fsinp7%"   "fsinp8"   call :floatMul "%fxx%"      "%fsinp8%"   "fsinp9"   call :floatSub "0x3F800000" "%fsinp9%"   "fsinp10"   call :floatMul "%fx%"       "%fsinp10%"  "fsin"   if !r! lss 0 set /A "fsin=(1<<31)^fsin"   call :float2str "%fsin%" "sin"endlocal & set "%~2=%sin%"goto :eof:plot %1 call :color !p[%1]:~0,2! !p[%1]:~-1!goto :eof::manual palette:create_palette %1  set p=0  For %%p in (04 4C cE EA A2 21 15 50) do (      set "p[!p!]=%%p°" & set /a p+=1    set "p[!p!]=%%p±" & set /a p+=1    set "p[!p!]=%%p²" & set /a p+=1    set "p[!p!]=%%pÛ" & set /a p+=1  )  set /a p-=1  set Lenp=!p!goto :eofGoto :EndMain:: ( Begin Color Function:color    (echo %~2\..\'    ) > \$\$\$.color.txt && findstr /a:%~1 /f:\$\$\$.color.txt "."    Shift    Shift    If ""=="%~1" Goto :Eof   goto :color:: ) End color Fuction:Init_system  for /F "tokens=1,2 delims=#" %%a in ('"prompt #\$H#\$E# & echo on & for %%b in (1) do rem"') do (  set "DEL=%%a")    <nul set /p ".=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%" > "'"Goto :Main:EndMain  :: Clearing all garbage  del 'Goto :Eof`` EDIT: This use the code of ieee 754. On first post. Must merge. Than the other change is the FloatSub. This is my patch: Code: Select all ``:floatSub::   %~1 minuend float in int coding::   %~2 subtrahend float in int coding::   %~3 resulting float in int coding   setlocal   rem echo sub=%1 %2   rem my temp patch   if "%~2"=="0" endlocal & set "%~3=%~1" & goto :eof   set /A "inv=(1<<31)^%~2"   rem echo inv = %inv%   call :floatAdd "%~1" "%inv%" "inv"   endlocal & set "%~3=%inv%"   goto :eof`` or can use the bugfix of penpen. But I have not tested: Code: Select all ``:floatSub::   %~1 minuend float in int coding::   %~2 subtrahend float in int coding::   %~3 resulting float in int coding   setlocal   set /A "value=%~2"   if "%value%" == "0" (      set "inv=0"   else (      set /A "inv=(1<<31)^%~2"   )   call :floatAdd "%~1" "%inv%" "inv"   endlocal & set "%~3=%inv%"   goto :eof`` Sorry for this pieces of code, but this is working progress. I will post the complete code in the other thread as soon possible. einstein1969 Last edited by einstein1969 on 05 Jun 2014 19:55, edited 1 time in total. foxidrive Expert Posts: 6031 Joined: 10 Feb 2012 02:20 ### Re: (nearly) ieee 754 floating point single precisition It doesn't work as it is missing code... penpen Expert Posts: 2009 Joined: 23 Jun 2013 06:15 Location: Germany ### Re: (nearly) ieee 754 floating point single precisition I have removed some bugs, converted the functions to macros, and split the source into two files: - floaty.bat (the test cases; the source is at the bottom of this post) - loadFloat.bat (that contains the macros) So if you want to use the float functions in your batch file you only need to call "loadFloat.bat" once and then just use the macros; make sure the extensions are enabled (default on most systems): Code: Select all ``@echo offsetlocal enableExtensions:: load all macros, and exit if it has failed for whatever reasonscall "loadFloat.bat"if errorLevel 1 exit /b 1:: use the macros (names are similar to the function names)for %%a in (operand1 operand2 result string) do set "%%~a="%\$str2float% "10" operand1%\$str2float% "4"  operand2%\$floatAdd%  "%operand1%" "%operand2%" result%\$float2str% "%result%" stringecho("10" + "4" = "%string%"%\$floatSub%  "%operand1%" "%operand2%" result%\$float2str% "%result%" stringecho("10" - "4" = "%string%"%\$floatMul%  "%operand1%" "%operand2%" result%\$float2str% "%result%" stringecho("10" * "4" = "%string%"endlocal`` If you want to read the source (more easily), this "toSource.bat" may help: Code: Select all ``@echo offsetlocal enableExtensions disableDelayedExpansioncall loadFloat.bat2>nul md "macros"for %%a in (str2float float2str floatAdd floatSub floatMul intToHex) do (   (      set "firstLine=true"      for /F "tokens=1* delims=:" %%b in ('set \$%%~a ^| findstr /N "^"') do (         if defined firstLine (            set "firstLine="            for /F "tokens=1* delims==" %%d in ("%%c") do (               set line=%%~e               echo(            )         ) else (            set line=%%~c         )         setlocal enableExtensions enableDelayedExpansion            set "line=!line:%%=%%%%!"            echo(!line!         endlocal      )   ) > "macros\%%~a.txt")endlocal`` This "floaty.bat" contains the test cases (exceeded the maximum number of allowed characters: 60000): Code: Select all ``@echo offsetlocal enableExtensions  disableDelayedExpansioncall loadFloat.batif errorLevel 1 (set error=true)if defined error exit /b 1call :floatTest ".e                "call :floatTest ".e3               "call :floatTest ".2e               "call :floatTest "1.e               "call :floatTest "+.e               "call :floatTest "+1.e              "call :floatTest "-.e               "call :floatTest "-1.e              "call :floatTest "NaN               "call :floatTest "+NaN              "call :floatTest "-NaN              "call :floatTest "+NaN(7FFFFFFF)    "call :floatTest "-NaN(7FFFFFFF)    "call :floatTest "+NaN(FFFFFFFF)    "call :floatTest "-NaN(FFFFFFFF)    "call :floatTest "+NaN(FF83FFFF)    "call :floatTest "-NaN(FF83FFFF)    "call :floatTest "+NaN(FF83FFFF)    "call :floatTest "-NaN(FF83FFFF)    "call :floatTest "inf               "call :floatTest "+inf              "call :floatTest "-inf              "call :floatTest "0.0               "call :floatTest "-0.0              "call :floatTest "0x01234567        "call :floatTest "+0x01234567       "call :floatTest "-0x01234567       "call :floatTest "1000.0            "call :floatTest "1000.00006        "call :floatTest "0.000001          "call :floatTest "1.4e-45           "call :floatTest "4.2E-45           "call :floatTest "1.1754945E-38     "call :floatTest "5.877472E-39      "call :floatTest "12.375            "call :floatTest "0.0001            "call :floatTest "0.001             "call :floatTest "0.01              "call :floatTest "0.1               "call :floatTest "1                 "call :floatTest "10                "call :floatTest "100               "call :floatTest "1000              "call :floatTest "10000             "call :floatTest "100000            "call :floatTest "1000000           "call :floatTest "10000000          "call :floatTest "68.123            "call :floatTest "1.17549434E-38    "call :floatTest "5.877472E-39      "call :floatTest "-1.0e-6           "call :floatTest "1.763241500000E-38"call :floatTest "1.14794E-41       "call :floatTest "1.4E-45           "call :floatTest "1.0e10            "call :floatTest "+1.0e+10          "call :floatTest "- 1.0 e -10       "echo(call :floatTest Add "45.0000" "-45.3000"call :floatTest Add "100" "0.006"call :floatTest Add "1.4E-45" "1.1754942E-38"call :floatTest Add "1.4E-45" "1.4E-45"call :floatTest Add "1" "2"echo(call :floatTest Sub "100" "0.006"call :floatTest Sub "1.4E-45" "1.1754942E-38"call :floatTest Sub "1.4E-45" "1.4E-45"call :floatTest Sub "1" "2"echo(call :floatTest Mul "100" "0.1"call :floatTest Mul "100" "0.05"call :floatTest Mul "100" "0.005"call :floatTest Mul "1.4E-45" "1"call :floatTest Mul "2.8E-45" "0.5"endlocalendlocalgoto :eof:floatTest (overloaded)::::   one arguments version: converts the string to a float and back, displaying the results::   %~1 float string::::   three arguments version: performs operand1 operator operand2, displays the result in hex/string::   %~1 float operator in { "add", "sub", "mul" }  (other operators are ignored)::   %~2 float string operand2::   %~3 float string operand1::   setlocal enableDelayedExpansion   set "op=%~1"   set "A=%~2"   set "B=%~3"   if %2. == . (      for %%a in ("float", "hex", "string") do set "%%~a="      %\$str2float% "%~1%"    float      %\$intToHex%  "!float!" hex      %\$float2str% "!float!" string      echo(!hex! ^<-- "%~1" --^> "!string!"   ) else (      for %%a in ("op", "value1", "value2", "float1", "float2", "float3", "hex1", "hex2", "hex3", "string1") do set "%%~a="      set "op[add]=+"      set "op[sub]=-"      set "op[mul]=*"      set "op=!op[%~1]!"      set "value1=%~2"      set "value2=%~3"      %\$str2float% "!value1!" "float1"      %\$str2float% "!value2!" "float2"      if        /I "%~1" == "add" (         %\$floatAdd% "!float1!" "!float2!" "float3"      ) else if /I "%~1" == "sub" (         %\$floatSub% "!float1!" "!float2!" "float3"      ) else if /I "%~1" == "mul" (         %\$floatMul% "!float1!" "!float2!" "float3"      ) else (         endlocal         goto :eof      )      %\$intToHex% "!float1!" "hex1"      %\$intToHex% "!float2!" "hex2"      %\$intToHex% "!float3!" "hex3"      %\$float2str% "!float3!" "string1"      echo !value1! !op! !value2! = !float1! !op! !float2! == !hex1! !op! !hex2! == !hex3! == !float3! == !string1!   )   endlocal   goto :eof`` penpen einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition Hi penpen, very nice work but the macro version is slower... This example for execute the code about 3-5X faster. Code: Select all ``@echo offsetlocal enableExtensions:: load all macros, and exit if it has failed for whatever reasonscall loadfloat.cmdif errorLevel 1 exit /b 1:: use the macros (names are similar to the function names)for %%a in (operand1 operand2 result string) do set "%%~a="(setlocal EnableDelayedExpansion   set \$str2float=   set \$floatAdd=   set \$float2str=   set \$floatSub=   set \$floatMul=   set \$intToHex=   rem set |more   for /F "eol== delims==" %%f in ('set') do set "%%f="   >t0.\$\$\$.tmp echo !time!   for /L %%N in (1,1,100) do (      %\$str2float% "10" operand1      %\$str2float% "4"  operand2      %\$floatAdd%  "%operand1%" "%operand2%" result      %\$float2str% "%result%" string      rem echo("10" + "4" = "%string%"      %\$floatSub%  "%operand1%" "%operand2%" result      %\$float2str% "%result%" string      rem echo("10" - "4" = "%string%"      %\$floatMul%  "%operand1%" "%operand2%" result      %\$float2str% "%result%" string      rem echo("10" * "4" = "%string%"   )endlocal)<t0.\$\$\$.tmp set /p "t0="for /F "tokens=1-8 delims=:.," %%a in ("%t0: =0%:%time: =0%") do set /a "a=(((1%%e-1%%a)*60)+1%%f-1%%b)*6000+1%%g%%h-1%%c%%d, a+=(a>>31) & 8640000"echo elapsed cs : %a%del t0.\$\$\$.tmpendlocal`` And for DIVISION why (for the moment) not implement Newton's Method for finding the reciprocal of a floating point number for division? - http://en.wikipedia.org/wiki/Fast_inverse_square_root Fast inverse square root the square of this is the reciprocal! - http://homepage.cs.uiowa.edu/~jones/bcd/divide.html Reciprocal Multiplication, a tutorial einstein1969 Last edited by einstein1969 on 20 Aug 2014 16:25, edited 1 time in total. einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition foxidrive wrote:It doesn't work as it is missing code... Hi foxidrive, With the new code i have rewritten the plasma with new gradient. Code: Select all ``@echo off& setlocal EnableDelayedExpansion&Goto :Init_System:Main  :: load all macros, and exit if it has failed for whatever reasons  call loadfloat.cmd  if errorLevel 1 exit /b 1  call :create_palette  set /a e=Lenp/2  for /L %%y in (-30,1,30) do (    %\$str2float% "%%y" fy    :: newy=fy/8                                1/4=0x3E800000  1/8=0x3E000000    rem call :floattestMul2 "1" "0.25" newy    %\$floatMul% "!fy!" "0x3E800000" newy    %\$float2str% "!newy!" newy    call :sin2 "!newy!" siny    %\$str2float% "!siny!" fy    %\$str2float% "!e!" fe    %\$floatMul% "!fy!" "!fe!" y1    %\$float2str% "!y1!" y1    :: get integer part    set app1=!y1:*e-=!    if not "!y1!"=="!app1!" (set app=0) else (        set app=!y1:*.=!        for %%a in (!app!) do set app=!y1:.%%a=!      )    if "!app!"=="." set app=0    set /a iy=e+!app!    for /L %%x in (-60,1,60) do (set t0=!time!      %\$str2float% "%%x" "fx"      %\$floatMul% "!fx!" "0x3E800000" newx      %\$float2str% "!newx!" "newx"set t1=!time!      call :sin2 "!newx!" sinxset t2=!time!      %\$str2float% "!sinx!" fx      %\$str2float% "!e!" fe      %\$floatMul% "!fx!" "!fe!" x1      %\$float2str% "!x1!" x1set t3=!time!      :: get integer part      set app1=!x1:*e-=!      if not "!x1!"=="!app1!" (set app=0) else (        set app=!x1:*.=!        for %%a in (!app!) do set app=!x1:.%%a=!      )      if "!app!"=="." set app=0      set /a ix=e+!app!       set /a "c=(ix+iy)/2"      call :plot !c!    )   echo(  )Goto :EndMain:sin2 %1=x radiants   set x=%~1   if "%x:~0,1%"=="-" (     set r=-1     set x=!x:~1!   ) else (     set r=1   )   rem calculate SIN(x) ~ x * ( 1 - x^2 * (1/6 - x^2 * (1/120 - x^2 * (1/5040 - x^2 * (1/362880 - x^2 * 1/39916800 )))))   %\$str2float% "%x%" "fx":sin2_PI   :: 0x40490FDB=3.14159265....   %\$floatSub% "%fx%" "0x40490FDB" "tx"   if !tx! gtr 0 (set /A fx=tx, r=-r) else goto :sin2_cont   goto :sin2_PI:sin2_cont   %\$floatMul% "%fx%"       "%fx%"       "fxx"   %\$floatMul% "%fxx%"      "0x32D7322B" "fsinp"   %\$floatSub% "0x3638EF1D" "%fsinp%"    "fsinp2"   %\$floatMul% "%fxx%"      "%fsinp2%"   "fsinp3"   %\$floatSub% "0x39500D01" "%fsinp3%"   "fsinp4"   %\$floatMul% "%fxx%"      "%fsinp4%"   "fsinp5"   %\$floatSub% "0x3C088889" "%fsinp5%"   "fsinp6"   %\$floatMul% "%fxx%"      "%fsinp6%"   "fsinp7"   %\$floatSub% "0x3E2AAAAB" "%fsinp7%"   "fsinp8"   %\$floatMul% "%fxx%"      "%fsinp8%"   "fsinp9"   %\$floatSub% "0x3F800000" "%fsinp9%"   "fsinp10"   %\$floatMul% "%fx%"       "%fsinp10%"  "fsin"   if !r! lss 0 set /A "fsin=(1<<31)^fsin"   %\$float2str% "%fsin%" "sin"   set "%~2=%sin%"goto :eof:plot %1 call :color !p[%1]:~0,2! !p[%1]:~-1!goto :eof::manual palette, best color add,  rif. http://en.wikipedia.org/wiki/Web_colorsremrem 1 -> 2 3 4 5 6 9rem 2 -> 1 3 4 5 6 Arem 3 -> 1 2 4 5 6 9 A Brem 4 -> 1 2 3 5 6 Crem 5 -> 1 2 3 4 6 9 Drem 6 -> Erem 9 -> 1 3 5rem A -> 2 3 6rem B -> 3rem C -> 4 5 6rem D -> 5rem E -> 6:create_palette %1  set p=0  rem For %%p in (04 4C cE EA A2 21 15 50) do (  For %%p in (04 4C c5 53 39 91 15 50) do (      set "p[!p!]=%%p°" & set /a p+=1    set "p[!p!]=%%p±" & set /a p+=1    set "p[!p!]=%%p²" & set /a p+=1    set "p[!p!]=%%pÛ" & set /a p+=1  )  set /a p-=1  set Lenp=!p!goto :eofGoto :EndMain:: ( Begin Color Function:color    (echo %~2\..\'    ) > \$\$\$.color.txt && findstr /a:%~1 /f:\$\$\$.color.txt "."    Shift    Shift    If ""=="%~1" Goto :Eof   goto :color:: ) End color Fuction:Init_system  for /F "delims==" %%f in ('set') do if /i not "%%f"=="Path" set "%%f="  for /F "tokens=1,2 delims=#" %%a in ('"prompt #\$H#\$E# & echo on & for %%b in (1) do rem"') do (  set "DEL=%%a")    <nul set /p ".=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%" > "'"Goto :Main:EndMain  :: Clearing all garbage  del 'Goto :Eof`` It's slower than precedent, but it's possible use the trick of "empty the environment" and the trick of "while in a for loop" for achieve a 3-5X faster execute. EDIT: this is little optimized code which show how to maintain the env empty even with a call at subroutine. Code: Select all ``@echo off& setlocal EnableDelayedExpansion&Goto :Init_System:Main  :: load all macros, and exit if it has failed for whatever reasons  call loadfloat.cmd  if errorLevel 1 exit /b 1  call :create_palette  set /a e=Lenp/2  for /L %%y in (-16,1,16) do (    %\$str2float% "%%y" fy    :: newy=fy/8                                1/4=0x3E800000  1/8=0x3E000000    rem call :floattestMul2 "1" "0.25" newy    %\$floatMul% "!fy!" "0x3E800000" newy    %\$float2str% "!newy!" newy    call :sin2 "!newy!" siny    %\$str2float% "!siny!" fy    %\$str2float% "!e!" fe    %\$floatMul% "!fy!" "!fe!" y1    %\$float2str% "!y1!" y1    :: get integer part    set app=!y1:*e-=!    if not "!y1!"=="!app!" (set app=0) else (        set app=!y1:*.=!        for %%a in (!app!) do set app=!y1:.%%a=!      )    if "!app!"=="." set app=0    set /a iy=e+!app!    set app=    for /L %%x in (-16,1,16) do (      %\$str2float% "%%x" "fx"      %\$floatMul% "!fx!" "0x3E800000" newx      %\$float2str% "!newx!" "newx"      call :sin2 "!newx!" sinx      %\$str2float% "!sinx!" fx      %\$str2float% "!e!" fe      %\$floatMul% "!fx!" "!fe!" x1      %\$float2str% "!x1!" x1      :: get integer part      set app=!x1:*e-=!      if not "!x1!"=="!app!" (set app=0) else (        set app=!x1:*.=!        for %%a in (!app!) do set app=!x1:.%%a=!      )      if "!app!"=="." set app=0      set /a ix=e+!app!      set app=       set /a "c=(ix+iy)/2"      call :plot !c!    )   echo(  )Goto :EndMainrem calculate SIN(x) ~ x * ( 1 - x^2 * (1/6 - x^2 * (1/120 - x^2 * (1/5040 - x^2 * (1/362880 - x^2 * 1/39916800 ))))):sin2 %1=x radiants   call loadfloat.cmd(   set \$str2float=   set \$floatAdd=   set \$float2str=   set \$floatSub=   set \$floatMul=   set \$intToHex=   rem set & pause   set x=%~1   if "!x:~0,1!"=="-" (     set r=-1     set x=!x:~1!   ) else (     set r=1   )   %\$str2float% "!x!" "fx"   :: PI=3.14159265....=0x40490FDB   set break=   for /L %%I in (1,1,10) do if not defined break (      %\$floatSub% "!fx!" "0x40490FDB" tx      if !tx! gtr 0 (set /A fx=tx, r=-r) else set break=true   )   set break=   %\$floatMul% "!fx!"       "!fx!"       fxx   %\$floatMul% "!fxx!"      "0x32D7322B" fsint   %\$floatSub% "0x3638EF1D" "!fsint!"    fsint   %\$floatMul% "!fxx!"      "!fsint!"    fsint   %\$floatSub% "0x39500D01" "!fsint!"    fsint   %\$floatMul% "!fxx!"      "!fsint!"    fsint   %\$floatSub% "0x3C088889" "!fsint!"    fsint   %\$floatMul% "!fxx!"      "!fsint!"    fsint   %\$floatSub% "0x3E2AAAAB" "!fsint!"    fsint   %\$floatMul% "!fxx!"      "!fsint!"    fsint   %\$floatSub% "0x3F800000" "!fsint!"    fsint   %\$floatMul% "!fx!"       "!fsint!"    fsin   set fsint=   set fx=   set fxx=   if !r! lss 0 set /A "fsin=(1<<31)^fsin"   %\$float2str% "!fsin!" sin   set "%~2=!sin!"   set fsin=   set sin=goto :eof ):plot %1 call :color !p[%1]:~0,2! !p[%1]:~-1!goto :eof::manual palette, best transient color,  rif.http://en.wikipedia.org/wiki/Web_colorsremrem 1 -> 2 3 4 5 6 9rem 2 -> 1 3 4 5 6 Arem 3 -> 1 2 4 5 6 9 A Brem 4 -> 1 2 3 5 6 Crem 5 -> 1 2 3 4 6 9 Drem 6 -> Erem 9 -> 1 3 5rem A -> 2 3 6rem B -> 3rem C -> 4 5 6rem D -> 5rem E -> 6:create_palette %1  set p=0  rem For %%p in (04 4C cE EA A2 21 15 50) do (  For %%p in (04 4C c5 53 39 91 15 50) do (      set "p[!p!]=%%p°" & set /a p+=1    set "p[!p!]=%%p±" & set /a p+=1    set "p[!p!]=%%p²" & set /a p+=1    set "p[!p!]=%%pÛ" & set /a p+=1  )  set /a p-=1  set Lenp=!p!goto :eofGoto :EndMain:: ( Begin Color Function:color    (echo %~2\..\'    ) > \$\$\$.color.txt && findstr /a:%~1 /f:\$\$\$.color.txt "."    Shift    Shift    If ""=="%~1" Goto :Eof   goto :color:: ) End color Fuction:Init_system  for /F "delims==" %%f in ('set') do if /i not "%%f"=="Path" set "%%f="  for /F "tokens=1,2 delims=#" %%a in ('"prompt #\$H#\$E# & echo on & for %%b in (1) do rem"') do (  set "DEL=%%a")    <nul set /p ".=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%" > "'"Goto :Main:EndMain  :: Clearing all garbage  del 'Goto :Eof`` EDIT: I have added code optimized for performance. einstein1969 foxidrive Expert Posts: 6031 Joined: 10 Feb 2012 02:20 ### Re: (nearly) ieee 754 floating point single precisition einstein1969 wrote: foxidrive wrote:It doesn't work as it is missing code... Hi foxidrive, With the new code i have rewritten the plasma with new gradient. einstein1969 It doesn't work here - generates an error and aborts. einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition Can you try the last version? I have written in the other thread. It's simple to debug. Post output in the other thread. thanks! einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition Hi penpen, After a long time I'm studying this project of yours. I imagine you've forgotten a bit how it works by now. But if you want to help me understand it at least a little, I will be truly grateful. I'm starting to study how what you did works, also getting help from what I find on the web. But there's so much stuff I'm missing. Then you have to consider that I don't have strong understanding skills and therefore it takes me a very long time to understand. First of all I'm studying the function that takes a string and transforms it into ieee754 using 32bit. The "str2float" I still don't know how the complex operation is accomplished. I'm trying to create a simpler one just to understand how it works. I have decided for the moment to neglect the whole part that deals with the inf, nan, hex values. I took the comments you put in the procedure, to understand the steps. But I have a lot of difficulty. • divide into parts: sPart * iPart.fPart * 10^^ePart I understood this part. • set sign flag(s) I understood this part. • detect NaN, inf and hex format I skipped this part for now. • normalize to: sPart * 0.significand * 10^ePart, 0.significand >= 0.1 AND detect 0.0 I'm having trouble with this part. first of all what do you mean here: "0.significand >= 0.1"? this is the code that studing at moment: Code: Select all `````` ) else ( for /F "tokens=* delims= " %%a in ("!iPart:0= !") do @set "iPartP=%%~a" for /F "tokens=* delims= " %%a in ("!fPart:0= !") do @set "fPartP=%%~a" if "!iPartP!!fPartP!" == "" ( >nul set /A "float=s" ) else ( if defined iPartP ( set "iPartP=!iPartP: =0!" set "fPartP=!fPart!" set "string= !iPartP!" set "op=+" ) else if defined fPartP ( set "fPartP=!fPartP: =0!" for %%a in (!fPartP!) do @set "string= !fPart:%%a=!" set "op=-" ) for %%a in (4096,2048,1024,512,256,128,64,32,16,8,4,2,1) do @if not "!string:~%%a,1!" == "" ( set "string=!string:~%%a!" >nul set /A "ePart!op!=%%a" ) set "significand=!iPartP!!fPartP!" set "iPartP=" set "fPartP=" `````` here I understand that you have to calculate the number of digits to move the decimal point. And then you add them or subtract them from the exponent. And then join the integer part and the fractional part together. Did I get it right? if the number is "10.3" , significand=103 and ePart=2 ? if the number is "99.3", significand=993 and ePart=2 ? if the number is "0.03", significand=3 and ePart=-1 ? Last edited by einstein1969 on 23 May 2024 06:53, edited 1 time in total. einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition This is the very simplified version I'm working on: Code: Select all ``````:str2float_very_simple string var_float set "string=%~1" set "string= !string: =!" rem for now I only consider numbers without epart set "ePart=0" set "fPart=!string:*.=!" if "!string!" == "!fPart!" ( set "fPart=0" ) else for %%a in ("!fPart!") do @set "string=!string:.%%~a=!" set "sPart=" if "!string:~1,1!" == "-" ( set "iPart=!string:~2!" set "sPart=-" ) else if "!string:~1,1!" == "+" ( set "iPart=!string:~2!" ) else set "iPart=!string:~1!" rem echo string=%1 s=!spart! i=!ipart! f=!fpart! if defined sPart ( set /A "s=1<<31" ) else ( set "s=0" ) rem echo string=%1 s=!spart![!s!] i=!ipart! f=!fpart! :: normalize to: sPart * 0.significand * 10^ePart, 0.significand >= 0.1 :: AND :: detect 0.0 set "float=" for /F "tokens=* delims= " %%a in ("!iPart:0= !") do set "iPartP=%%~a" for /F "tokens=* delims= " %%a in ("!fPart:0= !") do set "fPartP=%%~a" echo string=%1 s=!spart![!s!] i=!ipart! f=!fpart! iPartP=[!iPartP!] fPartP=[!fPartP!] ePart=!ePart! if "!iPartP!!fPartP!" == "" ( >nul set /A "float=s" ) else ( if defined iPartP ( set "iPartP=!iPartP: =0!" set "fPartP=!fPart!" set "string= !iPartP!" set "op=+" ) else if defined fPartP ( set "fPartP=!fPartP: =0!" for %%a in (!fPartP!) do set "string= !fPart:%%a=!" set "op=-" ) for %%a in (4096,2048,1024,512,256,128,64,32,16,8,4,2,1) do if not "!string:~%%a,1!" == "" ( set "string=!string:~%%a!" >nul set /A "ePart!op!=%%a" ) echo string=%1 s=!spart![!s!] i=!ipart! f=!fpart! iPartP=[!iPartP!] fPartP=[!fPartP!] ePart=!ePart! set "significand=!iPartP!!fPartP!" set "iPartP=" set "fPartP=" echo string=%1 s=!spart![!s!] i=!ipart! f=!fpart! significand=!significand! ePart=!ePart! ) goto :eof `````` penpen Expert Posts: 2009 Joined: 23 Jun 2013 06:15 Location: Germany ### Re: (nearly) ieee 754 floating point single precisition Yes, you got it right so far. If i remember right, then the basic idea is to start with a number string in scientific notation, transform that into a decimal floating point representation with exponent to base ten (sign, decimal number, exponent to base 10), transform that into a decimal floating point representation with exponent to base two (sign, decimal number, exponent to base 2) and normalize that value such that 1 <= decimal number (d) < 2, so that we can apply the following algorithm (in c-like notation and ignoring rounding here) to calculate the binary number representation (f): Code: Select all ``````// The following is kinda like f := floor(d * 2^24): f = 0; for (int i = 0; i <= 24; ++i) { if (d >= 1) { f = 2 * (f+1); d = 2 * (d-1); } else { f = 2 * f; d = 2 * d; } } `````` Since batch is limited, i added some extra steps (to ensure beeing in a defined state) and used an unusual high-low number representation, which makes the code harder to read. penpen einstein1969 Expert Posts: 947 Joined: 15 Jun 2012 13:16 Location: Italy, Rome ### Re: (nearly) ieee 754 floating point single precisition Thanks a lot. Yes, in fact, the code I am reading is very difficult and it will take me a long time. You can give me an example with a "number" because it's not yet clear to me: "If i Remember Right, then the basic idea is to start with a number string in scientific notation" Example ..... "Transform that into a decimal floating point represement with exponent to base ten (sign, decimal number, exponent to base 10)" Example ..... Transform that into a decimal floating point represement with exponent to base Two (sign, decimal number, exponent to base 2) Example ..... Then this part how to do it? "normalize that value such That 1 <= decimal number (D) <2" Example ..... penpen Expert Posts: 2009 Joined: 23 Jun 2013 06:15 Location: Germany ### Re: (nearly) ieee 754 floating point single precisition Then this part how to do it? "normalize that value such That 1 <= decimal number (d) <2" Example ..... After (finally) looking at the code, I would say (in case i didn't msiread my code), that i used a strlength algorithm on d, to shift the first non 0 digit at the first place of after the decimal seperator, such that 0.1 < d < 1. Then I shift d left by one decimal digit, such that 1 <= d < 10. Then if needed, I divide d by 2 until 1 <= d < 2. Here is a short example: Code: Select all ``````"-2469.1356E-9" = -2469.1356 * 10^-9 ; iPart=2469; fPart= 1356; ePart=-9 ; (strlen algorithm) = -0.24691356 * 10^-5 ; sPart=-; significand=24691356; ePart=-5 (normalized to 0.1 <= 0.24691356 < 1, in order to avoid case disctinctions) = -0.24691356000000000 * 10^-5 ; sPart=-; significand=24691356000000000; ePart=-5 (extend to 17 digits; more wouldn't be noticed anyways) = -2.4691356000000000 * 10^-6 ; sPart=-; high=246913560; low=00000000; ePart=-6 (high: 9 digits, low part 8 digits) = -2.4691356000000000 * 2^-6 * 5^-6 ; sPart=-; high=246913560; low=00000000; e_2=-6; ePart=-6 ; divide h.ighlow by 2 (updating the e_2 value) until 1 <= h.ighlow < 2 = -1.2345678000000000 * 2^-5 * 5^-6 ; sPart=-; high=123456780; low=00000000; e_2=-5; ePart=-6 = -0.12345678000000000 * 2^-4 * 5^-5 = -1.9753084800000000 * 2^-8 * 5^-5 ; sPart=-; high=197530848; low=00000000; e_2 =-8; ePart=-5 = ... = -1.2945381654528000 * 2^-19 * 5^0 ; sPart=-; high=129453816; low=54528000; e_2=-19 ==> s = 1 and e = 127-19 = 108 = 1101100_2 and f = floor(1.2945381654528000 * 2^24) = 21718746 = 101001011011001101101101_2 e != 255 ==> normalized number ==> ieee_value = [s (1 bit), e (8 bit), f without leading 1 (23 bit)] = [1, 01101100, 01001011011001101101101]_2 = 10110101101001011011001101101101_2 = -1239043219 `````` Sidenote: If the number were denormalized, then no bit is removed (= the highest 23 bits are used to encode the ieee_value). penpen
13,163
35,406
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.546875
3
CC-MAIN-2024-26
latest
en
0.256826
https://lessonplanet.com/search?keyterm_ids%5B%5D=25482
1,600,971,805,000,000,000
text/html
crawl-data/CC-MAIN-2020-40/segments/1600400219691.59/warc/CC-MAIN-20200924163714-20200924193714-00633.warc.gz
469,846,423
27,465
### We found 115 resources with the keyterm negative numbers Videos (Over 2 Million Educational Videos Available) 6:54 How to paint a watercolor and ink flower... 11:22 Prepositional Phrases for Kids | English... 4:18 Thomas Jefferson - Author of The... Other Resource Types ( 115 ) 9:16 Lesson Planet For Students 7th - 9th Guiding viewers through adding and subtracting numbers, this video includes many tips to help new learners internalize the concept of a number line. It clarifies the relationship between positive and negative numbers, including the... 7:36 Lesson Planet #### SAT Prep: Test 1 Section 9 Part 4 For Students 9th - 12th Sal tackles problems 12-14 of the practice SAT, which deal with linear equations (with negative numbers and radicals). Demonstrating more than one way to solve the problems, Sal takes care to note the most efficient ways to still arrive... 1 In 1 Collection 4:47 Lesson Planet #### Place Fractions on a Number Line For Students 3rd Standards Can you put a fraction on a number line? You can! As learners will find out, they can break a number line into equal parts just like they can with a block or pie. With an example problem and clear explicit instruction, they'll be guided... Lesson Planet #### Operations on the Number Line For Teachers 7th - 9th Standards A different way to look at integers is on this number line with variables in place of numbers. Learners are to look at different expressions and describe why they think the answer would be positive or negative, depending on the location... Lesson Planet #### Comparing Temperatures For Teachers 5th - 7th Standards Which is colder -12 or -18? Temperature is natural real-world application of ordering rational numbers. It's also fun to talk about the lowest recorded temperature on Earth. Take the time to discuss this inquiry with your class. 7:11 Lesson Planet #### Rectangular Coordinate System For Teachers 4th - 6th Everything you need to understand the rectangular coordinate system is explained in this easy to follow video. Great for elementary to middle schoolers learning about plotting points, graphing, and locating points on a coordinate grid.... 4:30 Lesson Planet #### What are Positive and Negative Numbers? For Teachers 5th - 8th Is zero positive or is it negative? Are all positive numbers to the right of zero on the number line? Are all negative numbers to the left of zero on the number line? Are all positive numbers greater than zero? Are all negative numbers... Lesson Planet #### Three Number Sequences Worksheets For Students 4th - 6th Test your students' number line skills with these sequences, which they must finish and then indicate if they are ascending or descending. Numbers range from negative numbers to decimals. This activity would be a great teaching tool for... Lesson Planet #### The True Value of Sweets For Teachers 5th Measure your pupil's learning in a lesson designed to explore decimals by weighing different candies on a scale and recording the weight. Small groups then compare and order the decimal weights on a number line to show their... 4:40 Lesson Planet #### Understand the Relationship Between Two Numbers Using the Number Line For Students 5th - 7th Standards Take a tour of the number line and show your learners the relationship between positive and negative numbers. Lesson identifies different numbers on the line and explains why one is bigger. The first video in a four-part series, shows... Lesson Planet #### Solving Linear Equations For Students 8th - 12th In this linear equations learning exercise, students solve linear equations for the variables with negatives and fractions. Students complete 28 problems. 1:35 Lesson Planet #### How Do You Add Two Negative Numbers? For Teachers 6th - 12th A very simple explanation of adding two negative numbers together. Well, it's a mathematical explanation that includes moving the negative and using absolute value. Just watch the instructor as she shows you the steps and it will make... 9:36 Lesson Planet #### Negative Numbers Introduction For Students 7th - 9th Sal tackles pre-algebra in this series of videos, starting with the concept of negative numbers. Using a number line, he takes the viewer through different practical examples of negative numbers, such as temperature and bank accounts.... 6:15 Lesson Planet #### How Do You Solve a Decimal Inequality Using Division with Negative Numbers? For Teachers 6th - 12th If your class is studying inequalities, consider this video. The focus is on solving a decimal inequality that has negative numbers in it. A lecturer works through an example problem, commenting on the steps and properties necessary to... 2:18 Lesson Planet #### What's Another Definition for an Integer? For Teachers 6th - 12th Break down integers with this video. A teacher gives a basic definition and provides several examples of integers. The examples cover numbers that are integers as well as numbers that are not integers. A concise video, this resource... 5:27 Lesson Planet #### How Do You Add Two Negative Numbers? For Teachers 5th - 8th A very simple explanation of adding two negative numbers together. Well, it's a mathematical explanation that includes moving the negative and using absolute value. Just watch the instructor as she shows you the steps and it will make... Lesson Planet #### Mat 0024 Section 1.4: Signed Numbers and Decimals For Students 7th - 10th This activity has a little of everything. Compare fractions, determine if numbers are less than, greater than, or equal to. Then practice lining up the decimals to add and subtract decimal numbers. Then multiply decimals remembering to... Lesson Planet #### Accentuate the Negative For Teachers K - 8th Students explore negative numbers, In this accentuate the negative lesson, students manipulate calculators to demonstrate negative numbers.  Activities are differentiated for K-2, 3-5, and 4-8 grade levels to ensure that they are... Lesson Planet #### Negative Numbers Practice Sheet For Students 4th - 5th Fourth and Fifth graders should benefit from this negative and positive number addition worksheet. There are 90 problems to solve; each has a negative number plus a positive number. There are also a few subtraction problems sprinkled in... 2:25 Lesson Planet #### How Do You Use Division With Negative Numbers to Solve an Inequality Word Problem? For Teachers 6th - 9th A word problem that needs to be written as an inequality to solve. This expression seems pretty straightforward and only takes one step to solve. But wait, the division property was used with a negative number so the inequality sign has... Lesson Planet #### Evaluating Expressions with Integers For Students 6th - 7th In this algebra worksheet, students answer 4 fill in the blank questions where they evaluate expressions with a missing variables that are integers. Then students answer 1 fill in the blank question where they evaluate an expression... Lesson Planet #### Square Roots For Students 9th In this square roots instructional activity, 9th graders solve 10 different problems that include simplifying with negative numbers. First, they identify the negative number in each equation and pull out from under the radical sign as i.... 0:02 Lesson Planet #### How Do You Add a Negative Number to a Positive Number? For Teachers 6th - 12th Combine a negative number with a positive number. How? Follow along and see the instructor explain what to do. 2:35 Lesson Planet #### How Do You Use Multiplication with Negative Numbers to Solve an Inequality Word Problem? For Teachers 6th - 9th Solve this real world word problem in just one written step. The original inequality is a division problem, so to solve it, use the multiplication property of inequality. Was the problem solved by multiplying a negative number? Yes! So...
1,686
7,888
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.5625
4
CC-MAIN-2020-40
latest
en
0.905117
https://oneclass.com/class-notes/ca/u-of-s/math/math-125-scott.en.html
1,596,667,492,000,000,000
text/html
crawl-data/CC-MAIN-2020-34/segments/1596439735989.10/warc/CC-MAIN-20200805212258-20200806002258-00316.warc.gz
451,038,573
27,798
Class Notes for Scott U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 27: Transformation Matrix, Linear Map, Row And Column Vectors OC16793959 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture 8: Lecture 8.PDF OC16793959 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 6: Cartesian Coordinate System, Orthogonality, Dot Product OC16793959 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 14: Augmented Matrix, Global Positioning System, Linear Combination OC16793959 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 14: Augmented Matrix, Global Positioning System, Linear Combination OC16793959 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 12: Row Echelon Form, Augmented Matrix, Free Variables And Bound Variables OC167939510 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 24: Elementary Matrix, Row Echelon Form, Row And Column Spaces OC167939510 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 29: Identity Function, Linear Map, Identity Matrix OC167939510 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 31: Elementary Matrix, Triangular Matrix, Laplace Expansion OC167939510 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 13: Row Echelon Form, Free Variables And Bound Variables, Augmented Matrix OC16793958 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture 7: Lecture 7.PDF OC16793958 Page 19 Apr 2017 0 View Document U OF SMATH 125ScottFall MATH 125 Lecture Notes - Lecture 22: Ion, Row And Column Spaces, Augmented Matrix OC16793958 Page 19 Apr 2017 0 View Document Class Notes (1,100,000) CA (650,000) U of S (3,000) MATH (200) MATH 125 (100) Scott (30)
620
1,984
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.71875
3
CC-MAIN-2020-34
latest
en
0.484381
https://divisbyzero.com/tag/magic/
1,495,906,429,000,000,000
text/html
crawl-data/CC-MAIN-2017-22/segments/1495463608984.81/warc/CC-MAIN-20170527171852-20170527191852-00265.warc.gz
910,657,332
31,080
## Mathematical magic tricks for kids My six-year-old son loves the website ActivityTV.com, especially their science, origami, cooking, and magic videos. I watched a few of the magic how-to videos with him and was pleasantly surprised to see that some of them had a distinctly mathematical feel to them. For example: Jumping rubber bands: topological properties of circles and linked circles… ## A card trick that will probably amaze your friends (solution) Warning! Spoiler alert! This post contains the secret behind the card trick that I described in my last post. Read that post before reading this one. First the bad news: this card trick is not fool-proof; it is a probabilistic card trick. The good news is that in my experience, it has a high probability… ## A card trick that will probably amaze your friends Here’s a neat card trick that I learned a few years ago. I can’t remember where I read about it. If anyone knows the source of trick, please post it in the comments. [Update: I now know more about the origin of this trick. I’ll write more in my follow-up post.] Thoroughly shuffle an ordinary… ## Kindergarten Mathematics (part 2): a report Last week I wrote a blog post asking for suggestions for math to present to my son’s kindergarten class. My readers posted many great comments. Thank you all. Today was the big day,… and it was a great success! I began by talking about what I do. My son introduced me as a math teacher….
318
1,453
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.71875
3
CC-MAIN-2017-22
longest
en
0.959692
https://www.nag.co.uk/numeric/fl/nagdoc_fl26/html/f08/f08spf.html
1,544,889,098,000,000,000
text/html
crawl-data/CC-MAIN-2018-51/segments/1544376826892.78/warc/CC-MAIN-20181215152912-20181215174912-00626.warc.gz
957,716,044
8,284
F08 Chapter Contents F08 Chapter Introduction NAG Library Manual # NAG Library Routine DocumentF08SPF (ZHEGVX) Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details. ## 1  Purpose F08SPF (ZHEGVX) computes selected eigenvalues and, optionally, eigenvectors of a complex generalized Hermitian-definite eigenproblem, of the form $Az=λBz , ABz=λz or BAz=λz ,$ where $A$ and $B$ are Hermitian and $B$ is also positive definite. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. ## 2  Specification SUBROUTINE F08SPF ( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK, IWORK, JFAIL, INFO) INTEGER ITYPE, N, LDA, LDB, IL, IU, M, LDZ, LWORK, IWORK(5*N), JFAIL(*), INFO REAL (KIND=nag_wp) VL, VU, ABSTOL, W(N), RWORK(7*N) COMPLEX (KIND=nag_wp) A(LDA,*), B(LDB,*), Z(LDZ,*), WORK(max(1,LWORK)) CHARACTER(1) JOBZ, RANGE, UPLO The routine may be called by its LAPACK name zhegvx. ## 3  Description F08SPF (ZHEGVX) first performs a Cholesky factorization of the matrix $B$ as $B={U}^{\mathrm{H}}U$, when ${\mathbf{UPLO}}=\text{'U'}$ or $B=L{L}^{\mathrm{H}}$, when ${\mathbf{UPLO}}=\text{'L'}$. The generalized problem is then reduced to a standard symmetric eigenvalue problem $Cx=λx ,$ which is solved for the desired eigenvalues and eigenvectors; the eigenvectors are then backtransformed to give the eigenvectors of the original problem. For the problem $Az=\lambda Bz$, the eigenvectors are normalized so that the matrix of eigenvectors, $Z$, satisfies $ZH A Z = Λ and ZH B Z = I ,$ where $\Lambda$ is the diagonal matrix whose diagonal elements are the eigenvalues. For the problem $ABz=\lambda z$ we correspondingly have $Z-1 A Z-H = Λ and ZH B Z = I ,$ and for $BAz=\lambda z$ we have $ZH A Z = Λ and ZH B-1 Z = I .$ ## 4  References Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999) LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia http://www.netlib.org/lapack/lug Demmel J W and Kahan W (1990) Accurate singular values of bidiagonal matrices SIAM J. Sci. Statist. Comput. 11 873–912 Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore ## 5  Arguments 1:     $\mathrm{ITYPE}$ – INTEGERInput On entry: specifies the problem type to be solved. ${\mathbf{ITYPE}}=1$ $Az=\lambda Bz$. ${\mathbf{ITYPE}}=2$ $ABz=\lambda z$. ${\mathbf{ITYPE}}=3$ $BAz=\lambda z$. Constraint: ${\mathbf{ITYPE}}=1$, $2$ or $3$. 2:     $\mathrm{JOBZ}$ – CHARACTER(1)Input On entry: indicates whether eigenvectors are computed. ${\mathbf{JOBZ}}=\text{'N'}$ Only eigenvalues are computed. ${\mathbf{JOBZ}}=\text{'V'}$ Eigenvalues and eigenvectors are computed. Constraint: ${\mathbf{JOBZ}}=\text{'N'}$ or $\text{'V'}$. 3:     $\mathrm{RANGE}$ – CHARACTER(1)Input On entry: if ${\mathbf{RANGE}}=\text{'A'}$, all eigenvalues will be found. If ${\mathbf{RANGE}}=\text{'V'}$, all eigenvalues in the half-open interval $\left({\mathbf{VL}},{\mathbf{VU}}\right]$ will be found. If ${\mathbf{RANGE}}=\text{'I'}$, the ILth to IUth eigenvalues will be found. Constraint: ${\mathbf{RANGE}}=\text{'A'}$, $\text{'V'}$ or $\text{'I'}$. 4:     $\mathrm{UPLO}$ – CHARACTER(1)Input On entry: if ${\mathbf{UPLO}}=\text{'U'}$, the upper triangles of $A$ and $B$ are stored. If ${\mathbf{UPLO}}=\text{'L'}$, the lower triangles of $A$ and $B$ are stored. Constraint: ${\mathbf{UPLO}}=\text{'U'}$ or $\text{'L'}$. 5:     $\mathrm{N}$ – INTEGERInput On entry: $n$, the order of the matrices $A$ and $B$. Constraint: ${\mathbf{N}}\ge 0$. 6:     $\mathrm{A}\left({\mathbf{LDA}},*\right)$ – COMPLEX (KIND=nag_wp) arrayInput/Output Note: the second dimension of the array A must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$. On entry: the $n$ by $n$ Hermitian matrix $A$. • If ${\mathbf{UPLO}}=\text{'U'}$, the upper triangular part of $A$ must be stored and the elements of the array below the diagonal are not referenced. • If ${\mathbf{UPLO}}=\text{'L'}$, the lower triangular part of $A$ must be stored and the elements of the array above the diagonal are not referenced. On exit: the lower triangle (if ${\mathbf{UPLO}}=\text{'L'}$) or the upper triangle (if ${\mathbf{UPLO}}=\text{'U'}$) of A, including the diagonal, is overwritten. 7:     $\mathrm{LDA}$ – INTEGERInput On entry: the first dimension of the array A as declared in the (sub)program from which F08SPF (ZHEGVX) is called. Constraint: ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$. 8:     $\mathrm{B}\left({\mathbf{LDB}},*\right)$ – COMPLEX (KIND=nag_wp) arrayInput/Output Note: the second dimension of the array B must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$. On entry: the $n$ by $n$ Hermitian matrix $B$. • If ${\mathbf{UPLO}}=\text{'U'}$, the upper triangular part of $B$ must be stored and the elements of the array below the diagonal are not referenced. • If ${\mathbf{UPLO}}=\text{'L'}$, the lower triangular part of $B$ must be stored and the elements of the array above the diagonal are not referenced. On exit: the triangular factor $U$ or $L$ from the Cholesky factorization $B={U}^{\mathrm{H}}U$ or $B=L{L}^{\mathrm{H}}$. 9:     $\mathrm{LDB}$ – INTEGERInput On entry: the first dimension of the array B as declared in the (sub)program from which F08SPF (ZHEGVX) is called. Constraint: ${\mathbf{LDB}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$. 10:   $\mathrm{VL}$ – REAL (KIND=nag_wp)Input 11:   $\mathrm{VU}$ – REAL (KIND=nag_wp)Input On entry: if ${\mathbf{RANGE}}=\text{'V'}$, the lower and upper bounds of the interval to be searched for eigenvalues. If ${\mathbf{RANGE}}=\text{'A'}$ or $\text{'I'}$, VL and VU are not referenced. Constraint: if ${\mathbf{RANGE}}=\text{'V'}$, ${\mathbf{VL}}<{\mathbf{VU}}$. 12:   $\mathrm{IL}$ – INTEGERInput 13:   $\mathrm{IU}$ – INTEGERInput On entry: if ${\mathbf{RANGE}}=\text{'I'}$, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. If ${\mathbf{RANGE}}=\text{'A'}$ or $\text{'V'}$, IL and IU are not referenced. Constraints: • if ${\mathbf{RANGE}}=\text{'I'}$ and ${\mathbf{N}}=0$, ${\mathbf{IL}}=1$ and ${\mathbf{IU}}=0$; • if ${\mathbf{RANGE}}=\text{'I'}$ and ${\mathbf{N}}>0$, $1\le {\mathbf{IL}}\le {\mathbf{IU}}\le {\mathbf{N}}$. 14:   $\mathrm{ABSTOL}$ – REAL (KIND=nag_wp)Input On entry: the absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval $\left[a,b\right]$ of width less than or equal to $ABSTOL+ε maxa,b ,$ where $\epsilon$ is the machine precision. If ABSTOL is less than or equal to zero, then $\epsilon {‖T‖}_{1}$ will be used in its place, where $T$ is the tridiagonal matrix obtained by reducing $C$ to tridiagonal form. Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold , not zero. If this routine returns with ${\mathbf{INFO}}={\mathbf{1}} \text{to} {\mathbf{N}}$, indicating that some eigenvectors did not converge, try setting ABSTOL to . See Demmel and Kahan (1990). 15:   $\mathrm{M}$ – INTEGEROutput On exit: the total number of eigenvalues found. $0\le {\mathbf{M}}\le {\mathbf{N}}$. If ${\mathbf{RANGE}}=\text{'A'}$, ${\mathbf{M}}={\mathbf{N}}$. If ${\mathbf{RANGE}}=\text{'I'}$, ${\mathbf{M}}={\mathbf{IU}}-{\mathbf{IL}}+1$. 16:   $\mathrm{W}\left({\mathbf{N}}\right)$ – REAL (KIND=nag_wp) arrayOutput On exit: the first M elements contain the selected eigenvalues in ascending order. 17:   $\mathrm{Z}\left({\mathbf{LDZ}},*\right)$ – COMPLEX (KIND=nag_wp) arrayOutput Note: the second dimension of the array Z must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$ if ${\mathbf{JOBZ}}=\text{'V'}$, and at least $1$ otherwise. On exit: if ${\mathbf{JOBZ}}=\text{'V'}$, then • if ${\mathbf{INFO}}={\mathbf{0}}$, the first M columns of $Z$ contain the orthonormal eigenvectors of the matrix $A$ corresponding to the selected eigenvalues, with the $i$th column of $Z$ holding the eigenvector associated with ${\mathbf{W}}\left(i\right)$. The eigenvectors are normalized as follows: • if ${\mathbf{ITYPE}}=1$ or $2$, ${Z}^{\mathrm{H}}BZ=I$; • if ${\mathbf{ITYPE}}=3$, ${Z}^{\mathrm{H}}{B}^{-1}Z=I$; • if an eigenvector fails to converge (${\mathbf{INFO}}={\mathbf{1}} \text{to} {\mathbf{N}}$), then that column of $Z$ contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in JFAIL. If ${\mathbf{JOBZ}}=\text{'N'}$, Z is not referenced. Note:  you must ensure that at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$ columns are supplied in the array Z; if ${\mathbf{RANGE}}=\text{'V'}$, the exact value of M is not known in advance and an upper bound of at least N must be used. 18:   $\mathrm{LDZ}$ – INTEGERInput On entry: the first dimension of the array Z as declared in the (sub)program from which F08SPF (ZHEGVX) is called. Constraints: • if ${\mathbf{JOBZ}}=\text{'V'}$, ${\mathbf{LDZ}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$; • otherwise ${\mathbf{LDZ}}\ge 1$. 19:   $\mathrm{WORK}\left(\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{LWORK}}\right)\right)$ – COMPLEX (KIND=nag_wp) arrayWorkspace On exit: if ${\mathbf{INFO}}={\mathbf{0}}$, the real part of ${\mathbf{WORK}}\left(1\right)$ contains the minimum value of LWORK required for optimal performance. 20:   $\mathrm{LWORK}$ – INTEGERInput On entry: the dimension of the array WORK as declared in the (sub)program from which F08SPF (ZHEGVX) is called. If ${\mathbf{LWORK}}=-1$, a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued. Suggested value: for optimal performance, ${\mathbf{LWORK}}\ge \left(\mathit{nb}+1\right)×{\mathbf{N}}$, where $\mathit{nb}$ is the optimal block size for F08FSF (ZHETRD). Constraint: ${\mathbf{LWORK}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,2×{\mathbf{N}}\right)$. 21:   $\mathrm{RWORK}\left(7×{\mathbf{N}}\right)$ – REAL (KIND=nag_wp) arrayWorkspace 22:   $\mathrm{IWORK}\left(5×{\mathbf{N}}\right)$ – INTEGER arrayWorkspace 23:   $\mathrm{JFAIL}\left(*\right)$ – INTEGER arrayOutput Note: the dimension of the array JFAIL must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$. On exit: if ${\mathbf{JOBZ}}=\text{'V'}$, then • if ${\mathbf{INFO}}={\mathbf{0}}$, the first M elements of JFAIL are zero; • if ${\mathbf{INFO}}={\mathbf{1}} \text{to} {\mathbf{N}}$, JFAIL contains the indices of the eigenvectors that failed to converge. If ${\mathbf{JOBZ}}=\text{'N'}$, JFAIL is not referenced. 24:   $\mathrm{INFO}$ – INTEGEROutput On exit: ${\mathbf{INFO}}=0$ unless the routine detects an error (see Section 6). ## 6  Error Indicators and Warnings ${\mathbf{INFO}}<0$ If ${\mathbf{INFO}}=-i$, argument $i$ had an illegal value. An explanatory message is output, and execution of the program is terminated. ${\mathbf{INFO}}=1 \text{to} {\mathbf{N}}$ If ${\mathbf{INFO}}=i$, F08FPF (ZHEEVX) failed to converge; $i$ eigenvectors failed to converge. Their indices are stored in array JFAIL. ${\mathbf{INFO}}>{\mathbf{N}}$ F07FRF (ZPOTRF) returned an error code; i.e., if ${\mathbf{INFO}}={\mathbf{N}}+i$, for $1\le i\le {\mathbf{N}}$, then the leading minor of order $i$ of $B$ is not positive definite. The factorization of $B$ could not be completed and no eigenvalues or eigenvectors were computed. ## 7  Accuracy If $B$ is ill-conditioned with respect to inversion, then the error bounds for the computed eigenvalues and vectors may be large, although when the diagonal elements of $B$ differ widely in magnitude the eigenvalues and eigenvectors may be less sensitive than the condition of $B$ would suggest. See Section 4.10 of Anderson et al. (1999) for details of the error bounds. ## 8  Parallelism and Performance F08SPF (ZHEGVX) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library. F08SPF (ZHEGVX) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information. Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information. The total number of floating-point operations is proportional to ${n}^{3}$. The real analogue of this routine is F08SBF (DSYGVX). ## 10  Example This example finds the eigenvalues in the half-open interval $\left(-3,3\right]$, and corresponding eigenvectors, of the generalized Hermitian eigenproblem $Az=\lambda Bz$, where $A = -7.36i+0.00 0.77-0.43i -0.64-0.92i 3.01-6.97i 0.77+0.43i 3.49i+0.00 2.19+4.45i 1.90+3.73i -0.64+0.92i 2.19-4.45i 0.12i+0.00 2.88-3.17i 3.01+6.97i 1.90-3.73i 2.88+3.17i -2.54i+0.00$ and $B = 3.23i+0.00 1.51-1.92i 1.90+0.84i 0.42+2.50i 1.51+1.92i 3.58i+0.00 -0.23+1.11i -1.18+1.37i 1.90-0.84i -0.23-1.11i 4.09i+0.00 2.33-0.14i 0.42-2.50i -1.18-1.37i 2.33+0.14i 4.29i+0.00 .$ The example program for F08SQF (ZHEGVD) illustrates solving a generalized Hermitian eigenproblem of the form $ABz=\lambda z$. ### 10.1  Program Text Program Text (f08spfe.f90) ### 10.2  Program Data Program Data (f08spfe.d) ### 10.3  Program Results Program Results (f08spfe.r)
4,811
13,898
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 181, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.71875
3
CC-MAIN-2018-51
latest
en
0.638309
http://www.algebra-class.com/index.html
1,419,779,450,000,000,000
text/html
crawl-data/CC-MAIN-2014-52/segments/1419447558026.18/warc/CC-MAIN-20141224185918-00044-ip-10-231-17-201.ec2.internal.warc.gz
123,691,406
10,792
Home #### Algebra and Pre-Algebra Lessons Algebra 1 | Pre-Algebra | Practice Tests | Algebra Readiness Test #### Algebra E-Course and Homework Information Algebra E-course Info | Log In to Algebra E-course | Homework Calculator #### Formulas and Cheat Sheets Formulas | Algebra Cheat Sheets # Your Step-by-Step Guide to Mastering Algebra 1 ## Do you feel stressed and frustrated with your Algebra work? If you are feeling this way too, don't worry! All of your problems can be solved right here. As a former teacher, I've created a website that I know will help you with better understand Algebra. ## Here's what you'll find on Algebra-class.com: The following pages are our most popular and most helpful pages for students who are studying Algebra • Free Algebra Calculator - Just input your homework problem and the calculator will calculate the answer for you! Perfect tool for checking your homework or classwork problems. You can even subscribe to get full step by step solutions. • Algebra Formulas - This is a complete reference section filled with formulas and examples to help guide you through these difficult problems. • Algebra Readiness Test - Take this test to see if you are ready to begin your Algebra journey. Proficiency in basic skills is the key to performing well in Algebra 1. • Algebra Practice Test - This is very similar to an end of year Algebra Final Exam. Take this test to see if you have truly mastered the Algebra 1 skills necessary for moving forward. • Algebra Cheat Sheets - I call them reference guides, you call them cheat sheets. They are wonderful one page sheets for Algebra Units, that you can reference when completing your work. ## How is Algebra Class Organized? Algebra Class is set up in units with sequential lessons for each unit. I've set it up this way for students who are using the website as a self study course and so that you can easily find the topic that you are studying. You can access the lessons in two different ways. • The left nav bar has all of the Pre-Algebra and Algebra lessons listed by Unit. Click on the unit that you are studying and you will see a table of contents for the lessons presented in that unit. • If you are studying Pre-Algebra you can use the Pre-Algebra site map to view all Pre-Algebra units and lessons. • If you are studying Algebra, you can use the Algebra site map to view all of the Algebra units and lessons. • Math Forum - Now you can get YOUR Questions answered! There is a forum for everyone. You can ask a question, answer a question or just read what other's have to say. It's FREE, fun, and there's no registration required. Click here to see what it's all about. ## If you need IMMEDIATE Algebra help, look no further! Check out the Algebra Class E-courses. These E-courses will lead you through an entire Algebra 1 curiculum that is self paced, and thoroughly explained with step by step examples, and practice problems. Check out this video for more details on how to access this course. The E-course is offered as a monthly subscription for \$9.99 per month or you can purchase a full year subscription for just \$49.99 per year. ## Make Sure You Try the FREE Pre-Algebra Refresher Course We also offer a Pre-Algebra refresher course. This mini course is perfect for anyone who needs to review integers, order of operations, like terms or the distributive property. And... as a BONUS you will also have access to the first unit of the Algebra Class E-course! ## New For Teachers! Looking for more practice worksheets for your students? Would it be helpful to have step-by-step solutions to every problem? Plus quizzes, unit tests, mid-terms and final exams all packaged into one deal! You can now get all of the Algebra E-course materials (minus the video tutorials) in one simple download! If you find that you like the detailed examples on Algebra-class.com, then why not get the book! This e-book, Simple Steps to Success in Algebra, contains many of the examples from Algebra-class.com. # If you need help - Hop on the "COOL BUS" with me. I'll take you on a journey that you'll never forget! Custom Search ## What People Are Saying... Dear Karin, I am a homeschool mom of five who struggled with finding a solid algebra program for my older boys until I came upon your algebra class. Your tutorials are straight forward and detailed. Your assignments are designed in such a way that we can spend extra time on what my children need to and move on when they understand something more easily. I am a math-lover myself and am excited that you have finished part 2 of this course. My boys are understanding algebra in a way that they never were able to with other courses due to the detail and care that are in each of your lessons. I also appreciate that you are available to answer questions. Thank you, Jacqui Coleman Dear Karin, Finding your site was such a blessing to me! I have been out of school for 13+ years and finding out that my next course would be Algebra scared me to death! I have now found a new love of learning for algebra--something I never thought would happen. After indulging in the section of functions, I decided to explore other areas that I have just learned. It made areas such as inequalities and graphing so much easier to grasp! I just wanted to thank you for your passion and dedication for helping others! I also love the fact that you add in some humor, too. I have shared your site with classmates and hope they take an opportunity to look into it as well! Thank you---- With greatest respect, Dani ? ## Subscribe To This Site Enjoy This Site? Then why not use the button below, to add us to your favorite bookmarking service? ## Now Where Should YOU Start? The best thing that I've found about the creation of Algebra-class.com is that I've been able to help thousands of people from all over the world and from different walks of life. Each one of you may have different needs, so to help you get the most from Algebra-class.com, I've created a special page for each of you. Click on the icon that best describes YOU for a list of resources that will enhance your learning of Algebra. Algebra-class.com is always a work in progress. I continually add new units of study and new lessons. If you have a suggestion for a topic or unit of study, please contact me. I hope you enjoy your "ride"! I wish you the best in your studies.
1,365
6,424
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.953125
3
CC-MAIN-2014-52
longest
en
0.928494
https://spmmathematics.blog.onlinetuition.com.my/2021/02/49-matrices-spm-practice-short-questions.html
1,726,622,333,000,000,000
text/html
crawl-data/CC-MAIN-2024-38/segments/1725700651835.68/warc/CC-MAIN-20240918000844-20240918030844-00119.warc.gz
476,221,847
12,264
# 2.9.2 Matrices, SPM Paper (Short Questions) 2.9.2 Matrices, SPM Practice (Short Questions) Question 5: Given that  find the value of x. Solution: [3 × x + x (–1)] = (18) 3xx = 18 2x = 18 x = 9 Question 6: $\left(\begin{array}{cc}3& 4\\ -2& 3\end{array}\right)\left(\begin{array}{l}5\\ -2\end{array}\right)=$ Solution: $\begin{array}{l}\left(\begin{array}{cc}3& 4\\ -2& 3\end{array}\right)\left(\begin{array}{l}5\\ -2\end{array}\right)=\left(\begin{array}{l}\left(3\right)\left(5\right)+\left(4\right)\left(-2\right)\\ \left(-2\right)\left(5\right)+\left(3\right)\left(-2\right)\end{array}\right)\\ \text{}=\left(\begin{array}{l}15-8\\ -10-6\end{array}\right)\\ \text{}=\left(\begin{array}{l}7\\ -16\end{array}\right)\end{array}$ Question 7: $\left(\begin{array}{cc}2& 4\\ \begin{array}{l}-3\\ 4\end{array}& \begin{array}{l}0\\ 1\end{array}\end{array}\right)\left(\begin{array}{l}1\\ -3\end{array}\right)=$ Solution: Order of the product of the two matrices $=\left(\overline{)3}×2\right)\left(2×\overline{)1}\right)=\left(\overline{)3×1}\right)$ $\begin{array}{l}\left(\begin{array}{cc}2& 4\\ \begin{array}{l}-3\\ 4\end{array}& \begin{array}{l}0\\ 1\end{array}\end{array}\right)\left(\begin{array}{l}1\\ -3\end{array}\right)=\left(\begin{array}{l}2\left(1\right)+4\left(-3\right)\\ \left(-3\right)\left(1\right)+0\left(-3\right)\\ \left(4\right)\left(1\right)+1\left(-3\right)\end{array}\right)\\ \text{}=\left(\begin{array}{l}2-12\\ -3+0\\ 4-3\end{array}\right)\\ \text{}=\left(\begin{array}{l}-10\\ -3\\ 1\end{array}\right)\end{array}$ Question 8: Solution: Order of the product of the two matrices $=\left(\overline{)1}×3\right)\left(3×\overline{)2}\right)=\left(\overline{)1×2}\right)$ = (1×5 + (–1)(–3) + (2)(2)  1×1 + (–1)(0) + (2)(4)) = (5 + 3 + 4   1 + 0 + 8) = (12   9)
775
1,793
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 9, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.75
5
CC-MAIN-2024-38
latest
en
0.421726
http://www.cheresources.com/invision/topic/12511-compressibility-factor-of-moist-air/
1,529,652,031,000,000,000
text/html
crawl-data/CC-MAIN-2018-26/segments/1529267864364.38/warc/CC-MAIN-20180622065204-20180622085204-00107.warc.gz
385,276,642
26,981
## Featured Articles Check out the latest featured articles. ## New Article Product Viscosity vs. Shear ## Featured File Vertical Tank Selection ## New Blog Entry Scrubber Design for Desulfurization- posted in Ankur's blog # Compressibility Factor Of Moist Air This topic has been archived. This means that you cannot reply to this topic. 15 replies to this topic | ### #1 slmn slmn Brand New Member • Members • 7 posts Posted 16 April 2011 - 02:24 PM Hi all, I found many Excel sheets in the forum for calculating compressibility factor for different gases, but what about air? For dry air it is ok if you assume it as 21% O2 and 79% N2. You can get Z by any of the EOS - or by the compressibility chart using Kays Rule. But if I want to include moisture in air - say I have air with certain conditions P, T and relative humidity. Say 80%. How can I deal with that? Say with Kays Rule, how can I include the humidity ratio in my calculations? How do I manage the percentage of each constituent 21+79 = 100 and moisture? It will be more than 100%? Any idea? ### #2 Jiten_process Jiten_process Gold Member • ChE Plus Subscriber • 166 posts Posted 16 April 2011 - 02:43 PM I guess the effect of moisture is so low on 'Z' value that you can actually neglect it, however you have to consider humid volume for sizing purpose. As such you can use simulation tool to find accurate Z value. Take one stream as pure air (21% O2 and 79% N2) and define the second stream as pure water with flow rate same as total moisture that you have calculated. Add a mixture and connect these two stream as inlet. Take out the outlet stream as humid air and see the 'Z' value. I guess this is how you can do this. Ask a compressor vendor what do they consider, i guess they might neglect this, however for inlet volume they do consider humid volume for the sizing purpose. Neways, lets c what others have to say on this. ### #3 ankur2061 ankur2061 Gold Member • Forum Moderator • 2,478 posts Posted 17 April 2011 - 02:35 AM slmn, Jiten is absolutely right. The effect on Z for water saturated air or dry air is negligible. The dependency of Z is more on the pressure and temperature of the gas. While doing compression calculations for air, the effect of high relative humidity is more on the inlet volumetric flow also called as inlet cubic feet per minute or actual cubic feet per minute. Air flow is normally represented as SCFM or Nm3/h where S represents "Standard" conditions of 14.7 psia (1 atma) pressure and 60 deg F (15.6 deg C) temp whereas N reperesnts "Normal" conditions of 1.013 bara (1 atma) and 0 deg C. If you are required to perform inlet volume flow calculations for an air compressor you might like to have a look at the following link: http://www.cheresour...2950#entry22950 Regards, Ankur ### #4 slmn slmn Brand New Member • Members • 7 posts Posted 17 April 2011 - 09:24 AM thank you very much for the valuable information actually im trying to estimate the efficiency of the compressor of our gas turbine i have P,T,RH at inlet and discharge ,i calculate the cp as indicated in ASME PTC 10 1997 from fig c1, and as i said i sticked in Z now for estimating Z what do you suggest, using EOS, or the values in perry's handbook section two and interpolate for the required values.or the compressibility chart using kay's approach(it will be hard to transfer this chart to excel) , i need your advice. finally if you please give more details about the two streams method , did you mean to estimate Z for air and Z for steam and take the mean or what. thank you both again ### #5 ankur2061 ankur2061 Gold Member • Forum Moderator • 2,478 posts Posted 17 April 2011 - 10:49 AM slmn, Your response is confusing. Are you mixing air and steam? If it is just moist air then please provide the composition of the air in terms of air and water. Also provide the pressure and temperature at inlet and outlet. For compressor calculations the average compressibility needs to be considered i.e Zavg = Z1+Z2 / 2 where Z1 is compressibility at the inlet conditions and Z2 is compressibility at theoutlet conditions. Compressibility factors are best calculated using EOS such as Redlich-Kwong, Soave-Redlich-Kwong and Peng-Robinson. Among these Redlich-Kwong is easiest to program in an excel sheet because the solution of this EOS does not require an iterativeprocedure. Hope this helps. Regards, Ankur. ### #6 slmn slmn Brand New Member • Members • 7 posts Posted 17 April 2011 - 11:50 AM just moist air interning and leaving the compressor inlet air pressure = 23 in HG , temp = 66 F , relative humidity = 80% ===> Z = ? discharge press.=129 psig , temp = 663 F , relative humidity = 80% ====> Z = ? ### #7 Zauberberg Zauberberg Gold Member • ChE Plus Subscriber • 2,693 posts Posted 17 April 2011 - 12:09 PM This resource lists the compressibility values for Air at different pressures and temperatures. You can use the interpolation formula for calculating intermediate values: http://pipeng.com/in.../itddaflup00501 As said by Ankur and Jiten, you can neglect influence of water vapor, as far as compressibility is concerned. ### #8 Art Montemayor Art Montemayor Gold Member • 5,529 posts Posted 17 April 2011 - 04:04 PM All: This is an interesting subject because it brings up some important issues having to do with the retrieval and confirmation of data used in engineering decisions and calculations. And I would take this opportunity to bring up some experience for the benefit of some of our younger engineering Forum members. For many years, I have divorced myself from resorting to Perry’s Chemical Engineering Handbook. In my early years as a young graduate I was disillusioned and dismayed by the absence and quality of data in that publication. My disenchantment later turned to indignation when some of the data I found there was either erroneous, lacking in detail, outdated or out of touch with practicality. As the years have progressed since I bought my copy of the 3rd Edition (for \$16.75 – a handsome price in 1957) the price of this publication has reached a level where a young student should receive the total worth of what he/she is paying for this book. I personally believe the present price to be outrageous. Now I look at what Zauberberg has presented to us and I discover that it is a copy of what someone found in Perry’s latest edition. It is a reduced table of some Russian data obtained in 1966 by some guys named Vasserman, Kazavchinskii, and Rabinovich. Sounds like a Troika to me. This data is published by Perry’s (through McGraw-Hill) and simply states that the data is in “bar” and K. It fails to specifically identify the pressure as absolute and leaves the reader in the lurch as to whether these guys used absolute or not. They calculated this data, so we might assume they used absolute units – but once again, we are forced to guess, assume, or suppose that they did. We don't even know if this data is generated on an absolutely dry theoretical air mixture - or moist atmospheric air. This is another illustration of what Perry’s puts together in their compilation of someone else’s data. Perry’s has consistently failed to give the Chemical Engineer what he/she has dearly paid for in hard cash: specific data. I realize that the data may be based on European SI units that call for only absolute bars. However, we have no hard basis for ensuring the pressure base of the data. Perry’s itself follows up with Table 2-185, “Compressibility Factor for Water Substance (FPS units)” and identifies the rows on that table as PSIG and the columns as oF. Therefore, we have proof that the Handbook does not respect a “standard” nomenclature of absolute pressure (or temperature) units. How then, can we “assume” that the bar employed in the Russian data is absolute? Do we have to find (and purchase) the original Russian calculations? This is a good example of Shabby and sloppy engineering reporting. I believe that the Russian data is probably in absolute pressure units – but that belief does not approach my belief in God. My point here, after allowing myself a righteous rant, is that engineering information is very important because we engineers are held legally, economically, and morally liable for our calculations and results out in industrial practice. A lot of the basic scientific and physical information and data that we employ is based on scientific results and experimentation. Yet the scientist is not held liable to the same degree that we all are! We are the ones that are sued and/or thrown in jail if our results cause harm. The scientist is left to admit that he might have made a mistake – and that is all that society expects from him/her. We are left holding the blame. That is why I consider it so important to DEMAND specific, detailed, identified information and data when using it on engineering projects. We owe to ourselves and to our profession to insist on that quality of data to be upheld. And I still don’t trust Perry’s Handbook. I think it is grossly overpriced and it stinks compared to the GPSA, Campbell’s Books, Ernie Ludwig’s Books, and other publications. I apologize to Zauberberg if I question the data he presented, but I know him long enough to know that he probably agrees with some of what I state and also identifies with the message of being careful about how and where one obtains engineering design data. Thank you all for reading this. ### #9 katmar katmar Gold Member • ChE Plus Subscriber • 604 posts Posted 18 April 2011 - 04:40 AM slmn, you need to move away from "scientific" thinking towards "engineering" thinking. The scientific question to ask here is "What is the Z value for the gas at the inlet and at the outlet". The engineering question here is "What uncertainty value do I need to incorporate into my calculation to ensure the Z value does not compromise my design". Or to put it another way - how accurately do I need to estimate the Z value? Looking at your data for the inlet conditions we can see that the water content is around 1% by mass. Already my engineering senses are saying "water effect is probably negligible". It will be hard to find Z data for the your exact mixture of air and water vapour, so my initial effort would be based on looking at the individual components. Using Peng-Robinson for 66F and 23 inch HG (assumed absolute, but makes little difference) I get Nitrogen : Z=0.9996 Oxygen : Z=0.9992 And from my steam tables for steam saturated at 66F I get Z=0.9992 And at 663F and 129 psig I get Nitrogen : Z=1.0027 Oxygen : Z=1.0015 Steam : Z= 0.9858 (NB superheated - not saturated at 663F) These numbers tell me that any deviation from ideality will be << 1%, and since they are based on EOS predictions I would regard Z as being 1.00 under all these conditions. Taking Z as 1.00 will be a more accurate assumption than most of your other data such as composition, flow rate, pressure and temperature. And so with just a little bit of applied (engineering) thinking we jump right around the problem of trying to determine an accurate Z value. ### #10 breizh breizh Gold Member • ChE Plus Subscriber • 3,848 posts Posted 18 April 2011 - 11:48 PM Hi , You may find some interest reading this paper . Breizh ### #11 slmn slmn Brand New Member • Members • 7 posts Posted 19 April 2011 - 09:51 AM thank you all for this great help and i appreciate any ideas regarding this ### #12 Art Montemayor Art Montemayor Gold Member • 5,529 posts Posted 19 April 2011 - 10:56 AM Breizh: Thank you very much for the nice article on calculating the water content of atmospheric and compressed air. It is the result of an academic exercise using regression on the published data found in the Iranian National Oil Company's standard for compressed air supply. You continue to submit good and interesting information for our members and I am grateful for your continued contributions. While it is a good contribution to interested members like myself, Ankur, Zauberberg, et.al., it still lacks a specific, confirmed basis for the data results. Note that the published Table A.2 found in the referenced IPS-E-PR-330 paper lists the kPa pressure in GAUGE values. I am sure that Messrs. Bahadori and Mokhatab corrected their input into the regression exercise and that the generated equations are valid as per the Iranian table. However, also note that the Iranian table has NO REFERENCE or basis for its data presentation. This is not even mentioned by Bahadori and Mokhatab - or by Chemical Engineering magazine. I am not challenging the data nor claiming that it is not correct. All I would ask, as a practicing professional engineer is that the data be identified and certified as correct and accurate to what degree. If we are to use this data and the nice regressed equations, we should be well advised that we really have no published basis for the result. Consequentely, as is the case in most of these cases, be wary of how you use the results. At best, I would identify the result as an estimate - but without any idea as to its possible accuracy. Additionally, also note that the authors compare their example calculation results to the same data that they used as the basis for their regression. Of course it compares well; all that proves is that the method of least squares works in a good fit for the data. It doesn't mean that the equations generated will necessarily yield an ACCURATE value for the amount of water contained in saturated compressed air. We still look for an accurate measurement of that in order to have an idea as to how good are our estimating design equations. Nevertheless, it continues to be the best that we can come up with until someone does a more thorough and documented, accurate project on identifying the water content in saturated compressed gases. What the simulation programs such as Hysys use to come up with their result is open to conjecture since they (like the Iranian table) don't report their basis or algorithm. So this is as good as we can get - for now. If anyone has further or more detailed and identified data on this subject, I would be very grateful if they would let us all know. ### #13 breizh breizh Gold Member • ChE Plus Subscriber • 3,848 posts Posted 19 April 2011 - 10:24 PM Art , Breizh ### #14 katmar katmar Gold Member • ChE Plus Subscriber • 604 posts Posted 20 April 2011 - 08:26 AM Art, I think you are being too diplomatic in your comments on the Bahadori and Mokhatab article. I'm sure that breizh was only trying to help by posting the article, and I second your thanks to beizh for all the good help he offers here, but this article is terrible. In the text on the top right hand side of page 57 they say "Increasing the pressure reduces the ability of air to hold moisture." This is very much in line with my own experience and calculations. But in Figure 2 their regressed curve for 40C shows that the water content increases as the pressure increases from 700 to 1200 kPa. This made me look more carefully at the Figure. Firstly, the discrepancy between the regression line and the data points is close to 100% (5 ml/m3 vs nearly 10 ml/m3 at 750 kPa and 40C) and not the nice close agreement in their cherry-picked example. Secondly, I wondered if maybe it does increase if the "ml/m3" were based on actual m3 and not Nm3 so I tried to find in the text what m3 they were using. I could not find any mention of whether these are actual or Normal. Did I miss it somewhere? We all know and respect the people like Kern, Simpson, Fair, Eckert and Kister who have published many articles over the years. In their cases the fact that they have had many articles published is a good indication of their abilities. But when I see a young PhD candidate who has already published 40 articles I get worried. There are too many like this who churn out poor articles simply to have a large number on their CVs. It's easy to take somebody else's data and throw it into a stats package and generate a few curves that constitute an article. But they should at least put a bit of thought into what they are doing. I would be far too embarrassed to publish such poor correlations. But the worst of it is that a journal like Chemical Engineering has become a magazine with little or no editorial input. ### #15 Art Montemayor Art Montemayor Gold Member • 5,529 posts Posted 20 April 2011 - 10:32 AM Thank you Harvey. I can always count on you for clarification, frank, and honest comments. You continue to enlighten us with your accurate and descriptive review of engineering topics of importance. I am afraid that you did not miss any mention of whether the gas volumes are actual or Normal. The authors (and what is worse, the Editor, Gerald Ondrey) simply do not make any mention of it. Yes, it is a sad and depressing experience to see Chemical Engineering - a publication that brought us the works of Kern, Simpson, Fair, Eckert, Kister, and numerous other notables in the past – lower its standards to this level. You haven’t mentioned the fact that the water units of mL/m3 also do not make mention of what temperature the mL are calculated at. We need the mass water rate for engineering design and we can’t get the water density if we don’t know its temperature. At this point allow me to make this statement to our Forum readers: Our intent is certainly not to slam and simply criticize engineering articles or to take “pot shots” at them for the sake of satisfying our personal egos. The subject matter and topics here are of prime engineering importance for all engineers: the water (or vapor) content of gases and the ability to calculate and quantify the effect are of great importance in the design and operation of thermodynamic cycles and Unit Operations. At this stage of engineering development we simply lack the ability to predict accurate and consistent values for the condensable content in gas streams – especially with regards to polar molecules. The fact that we are still having trouble quantifying water content in compressed air should raise our concern. If we can’t master that, how can we proceed on to such bad actors like CO2, SO3, H2S, - even natural gas? Our main topic for this thread continues to be the Compressibility Factor. However, please note how the related topic of gas humidity raises a question that we have difficulty in specifically addressing and resolving. When we resolve the basic subject of condensable contents in a gas, we will be able to definitely answer the Compressibility Factor question. For now all we can say is that it doesn’t seem to make a difference – as witnessed by empirical air compressor performance. Thank you again, Harvey, for your support and frank, experienced opinions regarding the generation and employment of basic engineering data in engineering calculations and decisions. Like you, I also clamor for increased detailed, accurate, and applicable reported engineering study and research. ### #16 Elizabeth_I Elizabeth_I Brand New Member • Members • 8 posts Posted 21 April 2011 - 07:36 AM Thanks so much for the posts. They are really informative!
4,429
19,256
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.703125
3
CC-MAIN-2018-26
latest
en
0.926137
https://gfiber.googlesource.com/kernel/mindspeed/+/87f7918552be2b3378f7e8944008bff102b3e59f/arch/sparc/lib/rem.S
1,726,383,746,000,000,000
text/html
crawl-data/CC-MAIN-2024-38/segments/1725700651616.56/warc/CC-MAIN-20240915052902-20240915082902-00400.warc.gz
249,806,071
8,779
blob: 42fb8625281553466220743489ca506a79fec71d [file] [log] [blame] /* * rem.S: This routine was taken from glibc-1.09 and is covered * by the GNU Library General Public License Version 2. */ /* This file is generated from divrem.m4; DO NOT EDIT! */ /* * Division and remainder, from Appendix E of the Sparc Version 8 * Architecture Manual, with fixes from Gordon Irlam. */ /* * Input: dividend and divisor in %o0 and %o1 respectively. * * m4 parameters: * .rem name of function to generate * rem rem=div => %o0 / %o1; rem=rem => %o0 % %o1 * true true=true => signed; true=false => unsigned * * Algorithm parameters: * N how many bits per iteration we try to get (4) * WORDSIZE total number of bits (32) * * Derived constants: * TOPBITS number of bits in the top decade of a number * * Important variables: * Q the partial quotient under development (initially 0) * R the remainder so far, initially the dividend * ITER number of main division loop iterations required; * equal to ceil(log2(quotient) / N). Note that this * is the log base (2^N) of the quotient. * V the current comparand, initially divisor*2^(ITER*N-1) * * Cost: * Current estimate for non-large dividend is * ceil(log2(quotient) / N) * (10 + 7N/2) + C * A large dividend is one greater than 2^(31-TOPBITS) and takes a * different path, as the upper bits of the quotient must be developed * one bit at a time. */ .globl .rem .globl _Rem .rem: _Rem: /* needed for export */ ! compute sign of result; if neither is negative, no problem orcc %o1, %o0, %g0 ! either negative? bge 2f ! no, go do the divide mov %o0, %g2 ! compute sign in any case tst %o1 bge 1f tst %o0 ! %o1 is definitely negative; %o0 might also be negative bge 2f ! if %o0 not negative... sub %g0, %o1, %o1 ! in any case, make %o1 nonneg 1: ! %o0 is negative, %o1 is nonnegative sub %g0, %o0, %o0 ! make %o0 nonnegative 2: ! Ready to divide. Compute size of quotient; scale comparand. orcc %o1, %g0, %o5 bne 1f mov %o0, %o3 ! Divide by zero trap. If it returns, return 0 (about as ! wrong as possible, but that is what SunOS does...). ta ST_DIV0 retl clr %o0 1: cmp %o3, %o5 ! if %o1 exceeds %o0, done blu Lgot_result ! (and algorithm fails otherwise) clr %o2 sethi %hi(1 << (32 - 4 - 1)), %g1 cmp %o3, %g1 blu Lnot_really_big clr %o4 ! Here the dividend is >= 2**(31-N) or so. We must be careful here, ! as our usual N-at-a-shot divide step will cause overflow and havoc. ! The number of bits in the result here is N*ITER+SC, where SC <= N. ! Compute ITER in an unorthodox manner: know we need to shift V into ! the top decade: so do not even bother to compare to R. 1: cmp %o5, %g1 bgeu 3f mov 1, %g7 sll %o5, 4, %o5 b 1b add %o4, 1, %o4 ! Now compute %g7. 2: addcc %o5, %o5, %o5 bcc Lnot_too_big add %g7, 1, %g7 ! We get here if the %o1 overflowed while shifting. ! This means that %o3 has the high-order bit set. ! Restore %o5 and subtract from %o3. sll %g1, 4, %g1 ! high order bit srl %o5, 1, %o5 ! rest of %o5 add %o5, %g1, %o5 b Ldo_single_div sub %g7, 1, %g7 Lnot_too_big: 3: cmp %o5, %o3 blu 2b nop be Ldo_single_div nop /* NB: these are commented out in the V8-Sparc manual as well */ /* (I do not understand this) */ ! %o5 > %o3: went too far: back up 1 step ! srl %o5, 1, %o5 ! dec %g7 ! do single-bit divide steps ! ! We have to be careful here. We know that %o3 >= %o5, so we can do the ! first divide step without thinking. BUT, the others are conditional, ! and are only done if %o3 >= 0. Because both %o3 and %o5 may have the high- ! order bit set in the first step, just falling into the regular ! division loop will mess up the first time around. ! So we unroll slightly... Ldo_single_div: subcc %g7, 1, %g7 bl Lend_regular_divide nop sub %o3, %o5, %o3 mov 1, %o2 b Lend_single_divloop nop Lsingle_divloop: sll %o2, 1, %o2 bl 1f srl %o5, 1, %o5 ! %o3 >= 0 sub %o3, %o5, %o3 b 2f add %o2, 1, %o2 1: ! %o3 < 0 add %o3, %o5, %o3 sub %o2, 1, %o2 2: Lend_single_divloop: subcc %g7, 1, %g7 bge Lsingle_divloop tst %o3 b,a Lend_regular_divide Lnot_really_big: 1: sll %o5, 4, %o5 cmp %o5, %o3 bleu 1b addcc %o4, 1, %o4 be Lgot_result sub %o4, 1, %o4 tst %o3 ! set up for initial iteration Ldivloop: sll %o2, 4, %o2 ! depth 1, accumulated bits 0 bl L.1.16 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 ! depth 2, accumulated bits 1 bl L.2.17 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 ! depth 3, accumulated bits 3 bl L.3.19 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 ! depth 4, accumulated bits 7 bl L.4.23 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 b 9f add %o2, (7*2+1), %o2 L.4.23: ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (7*2-1), %o2 L.3.19: ! remainder is negative addcc %o3,%o5,%o3 ! depth 4, accumulated bits 5 bl L.4.21 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 b 9f add %o2, (5*2+1), %o2 L.4.21: ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (5*2-1), %o2 L.2.17: ! remainder is negative addcc %o3,%o5,%o3 ! depth 3, accumulated bits 1 bl L.3.17 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 ! depth 4, accumulated bits 3 bl L.4.19 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 b 9f add %o2, (3*2+1), %o2 L.4.19: ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (3*2-1), %o2 L.3.17: ! remainder is negative addcc %o3,%o5,%o3 ! depth 4, accumulated bits 1 bl L.4.17 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 b 9f add %o2, (1*2+1), %o2 L.4.17: ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (1*2-1), %o2 L.1.16: ! remainder is negative addcc %o3,%o5,%o3 ! depth 2, accumulated bits -1 bl L.2.15 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 ! depth 3, accumulated bits -1 bl L.3.15 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 ! depth 4, accumulated bits -1 bl L.4.15 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 b 9f add %o2, (-1*2+1), %o2 L.4.15: ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-1*2-1), %o2 L.3.15: ! remainder is negative addcc %o3,%o5,%o3 ! depth 4, accumulated bits -3 bl L.4.13 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 b 9f add %o2, (-3*2+1), %o2 L.4.13: ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-3*2-1), %o2 L.2.15: ! remainder is negative addcc %o3,%o5,%o3 ! depth 3, accumulated bits -3 bl L.3.13 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 ! depth 4, accumulated bits -5 bl L.4.11 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 b 9f add %o2, (-5*2+1), %o2 L.4.11: ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-5*2-1), %o2 L.3.13: ! remainder is negative addcc %o3,%o5,%o3 ! depth 4, accumulated bits -7 bl L.4.9 srl %o5,1,%o5 ! remainder is positive subcc %o3,%o5,%o3 b 9f add %o2, (-7*2+1), %o2 L.4.9: ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-7*2-1), %o2 9: Lend_regular_divide: subcc %o4, 1, %o4 bge Ldivloop tst %o3 bl,a Lgot_result ! non-restoring fixup here (one instruction only!) add %o3, %o1, %o3 Lgot_result: ! check to see if answer should be < 0 tst %g2 bl,a 1f sub %g0, %o3, %o3 1: retl mov %o3, %o0 .globl .rem_patch .rem_patch: sra %o0, 0x1f, %o4 wr %o4, 0x0, %y nop nop nop sdivcc %o0, %o1, %o2 bvs,a 1f xnor %o2, %g0, %o2 1: smul %o2, %o1, %o2 retl sub %o0, %o2, %o0 nop
2,904
7,226
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.703125
3
CC-MAIN-2024-38
latest
en
0.731589
https://quantumcomputing.stackexchange.com/questions/23490/accuracy-of-grover-algorithm-is-100-for-2-qubit-94-5-on-3-qubit-and-96-2-for
1,660,127,463,000,000,000
text/html
crawl-data/CC-MAIN-2022-33/segments/1659882571153.86/warc/CC-MAIN-20220810100712-20220810130712-00075.warc.gz
442,307,959
65,225
# Accuracy of Grover algorithm is 100% for 2 qubit, 94.5% on 3 qubit and 96.2% for 4 qubit on simulator. Why it decreasing and then again increasing? The accuracy of Grover's algorithm decreases for 3 qubit then increases for 4 qubit and then again increases for 5-qubit on simulator (qasm simulator) with pi/4(sqrt N) iterations. What is the reason behind that? Why there is no specific patten. ## 1 Answer The accuracy of measuring the correct result is given by a sine $$\sin^2((r + \frac{1}{2})\theta)$$ where $$r$$ is the number of Grover iterations and $$\theta$$ is the angle between starting state (before Grover iteration) $$|s\rangle$$ and $$|s'\rangle$$. $$|s'\rangle$$ is a state perpendicular to our winner, desired output state $$|\omega\rangle$$. $$\theta$$ is given by $$\sin\frac{\theta}{2} = \frac{1}{\sqrt{N}}$$ where $$N$$ is the number of all possible outputs (for $$n$$ qubits $$N = 2^n$$.) Therefore the precise accuracy may float a bit up and down depending on number of all elements and, related, number of Grover iterations. Qiskit textbook's chapter on Grover Algorithm has a nice graphical interpretation of these rotations that could help understand it.
317
1,186
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 12, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.1875
3
CC-MAIN-2022-33
longest
en
0.832599
https://www.acorns.com/money-basics/dividend-payout-ratio/
1,653,702,734,000,000,000
text/html
crawl-data/CC-MAIN-2022-21/segments/1652663011588.83/warc/CC-MAIN-20220528000300-20220528030300-00511.warc.gz
676,135,527
20,206
## What’s a dividend payout ratio? dividend payout ratio or DPR tells an investor what percentage of earnings a specific company paid out to shareholders in the form of a dividend, which is a periodic payout of earnings that some companies and funds share with investors. This is important because a company that is paying out a large proportion of its earnings is then not using it for other purposes, like paying down debt or plowing it back into the company to fund research and development, operations, marketing, sales or any other potential growth activity. While the DPR doesn’t tell you specifics about a company’s health per se, it gives you insight into a company’s priorities. You can determine whether they are more focused on sharing their wealth with owners or shareholders or reinvesting the gains for potential future growth. ## How do you calculate a dividend payout ratio? The good news is that you don’t have to be a math whiz to determine this number. All you need to know are the dividends per share, which you’ll divide by the company’s earnings per share. The formula looks like this: Dividends Per Share divided by Earnings Per Share equals Dividend Payout Ratio or more simply: DPS➗EPS = DPR. So let’s put that math into practice. Let’s say you’re looking at a stock that offers a dividend per share (DPS) of \$2 and earnings per share (EPS) of \$5. Using our formula, the DPR would be 40 percent. The DPR can range from 0 percent—a company that isn’t paying out any dividends—to 100 percent or more, which as we’ll see below, might not be ideal. ## What is a good dividend payout ratio? The real question is whether a certain DPR is considered good or bad. After all, if we look at our example above, a 40 percent raise would be fantastic, but a 40 percent loss in your stock account would be frightening. As with many investing questions, the answer when trying to determine a good DPR is: It depends. Some of the factors to take into account in your interpretation are: ### Is the company mature or still growing? An organization that’s in growth mode should ideally be prioritizing investing its profits back into the company. That means that if you’re a more aggressive investor, you’re likely to see a lower DPR as a benefit, since you would prefer that a start-up or growing company focus on keeping that expansion coming by developing new products or entering new markets. In the longer run, ideally that will fuel an increase in the stock price, as well as the potential for a larger payout to shareholders in the future. In this case, they should be offering little to no dividend today. By contrast, a company in a more mature industry might not have as many investment opportunities, and instead may be rewarding shareholders with that higher DPR. Often you’ll find this behavior from blue-chip stocks, which are stocks of a reputable company that is a leader in its industry. However, it’s important to note that a mature company with a lower DPR might have another motive. For example, it could be diversifying into a new sector or product line and needs to channel funds toward that opportunity. ### Is this DPR sustainable? Of course, we know that you can never predict exactly what a company is going to do. But if an organization is offering a historically large dividend, you might want to look into why. Is this a potential roadmap for the future (and thus perhaps an enticing carrot to become a shareholder)? Or could an unusually large DPR be offering a warning? It could be they are trying to shore up support and placate shareholders with one particularly big payday. That’s why it’s important to take a look back at DPR trends to try to identify the motivation. For example, if you see that DPRs have been steadily rising over the past few years, you can gather that the company is in a healthy place where it believes it’s hitting that “maturity” level where aggressive investment isn’t as key, and the goal now is to reward shareholders. ### Does the DPR indicate future problems? While a small or even non-existent DPR isn’t a problem for a company in growth mode, an outsized DPR (100 percent or more) could be portending financial trouble. That’s because it means the organization is paying out more than it’s taking in, which obviously is not sustainable. In that case the firm could be in financial straits and trying to keep its shareholders from jumping ship. That’s fine if you’re already on the boat and want to enjoy that largesse, but otherwise, it’s probably not a ship you’d want to board. ### What’s a typical DPR for this industry? While there are outliers in any industry, it can be useful to consider conventional behavior for a specific industry as another piece to the puzzle. For example, tech companies that are constantly innovating are less likely to offer dividends than more mature industries like utilities or telecom. ### What are my investing goals? Many investors with a long-term horizon and a more aggressive outlook might prefer a stock with a low DPR because it indicates the company is reinvesting and therefore will potentially offer attractive stock growth if you maintain your shares. Conversely, a more conservative investor might prefer getting some of their investment back every year in the form of income, rather than relying on stock growth to meet their financial goals. ## What’s the difference between dividend payout ratio and dividend yield? As you’re researching the DPR, you might also run across the term “dividend yield.” While both are expressed as percentages, here’s the difference: While the DPR tells how much of a company’s net earnings are disbursed as dividends, the yield tells you how much a company has paid out over the course of the year, to see how much return per dollar invested the shareholder is receiving. The formula looks like this: Annual Dividends Per Share ➗Price Per Share = Dividend Yield. So for example, a stock that paid out \$5 in annual dividends per share that is trading at \$100 has a dividend yield of \$20. And while dividend yield is the metric that investors often consider more closely, some believe that the DPR provides a better indicator of how well a company is equipped to distribute dividends in the future because it is more closely connected to a company’s cash flow. As always, remember that there are no clear-cut answers as to what’s the “right” investment strategy, asset class or even dividend payout ratio. The answers will depend on your personal investment goals, risk tolerance and time horizon. Investing involves risk including loss of principal. This article contains the current opinions of the author, but not necessarily those of Acorns. Such opinions are subject to change without notice. This article has been distributed for educational purposes only and should not be considered as investment advice or a recommendation of any particular security, strategy or investment product. Information contained herein has been obtained from sources believed to be reliable, but not guaranteed.
1,416
7,089
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.453125
3
CC-MAIN-2022-21
latest
en
0.932918
https://www.mail-archive.com/glasgow-haskell-users@haskell.org/msg26398.html
1,696,099,465,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233510707.90/warc/CC-MAIN-20230930181852-20230930211852-00352.warc.gz
940,537,058
3,631
```(Moving this discussion to glasgow-users. It's just not appropriate on the cafe.)``` ``` > I am no longer a novice, and yet would still have a hard time making any use of the laws as written in constructing instances. Instead, I'd ignore the laws and write a natural intuitive instance, and it would invariably work. Seems my approach is very similar to Viktor's. My (very informal) understanding of the Laws looks nothing like the docos. I regard Foldable structures as merely more efficient ways to hold a List. Then I expect 'moral equivalences': > toList . fromList ~=~ id -- going via the Foldable structure > fromList . toList ~=~ id > toList ~=~ foldr (:) [] But those aren't equalities. 'moral equivalence' means the Lists have the same elements, not necessarily in the same order; the structures have the same elements but possibly in a different arrangement -- that is, in the `Tree` example, there might be `Empty` scattered about, and elements held variously in `Leaf`s vs `Node`s. So more accurately: > fromList . toList . fromList === fromList -- i.e. there's a 'canonical' arrangement > toList . fromList . toList === toList -- i.e. there's a 'canonical' List ordering (That triple-journey business is a similar style to defining Lattice pseudocomplements https://en.wikipedia.org/wiki/Pseudocomplement#Properties -- if I can chuck in some math theory.) I'd expect all other methods to be one of: `reduceStuff === reduceStuff . toList` or `mapStuff === fromList . mapStuff . toList`. But! there's no method `fromList` in Foldable. Why not?/please explain. (Are there Foldable structures which we can't load from a List? At least assuming the List is finite.) `fromList` is the first thing I write after declaring the datatype, so I can easily load up some test data. There is one example `fromList` in the doco. Is that not generalisable? `foldMap Leaf` would be brutal, but should work? `foldMap singleton` ? (But there's no method `singleton`.) ``` ```_______________________________________________
502
2,027
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.546875
3
CC-MAIN-2023-40
latest
en
0.863052
http://www.chegg.com/homework-help/questions-and-answers/1200-rm-kg-car-traveling-speed-39-rm-m-s-skids-halt-wet-concrete-muk-040-part-long-skid-ma-q1520811
1,472,466,306,000,000,000
text/html
crawl-data/CC-MAIN-2016-36/segments/1471982954771.66/warc/CC-MAIN-20160823200914-00101-ip-10-153-172-175.ec2.internal.warc.gz
351,224,108
13,411
A 1200 {\rm kg} car traveling at a speed of 39 {\rm m/s} skids to a halt on wet concrete where mu_k = 0.40. Part A - How long are the skid marks?
50
146
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.59375
3
CC-MAIN-2016-36
latest
en
0.780047
https://fr.mathworks.com/matlabcentral/cody/problems/44286-compute-average-gain-for-some-bets/solutions/1250834
1,597,226,156,000,000,000
text/html
crawl-data/CC-MAIN-2020-34/segments/1596439738888.13/warc/CC-MAIN-20200812083025-20200812113025-00389.warc.gz
314,274,629
15,320
Cody Problem 44286. Compute average gain for some bets. Solution 1250834 Submitted on 13 Aug 2017 by yurenchu • Size: 10 • This is the leading solution. This solution is locked. To view this solution, you need to provide a solution of the same size or smaller. Test Suite Test Status Code Input and Output 1   Pass odds = [1.1] ; bets= [100] ; avg_correct = -45.00; assert(isequal(avg_gain(odds,bets),avg_correct)) y = -45 2   Pass odds = [1.1 1.3 2.5] ; bets= [100 200 300] ; avg_correct = -40.00; assert(isequal(avg_gain(odds,bets),avg_correct)) y = -40 3   Pass odds = [1.33 1.3 2.5 5.13] ; bets= [100 200 300 10] ; avg_correct = -12.85; assert(isequal(avg_gain(odds,bets),avg_correct)) y = -12.8500
251
712
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.921875
3
CC-MAIN-2020-34
latest
en
0.729569
https://www.numbersaplenty.com/22833845
1,713,759,299,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296818072.58/warc/CC-MAIN-20240422020223-20240422050223-00705.warc.gz
854,819,595
3,202
Search a number 22833845 = 521372 BaseRepresentation bin101011100011… …0101010110101 31120222002010222 41113012222311 521321140340 62133224125 7365040656 oct127065265 946862128 1022833845 1111986451 127792045 134966268 14306552d 1520108b5 hex15c6ab5 22833845 has 6 divisors (see below), whose sum is σ = 27413442. Its totient is φ = 18258528. The previous prime is 22833841. The next prime is 22833883. The reversal of 22833845 is 54833822. It can be written as a sum of positive squares in 3 ways, for example, as 1387684 + 21446161 = 1178^2 + 4631^2 . It is not a de Polignac number, because 22833845 - 22 = 22833841 is a prime. It is a Duffinian number. It is a congruent number. It is not an unprimeable number, because it can be changed into a prime (22833841) by changing a digit. It is a polite number, since it can be written in 5 ways as a sum of consecutive naturals, for example, 9617 + ... + 11753. It is an arithmetic number, because the mean of its divisors is an integer number (4568907). Almost surely, 222833845 is an apocalyptic number. It is an amenable number. 22833845 is a deficient number, since it is larger than the sum of its proper divisors (4579597). 22833845 is an frugal number, since it uses more digits than its factorization. 22833845 is an evil number, because the sum of its binary digits is even. The sum of its prime factors is 4279 (or 2142 counting only the distinct ones). The product of its digits is 46080, while the sum is 35. The square root of 22833845 is about 4778.4772679171. The cubic root of 22833845 is about 283.7002267358. Multiplying 22833845 by its product of digits (46080), we get a square (1052183577600 = 10257602). The spelling of 22833845 in words is "twenty-two million, eight hundred thirty-three thousand, eight hundred forty-five". Divisors: 1 5 2137 10685 4566769 22833845
570
1,858
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.5
4
CC-MAIN-2024-18
latest
en
0.858038
https://ch.mathworks.com/matlabcentral/cody/problems/37-pascal-s-triangle/solutions/1944984
1,586,012,329,000,000,000
text/html
crawl-data/CC-MAIN-2020-16/segments/1585370524043.56/warc/CC-MAIN-20200404134723-20200404164723-00050.warc.gz
385,596,406
15,692
Cody # Problem 37. Pascal's Triangle Solution 1944984 Submitted on 21 Sep 2019 by Konrád Hambuch This solution is locked. To view this solution, you need to provide a solution of the same size or smaller. ### Test Suite Test Status Code Input and Output 1   Pass n = 0; correct = [1]; assert(isequal(pascalTri(n),correct)) y = 1 2   Pass n = 1; correct = [1 1]; assert(isequal(pascalTri(n),correct)) y = 1 1 3   Pass n = 2; correct = [1 2 1]; assert(isequal(pascalTri(n),correct)) y = 1 2 1 4   Pass n = 3; correct = [1 3 3 1]; assert(isequal(pascalTri(n),correct)) y = 1 3 3 1 5   Pass n = 10; correct = [1 10 45 120 210 252 210 120 45 10 1]; assert(isequal(pascalTri(n),correct)) y = 1 10 45 120 210 252 210 120 45 10 1
282
735
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3
3
CC-MAIN-2020-16
latest
en
0.557964
https://totheinnovation.com/largest-palindrome-product-leetcode-solution/
1,716,411,923,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971058568.59/warc/CC-MAIN-20240522194007-20240522224007-00706.warc.gz
513,419,045
35,850
# Largest Palindrome Product LeetCode Solution Here, We see Largest Palindrome Product LeetCode Solution. This Leetcode problem is done in many programming languages like C++, Java, JavaScript, Python, etc. with different approaches. # List of all LeetCode Solution ## Problem Statement Given an integer n, return the largest palindromic integer that can be represented as the product of two `n`-digits integers. Since the answer can be very large, return it modulo `1337`. Example 1: Input: n = 2 Output: 987 Explanation: 99 x 91 = 9009, 9009 % 1337 = 987 Example 2: Input: n = 1 Output: 9 ## Largest Palindrome Product Solution C++ ``````class Solution { public: int largestPalindrome(int n) { if(n==1) { return 9; } int hi=pow(10,n)-1; int lo=pow(10,n-1); int kk=1337; for(int i=hi;i>=lo;i--) { string s=to_string(i); string k=s; reverse(k.begin(),k.end()); s+=k; long long int ll=stol(s); for(int j=hi;j>=sqrtl(ll);j--) { if(ll%j==0) { return ll%kk; } } } return 0; } };```Code language: PHP (php)``` ## Largest Palindrome Product Solution Java ``````class Solution { public int largestPalindrome(int n) { if(n==1) return 9; if(n==2) return 987; if(n==3) return 123; if(n==4)return 597; if(n==5)return 677; if(n==6)return 1218; if(n==7)return 877; if(n==8)return 475; return 0; } }```Code language: PHP (php)``` ## Largest Palindrome Product Solution JavaScript ``````var largestPalindrome = function(n) { if (n === 1) return 9; let hi = BigInt(Math.pow(10, n) - 1); let num = hi; while(num > 0) { num -= 1n; const palindrome = BigInt(String(num) + String(num).split('').reverse().join('')); for (let i = hi; i >= 2n; i -= 2n) { const j = palindrome / i; if (j > hi) break; if (palindrome % i === 0n) { return String(palindrome % 1337n); }; } } };```Code language: JavaScript (javascript)``` ## Largest Palindrome Product Solution Python ``````class Solution(object): def largestPalindrome(self, n): if n == 1: return 9 upper_bound = 10**n - 1 lower_bound = 10**(n-1) for i in range(upper_bound, lower_bound, -1): palindrome = int(str(i) + str(i)[::-1]) for j in range(upper_bound, int(palindrome**0.5), -1): if palindrome // j > upper_bound: break if palindrome % j == 0: return palindrome % 1337 solution = Solution() print(solution.largestPalindrome(2)) print(solution.largestPalindrome(1))`````` Scroll to Top
724
2,333
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.9375
4
CC-MAIN-2024-22
latest
en
0.289042
https://lavelle.chem.ucla.edu/forum/viewtopic.php?f=129&t=42236
1,596,581,939,000,000,000
text/html
crawl-data/CC-MAIN-2020-34/segments/1596439735885.72/warc/CC-MAIN-20200804220455-20200805010455-00328.warc.gz
368,746,919
12,024
## Work without change in volume $w=-P\Delta V$ and $w=-\int_{V_{1}}^{V_{2}}PdV=-nRTln\frac{V_{2}}{V_{1}}$ Jose Torres Posts: 31 Joined: Fri Sep 28, 2018 12:22 am ### Work without change in volume How can you find work at a constant temperature when there is no change in the volume? 004932366 Posts: 31 Joined: Wed Nov 22, 2017 3:00 am ### Re: Work without change in volume (If I understand you correctly) In the case when the system is isothermal (constant temperature) and the system is under constant pressure, work can be defined as the external pressure times the change in volume. If there is no change in volume, no work is done. Eric Quach 1C Posts: 30 Joined: Fri Sep 28, 2018 12:20 am ### Re: Work without change in volume as work is equal to -PdeltaV and there is no change in volume, the expression would equal zero and no work is done. Ariel Cheng 2I Posts: 67 Joined: Fri Sep 28, 2018 12:29 am ### Re: Work without change in volume If there is no change in volume, no work will be done. If you are referring to an isothermal process with constant pressure, then I'm pretty sure work = -(external P)(Delta V). 404982241 Posts: 47 Joined: Fri Sep 28, 2018 12:17 am ### Re: Work without change in volume if there is no change in volume then there cannot be any work done. remember, it doesnt matter how hard you push against the wall, if it doesnt move no work was done. Fionna Shue 4L Posts: 59 Joined: Fri Sep 28, 2018 12:18 am ### Re: Work without change in volume If there is no change in volume, that means that the system has not expanded or been compressed. If there is no expansion or compression, there is no work because the work that we are referring to is only expansion/compression work. Pritish Patil 1K Posts: 60 Joined: Fri Sep 28, 2018 12:24 am ### Re: Work without change in volume There is no work done as there is no change in volume. Rhea Churi 4K Posts: 62 Joined: Fri Sep 28, 2018 12:28 am ### Re: Work without change in volume No change in volume means no work is done. Heidi Ibarra Castillo 1D Posts: 60 Joined: Fri Sep 28, 2018 12:19 am ### Re: Work without change in volume since there is no delta v , your delta v would be 0 so your overall work would also be 0 ### Who is online Users browsing this forum: No registered users and 1 guest
672
2,309
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 2, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.3125
3
CC-MAIN-2020-34
latest
en
0.901952
https://www.experts-exchange.com/questions/28008005/Statistical-Probabilities-How-To-Calculate-Sample-Frequencies.html
1,524,629,239,000,000,000
text/html
crawl-data/CC-MAIN-2018-17/segments/1524125947690.43/warc/CC-MAIN-20180425022414-20180425042414-00174.warc.gz
798,438,012
24,318
# Statistical Probabilities - How To Calculate Sample Frequencies Hi All, I need some help with statistical calculations - I can't remember everything from 20 years ago! Situation: We have a production process that has to hit a mean size with a tolerance. Mean = 100mm Tolerance = +/- 2mm So therefore, an item is 'good' if it is greater than or equal to 98mm and less than or equal to 102mm, and bad if it is outside that range. We are willing to accept a maximum 1% chance, that in a run of 10,000 units, there will be at least one item that is bad. The production process slowly gets out of alignment (due to vibration and other factors), and has to be periodically recalibrated.  The misalignment is symmetrical in terms of which way it goes out (it is just as likely to lift the mean upwards as downwards). In order to maintain the quality, we are proposing to do the following: Define a range with mean = 100mm, Tolerance = +/- X where X < 2 mm We will then sample the production output once every Y items. If an item sampled falls outside of +/- X then the production process gets stopped, and maintenance is done to recalibrate everything back to the original status, and then restart the production process. Ultimately, I need to calculate the sampling frequency (Y) we have to use to deliver on the objective. I would likely be doing the calculations by putting them into an excel spreadsheet, but that seems kind of secondary - that just happens to be the brand of calculator I am using. I suspect I need to know the Standard Deviation of the actual outputs of the process when it is freshly calibrated.  If so, then my first thought is that I would need to get a sufficiently large run (100 items - perhaps more, but it has to be practical, ideally this sample size could be a parameter in the calculation of probability), have them all manually checked, and from that data, calculate an actual mean and Standard Deviation.  I have been *told* that the actual output mean is 100mm, but the production people could not give me a standard deviation figure. What I need from you is: 1) What additional information is required, in order to do the calculation 2) what is the actual calculation that I have to do to determine Y. Please do post any queries or clarifications required. Thanks, Alan. LVL 23 ###### Who is Participating? Commented: Hi there Alan, We are willing to accept a maximum 1% chance, that in a run of 10,000 units, there will be at least one item that is bad. That is for every 1,000,000 units produced, 990,000 in 99 batches will be within tolerance, and of the remaining units in 1 batch 1 (or more) could be out of tolerance. For a single out of tolerance item the probability would be 1E-6 (1.0 * 10 to the -6 or 1 in a million). Assuming that you have independence between units ** then 2 or more defectives in 1,000,000 units is of the order of 1E-12 which is too small to make any change to the solution. The solution settles down to a question about relative costs. First there is the cost of measurement. Next, when the testing detects that the production process is going out of tolerance there is a cost to manufacturing of stopping production and re-adjusting the machinery. Those costs need to be balanced against the cost of exceeding your target of more than 1 batch in 100 with 1 (or more) defectives. You might consider this cost is infinite, but if it was truly infinite then the solution would be examine and measure 990,000 items in each 1,000,000 ! Do you have an idea of these (relative) costs? ~~~~ From the manufacturing perspective, is there information about the "speed" of movement of the mean away from 100 mm when the process starts to go wrong. For example your engineers may be able to say that the mean will not move quicker than 0.001 mm each item. There is a big body of statistical work on process control as well as on sampling of batches for defectives. The process control work develops "charts" where you constantly plot the data as sampled against time. You pick a formula (based on cumulative sums and/or standard deviations) to detect the "out of control" situation. Ian ** Note on independence: When the process is "in control" it is reasonable to assume that the variation from the mean of 100 mm is independent from unit to unit. However, when the process is straying from the 100 mm value, the likelihood of the next unit having a positive (or negative) error will be related to the size and direction of the error on the current unit. That is, errors will not be independent. 0 Commented: Without a large number of questionable assumptions, I wouldn't want to rely on any estimate based on a run of less than a million. 0 ConsultantAuthor Commented: Okay, but given what we actually have, how do we move forward to the objective? 0 Commented: You need standard deviation information. Measure it If the sd is 3mm you are in deep trouble. If the sd is 0.00003 mm you are in great shape Find out how fast the 100mm shifts and time your recalibrations. 0 ConsultantAuthor Commented: Hi All, I have been supplied with some raw data from the production team. I have attached in an excel spreadsheet (I can supply a plain text file if you prefer). In the attached, all I received was the data in Data!A2:A1001. I have then added the NORMDIST function in column B, and charted the output (separate chart sheet). I can only assume that this data was generated diligently and the process of measurement was good - they say it was. The shape of the curve is, perhaps, a little too good to be true?  However, I'll go with this for now. The production team claim that since this data was collected (early in the commissioning process), they have reduced the variability (and hence, I guess, the standard deviation) further, by bolting things down to reduce shaking, but they cannot supply me with an updated set of measurements to prove that it has been effective.  I have requested updated measurements once they have them, but I figure it will just change the ultimate answer. Hope this helps. Alan. Sample-Production-Run-Of-1000-Ac.xls 0 ConsultantAuthor Commented: @ShannonEE: That is for every 1,000,000 units produced, 990,000 in 99 batches will be within tolerance, and of the remaining units in 1 batch 1 (or more) could be out of tolerance. That is correct - we want less than 1% of the deliveries (10,000 units in each) to have any items out of spec. For a single out of tolerance item the probability would be 1E-6 (1.0 * 10 to the -6 or 1 in a million). Assuming that you have independence between units ** then 2 or more defectives in 1,000,000 units is of the order of 1E-12 which is too small to make any change to the solution. Okay The solution settles down to a question about relative costs. First there is the cost of measurement. Next, when the testing detects that the production process is going out of tolerance there is a cost to manufacturing of stopping production and re-adjusting the machinery. Those costs need to be balanced against the cost of exceeding your target of more than 1 batch in 100 with 1 (or more) defectives. You might consider this cost is infinite, but if it was truly infinite then the solution would be examine and measure 990,000 items in each 1,000,000 ! Do you have an idea of these (relative) costs? Not yet, but i will investigate. Can we work on some assumed figures for now, and when I have more accurate ones, I can update the calculations?  If so, I will post back with some estimates once I have them. From the manufacturing perspective, is there information about the "speed" of movement of the mean away from 100 mm when the process starts to go wrong. For example your engineers may be able to say that the mean will not move quicker than 0.001 mm each item. There is a big body of statistical work on process control as well as on sampling of batches for defectives. The process control work develops "charts" where you constantly plot the data as sampled against time. You pick a formula (based on cumulative sums and/or standard deviations) to detect the "out of control" situation. Ian I will ask whether any measurement of the 'drift speed' has been attempted. ** Note on independence: When the process is "in control" it is reasonable to assume that the variation from the mean of 100 mm is independent from unit to unit. However, when the process is straying from the 100 mm value, the likelihood of the next unit having a positive (or negative) error will be related to the size and direction of the error on the current unit. That is, errors will not be independent. Yes - noted. I'll be back :-) Alan. 0 ConsultantAuthor Commented: @aburr: You need standard deviation information. Measure it If the sd is 3mm you are in deep trouble. If the sd is 0.00003 mm you are in great shape I have attached (above) sample data.  If my calculations are correct, the SD is about 0.75mm so, predictably, somewhere in the middle of those :-) Find out how fast the 100mm shifts and time your recalibrations. I guess that is the same question that @ShannonEE asked above.  I will see if there is any data on this. Alan. 0 Commented: "We are willing to accept a maximum 1% chance, that in a run of 10,000 units, there will be at least one item that is bad." - You are in trouble.   Either you need better measurements of the 100mm value or you must design your manufacturing process for better precision. - Consider a production run of 10,000 units. Measure 100, getting  100 average +_ 0.75 mm. sd. The tolerance of 2 mm is 2.6 standard deviation. That means that if everything is independent, that 0.5% will be 102 or greater with a similar number below 98mm. Thus out of the 10,000 units produced 100 will be out of tolerance. 0 Commented: Hi there Alan, Its getting close to going home time, with a long weekend coming up. Can you wait a few days? The example data you supplied shows that you should not just do simple calculations using mean and standard deviation.  This is a (very well behaved) time series. If you don't use time series techniques with time series data then variances (and standard deviations, standard errors) WILL BE wrong. Averages can sometimes also be wrong. This example data suggests that the drift in mean level is of the order of 1 mm per 400 items or 0.0025 mm per item.  Does your engineers agree that that would be usual/typical?  More importantly could the drift ever get significantly greater than that? The first differences in item measurement appear to be a stationary process, with significant negative auto-correlation. This suggests that if a particular item is a little bit bigger than usual than the immediate next item will likely be a little bit smaller than usual. However there is little influence on items more than 1 step apart. This is not really a process with normal errors, in that the "tails" cannot extend out as a normal does. They will have a cutoff perhaps determined by physical aspects of the machine. The drift will be expected as a normal part of engineering practice, and so what you require is some parameters to be set for the machine re-adjustment, before the drift gets too close to the boundary (100 +/- 2) for comfort. Your comfort level is going to be determined by the relative costs I mentioned above (which will affect your risk aversion). Although we could do lots of stats, the relative high negative lag1 auto-correlation and limit on the size of "errors" results in a reasonably tight band of values when plotted. A suitable technique would be to projecting forward the upper and lower bounds until they hit a line inside the boundary (eg 100 +/- 1.8). the 1.8 instead of the 2.0 is a safety margin which would be calculated with reference to your relative costs and the first difference error profile (s.d. ~ 0.23). The sampling time interval must be such that the lines will not hit a boundary before the next sampling. Additionally the sampling scheme needs to establish good estimates of what the current bounds are. Ideally you would be looking to set these parameters as determined by the latest set of historical data on hand instead of using values we could determine now for all time. After determining parameters then you can easily calculate binomial probabilities for a batch with a defective. Using that value we can consequently calculate probabilities of 0, 1, 2 ... batches with defectives in (say) 1000 batches. This assumes machine recalibration/reset when necessary as determined by the parameters. More thoughts later. Ian 0 ConsultantAuthor Commented: Thanks Guys - I won't be able to get any new data until next week now, but I appreciate your help so far, and I'll get back to you once I have more info. @aburr:  I see what you are saying.  I was hoping that when the production guys said things have improved since that data set was run, they mean *really* improved, as the numbers do seem to imply that reaching the goal of 1 item out of 10,000 being wrong with less than 1% chance is a long way off. @Ian:  I will find out if the production guys have data on the drift early next week. Have a good weekend. Alan. 0 Commented: You need standard deviation information. Measure it While this is an important step, it is far from adequate. Many of the usual calculations based on standard deviation information tend to assume a Gaussian distribution. But while a Gaussian distribution can be a good approximation to many real world distributions for many purposes, one of the places where the approximation often turns out to be very poor is in the extreme tails of the distribution.  One in a million events often turn out to be a lot further, or a lot closer to the mean than a Gaussian extrapolation would predict. And processes going out of alignment also often causes changes in distributions, so the conditions you are most interested in may be exactly the conditions when your statistical assumptions are most likely to be violated. To achieve the level of assurance you are asking for may take a very careful analysis of every aspect of the production process to thoroughly understand all the potential causes of intolerance and misalignment.  Otherwise, (or in addition) you may need to collect a lot of data.  Perhaps requiring careful monitoring of millions of cycles of  misalignment and recalibration. Or, if you can develop a good model for the kinds of process errors should be expected given the nature of the process, you may be able to adequately verify the model over hundreds of cycles. 0 Commented: "While this is an important step, it is far from adequate." quite so but the information was designed to emphasis the magnitude of the problem and the additional work needed to solve it. "Many of the usual calculations based on standard deviation information tend to assume" (MUST ASSUME)  "a Gaussian distribution. But while a Gaussian distribution can be a good approximation to many real world distributions ..." shannonEE appears to know what he is talking about and offers a way toward a solution 0 ConsultantAuthor Commented: Hi All, This project has been put on hold, so I am going to close this out, and allocate points now. If or when it comes back, I suspect I will be back with another question, but at least I will be starting further down the path due to your assistance here! Thanks, Alan. 0 Question has a verified solution. Are you are experiencing a similar issue? Get a personalized answer when you ask a related question. Have a better answer? Share it in a comment.
3,499
15,628
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.625
4
CC-MAIN-2018-17
latest
en
0.950736
http://www.cplusplus.com/forum/beginner/118440/
1,502,998,698,000,000,000
text/html
crawl-data/CC-MAIN-2017-34/segments/1502886103910.54/warc/CC-MAIN-20170817185948-20170817205948-00421.warc.gz
515,478,811
4,690
### int ---> 0.1 Hi, i would like to know how to make an "int" have a fraction... Like this: ``123`` `````` int object; object = 0.1;`````` BUT OF COURSE I DOSE NOT WORK Can Anyone help? Many Call it a Long Int but i tryed it & it did not work. `cout << "Thanks";` That is not it, my problem is: I can not make it Zero point One. Also i can not do: ``123`` ``````int object,a; a = 1-0.9; object = 0+a;`````` Here is the code: ``12345678910111213141516171819202122232425262728293031323334`` ``````#include using namespace std; int main() { int myArray[6]; int money,shopingCart; long int shirt,pants,other; char item[6]; money = 25 ; shopingCart = 0 ; shirt = 8.95 ; pants = 9.95 ; other = 3.65 ; cout<< "Time to shop... Its BOXING Day!" << "\n" ; cout<< "\n" << "Please select the item you wish to buy." << "\n" ; cout<< "--------------------------------------------------------" << "\n" ; cout<< "------ Shirt ------------ Pants ----------- Other ------" << "\n" ; cout<< "------ \$" << shirt << " ------------ \$" << pants << " -----------\$ " << other << " ------" << "\n" ; cout<< "--------------------------------------------------------" << "\n" ; cout<< "~ You Have Currently: " << money << " \$ " << "\n" ; cin >> item; if (item == "shirt") { cout<< "You requested a shirt"; } system("pause"); } //NOT DONE `````` The Prob is at: ``123`` `````` shirt = 8.95 ; pants = 9.95 ; other = 3.65 ;`````` You are trying to assign a floating point number to a variable that is an integer. `long int shirt,pants,other;` Try. `float shirt, pants, other;` In fact I would also look at the implementation of your other variables as well and see if they need to be floats or doubles. Thank You SO Much. That relay helped. :D So i put it : ``1234`` `````` int myArray[6]; int money,shopingCart; float shirt,pants,other; char item[6];`````` AND IT WORKED :D And I Can do this to: ``123`` ``````float object,a; a = 1-0.9; object = 0+a;`````` But its kinda useless :3 `// Thanks Again! ` Last edited on Topic archived. No new replies allowed.
617
2,049
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.515625
3
CC-MAIN-2017-34
latest
en
0.778123
https://www.lotterypost.com/thread/163826/9
1,480,865,110,000,000,000
text/html
crawl-data/CC-MAIN-2016-50/segments/1480698541322.19/warc/CC-MAIN-20161202170901-00291-ip-10-31-129-80.ec2.internal.warc.gz
987,736,251
18,804
Welcome Guest You last visited December 4, 2016, 9:15 am All times shown are Eastern Time (GMT-5:00) # Ky.(Oct.1-31) Topic closed. 196 replies. Last post 9 years ago by Rocket 455. Page 9 of 14 Ohio United States Member #20 December 20, 2000 56962 Posts Online Posted: October 21, 2007, 7:38 am - IP Logged . Kentucky - 10/21/2007 Evening 231-237-874-872-197-198-249-241 852-853-178-175 ________________ Key Numbers - 1-8-2-7 . Good Luck Clarksville United States Member #487 July 15, 2002 17638 Posts Offline Posted: October 21, 2007, 8:31 am - IP Logged Ky due Pairs Week of 10/21/2007 • 00,02,03,04,05,06,07,08 • 12,13,14,15,16,17,18 • 22,24,25,29 • 33,34,35,37,38,39 • 44,45,49 • 55,58 • 77 • 88 The blue pairs are at least 3 weeks old and the magenta pairs are the OLDEST!! Ky  is due some LLL numbers.  The due root sums are 0,4,6.  The due sum of the last digit is 2,4,9.  The hot keys for last week were 6,7,9.  The cold digits were 0,3,1,2. If you know your number is going to hit, have patience and then KILL IT! You never know when you will get another hit. Clarksville United States Member #487 July 15, 2002 17638 Posts Offline Posted: October 21, 2007, 10:22 am - IP Logged Ky eve due digits are 3,0,1,9,4.  The hot digits are 2,5,6,7,8.  The due digit is a 3 (out 11).  The due no match pair is 0-6 (out 89).  The due doubles are 33,88,38,00,55,05,44,99,49.  The due roots are 2 (out 27), 4(out 22), 6(out 18) and 5 (out 16). Ky eve puzzle:  the vtracs are still in transition. • 05 05 38 • 16 38 16 • 27 16 49 I am looking for 038 or something similar this week in Ky (eve). I am also playing the 88 pair. Is Ky getting another triple?  Who in the world knows???%\$#@ If you know your number is going to hit, have patience and then KILL IT! You never know when you will get another hit. Bellevue, KY United States Member #53340 July 4, 2007 2622 Posts Offline Posted: October 21, 2007, 6:49 pm - IP Logged Eve: 213-345-021-678-567-103-327 She was made for the straitaways She grew up hatin' Chevrolets She's a rocket She was made to burn. ~Kathy Mattea Bellevue, KY United States Member #53340 July 4, 2007 2622 Posts Offline Posted: October 22, 2007, 7:45 am - IP Logged Mid: 455-354-167-327-789-898-508-442-107-751-597-079-450-409 She was made for the straitaways She grew up hatin' Chevrolets She's a rocket She was made to burn. ~Kathy Mattea Ohio United States Member #20 December 20, 2000 56962 Posts Online Posted: October 22, 2007, 8:30 am - IP Logged . Kentucky - 10/22/2007 Mid/Eve 187-182-523-521-742-745-134-137 561-568-725-726 ________________ Key Numbers - 5-1-7-2 . Good Luck Bellevue, KY United States Member #53340 July 4, 2007 2622 Posts Offline Posted: October 22, 2007, 4:21 pm - IP Logged Eve: I played 300-455-305-571 (Lucky's first keys) Other numbers I have: 558-508-308-878-868-377-477-235-167-327-107-127 She was made for the straitaways She grew up hatin' Chevrolets She's a rocket She was made to burn. ~Kathy Mattea Clarksville United States Member #487 July 15, 2002 17638 Posts Offline Posted: October 23, 2007, 6:40 am - IP Logged I didn't get to play anything..and the root sum of 2- 776 fell right out.  I wrenched my back over the week-end and I am so sore. If you know your number is going to hit, have patience and then KILL IT! You never know when you will get another hit. Ohio United States Member #20 December 20, 2000 56962 Posts Online Posted: October 23, 2007, 6:44 am - IP Logged . Kentucky - 10/23/2007 Mid/Eve 861-864-243-248-194-192-839-831 278-276-142-147 ________________ Key Numbers - 8-2-1-7 . Good Luck Louisville United States Member #29004 December 26, 2005 166 Posts Offline Posted: October 23, 2007, 6:52 am - IP Logged I didn't get to play anything..and the root sum of 2- 776 fell right out.  I wrenched my back over the week-end and I am so sore. Hello all! Littleoldlady!, I hope you get well soon! I am sorry to hear about your back. Take good care of yourself please! And feel better soon. richmond ky. United States Member #15877 May 22, 2005 8472 Posts Offline Posted: October 23, 2007, 7:19 am - IP Logged 523-600-625-536-369 Bellevue, KY United States Member #53340 July 4, 2007 2622 Posts Offline Posted: October 23, 2007, 12:09 pm - IP Logged Take it easy on that back Lady! Mid: 332-378-271-221-222-328-327-585-508-300-808-356-350-238-207 I really like that 536 and 523 Angel She was made for the straitaways She grew up hatin' Chevrolets She's a rocket She was made to burn. ~Kathy Mattea Bellevue, KY United States Member #53340 July 4, 2007 2622 Posts Offline Posted: October 23, 2007, 5:12 pm - IP Logged She was made for the straitaways She grew up hatin' Chevrolets She's a rocket She was made to burn. ~Kathy Mattea Clarksville United States Member #487 July 15, 2002 17638 Posts Offline Posted: October 23, 2007, 6:55 pm - IP Logged Ky eve due digits are 3,0,9,4,8,5.  The hot digits are 1,2,6,7.  The due digit is a 3 (out 13).  The due no match pair is 0-6 (out 91).  The due doubles are 33,88,38,00,55,05,44,99,49.  The due roots are  6(out 20), 5 (out 18),7,1. Ky eve puzzle:  the vtracs are still in transition. • 05 49 38 • 49 16 27 • 16 27 05 Vtrac set up • 5,4,1  <--yes, they are all due •     2 • 3 3 2 If you know your number is going to hit, have patience and then KILL IT! You never know when you will get another hit. Ohio United States Member #20 December 20, 2000 56962 Posts Online Posted: October 24, 2007, 8:46 am - IP Logged . Kentucky - 10/24/2007 Mid/Eve 671-673-235-236-183-182-658-651 246-247-132-134 ________________ Key Numbers - 6-2-1-3 . Good Luck Page 9 of 14
2,155
5,678
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.59375
3
CC-MAIN-2016-50
latest
en
0.746929
https://plato.stanford.edu/entries/settheory-alternative/index.html
1,619,003,692,000,000,000
text/html
crawl-data/CC-MAIN-2021-17/segments/1618039536858.83/warc/CC-MAIN-20210421100029-20210421130029-00046.warc.gz
557,957,572
53,962
# Alternative Axiomatic Set Theories First published Tue May 30, 2006; substantive revision Tue Sep 12, 2017 By “alternative set theories” we mean systems of set theory differing significantly from the dominant ZF (Zermelo-Frankel set theory) and its close relatives (though we will review these systems in the article). Among the systems we will review are typed theories of sets, Zermelo set theory and its variations, New Foundations and related systems, positive set theories, and constructive set theories. An interest in the range of alternative set theories does not presuppose an interest in replacing the dominant set theory with one of the alternatives; acquainting ourselves with foundations of mathematics formulated in terms of an alternative system can be instructive as showing us what any set theory (including the usual one) is supposed to do for us. The study of alternative set theories can dispel a facile identification of “set theory” with “Zermelo-Fraenkel set theory”; they are not the same thing. ## 1. Why Set Theory? Why do we do set theory in the first place? The most immediately familiar objects of mathematics which might seem to be sets are geometric figures: but the view that these are best understood as sets of points is a modern view. Classical Greeks, while certainly aware of the formal possibility of viewing geometric figures as sets of points, rejected this view because of their insistence on rejecting the actual infinite. Even an early modern thinker like Spinoza could comment that it is obvious that a line is not a collection of points (whereas for us it may hard to see what else it could be; Ethics, I.15, scholium IV, 96). Cantor’s set theory (which we will not address directly here as it was not formalized) arose out of an analysis of complicated subcollections of the real line defined using tools of what we would now call topology (Cantor 1872). A better advertisement for the usefulness of set theory for foundations of mathematics (or at least one easier to understand for the layman) is Dedekind’s definition of real numbers using “cuts” in the rational numbers (Dedekind 1872) and the definition of the natural numbers as sets due to Frege and Russell (Frege 1884). Most of us agree on what the theories of natural numbers, real numbers, and Euclidean space ought to look like (though constructivist mathematicians will have differences with classical mathematics even here). There was at least initially less agreement as to what a theory of sets ought to look like (or even whether there ought to be a theory of sets). The confidence of at least some mathematicians in their understanding of this subject (or in its coherence as a subject at all) was shaken by the discovery of paradoxes in “naive” set theory around the beginning of the twentieth century. A number of alternative approaches were considered then and later, but a single theory, the Zermelo-Fraenkel theory with the Axiom of Choice (ZFC) dominates the field in practice. One of the strengths of the Zermelo-Fraenkel set theory is that it comes with an image of what the world of set theory is (just as most of us have a common notion of what the natural numbers, the real numbers, and Euclidean space are like): this image is what is called the “cumulative hierarchy” of sets. ### 1.1 The Dedekind construction of the reals In the nineteenth century, analysis (the theory of the real numbers) needed to be put on a firm logical footing. Dedekind’s definition of the reals (Dedekind 1872) was a tool for this purpose. Suppose that the rational numbers are understood (this is of course a major assumption, but certainly the rationals are more easily understood than the reals). Dedekind proposed that the real numbers could be uniquely correlated with cuts in the rationals, where a cut was determined by a pair of sets $$(L, R)$$ with the following properties: $$L$$ and $$R$$ are sets of rationals. $$L$$ and $$R$$ are both nonempty and every element of $$L$$ is less than every element of $$R$$ (so the two sets are disjoint). $$L$$ has no greatest element. The union of $$L$$ and $$R$$ contains all rationals. If we understand the theory of the reals prior to the cuts, we can say that each cut is of the form $$L = (-\infty , r) \cap \mathbf{Q}, R = [r, \infty) \cap \mathbf{Q}$$, where $$\mathbf{Q}$$ is the set of all rationals and $$r$$ is a unique real number uniquely determining and uniquely determined by the cut. It is obvious that each real number $$r$$ uniquely determines a cut in this way (but we need to show that there are no other cuts). Given an arbitrary cut $$(L, R)$$, we propose that $$r$$ will be the least upper bound of $$L$$. The Least Upper Bound Axiom of the usual theory of the reals tells us that $$L$$ has a least upper bound $$(L$$ is nonempty and any element of $$R$$ (which is also nonempty) is an upper bound of $$L$$, so $$L$$ has a least upper bound). Because $$L$$ has no greatest element, its least upper bound $$r$$ cannot belong to $$L$$. Any rational number less than $$r$$ is easily shown to belong to $$L$$ and any rational number greater than or equal to $$r$$ is easily shown to belong to $$R$$, so we see that the cut we chose arbitrarily (and so any cut) is of the form $$L = (-\infty , r) \cap \mathbf{Q}, R = [r, \infty) \cap \mathbf{Q}$$. A bolder move (given a theory of the rationals but no prior theory of the reals) is to define the real numbers as cuts. Notice that this requires us to have not only a theory of the rational numbers (not difficult to develop) but also a theory of sets of rational numbers: if we are to understand a real number to be identified with a cut in the rational numbers, where a cut is a pair of sets of rational numbers, we do need to understand what a set of rational numbers is. If we are to demonstrate the existence of particular real numbers, we need to have some idea what sets of rational numbers there are. An example: when we have defined the rationals, and then defined the reals as the collection of Dedekind cuts, how do we define the square root of 2? It is reasonably straightforward to show that $$(\{x \in \mathbf{Q} \mid x \lt 0 \vee x^2 \lt 2\}, \{x \in \mathbf{Q} \mid x \gt 0 \amp x^2 \ge 2\})$$ is a cut and (once we define arithmetic operations) that it is the positive square root of two. When we formulate this definition, we appear to presuppose that any property of rational numbers determines a set containing just those rational numbers that have that property. ### 1.2 The Frege-Russell definition of the natural numbers Frege (1884) and Russell (1903) suggested that the simpler concept “natural number” also admits analysis in terms of sets. The simplest application of natural numbers is to count finite sets. We are all familiar with finite collections with 1, 2, 3, … elements. Additional sophistication may acquaint us with the empty set with 0 elements. Now consider the number 3. It is associated with a particular property of finite sets: having three elements. With that property it may be argued that we may naturally associate an object, the collection of all sets with three elements. It seems reasonable to identify this set as the number 3. This definition might seem circular (3 is the set of all sets with 3 elements?) but can actually be put on a firm, non-circular footing. Define 0 as the set whose only element is the empty set. Let $$A$$ be any set; define $$A + 1$$ as the collection of all sets $$a \cup \{x\}$$ where $$a \in A$$ and $$x \not\in a$$ (all sets obtained by adding a new element to an element of $$A)$$. Then $$0 + 1$$ is clearly the set we want to understand as $$1, 1 + 1$$ is the set we want to understand as $$2, 2 + 1$$ is the set we want to understand as 3, and so forth. We can go further and define the set $$\mathbf{N}$$ of natural numbers. 0 is a natural number and if $$A$$ is a natural number, so is $$A + 1$$. If a set $$S$$ contains 0 and is closed under successor, it will contain all natural numbers (this is one form of the principle of mathematical induction). Define $$\mathbf{N}$$ as the intersection of all sets $$I$$ which contain 0 and contain $$A + 1$$ whenever $$A$$ is in $$I$$ and $$A + 1$$ exists. One might doubt that there is any inductive set, but consider the set $$V$$ of all $$x$$ such that $$x = x$$ (the universe). There is a formal possibility that $$V$$ itself is finite, in which case there would be a last natural number $$\{V\}$$; one usually assumes an Axiom of Infinity to rule out such possibilities. ## 2. Naive Set Theory In the previous section, we took a completely intuitive approach to our applications of set theory. We assumed that the reader would go along with certain ideas of what sets are like. What are the identity conditions on sets? It seems entirely in accord with common sense to stipulate that a set is precisely determined by its elements: two sets $$A$$ and $$B$$ are the same if for every $$x$$, either $$x \in A$$ and $$x \in B$$ or $$x \not\in A$$ and $$x \not\in B$$: $A = B \leftrightarrow \forall x(x \in A \leftrightarrow x \in B)$ This is called the axiom of extensionality. It also seems reasonable to suppose that there are things which are not sets, but which are capable of being members of sets (such objects are often called atoms or urelements). These objects will have no elements (like the empty set) but will be distinct from one another and from the empty set. This suggests the alternative weaker axiom of extensionality (perhaps actually closer to common sense), $[\textrm{set}(A) \amp \textrm{set}(B) \amp \forall x(x \in A \leftrightarrow x \in B)] \rightarrow A = B$ with an accompanying axiom of sethood $x \in A \rightarrow \textrm{ set}(A)$ What sets are there? The simplest collections are given by enumeration (the set {Tom, Dick, Harry} of men I see over there, or (more abstractly) the set $$\{-2, 2\}$$ of square roots of 4. But even for finite sets it is often more convenient to give a defining property for elements of the set: consider the set of all grandmothers who have a legal address in Boise, Idaho; this is a finite collection but it is inconvenient to list its members. The general idea is that for any property $$P$$, there is a set of all objects with property $$P$$. This can be formalized as follows: For any formula $$P(x)$$, there is a set $$A$$ (the variable $$A$$ should not be free in $$P(x))$$ such that $\forall x(x \in A \leftrightarrow P(x)).$ This is called the axiom of comprehension. If we have weak extensionality and a sethood predicate, we might want to say $\exists A(\textrm{set}(A) \amp \forall x(x \in A \leftrightarrow P(x)))$ The theory with these two axioms of extensionality and comprehension (usually without sethood predicates) is called naive set theory. It is clear that comprehension allows the definition of finite sets: our set of men {Tom, Dick, Harry} can also be written $$\{x \mid {}$$ $$x = \textit{Tom}$$ $${}\lor{}$$ $$x = \textit{Dick}$$ $${}\lor{}$$ $$x = \textit{Harry}\}$$. It also appears to allow for the definition of infinite sets, such as the set $$(\{x \in \mathbf{Q} \mid x \lt 0 \lor x^2 \lt 2\}$$ mentioned above in our definition of the square root of 2. Unfortunately, naive set theory is inconsistent. Russell gave the most convincing proof of this, although his was not the first paradox to be discovered: let $$P(x)$$ be the property $$x \not\in x$$. By the axiom of comprehension, there is a set $$R$$ such that for any $$x, x \in R$$ iff $$x \not\in x$$. But it follows immediately that $$R \in R$$ iff $$R \not\in R$$, which is a contradiction. It must be noted that our formalization of naive set theory is an anachronism. Cantor did not fully formalize his set theory, so it cannot be determined whether his system falls afoul of the paradoxes (he did not think so, and there are some who agree with him now). Frege formalized his system more explicitly, but his system was not precisely a set theory in the modern sense: the most that can be said is that his system is inconsistent, for basically the reason given here, and a full account of the differences between Frege’s system and our “naive set theory” is beside the point (though historically certainly interesting). ### 2.1 The other paradoxes of naive set theory Two other paradoxes of naive set theory are usually mentioned, the paradox of Burali-Forti (1897)—which has historical precedence—and the paradox of Cantor. To review these other paradoxes is a convenient way to review as well what the early set theorists were up to, so we will do it. Our formal presentation of these paradoxes is anachronistic; we are interested in their mathematical content, but not necessarily in the exact way that they were originally presented. Cantor in his theory of sets was concerned with defining notions of infinite cardinal number and infinite ordinal number. Consideration of the largest ordinal number gave rise to the Burali-Forti paradox, and consideration of the largest cardinal number gave rise to the Cantor paradox. Infinite ordinals can be presented in naive set theory as isomorphism classes of well-orderings (a well-ordering is a linear order $$\le$$ with the property that any nonempty subset of its domain has a $$\le$$-least element). We use reflexive, antisymmetric, transitive relations $$\le$$ as our linear orders rather than the associated irreflexive, asymmetric, transitive relations $$\lt$$, because this allows us to distinguish between the ordinal numbers 0 and 1 (Russell and Whitehead took the latter approach and were unable to define an ordinal number 1 in their Principia Mathematica). There is a natural order on ordinal numbers (induced by the fact that of any two well-orderings, at least one will be isomorphic to an initial segment of the other) and it is straightforward to show that it is a well-ordering. Since it is a well-ordering, it belongs to an isomorphism class (an ordinal number!) $$\Omega$$. It is also straightforward to show that the order type of the natural order on the ordinals restricted to the ordinals less than $$\alpha$$ is $$\alpha$$: the order on $$\{0, 1, 2\}$$ is of order type 3, the order on the finite ordinals $$\{0, 1, 2, \ldots \}$$ is the first infinite ordinal $$\omega$$, and so forth. But then the order type of the ordinals $$\lt \Omega$$ is $$\Omega$$ itself, which means that the order type of all the ordinals (including $$\Omega)$$ is “greater”—but $$\Omega$$ was defined as the order type of all the ordinals and should not be greater than itself! This paradox was presented first (Cantor was aware of it) and Cantor did not think that it invalidated his system. Cantor defined two sets as having the same cardinal number if there was a bijection between them. This is of course simply common sense in the finite realm; his originality lay in extending it to the infinite realm and refusing to shy from the apparently paradoxical results. In the infinite realm, cardinal and ordinal number are not isomorphic notions as they are in the finite realm: a well-ordering of order type $$\omega$$ (say, the usual order on the natural numbers) and a well-ordering of order type $$\omega + \omega$$ (say, the order on the natural numbers which puts all odd numbers before all even numbers and puts the sets of odd and even numbers in their usual order) represent different ordinal numbers but their fields (being the same set!) are certainly of the same size. Such “paradoxes” as the apparent equinumerousness of the natural numbers and the perfect squares (noted by Galileo) and the one-to-one correspondence between the points on concentric circles of different radii, noted since the Middle Ages, were viewed as matter-of-fact evidence for equinumerousness of particular infinite sets by Cantor. Novel with Cantor was the demonstration (1872) that there are infinite sets of different sizes according to this criterion. Cantor’s paradox, for which an original reference is difficult to find, is an immediate corollary of this result. If $$A$$ is a set, define the power set of $$A$$ as the set of all subsets of $$A: \wp(A) = \{B \mid \forall x(x \in B \rightarrow x \in A)\}$$. Cantor proved that there can be no bijection between $$A$$ and $$\wp(A)$$ for any set $$A$$. Suppose that $$f$$ is a bijection from $$A$$ to $$\wp(A)$$. Define $$C$$ as $$\{a \in A \mid a \not\in f(a)\}$$. Because $$f$$ is a bijection there must be $$c$$ such that $$f(c) = C$$. Now we notice that $$c \in C \leftrightarrow c \not\in f (c) = C$$, which is a contradiction. Cantor’s theorem just proved shows that for any set $$A$$, there is a set $$\wp(A)$$ which is larger. Cantor’s paradox arises if we try to apply Cantor’s theorem to the set of all sets (or to the universal set, if we suppose (with common sense) that not all objects are sets). If $$V$$ is the universal set, then $$\wp(V)$$, the power set of the universal set (the set of all sets) must have larger cardinality than $$V$$. But clearly no set can be larger in cardinality than the set which contains everything! Cantor’s response to both of these paradoxes was telling (and can be formalized in ZFC or in the related systems which admit proper classes, as we will see below). He essentially reinvoked the classical objections to infinite sets on a higher level. Both the largest cardinal and the largest ordinal arise from considering the very largest collections (such as the universe $$V)$$. Cantor drew a distinction between legitimate mathematical infinities such as the countable infinity of the natural numbers (with its associated cardinal number $$\aleph_0$$ and many ordinal numbers $$\omega , \omega + 1, \ldots ,\omega + \omega ,\ldots)$$, the larger infinity of the continuum, and further infinities derived from these, which he called transfinite, and what he called the Absolute Infinite, the infinity of the collection containing everything and of such related notions as the largest cardinal and the largest ordinal. In this he followed St. Augustine (De Civitate Dei) who argued in late classical times that the infinite collection of natural numbers certainly existed as an actual infinity because God was aware of each and every natural number, but because God’s knowledge encompassed all the natural numbers their totality was somehow finite in His sight. The fact that his defense of set theory against the Burali-Forti and Cantor paradoxes was subsequently successfully formalized in ZFC and the related class systems leads some to believe that Cantor’s own set theory was not implicated in the paradoxes. ## 3. Typed Theories An early response to the paradoxes of set theory (by Russell, who discovered one of them) was the development of type theory (see the appendix to Russell’s The Principles of Mathematics (1903) or Whitehead & Russell’s Principia Mathematica (1910–1913). The simplest theory of this kind, which we call TST (Théorie Simple des Types, from the French, following Forster and others) is obtained as follows. We admit sorts of object indexed by the natural numbers (this is purely a typographical convenience; no actual reference to natural numbers is involved). Type 0 is inhabited by “individuals” with no specified structure. Type 1 is inhabited by sets of type 0 objects, and in general type $$n + 1$$ is inhabited by sets of type $$n$$ objects. The type system is enforced by the grammar of the language. Atomic sentences are equations or membership statements, and they are only well-formed if they take one of the forms $$x^{n} = y^{n}$$ or $$x^{n} \in y^{n+1}$$. The axioms of extensionality of TST take the form $A^{n+1} = B^{n+1} \leftrightarrow \forall x^n (x^n \in A^{n+1} \leftrightarrow x^n \in B^{n+1});$ there is a separate axiom for each $$n$$. The axioms of comprehension of TST take the form (for any choice of a type $$n$$, a formula $$\phi$$, and a variable $$A^{n+1}$$ not free in $$\phi)$$ $\exists A^{n+1}\forall x^n (x^n \in A^{n+1} \leftrightarrow \phi)$ It is interesting to observe that the axioms of TST are precisely analogous to those of naive set theory. This is not the original type theory of Russell. Leaving aside Russell’s use of “propositional functions” instead of classes and relations, the system of Principia Mathematica (Whitehead & Russell 1910–1913), hereinafter PM fails to be a set theory because it has separate types for relations (propositional functions of arity $$\gt 1)$$. It was not until Norbert Wiener observed in 1914 that it was possible to define the ordered pair as a set (his definition of $$\lt x, y \gt$$ was not the current $$\{\{x\},\{x, y\}\}$$, due to Kuratowski (1921), but $$\{\{\{x\}, \varnothing \},\{\{y\}\}\})$$ that it became clear that it is possible to code relation types into set types. Russell frequently said in English that relations could be understood as sets of pairs (or longer tuples) but he had no implementation of this idea (in fact, he defined ordered pairs as relations in PM rather than the now usual reverse!) For a discussion of the history of this simplified type theory, see Wang 1970. Further, Russell was worried about circularity in definitions of sets (which he believed to be the cause of the paradoxes) to the extent that he did not permit a set of a given type to be defined by a condition which involved quantification over the same type or a higher type. This predicativity restriction weakens the mathematical power of set theory to an extreme degree. In Russell’s system, the restriction is implemented by characterizing a type not only by the type of its elements but by an additional integer parameter called its “order”. For any object with elements, the order of its type is higher than the order of the type of its elements. Further, the comprehension axiom is restricted so that the condition defining a set of a type of order $$n$$ can contain parameters only of types with order $$\le n$$ and quantifiers only over types with order $$\lt n$$. Russell’s system is further complicated by the fact that it is not a theory of sets, as we noted above, because it also contains relation types (this makes a full account of it here inappropriate). Even if we restrict to types of sets, a simple linear hierarchy of types is not possible if types have order, because each type has “power set” types of each order higher than its own. We present a typed theory of sets with predicativity restrictions (we have seen this in work of Marcel Crabbé, but it may be older). In this system, the types do not have orders, but Russell’s ramified type theory with orders (complete with relation types) can be interpreted in it (a technical result of which we do not give an account here). The syntax of predicative TST is the same as that of the original system. The axioms of extensionality are also the same. The axioms of comprehension of predicative TST take the form (for any choice of a type $$n$$, a formula $$\phi$$, and a variable $$A^{n+1}$$ not free in $$\phi$$, satisfying the restriction that no parameter of type $$n + 2$$ or greater appears in $$\phi$$, nor does any quantifier over type $$n + 1$$ or higher appear in $$\phi)$$ $\exists A^{n+1}\forall x^n (x^n \in A^{n+1} \leftrightarrow \phi)$ Predicative mathematics does not permit unrestricted mathematical induction: In impredicative type theory, we can define 0 and the “successor” $$A^+$$ of a set just as we did above in naive set theory (in a given type $$n)$$ then define the set of natural numbers: \begin{aligned} \mathbf{N}^{n+1} = \{m^n \mid\forall A^{n+1}[[0^n \in A^{n+1} \amp \forall B^n (B^n \in A^{n+1} \rightarrow (B^+)^n \in A^{n+1})] \\ \rightarrow m^n \in A^{n+1}] \} \end{aligned} Russell would object that the set $$\mathbf{N}^{n+1}$$ is being “defined” in terms of facts about all sets $$A^{n+1}$$: something is a type $$n + 1$$ natural number just in case it belongs to all type $$n + 1$$ inductive sets. But one of the type $$n + 1$$ sets in terms of which it is being “defined” is $$\mathbf{N}^{n+1}$$ itself. (Independently of predicativist scruples, one does need an Axiom of Infinity to ensure that all natural numbers exist; this is frequently added to TST, as is the Axiom of Choice). For similar reasons, predicative mathematics does not permit the Least Upper Bound Axiom of analysis (the proof of this axiom in a set theoretical implementation of the reals as Dedekind cuts fails for the same kind of reason). Russell solved these problems in PM by adopting an Axiom of Reducibility which in effect eliminated the predicativity restrictions, but in later comments on PM he advocated abandoning this axiom. Most mathematicians are not predicativists; in our opinion the best answer to predicativist objections is to deny that comprehension axioms can properly be construed as definitions (though we admit that we seem to find ourselves frequently speaking loosely of $$\phi$$ as the condition which “defines” $$\{x \mid \phi \})$$. It should be noted that it is possible to do a significant amount of mathematics while obeying predicativist scruples. The set of natural numbers cannot be defined in the predicative version of TST, but the set of singletons of natural numbers can be defined and can be used to prove some instances of induction (enough to do quite a bit of elementary mathematics). Similarly, a version of the Dedekind construction of the real numbers can be carried out, in which many important instances of the least upper bound axiom will be provable. Type theories are still in use, mostly in theoretical computer science, but these are type theories of functions, with complexity similar to or greater than the complexity of the system of PM, and fortunately outside the scope of this study. ## 4. Zermelo Set Theory and Its Refinements In this section we discuss the development of the usual set theory ZFC. It did not spring up full-grown like Athena from the head of Zeus! ### 4.1 Zermelo set theory The original theory Z of Zermelo (1908) had the following axioms: Extensionality: Sets with the same elements are equal. (The original version appears to permit non-sets (atoms) which all have no elements, much as in my discussion above under naive set theory). Pairing: For any objects $$a$$ and $$b$$, there is a set $$\{a, b\} = \{x \mid x = a \lor x = b\}$$. (the original axiom also provided the empty set and singleton sets). Union: For any set $$A$$, there is a set $$\cup A = \{x \mid \exists y(x \in y \amp y \in A)\}$$. The union of $$A$$ contains all the elements of elements of $$A$$. Power Set: For any set $$A$$, there is a set $$\wp(A) = \{x \mid \forall y(y \in x \rightarrow y \in A)\}$$. The power set of $$A$$ is the set of all subsets of $$A$$. Infinity: There is an infinite set. Zermelo’s original formulation asserted the existence of a set containing $$\varnothing$$ and closed under the singleton operation: $$\{\varnothing ,\{\varnothing \},\{\{\varnothing \}\}, \ldots \}$$. It is now more usual to assert the existence of a set which contains $$\varnothing$$ and is closed under the von Neumann successor operation $$x \mapsto x \cup \{x\}$$. (Neither of these axioms implies the other in the presence of the other axioms, though they yield theories with the same mathematical strength). Separation: For any property $$P(x)$$ of objects and any set $$A$$, there is a set $$\{x \in A \mid P(x)\}$$ which contains all the elements of $$A$$ with the property $$P$$. Choice: For every set $$C$$ of pairwise disjoint nonempty sets, there is a set whose intersection with each element of $$C$$ has exactly one element. We note that we do not need an axiom asserting the existence of $$\varnothing$$ (which is frequently included in axiom lists as it was in Zermelo’s original axiom set): the existence of any object (guaranteed by logic unless we use a free logic) along with separation will do the trick, and even if we use a free logic the set provided by Infinity will serve (the axiom of Infinity can be reframed to say that there is a set which contains all sets with no elements (without presupposing that there are any) and is closed under the desired successor operation). Every axiom of Zermelo set theory except Choice is an axiom of naive set theory. Zermelo chose enough axioms so that the mathematical applications of set theory could be carried out and restricted the axioms sufficiently that the paradoxes could not apparently be derived. The most general comprehension axiom of Z is the axiom of Separation. If we try to replicate the Russell paradox by constructing the set $$R' = \{x \in A \mid x \not\in x\}$$, we discover that $$R' \in R' \leftrightarrow R' \in A \amp R' \not\in R'$$, from which we deduce $$R' \not\in A$$. For any set $$A$$, we can construct a set which does not belong to it. Another way to put this is that Z proves that there is no universal set: if we had the universal set $$V$$, we would have naive comprehension, because we could define $$\{x \mid P(x)\}$$ as $$\{x \in V \mid P(x)\}$$ for any property $$P(x)$$, including the fatal $$x \not\in x$$. In order to apply the axiom of separation, we need to have some sets $$A$$ from which to carve out subsets using properties. The other axioms allow the construction of a lot of sets (all sets needed for classical mathematics outside of set theory, though not all of the sets that even Cantor had constructed with apparent safety). The elimination of the universal set seems to arouse resistance in some quarters (many of the alternative set theories recover it, and the theories with sets and classes recover at least a universe of all sets). On the other hand, the elimination of the universal set seems to go along with Cantor’s idea that the problem with the paradoxes was that they involved Absolutely Infinite collections—purported “sets” that are too large. ### 4.2 From Zermelo set theory to ZFC Zermelo set theory came to be modified in certain ways. The formulation of the axiom of separation was made explicit: “for each formula $$\phi$$ of the first-order language with equality and membership, $$\{x \in A \mid \phi \}$$ exists”. Zermelo’s original formulation referred more vaguely to properties in general (and Zermelo himself seems to have objected to the modern formulation as too restrictive). The non-sets are usually abandoned (so the formulation of Extensionality is stronger) though ZFA (Zermelo-Fraenkel set theory with atoms) was used in the first independence proofs for the Axiom of Choice. The axiom scheme of Replacement was added by Fraenkel to make it possible to construct larger sets (even $$\aleph_{\omega}$$ cannot be proved to exist in Zermelo set theory). The basic idea is that any collection the same size as a set is a set, which can be logically formulated as follows: if $$\phi(x,y)$$ is a functional formula $$\forall x\forall y\forall z[(\phi(x,y) \amp \phi(x,z)) \rightarrow y = z$$] and $$A$$ is a set then there is a set $$\{y \mid \exists x \in A(\phi(x,y))\}$$. The axiom scheme of Foundation was added as a definite conception of what the universe of sets is like. The idea of the cumulative hierarchy of sets is that we construct sets in a sequence of stages indexed by the ordinals: at stage 0, the empty set is constructed; at stage $$\alpha + 1$$, all subsets of the set of stage $$\alpha$$ sets are constructed; at a limit stage $$\lambda$$, the union of all stages with index less than $$\lambda$$ is constructed. Replacement is important for the implementation of this idea, as Z only permits one to construct sets belonging to the stages $$V_n$$ and $$V_{\omega +n}$$ for $$n$$ a natural number (we use the notation $$V_{\alpha}$$ for the collection of all sets constructed at stage $$\alpha)$$. The intention of the Foundation Axiom is to assert that every set belongs to some $$V_{\alpha}$$ ; the commonest formulation is the mysterious assertion that for any nonempty set $$A$$, there is an element $$x$$ of $$A$$ such that $$x$$ is disjoint from $$A$$. To see that this is at least implied by Foundation, consider that there must be a smallest $$\alpha$$ such that $$A$$ meets $$V_{\alpha}$$, and any $$x$$ in this $$V_{\alpha}$$ will have elements (if any) only of smaller rank and so not in $$A$$. Zermelo set theory has difficulties with the cumulative hierarchy. The usual form of the Zermelo axioms (or Zermelo’s original form) does not prove the existence of $$V_{\alpha}$$ as a set unless $$\alpha$$ is finite. If the Axiom of Infinity is reformulated to assert the existence of $$V_{\omega}$$, then the ranks proved to exist as sets by Zermelo set theory are exactly those which appear in the natural model $$V_{\omega +\omega}$$ of this theory. Also, Zermelo set theory does not prove the existence of transitive closures of sets, which makes it difficult to assign ranks to sets in general. Zermelo set theory plus the assertion that every set belongs to a rank $$V_{\alpha}$$ which is a set implies Foundation, the existence of expected ranks $$V_{\alpha}$$ (not the existence of such ranks for all ordinals $$\alpha$$ but the existence of such a rank containing each set which can be shown to exist), and the existence of transitive closures, and can be interpreted in Zermelo set theory without additional assumptions. A reader who wants to examine models of Zermelo set theory which exhibit pathological properties in this regard can consult Mathias (2001b). The Axiom of Choice is an object of suspicion to some mathematicians because it is not constructive. It has become customary to indicate when a proof in set theory uses Choice, although most mathematicians accept it as an axiom. The Axiom of Replacement is sometimes replaced with the Axiom of Collection, which asserts, for any formula $$\phi(x,y)$$: $\forall x \in A\exists y(\phi(x,y)) \rightarrow \exists C\forall x \in A\exists y \in C(\phi(x,y))$ Note that $$\phi$$ here does not need to be functional; if for every $$x \in A$$, there are some $$y$$s such that $$\phi(x, y)$$, there is a set such that for every $$x \in A$$, there is $$y$$ in that set such that $$\phi(x, y)$$. One way to build this set is to take, for each $$x \in A$$, all the $$y$$s of minimal rank such that $$\phi(x, y)$$ and put them in $$C$$. In the presence of all other axioms of ZFC, Replacement and Collection are equivalent; when the axiomatics is perturbed (or when the logic is perturbed, as in intuitionistic set theory) the difference becomes important. The Axiom of Foundation is equivalent to $$\in$$-Induction here but not in other contexts: $$\in$$-Induction is the assertion that for any formula $$\phi$$: $\forall x((\forall y \in x(\phi(y)) \rightarrow \phi(x)) \rightarrow \forall x\phi(x)$ i.e., anything which is true of any set if it is true of all its elements is true of every set without exception. ### 4.3 Critique of Zermelo set theory A common criticism of Zermelo set theory is that it is an ad hoc selection of axioms chosen to avoid paradox, and we have no reason to believe that it actually achieves this end. We believe such objections to be unfounded, for two reasons. The first is that the theory of types (which is the result of a principled single modification of naive set theory) is easily shown to be precisely equivalent in consistency strength and expressive power to Z with the restriction that all quantifiers in the formulas $$\phi$$ in instances of separation must be bounded in a set; this casts doubt on the idea that the choice of axioms in Z is particularly arbitrary. The fact that the von Neumann-Gödel-Bernays class theory (discussed below) turns out to be a conservative extension of ZFC suggests that full ZFC is a precise formulation of Cantor’s ideas about the Absolute Infinite (and so not arbitrary). Further, the introduction of the Foundation Axiom identifies the set theories of this class as the theories of a particular class of structures (the well-founded sets) of which the Zermelo axioms certainly seem to hold (whether Replacement holds so evidently is another matter). These theories are frequently extended with large cardinal axioms (the existence of inaccessible cardinals, Mahlo cardinals, weakly compact cardinals, measurable cardinals and so forth). These do not to us signal a new kind of set theory, but represent answers to the question as to how large the universe of Zermelo-style set theory is. The choice of Zermelo set theory (leaving aside whether one goes on to ZFC) rules out the use of equivalence classes of equinumerous sets as cardinals (and so the use of the Frege natural numbers) or the use of equivalence classes of well-orderings as ordinals. There is no difficulty with the use of the Dedekind cut formulation of the reals (once the rationals have been introduced). Instead of the equivalence class formulations of cardinal and ordinal numbers, the von Neumann ordinals are used: a von Neumann ordinal is a transitive set (all of its elements are among its subsets) which is well-ordered by membership. The order type of a well-ordering is the von Neumann ordinal of the same length (the axiom of Replacement is needed to prove that every set well-ordering has an order type; this can fail to be true in Zermelo set theory, where the von Neumann ordinal $$\omega + \omega$$ cannot be proven to exist but there are certainly well-orderings of this and longer types). The cardinal number $$|A|$$ is defined as the smallest order type of a well-ordering of $$A$$ (this requires Choice to work; without choice, we can use Foundation to define the cardinal of a set $$A$$ as the set of all sets equinumerous with $$A$$ and belonging to the first $$V_{\alpha}$$ containing sets equinumerous with $$A)$$. This is one respect in which Cantor’s ideas do not agree with the modern conception; he appears to have thought that he could define at least cardinal numbers as equivalence classes (or at least that is one way to interpret what he says), although such equivalence classes would of course be Absolutely Infinite. ### 4.4 Weak variations and theories with hypersets Some weaker subsystems of ZFC are used. Zermelo set theory, the system Z described above, is still studied. The further restriction of the axiom of separation to formulas in which all quantifiers are bounded in sets $$(\Delta_0$$ separation) yields “bounded Zermelo set theory” or “Mac Lane set theory”, so called because it has been advocated as a foundation for mathematics by Saunders Mac Lane (1986). It is interesting to observe that Mac Lane set theory is precisely equivalent in consistency strength and expressive power to TST with the Axiom of Infinity. Z is strictly stronger than Mac Lane set theory; the former theory proves the consistency of the latter. See Mathias 2001a for an extensive discussion. The set theory KPU (Kripke-Platek set theory with urelements, for which see Barwise 1975) is of interest for technical reasons in model theory. The axioms of KPU are the weak Extensionality which allows urelements, Pairing, Union, $$\Delta_0$$ separation, $$\Delta_0$$ collection, and $$\in$$-induction for arbitrary formulas. Note the absence of Power Set. The technical advantage of KPU is that all of its constructions are “absolute” in a suitable sense. This makes the theory suitable for the development of an extension of recursion theory to sets. The dominance of ZFC is nowhere more evident than in the great enthusiasm and sense of a new departure found in reactions to the very slight variation of this kind of set theory embodied in versions of ZFC without the foundation axiom. It should be noted that the Foundation Axiom was not part of the original system! We describe two theories out of a range of possible theories of hypersets (Zermelo-Frankel set theory without foundation). A source for theories of this kind is Aczel 1988. In the following paragraphs, we will use the term “graph” for a relation, and “extensional graph” for a relation $$R$$ satisfying $(\forall y,z \in \textit{field}(R)[\forall x(xRy \equiv xRz) \rightarrow y = z].$ A decoration of a graph $$G$$ is a function $$f$$ with the property that $$f(x) = \{f(y) \mid yGx\}$$ for all $$x$$ in the field of $$G$$. In ZFC, all well-founded relations have unique decorations, and non-well-founded relations have no decorations. Aczel proposed his Anti-Foundation Axiom: every set graph has a unique decoration. Maurice Boffa considered a stronger axiom: every partial, injective decoration of an extensional set graph $$G$$ whose domain contains the $$G$$-preimages of all its elements can be extended to an injective decoration of all of $$G$$. The Aczel system is distinct from the Boffa system in having fewer ill-founded objects. For example, the Aczel theory proves that there is just one object which is its own sole element, while the Boffa theory provides a proper class of such objects. The Aczel system has been especially popular, and we ourselves witnessed a great deal of enthusiasm for this subversion of the cumulative hierarchy. We are doubtless not the only ones to point this out, but we did notice and point out to others that at least the Aczel theory has a perfectly obvious analogue of the cumulative hierarchy. If $$A_{\alpha}$$ is a rank, the successor rank $$A_{\alpha +1}$$ will consist of all those sets which can be associated with graphs $$G$$ with a selected point $$t$$ with all elements of the field of $$G$$ taken from $$A_{\alpha}$$. The zero and limit ranks are constructed just as in ZFC. Every set belongs to an $$A_{\alpha}$$ for $$\alpha$$ less than or equal to the cardinality of its transitive closure. (It seems harder to impose rank on the world of the Boffa theory, though it can be done: the proper class of self-singletons is an obvious difficulty, to begin with!). It is true (and has been the object of applications in computer science) that it is useful to admit reflexive structures for some purposes. The kind of reflexivity permitted by Aczel’s theory has been useful for some such applications. However, such structures are modelled in well-founded set theory (using relations other than membership) with hardly more difficulty, and the reflexivity admitted by Aczel’s theory (or even by a more liberal theory like that of Boffa) doesn’t come near the kind of non-well-foundedness found in genuinely alternative set theories, especially those with universal set. These theories are close variants of the usual theory ZFC, caused by perturbing the last axiom to be added to this system historically (although, to be fair, the Axiom of Foundation is the one which arguably defines the unique structure which the usual set theory is about; the anti-foundation axioms thus invite us to contemplate different, even if closely related, universal structures). ## 5. Theories with Classes ### 5.1 Class theory over ZFC Even those mathematicians who accepted the Zermelo-style set theories as the standard (most of them!) often found themselves wanting to talk about “all sets”, or “all ordinals”, or similar concepts. Von Neumann (who actually formulated a theory of functions, not sets), Gödel, and Bernays developed closely related systems which admit, in addition to the sets found in ZFC, general collections of these sets. (In Hallett 1984, it is argued that the system of von Neumann was the first system in which the Axiom of Replacement was implemented correctly [there were technical problems with Fraenkel’s formulation], so it may actually be the first implementation of ZFC.) We present a theory of this kind. Its objects are classes. Among the classes we identify those which are elements as sets. Axiom of extensionality: Classes with the same elements are the same. Definition: A class $$x$$ is a set just in case there is a class $$y$$ such that $$x \in y$$. A class which is not a set is said to be a proper class. Axiom of class comprehension: For any formula $$\phi(x)$$ which involves quantification only over all sets (not over all classes), there is a class $$\{x \mid \phi(x)\}$$ which contains exactly those sets $$x$$ for which $$\phi(x)$$ is true. The axiom scheme of class comprehension with quantification only over sets admits a finite axiomatization (a finite selection of formulas $$\phi$$ (most with parameters) suffices) and was historically first presented in this way. It is an immediate consequence of class comprehension that the Russell class $$\{x \mid x \not\in x\}$$ cannot be a set (so there is at least one proper class). Axiom of limitation of size: A class $$C$$ is proper if and only if there is a class bijection between $$C$$ and the universe. This elegant axiom is essentially due to von Neumann. A class bijection is a class of ordered pairs; there might be pathology here if we did not have enough pairs as sets, but other axioms do provide for their existence. It is interesting to observe that this axiom implies Replacement (a class which is the same size as a set cannot be the same size as the universe) and, surprisingly, implies Choice (the von Neumann ordinals make up a proper class essentially by the Burali-Forti paradox, so the universe must be the same size as the class of ordinals, and the class bijection between the universe and the ordinals allows us to define a global well-ordering of the universe, whose existence immediately implies Choice). Although Class Comprehension and Limitation of Size appear to tell us exactly what classes there are and what sets there are, more axioms are required to make our universe large enough. These can be taken to be the axioms of Z (other than extensionality and choice, which are not needed): the sethood of pairs of sets, unions of sets, power sets of sets, and the existence of an infinite set are enough to give us the world of ZFC. Foundation is usually added. The resulting theory is a conservative extension of ZFC: it proves all the theorems of ZFC about sets, and it does not prove any theorem about sets which is not provable in ZFC. For those with qualms about choice (or about global choice), Limitation of Size can be restricted to merely assert that the image of a set under a class function is a set. We have two comments about this. First, the mental furniture of set theorists does seem to include proper classes, though usually it is important to them that all talk of proper classes can be explained away (the proper classes are in some sense “virtual”). Second, this theory (especially the version with the strong axiom of Limitation of Size) seems to capture the intuition of Cantor about the Absolute Infinite. A stronger theory with classes, but still essentially a version of standard set theory, is the Kelley-Morse set theory in which Class Comprehension is strengthened to allow quantification over all classes in the formulas defining classes. Kelley-Morse set theory is not finitely axiomatizable, and it is stronger than ZFC in the sense that it allows a proof of the consistency of ZFC. ### 5.2 Ackermann set theory The next theory we present was actually embedded in the set theoretical proposals of Paul Finsler, which were (taken as a whole) incoherent (see the notes on Finsler set theory available in the Other Internet Resources). Ackermann later (and apparently independently) presented it again. It is to all appearances a different theory from the standard one (it is our first genuine “alternative set theory”) but it turns out to be essentially the same theory as ZF (and choice can be added to make it essentially the same as ZFC). Ackermann set theory is a theory of classes in which some classes are sets, but there is no simple definition of which classes are sets (in fact, the whole power of the theory is that the notion of set is indefinable!) All objects are classes. The primitive notions are equality, membership and sethood. The axioms are Axiom of extensionality: Classes with the same elements are equal. Axiom of class comprehension: For any formula $$\phi$$, there is a class $$\{x \in V \mid \phi(x)\}$$ whose elements are exactly the sets $$x$$ such that $$\phi(x) (V$$ here denotes the class of all sets). [But note that it is not the case here that all elements of classes are sets]. Axiom of elements: Any element of a set is a set. Axiom of subsets: Any subset of a set is a set. Axiom of set comprehension: For any formula $$\phi (x)$$ which does not mention the sethood predicate and in which all free variables other than $$x$$ denote sets, and which further has the property that $$\phi(x)$$ is only true of sets $$x$$, the class $$\{x \mid \phi \}$$ (which exists by Class Comprehension since all suitable $$x$$ are sets) is a set. One can conveniently add axioms of Foundation and Choice to this system. To see the point (mainly, to understand what Set Comprehension says) it is a good idea to go through some derivations. The formula $$x = a \lor x = b$$ (where $$a$$ and $$b$$ are sets) does not mention sethood, has only the sets $$a$$ and $$b$$ as parameters, and is true only of sets. Thus it defines a set, and Pairing is true for sets. The formula $$\exists y(x \in y \amp y \in a)$$, where $$a$$ is a set, does not mention sethood, has only the set $$a$$ as a parameter, and is true only of sets by the Axiom of Elements (any witness $$y$$ belongs to the set $$a$$, so $$y$$ is a set, and $$x$$ belongs to the set $$y$$, so $$x$$ is a set). Thus Union is true for sets. The formula $$\forall y(y \in x \rightarrow y \in a)$$, where $$a$$ is a set, does not mention sethood, has only the set $$a$$ as a parameter, and is true only of sets by the Axiom of Subsets. Thus Power Set is true for sets. The big surprise is that this system proves Infinity. The formula $$x \ne x$$ clearly defines a set, the empty set $$\varnothing$$. Consider the formula $\forall I\left[\varnothing \in I \amp \forall y(y \in I \rightarrow y\cup \{y\} \in I) \rightarrow x \in I\right]$ This formula does not mention sethood and has no parameters (or just the set parameter $$\varnothing)$$. The class $$V$$ of all sets has $$\varnothing$$ as a member and contains $$y \cup \{y\}$$ if it contains $$y$$ by Pairing and Union for sets (already shown). Thus any $$x$$ satisfying this formula is a set, whence the extension of the formula is a set (clearly the usual set of von Neumann natural numbers). So Infinity is true in the sets of Ackermann set theory. It is possible (but harder) to prove Replacement as well in the realm of well-founded sets (which can be the entire universe of sets if Foundation for classes is added as an axiom). It is demonstrable that the theorems of Ackermann set theory about well-founded sets are exactly the theorems of ZF (Lévy 1959; Reinhardt 1970). We attempt to motivate this theory (in terms of the cumulative hierarchy). Think of classes as collections which merely exist potentially. The sets are those classes which actually get constructed. Extensionality for classes seems unproblematic. All collections of the actual sets could have been constructed by constructing one more stage of the cumulative hierarchy: this justifies class comprehension. Elements of actual sets are actual sets; subcollections of actual sets are actual sets; these do not seem problematic. Finally, we assert that any collection of classes which is defined without reference to the realm of actual sets, which is defined in terms of specific objects which are actual, and which turns out only to contain actual elements is actual. When one gets one’s mind around this last assertion, it can seem reasonable. A particular thing to note about such a definition is that it is “absolute”: the collection of all actual sets is a proper class and not itself an actual set, because we are not committed to stopping the construction of actual sets at any particular point; but the elements of a collection satisfying the conditions of set comprehension do not depend on how many potential collections we make actual (this is why the actuality predicate is not allowed to appear in the “defining” formula). It may be a minority opinion, but we believe (after some contemplation) that the Ackermann axioms have their own distinctive philosophical motivation which deserves consideration, particularly since it turns out to yield basically the same theory as ZF from an apparently quite different starting point. Ackermann set theory actually proves that there are classes which have non-set classes as elements; the difference between sets and classes provably cannot be as in von Neumann-Gödel-Bernays class theory. A quick proof of this concerns ordinals. There is a proper class von Neumann ordinal $$\Omega$$, the class of all set von Neumann ordinals. We can prove the existence of $$\Omega + 1$$ using set comprehension: if $$\Omega$$ were the last ordinal, then “$$x$$ is a von Neumann ordinal with a successor” would be a predicate not mentioning sethood, with no parameters (so all parameters sets), and true only of sets. But this would make the class of all set ordinals a set, and the class of all set ordinals is $$\Omega$$ itself, which would lead to the Burali-Forti paradox. So $$\Omega + 1$$ must exist, and is a proper class with the proper class $$\Omega$$ as an element. There is a meta-theorem of ZF called the Reflection Principle which asserts that any first-order assertion which is true of the universe $$V$$ is also true of some set. This means that for any particular proof in ZF, there is a set $$M$$ which might as well be the universe (because any proof uses only finitely many axioms). A suitable such set $$M$$ can be construed as the universe of sets and the actual universe $$V$$ can be construed as the universe of classes. The set $$M$$ has the closure properties asserted in Elements and Subsets if it is a limit rank; it can be chosen to have as many of the closure properties asserted in Set Comprehension (translated into terms of $$M)$$ as a proof in Ackermann set theory requires. This machinery is what is used to show that Ackermann set theory proves nothing about sets that ZF cannot prove: one translates a proof in Ackermann set theory into a proof in ZFC using the Reflection Principle. ## 6. New Foundations and Related Systems ### 6.1 The definition of NF We have alluded already to the fact that the simple typed theory of sets TST can be shown to be equivalent to an untyped theory (Mac Lane set theory, aka bounded Zermelo set theory). We briefly indicate how to do this: choose any map $$f$$ in the model which is an injection with domain the set of singletons of type 0 objects and range included in type 1 (the identity on singletons of type 0 objects is an example). Identify each type 0 object $$x^0$$ with the type 1 object $$f (\{x^0\})$$; then introduce exactly those identifications between objects of different types which are required by extensionality: every type 0 object is identified with a type 1 object, and an easy meta-induction shows that every type $$n$$ object is identified with some type $$n + 1$$ object. The resulting structure will satisfy all the axioms of Zermelo set theory except Separation, and will satisfy all instances of Separation in which each quantifier is bounded in a set (this boundedness comes in because each instance of Comprehension in TST has each quantifier bounded in a type, which becomes a bounding set for that quantifier in the interpretation of Mac Lane set theory). It will satisfy Infinity and Choice if the original model of TST satisfies these axioms. The simplest map $$f$$ is just the identity on singletons of type 0 objects, which will have the effect of identifying each type 0 object with its own singleton (a failure of foundation). It can be arranged for the structure to satisfy Foundation: for example, if Choice holds type 0 can be well-ordered and each element of type 0 identified with the corresponding segment in the well-ordering, so that type 0 becomes a von Neumann ordinal. (A structure of this kind will never model Replacement, as there will be a countable sequence of cardinals [the cardinalities of the types] which is definable and cofinal below the cardinality of the universe.) See Mathias 2001a for a full account. Quine’s set theory New Foundations (abbreviated NF, proposed in 1937 in his paper “New Foundations for Mathematical Logic”), is also based on a procedure for identifying the objects in successive types in order to obtain an untyped theory. However, in the case of NF and related theories, the idea is to identify the entirety of type $$n + 1$$ with type $$n$$; the type hierarchy is to be collapsed completely. An obvious difficulty with this is that Cantor’s theorem suggests that type $$n + 1$$ (being the “power set” of type $$n)$$ should be intrinsically larger than type $$n$$ (and in some senses this is demonstrably true). We first outline the reason that Quine believed that it might be possible to collapse the type hierarchy. We recall from above: We admit sorts of object indexed by the natural numbers (this is purely a typographical convenience; no actual reference to natural numbers is involved). Type 0 is inhabited by “individuals” with no specified structure. Type 1 is inhabited by sets of type 0 objects, and in general type $$n + 1$$ is inhabited by sets of type $$n$$ objects. The type system is enforced by the grammar of the language. Atomic sentences are equations or membership statements, and they are only well-formed if they take one of the forms $$x^{n} = y^{n}$$ or $$x^{n} \in y^{n+1}$$. The axioms of extensionality of TST take the form $A^{n+1} = B^{n+1} \leftrightarrow \forall x^n (x^n \in A^{n+1} \leftrightarrow x^n \in B^{n+1});$ there is a separate axiom for each $$n$$. The axioms of comprehension of TST take the form (for any choice of a type $$n$$, a formula $$\phi$$, and a variable $$A^{n+1}$$ not free in $$\phi)$$ $\exists A^{n+1}\forall x^n (x^n \in A^{n+1} \leftrightarrow \phi)$ It is interesting to observe that the axioms of TST are precisely analogous to those of naive set theory. For any formula $$\phi$$, define $$\phi^+$$ as the formula obtained by raising every type index on a variable in $$\phi$$ by one. Quine observes that any proof of $$\phi$$ can be converted into a proof of $$\phi^+$$ by raising all type indices in the original proof. Further, every object $$\{x^n \mid \phi \}^{n+1}$$ that the theory permits us to define has a precise analogue $$\{x^{n+1} \mid \phi^{+}\}^{n+2}$$ in the next higher type; this can be iterated to produce “copies” of any defined object in each higher type. For example, the Frege definition of the natural numbers works in TST. The number $$3^2$$ can be defined as the (type 2) set of all (type 1) sets with three (type 0) elements. The number $$3^3$$ can be defined as the (type 3) set of all (type 2) sets with three (type 1) elements. The number $$3^{27}$$ can be defined as the (type 27) set of all (type 26) sets with three (type 25) elements. And so forth. Our logic does not even permit us to say that these are a sequence of distinct objects; we cannot ask the question as to whether they are equal or not. Quine suggested, in effect, that we tentatively suppose that $$\phi \equiv \phi^+$$ for all $$\phi$$ ; it is not just the case that if we can prove $$\phi$$, we can prove $$\phi^+$$, but that the truth values of these sentences are the same. It then becomes strongly tempting to identify $$\{x^n \mid \phi \}^{n+1}$$ with $$\{x^{n+1} \mid \phi^{+}\}^{n+2}$$, since anything we can say about these two objects is the same (and our new assumption implies that we will assign the same truth values to corresponding assertions about these two objects). The theory NF which we obtain can be described briefly (but deceptively) as being the first-order untyped theory with equality and membership having the same axioms as TST but without the distinctions of type. If this is not read very carefully, it may be seen as implying that we have adopted the comprehension axioms of naive set theory, $\exists A\forall x(x \in A \leftrightarrow \phi)$ for each formula $$\phi$$. But we have not. We have only adopted those axioms for formulas $$\phi$$ which can be obtained from formulas of TST by dropping distinctions of type between the variables (without introducing any identifications between variables of different types). For example, there is no way that $$x \not\in x$$ can be obtained by dropping distinctions of type from a formula of TST, without identifying two variables of different type. Formulas of the untyped language of set theory in which it is possible to assign a type to each variable (the same type wherever it occurs) in such a way as to get a formula of TST are said to be stratified. The axioms of NF are strong extensionality (no non-sets) and stratified comprehension. Though the set $$\{x \mid x \not\in x\}$$ is not provided by stratified comprehension, some other sets which are not found in any variant of Zermelo set theory are provided. For example, $$x = x$$ is a stratified formula, and the universal set $$V = \{x \mid x = x\}$$ is provided by an instance of comprehension. Moreover, $$V \in V$$ is true. All mathematical constructions which can be carried out in TST can be carried out in NF. For example, the Frege natural numbers can be constructed, and so can the set $$\mathbf{N}$$ of Frege natural numbers. For example, the Frege natural number 1, the set of all one-element sets, is provided by NF. ### 6.2 The consistency problem for NF; the known consistent subsystems No contradictions are known to follow from NF, but some uncomfortable consequences do follow. The Axiom of Choice is known to fail in NF: Specker (1953) proved that the universe cannot be well-ordered. (Since the universe cannot be well-ordered, it follows that the “Axiom” of Infinity is a theorem of NF: if the universe were finite, it could be well-ordered.) This might be thought to be what one would expect on adopting such a dangerous comprehension scheme, but this turns out not to be the problem. The problem is with extensionality. Jensen (1968) showed that NFU (New Foundations with urelements), the version of New Foundations in which extensionality is weakened to allow many non-sets (as described above under naive set theory) is consistent, is consistent with Infinity and Choice, and is also consistent with the negation of Infinity (which of course implies Choice). NFU, which has the full stratified comprehension axiom of NF with all its frighteningly big sets, is weaker in consistency strength than Peano arithmetic; NFU + Infinity + Choice is of the same strength as TST with Infinity and Choice or Mac Lane set theory. Some other fragments of NF, obtained by weakening comprehension rather than extensionality, are known to be consistent. NF3, the version of NF in which one accepts only those instances of the axiom of comprehension which can be typed using three types, was shown to be consistent by Grishin (1969). NFP (predicative NF), the version of NF in which one accepts only instances of the axiom of comprehension which can be typed so as to be instances of comprehension of predicative TST (described above under type theories) was shown to be consistent by Marcel Crabbé (1982). He also demonstrated the consistency of the theory NFI in which one allows all instances of stratified comprehension in which no variable appears of type higher than that assigned to the set being defined (bound variables of the same type as that of the set being defined are permitted, which allows some impredicativity). One would like to read the name NFI as “impredicative NF” but one cannot, as it is more impredicative than NFP, not more impredicative than NF itself. NF3+Infinity has the same strength as second-order arithmetic. So does NFI (which has just enough impredicativity to define the natural numbers, and not enough for the Least Upper Bound Axiom). NFP is equivalent to a weaker fragment of arithmetic, but does (unlike NFU) prove Infinity: this is the only application of the Specker proof of the negation of the Axiom of Choice to a provably consistent theory. Either Union is true (in which case we readily get all of NF and Specker’s proof of Infinity goes through) or Union is not true, in which case we note that all finite sets have unions, so there must be an infinite set. NF3 has considerable interest for a surprising reason: it turns out that all infinite models of TST3 (simple type theory with three types) satisfy the ambiguity schema $$\phi \equiv \phi^+$$ (of course this only makes sense for formulas with one or two types) and this turns out to be enough to show that for any infinite model of TST3 there is a model of NF3 with the same theory. NF4 is the same theory as NF (Grishin 1969), and we have no idea how to get a model of TST4 to satisfy ambiguity. Very recently, Sergei Tupailo (2010) has proved the consistency of NFSI, the fragment of NF consisting of extensionality and those instances of Comprehension ($$\{x \in A \mid \phi \}$$ exists) which are stratified and in which the variable $$x$$ is assigned the lowest type. Tupailo’s proof is highly technical, but Marcel Crabbé pointed out that a structure for the language of set theory in which the sets are exactly the finite and cofinite collections satisfies this theory (so it is very weak). It should be noted that Tupailo’s model of NFSI satisfies additional propositions of interest not satisfied by the very simple model of Crabbé, such as the existence of each Frege natural number. It is of some interest whether this new fragment represents an independent way of getting a consistent fragment of NF. Note that NFU+NFSI is NF because NFSI has strong extensionality. Also, NFP+NFSI is NF because NFSI includes Union. The relationship of NFSI to NF$$_3$$ has been clarified by Marcel Crabbé in 2016. Tupailo’s theory is shown not to be a fragment of Grishin’s, and thus represents a fourth known method of getting consistent fragments. ### 6.3 Mathematics in NFU + Infinity + Choice Of these set theories, only NFU with Infinity, Choice and possibly further strong axioms of infinity (of which more anon) is really mathematically serviceable. We examine the construction of models of this theory and the way mathematics works inside this theory. A source for this development is Holmes 1998. Rosser 1973 develops the foundations of mathematics in NF: it can adapted to NFU fairly easily). A model of NFU can be constructed as follows. Well-known results of model theory allow the construction of a nonstandard model of ZFC (actually, a model of Mac Lane set theory suffices) with an external automorphism $$j$$ which moves a rank $$V_{\alpha}$$. We stipulate without loss of generality that $$j(\alpha) \lt \alpha$$. The universe of our model of NFU will be $$V_{\alpha}$$ and the membership relation will be defined as $x \in_{NFU} y \equiv_{def} j(x) \in y \amp y \in V_{j(\alpha)+1}$ (where $$\in$$ is the membership relation of the nonstandard model). The proof that this is a model of NFU is not long, but it is involved enough that we refer the reader elsewhere. The basic idea is that the automorphism allows us to code the (apparent) power set $$V_{\alpha +1}$$ of our universe $$V_{\alpha}$$ into the “smaller” $$V_{j(\alpha)+1}$$ which is included in our universe; the left over objects in $$V_{\alpha} - V_{j(\alpha)+1}$$ become urelements. Note that $$V_{\alpha} - V_{j(\alpha)+1}$$ is most of the domain of the model of NFU in a quite strong sense: almost all of the universe is made up of urelements (note that each $$V_{\beta +1}$$ is the power set of $$V_{\beta}$$, and so is strictly larger in size, and not one but many stages intervene between $$V_{j(\alpha)+1}$$ (the collection of “sets”) and $$V_{\alpha}$$ (the “universe”)). This construction is related to the construction used by Jensen, but is apparently first described explicitly in Boffa 1988. In any model of NFU, a structure which looks just like one of these models can be constructed in the isomorphism classes of well-founded extensional relations. The theory of isomorphism classes of well-founded extensional relations with a top element looks like the theory of (an initial segment of) the usual cumulative hierarchy, because every set in Zermelo-style set theory is uniquely determined by the isomorphism type of the restriction of the membership relation to its transitive closure. The surprise is that we not only see a structure which looks like an initial segment of the cumulative hierarchy: we also see an external endomorphism of this structure which moves a rank (and therefore cannot be a set), in terms of which we can replicate the model construction above and get an interpretation of NFU of this kind inside NFU! The endomorphism is induced by the map $$T$$ which sends the isomorphism type of a relation $$R$$ to the isomorphism type of $$R^{\iota} = \{ \langle \{x\}, \{y\}\rangle \mid xRy\}$$. There is no reason to believe that $$T$$ is a function: it sends any relation $$R$$ to a relation $$R^{\iota}$$ which is one type higher in terms of TST. It is demonstrable that $$T$$ on the isomorphism types of well-founded extensional relations is not a set function (we will not show this here, but our discussion of the Burali-Forti paradox below should give a good idea of the reasons for this). See Holmes (1998) for the full discussion. This suggests that the underlying world view of NFU, in spite of the presence of the universal set, Frege natural numbers, and other large objects, may not be that different from the world view of Zermelo-style set theory; we build models of NFU in a certain way in Zermelo-style set theory, and NFU itself reflects this kind of construction internally. A further, surprising result (Holmes 2012) is that in models of NFU constructed from a nonstandard $$V_{\alpha}$$ with automorphism as above, the membership relation on the nonstandard $$V_{\alpha}$$ is first-order definable (in a very elaborate way) in terms of the relation $$\in_{NFU}$$; this is very surprising, since it seems superficially as if all information about the extensions of the urelements has been discarded in this construction. But this turns out not to be the case (and this means that the urelements, which seem to have no internal information, nonetheless have a great deal of structure in these models). Models of NFU can have a “finite” (but externally infinite) universe if the ordinal $$\alpha$$ in the construction is a nonstandard natural number. If $$\alpha$$ is infinite, the model of NFU will satisfy Infinity. If the Axiom of Choice holds in the model of Zermelo-style set theory, it will hold in the model of NFU. Now we look at the mathematical universe according to NFU, rather than looking at models of NFU from the outside. The Frege construction of the natural numbers works perfectly in NFU. If Infinity holds, there will be no last natural number and we can define the usual set $$\mathbf{N}$$ of natural numbers just as we did above. Any of the usual ordered pair constructions works in NFU. The usual Kuratowski pair is inconvenient in NF or in NFU, because the pair is two types higher than its projections in terms of TST. This means that functions and relations are three types higher than the elements of their domains and ranges. There is a type-level pair defined by Quine (1945; type-level because it is the same type as its projections) which is definable in NF and also on $$V_{\alpha}$$ for any infinite ordinal $$\alpha$$; this pair can be defined and used in NF and the fact that it is definable on infinite $$V_{\alpha}$$ means that it can be assumed in NFU+Infinity that there is a type-level ordered pair (the existence of such a pair also follows from Infinity and Choice together). This would make the type displacement between functions and relations and elements of their domains and ranges just one, the same as the displacement between the types of sets and their elements. We will assume that ordered pairs are of the same type as their projections in the sequel, but we will not present the rather complicated definition of the Quine pair. Once pairs are defined, the definition of relations and functions proceeds exactly as in the usual set theory. The definitions of integers and rational numbers present no problem, and the Dedekind construction of the reals can be carried out as usual. We will focus here on developing the solutions to the paradoxes of Cantor and Burali-Forti in NFU, which give a good picture of the odd character of this set theory, and also set things up nicely for a brief discussion of natural strong axioms of infinity for NFU. It is important to realize as we read the ways in which NFU evades the paradoxes that this evasion is successful: NFU is known to be consistent if the usual set theory is consistent, and close examination of the models of NFU shows exactly why these apparent dodges work. Two sets are said to be of the same cardinality just in case there is a bijection between them. This is standard. But we then proceed to define $$|A|$$ (the cardinality of a set $$A)$$ as the set of all sets which are the same size as $$A$$, realizing the definition intended by Frege and Russell, and apparently intended by Cantor as well. Notice that $$|A|$$ is one type higher than $$A$$. The Frege natural numbers are the same objects as the finite cardinal numbers. The Cantor theorem of the usual set theory asserts that $$|A| \lt |\wp(A)|$$. This is clearly not true in NFU, since | $$V|$$ is the cardinality of the universe and $$|\wp(V)|$$ is the cardinality of the set of sets, and in fact $$|V| \gt \gt |\wp(V)|$$ in all known models of NFU (there are many intervening cardinals in all such models). But $$|A| \lt |\wp(A)|$$ does not make sense in TST: it is ill-typed. The correct theorem in TST, which is inherited by NFU, is $$|\wp_1 (A)| \lt |\wp(A)|$$, where $$\wp_1 (A)$$ is the set of one-element subsets of $$A$$, which is at the same type as the power set of $$A$$. So we have $$|\wp_1 (V)| \lt |\wp(V)|$$: there are more sets than there are singleton sets. The apparent bijection $$x \mapsto \{x\}$$ between $$\wp_1 (V)$$ and $$V$$ cannot be a set (and there is no reason to expect it to be a set, since it has an unstratified definition). A set which satisfies $$|A| = |\wp_1 (A)|$$ is called a cantorian set, since it satisfies the usual form of Cantor’s theorem. A set $$A$$ which satisfies the stronger condition that the restriction of the singleton map to $$A$$ is a set is said to be strongly cantorian (s.c.). Strongly cantorian sets are important because it is not necessary to assign a relative type to a variable known to be restricted to a strongly cantorian set, as it is possible to use the restriction of the singleton map and its inverse to freely adjust the type of any such variable for purposes of stratification. The strongly cantorian sets are can be thought of as analogues of the small sets of the usual set theory. Ordinal numbers are defined as equivalence classes of well-orderings under similarity. There is a natural order on ordinal numbers, and in NFU as in the usual set theory it turns out to be a well-ordering—and, as in naive set theory, a set! Since the natural order on the ordinal numbers is a set, it has an order type $$\Omega$$ which is itself one of the ordinal numbers. Now in the usual set theory we prove that the order type of the restriction of the natural order on the ordinals to the ordinals less than $$\alpha$$ is the ordinal $$\alpha$$ itself; however, this is an ill-typed statement in TST, where, assuming a type level ordered pair, the second occurrence of $$\alpha$$ is two types higher than the first (it would be four types higher if the Kuratowski ordered pair were used). Since the ordinals are isomorphism types of relations, we can define the operation $$T$$ on them as above. The order type of the restriction of the natural order on the ordinals to the ordinals less than $$\alpha$$ is the ordinal $$T^2 (\alpha)$$ is an assertion which makes sense in TST and is in fact true in TST and so in NFU. We thus find that the order type of the restriction of the natural order on the ordinals to the ordinals less than $$\Omega$$ is $$T^2 (\Omega)$$, whence we find that $$T^2 (\Omega)$$ (as the order type of a proper initial segment of the ordinals) is strictly less than $$\Omega$$ (which is the order type of all the ordinals). Once again, the fact that the singleton map is not a function eliminates the “intuitively obvious” similarity between these orders. This also shows that $$T$$ is not a function. $$T$$ is an order endomorphism of the ordinals, though, whence we have $$\Omega \gt T^2 (\Omega) \gt T^4 (\Omega)\ldots$$, which may be vaguely disturbing, though this “sequence” is not a set. A perhaps useful comment is that in the models of NFU described above, the action of $$T$$ on ordinals exactly parallels the action of $$j$$ on order types of well-orderings $$(j$$ does not send NFU ordinals to ordinals, exactly, so this needs to be phrased carefully): the “descending sequence” already has an analogue in the sequence $$\alpha \gt j(\alpha) \gt j^2 (\alpha)\ldots$$ in the original nonstandard model. Some have asserted that this phenomenon (that the ordinals in any model of NFU are not externally well-ordered) can be phrased as “NFU has no standard model”. We reserve judgement on this—we do note that the theorem “the ordinals in any (set!) model of NFU are not well-ordered” is a theorem of NFU itself; note that NFU does not see the universe as a model of NFU (even though it is a set) because the membership relation is not a set relation (if it were, the singleton map certainly would be). NFU + Infinity + Choice is a relatively weak theory: like Zermelo set theory it does not prove even that $$\aleph_{\omega}$$ exists. As is the case with Zermelo set theory, natural extensions of this theory make it much stronger. We give just one example. The Axiom of Cantorian Sets is the deceptively simple statement (to which there are no evident counterexamples) that “every cantorian set is strongly cantorian”. NFU + Infinity + Choice + Cantorian Sets is a considerably stronger theory than NFU + Infinity + Choice: in its theory of isomorphism types of well-founded extensional relations with top element, the cantorian types with the obvious “membership” relation satisfy the axioms of ZFC + “there is an $$n$$-Mahlo cardinal” for each concrete $$n$$. There is no mathematical need for the devious interpretation: this theory proves the existence of $$n$$-Mahlo cardinals and supports all mathematical constructions at that level of consistency strength in its own terms without any need to refer to the theory of well-founded extensional relations. More elaborate statements about such properties as “cantorian” and “strongly cantorian” (applied to order types as well as cardinality) yield even stronger axioms of infinity. Our basic claim about NFU + Infinity + Choice (and its extensions) is that it is a mathematically serviceable alternative set theory with its own intrinsic motivation (although we have used Zermelo style set theory to prove its consistency here, the entire development can be carried out in terms of TST alone: one can use TST as meta-theory, show in TST that consistency of TST implies consistency of NFU, and use this result to amend one’s meta-theory to NFU, thus abandoning the distinctions between types). We do not claim that it is better than ZFC, but we do claim that it is adequate, and that it is important to know that adequate alternatives exist; we do claim that it is useful to know that there are different ways to found mathematics, as we have encountered the absurd assertion that “mathematics is whatever is formalized in ZFC”. ### 6.4 Critique of NFU Like Zermelo set theory, NFU has advantages and disadvantages. An advantage, which corresponds to one of the few clear disadvantages of Zermelo set theory, is that it is possible to define natural numbers, cardinal numbers, and ordinal numbers in the natural way intended by Frege, Russell, and Whitehead. Many but not all of the purported disadvantages of NFU as a working foundation for mathematics reduce to complaints by mathematicians used to working in ZFC that “this is not what we are used to”. The fact that there are fewer singletons than objects (in spite of an obvious external one to one correspondence) takes getting used to. In otherwise familiar constructions, one sometimes has to make technical use of the singleton map or $$T$$ operations to adjust types to get stratification. This author can testify that it is perfectly possible to develop good intuition for NFU and work effectively with stratified comprehension; part of this but not all of it is a good familiarity with how things are done in TST, as one also has to develop a feel for how to use principles that subvert stratification. As Sol Feferman has pointed out, one place where the treatments in NFU (at least those given so far) are clearly quite involved are situations in which one needs to work with indexed families of objects. The proof of König’s Lemma of set theory in Holmes 1998 is a good example of how complicated this kind of thing can get in NFU. We have a notion that the use of sets of “Quine atoms” (self-singletons) as index sets (necessarily for s.c. sets) might relieve this difficulty, but we haven’t proved this in practice, and problems would remain for the noncantorian situation. The fact that “NFU has no standard models” (the ordinals are not well-ordered in any set model of NFU) is a criticism of NFU which has merit. We observe, though, that there are other set theories in which nonstandard objects are deliberately provided (we will review some of these below), and some of the applications of those set theories to “nonstandard analysis” might be duplicated in suitable versions of NFU. We also observe that strong principles which minimize the nonstandard behavior of the ordinals turn out to give surprisingly strong axioms of infinity in NFU; the nonstandard structure of the ordinals allows insight into phenomena associated with large cardinals. Some have thought that the fact that NFU combines a universal set and other big structures with mathematical fluency in treating these structures might make it a suitable medium for category theory. Although we have some inclination to be partial to this class of set theories, we note that there are strong counterarguments to this view. It is true that there are big categories, such as the category of all sets (as objects) and functions (as the morphisms between them), the category of all topological spaces and homeomorphism, and even the category of all categories and functors. However, the category of all sets and functions, for example, while it is a set, is not “cartesian closed” (a technical property which this category is expected to have): see McLarty 1992. Moreover, if one restricts to the s.c. sets and functions, one obtains a cartesian closed category, which is much more closely analogous to the category of all sets and functions over ZFC—and shares with it the disadvantage of being a proper class! Contemplation of the models only confirms the impression that the correct analogue of the proper class category of sets and functions in ZFC is the proper class category of s.c. sets and functions in NFU! There may be some applications for the big set categories in NFU, but they are not likely to prove to be as useful as some have optimistically suggested. See Feferman 2006 for an extensive discussion. An important point is that there is a relativity of viewpoint here: the NFU world can be understood to be a nonstandard initial segment of the world of ZFC (which could be arranged to include its entire standard part!) with an automorphism and the ZFC world (or an initial segment of it) can be interpreted in NFU as the theory of isomorphism classes of well-founded extensional relations with top (often restricted to its strongly cantorian part); these two theories are mutually interpretable, so the corresponding views of the world admit mutual translation. ZFC might be viewed as motivated by a generalization of the theory of sets in extension (as generalizations of the notion of finite set, replacing the finite with the transfinite and the rejected infinite with the rejected Absolute Infinite of Cantor) while the motivation of NFU can be seen as a correction of the theory of sets as intensions (that is, as determined by predicates) which led to the disaster of naive set theory. Nino Cocchiarella (1985) has noted that Frege’s theory of concepts could be saved if one could motivate a restriction to stratified concepts (the abandonment of strong extensionality is merely a return to common sense). But the impression of a fundamental contrast should be tempered by the observation that the two theories nonetheless seem to be looking at the same universe in different ways! ## 7. Positive Set Theories ### 7.1 Topological motivation of positive set theory We will not attempt an exhaustive survey of positive set theory; our aim here is to motivate and exhibit the axioms of the strongest system of this kind familiar to us, which is the third of the systems of classical set theory which we regard as genuinely mathematically serviceable (the other two being ZFC and suitable strong extensions of NFU + Infinity + Choice). A positive formula is a formula which belongs to the smallest class of formulas containing a false statement $$\bot$$, all atomic membership and equality formulas and closed under the formation of conjunctions, disjunctions, universal and existential quantifications. A generalized positive formula is obtained if we allow bounded universal and existential quantifications (the additional strength comes from allowing $$(\forall x \in A \mid \phi) \equiv \forall x(x \in A \rightarrow \phi)$$; bounded existential quantification is positive in any case). Positive comprehension is motivated superficially by an attack on one of the elements of Russell’s paradox (the negation): a positive set theory will be expected to support the axiom of extensionality (as usual) and the axiom of (generalized) positive comprehension: for any (generalized) positive formula $$\phi , \{x \mid \phi \}$$ exists. We mention that we are aware that positive comprehension with the additional generalization of positive formulas allowing one to include set abstracts $$\{x \mid \phi \}$$ (with $$\phi$$ generalized positive) in generalized positive formulas is consistent, but turns out not to be consistent with extensionality. We are not very familiar with this theory, so have no additional comments to make about it; do notice that the translations of formulas with set abstracts in them into first order logic without abstracts are definitely not positive in our more restricted sense, and so one may expect some kind of trouble! The motivation for the kinds of positive set theory we are familiar with is topological. We are to understand the sets as closed sets under some topology. Finite unions and intersections of closed sets are closed; this supports the inclusion of $$\{x \mid \phi \lor \psi \}$$ and $$\{x \mid \phi \amp \psi \}$$ as sets if $$\{x \mid \phi \}$$ and $$\{x \mid \psi \}$$ are sets. Arbitrary intersections of closed sets are closed: this supports our adoption of even bounded universal quantification (if each $$\{x \mid \phi(y)\}$$ is a set, then $$\{x \mid \forall y\phi(y)\}$$ is the intersection of all of these sets, and so should be closed, and $$\{x \in A \mid \forall y\phi(y)\}$$ is also an intersection of closed sets and so should be closed. The motivation for permitting $$\{x \mid \exists y\phi(y)\}$$ when each $$\{x \mid \phi(y)\}$$ exists is more subtle, since infinite unions do not as a rule preserve closedness: the idea is that the set of pairs $$(x, y)$$ such that $$\phi(x, y)$$ is closed, and the topology is such that the projection of a closed set is closed. Compactness of the topology suffices. Moreover, we now need to be aware that formulas with several parameters need to be considered in terms of a product topology. An additional very powerful principle should be expected to hold in a topological model: for any class $$C$$ whatsoever (any collection of sets), the intersection of all sets which include $$C$$ as a subclass should be a set. Every class has a set closure. We attempt the construction of a model of such a topological theory. To bring out an analogy with Mac Lane set theory and NF, we initially present a model built by collapsing TST in yet another manner. The model of TST that we use contains one type 0 object $$u$$. Note that this means that each type is finite. Objects of each type are construed as better and better approximations to the untyped objects of the final set theory. $$u$$ approximates any set. The type $$n + 1$$ approximant to any set $$A$$ is intended to be the set of type $$n$$ approximants of the elements of $$A$$. This means that we should be able to specify when a type $$n + 2$$ set $$A^{n+2}$$ refines a type $$n + 1$$ set $$A^{n+1}$$: each (type $$n + 1)$$ element of $$A^{n+2}$$ should refine a (type $$n)$$ element of $$A^{n+1}$$, and each element of $$A^{n+1}$$ should be refined by one or more elements of $$A^{n+2}$$. Along with the information that the type 0 object $$u$$ refines both of the elements of type 1, this gives a complete recursive definition of the notion of refinement of a type $$n$$ set by a type $$n + 1$$ set. Each type $$n + 1$$ set refines a unique type $$n$$ set but may be refined by many type $$n + 2$$ sets. (The “hereditarily finite” sets without $$u$$ in their transitive closure are refined by just one precisely analogous set at the next higher level.) Define a general relation $$x \sim y$$ on all elements of the model of set theory as holding when $$x = y$$ (if they are of the same type) or if there is a chain of refinements leading from the one of $$x, y$$ of lower type to the one of higher type. The objects of our first model of positive set theory are sequences $$s_n$$ with each $$s_n$$ a type $$n$$ set and with $$s_{n+1}$$ refining $$s_n$$ for each $$n$$. We say that $$s \in t$$ when $$s_{n} \in t_{n+1}$$ for all $$n$$. It is straightforward to establish that if $$s_{n} \in t_{n+1}$$ or $$s_{n} = t_{n}$$ is false, then $$s_k \in t_{k+1}$$ or (respectively) $$s_k = t_k$$ is false for all $$k \gt n$$. More generally, if $$s_m \sim t_n$$ is false, then $$s_{m+k} \sim t_{n+k}$$ is false for all $$k \ge 0$$. Formulas in the language of the typed theory with $$\in$$ and $$\sim$$ have a monotonicity property: if $$\phi$$ is a generalized positive formula and one of its typed versions is false, then any version of the same formula obtained by raising types and refining the values of free variables in the formula will continue to be false. It is not hard to see why this will fail to work if negation is allowed. It is also not too hard to show that if all typed versions of a generalized positive formula $$\phi$$ in the language of the intended model (with sequences $$s$$ appearing as values of free variables replaced by their values at the appropriate types) are true, then the original formula $$\phi$$ is true in the intended model. The one difficulty comes in with existential quantification: the fact that one has a witness to $$(\exists x.\phi(x))$$ in each typed version does not immediately give a sequence witnessing this in the intended model. The tree property of $$\omega$$ helps here: only finitely many approximants to sets exist at each level, so one can at each level choose an approximant refinements of which are used at infinitely many higher levels as witnesses to $$(\exists x.\phi(x))$$, then restrict attention to refinements of that approximant; in this way one gets not an arbitrary sequence of witnesses at various types but a “convergent” sequence (an element of the intended model). One then shows that any generalized positive formula $$\phi(x)$$ has an extension $$\{x \mid \phi(x)\}$$ by considering the sets of witnesses to $$\phi(x)$$ in each type $$n$$; these sets themselves can be used to construct a convergent sequence (with the proviso that some apparent elements found at any given stage may need to be discarded; one defines $$s_{n+1}$$ as the set of those type $$n$$ approximants which not only witness $$\phi(x)$$ at the current type $$n$$ but have refinements which witness $$\phi(x)$$ at each subsequent type. The sequence of sets $$s$$ obtained will be an element of the intended model and have the intended extension. Finally, for any class of sequences (elements of the intended model) $$C$$, there is a smallest set which contains all elements of $$C$$: let $$c_{n+1}$$ be the set of terms $$s_n$$ of sequences $$s$$ belonging to $$C$$ at each type $$n$$ to construct a sequence $$c$$ which will have the desired property. This theory can be made stronger by indicating how to pass to transfinite typed approximations. The type $$\alpha + 1$$ approximation to a set will always be the set of type $$\alpha$$ approximations; if $$\lambda$$ is a limit ordinal, the type $$\lambda$$ approximation will be the sequence $$\{s_{\beta} \}_{\beta \lt \lambda}$$ of approximants to the set at earlier levels (so our “intended model” above is the set of type $$\omega$$ approximations in a larger model). Everything above will work at any limit stage except the treatment of the existential quantifier. The existential quantifier argument will work if the ordinal stage at which the model is being constructed is a weakly compact cardinal. This is a moderately strong large cardinal property (for an uncountable cardinal): it implies, for example, the existence of proper classes of inaccessibles and of $$n$$-Mahlo cardinals for each $$n$$. So for each weakly compact cardinal $$\kappa$$ (including $$\kappa = \omega)$$ the approximants of level $$\kappa$$ in the transfinite type theory just outlined make up a model of set theory with extensionality, generalized positive comprehension, and the closure property. We will refer to this model as the “$$\kappa$$-hyperuniverse”. ### 7.2 The system GPK$$^{+}_{\infty}$$ of Olivier Esser We now present an axiomatic theory which has the $$\kappa$$-hyperuniverses with $$\kappa \gt \omega$$ as (some of its) models. This is a first-order theory with equality and membership as primitive relations. This system is called GPK$$^{+}_{\infty}$$ and is described in Esser 1999. Extensionality: Sets with the same elements are the same. Generalized Positive Comprehension: For any generalized positive formula $$\phi , \{x \mid \phi \}$$ exists. (Notice that since we view the false formula $$\bot$$ as positive we need no special axiom asserting the existence of the empty set). Closure: For any formula $$\phi(x)$$, there is a set $$C$$ such that $$x \in C \equiv [\forall y\forall z(\phi(z) \rightarrow z \in y) \rightarrow x \in y$$]; $$C$$ is the intersection of all sets which include all objects which satisfy $$\phi : C$$ is called the closure of the class $$\{x \mid \phi(x)\}$$. Infinity: The closure of the von Neumann ordinals is not an element of itself. (This excludes the $$\omega$$-hyperuniverse, in which the closure of the class of von Neumann ordinals has itself as an additional member). As one might expect, some of the basic concepts of this set theory are topological (sets being the closed classes of the topology on the universe). This set theory interprets ZF. This is shown by demonstrating first that the discrete sets (and more particularly the (closed) sets of isolated points in the topology) satisfy an analogue of Replacement (a definable function (defined by a formula which need not be positive) with a discrete domain is a set), and so an analogue of separation, then by showing that well-founded sets are isolated in the topology and the class of well-founded sets is closed under the constructions of ZF. Not only ZF but also Kelley-Morse class theory can be interpreted; any definable class of well-founded sets has a closure whose well-founded members will be exactly the desired members (it will as a rule have other, non-well-founded members). Quantification over these “classes” defines sets just as easily as quantification over mere sets in this context; so we get an impredicative class theory. Further, one can prove internally to this theory that the “proper class ordinal” in the interpreted $$KM$$ has the tree property, and so is in effect a weakly compact cardinal; this shows that this theory has considerable consistency strength (for example, its version of ZF proves that there is a proper class of inaccessible cardinals, a proper class of $$n$$-Mahlos for each $$n$$, and so forth): the use of large cardinals in the outlined model construction above was essential. The Axiom of Choice in any global form is inconsistent with this theory, but it is consistent for all well-founded sets to be well-orderable (in fact, this will be true in the models described above if the construction is carried out in an environment in which Choice is true). This is sufficient for the usual mathematical applications. Since ZF is entirely immersed in this theory, it is clearly serviceable for the usual classical applications. The Frege natural numbers are not definable in this theory (except for 0 and 1); it is better to work with the finite von Neumann ordinals. The ability to prove strong results about large cardinals using the properties of the proper class ordinal suggests that the superstructure of large sets can be used for mathematical purposes as well. Familiarity with techniques of topology of $$\kappa$$-compact spaces would be useful for understanding what can be done with the big sets in this theory. With the negation of the Axiom of Infinity, we get the theory of the $$\omega$$-hyperuniverse, which is equiconsistent with second-order arithmetic, and so actually has a fair amount of mathematical strength. In this theory, the class of natural numbers (considered as finite ordinals) is not closed and acquires an extra element “at infinity” (which happens to be the closure of the class of natural numbers itself). Individual real numbers can be coded (using the usual Dedekind construction, actually) but the theory of sets of real numbers will begin to look quite different. ### 7.3 Critique of positive set theory One obvious criticism is that this theory is extremely strong, compared with the other systems given here. This could be a good thing or a bad thing, depending on one’s attitude. If one is worried about the consistency of a weakly compact, the level of consistency strength here is certainly a problem (though the theory of the $$\omega$$ -hyperuniverse will stay around in any case). On the other hand, the fact that the topological motivation for set theory seems to work and yields a higher level of consistency strength than one might expect (“weakly compact” infinity following from merely uncountable infinity) might be taken as evidence that these are very powerful ideas. The mathematical constructions that are readily accessible to this author are simply carried over from ZF or ZFC; the well-founded sets are considered within the world of positive set theory, and we find that they have exactly the properties we expect them to have from the usual viewpoint. It is rather nice that we get (fuzzier) objects in our set theory suitable to represent all of the usual proper classes; it is less clear what we can do with the other large objects than it is in NFU. A topologist might find this system quite interesting; in any event, topological expertise seems required to evaluate what can be done with the extra machinery in this system. We briefly review the paradoxes: the Russell paradox doesn’t work because $$x \not\in x$$ is not a positive formula; notice that $$\{x \mid x \in x\}$$ exists! The Cantor paradox does not work because the proof of the Cantor theorem relies on an instance of comprehension which is not positive. $$\wp(V)$$ does exist and is equal to $$V$$. The ordinals are defined by a non-positive condition, and do not make up a set, but it is interesting to note that the closure $$\mathbf{CL}(On)$$ of the class $$On$$ of ordinals is equal to $$On \cup \{\mathbf{CL}(On)\}$$; the closure has itself as its only unexpected element. ## 8. Logically and Philosophically Motivated Variations In the preceding set theories, the properties of the usual objects of mathematics accord closely with their properties as “intuitively” understood by most mathematicians (or lay people). (Strictly speaking, this is not quite true in NFU + Infinity without the additional assumption of Rosser’s Axiom of Counting, but the latter axiom (“$$\mathbf{N}$$ is strongly cantorian”) is almost always assumed in practice). In the first two classes of system discussed in this section, logical considerations lead to the construction of theories in which “familiar” parts of the world look quite different. Constructive mathematicians do not see the same continuum that we do, and if they are willing to venture into the higher reaches of set theory, they find a different world there, too. The proponents of nonstandard analysis also find it useful to look at a different continuum (and even different natural numbers) though they do see the usual continuum and natural numbers embedded therein. It is not entirely clear that the final item discussed in this section, the multiverse view of set theory proposed by Joel Hamkins, should be described as a view of the world of set theory at all: it proposes that we should consider that there are multiple different concepts of set each of which describes its own universe (and loosely we might speak of the complex of universes as a “multiverse”), but at bottom it is being questioned whether there is properly a single world of set theory at all. But the tentative list of proposed axioms he gives for relationships between universes have some of the flavor of an alternative set theory. ### 8.1 Constructive set theory There are a number of attempts at constructive (intuitionistic) theories of types and set theories. We will describe a few systems here, quite briefly as we are not expert in constructive mathematics. An intuitionistic typed theory of sets is readily obtained by simply adopting the intuitionistic versions of the axioms of TST as axioms. An Axiom of Infinity would be wanted to ensure that an interpretation of Heyting arithmetic could be embedded in the theory; it might be simplest to provide type 0 with the primitives of Heyting arithmetic (just as the earliest versions of TST had the primitives of classical arithmetic provided for type 0). We believe that this would give a quite comfortable environment for doing constructive mathematics. Daniel Dzierzgowski has gone so far as to study an intuitionistic version of NF constructed in the same way; all that we can usefully report here is that it is not clear that the resulting theory INF is as strong as NF (in particular, it is unclear whether INF interprets Heyting Arithmetic, because Specker’s proof of Infinity in NF does not seem to go through in any useful way) but the consistency problem for INF remains open in spite of the apparent weakness of the theory. A more ambitious theory is IZF (intuitionistic ZF). An interesting feature of the development of IZF is that one must be very careful in one’s choice of axioms: some formulations of the axioms of set theory have (constructively deducible) consequences which are not considered constructively valid (such as Excluded Middle), while other (classically equivalent) formulations of the axioms appear not to have such consequences: the latter forms, obviously to be preferred for a constructive development of set theory, often are not the most familiar ones in the classical context. A set of axioms which seems to yield a nontrivial system of constructive mathematics is the following: Extensionality: in the usual ZF form. Pairing, Union, Power Set, Infinity: in the usual ZF form. Collection: We are not sure why this is often preferred in constructive set theory, as it seems to us less constructive than replacement? But we have heard it said that Replacement is constructively quite weak. $$\in$$-Induction: The induction on membership form is preferred for a highly practical reason: more usual formulations of Foundation immediately imply the Axiom of Excluded Middle! See Friedman 1973 and Other Internet Resources for further information about IZF. As is often the case in constructive mathematics generally, very simple notions of classical set theory (such as the notion of an ordinal) require careful reformulation to obtain the appropriate definition for the constructive environment (and the formulations often appear more complicated than familiar ones to the classical eye). Being inexpert, we will not involve ourselves further in this. It is worth noting that IZF, like many but not all constructive systems, admits a double negation interpretation of the corresponding classical theory ZF; we might think of IZF as a weakened version of ZF from the classical standpoint, but in its own terms it is the theory of a larger, more complex realm in which a copy of the classical universe of set theory is embedded. The theories we have described so far are criticized by some constructive mathematicians for allowing an unrestricted power set operation. A weaker system CZF (constructive ZF has been proposed which does not have this operation (and which has the same level of strength as the weak set theory KPU without Power Set described earlier). CZF omits Power Set. It replaces Foundation with $$\in$$-Induction for the same reasons as above. The axioms of Extensionality, Pairing, and Union are as in ordinary set theory. The axiom of Separation is restricted to bounded $$(\Delta_0)$$ formulas as in Mac Lane set theory or KPU. The Collection axiom is replaced by two weaker axioms. The Strong Collection axiom scheme asserts that if for every $$x \in A$$ there is $$y$$ such that $$\phi (x, y)$$, then there is a set $$B$$ such that for every $$x \in A$$ there is $$y \in B$$ such that $$\phi(x, y)$$ (as in the usual scheme) but also for every $$y \in B$$ there is $$x \in A$$ such that $$\phi(x, y)$$ ($$B$$ doesn’t contain any redundant elements). The additional restriction is useful because of the weaker form of the Separation Axiom. The Subset Collection scheme can be regarded as containing a very weak form of Power Set. It asserts, for each formula $$\phi(x, y, z)$$ that for every $$A$$ and $$B$$, there is a set $$C$$ such that for each $$z$$ such that $$\forall x \in A\exists y \in B[\phi(x, y, z)$$] there is $$R_z \in C$$ such that for every $$x \in A$$ there is $$y \in R_z$$ such that $$\phi(x, y, z)$$ and for every $$y \in R_z$$ there is $$x \in A$$ such that $$\phi(x, y, z)$$ (this is the same restriction as in the Strong Collection axiom; notice that not only are images under the relation constructed, but the images are further collected into a set). The Subset Collection scheme is powerful enough to allow the construction of the set of all functions from a set $$A$$ to a set $$B$$ as a set (which suggests that the classical version of this theory is as strong as ZF, since the existence of the set of functions from $$A$$ to $$\{0, 1\}$$ is classically as strong as the existence of the power set of $$A$$, and strong collection should allow the proof of strong separation in a classical environment). This theory is known to be at the same level of consistency strength as the classical set theory KPU. It admits an interpretation in Martin-Löf constructive type theory (as IZF does not). ### 8.2 Set theory for nonstandard analysis Nonstandard analysis originated with Abraham Robinson (1966), who noticed that the use of nonstandard models of the continuum would allow one to make sense of the infinitesimal numbers of Leibniz, and so obtain an elegant formulation of the calculus with fewer alternations of quantifiers. Later exponents of nonstandard analysis observed that the constant reference to the model theory made the exposition less elementary than it could be; they had the idea of working in a set theory which was inherently “nonstandard”. We present a system of this kind, a version of the set theory IST (Internal Set Theory) of Nelson (1977). The primitives of the theory are equality, membership, and a primitive notion of standardness. The axioms follow. Extensionality, Pairing, Union, Power Set, Foundation, Choice: As in our presentation of ZFC above. Separation, Replacement: As in our presentation of ZFC above, except that the standardness predicate cannot appear in the formula $$\phi$$. Definition: For any formula $$\phi$$, the formula $$\phi$$st is obtained by replacing each quantifier over the universe with a quantifier over all standard objects (and each quantifier bounded in a set with a quantifier restricted to the standard elements of that set). Idealization: There is a finite set which contains all standard sets. Transfer: For each formula $$\phi(x)$$ not mentioning the standardness predicate and containing no parameters (free variables other than $$x)$$ except standard sets, $$\forall x\phi(x) \equiv \forall x$$(standard$$(x) \rightarrow \phi(x))$$. Standardization: For any formula $$\phi(x)$$ and standard set $$A$$, there is a standard set $$B$$ whose standard elements are exactly the standard elements $$x$$ of $$A$$ satisfying $$\phi(x)$$. Our form of Idealization is simpler than the usual version but has the same effect. Transfer immediately implies that any uniquely definable object (defined without reference to standardness) is in fact a standard object. So the empty set is standard, $$\omega$$ is standard, and so forth. But it is not the case that all elements of standard objects are standard. For consider the cardinality of a finite set containing all standard objects; this is clearly greater that any standard natural number (usual element of $$\omega)$$ yet it is equally clearly an element of $$\omega$$. It turns out to be provable that every set all of whose elements are standard is a standard finite set. Relative consistency of this theory with the usual set theory ZFC is established via familiar results of model theory. Working in this theory makes it possible to use the techniques of nonstandard analysis in a “elementary” way, without ever appealing explicitly to the properties of nonstandard models. ### 8.3 The multiverse view of set theory We examine the theory of the set theoretic multiverse proposed by Joel David Hamkins, whose purpose is to address philosophical questions about independence questions in standard set theory, but which when spelled out formally has some of the flavor of an alternative set theory. A set theoretic Platonist might say about the Continuum Hypothesis (CH) that, since there is “of course” a single universe of sets, CH is either true or false in that world, but that we cannot determine which of CH and $$\neg$$CH actually holds. Hamkins proposes as an alternative (taking the same realist standpoint as the classical Platonist, it must be noted) that there are many distinct concepts of set, which we may suppose for the moment all satisfy the usual axioms of ZFC, each concept determining its own universe of sets, and in some of these universes CH holds and in some it does not hold. He says further, provocatively, that in his view CH is a solved problem, because we have an excellent understanding of the conditions under which CH holds in $$a$$ universe of sets (note the article used) and the conditions in which it does not hold, and even more provocatively, he argues that an “ideal” solution to the CH problem in which a generally accepted axiom arises which causes most mathematicians to conclude that CH is “self-evidently” true or false (deciding the question in the usual sense) is now actually impossible, because set theorists are now very conversant with universes in which both alternatives hold, and understand very well that neither alternative is “self-evidently” true (the force of his argument is really that the complementary conclusion that one of the alternatives is self-evidently false is now impossible to draw, because we are too well acquainted with actual “worlds” in which each alternative holds to believe that either is absurd). We could write an entire essay on questions raised in our summary in the previous paragraph, but Hamkins has already done this in Hamkins 2012. Our aim here is to summarize the tentative axioms that Hamkins presents for the multiverse conception. This is not really a formal set of axioms, but it does have some of the qualities of an axiomatization of an alternative set theory. We note that the list of axioms presented here unavoidably presupposes more knowledge of advanced set theory than other parts of this article. Realizability Principle: For any universe $$V$$, if $$W$$ is a model of set theory and definable or interpreted in $$V$$, then $$W$$ is a universe. One thing to note here is that Hamkins is open to the idea that some universes may be models of theories other than ZFC (weaker theories such as Zermelo set theory or Peano arithmetic, or even different theories such as ZFA or NF/NFU). But it appears to be difficult philosophically to articulate exact boundaries for what counts as a “concept of set theory” which would define a universe. And this is fine, because there is no notion of “the multiverse” of universes as a completed totality here at all—this would amount to smuggling in the single Platonic universe again through the back door! Some of the axioms which follow do presume that the universes discussed are models of ZFC or very similar theories. Forcing Extension Principle: For any universe $$V$$ and any forcing notion $$P$$ in $$V$$, there is a forcing extension $$V[G]$$, where $$G \subset P$$ is $$V$$-generic. This asserts that our forcing extensions are concretely real worlds. Hamkins discusses the metaphysical difficulties of the status of forcing extensions at length in Hamkins 2012. Reflection Axiom: For every universe $$V$$, there is a much taller universe $$W$$ with an ordinal $$\theta$$ for which $$V$$ is elementarily equivalent to (or isomorphic to) $$W_{\theta}$$, a level of the cumulative hierarchy in $$W$$. We quote Hamkins: the principle asserts that no universe is correct about the height of the ordinals, and every universe looks like an initial segment of a much taller universe having the same truths. (2012: 438) Here we are presuming that the universes we are talking about are models of ZFC or a ZFC-like theory. Countability Principle: Every universe $$V$$ is countable from the perspective of another, better universe $$W$$. This definitely has the flavor of an alternative set theory axiom! The model theoretic motivation is obvious: this amounts to taking Skolem’s paradox seriously. Hamkins notes that the Forcing Extension principle above already implies this, but it is clear in any case that his list of tentative axioms is intended to be neither independent nor complete. Well-foundedness Mirage: Every universe $$V$$ is ill-founded from the perspective of another, better universe. Hamkins says that this may be the most provocative of all his axioms. He states that he intends this to imply that even our notion of natural numbers is defective in any universe: the collection of natural numbers as defined in any universe is seen to contain nonstandard elements from the standpoint of a further universe. Reverse Embedding Axiom: For every universe $$V$$ and every embedding $$j : V \rightarrow M$$ in $$V$$, there is a universe $$W$$ and embedding $$h: W \rightarrow V$$ such that $$j$$ is the iterate of $$h$$. We merely quote this astonishing assertion, which says that for any elementary embedding of a universe $$V$$ into a model $$M$$ included in $$V$$, our understanding of this embedding locally to $$V$$ itself is seriously incomplete. Absorption into L: Every universe $$V$$ is a countable transitive model in another universe $$W$$ satisfying $$V = L$$. We are used to thinking of the constructible universe $$L$$ as a “restricted” universe. Here Hamkins turns this inside out (he discusses at length why this is a reasonable way to think in the paper Hamkins 2012). We leave it to the reader who is interested to pursue this further. ## 9. Small Set Theories It is commonly noted that set theory produces far more superstructure than is needed to support classical mathematics. In this section, we describe two miniature theories which purport to provide enough foundations without nearly as much superstructure. Our “pocket set theory” (motivated by a suggestion of Rudy Rucker) is just small; Vopenka’s alternative set theory is also “nonstandard” in its approach. ### 9.1 Pocket set theory This theory is a proposal of ours, which elaborates on a suggestion of Rudy Rucker. We (and many others) have observed that of all the orders of infinity in Cantor’s paradise, only two actually occur in classical mathematical practice outside set theory: these are $$\aleph_0$$ and $$c$$, the infinity of the natural numbers and the infinity of the continuum. Pocket set theory is a theory motivated by the idea that these are the only infinities (Vopenka’s alternative set theory also has this property, by the way). The objects of pocket set theory are classes. A class is said to be a set iff it is an element (as in the usual class theories over ZFC). The ordered pair is defined using the usual Kuratowski definition, but without assuming that there are any ordered pairs. The notions of relation, function, bijection and equinumerousness are defined as usual (still without any assumptions as to the existence of any ordered pairs). An infinite set is defined as a set which is equinumerous with one of its proper subsets. A proper class is defined as a class which is not a set. The axioms of pocket set theory are Extensionality: Classes with the same elements are equal. Class Comprehension: For any formula $$\phi$$, there is a class $$\{x \mid \phi(x)\}$$ which contains all sets $$x$$ such that $$\phi(x)$$. (note that this is the class comprehension axiom of Kelley-Morse set theory, without any restrictions on quantifiers in $$\phi)$$. Infinite Sets: There is an infinite set; all infinite sets are the same size. Proper Classes: All proper classes are the same size, and any class the same size as a proper class is proper. We cannot resist proving the main results (because the proofs are funny). Empty Set: If the empty set were a proper class, then all proper classes would be empty. In particular, the Russell class would be empty. Let $$I$$ be an infinite set. $$\{I\}$$ would be a set, because it is not empty, and $$\{I,\{I\}\}$$ would be a set (again because it is not empty). But $$\{I,\{I\}\}$$ belongs to the Russell class (as a set with two elements, it cannot be either the Dedekind infinite $$I$$ or the singleton $$\{I\}$$. So $$\varnothing$$ is a set. Singleton: If any singleton $$\{x\}$$ is a proper class, then all singletons are proper classes, and the Russell class is a singleton. $$\{I, \varnothing \}$$ is a set (both elements are sets, and the class is not a singleton) which cannot be a member of itself, and so is in the Russell class. But so is $$\varnothing$$ in the Russell class; so the Russell class is not a singleton, and all singletons are sets. Unordered Pair: The Russell class is not a pair, because it has distinct elements $$\varnothing , \{\varnothing \}, \{\{\varnothing \}\}$$. Relations: All Kuratowski ordered pairs exist, so all definable relations are realized as set relations. Cantor’s theorem (no set is the same size as the class of its subsets) and the Schröder-Bernstein theorem (if there are injections from each of two classes into the other, there is a bijection between them) have their standard proofs. The Russell class can be shown to be the same size as the universe using Schröder-Bernstein: the injection from $$R$$ into $$V$$ is obvious, and $$V$$ can be embedded into $$R$$ using the map $$x \mapsto \{\{x\}, \varnothing \}$$ (clearly no set $$\{\{x\}, \varnothing \}$$ belongs to itself). So a class is proper iff it is the same size as the universe (limitation of size). Define the von Neumann ordinals as classes which are strictly well-ordered by membership. Each finite ordinal can be proved to be a set (because it is smaller than its successor and is a subclass of the Russell class). The class of all ordinals is not a set (but is the last ordinal), for the usual reasons, and so is the same size as the universe, and so the universe can be well-ordered. There is an infinite ordinal, because there is an ordinal which can be placed in one-to-one correspondence with one’s favorite infinite set $$I$$. Since there is an infinite ordinal, every finite ordinal is a set and the first infinite ordinal $$\omega$$ is a set. It follows that all infinite sets are countably infinite. The power set of an infinite set $$I$$ is not the same size as $$I$$ by Cantor’s theorem, is certainly infinite, and so cannot be a set, and so must be the same size as the universe. It follows by usual considerations that the universe is the same size as $$\wp(\omega)$$ or as $$\mathbf{R}$$ (the set of real numbers, defined in any of the usual ways), and its “cardinal” is $$c$$. Further, the first uncountable ordinal $$\omega_1$$ is the cardinality of the universe, so the Continuum Hypothesis holds. It is well-known that coding tricks allow one to do classical mathematics without ever going above cardinality $$c$$: for example, the class of all functions from the reals to the reals, is too large to be even a proper class here, but the class of continuous functions is of cardinality $$c$$. An individual continuous function $$f$$ might seem to be a proper class, but it can be coded as a hereditarily countable set by (for example) letting the countable set of pairs of rationals $$\langle p, q\rangle$$ such that $$p \lt f(q)$$ code the function $$f$$. In fact, it is claimed that most of classical mathematics can be carried out using just natural numbers and sets of natural numbers (second-order arithmetic) or in even weaker systems, so pocket set theory (having the strength of third order arithmetic) can be thought to be rather generous. We do remark that it is not necessarily the case that the hypothetical advocate of pocket set theory thinks that the universe is small; he or she might instead think that the continuum is very large… ### 9.2 Vopenka’s alternative set theory Petr Vopenka has presented the following alternative set theory (1979). The theory has sets and classes. The following axioms hold of sets. Extensionality: Sets with the same elements are the same. Empty set: $$\varnothing$$ exists. Successor: For any sets $$x$$ and $$y, x \cup \{y\}$$ exists. Induction: Every formula $$\phi$$ expressed in the language of sets only (all parameters are sets and all quantifiers are restricted to sets) and true of $$\varnothing$$ and true of $$x \cup \{y\}$$ if it is true of $$x$$ is true of all sets. Regularity: Every set has an element disjoint from it. The theory of sets appears to be the theory of $$V_{\omega}$$ (the hereditarily finite sets) in the usual set theory! We now pass to consideration of classes. Existence of classes: If $$\phi(x)$$ is any formula, then the class $$\phi(x)$$ of all sets $$x$$ such that $$\phi(x)$$ exists. (The set $$x$$ is identified with the class of elements of $$x$$.) Note that Kuratowski pairs of sets are sets, and so we can define (class) relations and functions on the universe of sets much as usual. Extensionality for classes: Classes with the same elements are equal. Definition: A semiset is a subclass of a set. A proper class is a class which is not a set. A proper semiset is a subclass of a set which is not a set. Axiom of proper semisets: There is a proper semiset. A proper semiset is a signal that the set which contains it is nonstandard (recall that all sets seem to be hereditarily finite!) Definition: A set is finite iff all of its subclasses are sets. A finite set has standard size (the use of “finite” here could be confusing: all sets are nonstandard finite here, after all). Definition: An ordering of type $$\omega$$ is a class well-ordering which is infinite and all of whose initial segments are finite. A class is countable if it has an ordering of type $$\omega$$. An ordering of type $$\omega$$ has the same length as the standard natural numbers. We can prove that there is such an ordering: consider the order on the finite (i.e., standard finite) von Neumann ordinals. There must be infinite von Neumann ordinals because there is a set theoretically definable bijection between the von Neumann ordinals and the whole universe of sets: any proper semiset can be converted to a proper semiset of a set of von Neumann ordinals. Prolongation axiom: Each countable function $$F$$ can be extended to a set function. The Prolongation Axiom has a role similar to that of the Standardization Axiom in the “nonstandard” set theory IST above. Vopenka considers representations of superclasses of classes using relations on sets. A class relation $$R$$ on a class $$A$$ is said to code the superclass of inverse images of elements of $$A$$ under $$R$$. A class relation $$R$$ on a class $$A$$ is said to extensionally code this superclass if distinct elements of $$A$$ have distinct preimages. He “tidies up” the theory of such codings by adopting the Axiom of extensional coding: Every collection of classes which is codable is extensionally codable. It is worth noting that this can be phrased in a way which makes no reference to superclasses: for any class relation $$R$$, there is a class relation $$R'$$ such that for any $$x$$ there is $$x'$$ with preimage under $$R'$$ equal to the preimage of $$x$$ under $$R$$, and distinct elements of the field of $$R'$$ have distinct preimages. His notion of coding is more general: we can further code collections of classes by taking a pair $$\langle K, R\rangle$$ where $$K$$ is a subclass of the field of $$R$$; clearly any collection of classes codable in this way can be extensionally coded by using the axiom in the form we give. The final axiom is Axiom of cardinalities: If two classes are uncountable, they are the same size. This implies (as in pocket set theory) that there are two infinite cardinalities, which can be thought of as $$\aleph_0$$ and $$c$$, though in this context their behavior is less familiar than it is in pocket set theory. For example, the set of all natural numbers (as Vopenka defines it) is of cardinality $$c$$, while there is an initial segment of the natural numbers (the finite natural numbers) which has the expected cardinality $$\omega$$. One gets the axiom of choice from the axioms of cardinalities and extensional codings; the details are technical. One might think that this would go as in pocket set theory: the order type of all the ordinals is not a set and so has the same cardinality as the universe. But this doesn’t work here, because the “ordinals” in the obvious sense are all nonstandard finite ordinals, which, from a class standpoint, are not well-ordered at all. However, there is a devious way to code an uncountable well-ordering using the axiom of extensional coding, and since its domain is uncountable it must be the same size as the universe. This is a rather difficult theory. A model of the alternative set theory in the usual set theory is a nonstandard model of $$V_{\omega}$$ of size $$\omega_1$$ in which every countable external function extends to a function in the model. It might be best to suppose that this model is constructed inside $$L$$ (the constructible universe) so that the axiom of cardinalities will be satisfied. The axiom of extensional coding follows from Choice in the ambient set theory. The constructions of the natural numbers and the real numbers with which we started go much as usual, except that we get two kinds of natural numbers (the finite von Neumann ordinals in the set universe (nonstandard), and the finite von Neumann set ordinals (standard)). The classical reals can be defined as Dedekind cuts in the standard rationals; these are not sets, but any real can then be approximated by a nonstandard rational. One can proceed to do analysis with some (but not quite all) of the tools of the usual nonstandard analysis. ## 10. Double Extension Set Theory: A Curiosity A recent proposal of Andrzej Kisielewicz (1998) is that the paradoxes of set theory might be evaded by having two different membership relations $$\in$$ and $$\varepsilon$$, with each membership relation used to define extensions for the other. We present the axiomatics. The primitive notions of this theory are equality $$(=)$$ and the two flavors $$\in$$ and $$\varepsilon$$ of membership. A formula $$\phi$$ is uniform if it does not mention $$\varepsilon$$. If $$\phi$$ is a uniform formula, $$\phi^*$$ is the corresponding formula with $$\in$$ replaced by $$\varepsilon$$ throughout. A set $$A$$ is regular iff it has the same extension with respect to both membership relations: $$x \in A \equiv x \varepsilon A$$. The comprehension axiom asserts that for any uniform formula $$\phi (x)$$ in which all parameters (free variables other than $$x)$$ are regular, there is an object $$\{x \mid \phi (x)\}$$ such that $$\forall x(x \in A \equiv \phi^* \amp x \varepsilon A \equiv \phi)$$. The extensionality axiom asserts that for any $$A$$ and $$B, \forall x(x \in A \equiv x \varepsilon B) \rightarrow A = B$$. Notice that any object to which this axiom applies is regular. Finally, a special axiom asserts that any set one of whose extensions is included in a regular set is itself regular. This theory can be shown to interpret ZF in the realm of hereditarily regular sets. Formally, the proof has the same structure as the proof for Ackermann set theory. It is unclear whether this theory is actually consistent; natural ways to strengthen it (including the first version proposed by Kisielewicz) turn out to be inconsistent. It is also extremely hard to think about! An example of the curious properties of this theory is that the ordinals under one membership relation are exactly the regular ordinals while under the other they are longer; this means that the apparent symmetry between the two membership relations breaks! ## 11. Conclusion We have presented a wide range of theories here. The theories motivated by essentially different views of the realm of mathematics (the constructive theories and the theories which support nonstandard analysis) we set to one side. Similarly, the theories motivated by the desire to keep the universe small can be set to one side. The alternative classical set theories which support a fluent development of mathematics seem to be ZFC or its variants with classes (including Ackermann), NFU + Infinity + Choice with suitable strong infinity axioms (to get s.c. sets to behave nicely), and the positive set theory of Esser. Any of these is adequate for the purpose, in our opinion, including the one currently in use. There is no compelling reason for mathematicians to use a different foundation than ZFC; but there is a good reason for mathematicians who have occasion to think about foundations to be aware that there are alternatives; otherwise there is a danger that accidental features of the dominant system of set theory will be mistaken for essential features of any foundation of mathematics. For example, it is frequently said that the universal set (an extension which is actually trivially easy to obtain in a weak set theory) is an inconsistent totality; the actual situation is merely that one cannot have a universal set while assuming Zermelo’s axiom of separation. ## Bibliography • Aczel, Peter, 1978, “The Type Theoretic Interpretation of Constructive Set Theory”, in A. MacIntyre, L. Pacholski, J. Paris (eds.), Logic Colloquium ‘77, (Studies in Logic and the Foundations of Mathematics, 96), Amsterdam: North-Holland, pp. 55–66. doi:10.1016/S0049-237X(08)71989-X • –––, 1982, “The Type Theoretic Interpretation of Constructive Set Theory: Choice Principles”, in A.S. Troelstra and D. van Dalen (eds.), The L.E.J. Brouwer Centenary Symposium, (Studies in Logic and the Foundations of Mathematics, 110), Amsterdam: North-Holland, pp. 1–40. doi:10.1016/S0049-237X(09)70120-X • –––, 1986, “The Type Theoretic Interpretation of Constructive Set Theory: Inductive Definitions”, in Ruth Barcan Marcus, Georg J.W.Dorn, and Paul Weingartner (eds.), Logic, Methodology, and Philosophy of Science VII, (Studies in Logic and the Foundations of Mathematics, 114), Amsterdam: North-Holland, pp. 17–49. doi:10.1016/S0049-237X(09)70683-4 • –––, 1988, Non-Well-Founded Sets (CSLI Lecture Notes, 14), Stanford: CSLI Publications. • St. Augustine, De Civitate Dei, Book 12, chapter 18. • Barwise, Jon, 1975, Admissible Sets and Structures: An Approach to Definability Theory, (Perspectives in Mathematical Logic, 7), Berlin: Springer-Verlag. • Boffa, M., 1988, “ZFJ and the Consistency Problem for NF”, Jahrbuch der Kurt Gödel Gesellschaft, Vienna, pp. 102–106 • Burali-Forti, C., 1897, “Una questione sui numeri transfiniti”, Rendiconti del Circolo matematico di Palermo, 11(1): 154–164. A correction appears in “Sulle classi ben ordinate”, Rendiconti del Circolo matematico di Palermo, 11(1): 260. It is not clear that Burali-Forti ever correctly understood his paradox. doi:10.1007/BF03015911 and doi:10.1007/BF03015919 • Cantor, Georg, 1872, “Über die Ausdehnung eines Satzes aus der Theorie der trigonometrischen Reihen”, Mathematischen Annalen, 5: 123–32. • –––, 1891, “Über eine elementare Frage der Mannigfaltigkeitslehre”, Jahresbericht der deutschen Mathematiker-Vereiningung, 1: 75–8. • Cocchiarella, Nino B., 1985, “Frege’s Double-Correlation Thesis and Quine’s Set Theories NF and ML”, Journal of Philosophical Logic, 14(1): 1–39. doi:10.1007/BF00542647 • Crabbé, Marcel, 1982, “On the Consistency of an Impredicative Subsystem of Quine’s NF”, Journal of Symbolic Logic, 47(1): 131–36. doi:10.2307/2273386 • –––, 2016, “NFSI is not included in NF3”, Journal of Symbolic Logic, 81(3): 948–950. doi:10.1017/jsl.2015.29 • Dedekind, Richard, 1872, Stetigkeit und irrationale Zahlen, Brannschweig: Friedrich Vieweg und Sohn (second edition, 1892). • Esser, Olivier, 1999, “On the Consistency of a Positive Theory”, Mathematical Logic Quarterly, 45(1): 105–116. doi:10.1002/malq.19990450110 • Feferman, Sol, 2006, “Enriched Stratified Systems for the Foundations of Category Theory” in Giandomenico Sica (ed.), What is Category Theory?, Milan: Polimetrica. [Feferman 2006 preprint available online (PDF)] • Frege, Gottlob, 1884, Die Grundlagen der Arithmetik, English translation by J.L. Austin, The Foundations of Arithmetic, Oxford: Blackwell, 1974. • Friedman, Harvey, 1973, “Some Applications of Kleene’s Methods for Intuitionistic Systems”, in A.R.D. Mathias and H. Rogers (eds.), Cambridge Summer School in Mathematical Logic, (Lecture Notes in Mathematics, 337), Berlin: Springer-Verlag, pp. 113–170. doi:10.1007/BFb0066773 • Grishin, V.N., 1969, “Consistency of a Fragment of Quine’s NF System”, Soviet Mathematics Doklady, 10: 1387–1390. • Hallett, Michael, 1984, Cantorian Set Theory and Limitation of Size, Oxford: Clarendon, pp. 280–286. • Hamkins, Joel David, 2012, “The Set-Theoretic Multiverse”, Review of Symbolic Logic, 5(3): 416–449. doi:10.1017/S1755020311000359 • Holmes, M. Randall, 1998, Elementary Set Theory with a Universal Set, (Cahiers du Centre de logique, 10), Louvain-la-Neuve: Academia. (See chapter 20 for the discussion of well-founded extensional relation types.) [Holmes 1998 revised and corrected version available online (PDF)] • –––, 2012, “The Usual Model Construction for NFU Preserves Information”, Notre Dame Journal of Formal Logic, 53(4): 571–580. doi:10.1215/00294527-1722764 • Jensen, Ronald Bjorn, 1968, “On the Consistency of a Slight (?) Modification of Quine’s ‘New Foundations’”, Synthese, 19(1): 250–63. doi:10.1007/BF00568059 • Kisielewicz, Andrzej, 1998, “A Very Strong Set Theory?”, Studia Logica, 61(2): 171–178. doi:10.1023/A:1005048329677 • Kuratowski, Casimir [Kazimierz], 1921, “Sur la notion de l’ordre dans la Théorie des Ensembles”, Fundamenta Mathematicae, 2(1): 161–171. [Kuratowski 1921 available online] • Lévy, Azriel, 1959, “On Ackermann’s Set Theory”, Journal of Symbolic Logic, 24(2): 154–166. doi:10.2307/2964757 • Mac Lane, Saunders, 1986, Mathematics, Form and Function, Berlin: Springer-Verlag. • Mathias, A.R.D., 2001a, “The Strength of Mac Lane Set Theory”, Annals of Pure and Applied Logic, 110(1–3): 107–234. doi:10.1016/S0168-0072(00)00031-2 • –––, 2001b, “Slim Models of Zermelo Set Theory”, The Journal of Symbolic Logic, 66(2): 487–496. doi:10.2307/2695026 • McLarty, Colin, 1992, “Failure of Cartesian Closedness in NF”, Journal of Symbolic Logic, 57(2): 555–6. doi:10.2307/2275291 • Nelson, Edward, 1977, “Internal Set Theory, a New Approach to Nonstandard Analysis”, Bulletin of the American Mathematical Society, 83(6): 1165–1198. doi:10.1090/S0002-9904-1977-14398-X • Quine, W.V.O., 1937, “New Foundations for Mathematical Logic”, American Mathematical Monthly, 44(2): 70–80. doi:10.2307/2300564 • –––, 1945, “On Ordered Pairs”, Journal of Symbolic Logic, 10(3): 95–96. doi:10.2307/2267028 • Reinhardt, William N., 1970, “Ackermann’s Set Theory Equals ZF”, Annals of Mathematical Logic, 2(2): 189–249. doi:10.1016/0003-4843(70)90011-2 • Robinson, Abraham, 1966, Non-standard Analysis, Amsterdam: North-Holland. • Rosser, J. Barkley, 1973, Logic for Mathematicians, second edition, New York: Chelsea. • Russell, Bertrand, 1903, The Principles of Mathematics, London: George Allen and Unwin. • Specker, Ernst P., 1953, “The Axiom of Choice in Quine’s ‘New Foundations for Mathematical Logic’”, Proceedings of the National Academy of Sciences of the United States of America, 39(9): 972–5. [Specker 1953 available online] • Spinoza, Benedict de, 1677, Ethics, reprinted and translated in A Spinoza Reader: the “Ethics” and Other Works, Edwin Curley (ed. and trans.), Princeton: Princeton University Press, 1994. • Tupailo, Sergei, 2010, “Consistency of Strictly Impredicative NF and a Little More …”, Journal of Symbolic Logic, 75(4): 1326–1338. doi:10.2178/jsl/1286198149 • Vopěnka, Petr, 1979, Mathematics in the Alternative Set Theory, Leipzig: Teubner-Verlag. • Wang, Hao, 1970, Logic, Computers, and Sets, New York: Chelsea, p. 406. • Whitehead, Alfred North and Bertrand Russell, [PM] 1910–1913, Principia Mathematica, 3 volumes, Cambridge: Cambridge University Press. • Wiener, Norbert, 1914, “A Simplification of the Logic of Relations”, Proceedings of the Cambridge Philosophical Society, 17: 387–390. • Zermelo, Ernst, 1908, “Untersuchen über die Grundlagen der Mengenlehre I”, Mathematische Annalen, 65: 261–281.
33,210
139,403
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.015625
3
CC-MAIN-2021-17
latest
en
0.944378
https://www.dremendo.com/cpp-programming-tutorial/cpp-one-dimensional-array-questions/q10-input-10-numbers-in-1d-array-and-insert-a-number-at-the-given-position-in-cpp
1,695,387,753,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233506399.24/warc/CC-MAIN-20230922102329-20230922132329-00295.warc.gz
813,034,153
11,755
# Input 10 numbers in 1d array and insert a number at the given position in C++ ###### One Dimensional Array - Question 10 In this question, we will see how how to input 10 numbers in a one dimensional integer array and insert a number at a given position in the array in C++ programming. To know more about one dimensional array click on the one dimensional array lesson. Q10) Write a program in C++ to input 10 numbers in a one dimensional integer array and input a number and a position. Now insert the number at that position by shifting the rest of the numbers to the right. The last element is therefore removed from the array. #### Program ``````#include <iostream> #include <conio.h> using namespace std; int main() { int a[10], i,n,p; cout<<"Enter 10 numbers\n"; for(i=0; i<10; i++) { cin>>a[i]; } cout<<"Enter number and its position to insert in the array\n"; cin>>n>>p; for(i=9; i>p; i--) { a[i]=a[i-1]; } a[i]=n; cout<<"\nModified array after inserting the number\n"; for(i=0; i<10; i++) { cout<<a[i]<<" "; } return 0; }`````` #### Output ```Enter 10 numbers 18 12 5 10 15 45 38 72 64 11 Enter number and its position to insert in the array 54 4 Modified array after inserting the number 18 12 5 10 54 15 45 38 72 64```
353
1,245
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.828125
3
CC-MAIN-2023-40
longest
en
0.606709
https://us.metamath.org/mpeuni/intimasn.html
1,713,146,614,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296816939.51/warc/CC-MAIN-20240415014252-20240415044252-00027.warc.gz
542,280,868
4,732
Mathbox for Richard Penner < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  intimasn Structured version   Visualization version   GIF version Theorem intimasn 39987 Description: Two ways to express the image of a singleton when the relation is an intersection. (Contributed by RP, 13-Apr-2020.) Assertion Ref Expression intimasn (𝐵𝑉 → ( 𝐴 “ {𝐵}) = {𝑥 ∣ ∃𝑎𝐴 𝑥 = (𝑎 “ {𝐵})}) Distinct variable groups:   𝐴,𝑎   𝐵,𝑎,𝑥   𝑥,𝐴   𝑥,𝐵 Allowed substitution hints:   𝑉(𝑥,𝑎) Proof of Theorem intimasn Dummy variables 𝑦 𝑏 are mutually distinct and distinct from all other variables. StepHypRef Expression 1 ax-5 1904 . 2 (𝐵𝑉 → ∀𝑦 𝐵𝑉) 2 r19.12sn 4648 . . . 4 (𝐵𝑉 → (∃𝑏 ∈ {𝐵}∀𝑎𝐴𝑏, 𝑦⟩ ∈ 𝑎 ↔ ∀𝑎𝐴𝑏 ∈ {𝐵}⟨𝑏, 𝑦⟩ ∈ 𝑎)) 32biimprd 250 . . 3 (𝐵𝑉 → (∀𝑎𝐴𝑏 ∈ {𝐵}⟨𝑏, 𝑦⟩ ∈ 𝑎 → ∃𝑏 ∈ {𝐵}∀𝑎𝐴𝑏, 𝑦⟩ ∈ 𝑎)) 43alimi 1805 . 2 (∀𝑦 𝐵𝑉 → ∀𝑦(∀𝑎𝐴𝑏 ∈ {𝐵}⟨𝑏, 𝑦⟩ ∈ 𝑎 → ∃𝑏 ∈ {𝐵}∀𝑎𝐴𝑏, 𝑦⟩ ∈ 𝑎)) 5 intimag 39986 . 2 (∀𝑦(∀𝑎𝐴𝑏 ∈ {𝐵}⟨𝑏, 𝑦⟩ ∈ 𝑎 → ∃𝑏 ∈ {𝐵}∀𝑎𝐴𝑏, 𝑦⟩ ∈ 𝑎) → ( 𝐴 “ {𝐵}) = {𝑥 ∣ ∃𝑎𝐴 𝑥 = (𝑎 “ {𝐵})}) 61, 4, 53syl 18 1 (𝐵𝑉 → ( 𝐴 “ {𝐵}) = {𝑥 ∣ ∃𝑎𝐴 𝑥 = (𝑎 “ {𝐵})}) Colors of variables: wff setvar class Syntax hints:   → wi 4  ∀wal 1528   = wceq 1530   ∈ wcel 2107  {cab 2797  ∀wral 3136  ∃wrex 3137  {csn 4559  ⟨cop 4565  ∩ cint 4867   “ cima 5551 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1789  ax-4 1803  ax-5 1904  ax-6 1963  ax-7 2008  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2153  ax-12 2169  ax-ext 2791  ax-sep 5194  ax-nul 5201  ax-pr 5320  ax-un 7453 This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3an 1083  df-tru 1533  df-ex 1774  df-nf 1778  df-sb 2063  df-mo 2616  df-eu 2648  df-clab 2798  df-cleq 2812  df-clel 2891  df-nfc 2961  df-ral 3141  df-rex 3142  df-rab 3145  df-v 3495  df-sbc 3771  df-dif 3937  df-un 3939  df-in 3941  df-ss 3950  df-nul 4290  df-if 4466  df-sn 4560  df-pr 4562  df-op 4566  df-uni 4831  df-int 4868  df-br 5058  df-opab 5120  df-xp 5554  df-cnv 5556  df-dm 5558  df-rn 5559  df-res 5560  df-ima 5561 This theorem is referenced by:  intimasn2  39988  brtrclfv2  40057 Copyright terms: Public domain W3C validator
1,295
2,124
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.375
3
CC-MAIN-2024-18
latest
en
0.176171
https://demmelearning.com/learning-blog/why-we-learn-algebra/?replytocom=23698
1,585,673,262,000,000,000
text/html
crawl-data/CC-MAIN-2020-16/segments/1585370502513.35/warc/CC-MAIN-20200331150854-20200331180854-00480.warc.gz
433,560,877
26,612
← Blog home # 6 Reasons Why We Learn Algebra When a student says they’re studying algebra, a common reply from adults is, “I haven’t used that since I graduated from high school.” Responses like this can be discouraging to students who wonder why we learn algebra if it is not useful for life. I have good news for algebra students: algebra does indeed enrich our life if we choose to understand it. Memorizing how to do algebra might get a course finished, but understanding algebra helps us notice when we can use it to solve everyday problems. ## 6 Reasons Why We Learn Algebra ### 1) Algebra is Faster And Better Than “Basic” Math Just as multiplying two by twelve is faster than counting to 24 or adding 2 twelve times, algebra helps us solve problems more quickly and easily than we could otherwise. Algebra also opens up whole new areas of life problems, such as graphing curves that cannot be solved with only foundational math skills. ### 2) Algebra is Necessary to Master Statistics and Calculus While learning one kind of math to learn more kinds of math may not be an immediately satisfying concept, statistics and calculus are used by many people in their jobs. For example, in my job as research analyst for Demme Learning, I use statistics every day. I help departments identify ways to measure their success. I also use statistics to predict how many books we will sell of each level of Math-U-See and Spelling You See in a year. In general, statistics are used in certain jobs within businesses, the media, health and wellness, politics, social sciences, and many other fields. Understanding statistics makes us wiser consumers of information and better employees and citizens. Calculus helps us describe many complex processes, such as how the speed of an object changes over time. Scientists and engineers use calculus in research and in designing new technology, medical treatments, and consumer products. Learning calculus is a must for anyone interested in pursuing a career in science, medicine, computer modeling, or engineering. ### 3) Algebra May Be a Job Skill Later A student may be confident they are not going into any career needing statistics or calculus, but many people change jobs and entire careers multiple times in their working life. Possessing a firm knowledge and understanding of algebra will make career-related changes smoother. ### 4) Algebra Can Be Useful in Life Outside of the Workplace I have found algebra helpful in making financial decisions. For example, I use algebra every year to pick a health care plan for my family using two-variable equations to find the break-even point for each option. I have used it in choosing cell phone plans. I even used it when custom-ordering bookshelves for our home. My wife also regularly uses algebra in her crafting. ### 5) Algebra Reinforces Logical Thinking I would not use algebra as the only means of teaching logic. There are more direct and effective means of doing so, but it is a nice side-benefit that the two subject areas reinforce one another. ### 6) Algebra is Beautiful The beauty of algebra is an optional benefit because one has to truly choose to enjoy it, but algebra provides us with a basic language to describe so many types of real-world phenomena from gravity to the population growth of rabbits. That five letters can be used to describe how an entire category of matter, namely ideal gases, behaves is amazing and beautiful in its simplicity. There is also a beauty when we start with a complex-looking problem and combine and simplify over and over until we have one value for each variable. The process can be enjoyable and the result immensely satisfying. Algebra is an important life skill worth understanding well. It moves us beyond basic math and prepares us for statistics and calculus. It is useful for many jobs some of which a student may enter as a second career. Algebra is useful around the house and in analyzing information in the news. It also reinforces logical thinking and is beautiful. So, keep an open mind about why we learn algebra and look for ways to share its applications with your student. Dispel the stigma that it is a boring list of rules and procedures to memorize. Instead, consider algebra as a gateway to exploring the world around us. Those are our top reasons why we learn algebra, and there are plenty more. What would you add to the list? Post your suggestions in the comments. ## 39 thoughts on “6 Reasons Why We Learn Algebra” 1. Megan A I was fascinated by this article. I have heard two of the three reasons given for studying algebra, but still felt that i don’t truly understand why we study algebra. Just two weeks ago, a bank loan officer wanted to sell us a refinance. I am not sure if he had ever heard what I said next, “well, I will crunch the numbers and get back to you concerning whether or not we would like to proceed.” Sure enough, the numbers were not being twisted in our favor. God wants us to be discerning, and algebra can very well be that tool needed to decide if we are using God’s money wisely. Thank you! 1. H.R. When I was in the 5th., or 6th., grade, I looked at my friend’s older brother’s homework, and ask him what’s that ? ! He said; That’s ” Algebra ” ! And I said ; How does it work ? / And he replied [ while I was looking at formula ] ; a+b=c / i.e. 1+2=3 . And I said ; That’s the most ridiculous thing I’ve ever seen in my life ? !! Why don’t they just say 1 plus 2 equals 3 / ? ! After that I just walked away from it, and never took it in school, because I thought that it was [ unnecessary ] nonsense ! I wish that someone could have introduced it by saying what it’s ” Purpose was ” !! I lost out, on a lot ! 1. Pamelann Dear HR: It is not too late “to win” rather than feel like you “lost out”. I was a “D” student at best when I was taking high school algebra. I could barely remember any of my math facts. So when my oldest son started algebra 1, I was at a loss to teach him. This was not a pleasant place to be as a homeschooling parent. So we put in place a tutor who was a high school math teacher and a friend. At the time, she was not employed by any school as she was a stay-at-home mom. With much regularity, she tutored students in math to supplement her husband’s income. Tutoring my son was not successful because he still did not understand the math and I still couldn’t help him. So we decided that I would get tutored so I could still help him at home. This worked very well and I realized that I was good in math and that I enjoyed math. Our oldest son is now 2 years out of high school and our other children are advancing to more difficult math. I am currently in Algebra 2 and have hope to study calculus. Slope intercept is no longer a foreign language. Math is beautiful and it is part of God’s creation. Get down with math and find a tutor if you need one. God Bless you, Pamelann 2. Sherri Estes I am 13 years old and I was really wondering why I was taking algebra 2 this helped me realize why Thank you. 3. Ben I teach 8th and 9th grade math. I will have all my students read and discuss this article. Teachers get this question everyday. 4. Helen I never persued my love for math after high school but I find myself very curious about why the subject is so important in our lives, especially beyond those basics we all learned in high school . The above comments convinced me to learn more NOW. 5. Ashley I am 21 and I thought I should learn algebra and calculus , and here it opened my mind more for mathematics. 6. Tina To solve a problem in algebra, you identify the problem, consider the variables, develop a plan to solve the problem, implement the plan, and assess your results. You use that same process to solve any problem in life. Algebra trains your brain to solve problems. 7. Jonathan Linn You have given one solid POSSIBLE reason. Variables for determining break even. The other five are arbitrary at best. Sooooo….. 8. Isaac Jonathan, All the reasons for learning algebra are possible reasons. Like any other skill (whether it be learning to cook or learning to drive a car) you can choose to use algebra every day for the rest of your life or you can choose to never use it again (and get other people to do it for you). It’s really up to you. 9. Harry E. Keller Algebra provides the first real introduction to abstraction. Our mental skill set must include abstraction if we are to succeed in today’s world. Those six reasons seem quite nice and have value for many. Abstraction has value for anyone who does not do menial work and even for some who do. Learn algebra for itself because it provides you with an important tool in your mental toolkit. 10. Amanda I was curious when I read the title however I still believe class time would be better spent teaching children to manage their own money. That is a maths skill they will use. Algebra should be taught on the job if you need it as most do not. Although I can appreciate you enjoy it which is lovely. 1. Jany Yes indeed. Penn State has a class called The Mathematics of Money(Math 34)It teaches students about investments, credit card debt, stock options, and basic business math. Algebra is useful only if you’re a STEM person. Not for arts students. 1. Andrea So how do you manage your money if you can’t use algebra to determine which long term option is a better deal? Or determine how much of something you can buy at a given price? Algebra is part of budgeting and finances. 1. Late Responder Foundational mathematics does not require the use of formulas. Math can easily be done through numeration no need to equate 12 eggs is 2.49 at store 1 18 eggs on sale for 2.99 at store 2 I always use all my eggs before they expire hence 18 is cheaper go to store 2 However Cheese is 5.49 at store 1 Same brand same cheese 7.49 at store 2. Go to Store 1 Now it comes down to how much I value my time to shop around and the distance between the stores. In my own life, they are within walking distance so I shop around get eggs at Store 2, then walk and get cheese at Store 1. I never need an algebraic equation to do this action. I just base it on the lowest cost for value no higher math needed. For investments, it’s quite simple if you’re not doing graphing vectors, simple formulas are again all you need. I want a 5% return annually on my investment. Stock A has averaged returns of 7% a year over 10 years and has a volatility of -10% to +10% per year. Stock B has an average return of 3% a year over 10 years, with an appreciation of -5% to +5% a year, however, it consistently pays a dividend as well of 4% and has a long history of doing so an example of this is a utility company. Algebra would help, however, now it comes down to intangibles your willingness to take risk and investors profile and time duration. The law of averages would be all you need if you are looking for a stable investment –> the algebraic equivalent would be the law of large numbers. In this case, either work. B has less volatility and risk, hence it is a more risk-averse investment. If you want more risk and more return that would be more aggressive in a shorter duration and Stock A is best. In the long run they both average 7%. Writing equations for yourself in algebra is a step above where it would be needed. That said there are cases for Algebra it’s just using the right tool for the right purpose. Algebra would be needed if you want to know the maximum of the eggs you consume before expiration on average to reduce or mitigate any food waste based on your own consumption. Or draw risk curves and time duration you want an asset to appreciate and calculate future interest if there is compounding. Example setting up a DRIP (Dividend Reinvestment Plan on Stock B) versus pure stock appreciation in stock A and or if you want to Dollar Cost Average Then formulas would be convenient to have to estimate the best return for the risk taken and time investment. In the end, Algebra is a tool, not always needed however it can be a useful tool in your own toolkit however a foundation in simple math can handle most everyday decisions involving Finance. 11. Renee I really hoped to find a good answer to sons’ question as to why he must learn algebra but sadly this was not the case. Number 2 is factual and therefor a reasonable explanation for why one should learn algebra; the other reasons are purely subjective. Yes, it is important to strengthen ones critical thinking skills, and may indeed be useful if one decides to pursue a science or math-based career, but otherwise the pursuit of conquering algebra is without long-lasting purpose. 1. Paula Poblete I agree wholeheartedly, and I had to endure advanced algebra, calculus and statistics to get my bachelors, totally unnecessary. And my counselor said that if I had taking just two more semesters I could get a degree in mathematics, No, I declined the kind offer And, yes the reasons are coming from a person who just likes algebra. Its like hearing the reason to learn knife skills from a Master Chef…. 12. Karine Lutfiah Oktaviana In my opinion, there are many reasons why we must learn algebra. First, for beginners, algebra is foundational for advanced math classes. Algebra also can solve problems more quickly and easily that can’t be solved only with foundational math skills. Second, algebra is useful for our life. In the modern era, algebra is used in all modern technology, for examples google, internet, mobil phone, and digital television. Third, algebra can reinforces our logical thinking. Learning algebra help us to develop our critical thinking skills, including problem solving, logic, and pattern. In the university, many of major like statistic, pharmacy, and mathematic are required have a good knowledge of algebra. So, algebra is an important subject for our life in the next time. 13. Ken Cluck Student: Why do we need to learn algebra? I’ll never need it in my job. Teacher: Do you lift weights or work out in the gym? Student: Sure. It makes my muscles work better. Teacher: Will you ever lift weights or exercise for a job? Student: No. But it will help me have the stamina to do my job. Teacher: Well, algebra is a work out for your brain which helps you think logically that will also help you do your job. 14. Paula Poblete I am a system engineer, an a successful one at that, working in technology every day. Other than the 4 basic operations, and percentages, I do not use any of the advanced calculus, or statistics I had to study to get my degree. I use fractions for cooking. Your reasons why we learn algebra are really reasons why you learn algebra. 1) I don’t need faster math, I really don’t. 2) Algebra is needed for calculus and statistics, agree, but I don’t need calculus or statistics 3)To make career change smoother, learn coding, learn finance, unless you like algebra, it is unlikely to be used for a career change 4) No, simply no, not worth the effort to learn it in order to figure out health plans, I’ll take the long route for comparisons, ask questions, etc. 5) There are many ways to reinforce critical thinking by solving puzzled, problem solving, team work 6) It can be beautiful, for you, and that is great. But some of us are just not into it. Advance math should be all elective followed by those who discovered a passion for it. The rest of us can be left alone with the 4 operators, very useful, percentages, and fractions. 1. Tonnymelly 15. Elaine Siebers Thank you for this article. It has been 50 years since I asked this question to my algebra teacher in class. She did not answer me.😪. I was serious. What would a homemaker do with this skill? What she should of done was tell the whole class this information. Plus she could of said if you ever want to be a nurse or dental hygienist this will be a prerequisite. Tell the world 16. Marty Maxwell Lots of theory but I would like a specific application, please. The one about refinancing can be done easily without algebra. Are there basic rules and applications that are ingrained in your mind, like how to multiply and divide. Please enlighten me 1. Richard C Swanson Here is one that an owner of a coffee shop asked me. I have a \$12.31 per pound coffee that I want to blend with a \$5.04 per pound cheaper coffee. I want to sell it for \$9.00 per lb. How much of each should I` use? Not only doe algebra easily solve this problem but we learned that the only factor that matters is the edifference in price between the \$ coffee and the \$\$\$ coffee! Algebra was invented by the Arabs in the 9th century to avoid squabbles and keep people from feeling cheated. You have to understand it to use it of course. 17. Basic Billy I hate algebra. It gives me a headache. Who wants to sit there and figure out what y or g or a is. First of all why would you be given half of the information of something in the first place. Maybe for measurements it can save you time and physical work but to not know how much sue gets payed a hour if she gets payed 250 a week, basic division works just fine. 18. Andy ZInk I am a High School Math teacher and I strongly believe that most of the reasons for Algebra here are bogus. Furthermore, more students are polite and go along with it but do not really buy it. However, the reason I teach Algebra and stress to kids the importance of it is simply this. To get even associate’s degree from the local community college, they will require you to take Algebra II level class. That means to be a dental hygenist or a cop (in some districts), you will need to pass that Math class. Many of their peers find out years later the roadblock that math becomes. It can either open doors or close doors. Why that is is a bigger question but that is a fact. 19. Aidan I’m a high school student and I don’t think any of this is true 1) In the first reason, it states that algebra is better than ‘basic math’ but 2×24 isn’t algebra. THAT’S basic math 2) Why and when will I ever use calculus?? Only mathematicians and physicists (and others similar to these professions) will need to know x3 + y3 = 9y = 3. And how many people become mathematicians? Not many. Yet still calculus and algebra are being taught to everyone! 3) Where is the evidence to this? What ‘career related changes’ will need such complicated use of mathematics and algebraic formula? 4) Even if I do need algebra a few times in my life, there are things I like to call a ‘calculator’. Fascinating right? Teachers used to say that we won’t carry a calculator everywhere we go, but we do. 5) I actually won’t really argue this one much, yes there are better ways of logical thinking, and this may be a point where I use SOME algebra. Key word is some. I don’t really need to be taught such complicated formulas to improve critical thinking, I know a lot of basic stuff, but I think that’s all I’ll really use. Algebra takes up a very large amount of brain power and capacity, yet I’m still being fed more and more. 6) So yes, algebra is very interesting in some aspects. In its ‘raw’ form, it isn’t to me. This is the form I am being taught. And going back to one of my main arguments, when will I need to know statistics and calculus or calculate the population growth of rabbits? My job won’t have much to do with that. I know it may seem like I’m not being open, but this reply took me 30 minutes to type, so I really am committed to showing people why schools should be teaching us about money, taxes, how to get our dream job, happiness, social skills, there’s so much more! So in my opinion, the school system is broken 1. Kelly Dear Aidan, Thank you so much for you thorough response. I am a mother of two exceptional students both who have dyslexia and one with ADHD and physical special needs. I am currently searching the internet for ways of trying to break through the current learning block especially for my youngest child who is struggling the greatest with Algebra and seeking a real life need. He is 12. Yes the school system is broken. I am sorry for that. I feel my generation has failed yours in so many ways but would like to again thank you for your addition to my search and the sharing of your thoughts and feelings on this topic. They are relevant, well written and should be a wake up call to the school system and how one size does not fit all and how your time could have been used wiser pursuing other forms of education to a greater advantage. 20. bee Nice article. I don’t need Algebra but I love it. Not good in school why, the technical school had two options, career and advanced. Career was all the shop things cars, plumbing, machine shop, woodshop, electronics, electricity. These would produce 4 years of apprentices or technical colleges. I did advanced, University or College bound. The only problem was the Teachers in the Music department thought it would be a good idea to hijack the student time in the band by having them come in 2 hours early and stay 2 hours late. That makes for a long day and for what! I would have otherwise been doing my homework. Now let’s get real. Landed a .gov job right out of high school great did that for 35 years no change in career. I go to college while working and take the non-math course…turn down other jobs that are tech-driven, and end up doing upgrades for high school courses to keep my brain active. I was doing math all the time and never knew I was making up for lost time and misdirection(you can always change direction). I always had computer and programming skills learned in High School and when I finally took my College Analyst Programming courses I was old enough to say Algebra didn’t make a difference. If you come to me with a problem I will program it I don’t need to know the math just how to make the code do what you want it to do. It’s all mathematical linguistic. In the end, I look at my HP Prime V2 and Swift and say this whats left I sit with an Algebra, Calculus, Physics, Electrical etc book and think shall I revisit this one more time. I take one book and fly through it a month and then the next repeating it all year long. I don’t need Algebra but I love it. 21. George I wish I asserted myself in learning algebra in Jr High it’s used in electronics and brings you up to level of understanding of how computers operate 22. Camilla Davis I am 34 years old and I work as a part-time tutor and full time 5th grade teacher. Not to be rude but these points aren’t a obvious in the real world. A 9th grade student asked me when I use algebra and I responded, “Only when I need to teach it.” In a sense, algebra is unneeded
5,030
22,712
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.96875
3
CC-MAIN-2020-16
latest
en
0.950788
https://communities.springernature.com/posts/kepler-would-love-it
1,726,687,268,000,000,000
text/html
crawl-data/CC-MAIN-2024-38/segments/1725700651931.60/warc/CC-MAIN-20240918165253-20240918195253-00328.warc.gz
150,457,450
24,803
Kepler would love it. The complex arrangement of matter at an atomic/molecular level may produce new material properties. Here, we describe how to prepare the complex structures by blending structurally similar, but chemically distinct, molecules. Choose a social network to share with, or copy the URL to share elsewhere Share with... This is a representation of how your post may appear on social media. The actual post will vary between social networks The division of a plane into regular polygons has fascinated people since the ancient times. There are many monuments decorated by simple geometric objects forming complicated ornaments on murals or pavements across different cultures. The first rigorous mathematical treatment of tessellation of the Euclidean plane into regular polygons – tiles – was done by Johannes Kepler in his famous work Harmonices Mundi,  The Harmony of the World1.  This famous set of 5 books introduced mathematical description of planetary motion in the heliocentric system – Kepler’s Third Law. Surprisingly for many of his successors, a significant part of Harmonices Mundi was dedicated to tilings; in some transcriptions, these parts were shortened or even dismissed. Only in the 20th century was there a renewed interest in tilings as described in the excellent work by Grünbaum and Shephard.2 In Figure 1 there are examples of tilings. There are only 3 ways of forming regular tilings – by equilateral triangles, squares and hexagons – as there are strict mathematical criteria defining regular tiling. If we do not insist on a condition of a single type of tiles3, we arrive to an additional 8 semi-regular or Archimedean tilings. In these tilings the vertices – joints of tiles – are all equivalent. And if we allow more than one type of vertex, we arrive to uniform tilings. Figure 1: Archimedean tilings. (a) Vertices (joints of regular polygons marked by solid black circles) of 11 Archimedean tilings; the first three represent regular tilings. (b) Example of expression of tiling from 3 vertices marked by an asterisk in (a). In Archimedean tilings all the vertices are equivalent. Note that the vertices of the first one form a kagome lattice. However, tilings are not just a mathematical concept. The structure of material defines its properties. How to realize them on an atomic/molecular level? Employing self-assembly. Self-assembly is a spontaneous association of elementary building blocks into more complex structures. At a molecular level it allows the preparation of long-range-ordered nanostructures with tailored properties. When I was selecting the system to start with on our new equipment at the CEITEC Nano facility in Brno, I opted to a simple molecular system to master the new methodological approaches. The choice was biphenyl dicarboxylic acid (Figure 2a) – a linear molecule with two functional groups capable of formation of extended supramolecular structures both alone and in combination with transition metals. The systems also offer an interesting feature – the carboxylic groups can be dehydrogenated (Figure 2b), which dramatically changes their properties. Figure 2: Employed molecule. (a) Chemical structure of 4,4’ biphenyl dicarboxylic acid (BDA) and (b) models of BDA with distinct level of dehydrogenation, i.e. removal of hydrogen form carboxyl group. Shortly after we begun, I was amazed by the power of LEEM in combination with other more known techniques.  During my Ph.D. and postdoc times, we gradually annealed the sample to an increasing temperature for an arbitrary chosen time interval, and checked the changes later by scanning tunneling microscopy or X-ray photoelectron spectroscopy. But with LEEM, you see in real time what is happening on the surface, and you can stop exactly when there is a desired structure on the surface; there was no blind annealing anymore. This also enables the identifications of transient phases and reproducibly prepare them on the entire sample. Figure 3: Scanning tunneling microscopy analysis. Scanning tunneling images of molecular phases formed by pristine and fully dehydrogenated molecules (upper images). If partially dehydrogenated molecules are introduced to the mixture of pristine and fully dehydrogenated molecules, a new phase is formed that joins both binding motifs observed in the pure phases. Back to the self-assembly. Nature tends to produce simple structures. So, a single component system will usually form a regular or a semi-regular tiling. Even if we put together multiple components, they also tend to produce simple structures in the single phase, or they just segregate into two parts. So, we need something to put two distinct phases – each showing a characteristic binding motif – together. And this is exactly what our molecule can do. It has two carboxyl groups that can be dehydrogenated. Importantly one of them can be dehydrogenated whereas the second remains intact. And having a mixture of intact, fully transformed and partially transformed molecules enables us to put together two binding motifs characteristic for the pure phase and bind them together by a hybrid molecule (Figure 3). So, we arrive on a structure showing several types of vertices – a representation of a 2- or 3-uniform tiling (Figure 4). Read our paper for the full story!4 Figure 4: Molecular phases and tilings. (a) Molecular model of the complex phase with a schematic of the tiling. The vertices of the tiling are associated with centers of molecules. (b) 3-Uniform tiling with distinct vertices marked by arcs. References: (1)        Kepler, J. Harmonices Mundi; Johann Planck: Linz, 1619. (2)        Grunbaum, B.; Shephard, G. C. Tilings and Patterns: Second Edition; Dover Publications Inc., 2016. (3)        Note: Its actually the condition of flag transitivity that is relaxed to the condition of vertex isogonality. (4)        Kormoš, L.; Procházka, P.; Makoveev, A.O.; Čechal, J. Complex k-Uniform Tilings by a Simple Bitopic Precursor Self-Assembled on Ag(001) Surface. Nat. Commun. 11, 1856 (2020). Electrical and Electronic Engineering Technology and Engineering > Electrical and Electronic Engineering • Nature Communications Nature Communications An open access, multidisciplinary journal dedicated to publishing high-quality research in all areas of the biological, health, physical, chemical and Earth sciences. Related Collections With collections, you can get published faster and increase your visibility. Biology of rare genetic disorders This cross-journal Collection between Nature Communications, Communications Biology, npj Genomic Medicine and Scientific Reports brings together research articles that provide new insights into the biology of rare genetic disorders, also known as Mendelian or monogenic disorders. Publishing Model: Open Access Carbon dioxide removal, capture and storage In this cross-journal Collection, we bring together studies that address novel and existing carbon dioxide removal and carbon capture and storage methods and their potential for up-scaling, including critical questions of timing, location, and cost. We also welcome articles on methodologies that measure and verify the climate and environmental impact and explore public perceptions. Publishing Model: Open Access
1,536
7,299
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.5
4
CC-MAIN-2024-38
latest
en
0.932139
http://www.romannumerals.co/numerals-converter/cxlvii-in-numbers/
1,716,997,353,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971059246.67/warc/CC-MAIN-20240529134803-20240529164803-00167.warc.gz
48,221,936
14,031
## What number is "CXLVII"? ### A: 147 CXLVII = 147 Your question is, "What is CXLVII in Numbers?". The answer is '147'. Here we will explain how to convert, write and read the Roman numeral letters CXLVII in the correct Arabic number translation. ## How is CXLVII converted to numbers? To convert CXLVII to numbers the translation involves breaking the numeral into place values (ones, tens, hundreds, thousands), like this: Place ValueNumberRoman Numeral Conversion100 + 40 + 7C + XL + VII Hundreds100C Tens40XL Ones7VII ## How is CXLVII written in numbers? To write CXLVII as numbers correctly you combine the converted roman numerals together. The highest numerals should always precede the lower numerals to provide you the correct written translation, like in the table above. 100+40+7 = (CXLVII) = 147 ## More from Roman Numerals.co CXLVIII Now you know the translation for Roman numeral CXLVII into numbers, see the next numeral to learn how it is conveted to numbers. Convert another Roman numeral in to Arabic numbers.
270
1,041
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.171875
3
CC-MAIN-2024-22
latest
en
0.820467
https://codefreshers.com/sum-of-product-2-solution-codechef/
1,660,238,633,000,000,000
text/html
crawl-data/CC-MAIN-2022-33/segments/1659882571483.70/warc/CC-MAIN-20220811164257-20220811194257-00686.warc.gz
212,424,131
13,223
# [Solution] Sum of Product 2 solution codechef Sum of Product 2 solution codechef – For an array A of length N, let F(A) denote the sum of the product of all the subarrays of A. Formally, ## [Solution] Sum of Product 2 solution codechef F(A) = \sum_{L=1}^N \sum_{R=L}^N \left (\prod_{i=L}^R A_i\right ) For example, let A = [1, 0, 1], then there are 6 possible subarrays: • Subarray [1, 1] has product = 1 • Subarray [1, 2] has product = 0 • Subarray [1, 3] has product = 0 • Subarray [2, 2] has product = 0 • Subarray [2, 3] has product = 0 • Subarray [3, 3] has product = 1 So F(A) = 1+1 = 2. Given a binary array A, determine the sum of F(A) over all the N! orderings of A modulo 998244353. Note that orderings here are defined in terms of indices, not elements; which is why every array of length N has N! orderings. For example, the 3! = 6 orderings of A = [1, 0, 1] are: • [1, 0, 1] corresponding to indices [1, 2, 3] • [1, 1, 0] corresponding to indices [1, 3, 2] • [0, 1, 1] corresponding to indices [2, 1, 3] • [0, 1, 1] corresponding to indices [2, 3, 1] • [1, 1, 0] corresponding to indices [3, 1, 2] • [1, 0, 1] corresponding to indices [3, 2, 1] ## [Solution] Sum of Product 2 solution codechef • The first line of input will contain a single integer T, denoting the number of test cases. • Each test case consists of multiple lines of input. • The first line of each test case contains a single integer N denoting the le • The second line contains N space-separated integers denoting the array A. ### Output Format For each test case, output the sum of F(A) over all the N! orderings of A, modulo 998244353. ### Constraints • 1 \leq T \leq 1000 • 1 \leq N \leq 10^5 • 0 \leq A_i \leq 1 • The sum of N over all test cases won’t exceed 2 \cdot 10^5. ## [Solution] Sum of Product 2 solution codechef Input Output 4 3 1 0 1 1 0 2 1 1 4 1 1 0 1 16 0 6 120
734
1,885
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.5625
4
CC-MAIN-2022-33
latest
en
0.356546
http://www.shvoong.com/books/children-and-youth/1878979-grapes-math/
1,369,527,744,000,000,000
text/html
crawl-data/CC-MAIN-2013-20/segments/1368706472050/warc/CC-MAIN-20130516121432-00001-ip-10-60-113-184.ec2.internal.warc.gz
713,512,064
20,186
Search × OR Create a Shvoong account from scratch × OR × OR Shvoong Home>Books>Children & Youth>The Grapes of Math Review The Grapes of Math Book Review   by:ReaditDiva     Original Author: Greg Tang Ask any kid in America what his favorite subject in school is, and chances are "Math" will not be the answer! Memorizing multiplication facts, fighting through math formulas – all can be intimidating to children. Author Greg Tang, a “lifelong lover of math”, has written a series of books designed to help children ages 7 – 12 decode the mysteries of math. Tang, who has taught school from Kindergarten to college, helps the reader understand what is being asked and find the answer using problem solving techniques that are both effective and fun. These books would be valuable education tools for parents and teachers to help students overcome their fears of math and become successful problem solvers. The first of this series, New York Times Bestseller The Grapes of Math, contains 16 different “mind-stretching math riddles” designed to challenge the reader to solve problems in different ways. In simple, rhyming text, the author helps children learn to “organize information by identifying patterns and symmetries.” For example, the riddle entitled “One Hump or Two?” asks the reader to figure out the number of camel humps that appear on the page – not SLOWLY by counting each individual hump, but QUICKLY by grouping them by fives first. Bright, colorful illustrations by Harry Briggs help the reader visualize each problem. Pictures are also included with the solutions provided in the back of the book to help the reader further understand the concepts. Learning about math is no “problem” with these fun books about numbers: The Best of Times, Riddle-Iculous Math, and Go Figure! (click on the links below to read book reviews). The entire Scholastic math series by Greg Tang is fabulous!  It includes: The Grapes of Math The Best of Times Math for All Seasons MATH-terpieces Math Potatoes: Mind-Stretching Brain Food Math Appeal: Mind-Stretching Math Riddles Math Fables Math Fables Too Published: March 28, 2009 Please Rate this Review : 1 2 3 4 5 Tags: Use our Content Translate Send Link Print Share
510
2,231
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.609375
3
CC-MAIN-2013-20
latest
en
0.923223
https://ask.truemaths.com/question/for-what-value-of-k-does-the-system-of-equations-x2y5-3xky150-have-a-i-unique-solution-ii-no-solution/?show=votes
1,670,157,319,000,000,000
text/html
crawl-data/CC-MAIN-2022-49/segments/1669446710972.37/warc/CC-MAIN-20221204104311-20221204134311-00389.warc.gz
133,495,397
30,271
• 0 Guru # For what value of k does the system of equations x+2y=5, 3x+ky+15=0 have a (i) unique solution (ii) no solution? • 0 One of the most important and conceptual question from linear equations in two variables in which we have given two equations x+2y=5, 3x+ky+15=0 and we have to find the value of k for which it has a unique solution and also asked to solve for which it has no solution Kindly solve the above equations RS Aggarwal, Class 10, chapter 3D, question no 13 Share 1. (i) ## x+2y=5,3x+ky+15=0 Here, a1​=1, b1​=2, c1​=−5 a2​=3, b2​=k, c2​=15 a1/a2=1/2​, b1/b2​​=2/k, c1/c2=−5​/15=−1/3​ a unique solution a1/a2≠b1/b2​​⇒1/2≠2/k​ k≠4 (ii) a1/a2≠b1/b2≠c1/c2      1/2=2/k≠-1/3      k=4 • 0
376
770
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.75
4
CC-MAIN-2022-49
latest
en
0.810412
http://www.dummies.com/how-to/content/how-to-use-financial-reports-to-decide-if-discount.navId-410640.html
1,418,960,298,000,000,000
text/html
crawl-data/CC-MAIN-2014-52/segments/1418802768197.70/warc/CC-MAIN-20141217075248-00029-ip-10-231-17-201.ec2.internal.warc.gz
482,530,167
17,737
# How to Use Financial Reports to Decide if Discount Offers Make Good Financial Sense One common way companies encourage their customers to pay early is to offer them a discount. In the world of financial reporting, when a discount is offered, a customer may see a term such as “2/10 net 30” or “3/10 net 60” at the top of its bill. “2/10 net 30” means that the customer can take a 2 percent discount if it pays the bill within 10 days. Otherwise, it must pay the bill in full within 30 days. “3/10 net 60” means that if the customer pays the bill within 10 days, it can take a 3 percent discount; otherwise, it must pay the bill in full within 60 days. Taking advantage of this discount saves customers money, but if a customer doesn't have enough cash to take advantage of the discount, it needs to decide whether to use its credit line to do so. Comparing the interest saved by taking the discount with the interest a company must pay to borrow money can help the company decide whether using credit to get the discount is a wise decision. ## How to calculate the annual interest rate The formula for calculating the annual interest rate is: ([% discount] ÷[100 – % discount]) x (360 ÷Number of days paid early) = Annual interest rate ### For terms of 2/10 net 30 You first must calculate the number of days that the company would be paying the bill early. In this case, it's paying the bill in 10 days instead of 30, which means it's paying the bill 20 days earlier than the terms require. Now calculate the interest rate, using the annual interest rate formula: (2 [% discount] ÷98 [100 – 2]) x (360 ÷20 [Number of days paid early]) = 36.73% That percentage is much higher than the interest rate the company may have to pay if it needs to use a credit line to meet cash-flow requirements, so taking advantage of the discount makes sense. For example, if a company has a bill for \$100,000 and takes advantage of a 2 percent discount, it has to pay only \$98,000, and it saves \$2,000. Even if it must borrow the \$98,000 at an annual rate of 10 percent, which would cost about \$544 for 20 days, it still saves money. ### For terms of 3/10 net 60 First, find the number of days the company would be paying the bill early. In this case, it's paying the bill within 10 days, which means it's paying 50 days earlier than the terms require. Next, calculate the interest rate, using this formula: (3 [% discount] ÷97 [100 – 3]) x (360 ÷50 [Number of days paid early]) = 22.27% Paying 50 days earlier gives the company an annual interest rate of 22.27 percent, which is likely higher than the interest rate it would have to pay if it needed to use a credit line to meet cash-flow requirements. But the interest rate isn't nearly as good as the terms of 2/10 net 30. A company with 3/10 net 60 terms will probably still choose to take the discount, as long as the cost of its credit lines carries an interest rate that's lower than the rate that's available with these terms. ## What do the numbers mean? For most companies, taking advantage of these discounts makes sense as long as the annual interest rate calculated using this formula is higher than the one they must pay if they borrow money to pay the bill early. This becomes a big issue for companies because, unless their inventory turns over very rapidly, 10 days probably isn't enough time to sell all the inventory purchased before they must pay the bill early. Their cash would come not from sales but, more likely, from borrowing. If cash flow is tight, a company has to borrow funds using its credit line to take advantage of the discount. For example, if the company buys \$100,000 in goods to be sold at terms of 2/10 net 30, it can save \$2,000 by paying within 10 days. If the company hasn't sold all the goods, it has to borrow the \$100,000 for 20 days, which wouldn't be necessary if it didn't try to take advantage of the discount. You can assume that the annual interest on the company's credit line is 9 percent. Does it make sense to borrow the money? The company would need to pay the additional interest on the amount borrowed only for 20 additional days (because that's the number of days the company must pay the bill early). Calculating the annual interest of 9 percent of \$100,000 equals \$9,000, or \$25 per day. Borrowing that money would cost an additional \$500 (\$25 times 20 days). So even though the company must borrow the money to pay the bill early, the \$2,000 discount would still save it \$1,500 more than the \$500 interest cost involved in borrowing the money.
1,082
4,579
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.5
4
CC-MAIN-2014-52
longest
en
0.95006
http://www.slideshare.net/dianenz/compfuncdiff-presentation
1,405,219,067,000,000,000
text/html
crawl-data/CC-MAIN-2014-23/segments/1404776435811.28/warc/CC-MAIN-20140707234035-00053-ip-10-180-212-248.ec2.internal.warc.gz
502,266,435
27,169
Like this presentation? Why not share! # Compfuncdiff ## on Oct 29, 2008 • 392 views ### Views Total Views 392 Views on SlideShare 392 Embed Views 0 Likes 1 0 0 No embeds ### Report content • Comment goes here. Are you sure you want to ## CompfuncdiffPresentation Transcript • Composite functions • f(x) = x 2 x x 2 2 4 7 49 g(x) = x + 1 2 3 • f(g(x)) f(x) = x 2 g(x) (g(x)) 2 x g(x) = x + 1 x x+1 (x+1) 2 • • f x x f x ( ) ( ) ( ) ? = + Þ ¢ = 1 2 f x x x x ( ) ( ) = + = + + 1 2 1 2 2 Þ ¢ = + f x x ( ) 2 2 f x x f x ( ) ( ) ( ) ? = + Þ ¢ = 3 2 f x x x x ( ) ( ) = + = + + 3 6 9 2 2 Þ ¢ = + f x x ( ) 2 6 = + 2 1 ( ) x = + 2 3 ( ) x • f x x f x x ( ) ( ) ( ) ( ) = + Þ ¢ = + 1 2 1 2 f x x f x ( ) ( ) ( ) = + Þ ¢ = 7 2 f x x f x x ( ) ( ) ( ) ( ) = + Þ ¢ = + 3 2 3 2 2 7 ( ) x + f x x x x f x x x ( ) ( ) ( ) ( ) = + = + + Þ ¢ = + = + 7 14 7 2 14 2 7 2 2 • f x x f x ( ) ( ) ( ) = + Þ ¢ = 2 3 2 2 2 3 ( ) x + 2 5 2 ( ) x + f x x x x x x f x x x ( ) ( ) ( )( ) ( ) ( ) = + = + + = + + Þ ¢ = + = + 2 3 2 3 2 3 4 12 9 8 12 4 2 3 2 2 Oops f x x x x f x x x ( ) ( ) ( ) ( ) = + = + + Þ ¢ = + = + 5 2 25 20 4 50 40 10 5 2 2 2 Oops again = + 2 2 2 3 . ( ) x = + 5 2 5 2 . ( ) x f x x f x ( ) ( ) ( ) = + Þ ¢ = 5 2 2 • f x x f x ( ) ( ) ( ) = + Þ ¢ = 7 3 2 7 2 7 3 . ( ) x + f x x x x f x x x x ( ) ( ) ( ) ( ) . ( ) = + = + + Þ ¢ = + = + = + 7 3 49 42 9 98 42 14 7 3 7 2 7 3 2 2 f x x f x ( ) ( ) ( ) = + Þ ¢ = 2 1 3 2 3 2 1 2 . ( ) x + f x x x x x f x x x x x x x ( ) ( ) ( ) ( ) ( ) . ( ) = + = + + + Þ ¢ = + + = + + = + = + 2 1 8 12 6 1 24 24 6 6 4 4 1 6 2 1 2 3 2 1 3 3 2 2 2 2 2 • f x x ( ) ( ) = + 2 2 1 f x x x x f x x x ( ) ( ) ( ) = + = + + Þ ¢ = + 2 2 4 2 3 1 2 1 4 4 = + = + 4 1 2 2 1 2 2 x x x x ( ) . ( ) • f(x)= ( 2x + 3 ) 2 ⇒fʹ(x) = 2 . 2 (2x+3) 1 f(x) = ( 7x + 3 ) 2 ⇒fʹ(x) = 7 . 2 (7x + 3) 1 f(x) = ( 2x + 1 ) 3 ⇒ fʹ(x) = 2 . 3 (x + 1) 2 f(x) = ( x 2 + 1 ) 2 ⇒ fʹ(x) = 2x . 2 (x 2 + 1) 1 f(x) = ( x 3 + 3x 2 - 4x + 1 ) 7 ⇒ fʹ(x) = (3x 2 + 6x -4) . 7 (x 3 + 3x 2 -4x + 1) 6 •
1,217
1,996
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.46875
3
CC-MAIN-2014-23
latest
en
0.525698
https://mathematica.stackexchange.com/questions/148891/fullsimplify-not-simplifying-an-expression-that-i-think-it-should
1,713,588,647,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296817474.31/warc/CC-MAIN-20240420025340-20240420055340-00261.warc.gz
347,956,897
39,635
# FullSimplify not simplifying an expression that I think it should I wonder why FullSimplify cannot simplify this simple expression $(\frac{(a-1)^3}{b^3})^{1/3}$ where $0<a<1$ and $b<0$. This expression should be equal to $\frac{a-1}{b}$. But when I use this command: FullSimplify[((-1 + a)^3/b^3)^(1/3), a < 1 && a > 0 && b < 0 && Element[b, Reals] && Element[a, Reals]] Full simplify just returns the same thing! Any ideas on how can I fixe this? • Since you are working with real variables, try: Simplify[((-1 + a)^3/b^3)^(1/3), TransformationFunctions -> PowerExpand]. See also mathematica.stackexchange.com/q/92686/27951 and links therein Jun 22, 2017 at 19:01 • Possible duplicate of Advice for Mathematica as Mathematician's Aid Jun 22, 2017 at 19:06 • @MarcoB Thanks. I am working with complex expressions. That term is part of the complex expression that I am dealing with. Jun 22, 2017 at 19:09 • Well, that may get dicey then. PowerExpand makes implicit assumptions on the variables involved. Perhaps you should amend your example to be more representative of the actual problem you are dealing with. Jun 22, 2017 at 19:11 • Just to add to your frustration :-) Simplify[((-1 + a)^3/b^3)^(1/3) == (-1 + a)/b, b < 0 && 0 < a < 1] gives True Jun 22, 2017 at 19:24 As @MarcoB suggests, PowerExpand is a useful tool here, especially when using the Assumptions option. When using Assumptions->Automatic it is acceptable for PowerExpand to return incorrect results, but for any other boolean setting PowerExpand should always return correct results. So: expr = ((-1 + a)^3 / b^3)^(1/3); PowerExpand[expr, Assumptions -> 0 < a < 1 && b < 0] -(1/b) + a/b and we can be confident that the output of PowerExpand is equivalent to the input under the given assumptions. Now, suppose your expression is more complicated, and using PowerExpand simplifies one part, but complicates a different part. Then, it would be useful to include PowerExpand in the TransformationFunctions option of Simplify, so that PowerExpand is only applied where it is needed. However, the Simplify assumptions don't automatically get transferred to the transformation functions, so it is a bit complicated. Here is a function that tries to streamline this process: powerSimplify[expr_, assumptions_] := InternalInheritedBlock[{PowerExpand}, SetOptions[PowerExpand, Assumptions -> assumptions]; Simplify[expr, assumptions, TransformationFunctions -> {Automatic, PowerExpand}] ] powerSimplify[expr, 0 < a < 1 && b < 0] (-1 + a)/b as desired. Or, for a different set of assumptions: s = powerSimplify[expr, a > 1 && b < 0] (-1 + a) (1/b^3)^(1/3) Let's check: s /. {a -> 2.2, b -> -2.2} expr /. {a -> 2.2, b -> -2.2} ` 0.272727 + 0.472377 I 0.272727 + 0.472377 I
790
2,756
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.71875
4
CC-MAIN-2024-18
latest
en
0.808196
https://numbas.mathcentre.ac.uk/question/43286/terry-s-copy-of-a-randomised-line-in-a-geogebra-worksheet-set-the-positions-of-two-points.exam
1,571,506,705,000,000,000
text/plain
crawl-data/CC-MAIN-2019-43/segments/1570986697439.41/warc/CC-MAIN-20191019164943-20191019192443-00387.warc.gz
625,631,875
1,407
// Numbas version: exam_results_page_options {"name": "Terry's copy of A randomised line in a GeoGebra worksheet - set the positions of two points", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"preventleave": false, "showfrontpage": false, "allowregen": true}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "name": "Terry's copy of A randomised line in a GeoGebra worksheet - set the positions of two points", "ungrouped_variables": ["a", "b"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": " Construct a line through two points in a GeoGebra worksheet. Change the line by setting the positions of the two points when the worksheet is embedded into the question. "}, "functions": {}, "parts": [], "preamble": {"js": "", "css": ""}, "statement": " \$a = \\var{a}\$ \n \$b = \\var{b}\$ \n {geogebra_applet('UqJChZFJ',[ ['A',a], ['B',b] ])} ", "variables": {"a": {"definition": "vector( random(-3..3), random(-3..3) )", "group": "Ungrouped variables", "name": "a", "templateType": "anything", "description": ""}, "b": {"definition": "vector( random(-3..3), random(-3..3) )", "group": "Ungrouped variables", "name": "b", "templateType": "anything", "description": ""}}, "advice": "", "type": "question", "rulesets": {}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}], "extensions": ["geogebra"]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}]}
539
1,898
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3
3
CC-MAIN-2019-43
longest
en
0.539073
https://infoarena.ro/job_detail/386534?action=view-source
1,590,596,570,000,000,000
text/html
crawl-data/CC-MAIN-2020-24/segments/1590347394756.31/warc/CC-MAIN-20200527141855-20200527171855-00047.warc.gz
404,564,463
5,203
# Cod sursa(job #386534) Utilizator Data 25 ianuarie 2010 03:26:42 Secv8 40 cpp done Arhiva de probleme 5.32 kb ``````#include <cstdio> #include <cstdlib> #include <ctime> #include <algorithm> using namespace std; const int INF = 0x3f3f3f3f; class Treap { public: struct Node { int key, val, prio, sum; bool rev; Node *left, *right; Node() { key = val = prio = 0; rev = false; left = right = NULL; } Node ( int K, int V, int P = -1, Node *L = NULL, Node *R = NULL, bool REV = false ) { key = K; val = V; prio = P; rev = REV; left = L; right = R; if (prio == -1) prio = rand() % (INF-1) + 1; } }; private: Node *root; bool empty; inline void rotateRight ( Node *node ) { Node *newRight = new Node(node->key, node->val, node->prio, node->left->right, node->right); Node *aux = node->left; node->key = node->left->key; node->val = node->left->val; node->prio = node->left->prio; node->left = node->left->left; node->right = newRight; delete aux; } inline void rotateLeft ( Node *node ) { Node *newLeft = new Node(node->key, node->val, node->prio, node->left, node->right->left); Node *aux = node->right; node->key = node->right->key; node->val = node->right->val; node->prio = node->right->prio; node->right = node->right->right; node->left = newLeft; delete aux; } inline void reverse ( Node *node ) { if (node != NULL && node->rev) { if (node->left != NULL) node->left->rev = !node->left->rev; if (node->right != NULL) node->right->rev = !node->right->rev; swap(node->left, node->right); node->rev = false; } } inline void lazyUpdate ( Node *node ) { reverse(node); if (node != NULL) reverse(node->left); if (node != NULL) reverse(node->right); } inline void updateSum ( Node *cur ) { cur->sum = (cur->left != NULL ? cur->left->sum : 0) + (cur->right != NULL ? cur->right->sum : 0) + 1; } public: Node* getRoot() { return root; } Node* rootIn ( Node *R ) { root = R; empty = (R == NULL); return root; } Treap ( Node *R = NULL ) { srand(unsigned(time(0))); rootIn(R); } void dealloc ( Node *cur ) { if (cur != NULL) { dealloc(cur->left); dealloc(cur->right); delete cur; } } ~Treap() { // dealloc(root); } Node* search ( int pos ) { return search(pos, root); } Node* search ( int pos, Node *cur ) { lazyUpdate(cur); if ((cur->left != NULL ? cur->left->sum : 0) + 1 == pos) return cur; if ((cur->left != NULL) && cur->left->sum + 1 >= pos) return search(pos, cur->left); else return search(pos - (cur->left == NULL ? 0 : cur->left->sum) - 1, cur->right); } Node* insert ( Node x ) { return insert(x, root); } Node* insert ( Node x, Node *cur ) { if (cur == NULL) { cur = new Node(x); cur->sum = 1; if (empty) { root = cur; empty = false; } return cur; } lazyUpdate(cur); if (cur->left != NULL && x.key <= cur->left->sum+1 || x.key <= 1) { cur->left = insert(x, cur->left); if (cur->prio < cur->left->prio) rotateRight(cur); } else { x.key -= (cur->left != NULL ? cur->left->sum : 0) + 1; cur->right = insert(x, cur->right); if (cur->prio < cur->right->prio) rotateLeft(cur); } return cur; } Node* erase ( Node *cur ) { lazyUpdate(cur); if (cur->left == NULL && cur->right == NULL) { if (root == cur) rootIn(NULL); delete cur; return NULL; } if ((cur->left != NULL && cur->right != NULL && cur->left->prio > cur->right->prio) || cur->right == NULL) { rotateRight(cur); cur->right = erase(cur->right); } else { rotateLeft(cur); cur->left = erase(cur->left); } return cur; } void split ( int key, Treap &T1, Treap &T2 ) { insert(Node(key, 0, INF)); T1.rootIn(root->left); T2.rootIn(root->right); delete root; rootIn(NULL); } Node* join ( Treap &T1, Treap &T2 ) { Node *tmp = new Node(0,0,0, T1.getRoot(), T2.getRoot()); rootIn(tmp); rootIn(erase(tmp)); T1.rootIn(NULL); T2.rootIn(NULL); return root; } Node* reverse ( int p1, int p2 ) { Treap T1, T2, T3, T4; split(p1, T1, T2); T2.split(p2-p1+2, T3, T4); T3.getRoot()->rev = true; T2.join(T3,T4); join(T1,T2); return root; } Node* erase ( int p1, int p2 ) { Treap T1, T2, T3, T4; split(p1, T1, T2); T2.split(p2-p1+2, T3, T4); join(T1, T4); return root; } void print( FILE* stream = stdout ) { print(root,stream); /*fprintf(stream,"\n");*/ } void print ( Node *cur, FILE* stream ) { lazyUpdate(cur); if (cur != NULL) { print(cur->left,stream); fprintf(stream,"%d ",cur->val); print(cur->right,stream); } } }; int main() { freopen("secv8.in","rt",stdin); freopen("secv8.out","wt",stdout); int n; char op; int a,b; Treap T; scanf("%d %*d",&n); for (int i = 0; i < n; ++i) { scanf(" %c ",&op); if (op == 'I') { scanf("%d %d",&a,&b); T.insert(Treap::Node(a,b)); } else if (op == 'A') { scanf("%d",&a); Treap::Node *ans = T.search(a); printf("%d\n",ans->val); } else if (op == 'R') { scanf("%d %d",&a,&b); T.reverse(a,b); } else if (op == 'D') { scanf("%d %d",&a,&b); T.erase(a,b); } // fprintf(stderr,"%c %d %d: ",op,a,b); // T.print(stderr); } T.print(); return 0; } ``````
1,673
4,831
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.515625
3
CC-MAIN-2020-24
latest
en
0.414965
https://physics.stackexchange.com/questions/149001/how-to-know-if-a-wave-function-is-physically-acceptable-solution-of-a-schr%c3%b6dinge
1,701,543,410,000,000,000
text/html
crawl-data/CC-MAIN-2023-50/segments/1700679100448.65/warc/CC-MAIN-20231202172159-20231202202159-00284.warc.gz
505,473,644
45,149
How to know if a wave function is physically acceptable solution of a Schrödinger equation? How does one decide whether a wave function is a physically acceptable solution of the Schrödinger equation? For example: $\tan x$ , $\sin x$, $1/x$, and so on. • You mean besides sticking it into the Schrodinger equation and seeing if it is a valid solution? Nov 26, 2014 at 15:00 • physicspages.com/2011/01/25/wave-function-borns-conditions contains a nice summary of the conditions you're looking for. Most of the conditions are a consequence of interpreting the wavefunction as a probability amplitude. Nov 26, 2014 at 15:04 • Shove it into the Schrodinger equation, and try to solve for the potential $V$; that will give you some idea of what system it is describing. Nov 26, 2014 at 15:09 • Also, note that physically unacceptable solutions of the Schrödinger equation can still be useful. For example, the eigenfunctions of the position operator (delta function) and momentum operator (plane wave) cannot be created experimentally. But it is still very useful to describe the physically realizable states in terms of these eigenfunctions. Nov 26, 2014 at 16:14 The very minimum that a wavefunction needs to satisfy to be physically acceptable is that it be square-integrable; that is, that its $L_2$ norm, $$\int |\psi(x)|^2\mathrm d x,$$ be finite. This rules out functions like $\sin(x)$, which have nonzero amplitude all the way into infinity, and functions like $1/x$ and $\tan(x)$, which have non-integrable singularities. In the most rigorous case, however, one needs to impose additional conditions. The physically preparable states of a particle denote functions which are continuously differentiable to any order, and which have finite expectation value of any power of position and momentum. Thus: • $\psi$ must be continuous everywhere. • All of $\psi$'s derivatives must exist and they must be continuous everywhere. • The expectation value $\int\psi^*(x) \:\hat x^n \hat p^m \psi(x)\:\mathrm dx$ must be finite for all $n$ and $m$. This rules out discontinuous functions like $\theta(x)$, functions with discontinuous derivatives, and functions like $(1+x^2)^{-1/2}$, which decay too slowly at infinity. States which satisfy these conditions are called 'physical' because they are the states that can be prepared with finite energy in finite time. The way to implement these states rigorously is by using a construction known as a Rigged Hilbert Space (see also Galindo & Pascual's QM textbook). In everyday practice, most people adopt a bit of a mixed approach. The requirements that a function be continuous is never dropped, and one requires it to be differentiable at least almost everywhere. If the Hamiltonian is not a nice function of position, though, such as with $\delta$-function or square-well potentials, the requirements are sometimes slackened to only those; this is in the understanding that a truly discontinuous potential is not physical, and that any problems brought into the higher derivatives of $\psi$ can be fixed by using a smoother Hamiltonian. • Realize that for the condition of finite energy, one just needs the restriction that the second momentum moment $\langle p^2\rangle_\psi$ is finite, not all position and momentum moments. Nov 26, 2014 at 15:53 • @MateusSampaio The statement is about the preparation of the state, using a Hamiltonian of the form $\hat H=H(\hat x,\hat p,t)$, within finite time and starting from a reference physical state. (You would also ask for all moments of $\hat H$ to be finite if the function $H$ was not well-behaved enough.) Nov 26, 2014 at 16:00 • I don't see why the preparation of the state would require all moments of $H$ to be finite. Nov 26, 2014 at 16:03 • Why should a physical state be on the nuclear space of the rigged hilbert space? I can't see any physical reason for that Nov 26, 2014 at 16:16 • @MateusSampaio I'm trying to find references and will post them here when I find a proof. I probably first read the statement here and in related papers. Nov 26, 2014 at 22:08 If you are talking about the time independent Schrödinger equation, it's not a trivial question as it may seem, as the comments suggest. I will restrict the answer to the one-dimensional case, since multiply connected domains in higher dimensions give some additional problems. Not all functions $\psi$ that are solutions of the equation $$-\frac{\hbar^2}{2m}\psi''+V\psi=E\psi$$ are valid ones. The first condition is that $\psi\in L^2(\Omega)$, where $\Omega\subset \Bbb{R}$ is the domain of the function, since it must be an element of the Hilbert space, otherwise it would not be a quantum state. More subtle conditions are required when you look at the domain of the Hamiltonian $$H=-\dfrac{\hbar^2}{2m}\dfrac{d^2}{dx^2}.$$ In general, this will depend on the conditions satisfied by the potential $V(x)$. Usually one ends up with subsets of the Sobolev space $\mathcal{H}^2(\Omega)$, which restricts the original space to functions such that their second order (weak-)derivative is in $L^2(\Omega)$. If $\Omega$ is an interval (which is the usual setup) this can also be put in an equivalent way as the functions that are, along with their derivative, absolutely continuous and whose second derivative is also in $L^2(\Omega)$. Also, when the domain $\Omega$ is a proper subset of $\Bbb{R}$, the boundary conditions, which are established via physical arguments, play a decisive role in choosing the right domain $\mathcal{D}(H)$ of self-adjointness, and so they must be considered too. For example, the condition that $\psi(0)=\psi(a)=0$ for the infinite square well, rules out some solutions of the Schrödinger equation that would satisfy the other conditions. If we look otherwise to the time dependent Schrödinger equation $$H\psi(t)=i\hbar\partial_t\psi(t), \qquad \psi(0)=\psi_0$$ any function $\psi_0\in L^2(\Omega)$ can be an initial condition for the system. But for $\psi_0 \notin\mathcal{D}(H)$ the trajectory given by $\psi(t)=e^{-iHt/\hbar}\psi_0$ is only a weak solution, in the sense that it's not a differentiable path and that the average energy is not defined (can be considered infinite) for all $t$, so these solutions can be considered non-physical.
1,552
6,251
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.203125
3
CC-MAIN-2023-50
latest
en
0.907744
https://alpari.com/es/faq/collateral_account/calculating_profit/
1,544,914,491,000,000,000
text/html
crawl-data/CC-MAIN-2018-51/segments/1544376827137.61/warc/CC-MAIN-20181215222234-20181216004234-00294.warc.gz
513,147,560
12,051
Parece que JavaScript o las cookies no están habilitados en en su navegador. Es necesario habilitarlos en la configuración de su navegador para activar ciertas funciones de nuestro sitio web. • Inicio • ¿Cómo se calcula la ganancia del trabajo en una Cuenta Capital? # ¿Cómo se calcula la ganancia del trabajo en una Cuenta Capital? Let’s consider some examples of how profit is calculated for Capital Accounts1. Suppose a client bought a structured product for 10,000 USD with a 90% capital protection level (CPL). The clients activates a Capital Account and receives a free 7,200 USD credit limit, taking the following formula into account: CPL / 100 x cost of product x 0.8. At maturity, the following is possible: ### The Client makes a profit on the structured product. Suppose the return on the structured product is 20%. Then: Example №1 Let’s say that at maturity the client made 1,100 USD on their Capital Account. At maturity they’ll receive 1,100 + 12,000 = 13,100 USD. Example №2 Let’s say that at maturity the client lost 1,100 USD on their Capital Account. At maturity an adjustment will occur: the negative amount which the client incurred as a loss on the Capital Account will be deducted from the outcome of their investment on the structured product. The client will receive 12,000 - 1,100 = 10,900 USD on their transitory account. ### No return on structured product. Then: Example №1> Let’s say at maturity the client has made 1,100 USD using their Capital Account, but their structured product hasn’t made a profit. Consequently, at maturity the client receives 90% from their capital protection level: 9,000 + 1,100 = 10,100 USD. Example №2 Let’s say that at maturity the client has lost 1,100 through trading using his Capital Account. In this instance, at maturity an adjustment will occur: the negative amount which the client incurred as a loss on the Capital Account will be deducted from the outcome of their investment on the structured product. The client will receive 9,000 – 1,100 = 7,900 USD on their transitory account. Observe por favor: 1.  None of the above examples take commission for the forming of a structured product into account. Such commission is deducted at maturity of the structured product. ¿Encontró la información que estaba buscando? ### ¿Tiene alguna pregunta? Llame a uno de nuestros especialistas. Contacte a un consultor en línea mediante chat en vivo. Cargando...
568
2,439
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.484375
3
CC-MAIN-2018-51
longest
en
0.798319
https://cboard.cprogramming.com/cplusplus-programming/140474-parking-garage-program-please-help-anyone-please-printable-thread.html
1,490,672,099,000,000,000
text/html
crawl-data/CC-MAIN-2017-13/segments/1490218189589.37/warc/CC-MAIN-20170322212949-00257-ip-10-233-31-227.ec2.internal.warc.gz
797,644,511
4,121
• 08-22-2011 MIKANSI MIEHLEK PROBLEM#: 1 A parking garage charges a R7.00 minimum fee to park for up to three hours. The garage charges an additional R1.75 per hour or part thereof in excess of three hours. Assume that no car parks for longer than 24 hours at a time. To determine how long a car was parked, both the entry time and exit time are converted to minutes. The entrance time in minutes is then subtracted from the exit time in minutes, and these minutes are converted back to hours and minutes before the parking fee is calculated. Write a program that calculates and prints the parking charges for customers who parked in this garage. Twenty customers use the parking garage at any given time. For each customer the program has to: • Input the time when the parking garage was entered • Input the time when it was exited • Convert both the entry and exit time to minutes • Calculate how long the car was parked in minutes (parked time) • Convert the parked time in minutes back to time in hours and minutes • Calculate the charge (amount owed by the customer) • Display the receipt for the customer (display entry and exit times (in 24h00 format, duration for parked time and charge • Calculate the total of daily receipts • Finally the total amount of all the receipts should be displayed with informative messages The program should consist of five functions. Declare constants for the number of minutes in an hour, the minimum fee (R7.00), the cut-off time of three hours, the hourly fee of R1.75 and the number of customers (20). Follow the conventions of the Study Guide and prescribed text when writing the program. Main function() Declare the following variables: entranceHour, entranceMinutes exitHour, exitMinutes entranceTimeInMins, exitTimeInMins, minutesParked; parkedHours, parkedMinutes; charge, totalCharges; Use a for loop going from 1 to the number of customers. The other four functions should be called inside the for loop Function InputAndValidate() This function inputs the time. The time should be entered as two separate values for the hours and minutes e.g. the customer enters the parking garage at 9h30, the time should be entered as 9 for the hour and 30 for the minutes. Do not accept a value less than 0 or more than 24 for the hour, or a value of less than 0 or more than 59 for the minutes. If this happens a prompting message should be displayed and the values entered repeatedly until they are valid. If a value of 24 has been input for the hour, the minutes should be made 0, regardless of what value the user has entered for the minutes. You have to decide yourself on the type of function and the number of type(s) of the parameters Function convertToMinutes() This function converts the time given in hours and minutes to time in minutes, e.g. 9h30 is converted to 570 minutes. You have to decide yourself on the type of function and the number and type(s) of the parameter(s) Function convertBackToTime() This function converts the time given in minutes to time in hours and minutes, e.g. 570 minutes is converted to 9h30. You have to decide the type of function and the number and type(s) of parameter(s). Hint: Use the operators / and % to calculate the number of hours and minutes from the total number of minutes Function calcCharge() This function calculates the amount due based on the parked time in hours and minutes. Again you have to decide yourself on the type of function and the number of type(s) of the parameter(s) Run your program on the data below. The first two values in a row represent the hours and minutes of the entry time and the last two values represent the hours and minutes of the exit time. Submit the printouts of the program and output together with the USB 9 30 13 23 8 00 12 59 10 12 13 13 10 00 12 12 7 01 17 14 -5 65 10 60 6 18 16 33 14 15 16 04 13 11 17 45 11 27 24 55 8 55 25 61 8 55 15 47 • 08-22-2011 manasij7479 OMG We're out of C++ code.
957
3,928
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.109375
3
CC-MAIN-2017-13
longest
en
0.918298
https://www.physicsforums.com/threads/light-sight.576259/
1,529,413,562,000,000,000
text/html
crawl-data/CC-MAIN-2018-26/segments/1529267862929.10/warc/CC-MAIN-20180619115101-20180619135101-00213.warc.gz
906,959,253
21,977
# Light & Sight 1. Feb 10, 2012 ### John15 Light travels as waves Waves interfere with each other We see reflected light. We can see the source of light and the things illuminated but not the light inbetween Why? Light is reflected in all directions from all things why does it not interfere between the object we are looking at and our eyes, light is also reflected from the eyes which should also interfere with light coming in. Example throw a single pebble in a pond you get easily recognisable wave , same with 2 or 3 but throw a handful in and you just get a mess of waves. 2. Feb 10, 2012 ### JaredJames To see light, it has to reflect off something. 3. Feb 10, 2012 ### sophiecentaur Space is a 'linear medium' which means that the fields of one wa e fo not affect the fields of a wave it's crossing. So they don't modify each other. 4. Feb 10, 2012 ### Staff: Mentor That isn't correct: To see light, it has to hit your retina. 5. Feb 10, 2012 ### Staff: Mentor You answered your own question. When you throw a handful of pebbles into a pond you get a whole mess of waves instead of all the waves cancelling each other out because waves have to be perfectly timed and aligned to cancel each other out and neither a handful of pebbles, nor reflected light is coherent enough for that. 6. Feb 10, 2012 ### John15 Many thanks for the replies but still a bit confused. why does light have to reflect off something in order to become visible? In order to see something as a sharp image the light has to come in a straight line without any interference, so are we saying that this light is able to travel through what must be a mess of waves inbetween without interference, am not talking about waves cancelling out but being jumbled up for want of a better phrase. 7. Feb 10, 2012 ### JaredJames My mistake. I was thinking of it along the lines of you either have to look at the source of the light to see it, or it has to reflect off of something. In both cases, you need the light to enter the eye. It can't "pass near by". 8. Feb 10, 2012 ### davenn and expanding on that .... @ OP yes it travels as waves and thats fine to think of it as waves for some applications but it also travels as particles ... photons... and it those photons entering your eye that get detected. The more photons, the brighter the light. Dave 9. Feb 10, 2012 ### Dremmer 10. Feb 10, 2012 ### cepheid Staff Emeritus 11. Feb 13, 2012 ### John15 So am I right in thinking that light travels as waves from source but acts as particle when reflected? which is what we see. Still not sure why it does not interfere though. Think of a wave tank, standing at one end waves from other end are easy to make out, now add waves coming from top, bottom and sides plus from your end and all you get is turbulence and making it very difficult to make out individual waves. I do have another question about waves travelling from source but lets try to conclude this first. 12. Feb 13, 2012 ### sophiecentaur It also behaves as waves when reflected and as particles when it travels -if that's the way you want to explain it. Waves are certainly good enough for Optics and Radio studies You should stop trying to categorise this sort of thing. You'll find it's like trying to get hold of a bar of soap in the bath. Interactions between EM and matter can often be thought of, conveniently, is terms of Photons but, otoh, a lens is 'matter' and treating the action of a lens by considering photons would just be madness. Last edited: Feb 13, 2012 13. Feb 13, 2012 ### jim hardy """We can see the source of light and the things illuminated but not the light inbetween """ 14. Feb 13, 2012 ### sophiecentaur Do you know how they work, Jim? 15. Feb 13, 2012 ### Drakkith Staff Emeritus Light can be explained as a wave in almost all aspects. Diffraction, reflection, and interference are all perfectly described by treating light as an electromagnetic wave. However, when light finally gets to something and is absorbed is can only be treated as a particle that gives all of its energy up and no longer exists. This is how the molecule in your eye's cone and rod cells works, it absorbs energy from the photon and changes shape, setting off a chain of events that ends with you "seeing" something. The key is that the light has to enter and interact with your eye. The reason we cannot see the light in between is that two waves don't "bounce" off of each other. One light wave passing by another does not reflect or refract off of it. (Other than normal interference effects which is not the same) Think of your water waves. If you make two waves they don't bounce off of each other and go in completely different directions or create new waves at the point they interact. Light can only interfere when the wavelength and such are almost exactly alike, meaning it is "Coherent". Normally light entering your eye does not meet this requirement. This is similar to why sound waves do not normally interfere and keep you from hearing the speakers in your TV. It may make it difficult, but it by no means makes it impossible to determine which wave is which. Your ears do this all day long. I recommend picking up a book on optics. I have several, including Optics for Dummies which is pretty nice. But any book about basic optics will be able to explain it all. 16. Feb 14, 2012 ### Naty1 Try reading this online article and note the illustrations: http://en.wikipedia.org/wiki/Light_interference#Optical_interference You'll find a lot the relates to your questions like: "different points in the source" could be the gas molecules in a fluoresescent light, the filament in an incandescent light, or our local star, the sun.... This relates to various 'points' having different energies, so the amplitude and frequency [color] also has variations...it's not easy to get monochromatic (single frequency) light....hence we see versions of 'white light' meaning light appears sort of white visually but is actually a combination of colors: http://en.wikipedia.org/wiki/White_light 17. Feb 14, 2012 The nature of light is such that it enables us to see things but we don't actually see light itself. 18. Feb 14, 2012 ### sophiecentaur You rattled my cage a bit here. It would be much more accurate to say that white light (or, in fact many of the colours we see) consists of a combination of different WAVELENGTHS (or frequency, as you wish). i.e a SPECTRUM. There is so much confusion between colour and wavelength and this can lead to further confusion when it's taken further. 'Colour' is something that we allocate to single wavelengths or combinations of light with different wavelengths. 'Wavelength' means just one thing so it is worthwhile using that word when that's what is meant. Inhabitants of Planet Zog would agree 100% with our spectral analysis of a light source but, even allowing for any translation of actual words, they would not agree about colours (and neither would a Dog or Cow!) Not being picky, btw. It's far more important than that. 19. Feb 14, 2012 ### cepheid Staff Emeritus I can't say that I agree with this. When you see an object, it is because photons that are being emitted or reflected from the surface of that object are hitting your retina. The quanta of light (or, if you prefer, just the EM waves) are the things that are actually detected by your sensory equipment. 20. Feb 15, 2012 ### John15 Quote Drakkith This is similar to why sound waves do not normally interfere and keep you from hearing the speakers in your TV. Of course enougth speakers playing different sounds from different directions and all you get would be noise. So could it be said then that light travels as a wave but collapses to particle like on observation/ detection. Wavelength determines colour and energy is linked to wavelength so how does amplitude work? Would I be right in thinking that amplitude enables the wave to carry more energy per wave i.e 2x amplitude gives twice energy or similar to 2 waves travelling in partnership. Finally, I think, waves in 3d must propagate outwards spherically, as sphere grows energy should be spread out the same way a balloon gets thinner as its blown up, so taking the sun as source by the time light reaches earth we have a sphere with a radius of over 90 million miles, how does light maintain its integrity when spread out over such an area? 21. Feb 15, 2012 ### Drakkith Staff Emeritus You might get sensory overload and be unable to distinguish the sounds, but the waves would not necessarily be interfering with each other enough to be noticeable. Sure. It depends on how you are viewing the EM Radiation. For example, radio waves can be thought of as actual waves and the amplitude as a direct increase in the signal strength. However when talking of individual photons this no longer works. The energy of the photon would be E=hv, where h is Planks constant and v is the frequency. Again, it depends on how you are looking at the light. As a wave model the light simply spreads out like any wave does and the intensity of the light drops off as distance from the emitting objects increases. In terms of photons, the Sun emits uncountable numbers of photons which then move straight out away from the Sun. The intensity drops off as distance increases because the photons spread out into space, similar to birdshot from a shotgun spreading out in the air. The energy of each photon is set and does not change and the photon does not spread out as it travels. 22. Feb 15, 2012 True our retinal cells detect the waves /photons incident upon them and this is a part of the process that gives us the sense of vision,but it is the object that we see and not the photons.We see by means of photons but how can we actually see a photon? We use expressions such as "we can see the light rays" or "the light we see is the light contained within the visible region of the EM spectrum".Such expressions are usually good and understandable within the context they are used but there may be times when a slightly different phraseology would add some useful extra detail. 23. Feb 15, 2012 ### sophiecentaur "Seeing" can be regarded as the whole perception process which involves receiving the light right through to placing an object in our brain's model of our surroundings. Or as our eye reacting to light that enters it. Take your pick. 24. Feb 16, 2012 ### John15 Drakkith a fine answer I think I may be getting there. One thing you say that a photons energy is fixed and the photon does not spread out as it travels so could it be regarded as each photon ( I am assuming that 1 photon = 1 wavelength ) to be moving with a virtual box around it, if so is this where planks quanta came from. Would it be possible to expand a bit on amplitude? is it natural or something we add to an EM signal for instance. It seems to me that EM waves behave strangely. I have found many formula for the relationship between wavelength, frequency and energy, all include either h, c or both, what they seem to say is that waves travel with a constant momentum which seems to be hc as in wavelength x energy = hc . e.g. comparing it to matter short wavelength acts like a bullet while in comparison long wavelength acts like a sponge ball, with both having the same mass and move at the same speed. One reason for these questions is that depending on colours I see some 2d surfaces as 3d where red seems further away and blue seems closer especially where black is either in the forgroud or background, e.g. I have a book with a black cover the yellow writing seems flat on the black but the blue seems to stand out above the black yet others say it all looks flat. I am trying to relate this to the colour wavelengths. 25. Feb 16, 2012 ### sophiecentaur Owch!!! Where did that come from? I think you made too big a jump somewhere along the line. In fact, if you associate a photon with the wavelength of a wave you get things completely the wrong way round. A long wavelength radiation like Radio has millions (literally) more photons than a short wavelength radiation like X Rays, for the same flux of energy. Radio Frequency Photons have too little energy to detect individually (they come in vast numbers and interact with particles at a very low energy but high energy (like gamma) photons can be detected by the individual clicks of a Geiger Muller detector. The spatial extent of a photon is very debatable, in fact, and depends very much on what experiment you are considering. This also relates to the momentum of photons, because the momentum of high frequency photons is high. Your post also strays into the psychology of perception of colours and of scenes. That is a very complex topic and is too far away from these fundamental matters to be treated similarly. It's just asking to get bogged down almost before you've started.
2,915
12,930
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.03125
3
CC-MAIN-2018-26
longest
en
0.961754
https://www.esaral.com/q/find-the-median-of-the-data-17228
1,722,921,155,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722640476479.26/warc/CC-MAIN-20240806032955-20240806062955-00397.warc.gz
597,578,905
11,533
# Find the median of the data: Question: Find the median of the data: 12, 17, 3, 14, 5, 8, 7, 15 Solution: Numbers are 12, 17, 3, 14, 5, 8, 7, 15 Arranging the numbers in ascending order 3, 5, 7, 8, 12, 14, 15, 17 n = 8 (even) $\therefore$ Median $=\frac{\frac{\bar{n}^{\text {th }}}{2} \text { value }+\left(\frac{n}{2}+1\right)^{\text {th }} \text { value }}{2}$ $=\frac{\frac{8}{2}^{\text {th }} \text { value }+\left(\frac{8}{2}+1\right)^{\text {th }} \text { value }}{2}$ $=\frac{4^{\text {th }} \text { value }+5^{\text {th }} \text { value }}{2}$ $=\frac{8+12}{2}$ $=\frac{20}{2}=10$
265
603
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.5625
5
CC-MAIN-2024-33
latest
en
0.42397
https://subsubroutine.wordpress.com/tag/python/
1,527,217,182,000,000,000
text/html
crawl-data/CC-MAIN-2018-22/segments/1526794866938.68/warc/CC-MAIN-20180525024404-20180525044404-00481.warc.gz
674,931,416
16,772
# The symbolic algebra of the medieval longbow Today’s post is going to be a bit more abstract and a bit less applied than usual, because today I want to take Python’s Sympy symbolic algebra library for a spin. As a narrative subject, we’ll be looking at the medieval English Longbow. We’ll start with some physics by modelling the deterministic trajectory of the arrow. Then we’ll add some statistical noise to make it a bit more realistic. Lastly, we’ll do some simple Bayesian inference on the range of the longbow. And we’ll do as much of it as we can via symbolic algebra. These are English longbowmen. The English (or Welsh) Longbow is around 1.8-2m tall, can fire 10-12 arrows per minute in the hands of a skilled archer, and its steel-tipped arrows can penetrate the armour of a medieval knight. The “draw-weight” of a longbow is considerable, and skeletons of longbow archers often have enlarged left arms. Over a lifetime, the archer’s body was actually deformed by their tool of trade. So, how far could it shoot an arrow? Let’s figure that out with physics. According to Longbow Speed Testing (!), the velocity of an arrow leaving the bow is 172-177 feet per second. Say 53m/s in metric. The trajectory of a projectile can be computed using classical mechanics: $y = x \tan{\left (\alpha \right )} - \frac{g x^{2}}{2 v^{2} \cos^{2}{\left (\alpha \right )}}$ Where: • $y$ is the height of the arrow • $x$ is the horizontal distance that the arrow has travelled • $\alpha$ is the angle at which the arrow is fired • $v$ is the velocity of the arrow as it leaves the bow • $g$ is the acceleration due to gravity (~$9.8 m/s^2$ on the surface of the earth) • (We’re ignoring wind resistance) # A Bayesian Search for Hannibal’s marauding army during the Second Punic War At the time of writing, the hunt is still on for Malaysia Airlines flight MH370. Bayesian search theory has become topical (again). Bayesian search has been used to find crashed planes, lost hikers, sunken submarines and even missing hydrogen bombs. Bayes’ theorem is perfectly suited to search because it provides a mathematical framework for deductive reasoning. Let’s try it out. Here’s our (semi-fictionalised) search scenario: In 217BC, Rome and Carthage are at war. Dido’s curse still haunts the two civilisations. Carthaginian General Hannibal Barca has just annihilated a Roman army at Lake Tresimene, 180km northwest of Rome. He had already inflicted a series of crushing defeats on the Romans to the point that, after Lake Tresimene, Rome was left virtually without any field army at all. The great fear was that Hannibal would now march his war elephants on the city of Rome itself. In times of dire emergency, the Roman republic allowed for the temporary appointment of a dictator. Five days after Lake Tresimene, the senate appointed Quintus Fabius Maximus as dictator. The first question for him was: where is Hannibal now? # Machines enact the conversation that Charles Dickens & Fyodor Dostoyevsky didn’t have A delicious hoax was recently perpetrated on the highbrow literary community. It really was the tasty cake. Sometime in 2002, Arnold Harvey invented an 1862 meeting between Charles Dickens & Fyodor Dostoyevsky and had ‘evidence’ of the meeting published in a respectable literary journal. In 2011 his fabrication was briefly taken as fact and appeared in at least two Dickens biographies and numerous book reviews. Part of Mr. Harvey’s genius was his sly reverse psychology. The meeting is mentioned in a nonchalant, matter-of-fact way towards the end of a utterly commonplace piece of scholarly boffinhood titled Dickens’s Villains: A Confession and a Suggestion. The author of the article, a pseudonymous “Stephanie Harvey,” quotes a letter from Dostoyevsky which she supposedly translated from Russian. In the letter, Dostoyevsky recalls his meeting with Dickens sixteen years after the fact. Mr/Ms. Harvey’s article appeared in vol. 98 of the literary journal the Dickensian, where it went unremarked-upon for almost ten years before biographer Claire Tomalin discovered it. She found the anecdote so “irresistable” that she put it in her tome Charles Dickens: a Life. From there the “remarkable” encounter wound up in the opening paragraph of the NYT’s review, various other reviews and biographies (including Michael Slater’s Charles Dickens: A Life Defined by Writing), and will probably continue to be recounted as fact forever in the endless echo chamber of the Interwebs. (For the interested reader, the Times Literary Supplement contains a lengthy investigation and a speculation that Mr. Harvey is some sort of rogue scholar-vigilante). The tantalising prospect of such a meeting seems to have intoxicated many otherwise sober critics. Nobody asked the practical questions like, what language did they communicate in? Or, had Dickens ever even heard of Dostoyevsky? The London Review of Books wrote that Ms. Tomalin “might have been less susceptible had she not so badly wanted it to be true.” And we want it to be true, too! Sadly, absent a time machine, there’s no way to make it so. But we can do the next best thing: we can train machines with the words of these two authors and then set those machines to chatting with one-another. • FYODOR: “This hatred for Russia has been already embodied in the narrative as it stands so far and the other my own .” • CHARLES: “We know what Russia means sir says Podsnap we know what England is.” • FYODOR: “You thirsted while in Switzerland for your home country for Russia you read doubtless many books about Russia .” • CHARLES: “Although I saw him every day it was for some time longer to settle myself for the present in Switzerland .” • FYODOR: “It was a recollection of Switzerland .” • CHARLES: “I tingle again from head to foot as my recollection turns that corner and my pen shakes in my hand .” • FYODOR: “But I had supposed that laying aside my pen and saying farewell to my readers I should be heard …” • CHARLES: “Upon my life the whole social system as the men call it when they make speeches in Parliament is a system of Prince ‘s nails !” • FYODOR: “Why in the English Parliament a Member got up last week and speaking about the Nihilists asked the Ministry whether it was not high time to intervene to educate this barbarous people .” • CHARLES: “Do n’t you know that people die there ?” • FYODOR: “But excuse me I ‘ll make merry till I die !” Isn’t this conversation just what we’d expected?! It’s lively, and moves quickly from Mother Russia to writing to English politics to colonialism… And what strikes me is how the character of the two authors is present in their words. Dostoyevsky’s brooding existentialism, Dickens’ concern with social justice. Their words could have come straight from their books… Because they did: this conversation was automatically generated from the two author’s oeuvres. # Machine learning literary genres from 19th century seafaring, horror and western novels So I got interested in ‘digital humanities’ and I wanted to try out some of their procedures for doing literary criticism with computers. One basic problem they have is how to classify texts so that, firstly, they can be searched for and found (this is the librarian’s problem), but also so that they can be grouped according to content or genre and compared with one another (a literary critic’s job). And I realised that the internet is itself a vast text classification and retrieval problem on a scale comparable to the Borgesian infinite library. The Dewey decimal system is simply not going to cut it. I learned that even as I submit these words to this blog, search engine webcrawlers are sucking them all up and throwing them into vast term-document matrices, which they use to match my words to search phrases by calculating cosine similarities and other mathematical measures of correspondence. How to do things with words with machines 1. Awesome geek stuff! The problem I’ve made up for today: train a machine to classify a book into one of three literary genres: Seafaring, Gothic Horror or Western.
1,822
8,101
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 7, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.09375
4
CC-MAIN-2018-22
latest
en
0.916576
https://www.studypool.com/discuss/1267752/I-need-help-with-a-math-problem
1,563,873,283,000,000,000
text/html
crawl-data/CC-MAIN-2019-30/segments/1563195529175.83/warc/CC-MAIN-20190723085031-20190723111031-00490.warc.gz
848,452,891
25,082
# I need help with a math problem Anonymous account_balance_wallet \$5 ### Question Description Alex Maslovskii School: UC Berkeley A cone is a three - dimensional geometric figure  that tapers smoothly from a flat base (frequently, though not necessarily, circular) to a point called the apexor vertex. It has one bace and one lateral face Cross section parallel to base has the same shape, as bace (circular) Cross section perpendicular to base is triangle Еo find the total surface area of the cone , we must find the area of ​​the side surface (lateral face) and the base. Formula of cone side surface (Ssf) is Ssf= pi*r*l   where cone.JPG Formula of cone base (Sb) is Sb= pi*r^2 Formula of total surface area(St) is St= Ssf+Sb Formula of cone volume is Vc= 1/3 *pi*r^2*H where h is height of cone flag Report DMCA Review Anonymous Excellent job Brown University 1271 Tutors California Institute of Technology 2131 Tutors Carnegie Mellon University 982 Tutors Columbia University 1256 Tutors Dartmouth University 2113 Tutors Emory University 2279 Tutors Harvard University 599 Tutors Massachusetts Institute of Technology 2319 Tutors New York University 1645 Tutors Notre Dam University 1911 Tutors Oklahoma University 2122 Tutors Pennsylvania State University 932 Tutors Princeton University 1211 Tutors Stanford University 983 Tutors University of California 1282 Tutors Oxford University 123 Tutors Yale University 2325 Tutors
386
1,481
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.328125
3
CC-MAIN-2019-30
latest
en
0.715975
https://myelectrical.com/tools/complex-number-calculator
1,627,453,216,000,000,000
text/html
crawl-data/CC-MAIN-2021-31/segments/1627046153531.10/warc/CC-MAIN-20210728060744-20210728090744-00461.warc.gz
410,110,816
15,077
## Cable Sizing Application ### What Changed So that we can focus all our efforts on our new application, we have retired our myElectrical.com cable sizing calculator. We recommend you now use our main cable sizing application over at myCableEngineering.com. ### myCableEngineering.com Cable Sizing Software - select, size and manage your power cables using myCableEngineering. All your cables, for all your projects. • LV and MV cables up to 33 kV with current capacity in accordance with BS 7671, ERA 69-30 and IEC 60502. • Positive and zero sequence impedance to IEC 60609. Voltage drop in accordance with CENELEC CLC/TR 50480. • Project management and team collaboration, with clear easy to read calculations and reports. Our software is the only cloud-based solution and has been built from the ground up to be fully responsive - meaning you can access your cables from anywhere and on any device, desktop, tablet or smartphone. # Complex Number Calculator x = + i 0 1 2 3 4 5 6 7 8 9  decimal places Sci Rad y = + i x = 0.000 + i 0.000   [= 0.000 @ 0.000o] y = 0.000 + i 0.000   [= 0.000 @ 0.000o] 1/x = NA 1/y = NA x+y = 0.000 + i 0.000   [= 0.000 @ 0.000o] x-y = 0.000 + i 0.000   [= 0.000 @ 0.000o] x*y = 0.000 + i 0.000   [= 0.000 @ 0.000o] x/y = NA Electrical: x = 0.000 @ a power factor of 1.000 y = 0.000 @ a power factor of 1.000 m = 0.000 + i 0.000   [= 0.000 @ 0.000o] Tip: registered users can save calculations. Periodic Electrical Installation Inspection – How Often? How often installations are inspected is up to the owner of the installation, provided such durations do not exceed any regulatory maximums in force. ... Autonomous Vehicle Challenge Two driverless and solar power vans have departed from Italy on their way to China via the silk road. During the 13,000 kM trip the vans will drive themselves... myElectrical does not support or promote the use of copyrighted material without the copyright owner's consent. If you believe that material for which... Cable Insulation Properties Cable insulation is used to provide electrical separation between conductors of  a cable.  During the historical development of cables, numerous types... Skin Tapping Input Tapping your forearm or hand with a finger could soon be the way you interact with gadgets. A new technology created by Microsoft and Carnegie Mellon ... Photovoltaic (PV) - Utility Power Grid Interface Photovoltaic (PV) systems are typically more efficient when connected in parallel with a main power gird. During periods when the PV system generates energy... RLC Circuit, Resistor Power Loss - some Modelica experiments Modelica is an open source (free) software language for modelling complex systems. Having never used it before, I thought I would download a development... Robotics - Home Innovations We have a sister note to this (Robots - Interesting Video), in which I have posted some videos of interesting robots developed by commercial corporations... Fault Calculations - Introduction Fault calculations are one of the most common types of calculation carried out during the design and analysis of electrical systems. These calculations... Why is electricity so hard to understand? It's been a busy few months on different projects or busy couple of decades depending on how I look at it. I can say that on the odd (frequent) occasion... Our website uses cookies so that we can provide a better experience.
855
3,443
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.59375
3
CC-MAIN-2021-31
longest
en
0.840376
https://academicessayplace.com/2022/04/25/applying-counting-principles-mathematics-homework-help/
1,716,144,410,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971057819.74/warc/CC-MAIN-20240519162917-20240519192917-00330.warc.gz
66,734,759
12,464
# Applying counting principles | Mathematics homework help Suppose you have a friend at a different university who is taking a similar math course to one you are taking. He is having problems understanding the subtle differences between permutations and combinations, as well as the accompanying formulas nCr and nPr. Also, he does not understand the Fundamental Counting Principle. In order to help, you pick three questions from your book that deal with these concepts and write him an email. Directions: • For this assignment, you will write a paper that will describe what you would say in an email to this friend. In your “email” you will present the solutions to the three problems below. Show every step of your calculation. Use nCr, nPr and the Fundamental Counting Principle in your email and explain what they mean. • Include an introduction in your paper/email that gives background on combinations and permutations, provides motivation for learning these ideas, and relates any personal experiences you have with the topic. • Include a conclusion that summarizes your answers, highlights the main points, and puts things in perspective for your friend. • Please remember that any written part of your assignments must follow APA standards with no Plagerisim. The three questions you must solve for your friend are: 1. How many different ways can 28 runners place in an Olympic qualifying marathon? 2. If only the eight fastest runners advance to the Olympics; how many different ways can the eight fastest runners be chosen from the whole field of 28 runners? 3. If the runner in first place receives a gold medal, the runner in second place receives a silver medal, and the runner in third place receives a bronze medal, how many different ways can the three medalists be chosen from the entire field of 28 runners? ## Calculate the price of your order 550 words We'll send you the first draft for approval by September 11, 2018 at 10:52 AM Total price: \$26 The price is based on these factors: Academic level Number of pages Urgency Basic features • Free title page and bibliography • Unlimited revisions • Plagiarism-free guarantee • Money-back guarantee • 24/7 support On-demand options • Writer’s samples • Part-by-part delivery • Overnight delivery • Copies of used sources • Expert Proofreading Paper format • 275 words per page • 12 pt Arial/Times New Roman • Double line spacing • Any citation style (APA, MLA, Chicago/Turabian, Harvard) # Our guarantees Delivering a high-quality product at a reasonable price is not enough anymore. That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe. ### Money-back guarantee You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent. ### Zero-plagiarism guarantee Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in. ### Free-revision policy Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result. ### Privacy policy Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems. ### Fair-cooperation guarantee By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
758
3,643
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.15625
4
CC-MAIN-2024-22
latest
en
0.954712
https://docs.cemosis.fr/hifimagnet/stable/magnettools/DataStructure.html
1,723,203,499,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722640763425.51/warc/CC-MAIN-20240809110814-20240809140814-00788.warc.gz
163,859,742
8,331
Data Structure The magnets description is given in `.d` file. The `.d` file is structured as follows: ``````#Power[MW] Current[A] Safety Ratio[] T_ref[°C] SymetryFlag 12.5 31000 0.8 20 Sym, (1) #Helices N_Elem 14 56, (2) #N R1[m] R2[m] HalfL[m] Rho[Ohm.m] Alpha[1/K] E_Max[Pa] K[W/(m.K)] h[W/(m^2.K)] <T_W>[°C] T_Max[°C], (3) 4 1.930e-02 2.420e-02 7.7050e-02 1.992e-08 0.00e+00 3.600e+08 3.800000e+02 8.500000e+04 3.000e+01 1.00e+02 ... 4 1.703e-01 1.860e-01 1.6415e-01 2.087e-08 0.00e+00 3.740e+08 3.800000e+02 8.500000e+04 3.000e+01 1.00e+02 0., (4) #External_Magnets, (5) 0`````` 1 Main parameters Max. electrical power available Nominal Current $I_o$, Safety ratio requested (ratio between the max. allowed stress and and the actual hoop stress). A reference temperature $T_{ref}$ A flag to indicate wether or not we consider only half of the polyhelix insert 2 Main polyhelices insert characteristics: $Helices$, the number of Tubes, the total number of elements for the polyhelices insert (aka $N*Helices$) (optional) 3 Description of each helix: $N$ $R_1$ inner radius $R_2$ outer radius HalfL half electrical length The physical properties are given at $T_{ref}$: $\rho[Ohm.m]$, resistivity at $T_{ref}$ $Alpha[1/K]$, $K[W/(m.K)]$, thermal conductivity at $T_{ref}$ Cooling params: $h[W/(m^2.K)]$, $[°C]$, Max allowed values: $E_{Max}[Pa]$, $T_{Max}[°C]$ 4 flag to indicate the end of the polyhelices insert definition 5 Definitions of external magnets, if any 2. External Magnets section ``````#External_Magnets (1) 6 #Type R1[m] R2[m] Z1[m] Z2[m] J(R1)[A/m2] Rho[Ohm.m] Nturn (2) 1 0.2 0.34 -0.29899 -0.14685 44512000 1.7241379310345e-08 23 1 0.2 0.34 -0.14685 0.14685 86222000 1.7241379310345e-08 86 1 0.2 0.34 0.14685 0.29899 44512000 1.7241379310345e-08 23 ...`````` 1 Number of external magnets, providing the background field 2 Definition of external magnet: Type: 1 for Bitter, 0 for Supra $R_1, R_2, Z_1, Z_2$: dimensions of the rectangular cross section J: current densitiy at $r=R_1$ $\rho$ $N_{turn}$ 3. Resume section: ``````#Bz(0)[tesla] Power[MW] Bz_total(0)[tesla] (1) 2.754479e+01 1.250000e+01 2.754479e+01 #Helice B0_H[tesla] Sum_B0[tesla] Power_H[MW] Sum_Power[MW] (2) 1 1.836561e+00 1.836561e+00 1.965246e-01 1.965246e-01 ... 14 1.499948e+00 2.754479e+01 1.434240e+00 1.250000e+01`````` 1 Main characteristics: Magnetic Field provided by the polyhelices insert (aka self field), Total electrical power Total Magnetic Field (aka self field + background field) 2 Contribution to the self magnetic field and power per helix 4. Detailed Helix section `````` #Helix <T>[°C] N_Turn IACS[%] (1) 1 9.493052e+01 7.547479e+00 8.654981e+01 #Elem J[10^8 A/m2] Tlim[°C] Tmax[°C] <T>[°C] Elim[MPa] Emax[MPa] Pitch[m] Nturns (2) 1 3.477121e+00 1.000000e+02 1.000000e+02 9.493052e+01 3.600000e+02 1.803207e+02 2.041741e-02 1.886870e+00 2 3.477121e+00 1.000000e+02 1.000000e+02 9.493052e+01 3.600000e+02 1.854755e+02 2.041741e-02 1.886870e+00 3 3.477121e+00 1.000000e+02 1.000000e+02 9.493052e+01 3.600000e+02 1.854755e+02 2.041741e-02 1.886870e+00 4 3.477121e+00 1.000000e+02 1.000000e+02 9.493052e+01 3.600000e+02 1.803207e+02 2.041741e-02 1.886870e+00 .... #Helix <T>[°C] N_Turn IACS[%] 14 6.639741e+01 1.766565e+01 8.258438e+01 #Elem J[10^8 A/m2] Tlim[°C] Tmax[°C] <T>[°C] Elim[MPa] Emax[MPa] Pitch[m] Nturns 1 8.490501e-01 1.000000e+02 5.387475e+01 5.014907e+01 3.740000e+02 -4.681979e-02 2.431188e-02 3.375921e+00 2 1.372421e+00 1.000000e+02 9.238026e+01 8.264575e+01 3.740000e+02 -1.701580e+00 1.504057e-02 5.456906e+00 3 1.372421e+00 1.000000e+02 9.238026e+01 8.264575e+01 3.740000e+02 -1.701580e+00 1.504057e-02 5.456906e+00 4 8.490501e-01 1.000000e+02 5.387475e+01 5.014907e+01 3.740000e+02 -4.681983e-02 2.431188e-02 3.375921e+00 MARGE DE SECURITE CONTRAINTES= 2.000000e+01 %`````` 1 Stats per Helix: mean temperature, number of turns, IACS (ratio of ), 2 Details per element: current densitiy at $r=R_1$, …​
1,857
4,054
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.515625
3
CC-MAIN-2024-33
latest
en
0.502249
https://www.turtlediary.com/video/parts-of-circle.html?app=1?topicname
1,721,848,782,000,000,000
text/html
crawl-data/CC-MAIN-2024-30/segments/1720763518427.68/warc/CC-MAIN-20240724171328-20240724201328-00173.warc.gz
902,235,594
22,051
# Parts of Circle Download Video size: Message preview: Someone you know has shared Parts of Circle video with you: To play this video, click on the link below: https://www.turtlediary.com/video/parts-of-circle.html?app=1?topicname To know more about different videos, please visit www.turtlediary.com Hope you have a good experience with this site and recommend to your friends too. Login to rate activities and track progress. Login to rate activities and track progress. ## Parts of Circle Various parts of a circle: 1. Center point: It is the center of the circle. Every point on the circle is at the same distance from the center. 2. Diameter: A line segment that goes all the way across a circle through the center point. 3.Radius: A line segment that goes from the center point to a point on the circle. Thus, it goes halfway through the circle. 4.Circumference: The distance around the outer edge of the circle. 5. Chord: A line segment that connects any two points on the circle. 6. Arc: Any connected part of the circle.
244
1,038
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.703125
3
CC-MAIN-2024-30
latest
en
0.872791
http://www.jsoftware.com/docs/help602/dictionary/intro03.htm
1,532,158,760,000,000,000
text/html
crawl-data/CC-MAIN-2018-30/segments/1531676592420.72/warc/CC-MAIN-20180721071046-20180721091046-00290.warc.gz
483,853,454
2,297
>>  <<  Ndx  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary In the sentence %a of Section 2, the % “acts upon” a to produce a result, and %a is therefore analogous to the notion in English of a verb acting upon a noun or pronoun. We will hereafter adopt the term verb instead of (or in addition to) the mathematical term function used thus far. The sentence +/ 1 2 3 4 is equivalent to 1+2+3+4; the adverb / applies to its verb argument + to produce a new verb whose argument is 1 2 3 4, and which is defined by inserting the verb + between the items of its argument. Other arguments of the insert adverb are treated similarly: ``` */b=:2 7 1 8 2 8 1792 <./b 1 >./b 8 ``` The verb resulting from the application of an adverb may (like a primitive verb) have both monadic and dyadic cases; due to its two uses, the adverb / is called either insert or table. In the present instance of / the dyadic case produces a table. For example: ``` 2 3 5 +/ 0 1 2 3 2 3 4 5 3 4 5 6 5 6 7 8 ``` The verbs over=:({.;}.)@":@, and by=:' '&;@,.@[,.] can be entered as utilities (for use rather than for immediate study), and can clarify the interpretation of function tables such as the addition table produced above. For example: ``` a=: 2 3 5 b=: 0 1 2 3 a by b over a +/ b +-+-------+ | |0 1 2 3| +-+-------+ |2|2 3 4 5| |3|3 4 5 6| |5|5 6 7 8| +-+-------+ b by b over b </ b +-+-------+ | |0 1 2 3| +-+-------+ |0|0 1 1 1| |1|0 0 1 1| |2|0 0 0 1| |3|0 0 0 0| +-+-------+ ``` Exercises 3.1 Enter d=: i.5 and the sentences st=: d-/d and pt=: d^/d to produce function tables for subtraction and power. 3.2 Make tables for further functions from previous sections, including the relations < and = and > and lesser-of and greater-of. 3.3 Apply the verbs |. and |: to various tables, and try to state what they do. 3.4 The transpose function |: changes the subtraction table, but appears to have no effect on the multiplication table. State the property of those functions whose tables remain unchanged when transposed. Answer: They are commutative 3.5 Enter d by d over d!/d and state the definition of the dyad ! . Answer: ! is the binomial coefficient or outof function; 3!5 is the number of ways that three things can be chosen from five. >>  <<  Ndx  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary
761
2,332
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.5625
3
CC-MAIN-2018-30
latest
en
0.849378
http://sudoku.com.au/1V11-8-2012-sudoku.aspx
1,582,279,851,000,000,000
text/html
crawl-data/CC-MAIN-2020-10/segments/1581875145500.90/warc/CC-MAIN-20200221080411-20200221110411-00376.warc.gz
132,774,054
13,307
Timer 00:00:00 Sudoku Sudoku ## if (sTodaysDate) document.write('Sudoku for ' + sTodaysDate.split('-')[0] + '/' + monthname() + '/' + sTodaysDate.split('-')[2]); else document.write('Enter your own sudoku puzzle.') Help Play this pic as a Jigsaw or Sliding Puzzle Previous / Next Choose a number, and place it in the grid above. 1 2 3 4 5 6 7 8 9 This number is a possibility Automatically remove Possibilities Allow incorrect Moves Clicking the playing grid places the current number Highlight Current Square Grey out Used Numbers Possibilities in Grid Format Check out the latest post in the Sudoku Forum Welcome to the Sudoku Forums! Submitted by: Gath Indicate which comments you would like to be able to see GeneralJokesOtherSudoku Technique/QuestionRecipes It's a cute lil' baby! 11/Aug/12 12:12 AM |  | Must be from that same wedding - great catch, Kate! 11/Aug/12 12:24 AM |  | 11,34 11/Aug/12 1:59 AM |  | '57 Cheby stretch limo? 11/Aug/12 3:44 AM |  | SER=8.4UP=30Overlapping ALS Logic:(3)b4=(8)b9=(47)d19 or (2)b4-c6=(2)d6=(478)d129 => d6<>4,d58<>7I don't have time to finish this but I thought it was an interseting move. 11/Aug/12 4:20 AM |  | #1. LC and LS up to UP30#2. +3b4 -> contradiction (via ac3=16 and +4gi4) while +2b4 -> UP81 (via +4e46 and i47=47) Note : the controlling cell b4 is directly connected to all the bivalues in the upper left box and to the XChain snippets on 2s and 3s and indirectly connected to the More... 11/Aug/12 4:34 AM |  | Hi JC.I apologize if my notation is not clear. What I am trying to show is that If (3)b4 then (47)d19 and if (4)b4 then (478)d129. Since one of these must be true, all other 4's & 7'3 can be eliminated from column 4. I don't care which one is true. Also, I don't use contradictions to solve puzzles, so I don't care about these.Bud 11/Aug/12 8:56 AM |  | In the spirit of posting partial solutions:1. Unique possibilities to 30.2. Whether i5=2,i47=47;OR i4=2=b3,b4=3,b9=8,ac3=16,f1=9(to avoid the unresolvable 47 rectangle at df19);eg3=48.UP31.(e2=6).Here, i12=9 results in b4=2, but I couldn't prove i3=9 also makes b4=2. 11/Aug/12 11:05 AM |  | SSTS1)(2)i5=i4-b4=b3-(2=16)ac3-bc1=(6)i1,=>i5<>62)(5=278)dfi5-(8)b5=(8-1)c4=f4-d6=(1)d8 ,=>d8<>53)5)d5=(5-2)d6=c6-(2=3)b4-g4=(3)g5,=>g5<>54)(9)f1=(9-2)f2=d2-d6=c6-b4= More... 12/Aug/12 2:22 AM |  | Hi Bud. Don't worry, your notation is very clear and I understood your interesting move exactly as you explained it.On the other hand, to remove any ambiguity, I am writing '+x -> contradiction' as a shorthand notation for 'Chain[...] : forbidding matrix ... => derived SIS ... :=> -x' when I don't give details.Regards, JC. 12/Aug/12 7:32 PM |  | Hi sotir, I followed your excellent logic to the end, but after step 8),I couldn't make it to UP81 yet, only to UP37.What is the next UP after e4=7?(Some minor typos: Step 2): -(8)c5;Step 5): (8=2)f5;and Step 8): e5<>7.) 12/Aug/12 10:24 PM |  | I see it now sotir, I missed the 12 pair at cd6. 12/Aug/12 10:44 PM |  | Not a member? Joining is quick and free. As a member you get heaps of benefits. You can also try the Chatroom (No one chatting right now - why not start something? ) Check out the Sudoku Blog     Subscribe Easy Medium Hard Tough Or try the Kids Sudokus (4x4 & 6x6) 16x16 or the Parent's Page. Printer Friendly versions: Members Get Goodies! Become a member and get heaps of stuff, including: stand-alone sudoku game, online solving tools, save your times, smilies and more! Welcome our latest MembersLiz Allison from NSWSpike Jones from Pennsylvanianabapammm from ocean grove Member's Birthdays Todaycatherine, S from France, T, txsxyrd from @aol.com, noblewine from Oklahoma
1,244
3,683
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3
3
CC-MAIN-2020-10
latest
en
0.785923
https://www.vedantu.com/physics/interference-of-waves
1,716,058,954,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971057494.65/warc/CC-MAIN-20240518183301-20240518213301-00891.warc.gz
966,430,250
33,069
Courses Courses for Kids Free study material Offline Centres More Store # Interference of Waves Last updated date: 16th May 2024 Total views: 403.2k Views today: 12.03k Interference of waves is the phenomenon when two waves meet or superimpose each while traveling along the same medium. This resultant interference of two or more waves causes the medium to take a new shape that results from the net effect of the two individual waves upon the particles of the medium. Thus we can say that when two waves meet or come together, the result is the sum of the individual waves. ## What is Interference? You may wonder what will happen when two waves travelling in the same medium are meeting each other? Will there be any change in frequency of resultant wave or will there be change in amplitude? Also questions may arise will there be any change in the nature of two waves meeting? To answer all these questions we need to understand the phenomenon of superposition and interference of two waves. Interference can be defined as the phenomenon in which two or more waves meet each other and superpose to form a resultant wave than maybe of greater, lower or the same amplitude depending upon the nature of superimposition or alignment of peaks and troughs of the overlapping waves. When two or more waves arrive at the same point while travelling through the same medium, they superimpose themselves on one another or more specifically we can say that, the disturbances of the waves superimpose when they come together. Each of these disturbances corresponds to a force, and we know that forces add. Now if the disturbances are along the same line, then the resulting wave is a simple addition of the disturbances of the individual waves similar two how two forces acting in the same direction add up.Thus,in this case the amplitude of two waves also adds up to give resultant amplitude. ### The Principle of Linear Superposition The principle of linear superposition applies to any number of waves states that when two or more waves of the same type are incident on the same point, the resultant amplitude at that point is equal to the vector sum of the amplitudes of the individual waves and to simplify matters just consider what happens when two waves come together. For example, sound reaching you simultaneously from two different sources, or two pulses traveling towards each other along a string. When these waves come together, the result is superimposed waves and they add together, with the amplitude at any point being the addition of the amplitudes of the individual waves at that point. Although these waves interfere with each other when they meet, they continue traveling as if they had never encountered each other. ### Constructive and Destructive Interference If the crest of one of the waves falls on the crest of the other wave resulting in maximum amplitude. This is constructive interference. While if the crest of one wave falls on the trough of another wave, then the amplitude here is minimum. This is destructive interference. Further we will derive conditions for constructive and destructive interference in the below section. ### Derivation Consider a sinusoidal wave travelling along x-axis and given by equation W1(x,t)=Acos(kx−ωt) Where A is the amplitude of the wave k = 2π/λ is the wavenumber ω = 2πf is the angular frequency of the wave. Now consider another wave of the same frequency and amplitude but with a different phase travelling to the right direction. W2(x,t)=Acos(kx−ωt+ϕ) Here φ is the initial phase difference between the waves in radians The two waves superimpose and add; the resultant wave is given by the equation,W1+W2=A[cos(kx−ωt)+cos(kx−ωt+ϕ)] Using cosine rule, cosa+cosb=2cos(a−b/2)cos(a+b/2) Solving equation (1) using the formula obtained W1+W2=2Acosϕ/2{cos(kx−ωt+ϕ2)} Comparing it with W1(x,t)=Acos(kx−ωt) Amplitude of resultant wave will be 2Acosϕ/2 If the phase difference is an even multiple of π (φ = …..,–4π, –2π, 0, 2π, 4π,……), then cos φ/2 =1, so the sum of the two waves is a wave with twice the amplitude and this situation is called constructive interference. W1+W2=2Acos(kx−ωt) While when the phase difference is an odd multiple of π (φ =…..,–3π, –π, 0, π, 3π, 5π,……), then cos φ/2 = 0, so the sum of the two waves will be zero. W1+W2=0 and this is the case of destructive interference. ### Path difference for Constructive and Destructive Interference We know that phase difference and path difference of waves are related by ΔX=λ⋅Δϕ/2π where, ΔX is the path difference and Δϕ is the phase difference. Thus using the above derivation of constructive and destructive interference we can say that, the constructive path difference will be 0, λ, 2λ……. and the destructive path difference will be λ/2, 3λ/2, 5λ/2…… ## FAQs on Interference of Waves Q1. What actually causes Interference in Waves? When two or more waves meet, they interact with each other and this interaction of waves with other waves is called wave interference and it occurs when two waves that are traveling in opposite directions meet, the two waves pass through each other, and this affects their amplitude. Q2. What Kinds of Waves can Show Interference? The phenomenon of Interference is observed with all types of waves, for example, light, radio, acoustic, surface water waves, gravity waves, or matter waves, etc. The resulting images or graphs of Interference are called interferograms. Q3. How are Waves Affected by Interference and When do Waves Superimpose? Principle of superposition is also applied to the waves whenever two or more waves travelling through the same medium pass each other at the same time without being disturbed. The net displacement of the two waves passing through the medium at any point in space or time, is simply the sum of the individual wave displacements. Q4. What is the Highest Part on a Wave? The highest surface part of a wave is called the crest, and the lowest part is called the trough. The  vertical distance between the highest part i.e. crest and the lowest part i.e. the trough is the height of the wave and the horizontal distance between two adjacent crests or troughs is known as the wavelength.
1,430
6,234
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.9375
4
CC-MAIN-2024-22
latest
en
0.901058
https://www.physicsforums.com/threads/thermodynamics-engine-question.100385/
1,544,905,410,000,000,000
text/html
crawl-data/CC-MAIN-2018-51/segments/1544376827097.43/warc/CC-MAIN-20181215200626-20181215222626-00365.warc.gz
1,003,079,174
13,029
# Homework Help: Thermodynamics engine question 1. Nov 17, 2005 Ok, my question is as follows: An inventor claims to have developed an engine that takes in 10^8 J (Q_in) at a temperature of 400 K (T_2), and rejects 4x10^7 J (Q_out) to a reservoir of Temperatue of 200 K (T_1). The engine delivers 15 kilowatt hours of mechanical work (which = 3600 sec/hour *15 * 10^3 watts = 5.4x10^6 Joules). Would you advise investing money to put this engine on the market? the way i approached it was to calculate the max efficiency that a carnot engine would have, which is: efficiency = 1 - T_1/T_2 = 1 - 200/400 = 0.5 or 50%​ Now, using the expression, Efficiency = Work output/Heat input​ for the hypothetical engine gives. This gave me an efficiency of roughly 54%, and by Carnot's theorem, no engine can be more efficient than a carnot engine, or: Efficiency(carnot) > Efficiency(hypothetical)​ and in this case, it doesnt hold, i.e.: 50 % > 54 % is not true.​ Is this the correct way to do this problem? Thanks 2. Nov 17, 2005 ### Physics Monkey I didn't check your number crunching, but you've approached the problem correctly. 3. Nov 17, 2005 Thanks very much 4. Nov 18, 2005 ### Andrew Mason So what is your answer and why? My reason for not investing (besides the fact that the claim cannot be true as you have shown) would be: where are you going to find a reservoir to output at -73C? AM
406
1,406
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3
3
CC-MAIN-2018-51
latest
en
0.930252
http://mathoverflow.net/feeds/question/84993
1,369,446,818,000,000,000
text/html
crawl-data/CC-MAIN-2013-20/segments/1368705310619/warc/CC-MAIN-20130516115510-00017-ip-10-60-113-184.ec2.internal.warc.gz
166,718,221
5,241
Computing the fixed field of an automorphism of a function field - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-25T01:53:37Z http://mathoverflow.net/feeds/question/84993 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/84993/computing-the-fixed-field-of-an-automorphism-of-a-function-field Computing the fixed field of an automorphism of a function field Syed 2012-01-05T19:18:24Z 2012-01-20T10:10:21Z <p>Let say we have a function field $k(x,y)$ defined by $f(x,y)$ over $k$, with $\sigma \in Aut(k(x,y)/k)$ and. Suppose, I'm not that out of luck, so that either of $\prod \sigma^i(x)$ or $\sum \sigma^i(x)$ (and the same for $y$) don't fall in $k$, let call them $x^\sigma$ and $y^\sigma$. Then I can compute $k(x^\sigma, y^\sigma)$ and it is not hard to see that if $(\deg(x),\deg(y)) = 1$, that would be my fixed field and I can compute it by finding the min poly of one over another.</p> <p>However, for example in the case of hyperelliptic involution, we have $\sum \sigma^i(y)=0$. Or there are situations that finding such an $x,y$ is not an easy question. For example, in Algebraic Function Fields and Codes of Stichtenoth, Question 6.9, he asks for such an element $t$ in $F_q(x)$ such that $t^{Aut(F_q(x)/F_q)} = t^{PGL(2,q)}$ is not in $F_q$, and I couldn't solve it (So, it's hard for me at least. I can of course use computer algebra for a particular $q$ but this not what the question asks).</p> <p>So, I was wondering what is a fail-free way of choosing these generators, such that the fixed field algorithm always works (to prevent them from falling into the constant field and have relatively prime degree). If I use all symmetric polynomials of $Order(\sigma)$ variables, is there a guarantee that at least one of them won't let me down?</p> <p>Or, if is there better, fixed field computation algorithm there, please tell me (the fixed field algorithm for number field doesn't work straight forward because it could be that $k(x) \not \subseteq k(x^\sigma)$ but one can fixed this if they change the underlying rational function field to the latter, under condition that $x^\sigma$ doesn't fall into $k$, which was my problem to begin with).</p> <p><strong>Long story short, please tell me what is the fixed field algorithm for automorphisms of (global) function field, that normal people use?</strong></p> <p>Thanks a lot</p> <p>post scriptum: I ran into this theorem stated in <a href="http://arxiv.org/abs/0805.2331v1" rel="nofollow">link text</a> with no proof or reference (beside that Dr. Peter Muller suggested it to the authers (whoever he is)),</p> <p>[knowing that one can embed a group of automorphisms of rational function field into the field] Let $G = {g_1, . . . , g_m} \subseteq K(x)$ be a finite group. Let $P(t) = \prod^{m}_1 (t−g_i) ∈ K(x)[t]$. Then any non–constant coefficient of $P(t)$ generates $F^G$.</p> <p>Beside the fact that without having the proof it's hard to generalize it to the nonrational case, it also doesn't guarantee that it doesn't happen that all coeffients of $P(t)$ are constant. In any case, I thought it might help the person who's going to help me ;)</p> <p>postquam post scriptum: I pasted the "fixed field" functions (for number fields) from both Magma and Pari, here:<a href="http://everramified.wordpress.com/2012/01/08/fixed-field-computation-magma-vs-pari/" rel="nofollow">link text</a>. I see that Magma basically is doing the same thing as I guessed, computing lots of symmetric polynomials and adding them to the base field till the relative degree is the size of the subgroup. For PARI, I don't understand what's the significance of "fixedfieldorbits" and "vandermondeinversemod". I thought It might be helpful. They both lack the function to compute the fixed field of a function field. </p> <p>Follow-up on @paul garrett's proposed solution to Stichtenoth's problem.</p> <p>If I understood the proposed method to generate the generator of $F_q(x)^{Aut(F_q(x))}$ correctly, following (sage) code should be able to generate it:</p> <pre><code>kx.&lt;x&gt; = FunctionField(FiniteField(q)) w = GL2q(Matrix([[0,1],[1,0]])) Ns = [GL2q(Matrix([[1,n],[0,1]])) for n in range(0,q)] invElm = (x^q - x)^(q-1) t = invElm; for n in Ns: ninvElm = PGLAction(PGL2GL, GL2PGL.Image(n*w), invElm); t += ninvElm print t </code></pre> <p>Unfortunately, the result is always $(x^q-x)^{(q-1)}$ because summing up over n*w is always zero. Unless, I chose the wrong set of automorphism to apply (this is image of identity plus sum of images of n*w for n =0,..,q-1). </p> <p>There is another part to that question (that wasn't hard to solved) before asking for finding t. It's to find the ramification locus of $F_q(x)^{Aut(F_q(x))}$ and to prove that all places of deg 2 are conjugates. It probably helps. </p> <p>But, anyway, my question is not the Stichtenoth's question, I just brought-up it as an example that my problem isn't trivial. </p> http://mathoverflow.net/questions/84993/computing-the-fixed-field-of-an-automorphism-of-a-function-field/85140#85140 Answer by paul garrett for Computing the fixed field of an automorphism of a function field paul garrett 2012-01-07T17:19:10Z 2012-01-12T13:38:23Z <p>The question about fixed elements of a finite group $G$ of automorphisms of a field $k$ has a reasonable answer, by Galois theory: for any $\alpha\in k$, the coefficients of $P(t)=\prod_{\sigma\in G} (t-\sigma(\alpha))$ are in the fixed field of $G$. Since $P(\alpha)=0$, certainly $\alpha$ is of degree at most the degree of $P$ over the fixed field of $G$. Thus, for example, if all the coefficients (the elementary symmetric polynomials) were to vanish, $\alpha=0$. Or, for $\alpha=x\in \mathbb F_q(x)$, if all the coefficients were constant, then $x$ would be of finite degree over $\mathbb F_q$, which is not so.</p> <p>The specific question about the fixed field of $G=PGL_2(\mathbb F_q)$ on $k=\mathbb F_q(x)$ admits some simplification, as follows. One might know for other reasons that the subgroup generated by automorphism $x\rightarrow x+1$ fixes (the Artin-Schreier element) $A=x^q-x$. Certainly $x$ satisfies $x^q-x-A=0$, so the group $N$ of automorphisms $x\rightarrow x+\ell$ (with $\ell\in \mathbb F_q$) is the Galois group of the extension $\mathbb F_q(x)/\mathbb F_q(A)$. The multiplications $x\rightarrow \beta\cdot x$ with $\beta\in \mathbb F_q^\times$ fix $B=A^{q-1}=(x^q-x)^{q-1}$. Let $P$ be the upper-triangular subgroup in $G$, generated by $N$ and multiplications, and $w$ the anti-diagonal $1's$ matrix (=the long Weyl element). Then the (Bruhat) decomposition $G=P\cup NwP$ shows that $G/P$ has representatives $1$ and $nw$ for $n\in N$. I think <em>summing</em> $(x^q-x)^{q-1}$ over these automorphisms visibly gives a non-zero, non-constant element fixed under $G$. </p> <p>Further edit in respons to @Syd Lavasani's questions/comments: I don't know a story to tell to <em>find</em> the Artin-Schreier construction, but it is not hard to explain why/what purpose it fulfills. Namely, in characteristic $p>0$, abelian extensions of degree $p$ (obviously) cannot be given by taking $p$th roots... What, then? The Artin-Schreier equations $X^p-X+a=0$. The $X^{q-1}-a=0$ is a "Kummer equation", since the groundfield $\mathbb F_q$ contains $(q-1)$th roots of unity, and is the way to obtain cyclic Galois extensions of this degree. (The history of taking roots to obtain cyclic extensions is centuries old...)</p> <p>The up-side is that these considerations (the Artin-Schreier and Kummer) still apply in <em>arbitrary</em> fields of char $p>0$ containing $\mathbb F_q$. Beyond that, all I'd think to try would be some basic repn theory of whatever groups you have in hand (such as $PGL_2(\mathbb F_q)$), although when the characteristic divides the group order things will not necessarily be straightforward (loss of semi-simplicity).</p> <p>Further edit, in response to @SydLavasani's further comment/question about the utility of some sort of repn theory here. For $K/k$ cyclic of degree $n$, when $k$ contains the $n\th$ roots of unity, and char $k$ not dividing $n$, then $K$ as repn space for the cyclic group decomposes as a direct sum of one-dimensional irreducibles, each of which is some "multiply-by-$\zeta_n$" where $\zeta_n$ is an $n$-th root of unity. (Note, these are all the irreducibles, and by assumption they are definable over $k$.) Galois theory shows that this decomposition must actually be the sum over all such, each occurring exactly once. This suggests a form of the conclusion of "Kummer theory", namely, that there is an element generating the extension whose $n$\th power is in the base field, whence the $X^n-a$.</p> <p>I have not thought enough about positive-characteristic repn theory to give an analogous story for the Artin-Schreier polynomial, but it would not surprise me if someone else has...</p> http://mathoverflow.net/questions/84993/computing-the-fixed-field-of-an-automorphism-of-a-function-field/86189#86189 Answer by Syed for Computing the fixed field of an automorphism of a function field Syed 2012-01-20T10:10:21Z 2012-01-20T10:10:21Z <p><a href="http://math.ucalgary.ca/profiles/colin-weir" rel="nofollow">Colin Weir</a>, suggested the following algorithm to solve the problem in non-rational case, I thought for the sake of others who probably have the same question, I'll post it, here:</p> <p>Suppose that $\sigma$ is an automorphism of $k(x,y)$. Using above theorem we can find a $x^\sigma$ such that $k(x^\sigma) = k(x)^{\sigma}$. Now, we can re-compute $k(x,y)$ as $k(x^\sigma, y)$. Using degree argument, now one can easily prove that $k(x^\sigma)[\textrm{All elementary symmetric polynomials in } \{y, \sigma(y), \sigma^2(y),...,\sigma^{d-1}(y)\}]$ is equal to $k(x^\sigma, y)^\sigma$. In practice, you add these symmetric polynomials one by one, till your tower reaches the desirable degree. </p>
2,855
9,905
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.359375
3
CC-MAIN-2013-20
latest
en
0.87136
http://www.ck12.org/geometry/Area-of-Rectangles-Squares-Parallelograms/?difficulty=basic
1,448,951,253,000,000,000
text/html
crawl-data/CC-MAIN-2015-48/segments/1448398464536.35/warc/CC-MAIN-20151124205424-00252-ip-10-71-132-137.ec2.internal.warc.gz
356,549,156
15,479
<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" /> # Area of Rectangles, Squares, Parallelograms ## Rectangles, parallelograms, trapezoids Levels are CK-12's student achievement levels. Basic Students matched to this level have a partial mastery of prerequisite knowledge and skills fundamental for proficient work. At Grade (Proficient) Students matched to this level have demonstrated competency over challenging subject matter, including subject matter knowledge, application of such knowledge to real-world situations, and analytical skills appropriate to subject matter. Advanced Students matched to this level are ready for material that requires superior performance and mastery. • Video ## Determine the Area of a Rectangle Involving Whole Numbers by CK-12 //basic Provides an example of how to determine the area of a rectangle involving whole numbers. 0 • Video ## Basic Area and Perimeter of Squares and Rectangles - Overview by CK-12 //basic Overview 0 • Video ## Word Problems - Overview by CK-12 //basic Overview 0 • Video ## Basic Area and Perimeter of Squares and Rectangles - Example 1 by CK-12 //basic Area and Perimeter of Square and Rectangle 0 • Video ## Word Problems - Example 1 by CK-12 //basic Word Problems - Area 0
318
1,345
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.203125
3
CC-MAIN-2015-48
longest
en
0.821718
https://fr.maplesoft.com/support/help/errors/view.aspx?path=Student/SetDefault&L=F
1,685,839,173,000,000,000
text/html
crawl-data/CC-MAIN-2023-23/segments/1685224649348.41/warc/CC-MAIN-20230603233121-20230604023121-00121.warc.gz
304,502,225
34,238
SetDefault - Maple Help Student SetDefault set defaults for parameters Calling Sequence SetDefault(opts) Parameters opts - one or more arguments of the form option = value or option Description • The SetDefault(opts) command sets the default value of the corresponding options for use in Student package routines.  More than one such option setting can be given in the command invocation.  This command can also be called as SetDefaults('opts'). If given just in the form option the current value of the corresponding option is returned. The options which can be set or queries this way are: Option name Type Purpose hardwarefloats truefalse or deduced whether to use hardware in float computations conjugate truefalse whether to treat variables as real (false) or complex (true) infodigits posint number of digits to display in messages associated with plots • The return value from a call to SetDefault is an expression sequence showing the current value of each option given in the argument form option and/or the previous value of each option given in the form option = value.  This allows you to save and restore the prior state when temporarily modifying the default setting of one or more options. • If no arguments are given, so the invocation is just as SetDefault(), an expression sequence giving the current values of all options settable through this means is returned. • The conjugate option can also be locally adjusted by providing a conjugate parameter in the calling sequence to any package function which accepts it. Examples > $\mathrm{with}\left(\mathrm{Student}\right):$ > $\mathrm{SetDefault}\left(\right)$ ${\mathrm{conjugate}}{=}{\mathrm{false}}{,}{\mathrm{infodigits}}{=}{4}{,}{\mathrm{hardwarefloats}}{=}{\mathrm{false}}$ (1) > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$ > $A≔⟨a,b⟩$ ${A}{≔}\left[\begin{array}{c}{a}\\ {b}\end{array}\right]$ (2) > $\mathrm{Norm}\left(A,2\right)$ $\sqrt{{{a}}^{{2}}{+}{{b}}^{{2}}}$ (3) > $\mathrm{Norm}\left(A,2,\mathrm{conjugate}=\mathrm{true}\right)$ $\sqrt{{\left|{a}\right|}^{{2}}{+}{\left|{b}\right|}^{{2}}}$ (4) > $\mathrm{SetDefault}\left(\mathrm{conjugate}\right)$ ${\mathrm{conjugate}}{=}{\mathrm{false}}$ (5) > $\mathrm{SetDefault}\left(\mathrm{conjugate}=\mathrm{true}\right)$ ${\mathrm{conjugate}}{=}{\mathrm{false}}$ (6) > $\mathrm{Norm}\left(A,2\right)$ $\sqrt{{\left|{a}\right|}^{{2}}{+}{\left|{b}\right|}^{{2}}}$ (7) > $v≔⟨1.37,3.4⟩:$ > $w≔⟨5.2,-1.1⟩:$ > $\mathrm{.}\left(v,w\right)$ ${3.38400000000000034}$ (8) > $\mathrm{.}\left(A,w\right)$ ${5.2}{}\stackrel{{&conjugate0;}}{{a}}{-}{1.1}{}\stackrel{{&conjugate0;}}{{b}}$ (9) > $d≔\mathrm{SetDefault}\left(\mathrm{conjugate}=\mathrm{false},\mathrm{hardwarefloats}=\mathrm{deduced}\right)$ ${d}{≔}{\mathrm{conjugate}}{=}{\mathrm{true}}{,}{\mathrm{hardwarefloats}}{=}{\mathrm{false}}$ (10) > $\mathrm{.}\left(v,w\right)$ ${3.38400000000000034}$ (11) > $\mathrm{.}\left(A,w\right)$ ${5.2}{}{a}{-}{1.1}{}{b}$ (12) > $\mathrm{SetDefault}\left(d,\mathrm{infodigits}=3\right)$ ${\mathrm{conjugate}}{=}{\mathrm{false}}{,}{\mathrm{hardwarefloats}}{=}{\mathrm{deduced}}{,}{\mathrm{infodigits}}{=}{4}$ (13) > ${\mathrm{infolevel}}_{{\mathrm{Student}}_{\mathrm{LinearAlgebra}}}≔1:$ > $\mathrm{EigenPlot}\left(⟨⟨2,3⟩|⟨2,-1⟩⟩\right)$ > $\mathrm{restart}$ > $\mathrm{with}\left(\mathrm{Student}\right):$ > $\mathrm{with}\left(\mathrm{MultivariateCalculus}\right):$ > $\mathrm{.}\left(⟨a,b⟩,⟨c,d⟩\right)$ ${a}{}{c}{+}{b}{}{d}$ (14) > .(, , conjugate=true); $\stackrel{{&conjugate0;}}{{a}}{}{c}{+}\stackrel{{&conjugate0;}}{{b}}{}{d}$ (15) > $\mathrm{SetDefault}\left(\mathrm{conjugate}=\mathrm{true}\right):$ > $\mathrm{.}\left(⟨a,b⟩,⟨c,d⟩\right)$ $\stackrel{{&conjugate0;}}{{a}}{}{c}{+}\stackrel{{&conjugate0;}}{{b}}{}{d}$ (16)
1,281
3,809
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 41, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.90625
3
CC-MAIN-2023-23
longest
en
0.508722
http://us.metamath.org/nfeuni/ralab.html
1,652,913,581,000,000,000
text/html
crawl-data/CC-MAIN-2022-21/segments/1652662522556.18/warc/CC-MAIN-20220518215138-20220519005138-00122.warc.gz
58,745,931
3,498
New Foundations Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  NFE Home  >  Th. List  >  ralab GIF version Theorem ralab 2997 Description: Universal quantification over a class abstraction. (Contributed by Jeff Madsen, 10-Jun-2010.) Hypothesis Ref Expression ralab.1 (y = x → (φψ)) Assertion Ref Expression ralab (x {y φ}χx(ψχ)) Distinct variable groups:   x,y   ψ,y Allowed substitution hints:   φ(x,y)   ψ(x)   χ(x,y) Proof of Theorem ralab StepHypRef Expression 1 df-ral 2619 . 2 (x {y φ}χx(x {y φ} → χ)) 2 vex 2862 . . . . 5 x V 3 ralab.1 . . . . 5 (y = x → (φψ)) 42, 3elab 2985 . . . 4 (x {y φ} ↔ ψ) 54imbi1i 315 . . 3 ((x {y φ} → χ) ↔ (ψχ)) 65albii 1566 . 2 (x(x {y φ} → χ) ↔ x(ψχ)) 71, 6bitri 240 1 (x {y φ}χx(ψχ)) Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 176  ∀wal 1540   ∈ wcel 1710  {cab 2339  ∀wral 2614 This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1546  ax-5 1557  ax-17 1616  ax-9 1654  ax-8 1675  ax-6 1729  ax-7 1734  ax-11 1746  ax-12 1925  ax-ext 2334 This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-tru 1319  df-ex 1542  df-nf 1545  df-sb 1649  df-clab 2340  df-cleq 2346  df-clel 2349  df-nfc 2478  df-ral 2619  df-v 2861 This theorem is referenced by:  nnadjoinpw  4521  funcnvuni  5161  frds  5935 Copyright terms: Public domain W3C validator
633
1,373
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.125
3
CC-MAIN-2022-21
latest
en
0.236833
http://oeis.org/A105612
1,606,572,630,000,000,000
text/html
crawl-data/CC-MAIN-2020-50/segments/1606141195656.78/warc/CC-MAIN-20201128125557-20201128155557-00490.warc.gz
71,865,165
4,777
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!) A105612 Number of nonzero quadratic residues (mod n) (cf. A000224). 7 0, 1, 1, 1, 2, 3, 3, 2, 3, 5, 5, 3, 6, 7, 5, 3, 8, 7, 9, 5, 7, 11, 11, 5, 10, 13, 10, 7, 14, 11, 15, 6, 11, 17, 11, 7, 18, 19, 13, 8, 20, 15, 21, 11, 11, 23, 23, 7, 21, 21, 17, 13, 26, 21, 17, 11, 19, 29, 29, 11, 30, 31, 15, 11, 20, 23, 33, 17, 23, 23, 35, 11, 36, 37, 21, 19, 23 (list; graph; refs; listen; history; text; internal format) OFFSET 1,5 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 S. R. Finch and Pascal Sebah, Squares and Cubes Modulo n, arXiv:math/0604465 [math.NT], 2006-2016. E. J. F. Primrose, The number of quadratic residues mod m, Math. Gaz. v. 61 (1977) n. 415, 60-61. W. D. Stangl, Counting Squares in Z_n, Mathematics Magazine, pp. 285-289, Vol. 69 No. 4 (October 1996). Eric Weisstein's World of Mathematics, Quadratic Residue FORMULA a(n) = A000224(n) - 1. MATHEMATICA a[n_]:=Count[Union[Mod[Range[Floor[n/2]]^2, n]], _?Positive]; Table[a[n], {n, 1, 80}] (* Jean-François Alcover,  Feb 09 2011 *) PROG (PARI) /* based on code by Franklin T. Adams-Watters, see A000224 */ A105612(n)=local(v, i); v=vector(n, i, 0); for(i=0, floor(n/2), v[i^2%n+1]=1); sum(i=2, n, v[i]) \\ Michael B. Porter, May 04 2010 (PARI) a(n)=my(f=factor(n)); prod(i=1, #f[, 1], if(f[i, 1]==2, 2^f[1, 2]\6+2, f[i, 1]^(f[i, 2]+1)\(2*f[i, 1]+2)+1))-1 \\ Charles R Greathouse IV, Sep 10 2013 (Haskell) a105612 = (subtract 1) . a000224  -- Reinhard Zumkeller, Aug 01 2012 CROSSREFS Sequence in context: A046677 A283104 A109747 * A141744 A089783 A302939 Adjacent sequences:  A105609 A105610 A105611 * A105613 A105614 A105615 KEYWORD nonn AUTHOR Eric W. Weisstein, Apr 15 2005 STATUS approved Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent The OEIS Community | Maintained by The OEIS Foundation Inc. Last modified November 28 09:10 EST 2020. Contains 338702 sequences. (Running on oeis4.)
964
2,423
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3
3
CC-MAIN-2020-50
latest
en
0.703757
https://www.unitconverters.net/weight-and-mass/tonne-to-kip.htm
1,718,355,166,000,000,000
text/html
crawl-data/CC-MAIN-2024-26/segments/1718198861545.42/warc/CC-MAIN-20240614075213-20240614105213-00280.warc.gz
962,487,293
3,762
Home / Weight and Mass Conversion / Convert Tonne to Kip # Convert Tonne to Kip Please provide values below to convert tonne [t] to kip, or vice versa. From: tonne To: kip ### Tonne to Kip Conversion Table Tonne [t]Kip 0.01 t0.0220462262 kip 0.1 t0.2204622622 kip 1 t2.2046226218 kip 2 t4.4092452437 kip 3 t6.6138678655 kip 5 t11.0231131092 kip 10 t22.0462262185 kip 20 t44.092452437 kip 50 t110.2311310924 kip 100 t220.4622621849 kip 1000 t2204.6226218488 kip ### How to Convert Tonne to Kip 1 t = 2.2046226218 kip 1 kip = 0.45359237 t Example: convert 15 t to kip: 15 t = 15 × 2.2046226218 kip = 33.0693393277 kip
264
624
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.390625
3
CC-MAIN-2024-26
latest
en
0.368032
https://zniejednegogarnka.pl/conveyor/5gdwoe8y/troughing.html
1,606,997,286,000,000,000
text/html
crawl-data/CC-MAIN-2020-50/segments/1606141727627.70/warc/CC-MAIN-20201203094119-20201203124119-00276.warc.gz
944,160,973
8,397
Hi, welcome to visit ! Get a Quote 1. home 2. Troughing Idler Belt Conveyor Design Procedure # Troughing Idler Belt Conveyor Design Procedure The number of transition idlers depends on the trough angle of the conveyor In the case of a 45 degree trough angle 2 or 3 transition idler sets would be used at either end of the conveyor These idler sets would have incrementally greater trough angles of say 15 20 and 35 degrees through the transition zone leading up to 45 degrees Get a QuoteOnline Message • 40-Year Qualified Brand Founded in the 1970s, it has a history of more than 40 years. • 350,000 Ping Workshop covering an area of 350,000 square meters • 160 Countries production and sales in more than 160 countries • ### Smalis Conveyors Conveyor Belt Tracking Training Carrying idler training the belt with the troughing idlers is accomplished in two ways shifting the idler axis with respect to the path of the belt commonly known as quotknocking idlersquot is effective where the entire belt runs to one side along some portion of the conveyor or radial stacker • ### Belt Conveyors For Bulk Materials Fifth Edition Chapter 6 The belt and the idler rolls can be calculated by using the multiplying factor k x k x is a force in lbsft of conveyor length to rotate the idler rolls carrying and return and to cover the sliding resistance of the belt on the idler rolls the k x value required to rotate the idlers is calculated using equation 3 • ### The 4 Most Common Idlers Dyna Engineering Blog Trough idlers trough idlers are the most common type of carry idler which are typically designed with 3 or 5 idler rollers and are fitted to the carryside of the conveyor belt the 5roll idler offers more uniform cross section resulting in a greater net carrying capacity the 3roll design has a centre idler roll and wing idlers on either side • ### Selection Of Idler Roller Conveyor Hic India Though minimum transition distances 10 belt width to 9b as per trough depth and rated tension for idler adjacent to terminal pulleys need to be followed if using steeper troughing angles and higher transverse flexibility fabric carcass design conveyor belting by opting very high tensile rating belt with lesser number of plies • ### Steel Idlers Transco Industries Inc Introducing federal track star transco has changed the design of conveyor idlers with its new patented troughing and return idler frames you can now safely and effectively track your conveyor system while it is running probably the first significant advancement in idler design • ### Tracmount Idler Belt Cleaners A major expansion at a gold mine included an innovative idler design developed by martin engineering in conveyor transfer areas the mines highcapacity conveyor system faces continuous loads and heavy impact from 8inch lumps of copper ore to withstand this impact martin engineering designed a special belt support system • ### Troughing Belt Idlers Solidworks Troughing belt idlers solidworks mining equipment troughing idler belt conveyor design operation this catalog represents over five decades of rex belt conveyor idler gold mining equipment adjustable trough sets returns canning conveyor mining quarrying home conveyor rollers adjustable trough sets returns belt guide rollers and steering idlers • ### Belt Conveyor Idlers Syntronmh For over 130 years syntron material handling smh and the linkbelt174 company have designed and manufactured belt conveyor parts including conveyor idlers rollers and components that set the standard of excellence for bulk material handling throughout the world proven engineering quality products prompt shipment and after the sale service are our trademarks • ### Contact Us Conveyor Rollers Conveyor Idler Carrying Cangzhou idler conveyor machinery coltd tel 8603176390625 fax8603176390625 troughing impact idler tags belt conveyor components conveyor idler conveyor pulley conveyor roller conveyor roller parts roller making machine successful case • ### How To Design Energy Efficient Belt Conveyors Bulkblog Apr 01 2020nbsp018332din 22123 conveyor belts indentation rolling resistances of conveyor belts related to beltwidth requirements testing 2012 sans 13133 conveyor belt idlers part 3 performance specifications for troughed belt conveyor idlers for idler roller rotational speeds of • ### Joy Underground Conveyor Systems Brochure 1067 mm 42 belt width and wider troughing rolls hxf40 super highcapacity idler hxf 40 series idlers are offered with our inline design or with our orc frame design from 60 to • ### Goodmanhewitt Products Complete Conveyor Solutions 20 deg troughing idler b420tbwb 4quot diameter roll 20 deg troughing idler b520tbwb 5quot diameter roll 35 deg troughing idler b435tbwb 4quot diameter roll 35 deg troughing idler b535tbwb 5quot diameter roll belt width 9quot for standard base belt width 15quot for wide base wide base shown standard base shown 9 16 x 11 2 lg center slot for • ### Conveyor Idlers Carrying Idlers And Return Idlers Metso Material spillage can occur when conveyor belts become misaligned strategically placing selftraining idlers along the conveyor keep the belt running true metsos selftrainers are like troughing idlers but with the ability to pivot at the center and are guided by edge rollers which in turn aligns the belt • ### Selfaligning Idler Superior Industries Concave in shape the idlers side guide rollers restrain the belt from running up and over the conveyor in order to lessen the wear on the belt the side guide rollers are made with highgrade urethane that reduces the friction between the idler and belt our selfaligning idlers are available for bidirectional belts • ### Industrial Idler Conveyor Idler Manufacturer From Used for conveying bulkheavy materials the offered troughing idler is precisely engineered by using latest machinery the innovative design of the troughing idler prevents the lifting of the conveyor belt which ensures smooth functioning of a conveyor system features corrosion resistant impeccable resistant and dimensional accuracy • ### What Is The Sealing Design Of Belt Conveyor Idlers Used In The performance of conveyor idlers depends on the sealing structure of idlers a good sealing structure plays a vital role in the performance of idlers and even the whole conveyor system grease lubrication is mainly used for the idler of belt conveyor used in coal mine the idler is mounted on the radial end of the rotating shaft • ### Troughing Idler Belt Conveyor Design Procedure Troughing idler belt conveyor design procedure ha200 idlers design manual mining conveyor idlers that reduce the noise generated from a conveyor systemhe width of belt that the idler or frame is designed to carryace widthhe face width of the rollerrough angle the trough angle of the frame or idler chain conveyor procedure get price • ### The Significance Of The Design Of Conveyor Idler Spacing He belt conveyor is composed of the driving pulleybend pulleyidlersdriving device and the conveyor belt and so onthe idler is the most widely used and distributed component of belt conveyorgenerally distributed throughout the whole belt conveyorand its mass accounts for about 13 of the whole belt conveyorthereforethe reasonable spacing of idlers is set can play a good supporting role • ### 45 Deg Troughing Idler Frames Bunch Crusher Unit Troughing idler belt conveyor design procedure ha200 idlers design manual mining conveyor idlers that reduce the noise generated from a conveyor systemthe width of belt that the idler or frame is designed to carrythe face width of the rollertrough • ### Belt Conveyor Design Procedure Crusherasia Troughing idler belt conveyor design procedure idler selection procedure belt maintenance group inc bmg pdf for good conveyor design sie belt to handle 80 of peak the troughing idler selection procedure for calculated idler for belt conveyor idlers live chat is standard for vibration of belt conveyor gallery • ### Belt Conveyors For Bulk Materials Calculations By Cema Load ratings for cema idlers lbs notes 1 troughing idler load ratings tables 57510 are for three equal length rolls 2 load ratings also apply for impact rolls 3 troughing idler load ratings are based on a load distribution of 70 on center roll and 15 on each end roll for all trough angles 4 • ### Conveyor Idler Set Troughing Carrying Idler Troughing Troughing impact idler are used under loading points where material impact lump sizedensity height could damage the belt if no cushion impact idler fitted with rubber rings made from natural synthetic neoprene material the fixing arrangement and dimension of rings are suitably design for easy replacement and interchange ability which protect the belt by absorbing impact at loading • ### Belt Conveyors Design Operation And The types of idler to be used on conveyors are transition troughing impact and return idlers at this time there is no satisfactory training idler available so they should be avoided 442 troughing idler spacing two types of troughing idler are used frequently fixed and suspended roll • ### Conveyor Idlers Conveyor Idler Carriying Manufacturer Garland idler where garland idler sets comprise 2 rolls 3 rolls amp 5 rolls for carrying side a support frame is required which supports the idler pair and attaches the idlers to the conveyor frame for return side 2roll design forms the return belt into a v trough and these return idler sets are referred to a v return idlers • ### Design Considerations For Conveyor Belt Idlers Bright The idlers are an important part of a belt conveyor system they provide stability to the conveyed materials there are mainly three types of idles used in the industry namely flat idlers trough idlers and garland idlers in this article we will discuss only the flat type belt conveyor idler design • ### Design Procedure Of Troughed Conveyor Design procedure of troughed conveyor design procedure of troughed conveyor up to 8000 tph standard troughed belt conveyors are comprised of conveyor belting that rides on heavyduty troughed idlers idlers range in angles from 2017645176 and are securely mounted to a structural steel frame • ### Trough Idler Conveyors Idler Conveyors Fluent Conveyors Trough idlers are sets of rollers that are laid out such that they shape the belt into a v this is to keep material contained on the belt and reduce contact between the belt and the surface that it rides on increasing belt life and decreasing friction • ### Equal Troughing Idlers Precision Pulley Amp Idler Ppi troughing idlers are manufactured to meet or exceed all conveyor equipment manufacturers association cema load standards our innovative frame design combined with idler rolls equipped with a proven seal system ensures long maintenance free service in the most demanding applications • ### Rex Conveyor Idlers Rexnord Support the belt in the section of the conveyor that transports the material these idlers may be flat or troughed to shape the belt to prevent spillage and are available in 20176 35176 and 45176 trough angles with equal or unequal roll lengths normal spacing is 3 to 5 feet impact idlers troughing or flat prevent damage to the belt at the loading point these idlers may be troughing or flat • ### Cema Rated Idlers Superior Industries Our idlers are equipped with our spinguard174 seal technology that lengthens idler life and provides protection from contaminants and material buildup from polluting the bearing to accommodate the needs of your specific conveying system we manufacture a number of idler options including 13 troughing styles and nine return styles RECENT CAUSES
2,435
11,690
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.671875
3
CC-MAIN-2020-50
longest
en
0.887162
https://greenemath.com/College_Algebra/144/Rational-Zeros-TheoremLesson.html
1,708,516,425,000,000,000
text/html
crawl-data/CC-MAIN-2024-10/segments/1707947473472.21/warc/CC-MAIN-20240221102433-20240221132433-00459.warc.gz
299,480,502
5,565
Lesson Objectives • Learn how to use the Rational Zeros Theorem ## How to Find All Possible Rational Zeros Using the Rational Zeros Theorem In this lesson, we will learn how to use the rational zeros theorem, which is also known as the rational roots theorem to find all of the possible rational zeros for a polynomial function with integer coefficients. It is very important to understand that the rational zeros theorem is only going to give us possible rational zeros. It will not tell us whether these rational numbers are actual zeros. To determine if the rational numbers are zeros, we can use the factor theorem from the previous lesson. ### Rational Zeros Theorem If p/q is a rational number written in lowest terms (simplified), and if p/q is a zero of f, a polynomial function with integer coefficients, then p is a factor of the constant term and q is a factor of the leading coefficient. $$f(x) = a_nx^n + a_{n - 1}x^{n - 1} + \cdots + a_1x + a_0$$ Where there are only integer coefficients and also (an ≠ 0 and a0 ≠ 0), then every rational zero of f is of the form: $$\frac{p}{q}$$ Where p and q are integers and: • p is a factor of the constant term a0 • q is a factor of the leading coefficient an $$\text{Possible Rational Zeros of f} = \frac{\text{factors of the constant term}}{\text{factors of the leading coefficient}}$$ We will show a proof of the theorem at the end of the tutorial; for now, let's look at some examples. Example #1: Find all possible rational zeros. $$f(x)=3x^3 + x^2 - 3x - 1$$ To build a list, let's think about all the possible combinations of p/q that can be made. We know that p is a factor of the constant term, which in this case is -1. The factors of -1 are -1 and +1 only. Additionally, we know that q is a factor of the leading coefficient, which is 3 in this case. The factors of 3 are -1, 1, -3, and 3. Let's set up our possible rational zeros. Let's start with a p-value of -1 and go through all the q-values (-1, 1, -3, and 3): $$\frac{-1}{-1} = 1$$ $$\frac{-1}{1} = -1$$ $$\frac{-1}{-3} = \frac{1}{3}$$ $$\frac{-1}{3} = -\frac{1}{3}$$ Using the other p-value of 1 will only produce duplicates: $$\frac{1}{-1} = -1$$ $$\frac{1}{1} = 1$$ $$\frac{1}{-3} = -\frac{1}{3}$$ $$\frac{1}{3} = \frac{1}{3}$$ The quicker way to do this is to just use the plus or minus symbol ("±") in each case: $$\frac{\pm 1}{\pm 1} = \pm 1$$ $$\frac{\pm 1}{\pm 3} = \pm \frac{1}{3}$$ The possible rational zeros, p/q, are: $$\pm 1, \pm \frac{1}{3}$$ Example #2: Find all possible rational zeros. $$f(x)=5x^3 - 21x^2 - 6x + 2$$ To build a list, let's think about all the possible combinations of p/q that can be made. We know that p is a factor of the constant term, which in this case is 2. The factors of 2 are -1, 1, -2, and 2. Additionally, we know that q is a factor of the leading coefficient, which is 5 in this case. The factors of 5 are -1, 1, -5, and 5. Let's set up our possible rational zeros. Let's start with the p-values of ±1 and go through all the q-values (±1 and ±5): $$\frac{\pm 1}{\pm 1} = \pm 1$$ $$\frac{\pm 1}{\pm 5} = \pm \frac{1}{5}$$ Now, we will use the p-values of ±2 and go through all the q-values (±1 and ±5): $$\frac{\pm 2}{\pm 1} = \pm 2$$ $$\frac{\pm 2}{\pm 5} = \pm \frac{2}{5}$$ The possible rational zeros, p/q, are: $$\pm 1, \pm \frac{1}{5}, \pm 2, \pm \frac{2}{5}$$ Example #3: Find all possible rational zeros. $$f(x)=x^3 - \frac{4}{3}x^2 - \frac{17}{3}x + 2$$ In this case, we can't immediately use the rational zeros theorem since it only applies to a polynomial function with integer coefficients. We know that a zero occurs when f(x) = 0. $$0=x^3 - \frac{4}{3}x^2 - \frac{17}{3}x + 2$$ Multiply both sides by 3, the lcd: $$0 \cdot 3 = 3\left(x^3 - \frac{4}{3}x^2 - \frac{17}{3}x + 2\right)$$ $$0 = 3x^3 - 4x^2 - 17x + 6$$ The right side of this equation is a polynomial with integer coefficients and has the same rational zeros since multiplying both sides of an equation by the same non-zero number does not change the solution set. Let's rename this polynomial function as h(x): $$h(x) = 3x^3 - 4x^2 - 17x + 6$$ We can state that any rational zeros of f(x) will also be rational zeros of h(x). It's important to understand that while we did create a new function h(x), which is 3f(x), the rational zeros will be the same. Here, p, the constant term is 6, which has factors of -1, 1, -2, 2, -3, 3, -6, and 6. Then q, the leading coefficient is 3, which has factors of -1, 1, -3, and 3. Let's set up our possible rational zeros. $$\frac{\pm 1}{\pm 1} = \pm 1$$ $$\frac{\pm 1}{\pm 3} = \pm \frac{1}{3}$$ $$\frac{\pm 2}{\pm 1} = \pm 2$$ $$\frac{\pm 2}{\pm 3} = \pm \frac{2}{3}$$ $$\frac{\pm 3}{\pm 1} = \pm 3$$ $$\frac{\pm 3}{\pm 3} = \pm 1$$ $$\frac{\pm 6}{\pm 1} = \pm 6$$ $$\frac{\pm 6}{\pm 3} = \pm 2$$ Once we remove the duplicates, we can state the possible rational zeros, p/q, are: $$\pm 1, \pm \frac{1}{3}, \pm 2, \pm \frac{2}{3}, \pm 3, \pm 6$$ ### Proof for the Rational Zeros Theorem Some rules of exponents we will need are listed below. Here, the bases a and b are real numbers, and the exponents, m and n are integers. $$\left(\frac{a}{b}\right)^m = \frac{a^m}{b^m}, b ≠ 0$$ $$\frac{a^m}{a^n} = a^{m - n}, a ≠ 0$$ $$a^m \cdot a^n = a^{m + n}$$ Again, we start with a polynomial function f, with the same requirements listed above. $$f(x) = a_nx^n + a_{n - 1}x^{n - 1} + \cdots + a_1x + a_0$$ Plug in p/q for x: $$f\left(\frac{p}{q}\right) = a_n\left(\frac{p}{q}\right)^n + a_{n - 1}\left(\frac{p}{q}\right)^{n - 1} + \cdots + a_1\left(\frac{p}{q}\right) + a_0$$ Since p/q is a rational zero in lowest terms: $$f\left(\frac{p}{q}\right) = 0$$ We can use this to replace f(p/q) with 0: $$a_n\left(\frac{p}{q}\right)^n + a_{n - 1}\left(\frac{p}{q}\right)^{n - 1} + \cdots + a_1\left(\frac{p}{q}\right) + a_0 = 0$$ Rewrite using the rules of exponents: $$a_n\left(\frac{p^n}{q^n}\right) + a_{n - 1}\left(\frac{p^{n - 1}}{q^{n - 1}}\right) + \cdots + a_1\left(\frac{p}{q}\right) + a_0 = 0$$ Multiply both sides by qn: $$a_n \cdot \frac{p^n}{q^n} \cdot q^n + a_{n - 1} \cdot \frac{p^{n - 1}}{q^{n - 1}} \cdot q^n + \cdots + a_1 \cdot \frac{p}{q} \cdot q^n + a_0 \cdot q^n = 0 \cdot q^n$$ Simplify: $$\require{cancel}a_n \cdot \frac{p^n}{\cancel{q^n}} \cdot \cancel{q^n} + a_{n - 1} \cdot p^{n - 1} \cdot \frac{q^n}{q^{n - 1}} + \cdots + a_1 \cdot p \cdot \frac{q^n}{q^1} + a_0 \cdot q^n = 0$$ $$a_n \cdot p^n + a_{n - 1} \cdot p^{n - 1} \cdot q^{n-(n - 1)} + \cdots + a_1 \cdot p \cdot q^{n - 1} + a_0 \cdot q^n = 0$$ $$a_np^n + a_{n - 1}p^{n - 1}q + \cdots + a_1pq^{n - 1} + a_0q^n = 0$$ Subtract a0qn away from both sides: $$a_np^n + a_{n - 1}p^{n - 1}q + \cdots + a_1pq^{n - 1} + a_0q^n - a_0q^n = 0 - a_0q^n$$ $$a_np^n + a_{n - 1}p^{n - 1}q + \cdots + a_1pq^{n - 1} = - a_0q^n$$ Factor out p from the left side: $$a_n \cdot p^n \cdot \frac{p}{p} + a_{n - 1} \cdot p^{n - 1} \cdot \frac{p}{p} \cdot q + \cdots + a_1 \cdot p \cdot q^{n - 1} = - a_0q^n$$ Note: the p/p, which is 1, has been added in to make the rules of exponents easier to follow. $$p\left(a_n \cdot \frac{p^n}{p^1} + a_{n - 1} \cdot \frac{p^{n - 1}}{p^1} \cdot q + \cdots + a_1 \cdot q^{n - 1}\right) = - a_0q^n$$ $$p\left(a_n p^{n - 1} + a_{n - 1} p^{n - 2} q + \cdots + a_1q^{n - 1}\right) = - a_0q^n$$ Since p is a factor of the left side, it must also be a factor of the right side. We already stated that p/q is simplified, which means that p and q have no common factors other than -1 and 1. This means that p is not a factor of qn, which means it must be a factor of a0. We can show that q is a factor of an in a similar way. $$a_np^n + a_{n - 1}p^{n - 1}q + \cdots + a_1pq^{n - 1} + a_0q^n = 0$$ Subtract anpn away from each side: $$a_{n - 1}p^{n - 1}q + \cdots + a_1pq^{n - 1} + a_0q^n = -a_np^n$$ Factor out q from the left side: $$q\left(a_{n - 1}p^{n - 1} + \cdots + a_1p \cdot q^{n - 2} + a_0 \cdot q^{n - 1}\right) = -a_np^n$$ Since q is a factor of the left side, it must also be a factor of the right side. We already stated that p/q is simplified, which means that p and q have no common factors other than -1 and 1. This means that q is not a factor of pn, which means it must be a factor of an. #### Skills Check: Example #1 Find all possible rational zeros. $$f(x)=2x^3 + x^2 - 5x + 2$$ Please choose the best answer. A $$\pm 1, \pm 2, \pm \frac{1}{2}$$ B $$\pm 0, \pm 1, \pm \frac{1}{2}$$ C $$\pm 7, \pm 3, \pm \frac{1}{2}$$ D $$\pm 2, \pm 1$$ E $$\pm 5, \pm 3$$ Example #2 Find all possible rational zeros. $$f(x)=3x^3 - 13x^2 + 13x - 3$$ Please choose the best answer. A $$\pm 0, \pm 1, \pm 3$$ B $$\pm 0, \pm \frac{1}{3}, \pm \frac{1}{27}$$ C $$\pm 0, \pm 1, \pm 3$$ D $$\pm 1, \pm 3, \pm \frac{1}{3}$$ E $$\pm 1, \pm 5, \pm \frac{1}{3}$$ Example #3 Find all possible rational zeros. $$f(x)= x^3 + 2x^2 - 19x + 22$$ Please choose the best answer. A $$\pm 1, \pm 2, \pm \frac{1}{2}$$ B $$\pm 1, \pm 2, \pm 3, \pm 6$$ C $$\pm 1, \pm 3, \pm \frac{1}{3}, \pm \frac{1}{6}, \pm 6$$ D $$\pm 1, \pm 2, \pm 11, \pm 22$$ E $$\pm 1, \pm 2, \pm 3, \pm \frac{1}{3}, \frac{1}{2}$$ Congrats, Your Score is 100% Better Luck Next Time, Your Score is % Try again?
3,567
9,141
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.84375
5
CC-MAIN-2024-10
latest
en
0.903809
http://jiniqopytevybon.bsaconcordia.com/using-two-points-to-write-an-exponential-equation-7520875208.html
1,540,045,842,000,000,000
text/html
crawl-data/CC-MAIN-2018-43/segments/1539583512836.0/warc/CC-MAIN-20181020142647-20181020164147-00463.warc.gz
191,721,298
4,226
# Using two points to write an exponential equation By taking data and plotting a curve, scientists are in a better position to make predictions. Neither Point on the X-axis If neither x-value is zero, solving the pair of equations is slightly more cumbersome. One Point on the X-axis If one of the x-values -- say x1 -- is 0, the operation becomes very simple. You can substitute this value for b in either equation to get a. From a Pair of Points to a Graph Any point on a two-dimensional graph can be represented by two numbers, which are usually written in the in the form x, ywhere x defines the horizontal distance from the origin and y represents the vertical distance. For example, the point 2, 3 is two units to the right of the y-axis and three units above the x-axis. In general, you have to solve this pair of equations: If neither point has a zero x-value, the process for solving for x and y is a tad more complicated. For example, solving the equation for the points 0, 2 and 2, 4 yields: On the other hand, the point -2, -3 is two units to the left of the y-axis. This yields the following pair of equations: Why Exponential Functions Are Important Many important systems follow exponential patterns of growth and decay. In his example, he chose the pair of points 2, 3 and 4, Taking as the starting point, this gives the pair of points 0, 1. Because the x-value of the first point is zero, we can easily find a. Henochmath walks us through an easy example to clarify this procedure. Plugging this value, along with those of the second point, into the general exponential equation produces 6. Although it takes more than a slide rule to do it, scientists can use this equation to project future population numbers to help politicians in the present to create appropriate policies. How to Find an Exponential Equation With Two Points By Chris Deziel; Updated March 13, If you know two points that fall on a particular exponential curve, you can define the curve by solving the general exponential function using those points. In this form, the math looks a little complicated, but it looks less so after you have done a few examples. Inthe world population was 1. The procedure is easier if the x-value for one of the points is 0, which means the point is on the y-axis. An Example from the Real World Sincehuman population growth has been exponential, and by plotting a growth curve, scientists are in a better position to predict and plan for the future. For example, the number of bacteria in a colony usually increases exponentially, and ambient radiation in the atmosphere following a nuclear event usually decreases exponentially.If the two given points are on the graph of an exponential equation, then they must fit the equation. Substituting the first point into the general equation we get: which simplifies to: 5 = a*b Substituting the second point into the general equation we get: With 5 = a*b and we have a system of two equations with two variables. How to Find Equations for Exponential Functions William Cherry Introduction. After linear functions, the second most important class of functions are what are known as the convenient to write the equation of the line in “slope-intercept” form – that is to write the equation in the form: 0 we plug one of the two points into the. If you know two points that fall on a particular exponential curve, you can define the curve by solving the general exponential function using those points. In practice, this means substituting the points for y and x in the equation y = ab x. Writing Exponential Equations Concept Write Exponential Equations Assessment (Level 4 Example Level 3 Example Level 2 Example Write an equation for the following table X Y 0 4 1 3 What point do all three lines have in common? d. Which line decreases the fastest? Watch video · Writing a linear function of the form f(x)=mx+b and an exponential function of the form g(x)=a⋅rˣ, given a table of values of those functions. If you're seeing this message, it means we're having trouble loading external resources on our website. If you have two points, for example, (2, 6) and (3, 18), how do you find the equation if you know its exponential?
917
4,205
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.375
4
CC-MAIN-2018-43
longest
en
0.910167
https://oeis.org/A352109
1,726,819,083,000,000,000
text/html
crawl-data/CC-MAIN-2024-38/segments/1725700652138.47/warc/CC-MAIN-20240920054402-20240920084402-00122.warc.gz
398,016,061
5,572
The OEIS is supported by the many generous donors to the OEIS Foundation. A352109 Starts of runs of 3 consecutive lazy-tribonacci-Niven numbers (A352107). 11 175, 1183, 2259, 5290, 12969, 21130, 51820, 70629, 78090, 79540, 81818, 129648, 160224, 169234, 180908, 228240, 238574, 249494, 278628, 332891, 376335, 383866, 398650, 399644, 454090, 550380, 565200, 683448, 683604, 694274, 728895, 754390, 782110, 809830, 837550 OFFSET 1,1 EXAMPLE 175 is a term since 175, 176 and 177 are all divisible by the number of terms in their maximal tribonacci representation: k A352103(k) A352104(k) k/A352104(k) --- ---------- ---------- ------------ 175 11111110 7 25 176 11111111 8 22 177 100100100 3 59 MATHEMATICA t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; trib[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; IntegerDigits[Total[2^(s - 1)], 2]]; lazyTriboNivenQ[n_] := Module[{v = trib[n]}, nv = Length[v]; i = 1; While[i <= nv - 3, If[v[[i ;; i + 3]] == {1, 0, 0, 0}, v[[i ;; i + 3]] = {0, 1, 1, 1}; If[i > 3, i -= 4]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, False, Divisible[n, Total[v[[i[[1, 1]] ;; -1]]]]]]; seq[count_, nConsec_] := Module[{tri = lazyTriboNivenQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ tri, c++; AppendTo[s, k - nConsec]]; tri = Join[Rest[tri], {lazyTriboNivenQ[k]}]; k++]; s]; seq[30, 3] CROSSREFS Subsequence of A352107 and A352108. A352110 is a subsequence. Sequence in context: A332047 A186211 A205748 * A349674 A205470 A187420 KEYWORD nonn,base AUTHOR Amiram Eldar, Mar 05 2022 STATUS approved Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents The OEIS Community | Maintained by The OEIS Foundation Inc. Last modified September 20 03:37 EDT 2024. Contains 376016 sequences. (Running on oeis4.)
785
1,993
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.984375
3
CC-MAIN-2024-38
latest
en
0.569235
https://titanlab.org/author/zkchong/page/3/
1,620,797,119,000,000,000
text/html
crawl-data/CC-MAIN-2021-21/segments/1620243991252.15/warc/CC-MAIN-20210512035557-20210512065557-00227.warc.gz
596,819,749
25,380
# Accepted! Paper accepted in IEICE. # Hook up with Money I went to a grant proposal defence few days ago. They only asked me two questions. 1. Is your work pattern-able? 2. Is your work commercialize-able. They want money-outcome now. # Solving Math’s Assignment with Sage Someone sent me this question: Solve for the currents in the circult of Figure 2, if E(t)=5H(t-2) and the initial currents are zero. [Hint : Use Lapalce transform to solve this problem.] So, to solve it, form mesh analysis of two loops. Then, convert them from time domain to complex domain with Laplace transform. Next, solve I1 and I2 with normal algebra. Then only inverse I1 and I2 back to time domain. Of cause, if you familiar with Sage, you can solve it within 30min (or lesser?). t = var('t') s = var('s') I1 = var('I1') I2 = var('I2') E(t) = 5*unit_step(t-2) E(s) = E(t).laplace(t, s); E(s) # >> 5*e^(-2*s)/s equation = [ -E(s) + I1*20*s + 10*(I1-I2) == 0, 10*(I2-I1) + I2*30*s + I2*10 == 0 ] solution = solve(equation, I1, I2); solution # >> [[I1 == 1/2*(3*s + 2)*e^(-2*s)/(6*s^3 + 7*s^2 + s), I2 == 1/2*e^(-2*s)/(6*s^3 + 7*s^2 + s)]] # Note that Sage cannot inverse-Laplace time-delay function. So, taking out e^(-2*s) I1(s) = 1/2*(3*s + 2)/(6*s^3 + 7*s^2 + s) I2(s) = 1/2/(6*s^3 + 7*s^2 + s) i1_temp(t) = I1(s).inverse_laplace(s, t); i1_temp # >>t |--> -1/10*e^(-t) - 9/10*e^(-1/6*t) + 1 i2_temp(t) = I2(s).inverse_laplace(s, t); i2_temp # >> t |--> 1/10*e^(-t) - 3/5*e^(-1/6*t) + 1/2 # Referring to Table. For G(s)= e^(as)F(s), the inverse is g(t) = f(t-a). u(t) = unit_step(t) i1(t) = u(t-2) * ( -1/10*e^(-(t-2)) - 9/10*e^(-1/6*(t-2)) + 1 ) # Answer for i1 i2(t) = u(t-2) * ( 1/10*e^(-(t-2)) - 3/5*e^(-1/6*(t-2)) + 1/2 ) # Answer for i2 p1 = plot(i1(t), 0, 10, color='blue', legend_label='i1(t)') p2 = plot(i2(t), 0, 10, color='red', legend_label='i2(t)') show(p1 + p2) $i_1(t) =u(t)\left( \frac{-1}{10}e^{-(t-2)} -\frac{9}{10}e^{-(t-2)/6} +1 \right)$ $i_2(t) =u(t)\left( \frac{1}{10}e^{-(t-2)} -\frac{3}{5}e^{-(t-2)/6} +\frac{1}{2} \right)$ # Unboxing MBP Unboxing Mac Book Poor, Ops. Sorry. I mean unboxing Mac Book Pro. ^^ Someone gonna be poor for the next 12 months. # Bye SAINT2012 I happened to be the last batch of speakers in SAINT2012 conference. Next year it will be merged with COMPSAC as “New COMPSAC”, which will be held in Kyoto in 2013. The name of “SAINT” will not be used anymore. Happened to know that I have to teeeaaaach in the coming short-semester. It seems like I am getting far far away from my PhD completion. I blame noone but myself. When will I have the gut to tender resignation letter? When will I have the time to do nothing but my own research? Visit some old cities of Turkey during the SAINT2012 conference. Tortured by the sunshine, and was amazed at the legacy of Ephesus. # Stepping Further Still there is a far distance to destination… # Wondering in Mind Not really sure since when this idea came to my mind – to stay or to leave? To see the hero dancing with bull. Or to learn the Ultraman fighting a raksasa. I have a dream …
1,131
3,089
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 2, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.953125
4
CC-MAIN-2021-21
latest
en
0.653374
http://gdevtest.geeksforgeeks.org/circumradius-of-the-rectangle/
1,556,199,965,000,000,000
text/html
crawl-data/CC-MAIN-2019-18/segments/1555578721468.57/warc/CC-MAIN-20190425134058-20190425160058-00215.warc.gz
75,205,306
24,904
Here we have a rectangle of length l & breadth b.We have to find the circumradius of the rectangle. Examples: Input : l = 3, b = 4 Output :2.5 Input :l = 10, b = 12 Output :3.95227774224 ## Recommended: Please try your approach on {IDE} first, before moving on to the solution. Approach: From the diagram, we can clearly understand the circumradius r is half of the diagonal of the rectangle. r = √(l^2 + b^2)/2 Below is the implementation of the above apporach: ## C++ // C++ Program to find the radius // of the circumcircle of the given rectangle    #include using namespace std;    // Function to find the radius // of the circumcircle float findRadiusOfcircumcircle(float l, float b) {        // the sides cannot be negative     if (l < 0 || b < 0)         return -1;        // Radius of the circumcircle     float radius = sqrt(pow(l, 2) + pow(b, 2)) / 2;        // Return the radius     return radius; }    // Driver code int main() {        // Get the sides of the traingle     float l = 4, b = 3;     // Find the radius of the circumcircle     cout << findRadiusOfcircumcircle(l, b) << endl;        return 0; } ## Java // Java Program to find the radius // of the circumcircle of the given // rectangle import java.util.*; import java.lang.*; import java.io.*;    class GFG {    // Function to find the radius // of the circumcircle static float findRadiusOfcircumcircle(float l,                                       float b) {        // the sides cannot be negative     if (l < 0 || b < 0)         return -1;        // Radius of the circumcircle     float radius = (float) Math.sqrt(Math.pow(l, 2) +                            Math.pow(b, 2)) / 2;        // Return the radius     return radius; }    // Driver code public static void main(String args[]) {        // Get the sides of the traingle     float l = 4, b = 3;     // Find the radius of the circumcircle     System.out.println(findRadiusOfcircumcircle(l, b)); } }    // This code is contributed by Subhadeep ## Python3 # Python Program to find the  # radius of the circumcircle # of the given rectangle import math     # Function to find the radius # of the circumcircle def findRadiusOfcircumcircle(l, b):        # the sides cannot be negative     if (l < 0 or b < 0):         return -1;        # Radius of the circumcircle     radius = (math.sqrt(pow(l, 2) +                          pow(b, 2)) / 2);        # Return the radius     return radius;    # Driver code    # Get the sides of the traingle l = 4; b = 3;        # Find the radius of the circumcircle print(findRadiusOfcircumcircle(l, b));    # This code is contributed  # by Shivi_Aggarwal ## C# // C# Program to find the radius // of the circumcircle of the  // given rectangle using System;    class GFG {    // Function to find the radius // of the circumcircle static float findRadiusOfcircumcircle(float l,                                        float b) {        // the sides cannot be negative     if (l < 0 || b < 0)         return -1;        // Radius of the circumcircle     float radius = (float) Math.Sqrt(Math.Pow(l, 2) +                            Math.Pow(b, 2)) / 2;        // Return the radius     return radius; }    // Driver code public static void Main() {        // Get the sides of the traingle     float l = 4, b = 3;            // Find the radius of the circumcircle     Console.WriteLine(findRadiusOfcircumcircle(l, b)); } }    // This code is contributed by anuj_67 ## PHP Output: 2.5 My Personal Notes arrow_drop_up Article Tags : Practice Tags : Be the First to upvote. Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.
1,016
3,651
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.6875
4
CC-MAIN-2019-18
latest
en
0.38975
https://mathoverflow.net/questions/179123/continuous-relations
1,555,772,847,000,000,000
text/html
crawl-data/CC-MAIN-2019-18/segments/1555578529839.0/warc/CC-MAIN-20190420140859-20190420162859-00161.warc.gz
480,808,093
48,605
# Continuous relations? What might it mean for a relation $R\subset X\times Y$ to be continuous, where $X$ and $Y$ are topological spaces? In topology, category theory or in analysis? Is it possible, canonical, useful? I have a vague idea of the possibility of using continuous relations in science, for example in biochemistry or celestial mechanics, as a less deterministic approach. I have never seen anything about this topic on internet. I have an opinion of my own, but would like to hear what professional mathematicians think about it. Can it be adequately defined? And if so, would it possibly be of any use at all? Conditions on the definition: 1. Composition of continuous relations should be continuous. 2. Partial functions, continuous on its domain, should be continuous. 3. Given a partial function $f:X\times Y \rightarrow Z$ that is continuous on its domain, then $R=\{(x,y)\in X\times Y|f(x,y)=z_0\}$ should be a continuous relation. • @EricWofsey: Presumably the idea is that continuous relations should generalize continuous functions in the same way as ordinary relations generalize functions. – Tobias Fritz Aug 22 '14 at 18:37 • I voted to re-open this question, since I would be interested to see what are the various notions we have for continuous relations and how robust they are. Of course, all the definitions should have continuous functions as a special case, but for multi-valued relations, there do seem to be various distinct concepts one might use. – Joel David Hamkins Aug 22 '14 at 19:29 • The obvious definition would be to consider relations that are closed as a subset of $X\times Y$, though this fails to generalize continuous functions unless $Y$ is compact Hausdorff. More generally, "relations" can be defined in any category with finite products as subobjects of the product $X\times Y$; this coincides with closed relations in the category of compact Hausdorff spaces (but means "arbitrary relation together with a topology finer than the product topology" in the category of all topological spaces). – Eric Wofsey Aug 22 '14 at 19:44 • One possibility, frequently used, is to recast it as a continuous map $X\to{\mathscr P}Y$ where $\mathscr P$ stands for various versions of powerset (e. g. the Vietoris space in the topological case). – მამუკა ჯიბლაძე Aug 22 '14 at 20:17 • There are various papers/definitions etc for continuous multi-valued functions--continuous in one sense or another (some of these publications are interesting). One may perhaps allow also empty set of values for some arguments but it would not be common. – Włodzimierz Holsztyński Aug 23 '14 at 7:29 Here's a different and quite generic approach: Let $X,Y$ be topological spaces. Then we topologize $\mathcal{P}(Y)$ and say that $R\subseteq X\times Y$ is continuous if and only if the function $f_R: X \to \mathcal{P}(Y)$ defined by $x\mapsto \{y\in Y: (x,y) \in R\}$ is continuous. As for topologizing $\mathcal{P}(Y)$ you can take the topology generated by $\{\mathcal{S} \subseteq \mathcal{P}(Y): (\bigcup \mathcal{S}) \textrm{ is open in }Y\}$. Possibly other topologies on $\mathcal{P}(Y)$ are more natural. Here is an expansion of my comment into an answer which I think is very compelling as the "correct" definition for compact Hausdorff spaces, though I agree with others who have said that for general spaces there may be several competing definitions with different merits. My argument for this being the right definition is that it is natural in two different ways: it arises naturally by taking the definition of "homomorphism" and modifying it in an obvious way to apply to relations, and it also coincides with the categorical definition of relations as subobjects of the product $X\times Y$. Furthermore, the coincidence of these two definitions occurs very generally (in particular, in any category monadic over sets). Let me start by considering this question in different (concrete) categories. For instance, what might it mean for a relation $R\subseteq G\times H$ to be "homomorphic"? If you think of a relation as a multivalued function, the following definition seems pretty reasonable: for any $g,g'\in G$, if $h$ is a value of $R(g)$ and $h'$ is a value of $R(g')$, then $hh'$ should be a value of $R(gg')$. We should also demand that $1$ is a value of $R(1)$ and that if $h$ is a value of $R(g)$, then $h^{-1}$ is a value of $R(g^{-1})$ (demanding these is redundant for functions but not for relations). It is then easy to check that this is actually equivalent to $R\subseteq G\times H$ being a subgroup of the product group. This easily generalizes to any other sort of algebraic object: there is an analogous definition of "homomorphic relation", and it is equivalent to being a subobject of the product. What, then, is the analogue for topological spaces? Well, if you want to think of a space as a set with some sort of "operations" on it, those operations should be taking limits. Because limits neither always exist nor are unique in general, there are a few different ways you might define what it means for a relation to preserve limits. The following is the one I have found to be most natural: (1)$\,$a relation $R\subseteq X\times Y$ is continuous if whenever $x$ is an accumulation point of a net $(x_a)$ in $X$ and $y_\alpha$ is a value of $R(x_\alpha)$, then there is some accumulation point of $(y_\alpha)$ that is a value of $R(x)$. Equivalently, we could restrict to universal nets and replace "accumulation point" with "limit" everywhere (however, unlike for functions, it is not equivalent to consider arbitrary nets and replace "accumulation point" with "limit", because there might be values of $R(x)$ that are limits of every universal subnet but no single value that is simultaneously a limit of all of them). This definition has advantages and disadvantages. A function is continuous as a relation iff it is continuous in the usual sense and a composition of continuous relations is continuous. A partial function that is continuous on its domain is continuous as a relation iff its domain is closed. However, this definition is not symmetric in $X$ and $Y$ (as Joonas Ilmavirta observed, this is a necessary consequence of agreeing with the usual definition on functions). It also does not coincide with subobjects of $X\times Y$ in the category of topological spaces (which include not only all subspaces of $X\times Y$ but also all subsets equipped with any finer topology). However, if we restrict to compact Hausdorff spaces, the disadvantages disappear. Limits of universal nets or ultrafilters are well-defined single-valued operations on compact Hausdorff space, so there is a clear choice for what it means for a relation to be "homomorphic with respect to limits". A relation between compact Hausdorff spaces is continuous iff it is closed as a subset of $X\times Y$, and thus continuity is symmetric in $X$ and $Y$. In addition, these continuous relations are also exactly those subsets of $X\times Y$ that are themselves compact Hausdorff spaces, just as in the case of homomorphic relations between algebraic structures. As a final note, there is a simultaneous generalization of the algebraic case and compact Hausdorff spaces, which is algebras over a monad (compact Hausdorff spaces are the same as algebras over the monad that takes a set to the set of ultrafilters on it, with the structure map of an algebra telling you how to take limits of ultrafilters). Let $T:\mathrm{Set}\to\mathrm{Set}$ be a monad and let $A$ and $B$ be sets. Given a relation $R\subseteq A\times B$, we can consider the two projections $A\leftarrow R\to B$ and apply $T$ to get a diagram $TA\leftarrow TR\to TB$. Let $\tilde{T}R$ be the image of $TR$ in the product $TA\times TB$. In this way, $T$ naturally extends to a functor $\tilde{T}:\mathrm{Rel}\to\mathrm{Rel}$. We can now define a "homomorphic relation" between $T$-algebras. Let $A$ and $B$ be $T$-algebras with structure maps $\mu_A:TA\to A$ and $\mu_B:TB\to B$. We say a relation $R\subseteq A\times B$ is homomorphic if for any $x\in TA$, if $y$ is a value of $\tilde{T}R(x)$, then $\mu_B(y)$ is a value of $R(\mu_A(x))$. But this is just saying that $\mu_A\times \mu_B:TA\times TB\to A\times B$ restricts to a map $\tilde{T}R\to R$, and this restriction will then make $R$ itself a $T$-algebra via the composition $TR\to \tilde{T}R\to R$ and a subalgebra of $A\times B$. Conversely, if $R$ is a subalgebra of $A\times B$, then the structure map $TR\to R$ must factor through $\tilde{T}R$ as a restriction of $\mu_A\times \mu_B$. Thus homomorphic relations between algebras over a monad always coincide with subalgebras of the product. • Limit needs Hausdorff, but has it to be an operator? If you use a relation instead, wouldn't then a general topology be generated from the relation: $x_\alpha C x \Leftrightarrow$ "$x$ is a condensation point of $x_\alpha$"? – Lehs Aug 23 '14 at 16:46 • General topological spaces can also fit into the algebraic picture. Topological spaces are relational algebras for the ultrafilter monad. For a relational algebra the structure map $TA \rightarrow A$ is a relation, i.e. morphisms of $Rel$. The algebra equations are replaced by inclusions of relations, i.e. 2-cells of $Rel$. This reflects the fact that in the non-compact Hausdorff case ultrafilters can converge to any number of points. – Dimitri Chikhladze Aug 23 '14 at 20:46 • "Homomorphic relations" or modules can be also defined between relational algebras, and that might coincide with your general definition of the continuous relation. – Dimitri Chikhladze Aug 23 '14 at 20:48 • A natural next question is the locally compact Hausdorff case ... – Nik Weaver Aug 23 '14 at 22:17 • @JoonasIlmavirta: That definition will give you closed relations, which are not very well-behaved other than being symmetric in $X$ and $Y$. They are not closed under composition and include functions that are not continuous as functions. If you replace $K$ by $Y$ (so you are looking locally only on $X$), you get my definition of continuity (since it is local on the domain). – Eric Wofsey Aug 24 '14 at 10:33 I have a couple of remarks regarding continuity and some natural constructions of relations: • Unlike functions, relations have no preferred direction. So if $R\subset X\times Y$ is a relation, its inverse relation $R^{-1}\subset Y\times X$ is an equally valid relation. Now if we want the concept of a continuous relation to respect this symmetry ($R$ is continuous iff $R^{-1}$ is), we have a significant restriction. The obvious attempt to define a continuous relation so that the preimage of any open set needs to be (relatively) open leads to a nonsymmetric concept; it is easier to generalise open continuous functions symmetrically. In fact, a generalization of continuous functions cannot be symmetric (without additional structural assumptions on the spaces) since there are continuous bijections without continuous inverse. • Let $R\subset X\times Y$ be a relation. The preimage $R^{-1}Y\subset X$ need not be all of $X$ (unlike for functions). If we define $R$ to be continuous when the preimage of every open set is open, a partial function obtained by dropping part of a continuous function need not be continuous. This seems weird (but may be inevitable). One could also demand that the preimage of any set relatively open in $RX$ (or just open in $Y$ if it seems better) is relatively open in $R^{-1}Y$. • If $R\subset X\times Y$ and $S\subset Y\times Z$ are relations, their composition $S\circ R=\{(x,z);\exists y\in Y:xRySz\}\subset X\times Z$ is a relation. If $R$ and $S$ are continuous, it would seem natural to require that $S\circ R$ be continuous as well. This poses restrictions on the definitions presented in the previous remark; it could happen, for example, that $S^{-1}Z\cap RX\subset Y$ is empty or somehow bad (neither open nor closed). If we define a continuous relation so that the preimage of an open set must be open, composition preserves continuity, but passing to partial functions does not. The composition of two (usual/partial/multivalued) functions is again a (usual/partial/multivalued) function, so I think respecting composition is a good idea. It seems that we can't keep all the good properties of continuous functions and ordinary relations in a theory of continuous relations. Therefore different applications will probably call for different definitions. (This vacuously true if there is at most one application.) • I think the problem with the common definition of continuous functions is that it is optimized to functions (defined on the entire domain). Extending this definition to relations makes even the very smooth unit circle discontinuous, contrary to my intuition. Two objective conditions are that the definition should works for ordinary functions and that the composition of continuous relations (that extends the composition of functions) should be continuous. – Lehs Aug 23 '14 at 15:00 • I don't agree with the comments in your first point. A relation $R$ on $X\times Y$ is a relation from $X$ to $Y$, with the "preferred direction" being from $X$ to $Y$. The preferred direction is used when defining the domain and range of a relation, just as for a function. Why should we expect or want that $R$ is continuous if and only if the inverse relation is continuous? As you mention, we don't generally have that for functions. Many relations have other properties not shared by their inverses. For example, if $R$ is well-founded, the inverse $R^{-1}$ is not generally well-founded. – Joel David Hamkins Aug 25 '14 at 12:09 • @JoelDavidHamkins, it depends on the setting, but true, functions are not the only relations with preferred direction. The way I'm used to looking at relations is a symmetric one, but I am admittedly no expert here. I feel that a complete answer to the OP's question should address how the newly defined continuity respects different constructions of new relations from old ones, and I attempted to discuss that side. But as I wrote, symmetry is not something we can hold on to if we want to generalize continuous functions. – Joonas Ilmavirta Aug 25 '14 at 12:19 Since the question is open-ended and basically just seems to be a request for cool ideas, is it okay if I answer a slightly different question? Namely: what is the "right" notion of a measurable relation? The obvious answer --- take $X$ and $Y$ to be measure spaces and $R$ to be a measurable subset of $X \times Y$ --- is badly behaved. If $X$ is nonatomic then the reflexivity condition for relations on $X$ becomes vacuous, and making sense of transitivity is also problematic. But there is a good answer! Work with positive measure subsets modulo null sets and assume $X$ and $Y$ are $\sigma$-finite, so we can take joins of arbitrary families of positive measure subsets. Then we characterize measurable relations by saying which pairs of positive measure subsets belong to the relation. The condition is: a measurable relation is a family $R$ of ordered pairs of positive measure subsets of $X$ and $Y$ such that $$\big(\bigvee A_\alpha, \bigvee B_\alpha\big) \in R\qquad \Leftrightarrow\qquad \mbox{some }(A_\alpha, B_\alpha) \in R,$$ for any families $\{A_\alpha\}$ and $\{B_\alpha\}$ of positive measure subsets of $X$ and $Y$, respectively. The intuition is that a pair $(A,B)$ belongs to the relation if and only if some point of $A$ is related to some point of $B$. There is a well-developed theory of measurable relations in this sense. They can be composed, for example. The diagonal relation $\Delta$ is defined by setting $(A,B) \in \Delta$ iff $A \cap B$ is nonnull, and a relation is reflexive if it contains $\Delta$, etc. The details are given in Section 1 of this paper of mine. Interestingly, as far as I know, there is no good definition of the complement of a measurable relation in this sense. • I don't request for cool ideas, but for a good extension. Your idea is related and interesting. – Lehs Aug 23 '14 at 17:38 • Sure, I just meant that the question was posed very broadly. Thanks for the compliment! – Nik Weaver Aug 23 '14 at 17:54 • Maybe I've missed the point of the definition, but isn't it a notion of "measurable relation between measurable subsets" ($R\subseteq P(X)\times P(Y)$) rather than just a "measuranle relation between elements" ($R\subseteq X\times Y$)? – Qfwfq Aug 24 '14 at 22:35 • @Qfwfq: No. In the case of counting measure, my definition is equivalent to having a subset of $X \times Y$. (Given $r \subseteq X \times Y$, let $(A,B) \in R$ iff $(x,y) \in r$ for some $x \in A$ and $y \in B$. This is a measurable relation and every measurable relation arises in this way.) – Nik Weaver Aug 24 '14 at 23:09 • Ok, so in the case of the counting measure you have an underlying (set theoretic) relation $R\subseteq X\times Y$. But what about more general measures? – Qfwfq Aug 25 '14 at 13:32 The category of topological spaces and continuous functions does not have canonical notion of a relation. Let me elaborate. There is only one reasonable 1-categorical notion of a relation: a relation from $A$ to $B$ is a "subobject" of the product $A \times B$. Therefore, if $\mathbb{C}$ is a category, then to define a concept of a relation in $\mathbb{C}$, you have to decide what you mean by a subobject of an object in $\mathbb{C}$. The most general way to think of a subobject $\phi$ of an object $A$, is to think of $\phi$ as of a logical formula over $A$ (i.e. the "virtual" subobject of $A$ corresponding to formula $\phi$ is given by generalized elements that satisfy the formula $\{a \in A \colon \phi(a)\}$; in the presence of comprehension, such "virtual" subobjects may be materialized in the category, but the point is that we do not need to materialize --- a relation does not have to be representable in the category; it can belong to another world). Therefore, to define subobjects in $\mathbb{C}$, you have to define logic over $\mathbb{C}$. The concept of logic over a category is encapsulated by the concept of fiberwise posetal fibration. Let us assume that $p \colon \mathbb{U} \rightarrow \mathbb{C}$ is such a fibration over $\mathbb{C}$. A relation $\phi \colon A \nrightarrow B$ in $\mathbb{C}$ corresponds to an object $\phi$ in the fibre of $p$ over $A \times B$. The only problem that remains to solve, is to find a way to compose two relations in such a way that the composition is associative and has neutral elements (i.e. identities). It is not hard to see that to define the composition in the natural way (i.e. ${a (\psi \circ \phi) c} \Leftrightarrow {\exists_{b \in B} {a \phi b} \wedge {b \psi c}}$), our logic $p$ has to have stable cartesian connectives and stable existential quantifiers. Category-theorists call such $p$ a regular logic fibration over $\mathbb{C}$. If you have a regular logic fibration, then you can take its resolution and obtain a 2-posetal category of relations $\mathit{Rel}(p)$ together with a canonical embedding: $$\mathbb{C} \rightarrow \mathit{Rel}(p)$$ which gives an interpretation of morhpisms from $\mathbb{C}$ as relations in $\mathit{Rel}(p)$. Now, every (sufficiently complete) category $\mathbb{C}$ has associated one canonical internal logic --- the logic of canonical subobjects (i.e. subobjects associated to monomorphisms $A_0 \rightarrow A$). For example, the canonical internal logic of $\mathbf{Set}$ gives the usual notion of a relation between sets and induces the usual category of relations. It is a good exercise to show that the canonical internal logic of a (finitely complete) category is regular if and only if the category is regular in the usual sense (i.e. it has stable images). Because the category of topological spaces and continuous maps is not regular, there is no canonical notion of a relation between topological spaces. There are three ways to overcome this annoying aspect of topological spaces: • move to a more general category that is regular, • move to a regular subcategory, • take a non-canonical logic that is regular over the category of topological spaces. Which way is the best way depends on your particular applications (I guess this is the reason why your question was closed --- it is completely unclear what you want to achieve). BTW, there is a bit more general notion of a relation (and one may encounter it in category theory --- for example in the definition of sheaves over quantales): we can substitute regular logic with regular monoidal logic; i.e. we can weaken cartesian connectives to monoidal connectives and define the composition of $\phi \colon A \nrightarrow B$ with $\psi \colon B \nrightarrow C$ as ${a (\psi \circ \phi) c} \Leftrightarrow {\exists_{b \in B} {a \phi b} \otimes {b \psi c}}$. To be honest, one may imagine even more general notion of a relation, but I do not think it gives us anything useful in our context, so I will refrain from writing about it. The discussion here is mostly from the foundations point of view. However, the OP mentioned applications in sciences like celestial mechanics. In fact, for such purposes one might not need general topological spaces. For example, subsets of $\mathbb{R}^n$ may be good enough. Also, sometimes one may get away with only local homeomorphisms as maps. Here is a rather elementary definition of what a reasonable notion of a continuous relation could be generalizing a local homeomorphism: A locally homeomorphic relation is a relation $R$ which "locally looks like a homeomorphisms". That is, for any pair of elements $x \in X$ and $y \in Y$, such that $(x, y) \in R,$ there exit neighborhoods $U_x$ and $V_y$ and a homeomorphism between them, whose graph coincides with the restriction of the relation $R$. • Another possibility would be just to require that the projections $R\to X$ and $R\to Y$ are both local homeomorphisms... – მამუკა ჯიბლაძე Sep 10 '14 at 7:56 • I meant those pair of elements who are related by $R$. Made an edit. – Dimitri Chikhladze Sep 11 '14 at 11:53 • I see, thanks. I wonder whether what I said in my remaining comment is the same or not... – მამუკა ჯიბლაძე Sep 11 '14 at 17:46 • I wonder that too. It doesn't seem to be obvious. – Dimitri Chikhladze Sep 11 '14 at 20:11 • There are some other possibilities. For example, require that the inclusion $R \subseteq X \times Y$ be locally a diagonal map. That is, look like a diagonal $U \rightarrow U\times U$, for some neighborhood $U$ of any point of $R$. – Dimitri Chikhladze Sep 11 '14 at 20:17 Different possibilities to extend continuity to relations: A relation $X\overset{R}\rightarrow Y$ is continuous if it is upper hemicontinuous and lower hemicontinuous. Upper hemicontinuous at $a\in X$ if for any open neighbourhood $V$ of $R(a)$ there exists an open neighbourhood $U$ of $a$ such that for all $x\in U$ it holds $R(x)\subset V$. It seems like upper hemicontinuous is used in game theory for maximizing goal functions. Lower hemicontinuous at $a\in X$ if for any open set $V$ such that $V\cap R(a)\ne\emptyset$ there exists a neighbourhood $U$ of $a$ such that $V\cap R(x)\ne\emptyset$ for all $x\in U$. There is a lot of equivalent conditions on continuity for functions that might be considered as candidates for an extension, such as: 1. $f^{-1}(V)$ is open for all open sets $V\subset Y$ 2. $f^{-1}(F)$ is closed for all closed sets $F\subset Y$ 3. $\overline{f^{-1}(M)}\subset f^{-1}(\overline{M})$, for all sets $M\subset Y$ 4. $f(\overline{L})\subset\overline{f(L)}$, for all sets $L\subset X$ 5. For all sets $M\subset Y$, it holds that $x\in \overline{f^{-1}(M)}\Rightarrow f(x)\in \overline{M}$ 6. For all open sets $V\subset Y$ it holds $x\in f^{-1}(V) \Rightarrow f(x) \in V$ While they are equivalent conditions for functions, they might be non equivalent conditions on relations. For multivalued functions $\mathcal{F}:X\rightarrow \mathcal M$, hemicontinuity is defined for topologies on $X$ and on a set $\mathcal M$ of subsets. This differs from the question of an eventual extension of continuity from functions to continuity for general relations between topological spaces $R\subset X\times Y$: • first, in the latter case the topology is defined for the points in $Y$, independent of any induced or otherwise defined topology on a set of subsets of $Y\!$, • second, a multivalued function is defined in the whole domain $X$, in contrary to the general case. About the conditions $(1)$-$(5)$ above: $(2)$ and $(3)$ are equivalent, but non of the others. $(1)$-$(4)$ is satisfied by $X\times Y$, which not in general satisfies $(5)$, see my answer to my question on MATHEMATICS. • A relation $R\subseteq X\times Y$ is continuous if and only if $x R y$ is equivalent to the statement that every net $x_\alpha,y_\alpha$ has a subnet satisfying $x_{\alpha'} R y_{\alpha'}$. – Rabee Tourky Sep 12 '14 at 10:10 • @Rabee Tourky: Is this a preference in economical theories? Do you mean the case when Coim $R=X$? – Lehs Sep 12 '14 at 10:36 This is a remarkable application in topology. It has been given by Mike Freedman in his work about the classification of simply connected closed topological 4-manifolds, which had as a main consequence the topological Poincaré conjecture in dimension 4. Actually, this is one of the many steps in his proof. Friedman's ball to ball theorem. Let a map $f \colon B^4 \to B^4$ be such that the collection of the inverse sets is null, the singular image is nowhere dense and $f$ is a homeomorphism near the boundary. Then $f$ is approximable by homeomorphisms. Roughly speaking, the null condition means that the collection of the preimages of $f$ with more than one point, are, a part from finitely many of them, of arbitrary small diameter. In the proof there is an extraordinary usage of closed relations (that are analogous to continuous functions for compact Hausdorff spaces, as it has been remarked in other answers). The proof starts with a modification of the given map $f$, so that the outcome is not a map, but a relation instead. Then it follows with an infinite construction such that a sequence of relations is defined by induction. The construction is made so that this sequence converges to a homeomorphism close to $f!$ See these notes Chapter 5 for reference, definitions, as well as a proof. Following is only a partial answer to the question posted above. More specifically it only attempts to answer $(1)$ of the original question. ## First Approach Definition 1. Let $X$ and $Y$ be two sets and $R\subseteq X\times Y$ be a relation. Let $A\subseteq X$. Then we will define the image of $A$ under the relation $R$, denoted by $R(A)$ as the following set, $$R(A):=\{y\in Y:(x,y)\in R\ \text{for some}\ x\in A\}$$ Let us now try to prove the following lemmas, Lemma 1. Let $X,Y$ be two sets and $R\subseteq X\times Y$. Let $A\subseteq B\subseteq X$. Then we have, $R(A)\subseteq R(B)$. Lemma 2. Let $X,Y,Z$ be three sets and $R\subseteq X\times Y$ and $S\subseteq Y\times Z$ are two relations. Then we have, $$(S\circ R)(A)\subseteq S(R(A))$$for all $A\subseteq X$. Proof. Let us choose $A\subseteq X$. If $(S\circ R)(A)=\emptyset$ then we are done because then $(S\circ R)(A)=\emptyset\subseteq S(R(A))$. So we may assume that $(S\circ R)(A)\ne\emptyset$. Let $z\in (S\circ R)(A)$. Then there exists some $x\in A$ such that $(x,z)\in S\circ R$. But $(x,z)\in S\circ R$ implies that there exists some $y\in Y$ such that $(x,y)\in R$ and $(y,z)\in S$. Since $x\in A$ and $(x,y)\in R$ so we can conclude that $y\in R(A)$. Similarly since $y\in R(A)$ and $(y,z)\in S$, we can conclude that $z\in S(R(A))$. Since $z$ was arbitrarily chosen, we have thus shown that, $$(S\circ R)(A)\subseteq S(R(A))$$and furthermore since $A$ was also arbitrarily chosen, we have proved our theorem. Let us now come to our main definition. Definition 2. Let $(X,\tau_X)$ and $(Y,\tau_Y)$ be two topological spaces. A relation $R\subseteq X\times Y$ will be said to be continuous iff $R(\overline{A})\subseteq \overline{R(A)}$ for all $A\subseteq X$. And now the main theorem. Theorem 1. Let $(X,\tau_X), (Y,\tau_Y)$ and $(Z,\tau_Z)$ be three topological spaces and let $R\subseteq X\times Y$ and $S\subseteq Y\times Z$ be two continuous relations. Then $S\circ R\subseteq X\times Z$ is also continuous. Proof. Observe that for all sets $A\subseteq X$ we have, \begin{align*}(S\circ R)(\overline{A})&\subseteq S(R(\overline{A}))\\&\subseteq S(\overline{R(A)})&\text{(since}\ R\ \text{is continuous)}\\&\subseteq \overline{S(R(A))}&\text{(since}\ S\ \text{is continuous)}\end{align*}and hence we are done. ## Second Approach Definition 3. Let $X$ and $Y$ be two sets and $R\subseteq X\times Y$ be a relation. Let $B\subseteq Y$. Then we will define the pullback of $B$ under the relation $R$, denoted by $R^{-1}(B)$ as the following set, $$R^{-1}(B):=\{x\in X:(x,y)\in R\ \text{for some}\ y\in B\}$$ Let us now try to prove the following lemmas, Lemma 3. Let $X,Y$ be two sets and $R\subseteq X\times Y$. Let $A\subseteq B\subseteq Y$. Then we have, $R^{-1}(A)\subseteq R^{-1}(B)$. Lemma 4. Let $X,Y,Z$ be three sets and $R\subseteq X\times Y$ and $S\subseteq Y\times Z$ are two relations. Then we have, $$(S\circ R)^{-1}(C)\subseteq R^{-1}(S^{-1}(C))$$for all $C\subseteq Z$. Proof. Let us choose $C\subseteq Z$. If $(S\circ R)^{-1}(C)=\emptyset$ then we are done because then $(S\circ R)^{-1}(C)=\emptyset\subseteq R^{-1}(S^{-1}(C))$. So we may assume that $(S\circ R)^{-1}(C)\ne\emptyset$. Let $x\in (S\circ R)^{-1}(C)$. Then there exists some $z\in C$ such that $(x,z)\in S\circ R$. But $(x,z)\in S\circ R$ implies that there exists some $y\in Y$ such that $(x,y)\in R$ and $(y,z)\in S$. Since $z\in C$ and $(y,z)\in S$ so we can conclude that $y\in S^{-1}(C)$. Similarly since $y\in S^{-1}(C)$ and $(x,y)\in R$, we can conclude that $x\in R^{-1}(S^{-1}(C))$. Since $x$ was arbitrarily chosen, we have thus shown that, $$(S\circ R)^{-1}(C)\subseteq R^{-1}(S^{-1}(C))$$and furthermore since $C$ was also arbitrarily chosen, we have proved our theorem. Let us now come to our main definition. Definition 4. Let $(X,\tau_X)$ and $(Y,\tau_Y)$ be two topological spaces. A relation $R\subseteq X\times Y$ will be said to be continuous iff $\overline{R^{-1}(B)}\subseteq R^{-1}(\overline{B})$ for all $B\subseteq Y$. And now the main theorem. Theorem 2. Let $(X,\tau_X), (Y,\tau_Y)$ and $(Z,\tau_Z)$ be three topological spaces and let $R\subseteq X\times Y$ and $S\subseteq Y\times Z$ be two continuous relations. Then $S\circ R\subseteq X\times Z$ is also continuous. Proof. Observe that for all sets $C\subseteq Z$ we have, \begin{align*}\overline{(S\circ R)^{-1}(C)}&\subseteq \overline{R^{-1}(S^{-1}(C))}\\&\subseteq R^{-1}(\overline{S^{-1}(C)})&\text{(since}\ R\ \text{is continuous)}\\&\subseteq R^{-1}(S^{-1}(\overline{C}))&\text{(since}\ S\ \text{is continuous)}\end{align*}and hence we are done. • @Lehs: I think you can also define another notion of continuity of relations (motivated by this) by saying that a relation $R:X\to Y$ is said to be continuous at a point $x\in X$ iff for any neighborhood $V$ of $R(\{x\})$ there exists a neighborhood $U$ of $x$ such that $R(U)\subseteq V$. (Here $R(\{x\}):=\{y\in Y:(x,y)\in R\}$ and $R(U)$ is as defined in Definition 1). I don't know (at least till now) whether this definition even satisfies any of $(1),(2)$ or $(3)$ but I think it is worth a try. – user 170039 Mar 18 '18 at 3:40 I think the key point is to figure out what it means for a relation $$R\subset X\times Y$$ to "converges" to some point. To achieve this, one could apply the notion of a "convergence space". So far we have mainly two approaches to define a "convergence space". One approach uses Moore-Smith's notion of "net", the other one uses Cartan's notion of "filter". It could be shown that these two approaches are essentially the same, if we establish the connection between a net and a filter via taking the "eventual filter" $$\mathcal F(\nu)$$ for a net $$\nu,$$ and in this way convert a "net convergence space" into a "filter convergence space". For simplicity I'll only give some details for "filter convergence space". Following the definition given by R.Beattie and H.P.Butzmann, (which could be found in their treatise Convergence Structures and Applications to Functional Analysis), a convergence space(established on the notion of filters) is a set $$X$$ endowed with a "convergence structure", which is a family of sets $$(\lambda(x))_{x\in X},$$ satisfying the following axioms for each $$x\in X$$: A1 The members of $$\lambda(x)$$ are filters on $$X;$$ A2 If $$F\in \lambda(x)$$ and $$G$$ is another filter on $$X$$ with $$F\subset G,$$ then $$G\in\lambda(X);$$ A3 If $$F,G\in\lambda(x)$$ then $$F\cap G\in\lambda(x);$$ A4 The principal filter at $$x$$(i.e., the set of $$\left\{A\subset X|\ x\in A\right\}$$) belongs to $$\lambda(x).$$ We say that a filter $$F$$ on $$X$$ converges to $$x\in X,$$ written $$F\to x,$$ if $$F\in\lambda(x).$$ Now assume that $$X$$ and $$Y$$ areboth endowed with some convergence structures, let $$a\in X$$ and $$b\in Y,$$ then we say that the second argument of relation $$R$$ converges to $$b$$ as the first argument converges to $$a,$$ written $$\displaystyle\lim_{(x,y)\in R,\ x\to a}y=b,$$ if for any filter $$F$$ on $$R,$$ we have $$\pi_{1}(F)\to a\Longrightarrow \pi_2(F)\to b,$$ where $$\pi_i:R\to X\ \text{or}\ Y,\ (x,y)\mapsto x\ \text{or}\ y$$ are the projection maps. An equivalent formulation is that, $$\displaystyle\lim_{(x,y)\in R,\ x\to a}y=b,$$ if for any filter $$F$$ on $$X,$$ we have $$F\to a\Longrightarrow \left\{S(U)|\ U\in F\right\}\to b,$$ where $$S(U):=\left\{y\in Y|\ \exists x\in U,\ s.t.\ (x,y)\in R\right\}$$ for all subset $$U$$ of $$X.$$ Once we've established the setting of the convergence of a relation, it's not that difficult to give a definition of "continuous relations". We say a relation $$R$$ is continuous at point $$a\in X,$$ if for all $$b\in Y,$$ if $$(a,b)\in R,$$ then $$\lim_{(x,y)\in R,\ x\to a}y=b.$$ It could be seen that the continuity of a function at one point becomes a special case. To come back to the familiar notion of convergence in a topological space, one can define the convergence structure $$(\lambda(x))_{x\in X}$$ to be $$\lambda(x):=\left\{F\ \text{is a filter on X}|\ F\supset N(x)\right\},$$ where $$N(x)$$ is the collection of all neighborhoods of $$x,$$ which is a filter on $$X.$$ (BTW, when I say a "neighborhood of $$x$$" I mean "a subset of $$X$$ that contains an open set $$U$$ with $$x\in U.$$") Now we can derive from the notion of convergence of a relation the familiar criterion of the continuity of a function at a point: $$f:X\to Y$$ is continuous at point $$x\in X$$ if and only if for any neighborhood $$U$$ of $$f(x),$$ there is a neighborhood $$V$$ of $$x$$ such that $$f(V)\subset U.$$ A function $R\subseteq X\times Y$ is continuous iff for all sets $M\subseteq Y$: $(1)\quad x\in \overline{R^{-1}(M)}\wedge (x,y)\in R \Rightarrow y\in\overline{M}$, or $(2)\quad x\in \overline{R^{-1}(M)}\wedge (x,y)\in R \Rightarrow R(x)\cap\overline{M}\ne\emptyset$ Applied to relations $R\subseteq X\times Y$ the condition $(1)$ implies that $R$ is a (continuous) function if $Y$ is Hausdorff and the condition $(2)$ implies that the maximal relation $X\times Y$ is continuous. Maybe $(1)$ could be of interest for non Hausdorff spaces, but $(2)$ violates my intuition (whatever it is worth) about continuity. Perhaps one can use conditions between $(1)$ and $(2)$ as $(3)\quad x\in \overline{R^{-1}(M)}\wedge (x,y)\in R \Rightarrow R(x)\cap\overline{M}\ne\emptyset\wedge |R(x)\setminus\overline{M}|\in\mathbb{N}$? I guess that every algebraic curve is continues in the sense of $(3)$, but in general not the maximal relation. Any condition on continuity for functions induces a family of relations. Every open (closed) set $R\subseteq X\times Y$ fulfill the condition that the inverse image of any open (closed) subset of $Y$ is open (closed) in $X$. But for both these conditions the maximal relation is continuous. • (For the record: I didn't vote in this thread). I'd say, put some work into your answer. Also, are you planning on proving 1-2 (whatever they are) or did you already did? You could restate your 1-2 right here to make it worthwhile to read the given answer. – Włodzimierz Holsztyński Aug 23 '14 at 21:25 • @Wlodzimierz Holsztynski: I will submit the proofs as soon as they exists. I know that 1 is true but have to make a more explicit proof. It can't be too difficult to prove 2 neither. What I need to know is if the definition is of any good or is hollow and useless. It is important for me to know, because the definition is immediatly derived from a general method which probably also will work for uniformly continuous relations and maybe for messurable relations as well. And, if the definitions are useless then so are the method. – Lehs Aug 23 '14 at 22:08 • Thank you for restating 1-3. I don't understand 3 though. – Włodzimierz Holsztyński Aug 24 '14 at 18:09 • @Wlodzimierz Holsztynski: Is it unclear or don't you belive in it? – Lehs Aug 24 '14 at 18:14 • @Wlodzimierz Holsztynski: $f$ and $g$ are continuous functions from their domains to just any topological space $A$. Since it seems difficult to understand what a continuous relation is, there should be some rules that frames the object and make it possible to test whether a definition makes sence or not. In my opinion the relation $f(x,y)=g(x,y)$ should be continuous, if $f$ and $g$ are. – Lehs Aug 24 '14 at 20:12
10,295
37,636
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 63, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.9375
3
CC-MAIN-2019-18
longest
en
0.952499
https://2011.isiproceedings.org/Abstracts/CPS004-05.html
1,696,386,182,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233511351.18/warc/CC-MAIN-20231004020329-20231004050329-00688.warc.gz
85,942,628
2,126
Disclosing Diversity in Populations with Large Number of Subclasses Kalev Pärna, Mihhail Juhkam Institute of Mathematical Statistics, University of Tartu, Tartu, Estonia We consider populations which are divided into a big number of mutually exclusive classes. Some typical examples come from biology - fauna with its numerous species, human population with its gnotypes, etc. We may wish to draw a sample which contains at least one object from each class, however, it can be practically impossible for very small probabilities of rare classes. Increasing the sample and identification of membership of objects is often costly or time-consuming. Hence, we limit ourselves with discovering the classes that represent a dominating part (e.g. 99 per cent) of the whole population (in such a case the sample is said to have coverage 0.99). Naturally, the problem of the required sample size arises to ensure a given coverage. Estimation of the sample coverage was first discussed by Good (1953), who proposed a nonparametric estimator of the sample coverage. Among numerous papers in this area we mention the work by Mao and Lindsay (2002) who describe an practical genomic application of a Poisson mixture model. Current paper is a continuation of our previous work Juhkam and Pärna (2008). We address the following questions: (1) Is the coverage of a given sample large enough? 2) If not, then, how many additional objects we have to draw into the sample in order to achieve the given coverage? 3) What is the average sample size necessary for obtaining the given coverage? We discuss these questions under multinomial and Poisson sampling schemes assuming various models of class probabilities. References: Good, I. J. (1953) The Population Frequencies of Species and the Estimation of Population Parameters. Biometrika, v. 40, no. 3, 237-264. Mao, C. X. and Lindsay, B. G. (2002) A Poisson model for the coverage problem with a genomic application. Biometrika, v. 89, no. 3, 669-681. Juhkam, M. and Pärna, K. (2008) Estimation of the Sample Size Required for Obtaining Given Sample Coverage. Acta et Commentationes Universitatis Tartuensis de Mathematica, 12, 89 - 99. Keywords: Sample coverage; Sample size estimation; Species richness; Diversity estimation Biography: Kalev Pärna is Professor of Probability at the Institute of Mathematical Statistics, Univeristy of Tartu, Estonia. Ha has also served as the President of Estonian Statistical Society. His research interests include statistical and probabilistic models applied in life sciences, social sciences, business and finance.
585
2,599
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.578125
3
CC-MAIN-2023-40
latest
en
0.909752
http://work.thaslwanter.at/skinematics/html/_modules/rotmat.html
1,685,459,179,000,000,000
text/html
crawl-data/CC-MAIN-2023-23/segments/1685224645810.57/warc/CC-MAIN-20230530131531-20230530161531-00634.warc.gz
48,840,173
9,182
Source code for rotmat """ Routines for working with rotation matrices """ """ comment author : Thomas Haslwanter date : April-2018 """ import numpy as np import sympy from collections import namedtuple # The following construct is required since I want to run the module as a script # inside the skinematics-directory import os import sys file_dir = os.path.dirname(__file__) if file_dir not in sys.path: sys.path.insert(0, file_dir) # For deprecation warnings #import deprecation #import warnings #warnings.simplefilter('always', DeprecationWarning) [docs]def stm(axis='x', angle=0, translation=[0, 0, 0]): """Spatial Transformation Matrix Parameters ---------- axis : int or str Axis of rotation, has to be 0, 1, or 2, or 'x', 'y', or 'z' angle : float rotation angle [deg] translation : 3x1 ndarray 3D-translation vector Returns ------- STM : 4x4 ndarray spatial transformation matrix, for rotation about the specified axis, and translation by the given vector Examples -------- >>> rotmat.stm(axis='x', angle=45, translation=[1,2,3.3]) array([[ 1. , 0. , 0. , 1. ], [ 0. , 0.70710678, -0.70710678, 2. ], [ 0. , 0.70710678, 0.70710678, 3.3 ], [ 0. , 0. , 0. , 1. ]]) >>> R_z = rotmat.stm(axis='z', angle=30) >>> T_y = rotmat.stm(translation=[0, 10, 0]) """ axis = _check_axis(axis) stm = np.eye(4) stm[:-1,:-1] = R(axis, angle) stm[:3,-1] = translation return stm [docs]def stm_s(axis='x', angle='0', transl='0,0,0'): """ Symbolic spatial transformation matrix about the given axis, by an angle with the given name, and translation by the given distances. Parameters ---------- axis : int or str Axis of rotation, has to be 0, 1, or 2, or 'x', 'y', or 'z' angle : string Name of rotation angle, or '0' for no rotation, 'alpha', 'theta', etc. for a symbolic rotation. transl : string Has to contain three names, for the three translation distances. '0,0,0' would correspond to no translation, and 'x,y,z' to an arbitrary translation. Returns ------- STM_symbolic : corresponding symbolic spatial transformation matrix Examples -------- >>> Rz_s = STM_s(axis='z', angle='theta', transl='0,0,0') >>> Tz_s = STM_s(axis=0, angle='0', transl='0,0,z') """ axis = _check_axis(axis) # Default is the unit matrix STM_s = sympy.eye(4) if angle != '0': STM_s[:3,:3] = R_s(axis, angle) transl = transl.replace(' ', '') if not transl==('0,0,0'): trans_dir = transl.split(',') assert(len(trans_dir)==3) for (ii, magnitude) in enumerate(trans_dir): if magnitude != '0': symbol = sympy.Symbol(magnitude) STM_s[ii,-1] = symbol return STM_s [docs]def R(axis='x', angle=90) : """Rotation matrix for rotation about a cardinal axis. The argument is entered in degree. Parameters ---------- axis : int or str Axis of rotation, has to be 0, 1, or 2, or 'x', 'y', or 'z' angle : float rotation angle [deg] Returns ------- R : rotation matrix, for rotation about the specified axis Examples -------- >>> rotmat.R(axis='x', angle=45) array([[ 1. , 0. , 0. ], [ 0. , 0.70710678, -0.70710678], [ 0. , 0.70710678, 0.70710678]]) >>> rotmat.R(axis='x') array([[ 1. , 0. , 0. ], [ 0. , 0. , -1. ], [ 0. , 1. , 0. ]]) >>> rotmat.R('y', 45) array([[ 0.70710678, 0. , 0.70710678], [ 0. , 1. , 0. ], [-0.70710678, 0. , 0.70710678]]) >>> rotmat.R(axis=2, angle=45) array([[ 0.70710678, -0.70710678, 0. ], [ 0.70710678, 0.70710678, 0. ], [ 0. , 0. , 1. ]]) """ axis = _check_axis(axis) # convert from degrees into radian: if axis == 'x': R = np.array([[1, 0, 0], elif axis == 'y': [ 0, 1, 0 ], elif axis == 'z': [ 0, 0, 1]]) else: raise IOError('"axis" has to be "x", "y", or "z"') return R def _check_axis(sel_axis): """Leaves u[x/y/z] nchanged, but converts [0/1/2] to [x/y/z] Parameters ---------- sel_axis : str or int If "str", the value has to be 'x', 'y', or 'z' If "int", the value has to be 0, 1, or 2 Returns ------- axis : str Selected axis, as string """ seq = 'xyz' if type(sel_axis) is str: if sel_axis not in seq: raise IOError axis = sel_axis elif type(sel_axis) is int: if sel_axis in range(3): axis = seq[sel_axis] else: raise IOError return axis [docs]def R_s(axis='x', angle='alpha'): """ Symbolic rotation matrix about the given axis, by an angle with the given name Parameters ---------- axis : int or str Axis of rotation, has to be 0, 1, or 2, or 'x', 'y', or 'z' alpha : string name of rotation angle Returns ------- R_symbolic : symbolic matrix for rotation about the given axis Examples -------- >>> R_yaw = R_s(axis=2, angle='theta') >>> R_nautical = R_s(2) * R_s(1) * R_s(0) """ axis = _check_axis(axis) alpha = sympy.Symbol(angle) if axis == 'x': R_s = sympy.Matrix([[1, 0, 0], [0, sympy.cos(alpha), -sympy.sin(alpha)], [0, sympy.sin(alpha), sympy.cos(alpha)]]) elif axis == 'y': R_s = sympy.Matrix([[sympy.cos(alpha),0, sympy.sin(alpha)], [0,1,0], [-sympy.sin(alpha), 0, sympy.cos(alpha)]]) elif axis == 'z': R_s = sympy.Matrix([[sympy.cos(alpha), -sympy.sin(alpha), 0], [sympy.sin(alpha), sympy.cos(alpha), 0], [0, 0, 1]]) else: raise IOError('"axis" has to be "x", "y", or "z", not {0}'.format(axis)) return R_s [docs]def sequence(R, to ='Euler'): """ This function takes a rotation matrix, and calculates the corresponding angles for sequential rotations. R_Euler = R3(gamma) * R1(beta) * R3(alpha) Parameters ---------- R : ndarray, 3x3 rotation matrix to : string Has to be one the following: - Euler ... Rz * Rx * Rz - Fick ... Rz * Ry * Rx - nautical ... same as "Fick" - Helmholtz ... Ry * Rz * Rx Returns ------- gamma : third rotation (left-most matrix) beta : second rotation alpha : first rotation(right-most matrix) Notes ----- The following formulas are used: Euler: .. math:: \\beta = -arcsin(\\sqrt{ R_{xz}^2 + R_{yz}^2 }) * sign(R_{yz}) \\gamma = arcsin(\\frac{R_{xz}}{sin\\beta}) \\alpha = arcsin(\\frac{R_{zx}}{sin\\beta}) nautical / Fick: .. math:: \\theta = arctan(\\frac{R_{yx}}{R_{xx}}) \\phi = arcsin(R_{zx}) \\psi = arctan(\\frac{R_{zy}}{R_{zz}}) Note that it is assumed that psi < pi ! Helmholtz: .. math:: \\theta = arcsin(R_{yx}) \\phi = -arcsin(\\frac{R_{zx}}{cos\\theta}) \\psi = -arcsin(\\frac{R_{yz}}{cos\\theta}) Note that it is assumed that psi < pi """ # Reshape the input such that I can use the standard matrix indices # For a simple (3,3) matrix, a superfluous first index is added. Rs = R.reshape((-1,3,3), order='C') if to=='Fick' or to=='nautical': gamma = np.arctan2(Rs[:,1,0], Rs[:,0,0]) alpha = np.arctan2(Rs[:,2,1], Rs[:,2,2]) beta = -np.arcsin(Rs[:,2,0]) elif to == 'Helmholtz': gamma = np.arcsin( Rs[:,1,0] ) beta = -np.arcsin( Rs[:,2,0]/np.cos(gamma) ) alpha = -np.arcsin( Rs[:,1,2]/np.cos(gamma) ) elif to == 'Euler': epsilon = 1e-6 beta = - np.arcsin(np.sqrt(Rs[:,0,2]**2 + Rs[:,1,2]**2)) * np.sign(Rs[:,1,2]) small_indices = beta < epsilon # Assign memory for alpha and gamma alpha = np.nan * np.ones_like(beta) gamma = np.nan * np.ones_like(beta) # For small beta beta[small_indices] = 0 gamma[small_indices] = 0 alpha[small_indices] = np.arcsin(Rs[small_indices,1,0]) # for the rest gamma[~small_indices] = np.arcsin( Rs[~small_indices,0,2]/np.sin(beta) ) alpha[~small_indices] = np.arcsin( Rs[~small_indices,2,0]/np.sin(beta) ) else: print('\nSorry, only know: \nnautical, \nFick, \nHelmholtz, \nEuler.\n') raise IOError # Return the parameter-angles if R.size == 9: return np.r_[gamma, beta, alpha] else: return np.column_stack( (gamma, beta, alpha) ) [docs]def dh(theta=0, d=0, r=0, alpha=0): """ Denavit Hartenberg transformation and rotation matrix. .. math:: T_n^{n - 1}= {Trans}_{z_{n - 1}}(d_n) \\cdot {Rot}_{z_{n - 1}}(\\theta_n) \\cdot {Trans}_{x_n}(r_n) \\cdot {Rot}_{x_n}(\\alpha_n) .. math:: T_n=\\left[\\begin{array}{ccc|c} \\cos\\theta_n & -\\sin\\theta_n \\cos\\alpha_n & \\sin\\theta_n \\sin\\alpha_n & r_n\\cos\\theta_n \\\\ \\sin\\theta_n & \\cos\\theta_n \\cos\\alpha_n & -\\cos\\theta_n \\sin\\alpha_n & r_n \\sin\\theta_n \\\\ 0 & \\sin\\alpha_n & \\cos\\alpha_n & d_n \\\\ \\hline 0 & 0 & 0 & 1 \\end{array} \\right] =\\left[\\begin{array}{ccc|c} & & & \\\\ & R & & T \\\\ & & & \\\\ \\hline 0 & 0 & 0 & 1 \\end{array}\\right] Examples -------- >>> theta_1=90.0 >>> theta_2=90.0 >>> theta_3=0. >>> dh(theta_1,60,0,0)*dh(0,88,71,90)*dh(theta_2,15,0,0)*dh(0,0,174,-180)*dh(theta_3,15,0,0) [[-6.12323400e-17 -6.12323400e-17 -1.00000000e+00 -7.10542736e-15], [ 6.12323400e-17 1.00000000e+00 -6.12323400e-17 7.10000000e+01], [ 1.00000000e+00 -6.12323400e-17 -6.12323400e-17 3.22000000e+02], [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]] Parameters ---------- theta : float rotation angle z axis [deg] d : float transformation along the z-axis alpha : float rotation angle x axis [deg] r : float transformation along the x-axis Returns ------- dh : ndarray(4x4) Denavit Hartenberg transformation matrix. """ # Calculate Denavit-Hartenberg transformation matrix Rx = stm(axis=0, angle=alpha) Tx = stm(translation=[r, 0, 0]) Rz = stm(axis=2, angle=theta) Tz = stm(translation=[0, 0, d]) t_dh = Tz @ Rz @ Tx @ Rx return(t_dh) [docs]def dh_s(theta=0, d=0, r=0, alpha=0): """ Symbolic Denavit Hartenberg transformation and rotation matrix. >>> dh_s('theta_1',60,0,0)*dh_s(0,88,71,90)*dh_s('theta_2',15,0,0)*dh_s(0,0,174,-180)*dh_s('theta_3',15,0,0) Parameters ---------- theta : float rotation angle z axis [deg] d : float transformation along the z-axis alpha : float rotation angle x axis [deg] r : float transformation along the x-axis Returns ------- R : Symbolic rotation and transformation matrix 4x4 """ # Force the correct input type theta_s = str(theta) d_s = str(d) r_s = str(r) alpha_s = str(alpha) # Calculate Denavit-Hartenberg transformation matrix Rx = stm_s(axis=0, angle = alpha_s) Tx = stm_s(transl = r_s + ',0,0') Rz = stm_s(axis=2, angle = theta_s) Tz = stm_s(transl='0,0,' + d_s) t_dh = Tz * Rz * Tx * Rx return(t_dh) [docs]def convert(rMat, to ='quat'): """ Converts a rotation matrix to the corresponding quaternion. Assumes that R has the shape (3,3), or the matrix elements in columns Parameters ---------- rMat : array, shape (3,3) or (N,9) single rotation matrix, or matrix with rotation-matrix elements. to : string Currently, only 'quat' is supported Returns ------- outQuat : array, shape (4,) or (N,4) corresponding quaternion vector(s) Notes ----- .. math:: \\vec q = 0.5*copysign\\left( {\\begin{array}{*{20}{c}} {\\sqrt {1 + {R_{xx}} - {R_{yy}} - {R_{zz}}} ,}\\\\ {\\sqrt {1 - {R_{xx}} + {R_{yy}} - {R_{zz}}} ,}\\\\ {\\sqrt {1 - {R_{xx}} - {R_{yy}} + {R_{zz}}} ,} \\end{array}\\begin{array}{*{20}{c}} {{R_{zy}} - {R_{yz}}}\\\\ {{R_{xz}} - {R_{zx}}}\\\\ {{R_{yx}} - {R_{xy}}} \\end{array}} \\right) http://en.wikipedia.org/wiki/Quaternion Examples -------- >>> rotMat = array([[cos(alpha), -sin(alpha), 0], >>> [sin(alpha), cos(alpha), 0], >>> [0, 0, 1]]) >>> rotmat.convert(rotMat, 'quat') array([[ 0.99500417, 0. , 0. , 0.09983342]]) """ if to != 'quat': raise IOError('Only know "quat"!') if rMat.shape == (3,3) or rMat.shape == (9,): rMat=np.atleast_2d(rMat.ravel()).T else: rMat = rMat.T q = np.zeros((4, rMat.shape[1])) R11 = rMat[0] R12 = rMat[1] R13 = rMat[2] R21 = rMat[3] R22 = rMat[4] R23 = rMat[5] R31 = rMat[6] R32 = rMat[7] R33 = rMat[8] # Catch small numerical inaccuracies, but produce an error for larger problems epsilon = 1e-10 if np.min(np.vstack((1+R11-R22-R33, 1-R11+R22-R33, 1-R11-R22+R33))) < -epsilon: raise ValueError('Problems with defintion of rotation matrices') q[1] = 0.5 * np.copysign(np.sqrt(np.abs(1+R11-R22-R33)), R32-R23) q[2] = 0.5 * np.copysign(np.sqrt(np.abs(1-R11+R22-R33)), R13-R31) q[3] = 0.5 * np.copysign(np.sqrt(np.abs(1-R11-R22+R33)), R21-R12) q[0] = np.sqrt(1-(q[1]**2+q[2]**2+q[3]**2)) return q.T [docs]def seq2quat(rot_angles, seq='nautical'): """ This function takes a angles from sequenctial rotations and calculates the corresponding quaternions. Parameters ---------- rot_angles : ndarray, nx3 sequential rotation angles [deg] seq : string Has to be one the following: - Euler ... Rz * Rx * Rz - Fick ... Rz * Ry * Rx - nautical ... same as "Fick" - Helmholtz ... Ry * Rz * Rx Returns ------- quats : ndarray, nx4 corresponding quaternions Examples -------- >>> skin.rotmat.seq2quat([90, 23.074, -90], seq='Euler') array([[ 0.97979575, 0. , 0.2000007 , 0. ]]) Notes ----- The equations are longish, and can be found in 3D-Kinematics, 4.1.5 "Relation to Sequential Rotations" """ quats = np.nan * np.ones( (rot_angles.shape[0], 4) ) if seq =='Fick' or seq =='nautical': theta = rot_angles[:,0] phi = rot_angles[:,1] psi = rot_angles[:,2] c_th, s_th = np.cos(theta/2), np.sin(theta/2) c_ph, s_ph = np.cos(phi/2), np.sin(phi/2) c_ps, s_ps = np.cos(psi/2), np.sin(psi/2) quats[:,0] = c_th*c_ph*c_ps + s_th*s_ph*s_ps quats[:,1] = c_th*c_ph*s_ps - s_th*s_ph*c_ps quats[:,2] = c_th*s_ph*c_ps + s_th*c_ph*s_ps quats[:,3] = s_th*c_ph*c_ps - c_th*s_ph*s_ps elif seq == 'Helmholtz': phi = rot_angles[:,0] theta = rot_angles[:,1] psi = rot_angles[:,2] c_th, s_th = np.cos(theta/2), np.sin(theta/2) c_ph, s_ph = np.cos(phi/2), np.sin(phi/2) c_ps, s_ps = np.cos(psi/2), np.sin(psi/2) quats[:,0] = c_th*c_ph*c_ps - s_th*s_ph*s_ps quats[:,1] = c_th*c_ph*s_ps + s_th*s_ph*c_ps quats[:,2] = c_th*s_ph*c_ps + s_th*c_ph*s_ps quats[:,3] = s_th*c_ph*c_ps - c_th*s_ph*s_ps elif seq == 'Euler': alpha = rot_angles[:,0] beta = rot_angles[:,1] gamma = rot_angles[:,2] c_al, s_al = np.cos(alpha/2), np.sin(alpha/2) c_be, s_be = np.cos(beta/2), np.sin(beta/2) c_ga, s_ga = np.cos(gamma/2), np.sin(gamma/2) quats[:,0] = c_al*c_be*c_ga - s_al*c_be*s_ga quats[:,1] = c_al*s_be*c_ga + s_al*s_be*s_ga quats[:,2] = s_al*s_be*c_ga - c_al*s_be*s_ga quats[:,3] = c_al*c_be*s_ga + s_al*c_be*c_ga else: raise ValueError('Input parameter {0} not known'.format(seq)) return quats if __name__ == '__main__': from pprint import pprint STM = stm(axis=0, angle=45, translation=[1, 2, 3.3]) R_z = stm(axis=2, angle=30) T_y = stm(translation=[0, 10., 0]) pprint(STM) pprint(R_z) pprint(T_y) out_s = stm_s(axis=0, angle='0', transl='x,0,z') pprint(out_s) Rx = stm_s(axis=0, angle='alpha') Tx = stm_s(transl='r,0,0') Rz = stm_s(axis=2, angle='theta') Tz = stm_s(transl='0,0,d') dh_mat = Tz * Rz * Tx * Rx pprint(Rx) pprint(Tx) pprint(Rz) pprint(Tz) pprint(dh_mat) Rx = stm_s(axis=0, angle='0') Tx = stm_s(transl='0,0,0') Rz = stm_s(axis=2, angle='theta') Tz = stm_s(transl='0,0,15') dh2 = Tz * Rz * Tx * Rx pprint(dh2) pprint(dh_s('theta', 15, 0, 0)) t_dh = dh(60,15,0,0) print(t_dh) angles = np.r_[20, 0, 0] quat = seq2quat(angles) print(quat) testmat = np.array([[np.sqrt(2)/2, -np.sqrt(2)/2, 0], [np.sqrt(2)/2, np.sqrt(2)/2, 0], [0, 0, 1]]) angles = sequence(testmat, to='nautical') print(angles) testmat2 = np.tile(np.reshape(testmat, (1,-1)), (2,1)) angles = sequence(testmat2, to='nautical') print(angles) print('Done testing') correct = np.r_[[0,0,np.pi/4]] print(R_s(1, 'gamma')) import quat a = np.r_[np.cos(0.1), 0,0,np.sin(0.1)] print('The inverse of {0} is {1}'.format(a, quat.q_inv(a))) print(R(1, 45)) print(R('y', 45))
5,553
15,477
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.546875
3
CC-MAIN-2023-23
latest
en
0.61156
http://www.dorais.org/archives/503/
1,544,867,305,000,000,000
text/html
crawl-data/CC-MAIN-2018-51/segments/1544376826842.56/warc/CC-MAIN-20181215083318-20181215105318-00072.warc.gz
359,542,769
5,888
# François G. Dorais ## On a theorem of Mycielski and Taylor Mycielski (1964) proved a wonderful theorem about independent sets in Polish spaces. He showed that if $X$ is an uncountable Polish space and $R_n$ is a meager subset of $X^n$ for each $n \geq 1$, then there is a perfect set $Z \subseteq X$ such that $(z_1,\dots,z_n) \notin R_n$ whenever $z_1,\dots,z_n$ are distinct elements of $Z$. In other words, $Z$ is $R_n$-independent for each $n \geq 1$. This is a wonderfully general theorem that has a multitude of applications. One of my favorite theorems where Mycielski’s Theorem comes in handy is a remarkable partition theorem due to Fred Galvin. Theorem (Galvin 1968). Let $X$ be an uncountable Polish space and let $c:[X]^2\to\set{0,\dots,k-1}$ be a Baire measurable coloring where $k$ is a positive integer. Then $X$ has a perfect $c$-homogeneous subset. Galvin proved a similar result for colorings of $[X]^3$, but with a weaker conclusion that triples from the perfect set take on at most two colors. Blass (1981) then extended Galvin’s result to colorings of $[X]^n$, showing that there is a perfect set that takes on at most $(n-1)!$ colors. Galvin’s result has many applications too. For example, Rafał Filipów and I used it in (Dorais–Filipów 2005) it to show that if $X$ is a perfect Abelian Polish group, then $X$ contains a Marczewski null set $A$ such that the algebraic sum $A + A$ is not Marczewski measurable. Taylor (1978) generalized the result to Baire measurable colorings $c:[X]^2\to\kappa$ where $\kappa$ is any cardinal smaller than $\DeclareMathOperator{\cov}{cov}\newcommand{\meager}{\mathcal{M}}\cov(\meager)$. Doing so, Taylor similarly generalized Mycielski’s Theorem, but he only stated the result for binary relations. Recently, Rafał Filipów, Tomasz Natkaniec and I needed this generalization for relations of arbitrary arity. Unfortunately, the Mycielski–Taylor result has never been stated in full generality, so we included a proof in our paper (Dorais–Filipów–Natkaniec 2013). I am copying this proof here because I think the result is of independent interest and our proof is a nice application of Cohen forcing. A nice consequence of this extended Mycielski–Taylor Theorem is that Blass’s result extends to Baire measurable colorings $c:[X]^n\to\kappa$ where $\kappa \lt \cov(\meager)$ in the same way that Taylor generalized Galvin’s result for partitions of pairs. Theorem (Mycielski 1964; Taylor 1978). Let $X$ be an uncountable Polish space and let $\mathcal{R}$ be a family of fewer than $\cov(\meager)$ closed nowhere dense relations on $X$, i.e., each $R \in \mathcal{R}$ is a closed nowhere dense subset of $X^n$ for some $n = n(R)$. Then $X$ contains a perfect set which is $R$-independent for every $R \in \mathcal{R}$. Our proof relies on the following forcing characterization of $\cov(\meager)$, which can be found in (Bartoszyński–Judah 1995). Lemma. If $\mathcal{P}$ is a countable partial order and $\mathcal{D}$ is a family of dense subsets of $\mathcal{P}$ with $\vert \mathcal{D} \vert \lt \cov(\meager)$, then there is a filter on $\mathcal{P}$ that meets every element of $\mathcal{D}$. In other words, $\cov(\meager) = \mathfrak{m}(\text{Cohen})$, in the notation of (Bartoszyński–Judah 1995). For simplicity, we will assume that $X$ is Baire space $\omega^\omega$. As usual, we write for $s \in \omega^{\lt\omega}$. We may assume that the family $\mathcal{R}$ at least contains the diagonal $\set{(x,x): x \in \omega^\omega}$. We may also assume that all relations $R\in\mathcal{R}$ are symmetric. (Otherwise, replace each $R \in \mathcal{R}$ by the relation $\bigcup_{\sigma\in\mathrm{Sym}(n)} \set{ (x_{\sigma(1)},\dots, x_{\sigma(n)}): (x_1,\dots, x_n)\in R}$, where $n=n(R)$ and $\mathrm{Sym}(n)$ denotes the set of all permutations of $\set{1,2,\dots,n}$.) Consider the partial order $\mathcal{P}$ whose conditions are pairs $p = (d_p,f_p)$ where $d_p \in \omega$ and $f_p:2^{d_p}\to\omega^{\lt\omega}$ is such that $\vert f_p(s) \vert \geq d_p$ for all $s \in 2^{d_p}$; the ordering of $\mathcal{P}$ is defined by $p \leq q$ iff $d_p \leq d_q$ and $f_p(s{\upharpoonright}d_p) \subseteq f_q(s)$ for all $s \in 2^{d_q}$. For $k \in \omega$ and $R \in \mathcal{R}$, consider the set $\mathcal{D}_{k,R}$ of all conditions $p \in \mathcal{P}$ such that $k \leq d_p$ and for all $n(R)$-element subset $\Sigma$ of $2^{d_p}$. (Note that this condition is slightly ambiguous since no ordering of $\Sigma$ is given, but since $R$ is assumed to be symmetric any ordering will do.) We claim $\mathcal{D}_{k,R}$ is always dense in $\mathcal{P}$. To see this fix a condition $p \in \mathcal{P}$. We may assume that $d_p \geq k$. Fix an enumeration $\Sigma_1,\dots,\Sigma_m$ of all $n(R)$-element subsets of $2^{d_p}$ and successively define conditions $p \leq p_1 \leq \cdots \leq p_m$ in such a way that $d_p = d_{p_1} = \cdots = d_{p_m}$ and $R \cap \prod_{s\in\Sigma_i} [f_{p_i}(s)] = \emptyset$ for every $i = 1,\dots,m$. This is always possible since $R$ is closed nowhere dense. Then, $p_m$ is the desired extension of $p$ in $\mathcal{D}_{k,R}$. By the Lemma, there is a filter $G$ over $\mathcal{P}$ that meets all dense sets $\mathcal{D}_{k,R}$ for $k \in \omega$ and $R \in \mathcal{R}$. We claim that the set is as required. Note that when $R$ is the diagonal relation, then $p \in D_{k,R}$ if and only if $d_p \geq k$ and the clopen sets $[f_p(s)]$ are pairwise disjoint for $s \in 2^{d_p}$. It follows that $Z$ is a perfect set. Now, we show that $Z$ is $R$-independent for each $R\in\mathcal{R}$. Let $z_1,\dots,z_n \in Z$ be distinct, where $n = n(R)$ is the arity of $R$. There is $k\in\omega$ such that $z_i\restriction k \neq z_j\restriction k$ for distinct $i,j=1,\dots,n$. Let $p\in G \cap D_{k,R}$. For every $i=1,\dots,n$ there are $s_i\in 2^{d_p}$ with $z_i\in[f_p(s_i)]$. Since $d_p\geq k$ and $z_i\restriction d_p \subset f_p(s_i)$, $s_1,\dots,s_n$ are pairwise distinct. Let $\Sigma=\set{s_1,\dots,s_n}$. Since $p\in D_{k,R}$, $R \cap \prod_{s \in \Sigma} [f_p(s)] = \emptyset.$ In particular, $(z_1,\dots,z_n) \notin R$. #### References 1. T. Bartoszyński, H. Judah, 1995: Set Theory: On the structure of the real line, A K Peters, Ltd. (Wellesley, MA). 2. A. Blass, 1981: A partition theorem for perfect sets, Proc. Amer. Math. Soc. 82, no. 2, 271–277. 3. F. G. Dorais, R. Filipów, 2005: Algebraic sums of sets in Marczewski-Burstin algebras, Real Anal. Exchange 31, no. 1, 133–142. 4. F. G. Dorais, R. Filipów, T. Natkaniec, 2013: On some properties of Hamel bases and their applications to Marczewski measurable functions, Central European Journal of Mathematics 11, no. 3, 487–508. 5. F. Galvin, 1968: Partition theorems for the real line, Notices Amer. Math. Soc. 15, 660. 6. J. Mycielski, 1964: Independent sets in topological algebras, Fund. Math. 55, no. 2, 139–147. 7. A. Taylor, 1978: Partitions of pairs of reals, Fund. Math. 99, no. 1, 51–59. Originally posted on by François G. Dorais. To the extent possible under law, François G. Dorais has waived all copyright and neigboring rights to this work.
2,320
7,132
{"found_math": true, "script_math_tex": 124, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.53125
3
CC-MAIN-2018-51
latest
en
0.848044
http://homeguides.sfgate.com/correct-chlorine-lock-swimming-pool-47805.html
1,505,925,590,000,000,000
text/html
crawl-data/CC-MAIN-2017-39/segments/1505818687333.74/warc/CC-MAIN-20170920161029-20170920181029-00677.warc.gz
154,618,558
20,109
# How to Correct Chlorine Lock in Your Swimming Pool Chlorine lock or stabilizer lock is a term used inaccurately and inappropriately by many uneducated providers of pool advice, service and chemicals. Contrary to the myth that too much stabilizer, most commonly cyanuric acid, or CYA, locks the chlorine to be unavailable and causes algae bloom, stabilizer is a critical part of the important Oxidation/Reduction Potential, or ORP, for the pool to maintain effective sanitation. Temperature, pH, stabilizer level and calcium concentration all have to be measured to make the proper adjustments to the pool chemistry. Pool chemistry and chlorination can be managed with CYA in the 150-to-200 parts per million range without draining and refill. #### 1 Measure the pool temperature and record. Test the pool water with the good test kit. Record the pH, free chlorine, total chlorine, CYA and calcium hardness. #### 2 Calculate the pool size factor. Divide the number of gallons in the pool by 120,000. All pool measurements are in parts per million. One pound of "pure" chlorine will raise the chlorine concentration of 1 million pounds of water by one part per million. Therefore, adjust the pool in question by the ideal pool of 120,000 gallons, or 1 million pounds of water. #### 3 Look up the minimum chlorine level in parts per million based on the pool's temperature and CYA level. See chart 1 in "Avoiding Algae in Chlorinated Swimming Pools." Also, calculate the chlorine breakpoint for superchlorination. Subtract the free chlorine from the total chlorine and the remainder is the combined chlorine. The breakpoint is the combined chlorine times 10. So if the combined chlorine is 0.5 parts per million, then the breakpoint would be 5.0 parts per million. #### 4 Calculate the amount of "pure" chloride to be added by multiplying the pool size factor from Step 2 by the chlorine breakpoint number. The result is the number of pounds of "pure" chlorine required to superchlorinate the pool to overwhelm the chloramines and ammonia. #### 5 Look up the chlorine preparation to use for the type of routine chlorination used in the pool. See chart 2 "Avoiding Algae in Chlorinated Swimming Pools." The calcium and stabilizer levels determine the preparation. For bleach, the conversion is 2 gallons per pound of "pure" chlorine (assumes 6 percent sodium hypochlorite solution). For Dichlor the conversion is about 30 ounces per pound. For Calcium hypochlorite the conversion is 25 ounces per pound. #### 6 Add the calculated superchlorination preparation to the pool. Change to a non-stabilized chlorine until CYA levels reduce to the 40-to-60 parts per million range. Regular back-washing and splash-out with routine water level maintenance will gradually reduce the CYA. Maintain the free chlorine levels at the level looked up in Step 2. Superchlorinate as necessary to remove chloramines and ammonia while maintaining pool clarity. #### Things You Will Need • Good pool test kit • Pool thermometer • Non-scented household bleach • Dichloroisocyanuric acid (Dichlor) • Calcium hypochlorite • The number of gallons in the pool #### Tips • Use a good test kit not strips. Taylor tests kits are the top choice by most certified pool operators. • Get your advice for pool maintenance from a trained and certified pool operator. Most janitorial supply companies have certified pool operators to test pool water and make chemistry recommendations. • Read all the tech articles on the Professional Pool Operators of America website. #### Warnings • Do not blindly "shock" a pool to rid it of algae. Use carefully calculated super-chlorination. • Be suspicious of the pool advice given by non-certified individuals. • Do not use oxygen based shocks, which give algae fertilizing residues.
824
3,805
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.546875
3
CC-MAIN-2017-39
longest
en
0.903699
https://nl.mathworks.com/matlabcentral/answers/1752855-perfect-square-in-matlab
1,696,040,869,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233510575.93/warc/CC-MAIN-20230930014147-20230930044147-00588.warc.gz
456,935,471
25,730
Perfect Square in Matlab 48 views (last 30 days) Zaid on 4 Jul 2022 Edited: Siraj on 4 Jul 2022 What is the most efficient way to check wether a number is a perfect square or not in matlab. Perfect square are 4,9,16 and so on Siraj on 4 Jul 2022 Edited: Siraj on 4 Jul 2022 Hi, It is my understanding that you want to know the easiest way to find whether a number is a perfect square or not. For this first you can take the square root of the number and then see if the square root is a proper integer or not. We know that any integer when divided by one leaves zero as the remainder, therefore we can use the “modulo” function to find the remainder of the square root when divided by one and if the remainder is zero means that the number is a perfect square. Refer to the documentation for more on modulo function in MATLAB. n = 49; %take the square root sq_rt = sqrt(n); % now check if the sq_rt is a proper integer or not int_or_not = mod(sq_rt,1); if(int_or_not == 0) disp("Prefect Square"); else disp("Not a Perfect Square"); end Prefect Square Chunru on 4 Jul 2022 x = (1:20); mod(sqrt(x), 1) == 0 ans = 1×20 logical array 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 Karan Kannoujiya on 4 Jul 2022 Hi Zaid, You can use below code to check for a perfect square--> %num---> number you want to check y=sqrt(num); z=ceil(y); if(z==y) disp('The number is perfect square number'); else disp('The number is not a perfect square number'); end Shivam Lahoti on 4 Jul 2022 you can check for perfect square by using the following check, however representable number might sparse if n is large enough. if floor(sqrt(n)).^2 == n
480
1,623
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.625
4
CC-MAIN-2023-40
latest
en
0.808378
https://www.hyperfinecourse.org/forums/topic/j-values-4/
1,657,198,889,000,000,000
text/html
crawl-data/CC-MAIN-2022-27/segments/1656104692018.96/warc/CC-MAIN-20220707124050-20220707154050-00773.warc.gz
840,752,858
7,377
# J-values homepage Forums three J-values J-values Viewing 1 post (of 1 total) • Author Posts • #2751 Score: 0 abomhals Participant I think that L and S are parallel and pointing in opposite directions for J = 0. They are parallel and pointing in the same direction for J = 2. And finally, they are perpendicular to each other if J = 1. My reasoning for this being that we can wright the relation between vectors J, L and S as vec(J) = vec(L) + vec(S). Viewing 1 post (of 1 total) • You must be logged in to reply to this topic.
148
532
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.8125
3
CC-MAIN-2022-27
latest
en
0.941297
http://sibmb-ba.blogspot.com/2011/08/euclidean-distance.html
1,529,906,791,000,000,000
text/html
crawl-data/CC-MAIN-2018-26/segments/1529267867493.99/warc/CC-MAIN-20180625053151-20180625073151-00473.warc.gz
310,493,045
14,398
## Monday, 29 August 2011 ### Euclidean Distance In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula. By using this formula as distance, Euclidean space (or even any inner product space) becomes a metric space. The associated norm is called the Euclidean norm. Older literature refers to the metric as Pythagorean metric. Despite the development of numerous types of geometry, Euclidean distance is still by far the most geometrical tool of applied scientists. For example, statisticians find it useful to calculate the proximity between samples. Application in Co-ordinate Geometry: In one-dimension: Euclidean distance will be the absolute value of their numerical difference. Euclidean Distance = I x-y I In two-dimension: If u=(x1,y1) and v=(x2,y2) are two points on the plane, their Euclidean distance is given by Euclidean Distance= sqrt [ (x1−x2)2+(y1−y2)2 ] Geometrically, it's the length of the segment joining u and v. In three-dimension: In three-dimensional Euclidean space, the distance is Euclidean Distance= sqrt [ (x1−x2)2+(y1−y2)2 + (z1-z2)2 ] In N dimensions: In general, for an n-dimensional space, the distance is Euclidean Distance= sqrt [ (a1−b1)2+(a2−b2)2 + (a1-b2)2 +….+ (an-bn)2] Using the Euclidean distances, we can create what is known as the Euclidean Distance Matrix. A Euclidean distance matrix is a matrix (two-dimensional array) containing the Euclidean distances, taken pair-wise, between a set of points. This matrix will have a size of N×N where N is the number of objects.This matrix is symmetric in nature – that is Xi,j = Xj,I. Example: Below are various objects. Now we will calculate the Euclidean distance between each of them, pair wise The Euclidean distance matrix would be: a b c d e f a 0 184 222 177 216 231 b 184 0 45 123 128 200 c 222 45 0 129 121 203 d 177 123 129 0 46 83 e 216 128 121 46 0 83 f 231 200 203 83 83 0 Posted by Saurabh Agarwal Finance
560
2,056
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.375
4
CC-MAIN-2018-26
latest
en
0.906258
http://hackage.haskell.org/package/HaskellForMaths-0.1.5/docs/src/Math-Algebra-Group-PermutationGroup.html
1,519,445,270,000,000,000
text/html
crawl-data/CC-MAIN-2018-09/segments/1518891815318.53/warc/CC-MAIN-20180224033332-20180224053332-00012.warc.gz
153,397,768
10,323
```-- Copyright (c) David Amos, 2008. All rights reserved. module Math.Algebra.Group.PermutationGroup where import qualified Data.List as L import qualified Data.Map as M import qualified Data.Set as S import Math.Common.ListSet (toListSet, union, (\\) ) -- a version of union which assumes the arguments are ascending sets (no repeated elements) rotateL (x:xs) = xs ++ [x] -- PERMUTATIONS -- |Type for permutations, considered as group elements. newtype Permutation a = P (M.Map a a) deriving (Eq,Ord) fromPairs xys | isValid = fromPairs' xys | otherwise = error "Not a permutation" where (xs,ys) = unzip xys (xs',ys') = (L.sort xs, L.sort ys) isValid = xs' == ys' && all ((==1) . length) (L.group xs') -- ie the domain and range are the same, and are *sets* fromPairs' xys = P \$ M.fromList \$ filter (uncurry (/=)) xys -- we remove fixed points, so that the derived Eq instance works as expected toPairs (P g) = M.toList g fromList xs = fromPairs \$ zip xs (L.sort xs) -- for example, fromList [2,3,1] is [[1,3,2]] - because the 1 moved to the 3 position -- the support of a permutation is the points it moves (returned in ascending order) supp (P g) = M.keys g -- (This is guaranteed not to contain fixed points provided the permutations have been constructed using the supplied constructors) -- |x .^ g returns the image of a vertex or point x under the action of the permutation g (.^) :: (Ord k) => k -> Permutation k -> k x .^ P g = case M.lookup x g of Just y -> y Nothing -> x -- if x `notElem` supp (P g), then x is not moved -- construct a permutation from cycles fromCycles cs = fromPairs \$ concatMap fromCycle cs where fromCycle xs = zip xs (rotateL xs) -- |Construct a permutation from a list of cycles p :: (Ord a) => [[a]] -> Permutation a p cs = fromCycles cs -- can't specify in pointfree style because of monomorphism restriction -- convert a permutation to cycles toCycles g = toCycles' \$ supp g where toCycles' ys@(y:_) = let c = cycleOf g y in c : toCycles' (ys L.\\ c) toCycles' [] = [] cycleOf g x = cycleOf' x [] where cycleOf' y ys = let y' = y .^ g in if y' == x then reverse (y:ys) else cycleOf' y' (y:ys) instance (Ord a, Show a) => Show (Permutation a) where show g = show (toCycles g) parity g = let cs = toCycles g in (length (concat cs) - length cs) `mod` 2 -- parity' g = length (filter (even . length) \$ toCycles g) `mod` 2 sign g = (-1)^(parity g) orderElt g = foldl lcm 1 \$ map length \$ toCycles g -- == order [g] instance (Ord a, Show a) => Num (Permutation a) where g * h = fromPairs' [(x, x .^ g .^ h) | x <- supp g `union` supp h] -- signum = sign -- doesn't work, complains about no (+) instance fromInteger 1 = P \$ M.empty inverse (P g) = P \$ M.fromList \$ map (\(x,y)->(y,x)) \$ M.toList g -- |A trick: g^-1 returns the inverse of g (^-) :: (Ord k, Show k) => Permutation k -> Int -> Permutation k g ^- n = inverse g ^ n instance (Ord a, Show a) => Fractional (Permutation a) where recip = inverse -- conjugation g ~^ h = h^-1 * g * h -- commutator comm g h = g^-1 * h^-1 * g * h -- ORBITS -- |b -^ g returns the image of an edge or block b under the action of g (-^) :: (Ord t) => [t] -> Permutation t -> [t] xs -^ g = L.sort [x .^ g | x <- xs] closureS xs fs = closure' S.empty (S.fromList xs) where closure' interior boundary | S.null boundary = interior | otherwise = let interior' = S.union interior boundary boundary' = S.fromList [f x | x <- S.toList boundary, f <- fs] S.\\ interior' in closure' interior' boundary' closure xs fs = S.toList \$ closureS xs fs orbit action x gs = closure [x] [ (`action` g) | g <- gs] x .^^ gs = orbit (.^) x gs orbitP gs x = orbit (.^) x gs orbitV gs x = orbit (.^) x gs -- orbit of a block b -^^ gs = orbit (-^) b gs orbitB gs b = orbit (-^) b gs orbitE gs b = orbit (-^) b gs {- -- orbit of a vertex / point x .^^ gs = closure [x] [ .^g | g <- gs] orbitV gs x = closure [x] [ .^g | g <- gs] orbitP gs x = closure [x] [ .^g | g <- gs] -- orbit of an edge / block b -^^ gs = closure [b] [ -^g | g <- gs] orbitE gs b = closure [b] [ -^g | g <- gs] orbitB gs b = closure [b] [ -^g | g <- gs] -} action xs f = fromPairs [(x, f x) | x <- xs] -- probably supercedes the three following functions -- find all the orbits of a group -- (as we typically work with transitive groups, this is more useful for studying induced actions) -- (Note that of course this won't find orbits of points which are fixed by all elts of G) orbits gs = let xs = foldl union [] \$ map supp gs in orbits' xs where orbits' [] = [] orbits' (x:xs) = let o = x .^^ gs in o : orbits' (xs L.\\ o) -- GROUPS -- Some standard sequences of groups, and constructions of new groups from old -- |Generators for Cn, the cyclic group of order n _C n | n >= 2 = [p [[1..n]]] -- D2n, dihedral group of order 2n, symmetry group of n-gon -- For example, _D 8 == _D2 4 == symmetry group of square _D n | r == 0 = _D2 q where (q,r) = n `quotRem` 2 _D2 n | n >= 3 = [a,b] where a = p [[1..n]] -- rotation b = p [[i,n+1-i] | i <- [1..n `div` 2]] -- reflection -- b = fromPairs \$ [(i,n+1-i) | i <- [1..n]] -- reflection -- |Generators for Sn, the symmetric group on [1..n] _S n | n >= 3 = [s,t] | n == 2 = [t] | n == 1 = [] where s = p [[1..n]] t = p [[1,2]] -- |Generators for An, the alternating group on [1..n] _A n | n > 3 = [s,t] | n == 3 = [t] | n == 2 = [] where s | odd n = p [[3..n]] | even n = p [[1,2], [3..n]] t = p [[1,2,3]] -- Direct product of groups -- Given generators for H and K, acting on sets X and Y respectively, -- return generators for H*K, acting on the disjoint union X+Y (== Either X Y) dp hs ks = [P \$ M.fromList \$ map (\(x,x') -> (Left x,Left x')) \$ M.toList h' | P h' <- hs] ++ [P \$ M.fromList \$ map (\(y,y') -> (Right y,Right y')) \$ M.toList k' | P k' <- ks] -- Wreath product of groups -- Given generators for H and K, acting on sets X and Y respectively, -- return generators for H wr K, acting on X*Y (== (X,Y)) -- (Cameron, Combinatorics, p229-230; Cameron, Permutation Groups, p11-12) wr hs ks = let _X = S.toList \$ foldl S.union S.empty [M.keysSet h' | P h' <- hs] -- set on which H acts _Y = S.toList \$ foldl S.union S.empty [M.keysSet k' | P k' <- ks] -- set on which K acts -- Then the wreath product acts on cartesian product X * Y, -- regarded as a fibre bundle over Y of isomorphic copies of X _B = [P \$ M.fromList \$ map (\(x,x') -> ((x,y),(x',y))) \$ M.toList h' | P h' <- hs, y <- _Y] -- bottom group B applies the action of H within each fibre _T = [P \$ M.fromList [((x,y),(x,y')) | x <- _X, (y,y') <- M.toList k'] | P k' <- ks] -- top group T uses the action of K to permute the fibres in _B ++ _T -- semi-direct product of B and T -- embed group elts into Sn - ie, convert so that the set acted on is [1..n] toSn gs = [toSn' g | g <- gs] where _X = foldl union [] \$ map supp gs -- the set on which G acts mapping = M.fromList \$ zip _X [1..] -- the mapping from _X to [1..n] toSn' g = fromPairs' \$ map (\(x,x') -> (mapping M.! x, mapping M.! x')) \$ toPairs g -- INVESTIGATING GROUPS -- Functions to investigate groups in various ways -- Most of these functions will only be efficient for small groups (say |G| < 10000) -- For larger groups we will need to use Schreier-Sims and associated algorithms -- |Given generators for a group, return a (sorted) list of all elements of the group elts :: (Num a, Ord a) => [a] -> [a] elts gs = closure [1] [ (*g) | g <- gs] eltsS gs = closureS [1] [ (*g) | g <- gs] order gs = S.size \$ eltsS gs -- length \$ elts gs isMember gs h = h `S.member` eltsS gs -- h `elem` elts gs -- TRANSVERSAL GENERATING SETS -- The functions graphAuts2 and graphAuts3 return generating sets consisting of successive transversals -- In this case, we don't need to run Schreier-Sims to list elements or calculate order -- calculate the order of the group, given a "transversal generating set" orderTGS tgs = let transversals = map (1:) \$ L.groupBy (\g h -> (head . supp) g == (head .supp) h) tgs in product \$ map L.genericLength transversals -- list the elts of the group, given a "transversal generating set" eltsTGS tgs = let transversals = map (1:) \$ L.groupBy (\g h -> (head . supp) g == (head .supp) h) tgs in map product \$ sequence transversals -- MORE INVESTIGATIONS -- given the elts of a group, find generators gens hs = gens' [] (S.singleton 1) hs where gens' gs eltsG (h:hs) = if h `S.member` eltsG then gens' gs eltsG hs else gens' (h:gs) (eltsS \$ h:gs) hs gens' gs _ [] = reverse gs -- conjClass gs h = orbit (~^) gs h -- Conjugacy class - should only be used for small groups h ~^^ gs = conjClass gs h conjClass gs h = closure [h] [ (~^ g) | g <- gs] -- conjClass gs h = h ~^^ gs conjClassReps gs = conjClassReps' (elts gs) where conjClassReps' (h:hs) = let cc = conjClass gs h in (h, length cc) : conjClassReps' (hs \\ cc) conjClassReps' [] = [] -- using the ListSet implementation of \\, since we know both lists are sorted {- -- This is just the orbits under conjugation. Can we generalise "orbits" to help us here? conjClasses gs = conjClasses' (elts gs) where conjClasses' [] = [] conjClasses' (h:hs) = let c = conjClass gs h in c : conjClasses' (hs L.\\ c) -} -- centralizer of a subgroup or a set of elts -- the centralizer of H in G is the set of elts of G which commute with all elts of H centralizer gs hs = [k | k <- elts gs, all (\h -> h*k == k*h) hs] -- the centre of G is the set of elts of G which commute with all other elts centre gs = centralizer gs gs -- normaliser of a subgroup -- the normaliser of H in G is {g <- G | g^-1Hg == H} -- it is a subgroup of G, and H is a normal subgroup of it: H <|= N_G(H) <= G normalizer gs hs = [g | g <- elts gs, all (\h -> h~^g `elem` elts hs) hs] -- stabilizer of a point stabilizer gs x = [g | g <- elts gs, x .^ g == x] -- pointwise stabiliser of a set ptStab gs xs = [g | g <- elts gs, and [x .^ g == x | x <- xs] ] -- setwise stabiliser of a set setStab gs xs = [g | g <- elts gs, xs -^ g == xs] -- given list of generators, try to find a shorter list reduceGens (1:gs) = reduceGens gs reduceGens (g:gs) = reduceGens' ([g], eltsS [g]) gs where reduceGens' (gs,eltsgs) (h:hs) = if h `S.member` eltsgs then reduceGens' (gs,eltsgs) hs else reduceGens' (h:gs, eltsS \$ h:gs) hs reduceGens' (gs,_) [] = reverse gs -- normal closure of H in G normalClosure gs hs = reduceGens \$ hs ++ [h ~^ g | h <- hs, g <- gs ++ map inverse gs] -- commutator gp of H and K commutatorGp hs ks = normalClosure (hsks) [h^-1 * k^-1 * h * k | h <- hs', k <- ks'] where hs' = reduceGens hs ks' = reduceGens ks hsks = reduceGens (hs' ++ ks') -- no point processing more potential generators than we have to -- derived subgroup derivedSubgp gs = commutatorGp gs gs -- ACTIONS ON COSETS AND SUBGROUPS (QUOTIENT GROUPS) isSubgp hs gs = all (isMember gs) hs isNormal hs gs = isSubgp hs gs && all (isMember hs) [h~^g | h <- hs, g <- gs] -- action of a group on cosets by right multiplication -- (hs should be all elts, not just generators) hs **^ g = L.sort [h*g | h <- hs] -- Cosets are disjoint, which leads to Lagrange's theorem -- cosets gs hs = closure [hs] [ **^ g | g <- gs] cosets gs hs = orbit (**^) hs gs -- the group acts transitively on cosets of a subgp, so this gives all cosets -- hs #^^ gs = orbit (#^) gs hs cosetAction gs hs = let _H = elts hs cosets_H = cosets gs _H in toSn [action cosets_H (**^ g) | g <- gs] -- in toSn \$ map (induced (**^) cosets_H) gs -- if H normal in G, then each element within a given coset gives rise to the same action on other cosets, -- and we get a well defined multiplication Hx * Hy = Hxy (where it doesn't depend on which coset rep we chose) quotientGp gs hs | hs `isNormal` gs = gens \$ cosetAction gs hs | otherwise = error "quotientGp: not well defined unless H normal in G" -- the call to gens removes identity and duplicates gs // hs = quotientGp gs hs -- action of group on a subgroup by conjugation -- (hs should be all elts, not just generators) hs ~~^ g = L.sort [h ~^ g | h <- hs] -- don't think that this is necessarily transitive on isomorphic subgps -- conjugateSubgps gs hs = closure [hs] [ ~~^ g | g <- gs] conjugateSubgps gs hs = orbit (~~^) hs gs -- hs ~~^^ gs = orbit (~~^) gs hs subgpAction gs hs = let _H = elts hs conjugates_H = conjugateSubgps gs _H in toSn [action conjugates_H (~~^ g) | g <- gs] -- in toSn \$ map (induced (~~^) conjugates_H) gs -- in cube gp, the subgps all appear to correspond to stabilisers of subsets, or of blocks {- OLDER VERSIONS -- the orbit of a point or block under the action of a set of permutations orbit action x gs = S.toList \$ orbitS action x gs orbitS action x gs = orbit' S.empty (S.singleton x) where orbit' interior boundary | S.null boundary = interior | otherwise = let interior' = S.union interior boundary boundary' = S.fromList [p `action` g | g <- gs, p <- S.toList boundary] S.\\ interior' in orbit' interior' boundary' -- orbit of a point -} {- -- the induced action of g on a set of blocks -- Note: the set of blocks must be closed under the action of g, otherwise we will get an error in fromPairs -- To ensure that it is closed, generate the blocks as the orbit of a starting block inducedAction bs g = fromPairs [(b, b -^ g) | b <- bs] induced action bs g = fromPairs [(b, b `action` g) | b <- bs] inducedB bs g = induced (-^) bs g -} -- elts gs = orbit (*) 1 gs -- eltsS gs = orbitS (*) 1 gs ```
4,338
13,422
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.9375
3
CC-MAIN-2018-09
latest
en
0.800168
https://statistics.laerd.com/spss-tutorials/goodman-and-kruskals-gamma-using-spss-statistics.php
1,590,676,705,000,000,000
text/html
crawl-data/CC-MAIN-2020-24/segments/1590347399820.9/warc/CC-MAIN-20200528135528-20200528165528-00166.warc.gz
562,262,335
10,143
Goodman and Kruskal's gamma using SPSS Statistics Introduction Goodman and Kruskal's gamma (G or γ) is a nonparametric measure of the strength and direction of association that exists between two variables measured on an ordinal scale. Whilst it is possible to analyse such data using Spearman's rank-order correlation or Kendall's tau-b, Goodman and Kruskal's gamma is recommended when your data has many tied ranks. For example, you could use Goodman and Kruskal's gamma to understand whether there is an association between restaurant star rating and price bracket (i.e., where there were five possible star ratings – 1 star (*), 2 star (**), 3 star (***), 4 star (****) and 5 star (*****) – and price bracket was split into three categories: inexpensive (\$), moderate (\$\$) and expensive (\$\$\$)). Alternately, you could use Goodman and Kruskal's gamma to understand whether there is an association between test anxiety and exam duration (i.e., where test anxiety had three categories – low, moderate and high – and exam duration was split into four categories: 1 hour, 2 hours, 3 hours and 4 hours). Note: Goodman and Kruskal's gamma can be used when both ordinal variables have just two categories. For example, you could use Goodman and Kruskal's gamma to understand whether there is an association between exam performance (i.e., with two categories: "pass" or "fail") and test anxiety level (i.e., with two categories: "high" or "low"). However, in such cases, another statistical test called Yule's Q, which is a special case of Goodman and Kruskal's gamma is typically used instead. Yule's Q can also be used to analyse the strength and direction of association between two dichotomous variables (e.g., an example of a dichotomous variable would be "gender", which has two categories: "males" and "females"). This "quick start" guide shows you how to carry out Goodman and Kruskal's gamma using SPSS Statistics. We show you the Crosstabs... procedure to carry out Goodman and Kruskal's gamma using SPSS Statistics in the Procedure section. First, we introduce you to the assumptions that you must consider when carrying out Goodman and Kruskal's gamma. Assumptions When you choose to analyse your data using Goodman and Kruskal's gamma, part of the process involves checking to make sure that the data you want to analyse can actually be analysed using Goodman and Kruskal's gamma. You need to do this because it is only appropriate to use Goodman and Kruskal's gamma if your data "passes" two assumptions that are required for Goodman and Kruskal's gamma to give you a valid result. In practice, checking for these two assumptions just adds a little bit more time to your analysis, requiring you to click of few more buttons in SPSS Statistics when performing your analysis, as well as think a little bit more about your data, but it is not a difficult task. These two assumptions are: • Assumption #1: Your two variables should be measured on an ordinal scale. Examples of ordinal variables include Likert scales (e.g., a 7-point scale from "strongly agree" through to "strongly disagree"), amongst other ways of ranking categories (e.g., a 5-point scale explaining how much a customer liked a product, ranging from "Not very much" to "Yes, a lot"). You can learn more about ordinal variables in our article: Types of Variable. • Assumption #2: There needs to be a monotonic relationship between the two variables. A monotonic relationship exists when either the variables increase in value together, or as one variable value increases, the other variable value decreases. It is typically not possible to check this assumption when running a Goodman and Kruskal's gamma analysis. If your data fails these assumptions, you should consider using a different statistical test, which we show you how to do in our Statistical Test Selector (N.B., this is part of our enhanced content). In the section, Test Procedure in SPSS Statistics, we illustrate the SPSS Statistics procedure to perform Goodman and Kruskal's gamma assuming that no assumptions have been violated. First, we set out the example we use to explain the Goodman and Kruskal's gamma procedure in SPSS Statistics. Example A researcher at the Department of Health wants to determine if there is an association between the amount of physical activity people undertake and obesity levels. They recruited 250 people to take part in a study to find out. These participants were randomly sampled from the population. Participants were asked to complete a questionnaire explaining their level of physical activity. Based on the results from this questionnaire, participants were categorized into one of five physical activity levels: "sedentary", "low", "moderate", "high" and "very high". Participants were also assessed by a nurse practitioner to determine their body fat classification. Based on this assessment, participants were categorized into one of four levels: "morbidly obese", "obese", "normal" and "underweight". These ordered responses reflected the categories of our two variables: physical_activity_level (i.e., with five categories: "sedentary", "low", "moderate", "high" and "very high") and body_fat_classification (i.e., with four categories: "morbidly obese", "obese", "normal" and "underweight"). Therefore, in the Variable View of SPSS Statistics two ordinal variables were created so that the data collected could be entered: physical_activity_level and body_fat_classification. Next, the data from the 250 participants was entered into the Data View of SPSS Statistics. Data Setup in SPSS Statistics For a Goodman and Kruskal's gamma, you will have either two or three variables: (1) The ordinal variable, physical_activity_level, which has five ordered categories: "sedentary", "low", "moderate", "high" and "very high"; (2) The ordinal variable, body_fat_classification, which has four ordered categories: "underweight", "normal", "obese" and "morbidly obese". (3) The frequencies (i.e., total counts) for the two ordinal variables above (i.e., the number of participants for each cell combination). This is captured in the variable, freq. In the diagram below, we show you how you would have set up your data in the Data View of SPSS Statistics if you had entered your data using: (a) the individual scores for each participant (shown in the diagram on the left below), where you only have two variables; or (b) total count data, also known as frequencies (shown in the diagram on the right below), where you have three variables. Published with written permission from SPSS Statistics, IBM Corporation. If you are unsure how to correctly enter these variables into the Variable View and Data View of SPSS Statistics so that you can carry out your analysis, we show you how in our enhanced Goodman and Kruskal's gamma guide. Just remember that if you have entered your data using total count data (i.e., frequencies), shown in the diagram on the right above, you will also have to weight your cases before you can analyse your data (i.e., this is an additional procedure in SPSS Statistics). You can learn about our enhanced data setup content on our Features: Data Setup page or subscribe to the site to access our enhanced Goodman and Kruskal's gamma guide. Test Procedure in SPSS Statistics The six steps below show you how to analyse your data using Goodman and Kruskal's gamma in SPSS Statistics when neither of the two assumptions in the previous section, Assumptions, have been violated. At the end of these six steps, we show you how to interpret the results from this test. 1. Click Analyze > Descriptive Statistics > Crosstabs... on the top menu, as shown below: Published with written permission from SPSS Statistics, IBM Corporation. You will be presented with the Crosstabs dialogue box, as shown below: Published with written permission from SPSS Statistics, IBM Corporation. 2. Transfer the variable, physical_activity_level, into the Row(s): box, and the variable, body_fat_classification, into the Column(s): box, by dragging-and-dropping or by clicking the relevant buttons. You will end up with a screen similar to the one below: Published with written permission from SPSS Statistics, IBM Corporation. 3. Click on the button. You will be presented with the following Crosstabs: Statistics dialogue box: Published with written permission from SPSS Statistics, IBM Corporation. 4. Select the Gamma tick box in the –Ordinal– area, as shown below: Published with written permission from SPSS Statistics, IBM Corporation. 5. Click on the button. 6. Click on the button. This will generate the results. Join the 10,000s of students, academics and professionals who rely on Laerd Statistics. Interpreting the Results for Goodman and Kruskal's gamma SPSS Statistics generates three main tables for the Goodman and Kruskal's gamma procedure that you ran in the previous section. In this "quick start" guide we focus on the results from the Goodman and Kruskal's gamma procedure only, assuming that your data met all the assumptions of this test. Therefore, when running the Goodman and Kruskal's gamma procedure, start with the Case Processing Summary table: Published with written permission from SPSS Statistics, IBM Corporation. The Case Processing Summary table provides a useful check of your data to determine the valid sample size, N, and whether you have any missing data. In our example, there were 250 participants with no missing data. Next, you should get a 'feel' for your data using the table showing the crosstabulation of the data (this will be labelled based on your two variables; in our case, the physical_activity_level * body_fat_classification Crosstabulation table), as shown below: Published with written permission from SPSS Statistics, IBM Corporation. You can use this table to provide descriptive statistics, possibly presented in a table format, so that any readers of your work can understand (and replicate or extend) your results. Finally, you should consult the Symmetric Measures table, which provides the result of Goodman and Kruskal's gamma, as shown below: Published with written permission from SPSS Statistics, IBM Corporation. Goodman and Kruskal's gamma is presented in the "Gamma" row of the "Value" column and is -.509 in this example. This indicates that as physical activity levels rise, body fat classification improves. Furthermore, the "Approx. Sig." column shows that the statistical significance value (i.e., p-value) is .000, which means p < .0005. Therefore, the association between physical activity level and body fat classification is statistically significant. Reporting the Results for Goodman and Kruskal's gamma In our example, you might present the results as follows: • General Goodman and Kruskal's gamma was run to determine the association between physical activity level and body fat classification amongst 250 participants. There was a strong, negative correlation between physical activity level and health status, which was statistically significant (G = -.509, p < .0005). In our enhanced Goodman and Kruskal's gamma guide, we show you how to report your results using the Harvard and APA styles, as well as illustrating how to displaying your results in a clustered bar chart. You can learn more about our enhanced content on our Features: Overview page. Join the 10,000s of students, academics and professionals who rely on Laerd Statistics.
2,428
11,471
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.890625
3
CC-MAIN-2020-24
longest
en
0.922809
https://develacademy.com/caesar-cipher/
1,603,386,542,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107880014.26/warc/CC-MAIN-20201022170349-20201022200349-00352.warc.gz
285,420,634
3,232
# Caesar Cipher Caesar cipher a simple yet clever cipher that encrypts the open text by shifting each letter by three letters. ## Encrypting Move each letter of an open text by three. So the letter “a” becomes “d”, the letter “b” becomes “e” etc. We can create a plain table that makes encrypting easy: a b c d e f g h i j k l m n o p q r s t u v w x y z d e f g h i j k l m n o p q r s t u v w x y z a b c In the first row, there are letters from the open text. In the second row, there are equivalent letters from the cipher text. Thus encrypting the word “caesar” yields resulting cipher word “fdhvdu”. ## Decrypting Decrypting is as easy as encrypting. We move each letter back by three letters. So the letter “d” in cipher text becomes “a” in open text etc. We can construct the table for decrypting as we did for encrypting: a b c d e f g h i j k l m n o p q r s t u v w x y z x y z a b c d e f g h i j k l m n o p q r s t u v w Suppose we have a cipher word “flskhu”. Using this table we can decrypt the word to “cipher”. ## Generalizing the Caesar Cipher into the Shift Cipher The described cipher is very weak because if you know the algorithm you can always decrypt the cipher text to the open text. This is very inconvenient since the purpose of a cipher is to deny reading and understanding the cipher text. We can make the cipher slightly more secure by letting the person choose the encryption key. Thus instead of shifting the open text by three letters, we can shift it by any number of letters. The key of the Caesar cipher is represented by a single letter. If you encrypt the letter “a” by this key, you get the key. So for example, the encryption table for key “q“ looks like this: You can actually choose whatever key you like and see the encryption table for the given key. There is one special case: if you try key “a”, the second row will look the same as the first one. It means that when you encrypt some text using cipher key “a”, you’ll get the same text. No encryption will be done. Use this tool to encrypt or decrypt any text you want: ## How to Crack the Cipher The Shift cipher has an obvious weakness. Because the English alphabet has 26 letters we can only choose from 26 different keys. We already know that the letter “a” yields the same cipher text thus we essentially choose from 25 different keys. The simplest way to break the cipher is to try all possible keys. Eventually we get the original message. It is quite easy to automate such algorithm. The only thing we need is to pragmatically recognize which text is more likely to be meaningful than other texts. How can we do it? Each language has different frequency of letters. If we harvest a lot of texts, we can analyze which letters are used more than other letters. For example, the most used letter in English is the letter “e”. The least used letter is the letter “z”. Using such analysis we get a table with frequencies for each letter: letter frequency letter frequency a 8.167 % n 6.749 % b 1.492 % o 7.507 % c 2.782 % p 1.929 % d 4.253 % q 0.095 % e 12.702 % r 5.987 % f 2.228 % s 6.327 % g 2.015 % t 9.056 % h 6.094 % u 2.758 % i 6.966 % v 0.978 % j 0.153 % w 2.360 % k 0.772 % x 0.150 % l 4.025 % y 1.974 % m 2.406 % z 0.074 % We read the table as out of all letters, 8.167 % of them were letter “a”. Now we can use this data to crack the Caesar cipher. We decrypt the cipher text by all 26 letters and we compute the frequency of each letter in decrypted text. Then we compare the frequencies with the given frequencies in the table. The frequency that is closest to the frequency of English text is the original open text. Try it! Encrypt some sentence or whole paragraph and then paste the encrypted text in the following tool and crack it! The tool is supposed to guess the encryption key on its own.
992
3,831
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.5
4
CC-MAIN-2020-45
latest
en
0.888774
https://www.easycalculation.com/physics/electromagnetism/embedded_ohms-law-current.php
1,653,812,350,000,000,000
text/html
crawl-data/CC-MAIN-2022-21/segments/1652663048462.97/warc/CC-MAIN-20220529072915-20220529102915-00193.warc.gz
817,918,401
2,184
## Ohm's Law Current Calculator Calculate Current with Power and Voltage: Power(P) = W Voltage(E) = V Current(I) = A Calculate Current with Power and Resistance: Power(P) = W Resistance(R) = ohm Current(I) = A Calculate Current with Voltage and Resistance: Voltage(E) = V Resistance(R) = ohm Current(I) = A
79
312
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.25
3
CC-MAIN-2022-21
longest
en
0.881347
http://ontariomath.blogspot.com/2019/06/math-links-for-week-ending-jun-28th-2019.html
1,580,320,264,000,000,000
text/html
crawl-data/CC-MAIN-2020-05/segments/1579251801423.98/warc/CC-MAIN-20200129164403-20200129193403-00103.warc.gz
119,312,397
21,118
## Friday, June 28, 2019 ### Math Links for Week Ending Jun. 28th, 2019 New updates on the Mathies Pattern Blocks app. That is, they have added some new shapes. The dart, the kite and the right angle are all part of the 21st Century Pattern blocks found on the Talking Math with your Kids site. Now there are a pile of options when you have your kids build with the pattern blocks. This is just the development version so I'm not sure when you will see it in the public version but you can play right now with the link below. Curriculum Tags: Gr7, Gr8 https://mathclips.ca/swfPlayer.html?swfURL=tools/PatternBlocks21.swf&title=Pattern%20Blocks%2B%20Dev When we were at #NCTM2019 in San Diego this year the funnest way to get around the city was on these electric scooters. Well @MrOrr_Geek with the help of @mathletepearce has created a 3Act Math task. Watch a video to pique students interests. The video shows a split or POV riding with the app screen. Then you can use linear relations tools to figure out the total cost of the trip. Curriculum Tags: MPM1D, MFM1P https://mrorr-isageek.com/no-bikes-allowed/ Have your kids give this a try. Take the parabola y=x2 and pick two points on the parabola. Multiply the x values of the points and the product turns out to be the y intersection of the line connecting the two points. Why not try to investigate why this works? Curriculum Tags: MPM2D, MCR3U Have you heard of the Tribonacci sequence? How about the Rauzy fractal? Well I can say that I have played with the tiles that @Gelada shows here but I didn't know all the other stuff. So fun Curriculum Tags: All Here is a great way to gain some empathy with your ESL students Curriculum Tags: All 1. The learning process consists of video-based instruction, computer graded assignments and a dashboard which allows the student and parent to track progress. primary 6 english tuition primary 5 english tuition primary 4 english tuition primary 3 english tuition primary 6 math tuition primary 5 math tuition primary school maths tuition maths tuition singapore 2. The main focus will be on learning different techniques in solving word problems.Once the techniques are in place, solving word problems would be a breeze. primary 4 math tuition primary 3 math tuition primary 6 science tuition primary 5 science tuition primary 4 science tuition primary 3 science tuition best math tuition primary mathematics tuition 3. The main focus will be on learning different techniques in solving word problems.Once the techniques are in place, solving word problems would be a breeze. primary 4 math tuition primary 3 math tuition primary 6 science tuition primary 5 science tuition primary 4 science tuition primary 3 science tuition best math tuition primary mathematics tuition 4. Great post! I was staying constantly this post and I am impressed, which is a very applicable information. I consider for such a wonderful information a lot and I was looking for this particular details for a very long period. Oracle Training in Chennai Oracle Training Social Media Marketing Courses in Chennai Tableau Training in Chennai Primavera Training in Chennai Unix Training in Chennai Pega Training in Chennai Oracle DBA Training in Chennai Power BI Training in Chennai Oracle Training in Velachery 5. Thanks for sharing excellent information. Soulblu 6. INSTEAD OF GETTING A LOAN,, I GOT SOMETHING NEW Get \$5,500 USD every day, for six months! See how it works Do you know you can hack into any Credit cards machine with a hacked Credit cards?? Make up your mind before applying, straight deal... Order for a blank Credit cards now and get millions within a week!: contact us We have specially programmed Credits Cards that can be use to hack Credit cards Machines Nation Wide, the Credits Cards can be used to withdraw at any Credits Cards or swipe Machines, at Stores and POS Machines. We sell this cards to all our customers and interested buyers worldwide, the Credit Card has a daily withdrawal limit of \$5,500 at any Credit cards Machines and up to \$50,000 spending limit in stores depending on the kind of card you order for. Credits Cards Can also be used in any other cyber hack{Services}, we are here for you anytime any day. Here is our price lists for the Credits Cards: Cards that withdraw \$5,500 per day costs \$200 USD Cards that withdraw \$10,000 per day costs \$850 USD Cards that withdraw \$35,000 per day costs \$2,200 USD Cards that withdraw \$50,000 per day costs \$5,500 USD Cards that withdraw \$100,000 per day costs \$8,500 USD make up your mind before applying, straight deal!!! The price include shipping fees and charges, order now: contact us via
1,098
4,683
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.46875
3
CC-MAIN-2020-05
latest
en
0.921032
https://math.stackexchange.com/questions/3029043/unique-rational-approximation-with-small-denominator
1,579,803,491,000,000,000
text/html
crawl-data/CC-MAIN-2020-05/segments/1579250611127.53/warc/CC-MAIN-20200123160903-20200123185903-00287.warc.gz
537,784,159
30,124
Unique Rational Approximation With “Small” Denominator Suppose we have some irrational $$x > 0$$ and some $$\epsilon > 0$$. I want to show that there is at most one rational approximation $$\frac{a}{b}$$ such that both $$| x - \frac{a}{b}| < \epsilon$$ and $$b < \frac{1}{\sqrt{2 \epsilon}}$$ Here are my thoughts. Let $$N \in \mathbb{N}$$ be the least integer greater than $$\frac{1}{\sqrt{2 \epsilon}}$$. Then we can use Dirichlet's Approximation Theorem, to get $$p,q \in \mathbb{Z}$$ such that $$1 \leq q < N$$, and $$|x - \frac{p}{q}| < \frac{1}{N^2} < 2 \epsilon$$. I don't know how to deal with that $$2$$ though, and this says nothing about uniqueness. On the other hand, if we work the other direction and bound $$| x - \frac{p}{q}| < \epsilon$$, this gives us the wrong bound on $$q$$. Honestly I haven't done much work with rational approximations, so I'm pretty lost. If there are any useful theorems or ideas to look into, please let me know! Thanks! The motivation for this problem comes from Shor's algorithm. In particular, the process of finding the period of $$f(r) = x^r \mod N$$ for some $$x \in \mathbb{Z} / N \mathbb{Z}$$ relies on the fact that there is at most one good rational approximation of this form. I figured out the answer. Leaving it here for anyone in the future looking for an answer to this question. It turns out, Dirichlet approximations were too heavy of machinery. Suppose we have two rational approximations to $$x \in \mathbb{R}$$. Call them $$\frac{a}{b}$$ and $$\frac{c}{d}$$. So: • $$|x - \frac{a}{b}| < \epsilon$$ • $$|x - \frac{c}{d}| < \epsilon$$ • $$0 < b < \frac{1}{\sqrt{2 \epsilon}}$$ • $$0 < d < \frac{1}{\sqrt{2 \epsilon}}$$ Consider the difference between the two rational approximations. By the triangle inequality, we have: $$|\frac{a}{b} - \frac{c}{d}| \leq |\frac{a}{b} - x| + |x - \frac{c}{d}| < 2 \epsilon$$ Using our constraints on the denominators though, we have: \begin{align*} |\frac{a}{b} - \frac{c}{d}| &= | \frac{ad - bc}{bd}| \\ &> \left | \frac{ad - bc}{(1/\sqrt{2 \epsilon})(1/\sqrt{2\epsilon})} \right |\\ & = 2 \epsilon |ad - bc| \end{align*} Combining our inequalities, we have: $$2 \epsilon |ad - bc| < \left |\frac{a}{b} - \frac{c}{d} \right | < 2 \epsilon$$ Looking at the first and third term, and dividing out by $$2 \epsilon$$ yields: $$|ad - bc| < 1$$ But $$|ad - bc|$$ is a non-negative integer! And so it must be zero. Hence, $$ad = bc$$. From here, showing that $$\frac{a}{b} = \frac{c}{d}$$ is easy.
810
2,496
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 30, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.609375
4
CC-MAIN-2020-05
latest
en
0.834995