url stringlengths 6 1.61k | fetch_time int64 1,368,856,904B 1,726,893,854B | content_mime_type stringclasses 3
values | warc_filename stringlengths 108 138 | warc_record_offset int32 9.6k 1.74B | warc_record_length int32 664 793k | text stringlengths 45 1.04M | token_count int32 22 711k | char_count int32 45 1.04M | metadata stringlengths 439 443 | score float64 2.52 5.09 | int_score int64 3 5 | crawl stringclasses 93
values | snapshot_type stringclasses 2
values | language stringclasses 1
value | language_score float64 0.06 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://www.bankersadda.com/p/reasoning-questions-for-ibps-clerk_87.html | 1,553,273,865,000,000,000 | text/html | crawl-data/CC-MAIN-2019-13/segments/1552912202672.57/warc/CC-MAIN-20190322155929-20190322181929-00506.warc.gz | 692,792,809 | 47,210 | Reasoning Questions for IBPS Clerk Prelims
The reasoning is a game of wits and presence of mind! Yes, it is true and it might seem as the greatest of the challenge after English Section’s surprises but yet this one can easily be dealt with. You just need correct practice and hardwire your brain to quickly make decisions about what to attempt and what to leave. And for same we are providing you questions of Reasoning Question and Answers. Solve these to Practice latest pattern reasoning question for bank exams.
Directions (1-5): Study the following information carefully and answer the questions given below:
T, U, V, W, X, Y and Z live on a seven-storey building but not necessarily in the same order. The lowermost floor of the building is numbered 1, and the topmost floor is numbered 7. Each of them belongs to different city, viz, Goa, Chandigarh, Delhi, Noida, Mumbai, Pune and Shimla.
T lives on an odd-numbered floor but not on floor number third. The one who belongs to Mumbai city live immediately above T. Two persons live between W and the one who belongs to Mumbai city. The one who belongs Chandigarh city live on one of the odd-numbered floors but above W. Only three persons live between V and the one who belongs to Chandigarh city. The one who belongs to Delhi lives immediately above V. The one who belongs Goa city live immediately above the one who belongs to Shimla city. Z lives on an odd-numbered floor. Only one person lives between U and X. U lives on one of the floors above X. Neither V nor T belongs to Noida city. X does not belong to Delhi.
Q1. How many people live(s) above the floor on which Z lives?
(a) One
(b) No one.
(c) Three
(d) Four
(e) Two
Q2. Who among the following lives on floor number sixth?
(a) Z
(b) Y
(c) V
(d) W
(e) U
Q3. If X and V interchange their position then who lives immediately below the floor on which X lives?
(a) W
(b) Y
(c) X
(d) No one.
(e) T
Q4. Which of the following city does X belong?
(a) Pune
(b) Noida
(c) Goa
(d) Chandigarh
(e) None of these
Q5. If all person live in building according to alphabetical order from top to bottom, then position of how many remain unchanged?
(a) Five
(b) Two
(c) Three
(d) Four
(e) None of these
S1. Ans. (b)
S2. Ans. (e)
S3. Ans.(d)
S4. Ans. (c)
S5. Ans. (b)
Directions (6-10): Study the following information carefully and answer the questions that follow:
A ÷ B means A is son of B
A × B means A is sister of B
A + B means A is brother of B
A – B means A is mother of B
Q6. How is G related to H in the expression ‘G × R + V ÷ H’?
(a) Sister
(b) Daughter
(c) Son
(d) Mother
(e) None of these
Q7. Which of the following expressions represents ‘B is the husband of A’?
(a) A × I – E + B
(b) A – I + E ÷ B
(c) A + I ÷ E × B
(d) A ÷ I × E + B
(e) None of these
Q8. How is V related to T in the expression ‘T ÷ R + V × N’?
(a) Niece
(b) Father
(c) Uncle
(d) Aunt
(e) Mother
Q9. How is P related to J in the expression ‘J × K ÷ M – P’?
(a) Sister
(b) Brother
(c) Father
(d) Either (a) or (b)
(e) None of these
Q10. Which of the following expressions represents ‘J is wife of E’?
(a) E ÷ F × G + H – J
(b) E × G ÷ H + F – J
(c) J – H × G ÷ E + F
(d) Both (a) and (b)
(e) None of these
Directions (11-15): Study the following information carefully and answer the given questions:
A, B, C, D, E, F and G are seven friends. They play three types of games, viz Hockey, Football and Cricket. Each game is played by at least two players. Each one of them has a favourite colour, viz Pink, Blue, White, Green, Yellow, Red and Black, but not necessarily in the same order.
B likes Yellow and does not play Cricket. The one who likes Black plays the same game as E. C likes Blue and plays the same game as G. D plays Football only with the one who likes Pink. G plays neither Football nor Cricket. F does not like Black. G likes neither Green nor White. D does not like Green. E does not like Pink.
Q11. Which of the following groups plays Hockey?
(a) B, G
(b) A, B, C
(c) B, C, G
(d) D, G, B
(e) None of these
Q12. Who likes White Colour?
(a) A
(b) G
(c) F
(d) D
(e) None of these
Q13. Which of the following colours does A like?
(a) White
(b) Black
(c) Pink
(d) Either Black or Red
(e) None of these
Q14. Which of the following combinations is true?
(a) A–Black–Cricket
(b) G–Pink–Cricket
(c) B–Yellow–Football
(d) D–White–Hockey
(e) None is true?
Q15. Who likes Pink?
(a) G
(b) A
(c) E
(d) C
(e) F
S11. Ans.(c)
S12. Ans.(d)
S13. Ans.(b)
S14. Ans.(a)
S15. Ans.(e)
You May also like to Read: | 1,332 | 4,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.140625 | 3 | CC-MAIN-2019-13 | latest | en | 0.922244 |
https://mathoverflow.net/questions/322767/research-type-questions-in-probability-illustrating-measure-theoretical-techniqu | 1,563,610,853,000,000,000 | text/html | crawl-data/CC-MAIN-2019-30/segments/1563195526489.6/warc/CC-MAIN-20190720070937-20190720092937-00175.warc.gz | 475,122,312 | 29,793 | # Research-type questions in probability illustrating measure-theoretical techniques for students
In short, in the perspective of preparing a new course, I am looking for examples of "concrete" (hopefully research-type) questions concerning various models in probability theory which give the opportunity to consolidate measure-theoretical tools.
More precisely, the course would be designed for students (lets say around 20 or 30) in their 5th year of studies after high school, who specialize in "applied mathematics", who have a rather good mathematical background, who have manipulated the formalism of modern probability, who have had a course in martingales and Markov chains designed for a broad audience (but invoking measure theory as less as possible). Among these students, some are interested in the more "theoretical" side, which they have yet never been taught. The goal would be twofold: consolidate the fundamentals of measure theory used in probability theory and to stimulate the curiosity of the students by showing "nice" results in probability.
Since the students are already used to probability theory, the idea of the course would be not to start by the fundamentals of measure theory, but first rather present some concrete (hopefully interesting and intriguing) questions (to motivate the students) that require tools from measure theory, and seize the opportunity to study and consolidate these theoretical aspects (for example one question for one or two lectures). For instance, one may think of:
• The probability of having an infinite component in bond percolation on $$\mathbb{Z}^d$$ is $$0$$ or $$1$$: this would be the opportunity to recall Kolmogorov's $$0$$-$$1$$ law, the notion of $$\sigma$$-field generated by cylindrical events, etc.
• Wigner's semi-circle law: this would be the opportunity to recall the different notions of convergence of random variables, to encounter a more complicated random variable (a random measure), to present the method of moments, to ask when a probability distribution is characterized by its moments.
Do you have other examples of "nice" and "concrete" questions in probability theory, which can be asked without too much background, and which illustrate the use of results from measure-theory? | 454 | 2,272 | {"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": 6, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0} | 2.953125 | 3 | CC-MAIN-2019-30 | latest | en | 0.948485 |
https://classhall.com/lesson/graphs-of-trigonometric-ratios/?filter=unanswered | 1,721,704,505,000,000,000 | text/html | crawl-data/CC-MAIN-2024-30/segments/1720763517931.85/warc/CC-MAIN-20240723011453-20240723041453-00076.warc.gz | 142,307,891 | 27,970 | # GRAPHS OF TRIGONOMETRIC RATIOS
CONTENT
1. Graphs of:
(i) Sine $$0^o ≤ x ≤ 360^o$$
(ii) Cosine $$0^o ≤ x ≤ 360^o$$
2. Graphical solution of simultaneous linear and trigonometric equations.
THE GRAPH OF $$y = \text{Sine } 0^o ≤ x ≤ 360^o$$ The graph of $$y = sin θ$$ is drawn by considering the table of values for $$sin θ$$ from $$θ = 0^o$$ to $$θ = 360^o$$at intervals of $$90^o$$ as shown in the table below.
$$θ$$ 0o 90o 180o 270o 360o
$$y = sin θ$$ 0 1 0 -1 0
THE GRAPH OF $$Y= cos θ$$ for $$0^o < θ^o < 360^o$$
The graph of $$y = cos θ$$ is also drawn by considering the table of values for $$cos θ$$ from $$θ = 0^o$$ to $$θ = 360^o$$at intervals of $$90^o$$as shown in the table below.
Lesson tags: General Mathematics Lesson Notes, General Mathematics Objective Questions, SS3 General Mathematics, SS3 General Mathematics Evaluation Questions, SS3 General Mathematics Evaluation Questions Second Term, SS3 General Mathematics Objective Questions, SS3 General Mathematics Objective Questions Second Term, SS3 General Mathematics Second Term
Back to: GENERAL MATHEMATICS – SS3 > Second Term | 337 | 1,106 | {"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} | 2.96875 | 3 | CC-MAIN-2024-30 | latest | en | 0.704689 |
http://www.mathisfunforum.com/viewtopic.php?pid=256792 | 1,398,268,019,000,000,000 | text/html | crawl-data/CC-MAIN-2014-15/segments/1398223202774.3/warc/CC-MAIN-20140423032002-00210-ip-10-147-4-33.ec2.internal.warc.gz | 708,163,536 | 5,210 | Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
You are not logged in.
## #1 2013-03-07 08:03:42
Guest
### Geometry Formulas
I was just curious, what is the formula for the surface area and volume,
and
respectively, for a pyramidal frustum and a conical frustum? I would prefer you to put it in LaTeX so I can easily understand it. Thanks!
Note: later I may ask for other formulas, so don't put away your brain when you're done!
## #2 2013-03-07 08:21:06
Guest
### Re: Geometry Formulas
Oops, I almost forgot; I would also like a picture showing where the demensions are. Thanks...again!
## #3 2013-03-07 20:10:12
bobbym
Online
### Re: Geometry Formulas
Hi;
For a right pyramidal frustum:
Look here for more:
http://mathworld.wolfram.com/PyramidalFrustum.html
Last edited by bobbym (2013-03-07 20:11:26)
In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
## #4 2013-03-08 03:08:47
Guest
### Re: Geometry Formulas
Thanks!
I do want to ask though, is a right frustum just a straight, generic one? Or is it one that is tilted?
Also, I checked out the link, and it seems that the full surface area (as in, the whole surface of it including bases) is:
, where
is multiplication.
Am I right? I am kind of confused. The volume formula though, is easy for me to understand.
## #5 2013-03-08 08:08:02
bobbym
Online
### Re: Geometry Formulas
Hi;
It is much better to write it like this:
check out this url:
http://www.ditutor.com/solid_gometry/fr … ramid.html
In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
## #6 2013-03-08 09:48:43
Guest
### Re: Geometry Formulas
Sorry I wrote that wrong.
Thanks, again; I think I now understand it. (:
## #7 2013-03-08 10:48:08
bobbym
Online
### Re: Geometry Formulas
Hi;
Okay, you are welcome.
In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
## #8 2013-03-09 12:30:13
Guest
### Re: Geometry Formulas
Next geometry question I've been wondering:
What is the perimeter
of annulus?
I was thinking it was
where
Is that included in the formla, or is it just the 'strict' outside?
## #9 2013-03-09 12:37:08
bobbym
Online
### Re: Geometry Formulas
Hi;
The perimeter of an annulus is the sum of the perimeter of the two circles, interior and exterior.
In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
## #10 2013-03-09 13:37:14
Guest
### Re: Geometry Formulas
6 more (these might be tougher than before):
1. A & P of a Lune of Hippocrates.
2. V & S of spherical cap.
3. V & S of a spherical sector.
4. V & S of a spherical segment.
5. V & S of a spherical shell.
6. V & S of a spherical wedge.
Where V = volume, S = surface area, A = area, P = perimeter.
## #11 2013-03-09 14:10:53
bobbym
Online
### Re: Geometry Formulas
Hi;
The area of a lune can be found right here:
http://mathworld.wolfram.com/Lune.html
In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof. | 1,086 | 3,789 | {"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.078125 | 3 | CC-MAIN-2014-15 | longest | en | 0.908111 |
https://brainmass.com/physics/velocity/physics-problems-velocity-impact-speed-547721 | 1,638,538,155,000,000,000 | text/html | crawl-data/CC-MAIN-2021-49/segments/1637964362879.45/warc/CC-MAIN-20211203121459-20211203151459-00358.warc.gz | 234,007,088 | 75,447 | Explore BrainMass
# Physics Problems: Velocity, Impact, Speed
Not what you're looking for? Search our solutions OR ask your own Custom question.
This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!
a) Mr. Stick lives on the planet Teflon where the force due to gravity is different than that of Earth. Mr. Stick drops a small water balloon off the top of a building (V0 = 0 m/s). He releases the balloon at a height H = 10 m above the surface of Teflon. The balloon hits the ground 1.8 seconds after it is dropped and has a velocity V1 on impact. (Neglect Teflonian air resistance.)
What is the acceleration due to gravity on the planet Teflon?
b) Peyton Manning, a football quarterback, is traded from the Denver Broncos to the Telfonian Space Nerds. If he can throw a football at a speed of 29 m/s at a horizontal angle of 30 degrees, how much further and higher does he throw the ball after he moves from Earth to Telfon?
https://brainmass.com/physics/velocity/physics-problems-velocity-impact-speed-547721
#### Solution Preview
Earth gravity g is just a special case of constant acceleration.
Let's denote the gravitational acceleration on the planet as
The equations of motions for free are identical to that of the equation of motion on earth, only the value of the acceleration changes.
The vertical displacement (positive indicating upward pointing quantity) is:
(1.1)
Where is the initial velocity, is the initial height and t is the time elapsed.
In our case the object starts its fall from rest - no initial velocity ( ).
Hence we can write:
(1.2)
Solving for we obtain:
(1.3)
All that is left is to plug in the numbers.
 
The initial height is ...
#### Solution Summary
Velocity, impact and speed is examined.
\$2.49 | 421 | 1,798 | {"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-2021-49 | latest | en | 0.907464 |
https://www.answers.com/Q/How_long_and_how_wide_is_an_acre_in_feet | 1,606,388,909,000,000,000 | text/html | crawl-data/CC-MAIN-2020-50/segments/1606141187753.32/warc/CC-MAIN-20201126084625-20201126114625-00392.warc.gz | 581,144,505 | 36,508 | Math and Arithmetic
Area
Length and Distance
# How long and how wide is an acre in feet?
616263
###### 2010-12-30 06:58:39
An acre is a measurement of land, so there is no defined shape. However, going back thousands of years when we were all farmers. A traditional Acre was long and narrow; reduced the number of times the plough had to be turned. A traditional Acre was a Furlong; meaning Furrows length (220 Yards or 660 Feet) long by a Chain (22 Yards or 66 Feet) wide. So 1 square Furlong (todays' city block) is 10 Acres. 8 Furlongs to a Mile. An Acre is 43,560 square feet. Acre comes from the old English word meaning "open field."
๐ฆ
0
๐คจ
0
๐ฎ
0
๐
0
2,644’ x 16.5 ‘
๐ฆ
0
๐คจ
0
๐ฎ
0
๐
0
23
๐ฆ
0
๐คจ
0
๐ฎ
0
๐
0
## Related Questions
To answer your question, I assume that the acre would be rectangular in shape. Given that assumption is correct, an acre 110 feet wide would be 396 feet long. (An acre is defined as 43,560 square feet.)
An acre is 43,560 square feet. An easy way to remember this is that an acre is 66 feet wide by 660 feet long.
An acre is 43,560 square feet. Divide that number by 456 and you get 95.53 feet.
A rectangular lot that's 150-ft wide has to be 290.4-ftlongin order to enclose exactly 1 acre.
One acre would represent a rectangle of land 220 feet long by 198 feet wide. Also helpfull one acre = 43,560 square feet.
43,560 square feet = 1 acre(110' x 115') = 12,650 square feet = 0.29 acre (rounded number)
One square acre is 43,560 square feet. One third of that is 14,520 square feet.
An acre is 43,560 square feet. Half an acre is half that amount. Choose any number of feet for the length, then divide the square feet (for half an acre) by that number to get the width.
A 20-acre meadow is 871,200 square feet (43,456 sf/acre), divided by 600' width = 1,452' long.
0.125 of an acre is 5445 square feet. A square area containing that number of sq. feet would be 73.79 feet long and 73.79 feet wide.
2.045 acres. There are 43,560 square feet in an acre
An acre is a measure of area with no defined shape. You can make it as long as you like if it is also made correspondingly thinner.
An acre is a measure of area L x W , 43,560 square feet. . It has no predetermined shape.
Because an acre is a measure of area, not length, it is defined in square feet. An acre can be of any shape so long as its area is exactly 43,560 square feet. The most standard shape for an acre is one furlong by one chain, or 660 feet by 66 feet. To find the linear measurements of other rectangular acres, just divide 43,560 by the number of feet you want on one side. A square-shaped acre would then be about 208.7 by 208.7 feet (because 208.7 x 208.7 = ~43,560). An acre 100 feet wide would be 435.6 feet long (100 x 435.6 = 43,560) and an acre 1 foot wide would be 43,560 feet long.
1 acre = 43,560 square feet270-ft x 200-ft = 54,000 square feet = 1.24 acres(rounded)
1 acre is equal to 43,560 square feet or 4840 square yards. The length and width can have any value. | 921 | 3,036 | {"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.25 | 4 | CC-MAIN-2020-50 | latest | en | 0.936384 |
https://www.analystforum.com/t/info-about-excel/118598 | 1,675,040,909,000,000,000 | text/html | crawl-data/CC-MAIN-2023-06/segments/1674764499790.41/warc/CC-MAIN-20230130003215-20230130033215-00418.warc.gz | 661,005,336 | 9,050 | I’m on the curriculum committee at my school (yeah, I probably ticked off the wrong person or was in the head when they assigned committees). I’m trying to make sure our treatment of Excel lines up with what’s actually used in practice. I have my priors, but I assume I often get stuff wrong. So I’m polling various groups of industry folk - alumni who work in corporate or investment fields, etc… I do this every couple of years, and I almost always learn something.
I figured I’d add y’all into the mix - tell me what YOU think are the 3-5 things a new (or soon to be new) undergrad should know cold in excel if they want to not suck.
edited: also, what’s your role? I’ve found that sometimes what people think is important is colored by what their position is.
SUMIF formula, INDEX+MATCH formula, Pivot Tables, Charts, Macros
#Excel4Analysts
Yeah and lots of models / practice
Also, shortcut commands.
Make sure they know the “create new window” command, so they can work in multiple sheets at once.
And make sure they know how to make information flow from sheet to sheet.
Equity Research
Depends on the sector (much like it depends on the job). My sector has lots of data, so we build lots of automated dashboards to screen and rank. Knowing index(match(match, sumifs, countifs, averageifs can automate the majority of the financial analysis people need to know. Also knowing basics like no hard coding make a big difference.
But starting out, I teach new people how to solve problems in excel through the use of unique keys. With just a sumif and uniquely generated keys, someone can make their own sumifs. Once they have this knowledge, you can build very robust dashboards in Excel doing calculations they don’t have pre-built.
One thing that I think is universally important but rarely seems to be taught is formatting. Using colors to identify formulas, inputs, etc. This is universal and unless people go through an investment banking training, they never seem to pick it up.
I work with derivatives. In my opinion, most of the comments here focus on the wrong things. Excel is really a mild form of programming. What distinguishes a good user from a mediocre one is not knowledge of specific formulas or functions, but the logical and efficient flow of the final product. A good complex spreadsheet must be transparent, computationally efficient, and should be immediately readable by another proficient user. Broad knowledge of formulas certainly helps achieve this goal, but it is not the goal itself.
People also tend to mistake complexity for good design. For instance, many quantitatively proficient users who are new to Excel tend to write custom VBA functions to accomplish functions that could be done with Excel built in tools. This approach tends to make the spreadsheet opaque (since another user must read the code to know what it does), and inefficient (Excel’s standard formulas are more optimized and stable than VBA). So, in this case, what might be mistaken by non-quantitatively inclined people for technical wizardry is actually just bad form.
When I studied at what is probably the world’s best university computer science program, assignments were graded on an equally weighted basis using two criteria: 1) Functionality, and 2) Style. Functionality measures whether the program accomplishes its stated goals. Style measures what I have attempted to describe in the two preceding paragraphs. Style is important because programming tends to be collaborative and portable. Good Style also makes it easier for the developer to spot errors, and to make extensions in the future. Functionality is an objective measurement based on the assignment’s objectives. However, Style is subjective and its measurements is based on the discretion of the (hopefully very skilled) grader.
Good Style is not something that can fully be measured using a syllabus or check box. You just know it when you see it - like pron.
I’m a credit analyst
Vlookup, pivot tables, simple macros, hot keys (specifically alt+e+s+v, ctrl+d, ctrl+r, ctrl +pg up/dwn, alt+=, and a few others), various kinds of charts, sumif formula, if formula… take away their mouse and they’ll learn the hot keys very quickly.
well said, ohai, as always well said
This takes time to develop these style skills, but they are worth it and in my opinion are another form of precision/transparancy.
Be sure to teach them to name cells.
It’s a lot easier for someone to understand a formula that reads “= 2016_current_assets / 2016_current_liabilities” than one that reads, “= ‘2016 Balance Sheet’!A24 / ‘2016 Balance Sheet’!A43”.
I agree with Ohai. The rule I tell my coworkers is create the spreadsheet in a way that if you leave and someone else looks at it a year from now, they can quickly see how it works and what needs to be updated. For me, I normally color code sheets by type (data, calculations, output, etc) and have a sheet devoted to instructions and key elements.
Good input. Keep em coming.
Ctrl c and ctrl v and format painter lol
i usually create a raw where you copy and paste everything.
Then I use a modify tab and formulas connecting to important info in raw.
Then I use an output that has all the tables and charts.
pivot table is prolly most important. Eliminate the need for a lot of formulas.
data sort, filter, vlookup,
I work at the middle office in the asset management division of a bank, and I use pretty much advanced level of excel at work. I regularly use these at work. and combinations of these.
For the top of my head:
1 way and 2 way lookups (VLOOKUP, HLOOKUP, VLOOKUP MATCH, INDEX MATCH, INDEX MATCH MATCH, Concatenated VLOOKUP)
String Manipulation: (LEN, TEXT, FIND, DATEVALUE, DATE, LEFT, RIGHT)
Arithmetic Calculations (and related): SUMIF, SUMIFS, COUNTIF, COUNTIFS, SUMPRODUCT
Logical: IF, ISNA, IFERROR, TRUE, FALSE, AND, OR.
Combinations of all of the above.
VBA is also extremely useful. I have saved innumerable hours of work using VBA. I also sometimes quickly write small snippets of code if I want to loop through many workbooks.
Disclaimer: This was self-learnt. Although I do use these regularly at work, it is mostly for projects or automation, not everyone in the team uses advanced excel.
If you guys teach your students vlookup or hlookup, I hope it comes with a rusty hacksaw.
Conditional formatting…
Color coding and conditional formatting are extremely useful. All these BSD kids think they are The Sh*t after learning how to write a few formulas, but the simple tools are sometimes the best for making something presentable…
I teach them because they’re often expected to know them, but make sure they know how to do anything lookups could do with INDEX and MATCH. And I tell them when asked on an interview whether they know them to work in the idea that they prefer INDEX and MATCH in a lot of circumstances.
Amen, brother.
And something else that these young whippersnappers need to learn (and these ideas are for more than just excel):
You can use other people’s ideas. Don’t be afraid to look at somebody else’s work and apply the best of what you see.
Just because you invented the model doesn’t mean that it’s a good one. Or that it even works. Don’t get married to your idea just because it’s yours.
All else equal, the more complex a spreadsheet is, the worse it is. As Einstein said, “Keep it as simple as possible, but no simpler.”
^actually its the same thing for programming. i used to do SAS. i always went through someone’s programming to see what it was doing to the data sheets. plus they already took care of the syntax, you just gotta change the labels.
shorter the code. the faster the processing.
In an excel question this year in an interview, I was asked to do COCATENATE
I forgot how to do it (forgot the word cocatenate … knew it started with a C), so just googled it and quickly did it in less than 1min | 1,734 | 7,919 | {"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-2023-06 | latest | en | 0.953203 |
http://mathhelpforum.com/math-software/25241-computing-arrayindex.html | 1,569,070,988,000,000,000 | text/html | crawl-data/CC-MAIN-2019-39/segments/1568514574501.78/warc/CC-MAIN-20190921125334-20190921151334-00046.warc.gz | 119,577,024 | 10,859 | 1. ## Computing arrayindex
As i think my problem is a mathematical one I post it here, if I should be somewhere else please tell me where.
I have a multiple array (5 or 6 dimensions each being of same size) where only elements with different indexcombinations are being filled (i.e. if element [1,2,3,4,5,6] being filled element [6,5,4,3,2,1] will NOT be filled) so I want to store all elements of such a multiple array in a lineairarray and compute the indexes for each element as it saves a lot of memory.
in code
N = 20; // maximum number of an element in each dimension
MaxIndex= N * ((N+1)/2) * ((N+2)/3) * ((N+3)/4) * ((N+4)/5) * ((N+5)/6);
long[] Array = new long [MaxIndex];
Index=0;// Index in the array
for (i1=0; i1<N; i++)
for (i2=0; i2<N+1; i++)
for (i3=0; i3<N+3; i++)
for (i4=0; i4<N+4; i++)
for (i5=0; i5<N+5; i++)
for (i6=0; i6<N+6; i++)
{
Array[Index++] = <something>;
}
}
}
}
}
}
How can I calculate the index of ANY element in Array[] given values for i1, i2, i3, i4, i5, i6 ?
Remark:
for a 2 dimensional array I know the formule
i2 + i1 * N - (i1 * (i1+1) / 2);
I'm looking for something similar for multiple dimensions
Thanks for any help in advance
2. Originally Posted by SoftwareTester
As i think my problem is a mathematical one I post it here, if I should be somewhere else please tell me where.
I have a multiple array (5 or 6 dimensions each being of same size) where only elements with different indexcombinations are being filled (i.e. if element [1,2,3,4,5,6] being filled element [6,5,4,3,2,1] will NOT be filled) so I want to store all elements of such a multiple array in a lineairarray and compute the indexes for each element as it saves a lot of memory.
in code
N = 20; // maximum number of an element in each dimension
MaxIndex= N * ((N+1)/2) * ((N+2)/3) * ((N+3)/4) * ((N+4)/5) * ((N+5)/6);
long[] Array = new long [MaxIndex];
[snip]
Why do you think MaxIndex is this ($\displaystyle 30800$), rather than say:
$\displaystyle MaxIndex1=N(N-1)(N-2)(N-3)(N-4)(N-5)\approx 27.9\times 10^{6}$ ?
(I would consider using some other type of structure for this data, maybe a linked list
with each record holding the indices and the value)
RonL
3. Originally Posted by CaptainBlack
Why do you think MaxIndex is this ($\displaystyle 30800$), rather than say:
$\displaystyle MaxIndex1=N(N-1)(N-2)(N-3)(N-4)(N-5)\approx 27.9\times 10^{6}$ ?
(I would consider using some other type of structure for this data, maybe a linked list
with each record holding the indices and the value)
RonL
As to me element (1,2,3,4,5,6) is the same like (3,1,5,6,2,4) or any other combination of those indeces and I created and counted the elements (output in Excel, I checked the numbers) I actually SEE MaxIndex being that value.
Using linked lists will double (at least) the memory usage and also (at least) lookup time (important as I have to access the elements millions of times).
What I actually want is being able to calculate the position of each individual element so that for a given combination of indices I can retrieve the individual element very fast without the need for SEARCHING.
Any help will be appreciated
4. For those who are interested:
I managed to calculate the index of ANY combination in a list by using combinadics and its speed is very good (and independent of the element to lookup) and actually much better compared to binary searching the list even for rather small lists.
Information leading to solving the problem has been obtained from Combinadic - Wikipedia, the free encyclopedia | 1,023 | 3,545 | {"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.40625 | 3 | CC-MAIN-2019-39 | latest | en | 0.756403 |
https://stackoverflow.com/questions/24849699/map-array-of-strings-to-an-array-of-integers/24849859 | 1,674,976,637,000,000,000 | text/html | crawl-data/CC-MAIN-2023-06/segments/1674764499700.67/warc/CC-MAIN-20230129044527-20230129074527-00755.warc.gz | 571,436,766 | 39,212 | # Map array of strings to an array of integers
Suppose I have a column in a data frame as colors say `c("Red", "Blue", "Blue", "Orange")`. I would like to get it as `c(1,2,2,3)`.
``````Red as 1
Blue as 2
Orange as 3
``````
Is there a simpler way of doing this other than the obvious if/else or switch functions?
• See `match(x, unique(x))` or, on a more formal note, `as.integer(factor(x, levels = unique(x)))` Jul 20, 2014 at 10:50
Set up a named vector, describing the link between colour and integers (i.e. specifically how the strings map to the integers):
``````colors=c(1,2,3)
names(colors)=c("Red", "Blue", "Orange")
``````
Now use the named vector to generate a list of numbers associated with the colours in your data frame:
``````>colors[c("Red","Blue","Blue","Orange")]
Red Blue Blue Orange
1 2 2 3
``````
UPDATE to address questions below. Here's an example of what I think you're trying to do.
``````dataframe=data.frame(Gender=c("F","F","M","F","F","M"))
strings=sort(unique(dataframe\$Gender))
colors=1:length(strings)
names(colors)=strings
dataframe\$Colours=colors[dataframe\$Gender]
``````
Can have a look at the result:
``````> dataframe
Gender Colours
1 F 1
2 F 1
3 M 2
4 F 1
5 F 1
6 M 2
``````
Note that this example assumes that you have no specific mapping between Gender and Colours in mind. If this is really the case, then it might be simpler to just follow the comment from @alexis_laz instead.
• The thing is the number of rows in my data frame runs in the thousands Jul 20, 2014 at 11:23
• @user2500781. You could modify `CnrL` solution to setNames(1:3,unique(dat\$colors))[dat\$colors] Red Blue Blue Orange 1 2 2 3 Jul 20, 2014 at 12:01
• I don't see why this is a problem: thousands=sample(c("Red", "Blue", "Orange"),2000,replace=TRUE); colors[thousands]
– CnrL
Jul 20, 2014 at 13:48
• Maybe you need to clarify the question. Do you have thousands of unique strings or thousands of rows in your column of strings that you need to map to integers, or both?
– CnrL
Jul 20, 2014 at 13:53
• I'll try this out it sounds promising. And I have about a hundred unique strings in the column. Jul 20, 2014 at 14:37
I must be missing something, but this method would work I believe. Having coerced your column with words (below, "names") to a factor, you `revalue` them by your numbers in "colors".
``````require(plyr)
colors <- c("1","2","3")
names <- c("Red", "Blue", "Orange")
df <- data.frame(names, colors)
df\$names <- as.factor(df\$names)
df\$names <- revalue(x = df\$names, c("Red" = 1, "Blue" = 2, "Orange" = 3))
``````
• "Error in .helpForCall(topicExpr, parent.frame()) : no methods for ‘revalue’ and no documentation for it as a function" Jul 21, 2014 at 18:15
• Thank you for the comment. I added require(plyr) Jul 21, 2014 at 21:44
• Ah. Thanks for your solution. Jul 27, 2014 at 3:16
• If you like it, you can give it a plus, with the up arrow over the 0. Jul 27, 2014 at 13:02
• Thanks. The official doc is not clear about whether it mutates the frame or returns a new column and your example resolved my issue. Jul 2, 2022 at 4:50
Using car::recode() function:
``````library(car)
recode(x, "'Red'=1; 'Blue'=2; 'Orange'=3;")
# [1] 1 2 2 3
``````
Here is a function based on previous code:
``````# Recode 'string' into 'integer'
recode_str_int <- function(df, feature) {
# 1. Unique values
# 1.1. 'string' values
list_str <- sort(unique(df[, feature]))
# 1.2. 'integer' values
list_int <- 1:length(list_str)
# 2. Create new feature
# 2.1. Names
names(list_int) = list_str
df\$feature_new = list_int[df[, feature]]
# 3. Result
df\$feature_new
} # recode_str_int
``````
Call it like:
`````` df\$new_feature <- recode_str_int(df, "feature")
`````` | 1,180 | 3,789 | {"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-2023-06 | latest | en | 0.861686 |
https://www.geeksforgeeks.org/minimize-count-of-given-operations-required-to-make-two-given-strings-permutations-of-each-other/amp/?ref=rp | 1,606,858,286,000,000,000 | text/html | crawl-data/CC-MAIN-2020-50/segments/1606141681524.75/warc/CC-MAIN-20201201200611-20201201230611-00209.warc.gz | 671,279,590 | 22,370 | # Minimize count of given operations required to make two given strings permutations of each other
Given two strings str1 and str2, the task is to count the minimum number of operations of the following three types on one of the two strings that are required to make str1 and str2 permutations of each other:
1. Insert a character into the string.
2. Remove a character from the string.
3. Replace a character by another character from the string.
Note: All the above operations are of equal cost.
Examples:
Input: str1 = “geeksforgeeks”, str2 = “geeksforcoder”
Output: 4
Explanation: Rearrange the string str2 to “geeksforcedor”
Replace the value of str1[8] to ‘c’.
Replace the value of str1[10] to ‘d’.
Replace the value of str1[11] to ‘o’.
Replace the value of str1[12] to ‘r’.
Therefore, the required output is 4.
Input: str1 = “geeks”, str2 = “keeg”
Output: 1
Approach: The problem can be solved using Hashing to store the frequency of each character of both the string. Below are the observations to solve the problem:
X = Number of characters which are present in both string, str1 and str2.
N1 – X = Number of characters present only in str1.
N2 – X = Number of characters present only in str2.
Total number of replacement operations = min(N1 – X, N2 – X)
Total number of insert/rRemove operations = max(N1 – X, N2 – X) – min(N1 – X, N2 – X).
Therefore, total number of operations = max(N1 – X, N2 – X),
Follow the steps below to solve the problem:
1. Initialize two arrays, say freq1[] and freq2[] to store the frequency of all the characters of str1 and str2 respectively.
2. Traverse both the strings and store the frequency of each character of both the strings in arrays freq1[] and freq2[] respectively.
3. Traverse both the arrays freq1[] and freq2[].
4. For every ith character, if freq1[i] exceeds freq2[i], then replace freq1[i] to freq1[i] – freq2[i] and set freq2[i] = 0 and vice-versa.
5. Finally, calculate the sum of the arrays freq1[] and freq2[], and print the maximum between them as the answer
Below is the implement the above approach:
`// C++ program to implement` `// the above approach` `#include ` `using` `namespace` `std;` `// Function to minimize the count of` `// operations to make str1 and str2` `// permutations of each other` `int` `ctMinEdits(string str1, string str2)` `{` ` ``int` `N1 = str1.length();` ` ``int` `N2 = str2.length();` ` ``// Store the frequency of` ` ``// each character of str1` ` ``int` `freq1[256] = { 0 };` ` ``for` `(``int` `i = 0; i < N1; i++) {` ` ``freq1[str1[i]]++;` ` ``}` ` ``// Store the frequency of` ` ``// each character of str2` ` ``int` `freq2[256] = { 0 };` ` ``for` `(``int` `i = 0; i < N2; i++) {` ` ``freq2[str2[i]]++;` ` ``}` ` ``// Traverse the freq1[] and freq2[]` ` ``for` `(``int` `i = 0; i < 256; i++) {` ` ``// If frequency of character in` ` ``// str1 is greater than str2` ` ``if` `(freq1[i] > freq2[i]) {` ` ``freq1[i] = freq1[i]` ` ``- freq2[i];` ` ``freq2[i] = 0;` ` ``}` ` ``// Otherwise` ` ``else` `{` ` ``freq2[i] = freq2[i]` ` ``- freq1[i];` ` ``freq1[i] = 0;` ` ``}` ` ``}` ` ``// Store sum of freq1[]` ` ``int` `sum1 = 0;` ` ``// Store sum of freq2[]` ` ``int` `sum2 = 0;` ` ``for` `(``int` `i = 0; i < 256; i++) {` ` ``sum1 += freq1[i];` ` ``sum2 += freq2[i];` ` ``}` ` ``return` `max(sum1, sum2);` `}` `// Driver Code` `int` `main()` `{` ` ``string str1 = ``"geeksforgeeks"``;` ` ``string str2 = ``"geeksforcoder"``;` ` ``cout << ctMinEdits(str1, str2);` `}`
`// Java program to implement ` `// the above approach ` `import` `java.util.*;` `import` `java.io.*;` `import` `java.lang.Math;` `class` `GFG{` ` ` `// Function to minimize the count of ` `// operations to make str1 and str2 ` `// permutations of each other ` `static` `int` `ctMinEdits(String str1, String str2) ` `{ ` ` ``int` `N1 = str1.length(); ` ` ``int` `N2 = str2.length(); ` ` ` ` ``// Store the frequency of ` ` ``// each character of str1 ` ` ``int` `freq1[] = ``new` `int``[``256``];` ` ``Arrays.fill(freq1, ``0``);` ` ` ` ``for``(``int` `i = ``0``; i < N1; i++)` ` ``{ ` ` ``freq1[str1.charAt(i)]++; ` ` ``} ` ` ` ` ``// Store the frequency of ` ` ``// each character of str2 ` ` ``int` `freq2[] = ``new` `int``[``256``];` ` ``Arrays.fill(freq2, ``0``);` ` ` ` ``for``(``int` `i = ``0``; i < N2; i++)` ` ``{ ` ` ``freq2[str2.charAt(i)]++; ` ` ``} ` ` ` ` ``// Traverse the freq1[] and freq2[] ` ` ``for``(``int` `i = ``0``; i < ``256``; i++)` ` ``{ ` ` ` ` ``// If frequency of character in ` ` ``// str1 is greater than str2 ` ` ``if` `(freq1[i] > freq2[i]) ` ` ``{ ` ` ``freq1[i] = freq1[i] - freq2[i]; ` ` ``freq2[i] = ``0``; ` ` ``} ` ` ` ` ``// Otherwise ` ` ``else` ` ``{ ` ` ``freq2[i] = freq2[i] - freq1[i]; ` ` ``freq1[i] = ``0``; ` ` ``} ` ` ``} ` ` ` ` ``// Store sum of freq1[] ` ` ``int` `sum1 = ``0``; ` ` ` ` ``// Store sum of freq2[] ` ` ``int` `sum2 = ``0``; ` ` ` ` ``for``(``int` `i = ``0``; i < ``256``; i++)` ` ``{ ` ` ``sum1 += freq1[i]; ` ` ``sum2 += freq2[i]; ` ` ``} ` ` ` ` ``return` `Math.max(sum1, sum2); ` `} ` `// Driver Code` `public` `static` `void` `main(``final` `String[] args) ` `{` ` ``String str1 = ``"geeksforgeeks"``; ` ` ``String str2 = ``"geeksforcoder"``; ` ` ` ` ``System.out.println(ctMinEdits(str1, str2)); ` `}` `}` `// This code is contributed by bikram2001jha`
`# Python3 program to implement` `# the above approach` ` ` `# Function to minimize the count of` `# operations to make str1 and str2` `# permutations of each other` `def` `ctMinEdits(str1, str2):` ` ` ` ``N1 ``=` `len``(str1)` ` ``N2 ``=` `len``(str2)` ` ` ` ``# Store the frequency of` ` ``# each character of str1` ` ``freq1 ``=` `[``0``] ``*` `256` ` ``for` `i ``in` `range``(N1):` ` ``freq1[``ord``(str1[i])] ``+``=` `1` ` ` ` ``# Store the frequency of` ` ``# each character of str2` ` ``freq2 ``=` `[``0``] ``*` `256` ` ``for` `i ``in` `range``(N2):` ` ``freq2[``ord``(str2[i])] ``+``=` `1` ` ` ` ``# Traverse the freq1[] and freq2[]` ` ``for` `i ``in` `range``(``256``):` ` ` ` ``# If frequency of character in` ` ``# str1 is greater than str2` ` ``if` `(freq1[i] > freq2[i]):` ` ``freq1[i] ``=` `freq1[i] ``-` `freq2[i]` ` ``freq2[i] ``=` `0` ` ` ` ``# Otherwise` ` ``else``:` ` ``freq2[i] ``=` `freq2[i] ``-` `freq1[i]` ` ``freq1[i] ``=` `0` ` ` ` ``# Store sum of freq1[]` ` ``sum1 ``=` `0` ` ` ` ``# Store sum of freq2[]` ` ``sum2 ``=` `0` ` ` ` ``for` `i ``in` `range``(``256``):` ` ``sum1 ``+``=` `freq1[i]` ` ``sum2 ``+``=` `freq2[i]` ` ` ` ``return` `max``(sum1, sum2)` `# Driver Code` `str1 ``=` `"geeksforgeeks"` `str2 ``=` `"geeksforcoder"` `print``(ctMinEdits(str1, str2))` `# This code is contributed by code_hunt`
`// C# program to implement` `// the above approach` `using` `System;` `class` `GFG{` ` ` `// Function to minimize the count of ` `// operations to make str1 and str2 ` `// permutations of each other ` `static` `int` `ctMinEdits(``string` `str1, ``string` `str2) ` `{ ` ` ``int` `N1 = str1.Length; ` ` ``int` `N2 = str2.Length; ` ` ` ` ``// Store the frequency of ` ` ``// each character of str1 ` ` ``int``[] freq1 = ``new` `int``[256];` ` ``freq1[0] = str1[0]; ` ` ` ` ``for``(``int` `i = 0; i < N1; i++)` ` ``{ ` ` ``freq1[str1[i]]++; ` ` ``} ` ` ` ` ``// Store the frequency of ` ` ``// each character of str2 ` ` ``int``[] freq2 = ``new` `int``[256];` ` ``freq2[0] = str2[0]; ` ` ` ` ``for``(``int` `i = 0; i < N2; i++)` ` ``{ ` ` ``freq2[str2[i]]++; ` ` ``} ` ` ` ` ``// Traverse the freq1[] and freq2[] ` ` ``for``(``int` `i = 0; i < 256; i++)` ` ``{ ` ` ` ` ``// If frequency of character in ` ` ``// str1 is greater than str2 ` ` ``if` `(freq1[i] > freq2[i]) ` ` ``{ ` ` ``freq1[i] = freq1[i] - freq2[i]; ` ` ``freq2[i] = 0; ` ` ``} ` ` ` ` ``// Otherwise ` ` ``else` ` ``{ ` ` ``freq2[i] = freq2[i] - freq1[i]; ` ` ``freq1[i] = 0; ` ` ``} ` ` ``} ` ` ` ` ``// Store sum of freq1[] ` ` ``int` `sum1 = 0; ` ` ` ` ``// Store sum of freq2[] ` ` ``int` `sum2 = 0; ` ` ` ` ``for``(``int` `i = 0; i < 256; i++)` ` ``{ ` ` ``sum1 += freq1[i]; ` ` ``sum2 += freq2[i]; ` ` ``} ` ` ``return` `Math.Max(sum1, sum2); ` `} ` ` ` `// Driver Code` `public` `static` `void` `Main() ` `{` ` ``string` `str1 = ``"geeksforgeeks"``; ` ` ``string` `str2 = ``"geeksforcoder"``; ` ` ` ` ``Console.WriteLine(ctMinEdits(str1, str2)); ` `}` `}` `// This code is contributed by code_hunt`
Output:
```4
```
Time Complexity: O(N)
Auxiliary Space: O(1)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
Check out this Author's contributed articles.
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : bikram2001jha, code_hunt
Article Tags : | 3,645 | 10,033 | {"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.53125 | 4 | CC-MAIN-2020-50 | latest | en | 0.891737 |
http://www.perlmonks.org/index.pl?parent=424247;node_id=3333 | 1,521,956,688,000,000,000 | text/html | crawl-data/CC-MAIN-2018-13/segments/1521257651820.82/warc/CC-MAIN-20180325044627-20180325064627-00153.warc.gz | 445,712,887 | 7,900 | more useful options PerlMonks
### Comment on
Need Help??
Something my teacher repeatedly say during the lectures was "in logic programming we express relations". Remember this, ponder it, and you'll save yourself some trouble, especially if you already are comfortable with functional languages. Relations are named by predicates and predicates are not functions.
If that is as clear as the sky above the clouds then you can stop reading now. All I'm going to try to do in the rest of this post is to give examples of how these relations work and how they allow you to express programs differently than in other languages that look similar, like Haskell.
Moving on...
A predicate is true if the relation can be true. If there's any uninstantiated variables in the predicate Prolog gives them values that fulfill the relation and keep them for the rest of the scope. This works a bit like capturing groups and backreferences in regexes (like /(.*?)\1/).
An interesting example of this is how the assignment operator = works in Prolog. It's not really an assignment operator. It's a very simple predicate named = and X = Y can be written as =(X, Y). We could've called it eq and written it as
```eq(X, X).
which basically says that the first argument must match the second argument. As you see, it's symmetrical, so X = 2 is the same as 2 = X.
I don't expect anyone without prior knowledge of Prolog to understand the following example, but I think it's nice anyway, and those familiar with functional programming may recognize the example.
If we want to manually define the natural numbers, 0 ... Inf, we can do that by writing an inc predicate used as inc(X, Xplus1) and have a base (atom) just called zero. If we define inc as
```inc(X, succ(X)). % you don't have to understand this.
the number 2 would be represented by succ(succ(zero)). But here's where the fun comes in. Since predicates express relations we can use it to decrease a value too: inc(Xminus1, X). Here I've said nothing about whether X needs to be instantiated or not. If fact, neither in inc(X1, X2) needs to be instantiated. It just says that after that predicate, X1 and X2 will be two successive numbers:
``` foo :-
inc(X, Y), % Implicit RELATION.
X = zero, % MATCH X against the atom zero, impliclity mat
+ch Y.
something(X, Y). % same as something(zero, succ(zero)).
bar :-
inc(X, Y), % Same implicit relation.
Y = succ(zero), % Implicitly match X against zero.
something(X, Y). % same as something(zero, succ(zero)).
It's all about relations.
ihb
See perltoc if you don't know which perldoc to read!
Read argumentation in its context!
In reply to Re: Bringing Logic Programming to Perl by ihb
in thread Bringing Logic Programming to Perl by Ovid
Title:
Use: <p> text here (a paragraph) </p>
and: <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":
• Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
• Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
• Read Where should I post X? if you're not absolutely sure you're posting in the right place.
• Please read these before you post! —
• Posts may use any of the Perl Monks Approved HTML tags:
a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
• You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
For: Use: & & < < > > [ [ ] ]
• Link using PerlMonks shortcuts! What shortcuts can I use for linking?
• See Writeup Formatting Tips and other pages linked from there for more info.
Create A New User
Chatterbox?
and all is quiet...
How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2018-03-25 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
When I think of a mole I think of:
Results (300 votes). Check out past polls.
Notices? | 1,060 | 4,213 | {"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.734375 | 3 | CC-MAIN-2018-13 | latest | en | 0.960486 |
http://mathhelpforum.com/advanced-applied-math/39012-centre-mass-frame-print.html | 1,516,461,402,000,000,000 | text/html | crawl-data/CC-MAIN-2018-05/segments/1516084889660.55/warc/CC-MAIN-20180120142458-20180120162458-00086.warc.gz | 210,448,388 | 2,699 | # Centre Of Mass: Frame
I don't understand how you would find the centre of mass of $CD$ from $AB$? Thanks in advance.
For the distance from CD, you need only the equation of CD which is simple enough (y-0) = (4/3)(x-4) or 4x - 3y - 16 = 0. This leads directly to the solution $\frac{|4(a)-3(b)-16|}{5}$. | 101 | 305 | {"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": 3, "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.296875 | 3 | CC-MAIN-2018-05 | longest | en | 0.929339 |
https://blog.myrank.co.in/radical-axis-of-the-two-circles/ | 1,709,281,977,000,000,000 | text/html | crawl-data/CC-MAIN-2024-10/segments/1707947475203.41/warc/CC-MAIN-20240301062009-20240301092009-00360.warc.gz | 138,576,375 | 14,791 | # Radical Axis of the Two Circles
Case (1): Radical axis of the two circles is defined as the line from each point of which, tangents of equal length are drawn to the two circles.Where T = T₁
Case (2): In case of three circles radical point can be defined as the point where radical axis of three circles taken two at a time intersect. It is the point from which tangent of equal length can be drawn to all the three circles.If S ≡ x² + y² + 2gx + 2fy + c
S’ ≡ x² + y² + 2g’x + 2f’y+ c’
Then equation of radical axis of two circles.
S = 0 and S’ = 0 is given by S = S’
i.e. x² + y² + 2gx + 2fy + c = x² + y² + 2g’x + 2f’y + c’
2(g – g’)x + 2(f – f’)y + (c – c’) = 0.
Case (3):
(i) If the circles touch each other then the above equation gives the common tangent at the point where the circles touch each other. It is also the Radical axis of the two circles. (ii) If the two circles intersect then above equation gives the equation of the common chord. Here also the common chord is also the Radical axis of the two circles. Two circles with centers C₁ (x₁, y₁) and C₂ (x₂, y₂) and radii r₁, r₂ respectively, touch each other.
(iii) Internally: If |C₁C₂| = |r₂ – r₁| and the point of contact is $$\frac{\left( {{r}_{1}}~{{x}_{2~}}-\text{ }{{r}_{2}}~{{x}_{1}} \right)}{{{r}_{1}}+{{r}_{2}}},\frac{\left( {{r}_{1}}{{y}_{2~}}-\text{ }{{r}_{2}}{{y}_{1}} \right)}{{{r}_{1}}+{{r}_{2}}}$$.
(iv) Externally: If |C₁C₂| = |r₂ – r₁| and the point of contact is $$\frac{\left( {{r}_{1}}~{{x}_{2~}}\text{+ }{{r}_{2}}~{{x}_{1}} \right)}{{{r}_{1}}+{{r}_{2}}},\frac{\left( {{r}_{1}}{{y}_{2~}}\text{+ }{{r}_{2}}{{y}_{1}} \right)}{{{r}_{1}}+{{r}_{2}}}$$. | 594 | 1,645 | {"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.5625 | 5 | CC-MAIN-2024-10 | latest | en | 0.777581 |
https://www.mathwizurd.com/linalg/2017/6/19/markov-chains | 1,544,681,065,000,000,000 | text/html | crawl-data/CC-MAIN-2018-51/segments/1544376824525.29/warc/CC-MAIN-20181213054204-20181213075704-00498.warc.gz | 958,827,635 | 13,995 | Mathwizurd.com is created by David Witten, a mathematics and computer science student at Vanderbilt University. For more information, see the "About" page.
# Example
MathJax TeX Test Page Let's say you have a small country with 1,000,000 people. 60% of people live in cities, and 40% live in the suburbs.
Every year, 95% of people who live in cities stay there. Also, 97% of people who live in suburbs stay there.
We can calculate the percent of city dwellers by counting the people who remained + people who moved in. That equals $$(.6)*(.95) + (.4)*(.03) = 0.582$$ The percent of suburbians equals the people who remain + move in. This equals $$(.4)*(.97) + (.6)(.05) = .418$$We can write this as a matrix: $$\begin{bmatrix}\text{city}_{k+1}\\\text{suburb}_{k+1}\end{bmatrix} = \begin{bmatrix}.95 & .03\\.05 & .97\end{bmatrix} \begin{bmatrix}\text{city}_k\\\text{suburb}_k\end{bmatrix}$$ Now, if you look 30 years in advance, for example, you get 40% city folk, but does it stabilize to some percent? The answer is $\boxed{\text{yes}}$. Before we get to that, we should define Markov Chains.
# What is a Markov Chain?
MathJax TeX Test Page A Markov chain is a sequence of vectors {$x_0$, $x_1$ ... $x_n$} such that $x_1 = Px_0$, $x_2 = Px_1$, etc. where P is a stochastic matrix.
A stochastic matrix is a matrix whose columns are composed of probabilities.
I created a markov chain of length 100 for the population example starting at p = 0.6 and p = 0.3, and they both converged to the same value.
MathJax TeX Test Page Shown above, both populations approach something like 37% urban population. What does this mean?
This is called a steady-state vector. It's the long term solution to a Markov chain. If the steady-state vector is called q This can be written as $$q = Pq \to Iq = Pq \to (P-I)q = 0$$ In our case, this equals $$q = \begin{bmatrix}.95 & .03\\.05 & .97\end{bmatrix}q \to \begin{bmatrix}-.05 & .03\\.05 & -0.03\end{bmatrix}\begin{bmatrix}\text{city}\\\text{suburbs}\end{bmatrix} = 0$$ Solving the system of equations, we get one equation (the second one is equaivalent). $$-0.05\text{city} + 0.03\text{suburbs} = 0 \to \dfrac{3}{5}\text{suburbs} = \text{city}$$ $$\begin{bmatrix}\text{city}\\\text{suburbs}\end{bmatrix} = \text{suburbs}\cdot\begin{bmatrix}\frac{3}{5}\\1\end{bmatrix}$$ If we want the vector in terms of percentages, we divide by $\frac{3}{5} + 1 = \frac{8}{5}$ $$q = \begin{bmatrix}\frac{3}{8} \\ \frac{5}{8}\end{bmatrix} = \begin{bmatrix}0.375 \\ 0.625\end{bmatrix}$$ This always convergence, regardless of what you start with.
## Significance
What does this mean? The steady-state vector signifies the long-term solution to the Markov Chain. This means in the long-term (100 years), 37.5% of people will live in cities.
Steady-state vectors may also define long-term probabilities. For example, one possible Markov Chain problem is about predicting weather. 90% of time, if it's sunny today, it'll be sunny tomorrow. 50% of the time, if it's rainy today, it'll be rainy tomorrow. In this problem, the steady-state vector means the overall probability.
# How do we know this will converge?
When we defined steady-state vectors, they were written like this:
MathJax TeX Test Page $$q = Pq \to 1q = Pq$$ This means that 1 is an eigenvalue. We want to prove that for every matrix with columns as probability vectors, 1 will be an eigenvalue. Let's look at 2x2 matrices, for the sake of simplicity. $$\begin{bmatrix}a & b\\1-a & 1-b\end{bmatrix}$$ Now, we need to calculate the eigenvalues: $$\begin{vmatrix}\lambda - a & b\\1-a & \lambda - (1-b)\end{vmatrix} = 0$$ The characteristic polynomial equals $$(\lambda - a)(\lambda - (1-b)) - b + ab = 0$$ $$\lambda^2 + (-a - 1 + b)\lambda + a -ab - b + ab$$ $$\lambda^2 + (b-a - 1)\lambda + a - b$$ Here, we can see that (b-a-1) = -(a - b + 1) which is perfect! $$(\lambda - 1)(\lambda - (a-b)) = 0$$ So, one eigenvalue is guaranteed to be 1. Therefore, there will always be a steady-state solution. | 1,241 | 3,994 | {"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} | 4.34375 | 4 | CC-MAIN-2018-51 | latest | en | 0.880418 |
https://unitconversion.io/100-j-to-mwh | 1,675,229,959,000,000,000 | text/html | crawl-data/CC-MAIN-2023-06/segments/1674764499911.86/warc/CC-MAIN-20230201045500-20230201075500-00784.warc.gz | 571,172,017 | 9,414 | #### Convert 100 Joules (J) to Megawatt Hours (MWh)
This is our conversion tool for converting joules to megawatt hours.
To use the tool, simply enter a number in any of the inputs and the converted value will automatically appear in the opposite box.
J
### =
MWh
##### How to convert Joules (J) to Megawatt Hours (MWh)
Converting Joules (J) to Megawatt Hours (MWh) is simple. Why is it simple? Because it only requires one basic operation: multiplication. The same is true for many types of unit conversion (there are some expections, such as temperature). To convert Joules (J) to Megawatt Hours (MWh), you just need to know that 1joules is equal to MWh. With that knowledge, you can solve any other similar conversion problem by multiplying the number of Joules (J) by . For example, 4joules multiplied by is equal to MWh.
#### Best conversion unit for 100 Joules (J)
We define the "best" unit to convert a number as the unit that is the lowest without going lower than 1. For 100 joules, the best unit to convert to is .
#### Fast Conversions
1 joules = MWh 5 joules = MWh 10 joules = MWh 15 joules = MWh 25 joules = MWh 100 joules = MWh 1000 joules = MWh 1 MWh = joules 5 MWh = joules 10 MWh = joules 15 MWh = joules 25 MWh = joules 100 MWh = joules 1000 MWh = joules
#### Blog
Best YouTube Converter Mp3 For 2023 How to Start a Profitable Life Insurance Business Nware 17in laptop: a Helpful Device For Students Why Long Tail Keywords Are Necessary for Your Content What Is Courage Essay | 416 | 1,507 | {"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-2023-06 | latest | en | 0.807358 |
https://crypto.stackexchange.com/questions/15263/times-of-nested-algorithms-in-proofs-of-security | 1,713,394,538,000,000,000 | text/html | crawl-data/CC-MAIN-2024-18/segments/1712296817181.55/warc/CC-MAIN-20240417204934-20240417234934-00270.warc.gz | 172,821,380 | 44,857 | # Times of nested algorithms in proofs of security
Proofs of security may be constructed such that an adversary $A$ is used to construct an adversary $A'$. The reduction/algorithm which uses $A$ has to perform a number of computations in order to simulate the environnement of $A$ (t.i.t.s to intercept/answer to queries from $A$).
I've noticed that we evaluate the time $t'$ taken by $A'$ such that $t'=t+n \cdot t_c$ where $t$ is the time taken by $A$, $n$ is the number of computations made by the reduction and $t_c$ the time to perform one computation.
I don't understand why we generally conclude that $t \ge t' - n \cdot t_c$. I don't understand why we remove the quantity $n \cdot t_c$. It seems to me that $A$ and $A'$ terminate at virtually the same time ($A'$ uses the output from $A$ almost immediately).
An example: Assume that a computation needs $1$ unit of time. An algorithm $A'$ uses $A$ as follows:
• $A$ makes a query (the elapsed time for $A$ and $A'$ is $1$)
• $A'$ makes a computation and responds to $A$ (the overall elapsed time for $A$ and $A'$ is 2)
• $A$ makes a query (the overall elapsed time for $A$ and $A'$ is $3$)
• $A'$ makes a computation and responds to $A$ (the overall elapsed time for $A$ and $A'$ is 4)
• etc ...
• when $A$ terminates and gives the result to $A'$, we assume there is not need for more computations. It seems that $A$ and $A'$ terminate at the same time.
We see in this example that it's strange for $A$ to remove the time of computations (unless these computations are considered as "free").
• It is not the case that $A'$ terminates when $A$ terminates. $A'$ may require some more computations to transform the output of $A$ into a solution to the respective problem $A'$ is required to solve. Mar 27, 2014 at 19:00
• @DrLecter Yes I've supposed that $A'$ doesn't need more computations at the end so as to show what is the problem. Mar 27, 2014 at 19:04
• Even if $A'$ makes more computation after having obtained the output from $A$ this does not explain why there is a "pause" (in the elapsed time for $A$) when $A$ is waiting for the response to a query ! Mar 27, 2014 at 19:05
• Thanks DrLecter. An oracle call requires (or doesn't require ?) unit time ? What is referred to the simulation of an oracle call ? I don't understand what this means. Mar 27, 2014 at 19:15
• When I say that I don't understand why "there is a "pause" (in the elapsed time for A) when A is waiting for the response to a query", I'm speaking about a simulated oracle since this is $A'$ which responds to $A$. Mar 27, 2014 at 19:19
You always need to have in mind that $A$ is a hypothetical algorithm, since our goal in the reduction is to contradict the existence of such an efficient $A$.
Now to your concrete security framework: Here, you are not satisfied by the fact that a hypothetical poly-time $A$ implies a poly-time reduction $A'$, but your aim is that the reduction does not take significantly more time than $A$ and you want to quantify that difference. So you want to relate the running time $t$ of such an hypothetical $A$ to the runtime $t'$ of the reduction $A'$ where $A'$ simulates the environment of the real attack game for $A$ such that $A$ cannot distinguish the real game from the simulated game in the reduction.
What you already observed in your question is the runtime of $A'$ is $t'=t+n \cdot t_c$, where $t$ is the time taken by $A$, $n$ is the number of computations made by the reduction and $t_c$ the time to perform one computation (such as an exponentiation of a group element). The term $n\cdot t_c$ typically includes all the overhead that $A'$ has to make, transformations required to the problem instance that $A'$ receives in order to "give" it to $A$ as part of some parameters or as answers to oracle queries and transforming the output of $A$ to a solution to the instance of the input problem if necessary. Furthermore, the operations that are required the answer the oracle calls that $A$ makes to the oracles that are simulated by $A'$. Often you will also encounter in such concrete reductions that the number of oracle queries and the associated costs are made more explicit. Anyways, observe that the runtime of $A$ does not include the time the oracles require to answer since this is counted in the $n\cdot t_c$ term (this is work done by $A'$, since it simulates the oracles for $A$).
Actually, I think there is a bug in your question, since I think you mean that $t'\leq t+n \cdot t_c$ which is simply since your constructed reduction $A'$ gives an upper bound on the runtime (there may be more efficient reductions $A''$, which you did not figure out, but you have one and it can only get better. Hence the $\leq$).
• Thank you for your efforts to explain me. Why you say that the "subalgorithms" of A simulate the challenger and the oracles ? This is not $A'$ (t.i.t.s. the reduction) which simulates the environment of $A$ ? Mar 28, 2014 at 18:26
• @Dingo13 The reduction $A'$ is an algorithm were you put a problem in and get the solution out. But internally $A'$ simulates the challenger and oracles for $A$. Thus I wrote "subalgorithms" of $A'$ for the parts of $A'$ that do these tasks. Anyways thats only one "big" algorithm $A'$ when viewed from the outside. Hope that helps. Mar 28, 2014 at 18:32
• Sorry I've read "subalgorithms" of $A$ in your answer. In fact I've already understood your comments. There is only small details that are a problem for me. You say that oracle queries costs $1$ unit of time. Why they don't appear in the times of proofs by reduction ? It seems to me that if we have $q$ oracle calls, we should take into account the amount of time $q$, not ? Mar 28, 2014 at 18:40
• @Dingo13 thats already counted in the operations $A'$ makes, since the oracles are simulated by $A'$. Mar 28, 2014 at 19:05
• I make the distinction between simulated oracle and "real" oracle. I thought in your explanation that "real" oracle queries costs $1$ whereas "simulated" oracle costs the time to make the needed computations. Mar 28, 2014 at 19:33
The equation $t'=t+n\cdot t_c$ is an estimation to put an upper limit on $t'$. It might be possible that an attacker $A'$ can use a different, more efficient algorithm. But since the attack will work with using $A$, there exists an attacker $A'$ with at most $t'$. This means it's actually not an equation, but an inequality $t' \leq t + n \cdot t_c$. And then the next step is just a standard transformation to get $t' - n \cdot t_c \leq t$.
Edit: Actually, this assumes that $A'$ only has to run $A$ once. There are also reductions which run $A$ multiple times. If you are only looking for asymptotical complexity, it doesn't change much, tho. Running a polynomial time algorithm polynomial many times is still polynomial overall.
Edit2: Concerning your example, there are a couple of misunderstandings of of the these times. First, in a reduction we use $A$ mostly as a blackbox. We can observe the queries (e.g. if we assume an oracle for that, which can be accessed by both $A$ and $A'$). But we make no assumptions about these times. Saying that $A'$ takes 1 unit of time for a calculation and $A$ needing 1 unit of time for a query (and possibly some internal computations) is an assumption about their correlation we should not make.
And then there is the question what we actually use from the attacker $A$. Usually we do not only use their queries, but their results. And that happens at the time $A$ is finished, which is $t$. Then $A'$ can do its final transformation of results or do some more complex computations, which is not necessarily instant (e.g. solving a large linear system or doing $k$ exponentiations, etc.). If you assume this to be instant, then $t=t'$ for exactly this attack. But that doesn't mean that this is the fastest attack (if you assume $A'$ to be the "best" attacker, $t'$ might be lower), or if those computations are not instant, then $t'$ might be greater.
• Thanks tylo, I've already understood these things but this does not respond to my misunderstanding. My problem is the following: I don't understand why we can deduct something like that about $t$ since $t$ and $t'$ seem tightly related. When $A'$ performs a computation to respond to a query from $A$, time goes by the same for both. It seems to me that $A$ and $A′$ terminate at virtually the same time ($A′$ uses the output from A almost immediately). Mar 27, 2014 at 17:52
• Maybe it's preferable to give an example ? I'm going to give a concrete example in my post ! :-) Mar 27, 2014 at 17:55
• If we write $t' - n \cdot t_c \leq t$, this means that the computations are free (they take $0$ unit of time). Maybe you will say me that this is normal since we are looking for an upper bound... But this strange anyway (computations are not free) Mar 27, 2014 at 18:08
• That is a wrong conclusion. The computations are bound by $n\cdot t_c \geq t' - t$. But if $A'$ has to do any computations after it $A$ terminated and gave the results, they do not end at the same time. Even in your simple example, the attack $A$ alone does 2 steps of time ($A$ is a standalone algorithm), while $A$ requires to wait for $A$ for 2 units and do 2 computations of its own, so overall $4$ (if you assume the time slots to be equal, and no parallel execution).
– tylo
Mar 27, 2014 at 18:33
• Thanks tylo, I've not understood your last comment because of mistakes when writing... And this is not clear because when $A$ waits for the responses from $A'$, time is always elapsing. Even is $A$ is a standalone algorithm, each waiting takes time... Mar 27, 2014 at 18:46 | 2,493 | 9,628 | {"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-2024-18 | latest | en | 0.949239 |
https://edurev.in/course/quiz/attempt/39731_Test-Laws-of-Motion-3/5d2229c6-4917-4670-8108-d313919cfaaa | 1,726,567,271,000,000,000 | text/html | crawl-data/CC-MAIN-2024-38/segments/1725700651750.27/warc/CC-MAIN-20240917072424-20240917102424-00641.warc.gz | 195,256,393 | 67,824 | Test: Laws of Motion - 3 - NEET MCQ
# Test: Laws of Motion - 3 - NEET MCQ
Test Description
## 30 Questions MCQ Test Topic-wise MCQ Tests for NEET - Test: Laws of Motion - 3
Test: Laws of Motion - 3 for NEET 2024 is part of Topic-wise MCQ Tests for NEET preparation. The Test: Laws of Motion - 3 questions and answers have been prepared according to the NEET exam syllabus.The Test: Laws of Motion - 3 MCQs are made for NEET 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Laws of Motion - 3 below.
Solutions of Test: Laws of Motion - 3 questions in English are available as part of our Topic-wise MCQ Tests for NEET for NEET & Test: Laws of Motion - 3 solutions in Hindi for Topic-wise MCQ Tests for NEET course. Download more important topics, notes, lectures and mock test series for NEET Exam by signing up for free. Attempt Test: Laws of Motion - 3 | 30 questions in 60 minutes | Mock test for NEET preparation | Free important questions MCQ to study Topic-wise MCQ Tests for NEET for NEET Exam | Download free PDF with solutions
Test: Laws of Motion - 3 - Question 1
### A man getting down a running bus, falls forward because-
Detailed Solution for Test: Laws of Motion - 3 - Question 1
The explanation is the question itself. Inertia is a property of which it resists its change of state of rest or state of motion, so as soon as the person jumps the lower part immediately comes to rest by sharing contact with the ground the upper body due to inertia of motion resists its change in state of motion.
Test: Laws of Motion - 3 - Question 2
### You are on a friction less horizontal plane. How can you get off if no horizontal force is exerted by pushing against the surface ?
Detailed Solution for Test: Laws of Motion - 3 - Question 2
Spitting or sneezing this is because you can not jump forward or backward or rolling or even run on the frictionless plane. So you have to throw anything out of your body by applying force Newton's third law follows here and you will escape out.
1 Crore+ students have signed up on EduRev. Have you?
Test: Laws of Motion - 3 - Question 3
### The forces acting on an object are shown in the fig. If the body moves horizontally at a constant speed of 5 m/s, then the values of the forces P and S are, respectively-
Detailed Solution for Test: Laws of Motion - 3 - Question 3
As there is no net acceleration in horizontal or vertical direction, we can say that
P = 300N
And 2S = 2000N
Thus S = 1000N
Test: Laws of Motion - 3 - Question 4
A boy of mass 50 Kg running at 5 m/s jumps on to a 20Kg trolley travelling in the same direction at 1.5 m/s. What is the common velocity?
Detailed Solution for Test: Laws of Motion - 3 - Question 4
Since no external force, law of conservation of momentum can be applied
Initial Momentum
Final momentum
where v is the common velocity
Now we know that
Initial momentum = Final momentum
280 = 70v
V = 4m/s
Test: Laws of Motion - 3 - Question 5
Find the velocity of the hanging block if the velocities of the free ends of the rope are as indicated in the figure.
Detailed Solution for Test: Laws of Motion - 3 - Question 5
Workdone by T = 0
∴ ∑T⋅V = 0
2T + T + 2TV = 0
⇒ − 3T = − 2TV (T & 2T are 180°)
∴ V = 3/2 m/s↑
Test: Laws of Motion - 3 - Question 6
At a given instant, A is moving with velocity of 5 m/s upwards. What is velocity of B at the time
Detailed Solution for Test: Laws of Motion - 3 - Question 6
l1 = 2l2 + l= constant
dl1/dt + 2dl2/dt + dl3/dt = 0
−5 + 2(−5) + dl/dt = 0
dl3/dt = 15m/s
⇒ v= 15m/s↓
Test: Laws of Motion - 3 - Question 7
A body of mass 5 kg is suspended by the strings making angles 60º and 30º with the horizontal -
(a) T1 = 25 N
(b) T2 = 25 N
(c) T1 = 25N
(d) T2 = 25N
Detailed Solution for Test: Laws of Motion - 3 - Question 7
As the mass is at rest the resultant of forces acting on it are equal to zero so forces in vertical direction are
T1sin30o + T2sin60o − mg = 0
similarly in horizontal direction
T1sin30− T2sin60= 0
solving above equations will give us
T1+ √3×√3T1 = 100
T= 25N
T2 = 25√3N
Test: Laws of Motion - 3 - Question 8
A cyclist of mass 30 kg exerts a force of 250 N to move his cycle. acceleration is 4 ms−2. force of friction between road and tyres will be
Detailed Solution for Test: Laws of Motion - 3 - Question 8
Net Force = Force exerted by Cyclist - Frictional Force
Also, according to newton's second law
Fnet = m.a
250 N - Frictional Force = 30x4
∴ Frictional Force = 250 - 120 N
= 130 N
Test: Laws of Motion - 3 - Question 9
In the arrangement shown in fig. the ends P and Q of an unstretchable string move downwards with uniform speed U. Pulleys A and B are fixed. Mass M moves upwards with a speed.
Detailed Solution for Test: Laws of Motion - 3 - Question 9
Thus option D is correct
Test: Laws of Motion - 3 - Question 10
The velocity of end `A' of rigid rod placed between two smooth vertical walls moves with velocity `u' along vertical direction. Find out the velocity of end `B' of that rod, rod always remains in constant with the vertical walls.
Detailed Solution for Test: Laws of Motion - 3 - Question 10
Let say end b has some velocity v in horizontal direction. Thus by constraint motion we get the component of velocities along the rod of both the ends must be equal thus we get,
u.cos (90-q) = v.cos q
Thus we get v = u.tan q
Test: Laws of Motion - 3 - Question 11
A cyclist of mass 30 kg exerts a force of 250 N to move his cycle. The acceleration is 4 ms−2. The force of friction between the road and tyres will be
Detailed Solution for Test: Laws of Motion - 3 - Question 11
As 250N is applied to move the cyclist and cycle, and lets say some frictional force f is acting upon it.
Thus we get 250 - f = 30 x 4 =120
Thus we get f = 130N
Test: Laws of Motion - 3 - Question 12
Find out the reading of the weighing machine in the following cases.
Detailed Solution for Test: Laws of Motion - 3 - Question 12
N = mgcosФ
= 2 x 10 x cos30
= 2 x 10 x √3 / 2
= 10√3 N
Test: Laws of Motion - 3 - Question 13
A mass M is suspended by a rope from a rigid support at A as shown in figure. Another rope is tied at the end B, and it is pulled horizontally with a force F. If the rope AB makes an angle q with the vertical in equilibrium, then the tension in the string AB is :
Detailed Solution for Test: Laws of Motion - 3 - Question 13
As the block is still at the equilibrium, we get
T.cos q = mg
T.sin q = F
Thus we T = F / sin q
Test: Laws of Motion - 3 - Question 14
Three block are connected as shown, on a horizontal frictionless table and pulled to the right with a force T3 = 60 N. If m1 = 10 kg, m2 = 20 kg and m3 = 30 kg, the tension T2 is-
Detailed Solution for Test: Laws of Motion - 3 - Question 14
Let a be the acceleration of the system.
T1 = M1a .....(1)
T− T= M2a ....(2)
F − T2 = M3a ......(3)
Adding (1), (2) and (3) we get
(M1 + M2 + M3)a = F
or (10+20+30)a = 60
⇒ a = 1m/s2
Now , T2 = (M1+M2)a
⇒ (10+20)(1) = 30N
Test: Laws of Motion - 3 - Question 15
Three blocks A, B and C are suspended as shown in the figure. Mass of each blocks A and C is m. If system is in equilibrium and mass of B is M, then :
Detailed Solution for Test: Laws of Motion - 3 - Question 15
Given,
Mass of block A & B = m
Mass of block C = M
Let,
Mass of A = mA & Mass of B = mB
Tension in string is = T
At equilibrium, T = mAg = mBg = mg
Weight of block C is = Mg
Forces on block C,
2Tcosθ = Mgcosθ
⇒ Mg/2T = Mg/2mg
⇒ M/2m
If 0< θ <90° then 1> cosθ >0
1> M/2m >0
2m > M
Hence, 2m > M
Test: Laws of Motion - 3 - Question 16
A weight can be hung in any of the following four ways by string of same type. In which case is the string most likely to break ?
Detailed Solution for Test: Laws of Motion - 3 - Question 16
• In all the given cases the cos component of the tension in the string would balance the weight of the block while the sine component will cancel themselves as they are in pair.
• The larger would be the angle the smaller would be the cos component but as its value is fixed i.e. is mg, we get the larger the angle the larger the tension and hence the more chances of breaking of the rope.
Test: Laws of Motion - 3 - Question 17
A force-time graph for a linear motion is shown in figure where the segments are circular. The linear momentum gained between zero and 8 seconds in -
Detailed Solution for Test: Laws of Motion - 3 - Question 17
Momentum is rate of change of force according to the given graph initial and final forces are same ie, no change in force therefore b/w 0 and 8 seconds linear momentum is 0.
Test: Laws of Motion - 3 - Question 18
A particle moves in the xy plane under the action of a force F such that the value of its linear momentum (P) at any time t is, Px = 2 cost, Py = 2 sint. The angle q between P and F at that time t will be -
Detailed Solution for Test: Laws of Motion - 3 - Question 18
Fx = dpx / dt = - 2sint
Fy = dpy / dt = 2cost
So angle between F and will be 90º because we see that their dot product is zero.
Test: Laws of Motion - 3 - Question 19
A stunt man jumps his car over a crater as shown (neglect air resistance)
Detailed Solution for Test: Laws of Motion - 3 - Question 19
• As the car is in free fall condition it's acceleration will be g downwards.
• Applying pseudo force mg in upward direction , it's weight acts downwards, hence, net force on stunt man is zero and it experience weightless ness.
Test: Laws of Motion - 3 - Question 20
A particle of mass 50 gram moves on a straight line. The variation of speed with time is shown in figure. find the force acting on the particle at t = 2, 4 and 6 seconds.
Detailed Solution for Test: Laws of Motion - 3 - Question 20
• To know the force acting on the particle, we need to know the acceleration of the particle. In the velocity-time graph the slope of the curve gives the instantaneous acceleration. Let us find it for the given instant.
• At t=2 seconds
The graph is a straight line with positive slope. It means the particle has a constant acceleration with magnitude =15/3 =5 m/s.
So the force acting on it = mass x acceleration = 0.05 kg x 5 m/s
= 0.25 N, it acts along the motion because it is positive.
• At t=4 seconds
The graph is horizontal to time axis meaning thereby the velocity is constant and no acceleration. It can be understood in this way too that the slope which represents acceleration is zero. Since there is no acceleration at t=4 s. so there is no force acting on the particle at this instant, Force= zero.
• At t=6 seconds
The graph shows that velocity is uniformly decreasing with the time and the acceleration which is represented by the slope is negative. From the graph value of acceleration = -15/3 =-5 m/s
Force = mass x acceleration = 0.05 x -5 N =-0.25 N
• So the force acting on the particle is 0.25 N and negative sign shows that its direction is opposite to the motion.
Test: Laws of Motion - 3 - Question 21
Two blocks are in contact on a frictionless table. One has mass m and the other 2m. A force F is applied on 2m as shown in the figure. Now the same force F is applied from the right on m. In the two cases respectively, the ratio force of contact between the two block will be :
Detailed Solution for Test: Laws of Motion - 3 - Question 21
• If F is applied force then acceleration of the system is F/2m + m = F/3m
• Now when we apply the force from the left, the force applied on the block m is F/3m = F/3. This will be the force in the contact.
• When we apply the force from the right from on the block will be 2Fm/3 = 2F/3, this will be the force on the contact then.
So the ratio is F/3 : 2F/3 = 1 : 3
Test: Laws of Motion - 3 - Question 22
A body of mass 8 kg is hanging another body of mass 12 kg. The combination is being pulled by a string with an acceleration of 2.2 m s-2. The tension T1 and T2 will be respectively : (use g = 9.8 m/s2)
Detailed Solution for Test: Laws of Motion - 3 - Question 22
The tension T1 and T2 will be 240 N, 96 N.
Mass of the body = m1 = 12kg (Given)
Mass of the body = m2 = 8kg (Given)
Acceleration of the string - 2.2m/s² (Given)
Considering positive direction upwards -
Thus,
T1− (m1+m2)g = (m1+m2)a
T1 = (m1+m2)g + (m1+m2)a
T1= (12+8)(2.2)+(12+8)(9.8)
T1 = 44 + 196
= 240 N
T2− (m2)g=(m2)a
T2=(m2)g+(m2)a
T2= (8)(2.2)+(8)(9.8)
T2 = 17.6 + 78.4
= 96 N
Test: Laws of Motion - 3 - Question 23
A rope of mass 5 kg is moving vertically in vertical position with an upwards force of 100 N acting at the upper end and a downwards force of 70 N acting at the lower end. The tension at midpoint of the rope is
Detailed Solution for Test: Laws of Motion - 3 - Question 23
When you are given one upward and one downward force on a rope of some mass, and you have to find the tension at the mid- point, then you can simply average the 2 forces. So, the correct answer is (100+70)/3 = 85N
Test: Laws of Motion - 3 - Question 24
A particle of small mass m is joined to a very heavy body by a light string passing over a light pulley. Both bodies are free to move. The total downward force in the pulley is
Detailed Solution for Test: Laws of Motion - 3 - Question 24
The heavy body will fall due to accelaration due to gravity.The accelaration of the lighter body wil be 'g' in upward direction.Taking the equlibrium of the small body
T - mg = ma
but a = g
Therefore
T - mg = mg
T = 2mg
reation at the pulley
2T = 4mg
Test: Laws of Motion - 3 - Question 25
The pulley arrangements shown in figure are identical the mass of the rope being negligible. In case I, the mass m is lifted by attaching a mass 2 m to the other end of the rope. In case II, the mass m is lifted by pulling the other end of the rope with cosntant downward force F = 2 mg, where g is acceleration due to gravity. The acceleration of mass in case I is
Detailed Solution for Test: Laws of Motion - 3 - Question 25
When we make the free body diagram of two mass system in case 1, we get the equation
2mg - mg = (2m + m) a
Thus we get a = g/3
But in the case 2 the equations is as follows
2mg - mg = ma
Thus we get a - g here.
Test: Laws of Motion - 3 - Question 26
Two masses M1 and M2 are attached to the ends of a light string which passes over a massless pulley attached to the top of a double inclined smooth plane of angles of inclination a and b. The tension in the string is:
Detailed Solution for Test: Laws of Motion - 3 - Question 26
If we straighten the string horizontally hypothetically and make the free body diagram for the whole two block system we get that
M1g.sinɑ - M2g.sinβ = (M1 + M2)a
For some net acceleration of the system a
Such that a = M1g.sinɑ - M2g.sinβ / (M1 + M2)
Hence if we make a free body diagram of mass 1 only we get
M1g.sinɑ - T = M1a
Thus we get T = M1 ( g.sinɑ - a )
= M1( g.sinɑ - [M1g.sinɑ - M2g.sinβ / (M1 + M2) ] )
= M1( M2 (sinɑ + sinβ )f / (M1 + M2) )
Test: Laws of Motion - 3 - Question 27
Two masses are hanging vertically over frictionless pulley. The acceleration of the two masses is-
Detailed Solution for Test: Laws of Motion - 3 - Question 27
Free Body Diagram:
Fnet = m2g - m1g
F = (m+ m2) a
m2g - m1g = (m+ m2) a
Test: Laws of Motion - 3 - Question 28
Three equal weights A, B, C of mass 2 kg each are hanging on a string passing over a fixed frictionless pulley as shown in the fig. The tension in the string connecting weights B and C is-
Detailed Solution for Test: Laws of Motion - 3 - Question 28
For some time let us consider B and C to be one single block of mass 4kg. Now if we make the free body diagram for blocks A, B, C we get the net acceleration of the system by equation
4.g - 2.g = 6.a
Thus we get a = g/3
Now if we only make a F.B.D. of block C, we get
2.g - T = 2.a
Thus T = 2 (g - g/3)
= 4g/3
= 13.3 N
Test: Laws of Motion - 3 - Question 29
In the arrangement shown in figure, pulleys are massless and frictionless and threads are inextensible. The Block of mass m1 will remain at rest, if
Detailed Solution for Test: Laws of Motion - 3 - Question 29
a = [(m3−m2 )/(m2+m3) ]g (m> m2)
T = [2m2m3g] / [m2+m3]
T′ = 2T = [4m2m3g] / [m2+m3]
m1g = 4m2m3gm / m2+m3
4/m1 = [1/m2] + [1/m3]
Test: Laws of Motion - 3 - Question 30
A block is placed on a rough floor and a horizontal force F is applied on it. The force of friction f by the floor on the block is measured for different values of F and a graph is plotted between them-
Detailed Solution for Test: Laws of Motion - 3 - Question 30
For a small value of the applied force the force of friction f increases linearly upto the limiting friction. When it crosses the maximum point of static friction then the friction force due to kinetic friction does not change any more.
## Topic-wise MCQ Tests for NEET
9 docs|1272 tests
Information about Test: Laws of Motion - 3 Page
In this test you can find the Exam questions for Test: Laws of Motion - 3 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Laws of Motion - 3, EduRev gives you an ample number of Online tests for practice
## Topic-wise MCQ Tests for NEET
9 docs|1272 tests | 5,065 | 17,173 | {"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-2024-38 | latest | en | 0.920456 |
https://courseworkheros.com/18-you-choose-an-alpha-level-of-01-and-then-analyze-your-data-a-what-is-the-probability-that-you-will/ | 1,680,360,492,000,000,000 | text/html | crawl-data/CC-MAIN-2023-14/segments/1679296950030.57/warc/CC-MAIN-20230401125552-20230401155552-00794.warc.gz | 216,006,037 | 15,071 | # 18. You choose an alpha level of .01 and then analyze your data. a. What is the probability that you will…
18. You choose an alpha level of .01 and then analyze your data.
a. What is the probability that you will make a Type I error given that the null hypothesis is true?
b. What is the probability that you will make a Type I error given that the null hypothesis is false?
### Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines
Order Paper Now
7. Below are data showing the results of six subjects on a memory test. The three scores per subject are their scores on three trials (a, b, and c) of a memory task. Are the subjects get- ting better each trial? Test the linear effect of trial for the data.
a b c 4 6 7 3 7 8 2 8 5 1 4 7 4 6 9 2 4 2
a. Compute L for each subject using the contrast weights -1, 0, and 1. That is, compute (-1)(a) + (0)(b) + (1)(c) for each subject.
b. Compute a one-sample t-test on this column (with the L values for each subject) you created.
13. You are conducting a study to see if students do better when they study all at once or in intervals. One group of 12 participants took a test after studying for one hour continuously. The other group of 12 participants took a test after studying for three twenty minute sessions. The first group had a mean score of 75 and a variance of 120. The second group had a mean score of 86 and a variance of 100.
a. What is the calculated t value? Are the mean test scores of these two groups significantly different at the .05 level?
b. What would the t value be if there were only 6 participants in each group? Would the scores be significant at the .05 level?
4. Rank order the following in terms of power.
Population 1 Mean N Population 2 Mean Standard Deviation A 29 20 43 12 B 34 15 40 6 C 105 24 50 27 D 170 2 120 10
65. Previously, an organization reported that teenagers spent 4.5 hours per week, on average, on the phone. The organization thinks that, currently, the mean is higher. Fifteen randomly chosen teenagers were asked how many hours per week they spend on the phone. The sample mean was 4.75 hours with a sample standard deviation of 2.0. Conduct a hypothesis test.
71. Previously, an organization reported that teenagers spent 4.5 hours per week, on average, on the phone. The organization thinks that, currently, the mean is higher. Fifteen randomly chosen teenagers were asked how many hours per week they spend on the phone. The sample mean was 4.75 hours with a sample standard deviation of 2.0. Conduct a hypothesis test, the Type I error is:
a. to conclude that the current mean hours per week is higher than 4.5, when in fact, it is higher
b. to conclude that the current mean hours per week is higher than 4.5, when in fact, it is the same
c. to conclude that the mean hours per week currently is 4.5, when in fact, it is higher
d. to conclude that the mean hours per week currently is no higher than 4.5, when in fact, it is not higher
77
Mathematics homework help | 807 | 3,204 | {"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.34375 | 3 | CC-MAIN-2023-14 | longest | en | 0.920746 |
https://www.studentlance.com/solution/in-the-least-squares-equation-y-12-25x-the-value-of-25-indicates-2 | 1,495,798,722,000,000,000 | text/html | crawl-data/CC-MAIN-2017-22/segments/1495463608659.43/warc/CC-MAIN-20170526105726-20170526125726-00326.warc.gz | 1,214,191,363 | 5,114 | # In the least squares equation, Y' = 12 + 25X the value of 25 indicates - 6700
Solution Posted by
## UoPExpert
Rating : (2)F
Solution Detail
Price: \$1.30
• From: ,
• Posted on: Thu 05 Apr, 2012
• Request id: None
• Purchased: 0 time(s)
• Average Rating: No rating
Request Description
In the least squares equation, Y' = 12 + 25X the value of 25 indicates
A. for each unit increase in X, Y increases by 25
B. the Y intercept
C. for each unit increase in Y, X increases by 25
D. the X factor
Solution Description
In the least squares equation, Y' = 12 + 25X the value of 25 indicates | 189 | 601 | {"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.765625 | 3 | CC-MAIN-2017-22 | longest | en | 0.792958 |
https://jp.mathworks.com/matlabcentral/answers/599281- | 1,621,170,089,000,000,000 | text/html | crawl-data/CC-MAIN-2021-21/segments/1620243991269.57/warc/CC-MAIN-20210516105746-20210516135746-00284.warc.gz | 355,046,900 | 30,433 | # 教師なし学習,クラスタリングについて
6 ビュー (過去 30 日間)
Kaneko 2020 年 9 月 24 日
コメント済み: Kenta 2020 年 9 月 25 日
サイトを参考に,使用するプログラムコードは以下の通りです。
clear;clc;close all
% unzip the zip file of MearchData
unzip('MerchData.zip');
% import a pre-trained network called darknet19
net=darknet19;
% load the images into the image data store called imds
imds = imageDatastore('MerchData','IncludeSubfolders',true,'LabelSource','foldernames');
% use augmented image datastore for image augmentation
augImds=augmentedImageDatastore(net.Layers(1, 1).InputSize(1:2),imds);
% randomly extract image index to display some images
idx=randperm(numel(imds.Files),20);
% to show the tiled images
figure;montage(imgEx.input);title('example of the dataset')
% Gather label information from the image datastore
Labels=imds.Labels;
% count the number of images
numClass=numel(countcats(Labels));
% feature extraction with the pre-trained network
feature=squeeze(activations(net,augImds,'avg1'));
figure;
% conduct a principal component analysis for the dimension reduction
A=pca(feature,"Centered",true);
subplot(1,2,1)
gscatter(A(:,1),A(:,2),Labels)
subplot(1,2,2)
% perform t-sne for the dimension reduction
T=tsne(feature');
gscatter(T(:,1),T(:,2),Labels)
% perform k-means algorithm
% please note that as the result is dependent on the initial point in the algorithm, the
% result would not be same
C=kmeans(feature',numClass,"Start","plus");
% confirm the number of images in the largest group
[~,Frequency] = mode(C);
sz=net.Layers(1, 1).InputSize(1:2);
% prepare a matrix to show the clustering result
I=zeros(sz(1)*numClass,sz(2)*Frequency,3,'uint8');
% loop over the class to display images assigned to the group
for i=1:numClass
% read the images assigned to the group
% use the function "find" to find out the index of the i-th group image
% tile the images extracted above
I((i-1)*sz(1)+1:i*sz(1),1:sz(2)*numel(find(C==i)),:)=cat(2,ithGroup.input{:});
end
figure;imshow(I);title('result of the image clustering using k-means after feature extraction with darknet19')
このプログラムコードは,デフォルトで,既に用意してある画像データがあり,実行を押すと,そのデータをクラスタリングしていますが,
MerchDataがデフォルトのデータの画像フォルダだと思ったので,そこを自分が用意した画像フォルダの名前にしてもエラーが出てしまいます。
よろしくお願いいたします。
##### 4 件のコメント表示非表示 3 件の古いコメント
Kaneko 2020 年 9 月 24 日
ありがとうございます。
data_pitureをzip型式にしたら
unzip('data_picture.zip');
の部分はうまくいきました。
しかし,次に以下のようなエラーが出ました。
エラー: SeriesNetwork/activations (line 790)
activations 用の入力イメージのサイズは、[256 256 3] 以上でなければなりません。
エラー: clustering (line 23)
feature=squeeze(activations(net,augImds,'avg1'));
この入力イメージのサイズに合わせなければいけないのでしょうか。
サインインしてコメントする。
### 採用された回答
michio 2020 年 9 月 25 日
augImds=augmentedImageDatastore(net.Layers(1, 1).InputSize(1:2),imds);
で darknet19 の入力層に合わせて変更されるようなコードになっています。詳細はこちら:https://jp.mathworks.com/help/deeplearning/ref/augmentedimagedatastore.html
エラーの原因はチャネル数かな?と推測しています。darknet19 は 256x256x3 ということで例えば RGB 画像入力が想定されていますが、使用されている画像は 28x28x1 ということでグレースケール画像ですね。
なので以下を試してみてください。色の前処理用のオプション 'ColorPreprocessing' を 'gray2rgb' に設定しています。
augImds=augmentedImageDatastore(net.Layers(1, 1).InputSize(1:2),imds,'ColorPreprocessing','gray2rgb');
augmentedImageDatastore が何をする関数かは是非
を確認してみてください。
##### 2 件のコメント表示非表示 1 件の古いコメント
Kenta 2020 年 9 月 25 日
こんにちは、私のファイルを実行していただきありがとうございます。28×28ですと、darknetを特徴抽出器として使うのではなく、cifar10などを28×28にリサイズして、グレースケールにて学習し、それを特徴抽出器として使うなどもよさそうですね。256×256のネットワークでもある程度よい特徴抽出はできるとは思いますが。
サインインしてコメントする。
### Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting! | 1,251 | 3,483 | {"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-2021-21 | latest | en | 0.389118 |
https://learn.careers360.com/school/question-composition-of-the-nuclei-of-two-atomic-species-x-and-y-are-given-as-underx-protons-6-neutrons-6y-protons-6-neutrons-8give-the-mass-numbers-of-x-and-y-what-is-the-relation-between-the-two-species-25643/ | 1,713,634,811,000,000,000 | text/html | crawl-data/CC-MAIN-2024-18/segments/1712296817670.11/warc/CC-MAIN-20240420153103-20240420183103-00730.warc.gz | 315,561,439 | 34,474 | #### Composition of the nuclei of two atomic species X and Y are given as under X: Protons (6), Neutrons (6) Y: Protons (6), Neutrons (8) Give the mass numbers of X and Y. What is the relation between the two species?
As we know,
the mass number of an atom = No. of protons + No. of Neutrons
So,
The mass number of X = No. of protons of X + No. of Neutrons of X
= 6 + 6
= 12
The mass number of Y = No. of protons of Y + No. of Neutrons of Y
= 6 + 8
= 14
As both X and Y have the same atomic number (6) but different numbers (i.e., 12 and 14 respectively), they are isotopes. | 192 | 587 | {"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-2024-18 | latest | en | 0.922847 |
https://www.coursehero.com/file/1683120/Homework-09/ | 1,513,384,300,000,000,000 | text/html | crawl-data/CC-MAIN-2017-51/segments/1512948580416.55/warc/CC-MAIN-20171215231248-20171216013248-00796.warc.gz | 727,198,435 | 24,104 | Homework 09
# Homework 09 - Su Yung Homework 9 Due Dec 2 2007 11:00 pm...
This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up to access the rest of the document.
Unformatted text preview: Su, Yung Homework 9 Due: Dec 2 2007, 11:00 pm Inst: FAKHREDDINE 1 This print-out should have 40 questions. Multiple-choice questions may continue on the next column or page find all choices before answering. The due time is Central time. Each question is worth one point. 001 (part 1 of 1) 1 points Which of the following is true of a general thermodynamic state function? 1. The value of the state function remains constant. 2. The value of a state function does NOT change with a change in temperature of a process. 3. The change in the value of a state func- tion is always negative for a spontaneous re- action. 4. The change in the value of the state func- tion is always positive for endothermic pro- cesses. 5. The change of the value of a state func- tion is independent of the path of a process. correct Explanation: A change in a state function describes a difference between the two states. It is inde- pendent of the process or pathway by which the change occurs. 002 (part 1 of 1) 1 points In thermodynamics, when energy changes oc- cur during a process, we put the changes into two categories: 1. Joules and kiloJoules. 2. potential and kinetic energy. 3. enthalpy and internal energy. 4. heat and work. correct 5. external and internal energy. Explanation: All the energy contained within a sub- stance is E , the internal energy. These en- ergy changes are either heat ( q ) or work ( w ) changes. E = E f- E i = q + w 003 (part 1 of 1) 1 points If a system absorbs heat and also does work on its surroundings, its energy 1. must decrease. 2. may either increase or decrease, depend- ing on the relative amounts of heat absorbed and work done. correct 3. must increase. 4. must not change. Explanation: E = q + w q &gt; 0 because heat is absorbed and w &lt; 0 be- cause the system does work on its surround- ings. Therefore E = (+) + (- ). E can be positive only if q &gt; w , and negative only if w &gt; q . 004 (part 1 of 1) 1 points The standard molar heat of fusion of ice is 6020 J/mol. Calculate q , w , and E for melting 1.00 mol of ice at 0 C and 1.00 atm pressure. 1. q = 6020 J/mol, w =- 6020 J/mol, and E = 0 2. q = 6020 J/mol, w = 0, and E = 6020 J/mol correct 3. q = 6020 J/mol, w = 6020 J/mol, and E = 12040 J/mol 4. q =- 6020 J/mol, w = 6020 J/mol, and E = 0 Su, Yung Homework 9 Due: Dec 2 2007, 11:00 pm Inst: FAKHREDDINE 2 5. q =- 6020 J/mol, w = 0, and E =- 6020 J/mol Explanation: E = q + w q = H w =- P V =- ( n ) R T Since the water is never in the gas phase, V 0, so w = 0 and H = E . Melting requires energy absorption by the system, so it is endothermic and H is positive. 005 (part 1 of 1) 1 points A sample of an ideal gas having a volume of 0.701 L at 298 K and 10.0 atm pressure is al- lowed to expand against a constant opposing pressure of 0.541 atm until it has a volume of 1.000 L at 200 K and the pressure equals the opposing pressure. What is the work for the system?...
View Full Document
{[ snackBarMessage ]}
### Page1 / 16
Homework 09 - Su Yung Homework 9 Due Dec 2 2007 11:00 pm...
This preview shows document pages 1 - 3. Sign up to view the full document.
View Full Document
Ask a homework question - tutors are online | 1,047 | 3,543 | {"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-2017-51 | latest | en | 0.876527 |
https://cs.stackexchange.com/questions/72242/difference-between-fractional-knapsack-greedy-solution | 1,722,990,380,000,000,000 | text/html | crawl-data/CC-MAIN-2024-33/segments/1722640523737.31/warc/CC-MAIN-20240806224232-20240807014232-00663.warc.gz | 147,638,880 | 40,407 | # Difference between fractional knapsack & greedy solution
I am trying to understand what the difference is between the fractional knapsack problem using dynamic programming, and the greedy solution version. Im looking at an example of the fractional problem which looks like:
What's the difference between that and the greedy solution? Are you not just taking the value-per-pound in this example too but it's just not explicitly stated?
• The greedy solution to what? To fractional knapsack or regular knapsack? Commented Mar 30, 2017 at 7:43
• What you mean by "the difference"? The two algorithms are very obviously not the same. Commented Apr 29, 2017 at 8:30
The fractional Knapsack problem isn't solved using Dynamic Programming, but can be solved using a greedy algorithm. Item A is \$50/unit, B is \$5/unit and C is \\$40/unit. The greedy method is to use as much of the highest value items as possible, which gives the solution on the image. | 216 | 954 | {"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 | 3 | CC-MAIN-2024-33 | latest | en | 0.952052 |
https://math.stackexchange.com/questions/1265637/if-x-n-rightarrow-1-then-show-that-sequence-frac-4-x-n2x-n-ap | 1,632,559,083,000,000,000 | text/html | crawl-data/CC-MAIN-2021-39/segments/1631780057615.3/warc/CC-MAIN-20210925082018-20210925112018-00552.warc.gz | 437,353,635 | 37,913 | # If $x_n$ $\rightarrow$ 1 Then show that sequence $\frac {4+ (x_n)^{2}}{x_n}$ approaches to limit 5
If $x_n$ $\rightarrow$ 1
Then show that sequence $\frac {4+ (x_n)^{2}}{x_n}$ approaches to limit 5
I have tried to find epsilon proof ,But i am not successful .Can anyone help me with this
Thanks
First you can prove that $\dfrac{1}{2} < x_n < 2$ is true for some $n \geq N$. And use this to show that: $\left|\dfrac{4+x_n^2}{x_n}-5\right| = \left|\dfrac{x_n^2-5x_n+4}{x_n}\right| = \left|x_n-1\right|\cdot \dfrac{\left|x_n-4\right|}{|x_n|}\leq \left|x_n-1\right|\cdot \dfrac{\left(|x_n|+4\right)}{\frac{1}{2}}\leq \left|x_n-1\right|\cdot 2(2+4)= 12|x_n-1|, n \geq N$ and the $\epsilon-\delta$ argument should work.
How about a direct computation $$\lim_{n \to \infty} \frac{4+(x_n)^2}{x_n} = \lim_{n \to \infty} \frac{4}{x_n} + \lim_{n \to \infty} \frac{(x_n)^2}{x_n} = \frac41 + \lim_{n \to \infty} x_n = 4+1 = 5$$ | 380 | 921 | {"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} | 4.21875 | 4 | CC-MAIN-2021-39 | latest | en | 0.591272 |
https://www.jiskha.com/questions/45093/i-was-researching-amusement-park-rides-for-a-recent-project-from-this-site-i-have-noticed | 1,632,552,261,000,000,000 | text/html | crawl-data/CC-MAIN-2021-39/segments/1631780057598.98/warc/CC-MAIN-20210925052020-20210925082020-00373.warc.gz | 843,696,364 | 5,372 | # A physics question
I was researching amusement park rides for a recent project (from this site I have noticed that many others are in the same boat as me). Anywho, I am doing the Ferris wheel or the Giant Wheel, and I was wondering if this was right, with respect to potential energy: this is due to the wheels vertical position; this type of energy does not change on the Ferris wheel as it revolves, if gondolas on the are the same mass, because the center of mass does not change . The center of mass is single point at which the entire mass of a body is considered to be concentrated. The ferris wheel's center mass is its center. This point acts a balance point for the wheel so, the potential energy remains the same at all points on the Ferris wheel. The potential energy is calculated by PE=mgh or mgd
I am pretty sure that this right, but if you could please verify, that would be wonderful! Danke!
Nessa
1. 👍
2. 👎
3. 👁
1. Yes it is right. Potential energy has very little to do with hiow ferris wheels work. It is mainly a case of electrical energy makng the motor do work overcoming bearing friction. Kinetic energy is not a factor either, except when it is starting up.
1. 👍
2. 👎
## Similar Questions
1. ### Math
A family pass to the amusement park costs \$54 Using the Distributive Property,write an expression that can be used to fine the cost in dollars of 8 family
2. ### Algebra
Neil takes his family to an amusement park for 5/8 of the cost since they visit in the winter instead of the summer. What is 5/8 written as a decimal?
3. ### physics
In thrill machine rides at amusement parks ,there can be an acceleration of 3g or more .But without head rests ,acceleration like this would not be safe.think why not?
4. ### Physics - Mirrors & Lenses
When standing 1.25 m in front of an amusement park mirror, you notice that your image is three times taller. What is the radius of curvature of the mirror?
1. ### Physics
A person standing 2.0m in front of an amusement park mirror notice that his image is 3 times taller and erect what is the radius of curvature of the mirror
2. ### physics
In thrill machine rides at amusement parks there can be an acceleration of 3g or more.But without head rests acceleration like this would not be safe. think why not?
3. ### Math
A new theme park will have five roller coasters, six water rides and eight suspension rides. How many different combinations of rides could you try at this park.
4. ### math
The admission fee at an amusement park is \$1.50 for children and \$4 for adults. On a certain day, 292 people entered the park, and the admission fees collected totaled 838.00 dollars. How many children and how many adults were
1. ### physics
The velocity as a function of time for a car on an amusement park ride is given as v = At2 + Bt with constants A = 2.9m/s3 and B = 1.3m/s2. If the car starts at the origin, what is its position at t = 4.2s?
2. ### ELA
A Screamingly Good Science Lesson Elizabeth Kibler 1Amusement park rides give us thrills, exhilaration, and delight. If you pay attention, these rides can give you something else—a science lesson. Roller coasters are amazing
3. ### high school algrebra 1
A youth group is planning a trip to a local amusement park. They are taking a van which holds 10 people. It will cost \$25 for parking and tickets to enter the park are \$18 per person. create an equation for this situation
4. ### social studies
1) Which of these are best categorized as public goods and services? a. grocery store and hospital b. playground and neighborhood park c. amusement park and skating rink d. pharmacy and doctors office I don't really get this one | 880 | 3,681 | {"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.28125 | 3 | CC-MAIN-2021-39 | latest | en | 0.947124 |
https://www.jiskha.com/display.cgi?id=1345161970 | 1,503,449,817,000,000,000 | text/html | crawl-data/CC-MAIN-2017-34/segments/1502886116921.70/warc/CC-MAIN-20170823000718-20170823020718-00240.warc.gz | 905,051,522 | 4,019 | # Physics - Electromagnetism
posted by .
An inductor in the form of a solenoid contains 440 turns and is 15.8 cm in length. A uniform rate of decrease of current through the inductor of 0.421 A/s induces an emf of 175 µV. What is the radius of the solenoid?
• Physics - Electromagnetism -
Look up the formula for the inductance L of a solenoid. It is something like
L = mu* N^2 *A/l
W here l is the length and N is the number of turns. A is the cross sectional area. Mu is the permeability of free space
Use the induced emf for known current change rate to get the inductance.
V = L * dI/dT
Then use the solenoid formula to get the area A, which is pi*R^:2
## Similar Questions
1. ### Physics repost
Suppose you wish to make a solenoid whose self-inductance is 1.2 mH. The inductor is to have a cross-sectional area of 1.2 10-3 m2 and a length of 0.048 m. How many turns of wire are needed?
2. ### physics induced voltage
A 500 turn solenoid with a length of 20 cm and a radius of 1.5 cm carries a current of 2.0 A. A second coil of four turns is wrapped tightly about this solenoid so that it can be considered to have the same radius as the solenoid. …
3. ### physics induced voltage
A 500 turn solenoid with a length of 20 cm and a radius of 1.5 cm carries a current of 2.0 A. A second coil of four turns is wrapped tightly about this solenoid so that it can be considered to have the same radius as the solenoid. …
4. ### tough physics question
A 500 turn solenoid with a length of 20 cm and a radius of 1.5 cm carries a current of 2.0 A. A second coil of four turns is wrapped tightly about this solenoid so that it can be considered to have the same radius as the solenoid. …
5. ### Physics
An inductor is in the built in the shape of a solenoid of radius 0.20 cm, length 4.0 cm, with 1000 turns. This inductor is connected to a generator supplying an rms voltage of 1.2×〖10〗^(-4) V AC at an angular frequency …
6. ### Physics
The current in a 5.00mH inductor drops from 2.50A to zero in 5.ooms. What is the average emf induced in he inductor?
7. ### Physics
Suppose you wish to make a solenoid whose self-inductance is 1.8 mH. The inductor is to have a cross-sectional area of 1.60 10-3 m2 and a length of 0.049 m. How many turns of wire are needed?
8. ### Physics
A circuit is composed of a capacitor C=2 μF, two resistors both with resistance R=11 Ohm, an inductor L=4.00e-2 H, a switch S, and a battery V=5 V. The internal resistance of the battery can be ignored . Reminder: The "L=x.xxenn …
9. ### Physics
A circuit is composed of a capacitor C= 3 micro F, two resistors both with resistance 69 Ohm, an inductor 6.00e-2 H, a switch , and a battery 25 V. The internal resistance of the battery can be ignored . Reminder: The " L=x.xxenn H" …
10. ### Physics
A circuit is composed of a capacitor C=3 μF, two resistors both with resistance R=69 Ohm, an inductor L=6.00e-2 H, a switch S, and a battery V=25 V. The internal resistance of the battery can be ignored . Reminder: The "L=x.xxenn …
More Similar Questions | 891 | 3,042 | {"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-2017-34 | latest | en | 0.911581 |
https://ask.sagemath.org/question/62174/integers-or-integers/ | 1,725,941,341,000,000,000 | text/html | crawl-data/CC-MAIN-2024-38/segments/1725700651196.36/warc/CC-MAIN-20240910025651-20240910055651-00638.warc.gz | 94,079,345 | 21,623 | # Integers, or "Integers"?
My understanding is that the solve_diophantine() function is supposed to return only positive integers. However, the following code:
a,b,c = 2,3,5
x, k = var('x,k')
solve_diophantine(a*x^2 + b*x + c - k^2 == 0, (x,k))
returns (partial list):
[(-1/16*sqrt(2)*((470832*sqrt(2) + 665857)^t*(13*sqrt(2) + 20) + (-470832*sqrt(2) + 665857)^t*(13*sqrt(2) - 20)) - 3/4, 1/8*(470832*sqrt(2) + 665857)^t*(13*sqrt(2) + 20) - 1/8*(-470832*sqrt(2) + 665857)^t*(13*sqrt(2) - 20)), ...
(1/16*sqrt(2)*((470832*sqrt(2) + 665857)^t*(19*sqrt(2) + 28) + (-470832*sqrt(2) + 665857)^t*(19*sqrt(2) - 28)) - 3/4, -1/8*(470832*sqrt(2) + 665857)^t*(19*sqrt(2) + 28) + 1/8*(-470832*sqrt(2) + 665857)^t*(19*sqrt(2) - 28))]
And another 14 entries. All of the entries have the same $665857 \pm 470832 \sqrt 2$ as factors. Now, it turns out that $\sqrt 2 \approx \frac{665857}{470832}$ , out to 12 significant digits, a pretty impressive convergent, but... what is it doing in this output?
For reference, there are integer solutions at $(x,k) = (4,7); (19,28)$, and possibly (probably?) others. If I replace the equation with ax^2 + bx + c - 49 == 0, I get 4 as output.
Is there something I've failed to coerce, or something I need to import, or is this just something weird that Sage is doing?
(EDIT: Note that the pair $(19,28)$ appears in that last entry as a factor of $28 +19 \sqrt 2$. But none of the other solutions appear, just... other random covergents of $\sqrt 2$. Nor is $(470832, 665857)$ a solution.
edit retag close merge delete
Sort by ยป oldest newest most voted
Well...
a,b,c = 2,3,5
x, k = var('x,k')
eq=a*x^2 + b*x + c - k^2==0
Sol=solve_diophantine(eq, (x, k))
We obtain a list of 16 solutions of similar form, the first one meaning :
$$x=-\frac{1}{16} \, \sqrt{2} {\left({\left(470832 \, \sqrt{2} + 665857\right)}^{t} {\left(3841 \, \sqrt{2} + 5432\right)} + {\left(-470832 \, \sqrt{2} + 665857\right)}^{t} {\left(3841 \, \sqrt{2} - 5432\right)}\right)} - \frac{3}{4}$$
$$k=\frac{1}{8} \, {\left(470832 \, \sqrt{2} + 665857\right)}^{t} {\left(3841 \, \sqrt{2} + 5432\right)} - \frac{1}{8} \, {\left(-470832 \, \sqrt{2} + 665857\right)}^{t} {\left(3841 \, \sqrt{2} - 5432\right)}$$
These solutions depend of a parameter $t$, a nonnegative integer. It turns out that, notwithstanding the presence of $\sqrt{2}$ , these expressions are integers. We can numerically check this for a not unreasonable range of $t$ :
sage: %time all([all(flatten([[u.subs(t==w).expand().is_integer() for u in v] for v in Sol])) for w in range(100)])
CPU times: user 6.16 s, sys: 80.2 ms, total: 6.24 s
Wall time: 6.24 s
True
Similarny, we can numerically check that these quantities are indeed solutions of eq on a not unreasonable range of $t$ :
sage: %time all([all([bool(eq.subs([x==u[0].subs(t==v), k==u[1].subs(t==v)]).expand()) for u in Sol]) for v in range(100)])
CPU times: user 9.01 s, sys: 88 ms, total: 9.1 s
Wall time: 9.1 s
True
A simple form of the explanation can be found somewhere in a Mathematica tutorial. A better-known analogy is the *casus irreducibilis" of the cubic, where a (demonstrably) real root can be expressed only as the sum of non-real complexes.
A better explanation, by someone who, contrary to me, knows what he's talking about when talking about Diophantine equations, would be extremely welcome...
EDIT :
To be rewritten...
(End of EDIT)
One can note that Sympi's diophantine and Mathematica's Reduce give similar forms to their solutions, but Mathematica gives only 8 solutions, with different (and numerically simpler) constants, possibly by finding equalities among them and simplifying more efficiently.
Notwithstanding, HTH,
more
That's quite interesting; when I run your code with is_integer(), I get False, except for t = 0. Though in addition, the subs(t=w) also threw an exception; I don't know if removing it somehow caused the state to flip from True to False.
( 2022-04-28 00:52:53 +0200 )edit
(If I copy the mathematical expression into the code, and use expand() on the expression, I do get integers.) Edit: Well, I get some integers' some of the lines return half-integers. No clue what's going on <shruggie>
( 2022-04-28 01:09:43 +0200 )edit
Further things I've noticed: (1) all the half-integers I was getting were from missing a negative sign, but also all of those produce negative integer solutions; (2) When $t=0$, all of these boil down to $x = \frac{1}{16} \sqrt 2 \cdot (a \sqrt 2 + b + a \sqrt 2 -b) - \frac34, k = \frac18 (a \sqrt 2 +b - a \sqrt 2 +b)$... in both cases all the $\sqrt 2$ instances cancel out, to $x = \frac14 (a-3), k = \frac14 b$.
( 2022-04-28 02:17:30 +0200 )edit
What version of Sage are you running ? On which platform ? I run 9.6.rc1 in Debian testing.
Can you give us at least one value of $t$ for which you obtain at least a non-integer coefficient or a non-solution (i. e.bool(eq.subs(...) is False) ?
( 2022-04-28 09:01:48 +0200 )edit
To make things more clear, let us look mathematically at the given diophantine equation. It is: $$2x^2+3x+5=k^2\ .$$ This is not exactly a Pell equation, but we may try to work on it. I am multiplying it by eight, then build squares. We get $$16x^2+24x+40=8k^2\ ,$$ and this is the Pell-like equation: $$(4x+3)^2-8k^2=-31\ .$$ It may be that the computer uses instead (see later comments) $$(4k)^2-2(4x+3)^2=62\ .$$ If we ask sage, which asks sympy, for the solutions for a related new equation...
sage: solve_diophantine(X^2 - 8*Y^2 == -31)
[(-2*sqrt(2)*(2*sqrt(2) + 3)^t + 2*sqrt(2)*(-2*sqrt(2) + 3)^t - 1/2*(2*sqrt(2) + 3)^t - 1/2*(-2*sqrt(2) + 3)^t,
-1/8*sqrt(2)*(2*sqrt(2) + 3)^t + 1/8*sqrt(2)*(-2*sqrt(2) + 3)^t - (2*sqrt(2) + 3)^t - (-2*sqrt(2) + 3)^t),
(2*sqrt(2)*(2*sqrt(2) + 3)^t - 2*sqrt(2)*(-2*sqrt(2) + 3)^t - 1/2*(2*sqrt(2) + 3)^t - 1/2*(-2*sqrt(2) + 3)^t,
-1/8*sqrt(2)*(2*sqrt(2) + 3)^t + 1/8*sqrt(2)*(-2*sqrt(2) + 3)^t + (2*sqrt(2) + 3)^t + (-2*sqrt(2) + 3)^t),
(2*sqrt(2)*(2*sqrt(2) + 3)^t - 2*sqrt(2)*(-2*sqrt(2) + 3)^t + 1/2*(2*sqrt(2) + 3)^t + 1/2*(-2*sqrt(2) + 3)^t,
1/8*sqrt(2)*(2*sqrt(2) + 3)^t - 1/8*sqrt(2)*(-2*sqrt(2) + 3)^t + (2*sqrt(2) + 3)^t + (-2*sqrt(2) + 3)^t),
(-2*sqrt(2)*(2*sqrt(2) + 3)^t + 2*sqrt(2)*(-2*sqrt(2) + 3)^t + 1/2*(2*sqrt(2) + 3)^t + 1/2*(-2*sqrt(2) + 3)^t,
1/8*sqrt(2)*(2*sqrt(2) + 3)^t - 1/8*sqrt(2)*(-2*sqrt(2) + 3)^t - (2*sqrt(2) + 3)^t - (-2*sqrt(2) + 3)^t)]
Too many cases, so that for illustration i will use the simpler (not directly related) equation:
var('y,k');
sols = solve_diophantine(y^2 - 2*k^2 == -1, (x, k))
and we get a shorter list. Let us understand this result first.
sage: sols
[(-1/4*sqrt(2)*((2*sqrt(2) + 3)^t*(sqrt(2) + 2) + (-2*sqrt(2) + 3)^t*(sqrt(2) - 2)),
1/4*(2*sqrt(2) + 3)^t*(sqrt(2) + 2) - 1/4*(-2*sqrt(2) + 3)^t*(sqrt(2) - 2)),
(1/4*sqrt(2)*((2*sqrt(2) + 3)^t*(sqrt(2) + 2) + (-2*sqrt(2) + 3)^t*(sqrt(2) - 2)),
-1/4*(2*sqrt(2) + 3)^t*(sqrt(2) + 2) + 1/4*(-2*sqrt(2) + 3)^t*(sqrt(2) - 2))]
Also, let us take a look at the true Pell equation:
sage: var('y,k');
....: sols = solve_diophantine(y^2 - 2*k^2 == 1, (y, k))
(y, k)
sage: sols
[(-1/4*sqrt(2)*(sqrt(2)*(2*sqrt(2) + 3)^t + sqrt(2)*(-2*sqrt(2) + 3)^t),
-1/4*sqrt(2)*(2*sqrt(2) + 3)^t + 1/4*sqrt(2)*(-2*sqrt(2) + 3)^t),
(1/4*sqrt(2)*(sqrt(2)*(2*sqrt(2) + 3)^t + sqrt(2)*(-2*sqrt(2) + 3)^t),
1/4*sqrt(2)*(2*sqrt(2) + 3)^t - 1/4*sqrt(2)*(-2*sqrt(2) + 3)^t)]
It is better to see the two equations above related to the number field $\Bbb Q(a)$, $a:=\sqrt 2$. There, we are searching for elements of norm $-1$, respectively (true Pell) $+1$ where the norm of $\xi:=y\pm k a=y\pm a\sqrt 2$ is $$N(\xi)= N(y\pm ka)=(y+ ka)(y-ka)=y^2-k^2a^2=y^2-2k^2\ .$$ The norm is multiplicative. So if we get one special solution $\xi_0$ for $N(\xi)=-1$ and the general solution $\eta_t$ for $N(\eta)=1$, then the general solution of $N(\xi)=-1$ is of the shape $\xi_0\cdot \eta_t$, parametrized by $t$.
To understand further what happens, note that the number field $K:=\Bbb Q(a)=\Bbb Q(\sqrt 2)$ has a subring of "integers", these are those numbers in $\Bbb Q(a)$ with monic annihilating polynomial in $\Bbb Z[X]$, and it turns out, it is $$R=\mathcal O_K=\Bbb Z[a]\ ,$$ the set of all $x+ay$ with $x,y\in\Bbb Z$. In this ring we can speak of units. These are elements invertible inside this ring. A structural theorem in number theory describes the units of a number field. In our case...
sage: K.<a> = QuadraticField(2)
sage: K.unit_group()
Unit group with structure C2 x Z of Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
sage: K.unit_group().gens()
(u0, u1)
sage: for gen in K.unit_group().gens():
....: print(f'generator {K(gen)}')
....:
generator -1
generator a + 1
sage:
The generator $-1$ has norm $N(-1)=(-1)\cdot(-1)=1$.
The generator $1+a$ has norm $N(1+a)=(1+a)\cdot(1-a)=1-a^2=1-2=-1$.
Each unit in $R$ is thus of the shape $\pm(1+a)^s$ for some integer parameter $s$. To get those elements with norm $-1$, we need an odd $s$. (For the elements of norm $+1$ an even $s$.) So the human(ly written) solution of $N(\eta)=-1$ is something like: $$\pm (1+a)^{2t+1} =\pm (1+a)\cdot (1+a)^{2t} =\pm (1+a)\cdot(3+2a)^t\ .$$ As a human, i would always stop here and no longer bother - what are the integral coefficients of this solution, when written w.r.t. the basis $1,a$. But sympy wants to do this for the operator. So instead of delivering $\eta =\pm(1+a)\cdot(3+2a)^t$ as an answer, telling us to extract the components, we get a list. One entry for the $+1$ in $\pm$, one entry for the $-1$ in $\pm$. Then for $\eta=x+ay=(1+a)\cdot(3+2a)^t$ the computer does something humanly horrible, it isolates $x$ as \begin{aligned} x &= \frac 12(\eta+\bar\eta) \\ &= \frac 12((x+ay)+\overline{x+ay}) \\ &= \frac 12((1+a)\cdot(3+2a)^t+\overline{(1+a)\cdot(3+2a)^t}) \\ &= \frac 12((1+a)\cdot(3+2a)^t+(1-a)\cdot(3-2a)^t) \ . \end{aligned} And for $y$ we have a similar expression.
This explains the awful way of writing the solution - as obtained from sympy.
We can ask for the first few values in the solution:
K.<a> = QuadraticField(2)
var('X,Y')
for sol in solve_diophantine(X^2 - 2*Y^2 == -1, (X, Y)):
for t0 in [-5..5]:
X0, Y0 = K(sol[0].subs(t = t0)), K(sol[1].subs(t = t0))
eta = X0 + a*Y0
print(f'Solution X + Ya = {eta}')
I insisted to move the solution in the field $K=\Bbb Q(a)=\Bbb Q(\sqrt 2)$. Results:
Solution X + Ya = 985*a - 1393
Solution X + Ya = 169*a - 239
Solution X + Ya = 29*a - 41
Solution X + Ya = 5*a - 7
Solution X + Ya = a - 1
Solution X + Ya = a + 1
Solution X + Ya = 5*a + 7
Solution X + Ya = 29*a + 41
Solution X + Ya = 169*a + 239
Solution X + Ya = 985*a + 1393
Solution X + Ya = 5741*a + 8119
Solution X + Ya = -985*a + 1393
Solution X + Ya = -169*a + 239
Solution X + Ya = -29*a + 41
Solution X + Ya = -5*a + 7
Solution X + Ya = -a + 1
Solution X + Ya = -a - 1
Solution X + Ya = -5*a - 7
Solution X + Ya = -29*a - 41
Solution X + Ya = -169*a - 239
Solution X + Ya = -985*a - 1393
Solution X + Ya = -5741*a - 8119
Now by chance, every time the first component $X$ is odd.
We go back to the equation $$X^2 -2Y^2 = -31\ .$$ We need a special element having norm $-31$ in $K=\Bbb Q(a)=\Bbb Q(\sqrt 2)$. Here is it: $$\eta=(1+4a)\ ,\ N(\eta)=(1+4a)(1-4a)=1-4^2a^2=1-16\cdot 2=1-32=-31\ .$$ So a general solution $(X,Y)$ of $X^2 -2Y^2=31$ or rather $\eta=X+aY$ of $N(\eta)=-31$ is of the shape $\pm(1+a)^{2t}\cdot (1+4a)$. (Then we know how to isolate components, thus making things less operable.)
But now, to be able to get from $X$ to $x$, and from $Y$ to $k$ via $X=4x+3$ and $Y=2k$ some congruences modulo $4$ and $2$ have to be satisfied. This is the reason of further splitting the story into cases. The sage call delivers finally $16$ cases (for a related Pell-like equation).
This was the human approach for the given Pell-like-reshapeable equation. Well, it may happen that sympy does not recognize the minimal factor used above to reshape the equation. It uses some other stuff. We can even guess what it does, e.g. by computing some norms for elements in the output:
sage: K(13*sqrt(2) + 20).norm()
62
sage: K(19*sqrt(2) + 28).norm()
62
sage: K(470832*sqrt(2) + 665857).norm()
1
sage: K(470832*sqrt(2) + 665857).factor()
470832*a + 665857
sage: (1+a)^16
470832*a + 665857
So for humanly not profitable reasons, sympy writes the given equation in the form $N(\eta)=62$, and solves it like $\eta=\pm \eta_0\cdot (1+a)^{16t}$. Then isolates the components to make the result less understandable. But why $16t$? Well, we had some similar effect in the human solution. We had to insure that $X$ is of the shape $2x+3$. For obvious reasons, this was the case in the special case, but having and implementing a general algorithm...
Then the code had to exhibit all elements of norm $62$, that are not differing by a power of $(1+a)^{16}$.
Finally, here is the way to see numbers (first few solutions) from the given code:
var('x,k');
for xsol, ksol in solve_diophantine(2*x^2 + 3*x + 5 == k^2, (x, k)):
for t0 in [-3..3]:
x0, k0 = K(xsol.subs(t = t0)), K(ksol.subs(t = t0))
print(f'Solution: t0 = {t0} and (x0, k0) = {(x0, k0)}')
We get:
Solution: t0 = -3 and (x0, k0) = (-235876233405138476, -333579368323028527)
Solution: t0 = -2 and (x0, k0) = (-177122290076, -250488744823)
Solution: t0 = -1 and (x0, k0) = (-133004, -188095)
Solution: t0 = 0 and (x0, k0) = (4, -7)
Solution: t0 = 1 and (x0, k0) = (6458644, -9133903)
Solution: t0 = 2 and (x0, k0) = (8601067634596, -12163746499735)
Solution: t0 = 3 and (x0, k0) = (11454162183932917684, -16198631506138961887)
Solution: t0 = -3 and (x0, k0) = (9925624597054204, 14036952920178043)
Solution: t0 = -2 and (x0, k0) = (7453270444, 10540516147)
Solution: t0 = -1 and (x0, k0) = (5596, 7915)
Solution: t0 = 0 and (x0, k0) = (-116, 163)
Solution: t0 = 1 and (x0, k0) = (-153485636, 217061467)
Solution: t0 = 2 and (x0, k0) = (-204398969261204, 289063794464275)
Solution: t0 = 3 and (x0, k0) = (-272200968950560539236, 384950301980980455883)
Solution: t0 = -3 and (x0, k0) = (1374787436861472479, 1944243038589639482)
Solution: t0 = -2 and (x0, k0) = (1032344359871, 1459955394770)
Solution: t0 = -1 and (x0, k0) = (775199, 1096298)
Solution: t0 = 0 and (x0, k0) = (-1, 2)
Solution: t0 = 1 and (x0, k0) = (-1108129, 1567130)
Solution: t0 = 2 and (x0, k0) = (-1475709904321, 2086968960818)
Solution: t0 = 3 and (x0, k0) = (-1965223539520829281, 2779245782685214922)
Solution: t0 = -3 and (x0, k0) = (-1965223539520829281, -2779245782685214922)
Solution: t0 = -2 and (x0, k0) = (-1475709904321, -2086968960818)
Solution: t0 = -1 and (x0, k0) = (-1108129, -1567130)
Solution: t0 = 0 and (x0, k0) = (-1, -2)
Solution: t0 = 1 and (x0, k0) = (775199, -1096298)
Solution: t0 = 2 and (x0, k0) = (1032344359871, -1459955394770)
Solution: t0 = 3 and (x0, k0) = (1374787436861472479, -1944243038589639482)
Solution: t0 = -3 and (x0, k0) = (-6016943869156, -8509243623797)
Solution: t0 = -2 and (x0, k0) = (-4518196, -6389693)
Solution: t0 = -1 and (x0, k0) = (-4, -5)
Solution: t0 = 0 and (x0, k0) = (190124, -268877)
Solution: t0 = 1 and (x0, k0) = (253191791324, -358067265173)
Solution: t0 = 2 and (x0, k0) = (337179053192057996, -476843189972327645)
Solution: t0 = 3 and (x0, k0) = (449026065642355131292604, -635018751890450270168357)
Solution: t0 = -3 and (x0, k0) = (1191324496712159, 1684787260437638)
Solution: t0 = -2 and (x0, k0) = (894579839, 1265126942)
Solution: t0 = -1 and (x0, k0) = (671, 950)
Solution: t0 = 0 and (x0, k0) = (-961, 1358)
Solution: t0 = 1 and (x0, k0) = (-1278779041, 1808466662)
Solution: t0 = 2 and (x0, k0) = (-1702967950806529, 2408360372317310)
Solution: t0 = 3 and (x0, k0) = (-2267866261639086182881, 3207247224858365702678)
Solution: t0 = -3 and (x0, k0) = (-6943548011011756, -9819659768161553)
Solution: t0 = -2 and (x0, k0) = (-5213993404, -7373700185)
Solution: t0 = -1 and (x0, k0) = (-3916, -5537)
Solution: t0 = 0 and (x0, k0) = (164, -233)
Solution: t0 = 1 and (x0, k0) = (219403796, -310283825)
Solution: t0 = 2 and (x0, k0) = (292183107784964, -413209313725817)
Solution: t0 = 3 and (x0, k0) = (389104335200527143284, -550276628018752376513)
Solution: t0 = -3 and (x0, k0) = (35069318855059, 49595506348012)
Solution: t0 = -2 and (x0, k0) = (26333971, 37241860)
Solution: t0 = -1 and (x0, k0) = (19, 28)
Solution: t0 = 0 and (x0, k0) = (-32621, 46132)
Solution: t0 = 1 and (x0, k0) = (-43440843629, 61434630220)
Solution: t0 = 2 and (x0, k0) = (-57850779631518701, 81813357148750948)
Solution: t0 = 3 and (x0, k0) = (-77040693146164853541101, 108951993101930285334652)
Solution: t0 = -3 and (x0, k0) = (-204398969261204, -289063794464275)
Solution: t0 = -2 and (x0, k0) = (-153485636, -217061467)
Solution: t0 = -1 and (x0, k0) = (-116, -163)
Solution: t0 = 0 and (x0, k0) = (5596, -7915)
Solution: t0 = 1 and (x0, k0) = (7453270444, -10540516147)
Solution: t0 = 2 and (x0, k0) = (9925624597054204, -14036952920178043)
Solution: t0 = 3 and (x0, k0) = (13218093234633989953996, -18693206721131441839555)
Solution: t0 = -3 and (x0, k0) = (292183107784964, 413209313725817)
Solution: t0 = -2 and (x0, k0) = (219403796, 310283825)
Solution: t0 = -1 and (x0, k0) = (164, 233)
Solution: t0 = 0 and (x0, k0) = (-3916, 5537)
Solution: t0 = 1 and (x0, k0) = (-5213993404, 7373700185)
Solution: t0 = 2 and (x0, k0) = (-6943548011011756, 9819659768161553)
Solution: t0 = 3 and (x0, k0) = (-9246820095931294637596, 13076978388490120691657)
Solution: t0 = -3 and (x0, k0) = (40469963569358371, 57233171348531680)
Solution: t0 = -2 and (x0, k0) = (30389380579, 42977074168)
Solution: t0 = -1 and (x0, k0) = (22819, 32272)
Solution: t0 = 0 and (x0, k0) = (-29, 40)
Solution: t0 = 1 and (x0, k0) = (-37643741, 53236288)
Solution: t0 = 2 and (x0, k0) = (-50130695903261, 70895510037592)
Solution: t0 = 3 and (x0, k0) = (-66759749564076676829, 94412543254148556400)
Solution: t0 = -3 and (x0, k0) = (-50130695903261, -70895510037592)
Solution: t0 = -2 and (x0, k0) = (-37643741, -53236288)
Solution: t0 = -1 and (x0, k0) = (-29, -40)
Solution: t0 = 0 and (x0, k0) = (22819, -32272)
Solution: t0 = 1 and (x0, k0) = (30389380579, -42977074168)
Solution: t0 = 2 and (x0, k0) = (40469963569358371, -57233171348531680)
Solution: t0 = 3 and (x0, k0) = (53894417064774125296099, -76218215549195540625352)
Solution: t0 = -3 and (x0, k0) = (-57850779631518701, -81813357148750948)
Solution: t0 = -2 and (x0, k0) = (-43440843629, -61434630220)
Solution: t0 = -1 and (x0, k0) = (-32621, -46132)
Solution: t0 = 0 and (x0, k0) = (19, -28)
Solution: t0 = 1 and (x0, k0) = (26333971, -37241860)
Solution: t0 = 2 and (x0, k0) = (35069318855059, -49595506348012)
Solution: t0 = 3 and (x0, k0) = (46702302889720705939, -66047030140699210708)
Solution: t0 = -3 and (x0, k0) = (337179053192057996, 476843189972327645)
Solution: t0 = -2 and (x0, k0) = (253191791324, 358067265173)
Solution: t0 = -1 and (x0, k0) = (190124, 268877)
Solution: t0 = 0 and (x0, k0) = (-4, 5)
Solution: t0 = 1 and (x0, k0) = (-4518196, 6389693)
Solution: t0 = 2 and (x0, k0) = (-6016943869156, 8509243623797)
Solution: t0 = 3 and (x0, k0) = (-8012848387763696404, 11331878863214808365)
Solution: t0 = -3 and (x0, k0) = (-1702967950806529, -2408360372317310)
Solution: t0 = -2 and (x0, k0) = (-1278779041, -1808466662)
Solution: t0 = -1 and (x0, k0) = (-961, -1358)
Solution: t0 = 0 and (x0, k0) = (671, -950)
Solution: t0 = 1 and (x0, k0) = (894579839, -1265126942)
Solution: t0 = 2 and (x0, k0) = (1191324496712159, -1684787260437638)
Solution: t0 = 3 and (x0, k0) = (1586503510813642529471, -2243654781745183524590)
Solution: t0 = -3 and (x0, k0) = (8601067634596, 12163746499735)
Solution: t0 = -2 and (x0, k0) = (6458644, 9133903)
Solution: t0 = -1 and (x0, k0) = (4, 7)
Solution: t0 = 0 and (x0, k0) = (-133004, 188095)
Solution: t0 = 1 and (x0, k0) = (-177122290076, 250488744823)
Solution: t0 = 2 and (x0, k0) = (-235876233405138476, 333579368323028527)
Solution: t0 = 3 and (x0, k0) = (-314119682292713457139004, 444232314906683123060455)
As said before, this way to see (and split) the solutions is not helpful without number theoretic aid. It is always a good idea to search for the (humanly) better solution. For instance, the last entry above is better seen as follows...
K.<a> = QuadraticField(2)
x0, k0 = -314119682292713457139004, 444232314906683123060455
X0, Y0 = 4*x0 + 3, 2*k0
print(f'x0 = {x0}')
print(f'k0 = {k0}\n')
print(f'X0 = 4 x0 + 3 is {X0}')
print(f'Y0 = 2 k0 is {Y0}\n')
print(f'The norm of X0 + Y0 a is {(X0 + Y0*a).norm()}')
And we get:
x0 = -314119682292713457139004
k0 = 444232314906683123060455
X0 = 4 x0 + 3 is -1256478729170853828556013
Y0 = 2 k0 is 888464629813366246120910
The norm of X0 + Y0 a is -31
In fact:
sage: X0 + a*Y0 == (1+4*a)*(1-a)^62
True
Both values are:
sage: X0 + a*Y0
888464629813366246120910*a - 1256478729170853828556013
sage: (1+4*a)*(1-a)^62
888464629813366246120910*a - 1256478729170853828556013
more | 8,479 | 20,899 | {"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": 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.515625 | 4 | CC-MAIN-2024-38 | latest | en | 0.667665 |
https://www.coursehero.com/file/184840/120-ch-96-notes/ | 1,519,361,724,000,000,000 | text/html | crawl-data/CC-MAIN-2018-09/segments/1518891814393.4/warc/CC-MAIN-20180223035527-20180223055527-00425.warc.gz | 817,005,535 | 26,868 | {[ promptMessage ]}
Bookmark it
{[ promptMessage ]}
120_ch_9.6_notes
# 120_ch_9.6_notes - Mat120 Chapter 9 Section 6 Page 13...
This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up to access the rest of the document.
Unformatted text preview: Mat120 Chapter 9 - Section 6 Page 13 Solving Linear Equations and inequalities mm —- Where the graph crosses the x-axis — this means 3! = 0 In Exercises 1—4, we the graph to idemm' the u. x-mtemrpr. 0: star that there is no .t-imercept: Ir. y-imercepr. or state that were is no y- intercept. Ii. 1.: + y=4 hfi—Ih+.¢r¢p+ xe— 0 0“) Mat120 Chapter 9 - Section 6 Page 14 Graphing Linear Equations, Linear Functions, and Absolute Value Functions Formulas: Slope ofthe Line: m = y2 ~y1 1‘ 9;.” X2 ‘xl Rm) Equations of the Line: m=slope of the line, (x,y) any general point on the line, (xvyl) is any given point on the line a. b. Slope Intercept Form: y=mx+b General Form: Ax+By=C In Exercises 27 -38, graph each equation using the slope and y-intercept. In Exercises 30—46. 9. Put the equation in slope-interceptform by solving for}: b. [den tifv the slope and the y-t‘ntercepr. c. Use the slope and y—imercept to graph the equation. MLSx+3y=lS 33: #5’4/4-5 7 5 3 ...
View Full Document
{[ snackBarMessage ]}
### Page1 / 2
120_ch_9.6_notes - Mat120 Chapter 9 Section 6 Page 13...
This preview shows document pages 1 - 2. Sign up to view the full document.
View Full Document
Ask a homework question - tutors are online | 505 | 1,621 | {"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-2018-09 | latest | en | 0.739918 |
https://aplusphysics.com/community/index.php?/topic/3148-please-help-me-rotational-friction-angular-torque-of-a-basket-ball-spin/#comment-4105 | 1,638,514,880,000,000,000 | text/html | crawl-data/CC-MAIN-2021-49/segments/1637964362605.52/warc/CC-MAIN-20211203060849-20211203090849-00077.warc.gz | 170,325,430 | 26,435 | • 0
## Question
hello! I am a high school student (grade 12) and i study physics but i could not solve one of the questions... i searched up on internet but could not find it.. the question is this, "a Basketball with diameter of 24.2 cm is dropped from 76cm from the ground with spin at 5 revolution/sec, the coefficient of friction is 0.5 and the time of the ball in contact wit the ground is 0.1 second. Calculate the angle and velocity it bounced off at and hence find the maximum height and the distance it traveled from the first bounce to second bounce." my teacher said its got to do with impulse, friction, torque,and angular moment... i kind of get the concept of it but i dont really know how to do the calculations... Please help me with this asap...also ive attached some information about this topic that i found on the net... i dont know if these documents would help..
I really need help with this... thank you.
72e7e51dfb04563c281.pdf
72e7e51dfb04563c281.pdf
72e7e51dfb04563c281.pdf
72e7e51dfb04563c281.pdf
72e7e51dfb04563c281.pdf
72e7e51dfb04563c281.pdf
## Recommended Posts
• 0
##### Share on other sites
• 0
Thanks for the videos it was a great help but i still dont know where begin my calculation... Im very stuck... can u please show me how to solve this problem...coz its very difficult for me to put all these concepts together... thank you
• 0
##### Share on other sites
• 0
i have, but teacher just told me to research those topics and link it together... so i kinda made a way to get my model (angle and velocity it bounce off at), but i dont know if this is the right way... could u please check?
• 0
## Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
× Pasted as rich text. Paste as plain text instead
Only 75 emoji are allowed.
× Your previous content has been restored. Clear editor
× You cannot paste images directly. Upload or insert images from URL.
×
×
×
• Create New... | 522 | 2,017 | {"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-2021-49 | latest | en | 0.910803 |
https://clevefurnbank.org/dad-s-worksheet-multiplication/ | 1,566,106,095,000,000,000 | text/html | crawl-data/CC-MAIN-2019-35/segments/1566027313617.6/warc/CC-MAIN-20190818042813-20190818064813-00291.warc.gz | 413,992,827 | 29,884 | In Free Printable Worksheets189 views
4.16 / 5 ( 159votes )
Top Suggestions Dad S Worksheet Multiplication :
Dad S Worksheet Multiplication Dadsworksheets is an online resource started by a dad with an aim to make it easier for kids to become experts at math facts multiplication long division word problems fractions and other Times tables are so pass 233 that they ve even acquired a new name they re now called multiplication facts and as proficiency increases mums and dads have noticed their kids developing a more Another fun time i was in aftercare when i was doing my multiplication for homework was when i had to trace my family s feet first my dad said trace my dog s paw and that was funny i know how.
Dad S Worksheet Multiplication Jackie has been learning math from his dad jung chao kuang he spoke through a cantonese interpreter yeah this is jackie s double digit multiplication you ll ever be handed a worksheet and say Students can create the multiplication and dads often re create our own childhoods when it comes to the way we raise our children it s ok if you weren t good at math when you were in school it s Are you worried that your third grader hasn t learned simple multiplication yet have you been befuddled and then you quot everyday math quot and discover that countless moms and dads just like you.
Dad S Worksheet Multiplication Her dad from omaha would visit her sometimes but it is also where she discovered an aptitude for math that she enjoyed tackling the worksheets the addition and subtraction and multiplication There were multiplication tables to memorize but i didn t say anything because i knew i would be teased by everyone else the day came my dad borrowed one of the farm trucks and we drove to the I dread their math homework more than just about anything and on days when they have to do math i try and do everything in my power to make sure that their dad is the one who model when anything.
Are you worried that your third grader hasn t learned simple multiplication yet have you been befuddled then you everyday math and discover that countless moms and dads just like you For example he said there are at least 12 distinct interpretations of multiplication offered between grades 1 she indicated she said moms and dads can do a lot to help their little ones become.
Dad S Worksheet Multiplication. The worksheet is an assortment of 4 intriguing pursuits that will enhance your kid's knowledge and abilities. The worksheets are offered in developmentally appropriate versions for kids of different ages. Adding and subtracting integers worksheets in many ranges including a number of choices for parentheses use.
You can begin with the uppercase cursives and after that move forward with the lowercase cursives. Handwriting for kids will also be rather simple to develop in such a fashion. If you're an adult and wish to increase your handwriting, it can be accomplished. As a result, in the event that you really wish to enhance handwriting of your kid, hurry to explore the advantages of an intelligent learning tool now!
Consider how you wish to compose your private faith statement. Sometimes letters have to be adjusted to fit in a particular space. When a letter does not have any verticals like a capital A or V, the very first diagonal stroke is regarded as the stem. The connected and slanted letters will be quite simple to form once the many shapes re learnt well. Even something as easy as guessing the beginning letter of long words can assist your child improve his phonics abilities. Dad S Worksheet Multiplication.
There isn't anything like a superb story, and nothing like being the person who started a renowned urban legend. Deciding upon the ideal approach route Cursive writing is basically joined-up handwriting. Practice reading by yourself as often as possible.
Research urban legends to obtain a concept of what's out there prior to making a new one. You are still not sure the radicals have the proper idea. Naturally, you won't use the majority of your ideas. If you've got an idea for a tool please inform us. That means you can begin right where you are no matter how little you might feel you've got to give. You are also quite suspicious of any revolutionary shift. In earlier times you've stated that the move of independence may be too early.
Each lesson in handwriting should start on a fresh new page, so the little one becomes enough room to practice. Every handwriting lesson should begin with the alphabets. Handwriting learning is just one of the most important learning needs of a kid. Learning how to read isn't just challenging, but fun too.
The use of grids The use of grids is vital in earning your child learn to Improve handwriting. Also, bear in mind that maybe your very first try at brainstorming may not bring anything relevant, but don't stop trying. Once you are able to work, you might be surprised how much you get done. Take into consideration how you feel about yourself. Getting able to modify the tracking helps fit more letters in a little space or spread out letters if they're too tight. Perhaps you must enlist the aid of another man to encourage or help you keep focused.
Dad S Worksheet Multiplication. Try to remember, you always have to care for your child with amazing care, compassion and affection to be able to help him learn. You may also ask your kid's teacher for extra worksheets. Your son or daughter is not going to just learn a different sort of font but in addition learn how to write elegantly because cursive writing is quite beautiful to check out. As a result, if a kid is already suffering from ADHD his handwriting will definitely be affected. Accordingly, to be able to accomplish this, if children are taught to form different shapes in a suitable fashion, it is going to enable them to compose the letters in a really smooth and easy method. Although it can be cute every time a youngster says he runned on the playground, students want to understand how to use past tense so as to speak and write correctly. Let say, you would like to boost your son's or daughter's handwriting, it is but obvious that you want to give your son or daughter plenty of practice, as they say, practice makes perfect.
Without phonics skills, it's almost impossible, especially for kids, to learn how to read new words. Techniques to Handle Attention Issues It is extremely essential that should you discover your kid is inattentive to his learning especially when it has to do with reading and writing issues you must begin working on various ways and to improve it. Use a student's name in every sentence so there's a single sentence for each kid. Because he or she learns at his own rate, there is some variability in the age when a child is ready to learn to read. Teaching your kid to form the alphabets is quite a complicated practice.
Have faith. But just because it's possible, doesn't mean it will be easy. Know that whatever life you want, the grades you want, the job you want, the reputation you want, friends you want, that it's possible.
Top | 1,418 | 7,087 | {"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-2019-35 | latest | en | 0.972003 |
https://onepetro.org/ISRMIS/proceedings-abstract/IS88/All-IS88/ISRM-IS-1988-030/45702 | 1,618,320,059,000,000,000 | text/html | crawl-data/CC-MAIN-2021-17/segments/1618038072366.31/warc/CC-MAIN-20210413122252-20210413152252-00530.warc.gz | 522,587,296 | 15,026 | ABSTRACT:
A hybrid method for solving elasto-plastic problems in rock engineering is presented by coupling two existing methods, the boundary element method and the characteristics method. The formulation of this method is presented, as well as an efficient procedure for boundary determination, and it is discussed that this method is a powerful an~ accurate method in evaluating the extent of the plastic region around rock caverns, which is of prime importance for the construction of rock caverns. Then some typical examples, including underground power house cavern, are solved by this method in order to demonstrate its applicability in rock engineering.
INTRODUCTION
It is well known that the characteristics method (Hill 1950, Mogami 1969) is an accurate method to solve the plastic equilibrium problem conditioned by the hyper- bolic-type partial differential equations. n the other hand, the boundary element method (Banerjee et al. 1981, Kobayashi b985) is a powerful method for solving boundary value problems of infinite homogeneous elastic fields. Therefore, it is desired to combine the both methods in order to make full use of their merits. (he method, so-called BEM-CM hybrid method fSugawara et al. 1987a and 1987b), is one of the effectual numerical methods applicable to practical important problems in rock engineering such as stability of rock caverns, rock slope stability, rock found ation problem and so on.
In the present paper, the BEM-CM hybrid method is applied to elasto-plastic problems of underground openings under bi- axial initial stress condition. The formula ion of the method is firstly presented,as well as an efficient scheme for deter mining the boundary between the plastic legion and the elastic region. Subsequently the application of the method to an underground power house cavern is prestented with another typical examples, and roe~ the applicability of the method in c engineering is discussed.
METHOD
BEM-CM COMPOSITION
Let us consider a certain underground opening, as illustrated in Fig. 1, and suppose that the ground surrounding the opening consists of the elastic region:n1 and the plastic region: Ώ2. Additionally suppose that the whole of the ground is under compression, namely no tensile stress. Fig. 1(a) shows the full surface yielding of the opening, and (b) shows the partial yielding of the opening, of which the surface consists of the elastic range I'1 and the plastic range • In both cases, the boundary between Ώ 1 and Ώ 2 is assumed to be defined by.
If we designate the yield function of the ground by f(Oij)=0, the stress in n1 by Oije and the stress in nz by OijP, the stress state within the elastic region is conditioned by f(Oije):00 and that in the plastic region is conditioned by f(OijP)=O. Considerations of equilibrium demand that the stress component normal to.f3 and the shear stress parallel to I'3 should be the same on both sides, as well as the displacement components. The main problem is how to determine the geometrical shape of the plastic region.
This content is only available via PDF. | 651 | 3,086 | {"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-2021-17 | latest | en | 0.943904 |
http://codegolf.stackexchange.com/questions/3191/write-the-fastest-fibonacci | 1,469,569,759,000,000,000 | text/html | crawl-data/CC-MAIN-2016-30/segments/1469257825124.55/warc/CC-MAIN-20160723071025-00049-ip-10-185-27-174.ec2.internal.warc.gz | 43,237,347 | 27,373 | # Write the fastest Fibonacci
This is yet another challenge about the Fibonacci numbers.
The goal is to compute the 20'000'000th Fibonacii number as fast as possible. The decimal output is about 4 MiB large; it starts with:
28543982899108793710435526490684533031144309848579
The MD5 sum of the output is
fa831ff5dd57a830792d8ded4c24c2cb
You have to submit a program that calculates the number while running and puts the result to `stdout`. The fastest program, as measured on my own machine, wins.
• You have to submit the source code and a binary runnable on an x64 Linux
• The source code must be shorter than 1 MiB, in case of assembly it is also acceptable if only the binary is that small.
• You must not include the number to be computed in your binary, even in a disguised fashion. The number has to be calculated at runtime.
• My computer has two cores; you are allowed to use parallelism
I took a small implementation from the Internet which runs in about 4.5 seconds. It should not be very difficult to beat this, assuming that you have a good algorithm.
-
Dude, anything like Sage that has indeterminate float precision will run that thing in less thant 1/10th of second. It's just a simple expression as `phi = (1+sqrt(5))/2` – JBernardo Jul 16 '11 at 18:14
Can we output the number in hex? – Keith Randall Jul 18 '11 at 0:25
@Keith Nope. That's part of the spec. – FUZxxl Jul 18 '11 at 10:16
Since it's to be measured on your CPU, we might as well have some more information about it, couldn't we? Intel or AMD? Size of the L1 and instruction caches? Instruction set extensions? – J B Jul 19 '11 at 13:37
As I compute it, your start string and MD5 are for the 20'000'000th number, not the mere 2'000'000th. – J B Jul 19 '11 at 17:07
C with GMP, 3.6s
Gods, but GMP makes code ugly. With a Karatsuba-style trick, I managed to cut down to 2 multiplies per doubling step. Now that I'm reading FUZxxl's solution, I'm not the first to have the idea. I've got a couple more tricks up my sleeve... maybe I'll try 'em out later on.
``````#include <gmp.h>
#include <stdio.h>
int main(){
mpz_t a,b,u,v;
mpz_init(a);mpz_set_ui(a,0);
mpz_init(b);mpz_set_ui(b,1);
mpz_init(u);
mpz_init(v);
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL
DBL /*Comment this line out for F(10M)*/
mpz_out_str(stdout,10,b);
printf("\n");
}
``````
Built with `gcc -O3 m.c -o m -lgmp`.
-
LOL. Apart from a identifier naming, that's exactly my solution :) – J B Jul 19 '11 at 20:37
@J B: FIRST! :D – boothby Jul 19 '11 at 20:42
Keep it ;) The next trick up my sleeve will benefit from Haskell more than from C. – J B Jul 19 '11 at 20:46
First trick up my sleeve bumped in a GHC bug. Drat. I'll have to fall back to the second one, which isn't remotely as fun to implement, so it'll take time and motivation. – J B Jul 19 '11 at 22:10
3.6 secs on my machine. – FUZxxl Jul 19 '11 at 22:11
Sage
Hmm, you seem to assume that the fastest is going to be a compiled program. No binary for you!
``````print fibonacci(2000000)
``````
On my machine, it takes 0.10 cpu seconds, 0.15 wall seconds.
edit: timed on the console, instead of the notebook
-
+1 that's what I was talking about. – JBernardo Jul 16 '11 at 18:18
My idea was not to know, how fast your CAS can do this, but rather how fast you can code this by yourself. – FUZxxl Jul 19 '11 at 14:55
For the record, I just put this up to be a smartass; you didn't say not to use builtins. – boothby Jul 19 '11 at 20:19
This is my own try, although I did not wrote the algorithm by myself. I rather copied it from haskell.org and adapted it to use `Data.Vector` with its famous stream fusion:
``````import Data.Vector as V
import Data.Bits
main :: IO ()
main = print \$ fib 20000000
fib :: Int -> Integer
fib n = snd . V.foldl' fib' (1,0) . V.dropWhile not \$ V.map (testBit n) \$ V.enumFromStepN (s-1) (-1) s
where
s = bitSize n
fib' (f,g) p
| p = (f*(f+2*g),ss)
| otherwise = (ss,g*(2*f-g))
where ss = f*f+g*g
``````
This takes around 4.5 seconds when compiled with GHC 7.0.3 and the following flags:
```ghc -O3 -fllvm fib.hs
```
-
Weird... I needed to change 20000000 to 40000000 to get it to print the expected number. – J B Jul 19 '11 at 19:47
Gotcha. Should be `enumFromStepN (s-1)` instead of `enumFromStepN s` – J B Jul 19 '11 at 19:53
@J B Sorry for all this confusion. I initially tested the program with different values to get a reasonably big number and saved the output into different files. But some how I confused them. I have updated the number to match the desired result. – FUZxxl Jul 19 '11 at 19:53
@boothby No, I did not change the desired fibonacci number, but rather the reference output, which was wrong. – FUZxxl Jul 19 '11 at 20:07
Side note: it's about 1.5s on my machine, but neither LLVM not Data.Vector seem to bring any significant advantage. – J B Jul 19 '11 at 20:44
## COW
`````` MoO moO MoO mOo MOO OOM MMM moO moO
MMM mOo mOo moO MMM mOo MMM moO moO
MOO MOo mOo MoO moO moo mOo mOo moo
``````
Moo! (Takes a while. Drink some milk...)
-
Note: Although this really does work, it will probably never reach 20,000,000... – Timtech Jan 13 '14 at 22:19
Mathematica, interpreted:
``````First@Timing[Fibonacci[2 10^6]]
``````
Timed:
``````0.032 secs on my poor man's laptop.
``````
And of course, no binary.
-
Doesn't print to `stdout`. – boothby Jul 18 '11 at 19:36
@boothby Wrong. It writes to standard output if you use the command line interface. See for example stackoverflow.com/questions/6542537/… – Dr. belisarius Jul 18 '11 at 19:44
Nope, I'm using the commandline interface, version 6.0. Even using `-batchoutput`, it only prints timing info and not the Fibonacci number. – boothby Jul 18 '11 at 20:36
Sorry, can't reproduce since I don't have mathematica. – FUZxxl Jul 19 '11 at 14:49
`curl 'http://www.wolframalpha.com/input/?i=Fibonacci%5B2+10^6%5D' | grep 'Decimal approximation:' | sed ...` It runs in constant time with respect to the speed of your Internet connection. ;-) – ESultanik Jul 25 '11 at 17:06
# Ocaml, 0.856s on my laptop
Requires the zarith library. I used Big_int but it's dog slow compared to zarith. It took 10 minutes with the same code! Most of the time was spent printing the damn number (9½ minutes or so)!
``````module M = Map.Make
(struct
type t = int
let compare = compare
end)
let double b = Z.shift_left b 1
let ( +. ) b1 b2 = Z.add b1 b2
let ( *. ) b1 b2 = Z.mul b1 b2
let cache = ref M.empty
let rec fib_log n =
if n = 0
then Z.zero
else if n = 1
then Z.one
else if n mod 2 = 0
then
let f_n_half = fib_log_cached (n/2)
and f_n_half_minus_one = fib_log_cached (n/2-1)
in f_n_half *. (f_n_half +. double f_n_half_minus_one)
else
let f_n_half = fib_log_cached (n/2)
and f_n_half_plus_one = fib_log_cached (n/2+1)
in (f_n_half *. f_n_half) +.
(f_n_half_plus_one *. f_n_half_plus_one)
and fib_log_cached n =
try M.find n !cache
with Not_found ->
let res = fib_log n
in cache := M.add n res !cache;
res
let () =
let res = fib_log 20_000_000 in
Z.print res; print_newline ()
``````
I can't believe how much a difference the library made!
-
For comparison @boothby's solution takes 0.875s to run on my laptop. It seems the difference is neglible. Also, apparently my laptop is fast :o – ReyCharles Oct 12 '12 at 13:28
On my system, this runs almost as fast as FUZxxl's answer (~18 seconds instead of ~17 seconds).
``````main = print \$ fst \$ fib2 20000000
-- | fib2: Compute (fib n, fib (n+1)).
--
-- Having two adjacent Fibonacci numbers lets us
-- traverse up or down the series efficiently.
fib2 :: Int -> (Integer, Integer)
-- Guard against negative n.
fib2 n | n < 0 = error "fib2: negative index"
fib2 0 = (0, 1)
fib2 1 = (1, 1)
fib2 2 = (1, 2)
fib2 3 = (2, 3)
-- For larger numbers, derive fib2 n from fib2 (n `div` 2)
-- This takes advantage of the following identity:
--
-- fib(n) = fib(k)*fib(n-k-1) + fib(k+1)*fib(n-k)
-- where n > k
-- and k ≥ 0.
--
fib2 n =
let (a, b) = fib2 (n `div` 2)
in if even n
then ((b-a)*a + a*b, a*a + b*b)
else (a*a + b*b, a*b + b*(a+b))
``````
-
Nice. I love Haskell. – Arlen Aug 5 '11 at 3:39
I ran this in ghci. I was pretty impressed. Haskell is great for these types of mathematical code problems. – Undreren Oct 12 '12 at 8:03
I implemented the matrix multiplication method (from sicp, http://sicp.org.ua/sicp/Exercise1-19) in SBCL but it takes about 30 seconds to finish. I ported it to C using GMP, and it returns the correct result in about 1.36 seconds on my machine. It's about as fast as boothby's answer.
``````#include <gmp.h>
#include <stdio.h>
int main()
{
int n = 20000000;
mpz_t a, b, p, q, psq, qsq, twopq, bq, aq, ap, bp;
int count = n;
mpz_init_set_si(a, 1);
mpz_init_set_si(b, 0);
mpz_init_set_si(p, 0);
mpz_init_set_si(q, 1);
mpz_init(psq);
mpz_init(qsq);
mpz_init(twopq);
mpz_init(bq);
mpz_init(aq);
mpz_init(ap);
mpz_init(bp);
while(count > 0)
{
if ((count % 2) == 0)
{
mpz_mul(psq, p, p);
mpz_mul(qsq, q, q);
mpz_mul(twopq, p, q);
mpz_mul_si(twopq, twopq, 2);
mpz_add(p, psq, qsq); // p -> (p * p) + (q * q)
mpz_add(q, twopq, qsq); // q -> (2 * p * q) + (q * q)
count/=2;
}
else
{
mpz_mul(bq, b, q);
mpz_mul(aq, a, q);
mpz_mul(ap, a, p);
mpz_mul(bp, b, p);
mpz_add(a, bq, aq); // a -> (b * q) + (a * q)
mpz_add(a, a, ap); // + (a * p)
mpz_add(b, bp, aq); // b -> (b * p) + (a * q)
count--;
}
}
gmp_printf("%Zd\n", b);
return 0;
}
``````
-
## Java: 8 seconds to compute, 18 seconds to write
``````public static BigInteger fibonacci1(int n) {
if (n < 0) explode("non-negative please");
short charPos = 32;
boolean[] buf = new boolean[32];
do {
buf[--charPos] = (n & 1) == 1;
n >>>= 1;
} while (n != 0);
BigInteger a = BigInteger.ZERO;
BigInteger b = BigInteger.ONE;
BigInteger temp;
do {
if (buf[charPos++]) {
a = temp;
} else {
a = a.multiply(b.shiftLeft(1).subtract(a));
b = temp;
}
} while (charPos < 32);
return a;
}
public static void main(String[] args) {
BigInteger f;
f = fibonacci1(20000000);
System.out.println(f.toString());
}
``````
-
## C, naive algorithm
Was curious, and I hadn't used gmp before... so:
``````#include <stdio.h>
#include <stdlib.h>
#include <gmp.h>
int main(int argc, char *argv[]){
int n = (argc>1)?atoi(argv[1]):0;
mpz_t temp,prev,result;
mpz_init(temp);
mpz_init_set_ui(prev, 0);
mpz_init_set_ui(result, 1);
for(int i = 2; i <= n; i++) {
mpz_swap(temp, result);
mpz_swap(temp, prev);
}
printf("fib(%d) = %s\n", n, mpz_get_str (NULL, 10, result));
return 0;
}
``````
fib(1 million) takes about 7secs... so this algorithm won't win the race.
-
# Go
It's embarrasingly slow. On my computer it takes a little less than 3 minutes. It's only 120 recursive calls, though (after adding the cache). Note that this may use a lot of memory (like 1.4 GiB)!
``````package main
import (
"math/big"
"fmt"
)
var cache = make(map[int64] *big.Int)
func fib_log_cache(n int64) *big.Int {
if res, ok := cache[n]; ok {
return res
}
res := fib_log(n)
cache[n] = res
return res
}
func fib_log(n int64) *big.Int {
if n <= 1 {
return big.NewInt(n)
}
if n % 2 == 0 {
f_n_half := fib_log_cache(n/2)
f_n_half_minus_one := fib_log_cache(n/2-1)
res := new(big.Int).Lsh(f_n_half_minus_one, 1)
res.Mul(f_n_half, res)
return res
}
f_n_half := fib_log_cache(n/2)
f_n_half_plus_one := fib_log_cache(n/2+1)
res := new(big.Int).Mul(f_n_half_plus_one, f_n_half_plus_one)
tmp := new(big.Int).Mul(f_n_half, f_n_half)
return res
}
func main() {
fmt.Println(fib_log(20000000))
}
``````
-
I tried parallelizing it (before adding the cache) using go routines and it started using 19 GiB of memory :/ – ReyCharles Oct 12 '12 at 10:32
pseudo code (I don't know what you guys are using)
``````product = 1
multiplier = 3 // 3 is fibonacci sequence, but this can be any number,
// generating an infinite amount of sequences
y = 28 // the 2^x-1 term, so 2^28-1=1,284,455,535th term
for (int i = 1; int < y; i++) {
product= sum*multiplier-1
multiplier= multiplier^2-2
}
multiplier=multiplier-product // 2^28+1 1,284,455,537th
``````
It took my computer 56 hours to do those two terms. My computer is kind of crappy. I'll have the number in a text file on October 22nd. 1.2 gigs is a bit big to be sharing on my connection.
-
I'm confused by your answer. Pseudocode? And yet you have timings? Post the code! Language doesn't matter! – boothby Oct 12 '12 at 5:06
That, and the output is only supposed to be 4 million or so digits... – Wug Oct 12 '12 at 21:12 | 4,081 | 12,467 | {"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-2016-30 | latest | en | 0.941779 |
https://codinch.com/product/assignment-3-solution-233/ | 1,600,458,282,000,000,000 | text/html | crawl-data/CC-MAIN-2020-40/segments/1600400188841.7/warc/CC-MAIN-20200918190514-20200918220514-00705.warc.gz | 323,780,055 | 17,124 | \$30.00
Category:
## Description
• Dynamic Memory Allocation and Linked Lists
For this question, your job is to implement a SINGLY Linked list. This linked list will be built by taking SINGLE CHARACTER inputs from the user, one input at a time, and placing the input in respective nodes. Every node will have a character specified by user input AND an address. The address will be pointing toward the next node in the linked list. You will then develop a procedure to print the linked list you have made, along with a procedure to reverse said linked list. Use whichever subroutines you like. Follow convention.
1. Write a procedure called “build” that will continually ask the user for another input UNTIL the user has input the character “*”. “*” Will act as the token that signifies that the list is complete. The final “*” will not be considered a part of the linked list. For EACH user input until “*”, you will put that character into a single node in the linked list. \$v1 will be used to return the address of the first node in the linked list.
1. Write a procedure called “print” which will use \$a0 to take the address of the first node of a linked list. “print” will print the contents of each node as it goes through the linked list.
1. Write a procedure called “reverse” which will reverse a singly linked list. Reverse will take the first node of a linked list as an argument. Pass the address of the first node of a linked list through \$a1. Reverse will then reverse every element in the linked list. Return the reversed linked list in \$v1. Use whichever subroutines you like. Follow convention.
• Dr. Ackermann or: How I Learned to Stop Worrying and Love Recursion
There was some confusion on the last assignment about what recursion really entailed. In par-ticular, because Dijstrka’s algorithm was “tail-recursive,” one could implement it using a single stack frame using a loop, without the need to make a recursive call at all. Functions that can be computed in such a way are called “primitive recursive.”
One may ask if all computable functions are primitive recursive. In 1928, German mathe-matician William Ackermann answered the question in the negative by providing an example of a recursive function which was not primitive recursive (actually, David Hilbert provided the example, but Ackermann formally proved the result). In a sense, the recursion cannot be “taken out” of the computation of the function. In particular, the function cannot be computed using a loop whose bound is known at runtime, so that we cannot get away with using a single stack frame.
1
The Ackermann function A(m; n) for natural numbers m; n is defined by A(m; n) = 8 A(m 1; 1) if m > 0 and n = 0 (1) > n + 1 if m = 0 < A(m 1; A(m; n 1)) if m > 0 and n > 0: >
:
Your task is to write a MIPS program that computes the Ackermann function. It should take input from the console and print the answer. You should write a helper procedure that checks the type and range of the inputs, printing an appropriate error message if necessary. You should use the table of values found at https://en.wikipedia.org/wiki/Ackermann_function#Table_of_ values to test your program. Be careful: A(m; n) grows very rapidly. Thus, you should limit your tests to values of m < 4 and n < 5.
The history of Ackermann’s discovery is a fascinating read. If you are fascinated by the rele-vant concepts, you should consider taking COMP 330 (Theory of Computation) and COMP 302 (Programming Languages and Paradigms) to learn more.
• Numerical Integration with the Floating Point Coprocessor
MIPS has two coprocessors dedicated to floating-point arithmetic. We will make use of them by implementing a numerical method for integration.
Recall (or learn) that the integral Rab f(x) dx of a real-valued function f(x) of one real-variable gives the signed area under the graph of f over the interval [a; b]. Most integrals do not have closed-form expressions as solutions and one must resort to numerical methods for their computation.
To this end, let us partition the interval [a; b] into N subintervals [x0; x1]; : : : ; [xN 1; xN ] with xi = a + i x, where x = (b a)=N, and let xi be the midpoint of the ith interval. Then the “midpoint method” approximates the integral according to the formula
Z b f(x) dx N f(xi ) x (2) X
• i=1
with the approximation becoming exact as N ! 1.
Your task is to write a procedure that computes the definite integral of a real-valued function of one variable using the midpoint method. Your procedure should accept as input the address of the function to be integrated and the endpoints of the interval of integration (specified in the data section). The value of N should be hard-coded into the body of your method. You should have a helper procedure that checks that a < b, printing an appropriate error message if necessary. Since a; b and the result of integration will be floating point values, you will need to use the appropriate registers of the floating point coprocessor to manipulate them. Refer to the assignment template for additional details.
• Assignment Submission Instructions
1. Submit your solution to MyCourses before the due date.
1. Highlight the Three template files, and zip them. The zipped file will be named <stu-dentID>.zip. If my student ID is 123456789, then the zip file to submit will be named “123456789.zip”.
1. Your code must run and assemble, even if the final solution is not quite working. Part marks will be awarded for correct high-level control flow and use of conventions. If something is not working, comment-out the broken parts of code and write a comment or two about what you expect to happen, what is happening, and what the problem may be. If your code does not assemble you will receive very few points
2 | 1,320 | 5,792 | {"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-2020-40 | latest | en | 0.92929 |
https://id.scribd.com/document/344800733/Unce | 1,560,864,590,000,000,000 | text/html | crawl-data/CC-MAIN-2019-26/segments/1560627998724.57/warc/CC-MAIN-20190618123355-20190618145355-00108.warc.gz | 471,746,298 | 69,083 | Anda di halaman 1dari 6
Method A - statistics from a series of independent repeated measurements.
Take a series of measurements and enter them in the table below. The measurement statistics are
shown below the table where the "2 sigma %" represents the k=2 uncertainty with 95% confidence.
Mean Std Dev Max Min 12
#DIV/0! #DIV/0! 0 0
10
1 sigma % #DIV/0!
2 sigma % #DIV/0!
8
Fre quency
Ampl bin Freq
6
0 #VALUE!
0 #VALUE!
4
0 #VALUE!
0 #VALUE!
0 #VALUE! 2
0 #VALUE!
0 #VALUE! 0
0 #VALUE! 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0 #VALUE! Am plitude
0 #VALUE!
mailto:info@mpiuk.co.uk http:\\www.mpiuk.co.uk
.6 0.7 0.8 0.9 1
Measurement uncertainty budget calculator
For each source of uncertainty enter either its Nominal value and +/- uncertainty OR the % uncertainty.
Select the appropriate Probablility Distribution type from the drop down list.
The combined uncertainty is shown below. (See the Example sheet)
Enter either Nom and +/- or single %
Nominal
Source of uncertainty Value +/- Value +/- %
value
Expanded uncertainty (k=2) 1000 0.00000 0.00%
mailto:info@mpiuk.co.uk http:\\www.mpiuk.co.uk
he % uncertainty.
Probability Standard
Divisor
distribution uncertainty
0
Measurement uncertainty budget calculator
Example showing a simple example of using a DVM as a secondary standard to check
another measurement device.
Enter either Nom and +/- or single %
Nominal Probability
Source of uncertainty Value +/- Value +/- %
value distribution
DVM amplitude specification 0.10% Normal k=2
DVM resolution 3000 1 Normal k=2
UUT measurement result resolution 300 0.1 Rectangular
Uncertainty of mean on 10 readings 20 0.016 Normal k=1
Expanded uncertainty (k=2) 1 0.00194 0.19%
mailto:info@mpiuk.co.uk http:\\www.mpiuk.co.uk
Standard
Divisor
uncertainty
2.00 0.0005
2.00 0.000166667
1.73 0.00019245
1.00 0.000790569
0.00096944
0.001938881 | 574 | 1,855 | {"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-2019-26 | latest | en | 0.573673 |
https://physics.stackexchange.com/questions/684737/derivation-of-time-ordered-2d-scalar-propagator | 1,716,232,379,000,000,000 | text/html | crawl-data/CC-MAIN-2024-22/segments/1715971058293.53/warc/CC-MAIN-20240520173148-20240520203148-00181.warc.gz | 408,022,733 | 40,588 | # Derivation of time ordered 2d scalar propagator
I am trying to derive the following result (formula 3.7a from the book "Basic Concepts of String Theory") $$\langle X^\mu_L(\bar{z})\, X^\nu_L(\bar{w}) \rangle = \frac{1}{4}\alpha'\eta^{\mu\nu}\ln\bar{z} -\frac{1}{2}\alpha'\eta^{\mu\nu}\ln(\bar{z}-\bar{w}) \quad(1)$$ where $$\bar{z} = e^{2\pi i(\tau +\sigma)/l}$$ and $$\bar{w} = e^{2\pi i(\tau' +\sigma')/l}$$ with $$(\tau,\sigma)\sim(\tau,\sigma + l)$$ parametrizing the closed string world sheet.
The propagator is defined as: $$\langle X^\mu(\tau, \sigma)\, X^\nu(\tau',\sigma') \rangle = \mathcal{T}[X^\mu(\tau, \sigma)\, X^\nu(\tau',\sigma')] - :X^\mu(\tau, \sigma)\, X^\nu(\tau',\sigma'):\quad (2)$$ where $$\mathcal{T}[\dots]$$ denotes time-ordering and $$:\dots:$$ denotes normal-ordering.
I'm trying to derive (1) from the following mode expansion $$X^\mu_L(\tau+\sigma)=\frac{1}{2}x^\mu + \frac{\pi\alpha'}{l}p^\mu(\tau+\sigma)+i\sqrt{\frac{\alpha'}{2}}\sum_{n>0} \left(\frac{1}{n}\bar{\alpha}^\mu_n e^{-\frac{2\pi}{l} in(\tau+\sigma)} -\frac{1}{n}(\bar{\alpha}^\mu_n)^\dagger e^{\frac{2\pi}{l} in(\tau+\sigma)} \right) \quad(3)$$ with the commutation relation \begin{align} [\bar{\alpha}^\mu_m, (\bar{\alpha}^\nu_n)^\dagger] &= m\delta_{m,n}\eta^{\mu\nu}, \quad (m,n > 0)\\ [x^\mu, p^\nu] &= i\eta^{\mu\nu} \end{align} and we define $$:p^\nu x^\mu:=x^\mu p^\nu$$.
From the definition (2) and using (3) with the commutation relations, I was able to show that for $$\tau > \tau'$$, \begin{align} \langle X^\mu_L(\bar{z})\, X^\nu_L(\bar{w}) \rangle &= -i\frac{\pi\alpha'}{2l}\eta^{\mu\nu}(\tau+\sigma) + \frac{\alpha'}{2}\eta^{\mu\nu}\sum_{n>0}\frac{1}{n}\frac{\bar{w}^n}{\bar{z}^n} \\ &=\frac{1}{4}\alpha'\eta^{\mu\nu}\ln\bar{z} -\frac{1}{2}\alpha'\eta^{\mu\nu}\ln(\bar{z}-\bar{w}) \end{align} which agrees with (1). But the same derivation would lead to that for $$\tau <\tau'$$, $$\langle X^\mu_L(\bar{z})\, X^\nu_L(\bar{w}) \rangle = \frac{1}{4}\alpha'\eta^{\mu\nu}\ln\bar{w} -\frac{1}{2}\alpha'\eta^{\mu\nu}\ln(\bar{w}-\bar{z})$$
I wonder if there is any subtlety in my derivation which I have neglected or what would be the correct way to derive (1) from the expansion (3).
Maybe I'm missing something but you can get as far as \begin{align} \langle X^\mu_L(\bar{z})\, X^\nu_L(\bar{w}) \rangle &= -i\frac{\pi\alpha'}{2l}\eta^{\mu\nu}(\tau+\sigma) + \frac{\alpha'}{2}\eta^{\mu\nu}\sum_{n>0}\frac{1}{n}\frac{\bar{w}^n}{\bar{z}^n} \end{align} without assuming anything about the ordering yet. Then there are two cases.
1. If $$\tau^\prime - \tau$$ has a positive imaginary part, the propagator above is the expression you're trying to derive.
2. If $$\tau^\prime - \tau$$ has a negative imaginary part, the sum in the propagator above doesn't even converge.
This looks like a version of the statement that only time ordered correlators make sense in Euclidean CFT. This also seems to be the conclusion from $$\langle X^\mu(\tau, \sigma)\, X^\nu(\tau',\sigma') \rangle = \mathcal{T}[X^\mu(\tau, \sigma)\, X^\nu(\tau',\sigma')] - :X^\mu(\tau, \sigma)\, X^\nu(\tau',\sigma'):$$ if we take the vacuum expectation value of both sides.
Update
I would say the plane co-ordinates $$(z, \bar{z})$$ are not more or less meaningful than the cylinder co-ordinates $$(\sigma, \tau)$$. There is some semantics going on about what we call Euclidean but I think I see what we're doing differently now.
1. You're actually computing $$\mathcal{T}[X^\mu(\tau, \sigma)\, X^\nu(\tau',\sigma')]$$ which means you're treating equation (2) as an equation which should be used.
2. I'm just shoving $$X^\mu_L(\bar{z}) X^\nu_L(\bar{w})$$ between two vacuum states, as CFT people always do, which means I'm treating equation (2) as just something that we can keep in mind for later if the two-point function needs to be interpreted.
The second approach might be more subtle than I realized due to the $$:p^\nu x^\mu: = x^\mu p^\nu$$ convention for zero modes. But I agree that, when taking the first approach, I get your two expressions with $$\ln(\bar{z} - \bar{w})$$ and $$\ln(\bar{w} - \bar{z})$$. So that supports the expression in the previous question with the two Heaviside functions.
If this happened for vertex operators, I would be more worried. But $$X_L$$ and $$X_R$$ are not genuine CFT operators so maybe their correlators are more sensitive to how you quantize the theory.
• I started with the R.H.S expression in eq(2), which is the definition of this correlation function (which is in fact the time-ordered two point function). This definition involves the time-ordering product of the two X_L. That's why my result depends on the ordering. Dec 23, 2021 at 4:24
• Also how is the imaginary part related to the time ordering? tau here is the Lorentzian time, not the Euclidean time. Dec 23, 2021 at 4:27
• No, the $\tau$ you wrote is Euclidean. You can tell because $\bar{z} = e^{2\pi i (\sigma + \tau) / l}$ is periodic in both $\sigma$ and $\tau$, not just $\sigma$. Dec 23, 2021 at 12:27
• And I agree that this two point function is necessarily time ordered. But this means its value should not depend on the ordering of arguments because $\mathcal{T}$ puts them in order anyway... $X_L(\tau) X_L(\tau^\prime) \neq X_L(\tau^\prime) X_L(\tau)$ but $\mathcal{T}[X_L(\tau) X_L(\tau^\prime)] = \mathcal{T}[X_L(\tau^\prime) X_L(\tau)]$. Dec 23, 2021 at 12:31
• I think $\tau$ is Lorentzian because you can see $e^{2\pi i (\sigma + \tau)/l}$ satisfy the Lorentzian wave equation $(-\partial^2_\tau + \partial^2_\sigma) f(\tau, \sigma) =0$. I think in the later chapter of the book, you rotate $\tau$ to Euclidean time so that the modes become $e^{2\pi\tau_E +2\pi i \sigma}$ where $\tau_E$ becomes the radial direction. Dec 23, 2021 at 16:37 | 1,938 | 5,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": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 27, "wp-katex-eq": 0, "align": 3, "equation": 0, "x-ck12": 0, "texerror": 0} | 2.984375 | 3 | CC-MAIN-2024-22 | latest | en | 0.641639 |
http://nasawavelength.org/resource-search?facetSort=1&topicsSubjects=Mathematics&resourceType=Instructional+materials%3AStudent+guide&learningTime=1+to+2+hours&instructionalStrategies=Identifying+similarities+and+differences | 1,513,624,138,000,000,000 | text/html | crawl-data/CC-MAIN-2017-51/segments/1512948619804.88/warc/CC-MAIN-20171218180731-20171218202731-00727.warc.gz | 190,365,294 | 13,602 | ## Narrow Search
Audience
Topics
Earth and space science
Mathematics
Resource Type [-]
View more...
Learning Time
Materials Cost
Instructional Strategies [-]
View more...
SMD Forum
Filters: Your search found 5 results.
Topics/Subjects:
Mathematics
Resource Type:
Student guide
Learning Time:
1 to 2 hours
Instructional Strategies:
Identifying similarities and differences
Sort by:
Per page:
Now showing results 1-5 of 5
# Patterns and Fingerprints
This is an activity about detecting elements by using light. Learners will develop and apply methods to identify and interpret patterns to the identification of fingerprints. They look at fingerprints of their classmates, snowflakes, and finally... (View More)
# Using Mathematical Models to Investigate Planetary Habitability: Activity C The Role of Actual Data in Mathematical Models
Students explore how mathematical descriptions of the physical environment can be fine-tuned through testing using data. In this activity, student teams obtain satellite data measuring the Earth's albedo, and then input this data into a... (View More)
Audience: High school
Materials Cost: Free per student
# Bird Beak Accuracy Assessment
In this activity, students quantitatively evaluate the accuracy of a classification and understand a simple difference/error matrix. Students sort birds into three possible classes based on each bird’s beak: carnivores (meat eaters), herbivores... (View More)
# My Angle on Cooling: Effect of Distance and Inclination
Learners will design and conduct experiments to answer the question, "how does distance and inclination affect the amount of heat received from a heat source?" They will measure heat change as a function of distance or viewing angle. From that... (View More)
# Snow Goggles and Limiting Sunlight
This is a lesson about radiation and the use of the scientific method to solve problems of too much radiation. Learners will build snow goggles similar to those used by the Inuit (designed to block unwanted light, while increasing the viewer's... (View More)
1 | 427 | 2,061 | {"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-2017-51 | latest | en | 0.867597 |
https://dsp.stackexchange.com/questions/41525/how-is-the-simplified-version-of-the-bromwich-inverse-laplace-transform-integral | 1,660,320,506,000,000,000 | text/html | crawl-data/CC-MAIN-2022-33/segments/1659882571719.48/warc/CC-MAIN-20220812140019-20220812170019-00391.warc.gz | 239,569,067 | 65,476 | # How is the simplified version of the Bromwich inverse Laplace transform integral derived?
I do not understand how the last equality is derived from the previous. Apparently the first term in the integral (involving $\mathrm{cos}$) is equivalent to the second (involving $\mathrm{sin}$)!! How so??
I DO understand how the integral range is halved (since $F(s)^*=F(s^*)$; where $F(s)$ is the Laplace transform of $f(t)$. Any help would be appreciated since this form is used often in numerical inverse Laplace transform algorithms.
[Note: $\hat{f}(s)$ below represents the Laplace transform of $f(t)$]
This quote is from the web source Abate and Whitt, 1995.
## 1 Answer
I agree that the derivation is unclear, yet the final result is correct (for $t>0$, see below). There are two conditions that are necessary for the final result to be true:
1. $f(t)$ is real-valued
2. $f(t)$ is causal
The step from line 2 to line 3 in the derivation assumes that $f(t)$ is real-valued, i.e., only the real part of the integrand is considered. The last step leading to the final result assumes causality of $f(t)$, i.e., $f(t)=0$ for $t<0$.
From the third line in the derivation we have for real-valued $f(t)$
$$f(t)=\frac{e^{at}}{2\pi}\int_{-\infty}^{\infty}\left[\text{Re}\left(\hat{f}(a+iu)\right)\cos(ut)-\text{Im}\left(\hat{f}(a+iu)\right)\sin(ut)\right]du\tag{1}$$
and, consequently,
$$f(-t)e^{2at}=\frac{e^{at}}{2\pi}\int_{-\infty}^{\infty}\left[\text{Re}\left(\hat{f}(a+iu)\right)\cos(ut)+\text{Im}\left(\hat{f}(a+iu)\right)\sin(ut)\right]du\tag{2}$$
Since for causal $f(t)$ we have $f(-t)=0$ for $t>0$, we can write
$$f(t)=f(t)+f(-t)e^{2at},\qquad t>0\tag{3}$$
Consequently, adding $(1)$ and $(2)$ gives
$$f(t)=\frac{e^{at}}{\pi}\int_{-\infty}^{\infty}\text{Re}\left(\hat{f}(a+iu)\right)\cos(ut)du,\qquad t>0\tag{4}$$
And since for real-valued $f(t)$ the integrand in $(4)$ is even, we finally obtain
$$f(t)=\frac{2e^{at}}{\pi}\int_{0}^{\infty}\text{Re}\left(\hat{f}(a+iu)\right)\cos(ut)du,\qquad t>0\tag{5}$$
q.e.d.
Note that this is result is only valid for $t>0$, which is not stated in the paper you quoted. Of course, for $t<0$ we have $f(t)=0$.
Also note that instead of $(3)$ we could have written
$$f(t)=f(t)-f(-t)e^{2at},\qquad t>0\tag{6}$$
from which we can conclude that
$$f(t)=-\frac{e^{at}}{\pi}\int_{-\infty}^{\infty}\text{Im}\left(\hat{f}(a+iu)\right)\sin(ut)du,\qquad t>0\tag{7}$$
and, taking into account that for real-valued $f(t)$ the integrand is even, we get
$$f(t)=-\frac{2e^{at}}{\pi}\int_{0}^{\infty}\text{Im}\left(\hat{f}(a+iu)\right)\sin(ut)du,\qquad t>0\tag{8}$$
Comparing $(5)$ with $(8)$ we see the equivalence
$$\int_{0}^{\infty}\text{Re}\left(\hat{f}(a+iu)\right)\cos(ut)du=-\int_{0}^{\infty}\text{Im}\left(\hat{f}(a+iu)\right)\sin(ut)du\qquad t>0\tag{9}$$ | 1,021 | 2,811 | {"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.765625 | 4 | CC-MAIN-2022-33 | latest | en | 0.772688 |
http://jamaalwallace.club/1-cubic-yard-to-feet/1-cubic-yard-to-feet-conversion-feet-to-cubic-yards-math-how-to-convert-from-cubic-yards-feet-and-inches-a-1-cubic-yard-of-mulch-covers-how-many-square-feet/ | 1,571,438,052,000,000,000 | text/html | crawl-data/CC-MAIN-2019-43/segments/1570986684854.67/warc/CC-MAIN-20191018204336-20191018231836-00029.warc.gz | 106,498,130 | 8,382 | # 1 Cubic Yard To Feet Conversion Feet To Cubic Yards Math How To Convert From Cubic Yards Feet And Inches A 1 Cubic Yard Of Mulch Covers How Many Square Feet
1 cubic yard to feet conversion feet to cubic yards math how to convert from cubic yards feet and inches a 1 cubic yard of mulch covers how many square feet.
how to measure a cubic foot of concrete 1 yard equals feet covers many square sq,1 cubic yard equals how many sq feet 27 square to,how many square feet does 1 cubic yard cover concrete to 27 per,1 cubic yard equals how many sq feet of gravel covers square to convert yards dirt footage,1 cubic yard how many square feet to foot equals of gravel covers,1 cubic yard equals square feet how many will cover 27 to yards math,how much square feet will 1 cubic yard cover covers many is to equals,1 cubic yard how many square feet per 1000 gardening by the numbers to calculate and cover,1 cubic yard to feet cu ft cover square of gravel covers how many,how many square feet will 1 cubic yard cover equals sq footage m to ft math in a. | 243 | 1,048 | {"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-2019-43 | latest | en | 0.906156 |
https://www.jiskha.com/display.cgi?id=1369650970 | 1,529,756,348,000,000,000 | text/html | crawl-data/CC-MAIN-2018-26/segments/1529267864958.91/warc/CC-MAIN-20180623113131-20180623133131-00285.warc.gz | 854,266,705 | 4,678 | # math
posted by Mathslover
A sphere of radius 32√ is tangent to the edges AB, AD, AA1, and the face diagonal CD1 of the cube ABCDA1B1C1D1.
The volume of the cube can be written as a+bc√, where a, b are integers and c is a square-free positive integer. What is the value of a+b+c?
1. Alestair
237
2. Athul
how
3. Athul
wrong>...........and this is a brilliant problem,try to do it by yourself
4. LOL
326
5. LOL
326 is correct?
6. stranger
wrong 326
7. easy
easy
8. Mathslover
9. wait
tomorrow
## Similar Questions
1. ### Algebra
How would i complete these problems? 1. (√6mn)^5 2. ^3√16x - ^3√2x^4 3.^4√x • ^3√2x 4. ^3√72x^8 5. √63a^5b • √27a^6b^4 and are these problems correct?
2. ### Math
Find an equation of the line that bisects the obtuse angles formed by the lines with equations 3x-y=1 and x+y=-2. a. (3√2 +√10)x-(√10 + √2)y-2√10+√2=0 b. (3√2 - √10)x+(√10 - √2)y+2√10+√2=0 …
3. ### Geometry
A sphere is inscribed in a cube. The diagonal of one face of the cube measures 4 units. Find the volume of the sphere. a.) 8π√2/3 units3 b.) 8√2 units3 c.) 4π units3
4. ### math
The side length, d, of a cube that contains a sphere depends on the radius, r, of a sphere. Assuming that the faces of the cube are tangent to the sphere, write the volume of the cube as a function of the radius of the sphere.
5. ### solid mensuration
let a and b be opposite vertices of a unit cube (i.e. , the distance between a and b is the square root of 3). find the radius of a sphere, whose center is in the interior of the cube, that is tangent to the three faces that at a and …
Can you check my answers? 1. 3√20/√4 = 3√(5)(4)/2 = 3(2)√5/2 = 3√5 2. 4√15/√9 = 4√15/3 3. √12/√16 = √4(3)/4 = 2√3/4 = √3/2 4. √10/√5 = √2
7. ### Algebra
1. Simplify the expression: 4√18+5√32 A.45√2 B.32√2 C.116√2 D.9√50 2. Simplify the expression: 7√5-3√80 A.-5√5 B.-4√75 C.-5 D.4√-75 3. Simplify the expression: √21(√3+√14) …
8. ### Algebra - Check My Work
For Question 1-8 Simplify the Radical Expression *** - My Answer 1.√45 3√5*** 2.√180x^2 6x√5*** 3.√150x^3 k^4 5xk^2√6x*** 4.√21y * 5√49y 35y√21*** 5.(The square root sign applies …
9. ### Algebra
Is this correct cube root 3√540r^3 s^2 t^9 cube root 3√4(5)(3)(3)(3)r^3s^2 (T^3)^3 3r^t^3 cube root 3√4(5)s^2 3r^t^3 cube root 3√20s^2
10. ### geometry
Each of the twelve edges of a cube of edge 'a' is tangent to a sphere. Find the volume of that portion of the cube which lies outside the sphere.
More Similar Questions | 942 | 2,478 | {"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-2018-26 | latest | en | 0.764813 |
https://www.physicsforums.com/threads/need-help-understanding-this-concept-on-field-intensity.493813/ | 1,601,183,620,000,000,000 | text/html | crawl-data/CC-MAIN-2020-40/segments/1600400250241.72/warc/CC-MAIN-20200927023329-20200927053329-00077.warc.gz | 1,001,897,931 | 14,440 | # Need help understanding this concept on field intensity
## Homework Statement
We are looking at gravitational field intensity in particular here, and using the earth as an example. The question states: Calculate the gravitational field intensity at a height of 300.0 km from Earth's surface.
Why is it that: Since the point in question is outside of the sphere of Earth, the gravitational field there is the same as it would be if Earth's mass was concentrated at a point in Earth's centre. Therefore the equation for the gravitational field intensity near a point mass applies?
I don't understand how you could have the same gravitational field concentrated at a point, and it being the same even if you are 300km FAR FROM EARTH? Is this implying that the intensity is the same, because that doesn't make sense to me. | 167 | 824 | {"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-40 | latest | en | 0.959228 |
https://math.stackexchange.com/questions/1709708/is-a-straight-line-the-shortest-distance-between-two-points/1709710 | 1,555,743,507,000,000,000 | text/html | crawl-data/CC-MAIN-2019-18/segments/1555578528702.42/warc/CC-MAIN-20190420060931-20190420082931-00479.warc.gz | 496,139,902 | 34,876 | # Is a straight line the shortest distance between two points?
Quite simply, I heard a lot of talk about how a straight line isn't necessarily the shortest distance between two points.
Is this true, and if it isn't, how would that work?
## migrated from physics.stackexchange.comMar 23 '16 at 3:29
This question came from our site for active researchers, academics and students of physics.
• That's not a physics question, it's pure geometry. The entire field of Riemannian geometry is about spaces where the shortest line is not "straight". – ACuriousMind Mar 22 '16 at 13:31
• I would agree that this is not a physics question but argue that a closely related one. At least as physical as say calculating the trajectory of a projectile. – linuxick Mar 22 '16 at 13:42
• @bytec0de : Define 'straight line'. – Qmechanic Mar 22 '16 at 13:45
• In terms of physics, the path of ray of light in vacuum is the shortest distance between two points. – Dirk Bruere Mar 22 '16 at 13:51
• I'm voting to close this question as off-topic because it is not about physics, and I consider it of too low quality to migrate it. – ACuriousMind Mar 23 '16 at 0:10
Here is a very non-technical answer: If our space was Euclidean then a straight line would be the shortest distance between two points. And until Einstein, through his general theory of relativity, showed that the space can actually be bent everybody believed and treated the space as Euclidean.
But now we know that the "physical" space is not Euclidean and therefore a straight line is not necessarily the shortest distance between two points. Consider for example being on the surface of a solid (impenetrable) sphere. The shortest distance between two points on the sphere is not a straight line.
• "The shortest distance between two points on the sphere is not a straight line." It's not straight when embedded in a 3D Euclidean space, but on the surface of a sphere those lines are as straight as it gets. – Emil Mar 22 '16 at 14:09
• Actually, even Special Relativity requires a non-Euclidean space-time. Euclidean space and the space of Special Relativity have different metrics. Special Relativity space-time is given the name Minkowski Space. – K7PEH Mar 22 '16 at 15:42
• I'm pretty sure that space is Euclidean in special relativity. Its spacetime that's non-Euclidean. – goblin Mar 23 '16 at 3:40
• I think an example with some math would be a nice addition. – inf3rno Nov 23 '17 at 8:06
If I recall what I've seen from Neil deGrasse Tyson correctly, he said that for what we currently have observed in the universe, a straight line is the shortest distance between two points. However, something that we have very healthily theorized about is worm holes. If worm holes exist, then you can travel through the worm hole to potentially travel less distance to get to the same point.
Think about it like a piece of paper. Of course, if you draw two points on opposite ends of the piece of paper, the least distance pathway is to draw a straight line connecting the two. What wormholes would do is what he describes as folding the piece of paper. So, if you fold the piece of paper so the points are closer, the least distance pathway would be using the worm hole instead of travelling along the piece of paper.
• The first point is already incorrect, since geodesics in GR are mostly not straight lines. The eye will perceive them as straight lines, but that's because our brain implicitly makes the assumption that light travels in straight lines. – Martin Mar 22 '16 at 14:47
• Also if you have a wormhole you can just draw a new straight line which is shorter so the statement still holds. – Jaywalker Mar 22 '16 at 15:29
• @Martin: your "geodesics in GR are mostly not straight lines" contradicts " Insofar as the term straight line has any meaning in curved spacetime it means a geodesic" here - this confuses me. – RedGrittyBrick Mar 22 '16 at 15:48
• @RedGrittyBrick: No, it doesn't. "Insofar as the term straight line has any meaning". That's just it - it rarely has any meaning. Hence geodesics are no straight lines. The problem here lies with the definition of "straight line". If you don't have any idea about non-Euclidean geometry, a straight line means a Euclidean straight line. The thing you draw on a flat piece of paper with a ruler. In non-Euclidean geometry, this is often not possible, so people sometimes might define "straight line" to refer to geodesics, i.e. shortest connections between two points. – Martin Mar 22 '16 at 16:00
• I mean, it's not possible to draw a straight line as in "that thing you draw with a ruler on a piece of paper" on a sphere. You'll have to draw great circles - and circles are definitely not the Euclidean version of "straight line". – Martin Mar 22 '16 at 16:04 | 1,165 | 4,784 | {"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-2019-18 | latest | en | 0.951595 |
https://stackoverflow.com/questions/47269390/how-to-find-first-non-zero-value-in-every-column-of-a-numpy-array/47269413 | 1,709,153,116,000,000,000 | text/html | crawl-data/CC-MAIN-2024-10/segments/1707947474744.31/warc/CC-MAIN-20240228175828-20240228205828-00055.warc.gz | 546,975,375 | 44,801 | # How to find first non-zero value in every column of a numpy array?
Suppose I have a numpy array of the form:
``````arr=numpy.array([[1,1,0],[1,1,0],[0,0,1],[0,0,0]])
``````
I want to find the indices of the first index (for every column) where the value is non-zero.
So in this instance, I would like the following to be returned:
``````[0,0,2]
``````
### Indices of first occurrences
Use `np.argmax` along that axis (zeroth axis for columns here) on the mask of non-zeros to get the indices of first `matches` (True values) -
``````(arr!=0).argmax(axis=0)
``````
Extending to cover generic axis specifier and for cases where no non-zeros are found along that axis for an element, we would have an implementation like so -
``````def first_nonzero(arr, axis, invalid_val=-1):
``````
Note that since `argmax()` on all `False` values returns `0`, so if the `invalid_val` needed is `0`, we would have the final output directly with `mask.argmax(axis=axis)`.
Sample runs -
``````In [296]: arr # Different from given sample for variety
Out[296]:
array([[1, 0, 0],
[1, 1, 0],
[0, 1, 0],
[0, 0, 0]])
In [297]: first_nonzero(arr, axis=0, invalid_val=-1)
Out[297]: array([ 0, 1, -1])
In [298]: first_nonzero(arr, axis=1, invalid_val=-1)
Out[298]: array([ 0, 0, 1, -1])
``````
Extending to cover all comparison operations
To find the first `zeros`, simply use `arr==0` as `mask` for use in the function. For first ones equal to a certain value `val`, use `arr == val` and so on for all cases of `comparisons` possible here.
### Indices of last occurrences
To find the last ones matching a certain comparison criteria, we need to flip along that axis and use the same idea of using `argmax` and then compensate for the flipping by offsetting from the axis length, as shown below -
``````def last_nonzero(arr, axis, invalid_val=-1):
val = arr.shape[axis] - np.flip(mask, axis=axis).argmax(axis=axis) - 1
return np.where(mask.any(axis=axis), val, invalid_val)
``````
Sample runs -
``````In [320]: arr
Out[320]:
array([[1, 0, 0],
[1, 1, 0],
[0, 1, 0],
[0, 0, 0]])
In [321]: last_nonzero(arr, axis=0, invalid_val=-1)
Out[321]: array([ 1, 2, -1])
In [322]: last_nonzero(arr, axis=1, invalid_val=-1)
Out[322]: array([ 0, 1, 1, -1])
``````
Again, all cases of `comparisons` possible here are covered by using the corresponding comparator to get `mask` and then using within the listed function.
• Even after all first nonzero values are found, `argmax` still keeps looking unnecessarily through the rest of the array (which might be huge), assuming that larger values might be found there (not knowing that `mask` doesn't have larger values than `1`). Can this be avoided easily, without "manually" implementing slab-wise processing?
– root
Dec 22, 2021 at 0:43
• @root I had the same question. Turns out they've been discussing this since 2012 and haven't agreed on a simple solution yet!
– Bill
Feb 6, 2022 at 2:44
• That should be "a certain comparison criterion". Nov 24, 2022 at 12:31
The problem, apparently 2D, can be solved by applying to the each row a function that finds the first non-zero element (exactly as in the question).
``````arr = np.array([[1,1,0],[1,1,0],[0,0,1],[0,0,0]])
def first_nonzero_index(array):
"""Return the index of the first non-zero element of array. If all elements are zero, return -1."""
fnzi = -1 # first non-zero index
indices = np.flatnonzero(array)
if (len(indices) > 0):
fnzi = indices[0]
return fnzi
np.apply_along_axis(first_nonzero_index, axis=1, arr=arr)
# result
array([ 0, 0, 2, -1])
``````
Explanation
The np.flatnonzero(array) method (as suggested in the comments by Henrik Koberg) returns "indices that are non-zero in the flattened version of array". The function calculates these indices and returns the first (or -1 if all elements are zero).
The apply_along_axis applys a function to 1-D slices along the given axis. Here since the axis is 1, the function is applied to the rows.
If we can assume that all rows of the input array contain at leas one non-zero element, the solution can be written calculated in one line:
``````np.apply_along_axis(lambda a: np.flatnonzero(a)[0], axis=1, arr=arr)
``````
Possible variations
• If we were interested in the last non-zero element, that could be obrained by changing indices[0] into indices[-1] in the function.
• To get the first non-zero by row, we would change axes=1 into axis=0 in np.apply_along_axis
Here is an alternative using `numpy.argwhere` which returns the index of the non zero elements of an array:
``````array = np.array([0,0,0,1,2,3,0,0])
nonzero_indx = np.argwhere(array).squeeze()
start, end = (nonzero_indx[0], nonzero_indx[-1])
print(array[start], array[end])
``````
gives:
``````1 3
``````
• Nice solution! The name `argwhere` is pretty unintuitive. Dec 10, 2021 at 20:21
• I am not sure how this answer applies to the question which concerns a two-dimensional array. Also, here you could just use `flatnonzero(array)` instead of `argwhere(array).squeeze()` Feb 1, 2022 at 7:09
• Thanks Henrik, I did non know the flatnonzero() method, I will complete this answer with it. Concerning the dimensionality of the problem: The array is indeed 2D but the asked problem is 1D: "find the first non-zero element in each row". This means the 1D solution could be applied to each row and to obtain the 2D solution Feb 1, 2022 at 8:36
• Agreed, Marco. Just one last remark: While this solution works well for smaller arrays, it will perform poorly for larger ones. This is because `apply_along_axis` is a non-vectorized convenience function. In this case, I would rather go with the accepted answer. Feb 2, 2022 at 14:40
• I absolutely agree with you on this Feb 2, 2022 at 17:17 | 1,656 | 5,732 | {"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-2024-10 | latest | en | 0.742054 |
https://www.opengl.org/discussion_boards/archive/index.php/t-144760.html | 1,537,633,811,000,000,000 | text/html | crawl-data/CC-MAIN-2018-39/segments/1537267158609.70/warc/CC-MAIN-20180922162437-20180922182837-00514.warc.gz | 818,455,353 | 5,711 | PDA
View Full Version : Blending Mode
bobGL
07-19-2007, 07:50 PM
I would like to reproduce the following Blend Mode from Photoshop, how can I do it?
Darken, Multiply, Overlay
Korval
07-19-2007, 08:50 PM
What do these operations do?
k_szczech
07-19-2007, 10:25 PM
Blend mode works in the following way:
sourceColor * sourceFactor + destinationClor * destinationFactor.
To implement multiply you should set:
sourceFactor = GL_DST_COLOR, destinationFactr = GL_ZERO
I don't know exact maths behind darken and overlay.
sqrt[-1]
07-20-2007, 12:16 AM
To do some of the more complicated blending you will need to do some fancy shader work with a copy of the scene as a lookup texture.
The math is:
multiply a * b
screen 1 - (1 - a) * (1 - b)
darken min(a, b)
lighten max(a, b)
difference abs(a - b)
negation 1 - abs(1 - a - b)
exclusion a + b - 2 * a * b
overlay a < .5 ? (2 * a * b) : (1 - 2 * (1 - a) * (1 - b))
hard light b < .5 ? (2 * a * b) : (1 - 2 * (1 - a) * (1 - b))
soft light b < .5 ? (2 * a * b + a * a * (1 - 2 * b)) : (sqrt(a) * (2 * b - 1) + (2 * a) * (1 - b))
dodge a / (1 - b)
burn 1 - (1 - a) / bThis comes from:
http://www.blackpawn.com/blog/?p=94
http://www.pegtop.net/delphi/articles/blendmodes/
remdul
07-20-2007, 05:38 AM
If you have trouble understanding how the blending functions work, this program may help:
http://home.planet.nl/~buijs512/_temp/blendfunc.zip
(Note: The BlendEquation stuff doesn't work, I never found out what it does.)
I never understood why OpenGL supports relatively few blend modes. Is there a technical reason for this?
bobGL
07-20-2007, 06:59 AM
tks alot sqrt[-1],
now after some digs, I can't figure out how to implement theses equations... whithout having to pass by a shader...
Any other suggestion?
k_szczech
07-20-2007, 08:31 AM
You need to use shader as described by sqrt[-1].
There is no other way for complex per-pixel math (unless you want to do it on CPU).
Korval
07-20-2007, 11:08 AM
I never understood why OpenGL supports relatively few blend modes. Is there a technical reason for this?It supports plenty of blending modes. In GL 2.1, there are 4 basic blending functions (add, subtract, min & max), with blend parameters. Parameters can be separated between RGB and A, and there's even an extension to separate the entire blend function between RGB and A.
What it doesn't have is arbitrary computation in the blend stage. There are whispers that this will eventually be opened up in the future.
sqrt[-1]
07-20-2007, 05:10 PM
Well you can do Darken and Multiply with standard OpenGL.
Overlay is the only one that requires a shader.
Multiply(as described above) = sourceFactor = GL_DST_COLOR, destinationFactr = GL_ZERO, blendEquation = GL_FUNC_ADD (default)
Darken = sourceFactor = GL_ONE, destinationFactr = GL_ONE, blendEquation = GL_FUNC_MIN
bobGL
07-21-2007, 06:42 AM
I have to admit that you blow me away sqrt[-1] with theses equations... ;) and now Im think about using them all (except overlay because of what you mention above). So for the others do you have the source, dest. and blendequation?
Cheers!
sqrt[-1]
07-21-2007, 03:47 PM
The only other obvious ones you can without a shader are lighten and difference
lighten = sourceFactor = GL_ONE, destinationFactr = GL_ONE, blendEquation = GL_FUNC_MAX
difference = sourceFactor = GL_ONE, destinationFactr = GL_ONE, blendEquation = GL_FUNC_SUBTRACT
The modes screen and negation might be possible with simple combiners and multiple passes, but the rest really need a shader/CPU manual processing.
bobGL
07-22-2007, 06:32 PM
allright, what else? ;)
knackered
07-23-2007, 04:16 PM
in other words, give him the exact code he can paste into his app.
bobGL
07-30-2007, 05:16 PM
knackered... you got it ;)
Korval
07-30-2007, 05:29 PM
knackered... you got itUm, I don't think you took that the way he meant it. I'm fairly certain he meant it as a form of derision for someone who was unwilling/unable to convert the English description into acceptable code.
And while I don't exactly agree with the way he expressed it, I have to agree with the derision itself. You're a programmer; your "job" is to covert that into actual code. | 1,209 | 4,171 | {"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-2018-39 | latest | en | 0.765258 |
http://www.machinedesign.com/archive/microstepping-myths | 1,496,043,577,000,000,000 | text/html | crawl-data/CC-MAIN-2017-22/segments/1495463612036.99/warc/CC-MAIN-20170529072631-20170529092631-00092.warc.gz | 715,700,097 | 18,430 | Machine Design
# Microstepping myths
The lure of microstepping a stepper motor for precision must be tempered by torque considerations.
The graph shows that at 16 microsteps/full step, the incremental torque for one microstep is less than 10% of the full-step holding torque.
George Beauchemin
MicroMo Electronics Inc.
Clearwater, Fla.
www.micromo.com
The lure of microstepping a two-phase stepper motor is compelling. For instance, microstepping a 1.8° hybrid stepper motor with 256 microsteps per full step would yield 51,200 steps/revolution.
Sounds great. But there's a catch. The real compromise is that as you increase the number of microsteps per full step, the incremental torque per microstep drops off drastically. Resolution increases but accuracy actually suffers.
Few if any stepper motors have a pure sinusoidal torque vs. shaft position curve and all have higher-order harmonics that distort the curve and affect accuracy. And even though microstepping drives have come a long way, they still only approximate a true sine wave. Significant too is that any load torque will result in a magnetic backlash, displacing the rotor from the intended position until sufficient torque is generated.
The expression for incremental torque for a single microstep is
TINC = THFS X sin(90/µPFS)
and the incremental torque for N microsteps is
TN = THFS X sin((903N)/µPFS)
where TINC = incremental torque/microstep in oz-in., µPFS = the number of microsteps/full step, N = the number of microsteps taken, THFS = the holding torque, full step, oz-in., and TN = the incremental torque for N microsteps in oz-in.
The consequence is that if the load torque plus motor friction and detent torque exceeds the incremental torque of a microstep, successive microsteps will have to be realized until the accumulated torque exceeds the load torque plus the motor friction and detent torque. Simply stated, taking a microstep does not mean the motor will actually move. And reversing direction can require a large number of microsteps to get the motor to move.
But what if the motor is not loaded, as in some type of pointing or inertial positioning? The motor still has friction torque from its bearings. It also has a detent torque, in addition to other harmonic distortions. You'll have to wind up enough incremental torque to overcome the bearing friction. Even more disruptive than the bearing friction is the detent torque, which is typically 5 to 20% of the holding torque. Sometimes the detent torque adds to the overall torque generation. Sometimes it subtracts from the power torque generation. In any case, it wreaks havoc with overall accuracy.
Some manufacturers fabricate microstepping versions of their motors. Their aim typically is to reduce the detent torque, usually at the expense of holding torque, so the torque-versus-rotor position is closer to a sine wave. They also hope to improve linearity of torque versus current. These efforts reduce but do not eliminate the compromises associated with microstepping in regards to accuracy.
Using a lookup table to correct for the inaccuracies in the motor and microstepping drive also doesn't solve the problem. If the load torque changes from when the lookup table was made, the results can be worse than if you had not used a calibrated table at all.
Then why microstep? There are still compelling reasons other than high resolution for microstepping. They include reducing mechanical noise, gentler mechanical actuation, and reducing resonance problems. Although microstepping gives designers more resolution it doesn't always improve accuracy. Reduction in mechanical and electromagnetically induced noise is, however, a real benefit. The mechanical transmission of torque will also be much gentler as will a reduction in resonance problems. This gives better confidence in maintaining synchronization of the open-loop system and less wear and tear on the mechanical transmission system.
In fact, taking an infinite number of microsteps per full step results in two-phase synchronous ac motor operation, with speed a function of the frequency of the ac power supply. The rotor will lag behind the rotating magnetic field until sufficient torque is generated to accommodate the load.
### Incremental torque/microstep as the number of microsteps/full step increases
Microsteps/
full step
% holding
torque/microstep
1 100.00%
2 70.71%
4 38.27%
8 19.51%
16 9.80%
32 4.91%
64 2.45%
128 1.23%
256 0.61%
The table shows the significant impact of the incremental torque/microstep as a function of the number of microsteps/full step. | 976 | 4,601 | {"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.840918 |
https://www.qats.com/cms/2018/07/17/technical-note-effect-of-vacuum-and-fill-ratio-on-performance-of-heat-pipes/ | 1,726,385,686,000,000,000 | text/html | crawl-data/CC-MAIN-2024-38/segments/1725700651616.56/warc/CC-MAIN-20240915052902-20240915082902-00048.warc.gz | 885,204,187 | 16,284 | # Technical Note: Effect of Vacuum and Fill Ratio on Performance of Heat Pipes
(This article was featured in an issue of Qpedia Thermal e-Magazine, an online publication dedicated to the thermal management of electronics. To get the current issue or to look through the archives, visit http://www.qats.com/Qpedia-Thermal-eMagazine.)
The discussion generally arises as to what would be the heat pipe performance as a function of liquid fill ratio and vacuum. Before we show some results, let’s see how a heat pipe works. The thermodynamic cycle of a heat pipe is shown in figure 1 in a T-S diagram. [1]
Fig. 1 – Thermodynamic cycle of a heat pipe. [1]
Liquid at state 1 enters the evaporator and after absorbing the heat vaporizes to a mixture at 2 or to a saturated vapor at 2’. This vapor travels through the length of the heat pipe and enters the condenser at state 3. This vapor after losing its heat in the condenser exits at state 4 which is saturated liquid and upon travelling through the wick loses its temperature until it reaches point 1, which the cycle begins. If one looks at the phase diagram for a liquid, for example water in figure 2, it is apparent that the state of the liquid should be very close to the liquid vapor line in order for the liquid to promptly changes phase from liquid to gas upon heating. The triple point of water is at 4.58 Torr at temperature of 0.0075℃.
Fig. 2 – Phase diagram of water.
The state of liquid pressure should be in the region below atmosphere (vacuum) and above the complete vacuum. To obtain lower operating temperature the heat pipe pressure should be decrease and vice versa. The state of liquid after the condenser has to be saturated liquid, so the wick can create the liquid motion.
Lin, et al. [2] have shown that maximum heat transfer in a heat pipe is an exponential function of vacuum pressure according to the following formula:
Where,
Qmax,0 = maximum heat transfer at 0 pressure (no condensable gas)
PNCG = pressure of the non-condensable gas
∆Pcg = pressure drop difference between capillary and gravity
This equation clearly shows that by decreasing vacuum pressure, Qmax increases.
Another important factor is the amount of liquid in the heat pipe which is commonly called the fill ratio or inventory. If there is too much liquid, evaporation will not happen or delayed, and if there is not enough liquid, the dry out condition will happen. The rule of thumb is the volume of the liquid should be higher than the volume of the pore volume of the wick.
Figure 3 shows that as the pressure decreases from 10 Torr to 1 Torr the Qmax increases. The graph also shows that as the inventory (fill ratio) increases from 0.7 ml to 1.1 ml, Qmax peaks at 0.8 ml. This corresponds to a fill ratio of 26.4%, which is the ratio of the liquid volume to total volume of the heat pipe when it is empty. This graph shows the importance of fill ratio. If the fill ratio is not optimized as is shown for example for 1 Torr, Qmax drops from 8 W to 4 W, a 50% drop that can be catastrophic for the application. Mozumder et al. [3], in their experiment, measured the thermal resistance of a heat pipe for different fill ratios and power.
Fig. 3 – Qmax as a function of vacuum pressure and fill ratio for a heat pipe. [2]
Figure 4 shows that as the fill ratio increases from dry run to 85% (in their experiment fill ratio is defined as the volume of liquid to the volume of the evaporator section), thermal resistance decreases, but then increase with further increase of fill ratio.
Fig. 4 – Heat pipe thermal resistance as a function of fill ratio. [3]
The aforementioned arguments demonstrate that the fill ratio and vacuum pressure are very important in the proper design of a heat pipe. There is not much data in the literature about the effect of these two factors on the performance of the heat pipe. And it appears that most heat pipe manufacturers either resort to a try and error procedure or use the information from past experience. This topic needs further research.
Advanced Thermal Solutions, Inc. (ATS) is an industry-leader in heat pipe technology and has recently expanded its offering of high-performance, off-the-shelf heat pipes to provide the broadest selection on the market. Use the heat pipe selection tool to find the right fit for your project and avoid the cost and time for custom solutions. Learn more at https://qats.com/Products/Heat-Pipes.
References
1. Ong, S., “Heat Pipes”, Jurutera, April 2008.
2. Lin, W., Chao, C., Calvin, Y., Hsu, G., Chou, S., “Effect of vacuum pressure and the Working Fluid Inventory to the Maximum Heat Loading (Qmax) of the Heat Pipe”, 10th IHPS, Taipei, Taiwan, Nov. 6-9, 2011.
3. Mozumder, A., Akon, A., Chowdhury, M. Banik, S., “Performance of Heat Pipe with Different Working Fluids and Fill Ratios”, Journal of Mechanical Engineering, Vol. ME 41, No. 2 December 2010.
For more information about Advanced Thermal Solutions, Inc. (ATS) thermal management consulting and design services, visit https://www.qats.com/consulting or contact ATS at 781.769.2800 or ats-hq@qats.com. | 1,186 | 5,104 | {"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.671875 | 4 | CC-MAIN-2024-38 | latest | en | 0.893096 |
http://www.ee.ic.ac.uk/hp/staff/dmb/matrix/special.html | 1,620,759,479,000,000,000 | text/html | crawl-data/CC-MAIN-2021-21/segments/1620243989856.11/warc/CC-MAIN-20210511184216-20210511214216-00573.warc.gz | 68,582,820 | 25,992 | # Special Matrices
Go to: Introduction, Notation, Index
### Antisymmetric
see skew-symmetric .
### Bidiagonal
A is upper bidiagonal if a(i,j)=0 unless i=j or i=j-1.
A is lower bidiagonal if a(i,j)=0 unless i=j or i=j+1
A bidiagonal matrix is also tridiagonal, triangular and Hessenberg.
### Bisymmetric
A[n#n] is bisymmetric if it is symmetric about both main diagonals, i.e. if A=AT=JAJ where J is the exchange matrix.
WARNING: The term persymmetric is sometimes used instead of bisymmetric. Also bisymmetric is sometimes used to mean centrosymmetric and sometimes to mean symmetric and perskewsymmetric.
• A bisymmetric matrix is symmetric, persymmetric and centrosymmetric. Any two of these four properties properties implies the other two.
• More generally, symmetry, persymmetry and centrosymmetry can each come in four flavours: symmetric, skew-symmetric, hermitian and skew-hermitian. Any pair of symmetries implies the third and the total number of skew and hermitian flavourings will be even. For example, if A is skew-hermitian and perskew-symmetric, then it will also be centrohermitian.
• If A[2m#2m] is bisymmetric
• A=[S PT; P JSJ] for some symmetric S[m#m] and persymmetric P[m#m].
• A is orthogonally similar to [S-JP 0; 0 S+JP]
• A has a set of 2m orthonormal eigenvectors consisting of m skew-symmetric vectors of the form [u; -Ju]/k and m symmetric vectors of the form [v; Jv]/k where u and v are eigenvectors of S-JP and S+JP respectively and k=sqrt(2).
• If A has distinct eigenvalues and rank(P)=1 then if the eigenvalues are arranged in descending order, the corresponding eigenvectors will be alternately symmetric and skew-symmetric with the first one being symmetric or skew-symmetric according to whether the non-zero eigenvalue of P is positive or negative.
• If A[2m+1#2m+1] is bisymmetric
• A=[S x PT; xT y xTJ; P Jx JSJ] for some symmetric S[m#m] and persymmetric P[m#m].
• A is orthogonally similar to [S-JP 0; 0 y kxT; 0 kx S+JP] where k=sqrt(2).
• A has a set of 2m+1 orthonormal eigenvectors consisting of m skew-symmetric vectors of the form [u; 0; -Ju]/k and m+1 symmetric vectors of the form [v; kw; Jv]/k where u and [v; w] are eigenvectors of S-JP and [S+JP kx; kxT y] respectively and k=sqrt(2).
• If A has distinct eigenvalues and P=0 then if the eigenvalues are arranged in descending order, the corresponding eigenvectors will be alternately symmetric and skew-symmetric with the first one being symmetric.
### Block Diagonal
A is block diagonal if it has the form [A 0 ... 0; 0 B ... 0;...;0 0 ... Z] where A, B, ..., Z are matrices (not necessarily square).
• A matrix is block diagonal iff is the direct sum of two or more smaller matrices.
### Centrohermitian
A[m#n] is centrohermitian if it is rotationally hermitian symmetric about its centre, i.e. if AT=JAHJ where J is the exchange matrix.
• Centrohermitian matrices are closed under addition, multiplication and (if non-singular) inversion.
### Centrosymmetric
A[m#n] is centrosymmetric (also called perplectic) if it is rotationally symmetric about its centre, i.e. if A=JAJ where J is the exchange matrix. It is centrohermitian if AT=JAHJ and centroskew-symmetric if A= -JAJ.
• Centrosymmetric matrices are closed under addition, multiplication and (if non-singular) inversion.
### Circulant
A circulant matrix, A[n#n], is a Toeplitz matrix in which ai,j is a function of {(i-j) modulo n}. In other words each column of A is equal to the previous column rotated downwards by one element.
WARNING: The term circular is sometimes used instead of circulant.
• Circulant matrices are closed under addition, multiplication and (if non-singular) inversion.
• A circulant matrix, A[n#n] , may be expressed uniquely as a polynomial in C, the cyclic permutation matrix, as A = Sumi=0:n-1{ ai,1 Ci} = Sumi=0:n-1{ a1,i C-i}
• All circulant matrices have the same eigenvectors. If A[n#n] is a circulant matrix, the normalized eigenvectors of A are the columns of n F., the discrete Fourier Transform matrix. The corresponding eigenvalues are the discrete fourier transform of the first row of A given by FATe1 = (FACe1)C = nF-1Ae1 where e1 is the first comlumn of I.
• F-1AF = n-1 FHAF=DIAG(FATe1)
### Circular
A Circular matrix, A[n#n], is one for which AAC = I.
WARNING: The term circular is sometimes used for a circulant matrix.
• A matrix A is circular iff A=exp (j B) where j = sqrt(-1), B is real and exp() is the matrix exponential function.
• If A = B + jC where B and C are real and j = sqrt(-1) then A is circular iff BC=CB and also BB + CC = I.
### Companion Matrix
If p(x) is a polynomial of the form a(0) + a(1)*x + a(2)*x2 + ... + a(n)*xn then the polynomial's companion matrix is n#n and equals [0 I; -a(0:n-1)/a(n)] where I is n-1#n-1. For n=1, the companion matrix is [-a(0)/a(1)].
The rows and columns are sometimes given in reverse order [-a(n-1:0)/a(n) ; I 0].
• The characteristic and minimal polynomials of a companion matrix both equal p(x).
• The eigenvalues of a companion matrix equal the roots of p(x).
### Complex
A matrix is complex if it has complex elements.
#### Complex to Real Isomporphism
We can associate a complex matrix C[m#n] with a corresponding real matrix R[2m#2n] by replacing each complex element, z, of C by a 2#2 real matrix [zR -zI; zI zR]=|z|×[cos(t) -sin(t); sin(t) cos(t)] where t=arg(z). We will write C <=> R for this mapping below.
• This mapping preserves the operations +,-,*,/ and, for square matrices, inversion. It does not however preserve • (Hadamard) or ⊗ (Kronecker) products.
• If C <=> R
• R = C ⊗ [()R -()I; ()I ()R] where the operators ()R and ()I take the real and imaginary parts respectively.
• C = (I[m#m] ⊗ [1 j]) R (I[n#n] ⊗ [1; 0]) = (I ⊗ [1 0]) R (I ⊗ [1; -j])=½(I ⊗ [1 j]) R (I ⊗ [1; -j]) where j=sqrt(-1).
• CR = (I[m#m] ⊗ [1 0]) R (I[n#n] ⊗ [1; 0]) = (I[m#m] ⊗ [0 1]) R (I[n#n] ⊗ [0; 1])
• det(R)=|det(C)|2
• tr(R)=2 tr(C)
• R is orthogonal iff C is unitary.
• R is symmetric iff C is hermitian.
• R is positive definite symmetric iff C is positive definite hermitian.
Vector mapping
: Under the isomorphism a complex vector maps to a real matrix: z[n] <=> Y[2n#2]. We can also define a simpler mapping, <->, from a vector to a vector as z[n] <-> x[2n] = z ⊗ [()R; ()I] = Y [1; 0]
In the results below, we assume z[n] <-> x[2n]w[n] <-> u[2n] and C <=> R:
• If wHCz is known to be real, then wHCz = uTRx
• If C is hermitian, then, zHCz = xTRx
• zHz = xTx
To relate the martrix and vector mappings, <-> and <=>, we define the following two block-diagonal matrices: E = I[n#n] ⊗ [0 1; 1 0] and N = I[n#n] ⊗ [1 0; 0 -1]. We now have the following properties (assuming z[n] <-> x[2n] and C <=> R):
• E2=N2=I
• ET=E, NT=N
• EN=-NE
• ENEN=NENE=-I
• xTENx=xTNEx=0
• ENRNE = NEREN = R
• RNE = NER
• REN = ENR
• ENREN = NERNE = -R
• CH <=> RT
• CT <=> NRTN
• CC <=> NRN
• jC <=> ENR = REN = -NER = -RNE
• z <-> x and z <=> [x ENx]
• zC <-> Nx and zC<=> [Nx Ex]
• zH <-> xT and zH <=> YT = [xT; xTNE]
• zT <-> xTN and zT <=> [xTN; xTE]
### Convergent
A matrix A is convergent if Ak tends to 0 as k tends to infinity.
• A is convergent iff all its eigenvalues have modulus < 1.
• A is convergent iff there exists a positive definite X such that X-AHXA is positive definite (Stein's theorem)
• If Sk is defined as I+A+A2+ … +Ak, then A is convergent iff Sk converges as k tends to infinity. If it does converge its limit is (I-A)-1.
### Cyclic Permutation Matrix
The n#n cyclic permutation matrix (or cyclic shift matrix), C, is equal to [0n-1T 1; In-1#n-1 0n-1]. Its elements are given by ci,j = δi,1+(j mod n) where δi,j is the Kronecker delta.
• C is a toeplitz, circulant, permutation matrix.
• Cx is the same as x but with the last element moved to the top and all other elements shifted down by one position.
• C-1 = CT = Cn-1
• CnI
### Decomposable
A matrix, A, is fully decomposable (or reducible) if there exists a permutation matrix P such that PTAP is of the form [B C; 0 D] where B and D are square.
A matrix, A, is partly-decomposable if there exist permutation matrices P and Q such that PTAQ is of the form [B C; 0 D] where B and D are square.
A matrix that is not even partly-decomposable is fully-indecomposable.
### Defective[!]
A matrix, X:n#n, is defective if it does not have n linearly independent eigenvectors, otherwise it is simple.
### Derogatory
An n*n square matrix is derogatory if its minimal polynomial is of lower order than n.
### Diagonal
A is diagonal if a(i,j)=0 unless i=j.
• Diagonal matrices are closed under addition, multiplication and (where possible) inversion.
• The determinant of a square diagonal matrix is the product of its diagonal elements.
• If D is diagonal, DA multiplies each row of A by a constant while BD multiplies each column of B by a constant.
• If D is diagonal then XDXT = sumi(di × xixiT) and XDXH = sumi(di × xixiH) [1.15]
• If D is diagonal then tr(XDXT) = sumi(di × xiTxi) and tr(XDXH) = sumi(di × xiHxi) = sumi(di × |xi|2) [1.16]
• If D is diagonal then AD = DA iff ai,j=0 whenever di,i != dj,j. [1.12]
• If D = DIAG(c1I1, c2I2, ..., cMIM) where the ck are distinct scalars and the Ik are identity matrices, then AD = DA iff A = DIAG(A1, A2, ..., AM) where each Ak is the same size as the corresponding Ik. [1.13]
The functions DIAG(x) and diag(X) respectively convert a vector into a diagonal matrix and the diagonal of a matrix into a vector. In the expression below, • denotes elementwise multiplication.
• diag(DIAG(x) = x
• xT(diag(Y)) = tr(DIAG(x)Y)
• DIAG(x) DIAG(y) = DIAG(x • y)
### Diagonalizable or Diagonable or Simple or Non-Defective
A matrix, X, is diagonalizable (or, equivalently, simple or diagonable or non-defective) if it is similar to a diagonal matrix otherwise it is defective.
• If X is diagonalizable, it may be written X=EDE-1 where D is a diagonal matrix of eigenvalues and the columns of E are the corresponding eigenvectors.
• [X, Y diagonalizable]: The diagonalizable matrices, X and Y, commute, i.e. XY=YX, iff they can be decomposed as X=EDE-1 and Y=EGE-1 where D and G diagonal and the columns of E for a common set of eigenvectors.
• The following are equivalent:
• X is diagonalizable
• The Jordan form of X is diagonal.
• For each eigenvalue of X, the geometric and algebraic multiplicities are equal.
• X has n linearly independent eigenvectors.
### Diagonally Dominant
A square matrix An#n is diagonally dominant if the absolute value of each diagonal element is greater than the sum of absolute values of the non-diagonal elements in its row. That is if for each i we have |ai,i| > sumj != i(|ai,j|) or equivalently abs(diag(A)) > ½ABS(A) 1n#1.
• [Real]: If the diagonal elements of a square matrix A are all >0 and if A and AT are both diagonally dominant then A is positive definite.
• If A is diagonally dominant and irreducible then
1. A is non singular
2. If diag(A) > 0 then all eigenvalues of A have strictly positive real parts.
### Discrete Fourier Transform
The discrete fourier transform matrix, F[n#n], has fp,q = exp(-2jπ(p-1) (q-1) n-1).
• Fx is the discrete fourier transform (DFT) of x.
• F is a symmetric, Vandermonde matrix.
• F-1 = n-1FH=n-1FC
• If y = Fx then yHy = n xHx. This is Parseval's theorem.
• F is a Vandermonde matrix.
• det(F) = n½n.
• tr(F) = 0.
• FCDIAG(Fe2) F where C is the cyclic permutation matrix and e2 is the second column of I.
• If A[n#n] is a circulant matrix, the normalized eigenvectors of A are the columns of n F. The corresponding eigenvalues are the discrete fourier transform of the first row of A given by FATe1 = (FACe1)C = nF-1Ae1 where e1 is the first column of I.
• [n=2k]: F[n#n] = GP where:
• P is a symmetric permutation matrix with P = prodr=1:k(Ek-r ⊗ [ Er-1 ⊗ [1 0] ; Er-1 ⊗ [0 1] ] ) where Es is a 2s#2s identity matrix and ⊗ denotes the Kroneker product. If x=0:n-1 then Px consists of the same numbers but arranged in bit-reversed order (e.g. for n=8, Px = [0; 4; 2; 6; 1; 5; 3; 7] ).
• G = prodr=1:k(Er-1 ⊗ [ [1 1] ⊗ Ek-r ; [1 -1] ⊗ Wk-r ]T) where the diagonal "twiddle factor" matrix is Ws = DIAG(exp(-2-s j pi (0:2s-1))).
• Calculation of Fx as GPx is the "decimation-in-time" FFT (Fast Fourier Transform) while Fx = FTx = PGTx is the "decimation-in-frequency" FFT. In each case only O(n log2n) non-trivial arithmetic operations are required because most of the non-zero elements of the factors of G are equal to ±1.
### Doubly-Stochastic
A real non-negative square matrix A is doubly-stochastic if its rows and columns all sum to 1.
See under stochastic for properties.
### Essential
An essential matrix, E, is the product E=US of a 3#3 orthogonal matrix, U, and a 3#3 skew-symmetric matrix, S = SKEW(s). In 3-D euclidean space, a translation+rotation transformation is associated with an essential matrix.
• If E=U SKEW(s) is an essential matrix then
• E=SKEW(Us) U
• ETE = (sTs) I - ssT
• EET = (sTs) I - UssTU
• tr(ETE) = tr(EET) = 2sTs
• If E is an essential matrix then so are ET, kE and WEV where k is a non-zero scalar and W and V are orthogonal.
• E is an essential matrix iff rank(E)=2 and EETE = ½tr(EET)E. This defines a set of nine homogeneous cubic equations.
• E is an essential matrix iff its singular values are k, k and 0 for some k>0.
• If the singular value decomposition of E is E = Q DIAG([k; k; 0]) RT, then we can write E = US where U=Q [0 1 0; -1 0 0; 0 0 1] RT and S = R [0 -k 0; k 0 0; 0 0 0] RT = SKEW(R [0; 0; k]).
• If E is an essential matrix then A = kE for some k iff Ex × Ax = 0 for all x where × denotes the vector cross product.
### Exchange
The exchange matrix J[n#n] is equal to [en en-1e2 e1] where ei is the ith column of I. It is equal to I but with the columns in reverse order.
• J is Hankel, Orthogonal, Symmetric, Permutation, Doubly Stochastic.
• J2 = I
• JAT, JAJ and ATJ are versions of the matrix A that have been rotated anti-clockwise by 90, 180 and 270 degrees
• JA, JATJ, AJ and AT are versions of the matrix A that have been reflected in lines at 0, 45, 90 and 135 degrees to the horizontal measured anti-clockwise.
• det(Jn#n) = (-1)n(n-1)/2 i.e. it equals +1 if n mod 4 equals 0 or 1 and -1 if n mod 4 equals 2 or 3
### Givens Reflection
[Real]: A Givens Reflection is an n#n matrix of the form PT[Q 0 ; 0 I]P where P is any permutation matrix and Q is a matrix of the form [cos(x) sin(x); sin(x) -cos(x)].
• A Givens reflection is symmetric and orthogonal.
• The determinant of a Givens reflection = -1.
• [2*2]: A 2#2 matrix is a Givens reflection iff it is a Householder matrix.
### Givens Rotation
[Real]: A Givens Rotation is an n#n matrix of the form PT[Q 0 ; 0 I]P where P is a permutation matrix and Q is a matrix of the form [cos(x) sin(x); -sin(x) cos(x)].
An n*n Hadamard matrix has orthogonal columns whose elements are all equal to +1 or -1.
• Hadamard matrices exist only for n=2 or n a multiple of 4.
• If A is an n*n Hadamard matrix then ATA = n*I. Thus A/sqrt(n) is orthogonal.
• If A is an n*n Hadamard matrix then det(A) = nn/2.
### Hamiltonian
A real 2n*2n matrix, A, is Hamiltonian if KA is symmetric where K = [0 I; -I 0].
### Hankel
A Hankel matrix has constant anti-diagonals. In other words a(i,j) depends only on (i+j).
• A Hankel matrix is symmetric.
• [A:Hankel] If J is the exchange matrix, then JAJ is Hankel; JA and AJ are Toepliz.
• [A:Hankel] A+B and A-B are Hankel.
### Hermitian
A square matrix A is Hermitian if A = AH, that is A(i,j)=conj(A(j,i))
For real matrices, Hermitian and symmetric are equivalent. Except where stated, the following properties apply to real symmetric matrices as well.
• [Complex]: A is Hermitian iff xHAx is real for all (complex) x.
• The following are equivalent
1. A is Hermitian and +ve semidefinite
2. A=BHB for some B
3. A=C2 for some Hermitian C.
• Any matrix A has a unique decomposition A = B + jC where B and C are Hermitian: B = (A+AH)/2 and C=(A-AH)/2j
• Hermitian matrices are closed under addition, multiplication by a scalar, raising to an integer power, and (if non-singular) inversion.
• Hermitian matrices are normal with real eigenvalues, that is A = UDUH for some unitary U and real diagonal D.
• A is Hermitian iff xHAy=xHAHy for all x and y.
• If A and B are hermitian then so are AB+BA and j(AB-BA) where j =sqrt(-1).
• For any complex a with |a|=1, there is a 1-to-1 correspondence between the unitary matrices, U, not having a as an eigenvalue and hermitian matrices, H, given by U=a(jH-I)(jH+I)-1 and H=j(U+aI)(U-aI)-1 where j =sqrt(-1). These are Caley's formulae.
• Taking a=-1 gives U=(I-jH)(I+jH)-1=(I+jH)-1(I-jH) and H=j(U-I)(U+I)-1=j(U+I)-1(U-I).
### Hessenberg
A Hessenberg matrix is like a triangular matrix except that the elements adjacent to the main diagonal can be non-zero.
A is upper Hessenberg if A(i,j)=0 whenever i>j+1. It is like an upper triangular matrix except for the elements immediately below the main diagonal.
A is lower Hessenberg if a(i,j)=0 whenever i<j-1. It is like a lower triangular matrix except for the elements immediately above the main diagonal.
### Hilbert
A Hilbert matrix is a square Hankel matrix with elements a(i,j)=1/(i+j-1).
### Homogeneous
If we define an equivalence relation in which X ~ Y iff X = cY for some non-zero scalar c, then the equivalence classes are called homogeneous matrices and homogeneous vectors.
• Multiplication: If X ~ A and Y ~ B, then XY ~ AB
• Addition: If X ~ A and Y ~ B then it is not generally true that X+Y ~ A+B
• The projective space RPn, consists of all non-zero homogeneous vectors from Rn+1.
### Householder
A Householder matrix (also called Householder reflection or transformation) is a matrix of the form (I-2vvH) for some vector v with ||v||=1.
Multiplying a vector by a Householder transformation reflects it in the hyperplane that is orthogonal to v.
Householder matrices are important because they can be chosen to annihilate any contiguous block of elements in any chosen vector.
• A Householder matrix is symmetric and orthogonal.
• Given a vector x, we can choose a Householder matrix P such that Px=[-k 0 0 ... 0]H where k=sgn(x(1))*||x||. To do so, we choose v = (x + ke1)/||x + ke1|| where e1 is the first column of the identity matrix. The first row of P equals -k-1xT and the remaining rows form an orthonormal basis for the null space of xT.
• [2*2]: A 2*2 matrix is Householder iff it is a Givens Reflection.
### Hypercompanion
The hypercompanion matrix of the polynomial p(x)=(x-a)n is an n#n upper bidiagonal matrix, H, that is zero except for the value a along the main diagonal and the value 1 on the diagonal immediately above it. That is, hi,j = a if j=i, 1 if j=i+1 and 0 otherwise.
If the real polynomial p(x)=(x2-ax-b)n with a2+4b<0 (i.e. the quadratic term has no real factors) then its Real hypercompanion matrix is a 2n#2n tridiagonal matrix that is zero except for a at even positions along the main diagonal, b at odd positions along the sub-diagonal and 1 at all positions along the super-diagonal. Thus for odd ihi,j = 1 if j=i+1 and 0 otherwise while for even ihi,j = 1 if j=i+1, a if j=i and b if j=i-1.
### Idempotent[!]
P matrix P is idempotent if P2 = P . An idempotent matrix that is also hermitian is called a projection matrix.
WARNING: Some people call any idempotent matrix a projection matrix and call it an orthogonal projection matrix if it is also hermitian.
• The following conditions are equivalent
1. P is idempotent
2. P is similar to a diagonal matrix each of whose diagonal elements equals 0 or 1.
3. 2P-I is involutary.
• If P is idempotent, then:
• rank(P)=tr(P).
• The eigenvalues of P are all either 0 or 1. The geometric multiplicity of the eigenvalue 1 is rank(P).
• PH, I-P and I-PH are all idempotent.
• P(I-P) = (I-P)P = 0.
• Px=x iff x lies in the range of P.
• The null space of P equals the range of I-P. In other words Px=0 iff x lies in the range of I-P.
• P is its own generalized inverse, P#.
• [A: n#n, F,G: n#r] If A=FGH where F and G are of full rank, then A is idempotent iff GHF = I.
### Identity[!]
The identity matrix , I, has a(i,i)=1 for all i and a(i,j)=0 for all i !=j
### Impotent
A non-negative matrix T is impotent if min(diag(Tn)) = 0 for all integers n>0 [see potency].
### Incidence
An incidence matrix is one whose elements all equal 1 or 0.
### Integral
An Integral matrix is one whose elements are all integers.
### Involutary (also written Involutory)
An Involutary matrix is one whose square equals the identity.
• A is involutary iff ½(A+I) is idempotent.
• A[2#2] is involutary iff A = +-I or else A = [a b; (1-a2)/b -a] for some real or complex a and b.
### Irreducible
see under Reducible
### Jacobi
see under Tridiagonal
### Monotone
A matrix, A, is monotone iff A-1 is non-negative, i.e. all its entries are >=0.
In computer science a matrix is monotone if its entries are monotonically non-decreasing as you move away from the main diagonal along either a row or column.
### Nilpotent[!]
A matrix A is nilpotent to index k if Ak = 0 but Ak-1 != 0.
• The determinant of a nilpotent matrix is 0.
• The eigenvalues of a nilpotent matrix are all 0.
• If A is nilpotent to index k, its minimal polynomial is tk.
### Non-negative
see under positive
### Normal
A square matrix A is normal if AHA = AAH
• An#n is normal iff any of the following equivalent conditions is true
• The following types of matrix are normal: diagonal, hermitian, skew-hermitian and unitary.
• A normal matrix is hermitian iff its eigenvalues are all real.
• A normal matrix is skew-hermitian iff its eigenvalues all have zero real parts.
• A normal matrix is unitary iff its eigenvalues all have an absolute value of 1.
• For any Xm#n, XHX and XXH are normal.
• The singular values of a normal matrix are the absolute values of the eigenvalues.
• [A: normal] The eigenvalues of AH are the conjugates of the eigenvalues of A and have the same eigenvectors.
• Normal matrices are closed under raising to an integer power and (if non-singular) inversion.
• If A and B are normal and AB=BA then AB is normal.
### Orthogonal[!]
A real square matrix Q is orthogonal if Q'Q = I. It is a proper orthogonal matrix if det(Q)=1 and an improper orthogonal matrix if det(Q)=-1.
For real matrices, orthogonal and unitary mean the same thing. Most properties are listed under unitary.
Geometrically: Orthogonal matrices in 2 and 3 dimensions correspond to rotations and reflections.
• The determinant of an orthogonal matrix equals +-1 according to whether it is proper or improper.
• Q is a proper orthogonal matrix iff Q = exp(K) or K=ln(Q) for some real skew-symmetric K.
• A 2#2 orthogonal matrix is either a Givens rotation or a Givens reflection according to whether it is proper or improper.
• A 3#3 orthogonal matrix is either a rotation matrix or else a rotation matrix plus a reflection in the plane of the rotation according to whether it is proper or improper.
• For a=+1 or a=-1, there is a 1-to-1 correspondence between real skew-symmetric matrices, K, and orthogonal matrices, Q, not having a as an eigenvalue given by Q=a(K-I)(K+I)-1 and K=(aI+Q)(aI-Q)-1. These are Caley's formulae.
• For a=-1 this gives Q=(I-K)(I+K)-1 and K=(I-Q)(I+Q)-1. Note that (I+K) is always non-singular.
### Permutation
A square matrix P is a permutation matrix if its columns are a permutation of the columns of I.
• A permutation matrix is orthogonal and doubly stochastic.
• The set of permutation matrices is closed under multiplication and inversion.1
• If P is a permutation matrix:
• P is a permutation matrix iff each row and each column contains a single 1 with all other elements equal to 0.
### Persymmetric
A matrix A[n#n] is persymmetric if it is symmetric about its anti-diagonal, i.e. if A=JATJ where J is the exchange matrix. It is perhermitian if A=JAHJ and perskewsymmetric if A= -JATJ.
WARNING: The term persymmetric is sometimes used for a bisymmetric matrix.
• If A is persymmetric then so is Ak for any positive or, providing A is non-singular, negative k.
• A Toeplitz matrix is persymmetric.
### Polynomial Matrix
A polynomial matrix of order p is one whose elements are polynomials of a single variable x. Thus A=A(0)+A(1)x+...+A(p)xp where the A(i) are constant matrices and A(p) is not all zero.
### Positive
A real matrix is positive if all its elements are strictly > 0.
A real matrix is non-negative if all its elements are >= 0.
• [Perron's theorem] If An#n is positive with spectral radius r, then the real positive value r is an eigenvalue with the following properties:
• the eigenvalue, x, satisfying Ax = rx can be chosen to have strictly positive real elements.
• the eigenvalue, y, satisfying ATy = ry can be chosen to have strictly positive real elements.
• all other eigenvalues have magnitude strictly less than r and their corresponding eigenvectors cannot be chosen to have all elements strictly positive and real.
• The rank-1 impotent matrix, T = xyT/xTy, is the projection onto the eigenspace spanned by x. The limit, limm->inf(r-1A)m = T = xyT/xTy.
• [Perron-Frobenius theorem] If An#n is irreducible and non-negative with spectral radius r, then the real positive value r is an eigenvalue with the following properties:
• the eigenvalue, x, satisfying Ax = rx can be chosen to have strictly positive real elements.
• the eigenvalue, y, satisfying ATy = ry can be chosen to have strictly positive real elements.
• the eigenvectors associated with any other eigenvalue cannot be chosen to have all elements strictly positive and real.
• If there are h eigenvalues of magnitude r, then these eigenvalues are simple and are given by r exp(2jπk/h) for k=0, 1, …, h-1. h is the period.
### Positive Definite
see under definiteness
### Primitive
If k is the eigenvalue of a matrix An#n having the largest absolute value, then A is primitive if the absolute values of all other eigenvalues are < |k|.
• If An#n is non-negative then A is primitive iff Am is positive for some m>0.
• If An#n is non-negative and primitive then limm->inf(r-1A)m = xyT where r is the spectral radius of A and x and y are positive eigenvectors satisfying Ax = rxATy = ry and xTy = 1.
### Projection
A projection matrix (or orthogonal projection matrix) is a square matrix that is hermitian and idempotent: i.e. PH=P2=P.
WARNING: Some people call any idempotent matrix a projection matrix and call it an orthogonal projection matrix if it is also hermitian.
• If P is a projection matrix then P is positive semi-definite.
• I-P is a projection matrix iff P is a projection matrix.
• X(XHX)#XH is a projection whose range is the subspace spanned by the columns of X.
• If X has full column rank, we can equivalently write X(XHX)-1XH
• xxH/xHx is a projection onto the 1-dimensional subspace spanned by x.
• If P and Q are projection matrices, then the following are equivalent:
1. P-Q is a projection matrix
2. P-Q is positive semidefinite
3. ||Px|| >= ||Qx|| for all x.
4. PQ=Q
5. QP=Q
• [A: idempotent] A is a projection matrix iff ||Ax|| <= ||x|| for all x.
### Quaternion
Quaternions are a generalization of complex numbers. A quaternion consists of a real component and three independent imaginary components and is written as r+xi+yj+zk where i2=j2=k2=ijk=-1. It is approximately true that whereas the polar decomposition of a complex number has a magnitude and 2-dimensional rotation, that of a quaternion has a magnitude and a 3-dimensionl rotation (see below). Quaternions form a division ring rather than a field because although every non-zero quaternion has a multiplicative inverse but multiplication is not commutative (e.g. ij=-ji=k). Quaternions are widely used to represent three-dimensional rotations in computer graphics and computer vision as an alternative to orthogonal matrices with the following advantages: (a) more compact, (b) possible to interpolate, (c) does not suffer from "gimbal lock", (d) easy to correct for drift due to rounding errors.
We can represent a quaternion either as a real 4-vector qR=[r x y z]T or a complex 2-vector qC=[r+jy x+jz]T. This gives r+xi+yj+zk = [1 i j k]qR = [1 i]qC. We can also represent it as a real 4#4 matrix QR=[r -x -y -z; x r -z y; y z r -x; z -y x r] or a complex 2#2 matrix QC=[r+jy -x+jz; x+jz r-jy]. Both the real and the complex quaternion matrices obey the same arithmetic rules as quaternions, i.e. the quaternion matrix representing the result of applying +, -, * and / operations to quaternions is the same as the result of applying the same operations to the corresponding quaternion matrices. Note that qR=QR[1 0 0 0]T and qC=QC[1 0]T; we can also define the inverse functions QR=QUATR(qR) and QC=QUATC(qC). Note that the real and complex representations given above are not the only possible choices.
In the following, PR=QUATR(pR), QR=QUATR(qR), K=DIAG([-1 1 1 1]) and qR=[r x y z]T=[r; w]. PC,pC,QC and qC are the corresponding complex quantities; the subscripts R and C are omitted below for results that apply to both real and complex representations.
• The magnitude of the quaternion is m=|q|=sqrt(r2+x2+y2+z2). . A unit quaternion has m = 1.
• det(QR)=m4. det(QC)=qHq=m2
• Any quaternion may be written as m times a unit quaternion.
• Q-1=(qHq)-1QH is the reciprocal of the quaternion.
• QH is the conjugate of the quaternion; this corresponds to reversing the signs of x, y and z.
• PQ=QUAT(Pq) and P+Q=QUAT(p+q). This illustrates that we may often use the quaternion vectors rather than the matrices when performing arithmetic with a resultant saving in computation.
• PRqR=KQRTKpR. Note however that KQRTK is not a quaternion matrix unless Q is a multiple of I (i.e. the corresponding quaternion is purely real).
• (QRK)2=(KQR)2
• (PRQRK)2=(PRK)2(QRK)2
• QR=rI+[0 -wT; w SKEW(w)]
• [|q|=1] (QRK)2=(KQR)2=[1 0; 0 S] where S is a 3#3 rotation matrix corresponding to an angle of 2cos-1(r) about an axis whose unit vector is w/sqrt(1-r2).
• Every 3#3 rotation matrix corresponds to a unit quaternion matrix that is unique except for its sign, i.e. +Q and -Q correspond to the same rotation matrix. Thus the decomposition of a quaternion into a magnitude and 3-dimensional rotation is only invertible to within a sign ambiguity.
• [|p|=|q|=1] If (PRK)2==[1 0; 0 R] and (QRK)2==[1 0; 0 S], then (PRK)2(QRK)2=(PRQRK)2=[1 0; 0 RS]. This shows that multiplying unit quaternions is equivalent to multiplying rotation matrices but may be more efficient computationally if it is possible to use quaternion vectors rather than matrices for intermediate results.
### Rank-one
A non-zero matrix A is a rank-one matrix iff it can be decomposed as A=xyT.
• If A=xyT is a rank-one matrix then
• If A=pqT then p=kx and q=y/k for some scalar k. That is, the decomposition is unique to within a scalar multiple.
• If A=xyT is a square rank-one matrix then
• A has a single non-zero eigenvalue equal to xTy=yTx. The associated right and left eigenvectors are respectively x and y.
• Frobenius Norm: ||A||F2=tr(AHA)=xHx×yHy
• Pseudoinverse: A+=AH/ ||A||F2 =AH/tr(AHA)=AH/(xHx×yHy) where ||A||F is the Frobenius Norm.
### Reducible
A matrix An#n is reducible (or fully decomposable) if if there exists a permutation matrix P such that PTAP is of the form [B C; 0 D] where B and D are square. As a special case 01#1 is regarded as reducible. A matrix that is not reducible is irreducible.
WARNING: The term reducible is sometimes used to mean one that has more than one block in its Jordan Normal Form.
• An irreducible matrix has at least one non-zero off-diagonal element in each row and column.
• An#n is irreducible iff (I + ABS(A))n-1 is positive.
### Regular
A polynomial matrix, A, of order p is regular if det(A) is non-zero.
• An n#n square polynomial matrix, A(x), of order p is regular iff det(A) is a polynomial in x of degree n*p.
### Rotation Matrix
[Real]: A Rotation matrix, R, is an n*n matrix of the form R=U[Q 0 ; 0 I]UT where U is any orthogonal matrix and Q is a matrix of the form [cos(x) -sin(x); sin(x) cos(x)]. Multiplying a vector by R rotates it by an angle x in the plane containing u and v, the first two columns of U. The direction of rotation is such that if x=90 degrees, u will be rotated to v
• A Rotation matrix is orthogonal with a determinant of +1.
• All but two of the eigenvalues of R equal unity and the remaining two are exp(jx) and exp(-jx) where j is the square root of -1. The corresponding unit modulus eigenvectors are [u v][1 -j]T/sqrt(2) and [u v][1 +j]T/sqrt(2).
• R=I+(cos(x)-1)(uuT+vvT)+sin(x)(vuT-uvT) where u and v are the first two columns of U
• If x=90 degrees then R=I-uuT-vvT+vuT-uvT .
• If x=180 degrees then R=I-2uuT-2vvT
• If x=270 degrees then R=I-uuT-vvT-vuT+uvT
• [3#3] R = wwT+cos(x)(I-wwT)+sin(x)SKEW(w) = I+sin(x)SKEW(w)+(1-cos(x))SKEW(w)2 where the unit vector w = u × v is the axis of rotation. [See skew-symmetric for the definition and properties of SKEW()].
• tr(R) = 2 cos(x) + 1
• Every 3#3 orthogonal matrix is either a rotation matrix or else a rotation matrix plus a reflection in the plane of the rotation according to whether its determinant is +1 or -1.
• The product of two 3#3 rotation matrices is a rotation matrix.
• A 3#3 rotation matrix may be expressed as the product of three rotations about the x, y and z axes respectively. The corresponding rotation angles are the Euler angles. The order in which the rotations are performed is significant and is not standardised. Using Euler angles is often a bad idea because their relation to the rotation axis direction is not continuous.
• R=(I-K)(I+K)-1 where K=-tan(x/2)*SKEW(w) except when x=180 degrees. This is the Caley transform.
• If x=90 degrees then R=wwT+SKEW(w) =(I+SKEW(w))(I-SKEW(w))-1
• If x=180 degrees then R=2wwT-I
• If x=270 degrees then R=wwT-SKEW(w)=(I-SKEW(w))(I+SKEW(w))-1
• ADJ(R-I)=2(1-cos(x))wwT where ADJ() denotes the adjoint. All columns of this rank-1 matrix are multiples of w.
• Every 3#3 rotation matrix corresponds to a quaternion matrix that is unique except for its sign.
### Shift Matrix
A shift matrix, or lower shift matrix, Z, is a matrix with ones below the main diagonal and zeros elsewhere.
ZT has ones above the main diagonal and zeros elsewhere and is an upper shift matrix.
• ZA, ZTA, AZ, AZT, ZAZT are equal to the matrix A shifted one position down, up left, right, and down along the main diagonal respectively.
• Zn#n is nilpotent.
### Signature
A signature matrix is a diagonal matrix whose diagonal entries are all +1 or -1.
### Simple
An n*n square matrix is simple (or, equivalently, diagonalizable or diagonalizable or non-defective) if all its eigenvalues are regular, otherwise it is defective.
### Singular
A matrix is singular if it has no inverse.
• A matrix A is singular iff det(A)=0.
### Skew-Hermitian
A square matrix K is Skew-Hermitian (or antihermition) if K = -KH, that is a(i,j)=-conj(a(j,i))
For real matrices, Skew-Hermitian and skew-symmetric are equivalent. The following properties apply also to real skew-symmetric matrices.
• S is Hermitian iff jS is skew-Hermitian where j = sqrt(-1)
• K is skew-Hermitian iff xHKy = -xHKHy for all x and y.
• Skew-Hermitian matrices are closed under addition, multiplication by a scalar, raising to an odd power and (if non-singular) inversion.
• Skew-Hermitian matrices are normal.
• If K is skew-hermitian, then K2 is hermitian.
• The eigenvalues of a skew-Hermitian matrix are either 0 or pure imaginary.
• Any matrix A has a unique decomposition A = S + K where S is Hermitian and K is skew-hermitian.
• K is skew-hermitian iff K=ln(U) or U=exp(K) for some unitary U .
• For any complex a with |a|=1, there is a 1-to-1 correspondence between the unitary matrices, U, not having a as an eigenvalue and skew-hermitian matrices, K, given by U=a(K-I)(I+K)-1 and K=(aI+U)(aI-U)-1. These are Caley's formulae.
• Taking a=-1 gives U=(I-K)(I+K)-1 and K=(I-U)(I+U)-1
### Skew-Symmetric[!]
A square matrix K is skew-symmetric (or antisymmetric) if K = -KT, that is a(i,j)=-a(j,i)
For real matrices, skew-symmetric and Skew-Hermitian are equivalent. Most properties are listed under skew-Hermitian .
• Skew-symmetry is preserved by congruence.
• The diagonal elements of a skew-symmetric matrix are all 0. [1.10]
• The rank of a real or complex skew-symmetric matrix is even. [1.11]
• [Real] The non-zero eigenvalues of a real skew-symmetric matrix are all purely imaginary and occur in complex conjugate pairs.
• If K is skew-symmetric, then I - K is non-singular
• [Real] If A is skew-symmetric, then xTAx = 0 for all real x.
• [Real] If a=+1 or a=-1, there is a 1-to-1 correspondence between real skew-symmetric matrices, K, and those orthogonal matrices, Q, not having a as an eigenvalue given by Q=a(K-I)(K+I)-1 and K=(aI+Q)(aI-Q)-1 . These are Caley's formulae.
• K is real skew-symmetric iff K=ln(Q) or Q = exp(K) for some real proper orthogonal matrix Q
• [Real 3#3] All 3#3 skew-symmetric matrices have the form SKEW(a) = [0 -a3 a2; a3 0 -a1; -a2 a1 0] for some vector a.
• SKEW(ka) = k SKEW(a) for any scalar k
• The vector cross product is given by a × b = SKEW(a) b = -SKEW(b) a
• SKEW(a) b = 0 iff a = kb for some scalar k
• SKEW(a)2n=(-aTa)n-1aaT+(-aTa)nI=(-aTa)n-1(aaT-(aTa)I) for integer n>=1
• SKEW(a)2=aaT-(aTa)I
• SKEW(a)2n+1=(-aTa)nSKEW(a) for integer n>=0
• SKEW(a)3=-(aTa)SKEW(a)
• The eigenvalues of SKEW(a) are 0 and +-sqrt(-aTa)
• The eigenvector associated with 0 is ka
• [Real a]: Eigenvalues are 0 and +-j|a| where j is sqrt(-1). Unless q=r=0 a suitable pair of eigenvectors are [-q2-r2 jr-pq pr-jq]T and [-q2-r2 -jr-pq pr+jq]T.
• The singular values of SKEW(a) are |a|, |a| and 0.
• If z=|a| and w=[z2 z3]T, then a singular value decomposition is SKEW(a)=USVT where U=[zT; w I+(z1-1)-1wwT]J, S=DIAG(|a|, |a|, 0) and V=U [0 1 0; -1 0 0; 0 0 1] where J is the exchange matrix (i.e. I with the column order reversed). All other decompositions may be obtained by postmultiplying both U and V by DIAG(Q[2#2], 1) for some orthogonal Q and/or negating the final column of one or both of U and V.
• SKEW(a)T SKEW(a) = SKEW(a) SKEW(a)T = |a|2 I - aaT
• tr( SKEW(a)T SKEW(a))=2aTa
• det([a b c]) = aT SKEW(b) c = bT SKEW(c) a = cT SKEW(a) b, this is the scalar triple product.
• aT SKEW(b) a = aT SKEW(a) b = bT SKEW(a) a = 0 for all a and b
• SKEW(a)SKEW(b) = baT-(bTa)I
• SKEW(a)SKEW(b) c = (aTc)b - (aTb)c, this is the vector triple product.
• For any a and B[3#3],
• BTSKEW(Ba)B = det(B) * SKEW(a)
• [det(B)!=0]: SKEW(Ba) = det(B) * B-TSKEW(a)B-1
• SKEW(SKEW(a)b) = baT - abT
• [U orthogonal] The product E = U SKEW(a) = SKEW(Ua) U is an essential matrix
• ETE = (aTa) I - aaT
• tr(ETE) = 2aTa.
### Sparse
A matrix is sparse if it has relatively few non-zero elements.
### Stability
A Stability or Stable matrix is one whose eigenvalues all have strictly negative real parts.
A semi-stable matrix is one whose eigenvalues all have non-positive real parts.
### Stochastic
A real non-negative square matrix A is stochastic if all its rows sum to 1.. If all its columns also sum to 1 it is Doubly Stochastic.
• All eigenvalues of A are <= 1.
• 1 is an eigenvalue with eigenvector [1 1 ... 1]T
### Sub-stochastic
A real non-negative square matrix A is sub-stochastic if all its rows sum to <=1.
### Subunitary
A is subunitary if ||AAHx|| = ||AHx|| for all x. A is also called a partial isometry.
The following are equivalent:
1. A is subunitary
2. AHA is a projection matrix
3. AAHA = A
4. A+ = AH
• A is subunitary iff AH is subunitary iff A+ is subunitary.
• If A is subunitary and non-singular than A is unitary.
### Symmetric[!]
A square matrix A is symmetric if A = AT, that is a(i,j) = a(j,i).
Most properties of real symmetric matrices are listed under Hermitian .
• [Real]: If A is real, symmetric, then A=0 iff xTAx = 0 for all real x.
• [Real]: A real symmetric matrix is orthogonally similar to a diagonal matrix.
• [Real, 2#2] A=[a b; b d]=RDRT where D is diagonal and R=[cos(t) -sin(t); sin(t) cos(t)] and t=½tan-1(2b/(a-d)).
• A is symmetric iff it is congruent to a diagonal matrix.
• Any square matrix may be uniquely decomposed as the sum of a symmetric matrix and a skew-symmetric matrix.
• Any symmetric matrix A can be expressed as A=UDUT where U is unitary and D is real, non-negative and diagonal with its diagonal elements arranged in non-increasing order (i.e. di,i <= dj,j for i < j). This is the Takagi decomposition and is a special case of the singular value decomposition.
### Symmetrizable
A real matrix, A, is symmetrizable if ATM = MA for some positive definite M.
### Symplectic
A matrix, A[2n#2n], is symplectic if AHKA=K where K is the antisymmetric orthogonal matrix [0 I; -I 0].
• A is symplectic iff A-1=KTAHK
• If a symplectic matrix A=[P Q; R S] where P,Q,R,S are all n#n, then A-1=[SH -RH ; -QH PH]
• The set of symplectic matrices of size 2n#2n is closed under multiplication and inversion and so forms a multiplicative group.
• A is symplectic iff it preserves the symplectic form xHKy, that is (Ax)HK(Ay) = xHKy for all x and y. This is analogous to the way that a unitary matrix, U, preserves the inner product: (Ux)H(Uy)=xHy.
### Toeplitz
A toeplitz matrix, A, has constant diagonals. In other words ai,j depends only on i-j.
We define A=TOE(b[m+n-1])[m#n] to be the m#n matrix with ai,j = bi-j+n. Thus, b is the column vector formed by starting at the top right element of A, going backwards along the top row of A and then down the left column of A.
In the topics below, J is the exchange matrix.
• A toeplitz matrix is persymmetric and so, if it exists, is its inverse. A symmetric toeplitz matrix is bisymmetric.
• If A and B are toeplitz, then so are A+B and A-B. Note that AB and A-1 are not necessarily toeplitz.
• If A is toeplitz, then AT, AH and JAJ are Toeplitz while JAATJAJ and JAT are Hankel.
• If A[n#n] is toeplitz, then JATJ=(JAJ)T=A while JA=ATJ and AJ=JAT are Hankel.
• TOE(a+b) = TOE(a) + TOE(b)
• TOE(b[m+n-1])[m#n]=TOE(Jb)[n#m]T
• TOE(b[2n-1])[n#n]=TOE(Jb)[n#n]T
• If the lower triangular matrices A[n#n]=TOE([0[n-1]; p[n]]) and B[n#n]=TOE([0[n-1]; q[n]]) then:
• Aq = Bp = conv(p,q)1:n
• AB = BA = TOE([0[n-1]; Aq]) = TOE([0[n-1]; Bp]) = TOE([0[n-1]; conv(p,q)1:n])
• A-1 and B-1 are toeplitz lower triangular if they exist.
• If the upper triangular matrices A[n#n]=TOE([ p[n]; 0[n-1]]) and B[n#n]=TOE([ q[n]; 0[n-1]]) then:
• Aq = Bp = conv(p,q)n:2n-1
• AB = BA = TOE([Aq; 0[n-1]]) = TOE([Bp; 0[n-1]]) = TOE([conv(p,q)n:2n-1; 0[n-1]])
• A-1 and B-1 are toeplitz lower triangular if they exist.
• The product TOE(a)[m#r]TOE(b)[r#n] is toeplitz iff ar+1:r+m-1b1:n-1T = a1:m-1br+1:r+n-1T [1.21]. This m-1#n-1 rank-one matrix identity is equivalent to requiring one of the following conditions:
1. Both ar+1:r+m-1=ka1:m-1 and br+1:r+n-1=kb1:n-1 for the same scalar k. Note that a1:m-1 and ar+1:r+m-1 will overlap if m>r+1 and similarly for b if n>r+1.
• For TOE(a) to be square and symmetric, a1:m-1 must be either symmetric or antisymmetric with k=+1 or -1 respectively (a similar condition applies to TOE(b)).
2. Either ar+1:r+m-1= 0 or b1:n-1 = 0 and also either a1:m-1= 0 or br+1:r+n-1= 0 . If m=r=n then this condition is equivalent to requiring that A and B are either both upper triangular or both lower triangular or else one of them is diagonal.
Some special cases of this are:
• TOE(a)[m#r]TOE(b)[r#n] is toeplitz if ar+1:r+m-1 = a1:m-1 and br+1:r+n-1= b1:n-1. Note that this does not make the matrices symmetrical even for square matrices because a1:m-1 goes backwards along the top row of the matrix.
• TOE([0[m-1]; a[r]])[m#r]TOE([0[n-1]; b[r]])[r#n] = TOE([0[n+m-r-1]; conv(a,b)1:r])
• TOE([a[r]; 0[m-1]])[m#r]TOE([b[r]; 0[n-1]])[r#n] = TOE([ conv(a,b)r:2r-1; 0[n+m-r-1]])
• If A=TOE(b)[m#n] then JAJ=TOE(Jb)[m#n]
• TOE([0[n-p]; a[m]; 0[q-m]])[q-p+1#n] b[n] = TOE([0[m-p]; b[n]; 0[q-n]])[q-p+1#m] a[m] = conv(a,b)p:q provided that p<=m,n<=q and conv(a,b)i is taken to be 0 for i outside the range 1 to m+n-1.
• TOE(a[m])[m-n+1#n] b[n] = conv(a,b)n:m
• TOE([0[n-p]; a[n]])[n-p+1#n] b[n] = TOE([0[n-p]; b[n]])[n-p+1#n] a[n] = conv(a,b)p:n
• TOE([0[n-1]; a[n]])[n#n] b[n] = TOE([0[n-1]; b[n]])[n#n] a[n] = conv(a,b)1:n
• TOE([a[n]; 0[q-n]])[q-n+1#n] b[n] = TOE([b[n]; 0[q-n]])[q-n+1#n] a[n] = conv(a,b)n:q
• TOE([a[n]; 0[n-1]])[n#n] b[n] = TOE([b[n]; 0[n-1]])[n#n] a[n] = conv(a,b)n:2n-1
• TOE([0[n-1]; a[m]; 0[n-1]])[m+n-1#n] b[n] = TOE([0[m-1]; b[n] ;0[m-1]])[m+n-1#m] a[m] = conv(a,b)
• A symmetric toeplitz matrix is of the form S[n#n] = TOE([Ja[n]; 0[n-1]]+[0[n-1]; a[n]])
• JSJ = S
• Sb = (TOE([b[n]; 0[n-1]])[n#n]J+TOE([0[n-1]; b[n]])[n#n])a . The matrix on the right is the sum of a lower triangular toeplitz and an upper triangular hankel matrix.
### Triangular
A is upper triangular if a(i,j)=0 whenever i>j.
A is lower triangular if a(i,j)=0 whenever i<j.
A is triangular iff it is either upper or lower triangular.
A triangular matrix A is strictly triangular if its diagonal elements all equal 0.
A triangular matrix A is unit triangular if its diagonal elements all equal 1.
• [Real]: An orthogonal triangular matrix must be diagonal
• [n*n]: The determinant of a triangular matrix is the product of its diagonal elements.
• If A is unit triangular then inv(A) exists and is unit triangular.
• A strictly triangular matrix is nilpotent .
• The set of upper triangular matrices are closed under multiplication and addition and (where possible) inversion.
• The set of lower triangular matrices are closed under multiplication and addition and (where possible) inversion.
### Tridiagonal or Jacobi
A is tridiagonal or Jacobi if A(i,j)=0 whenever |i-j|>1. In other words its non-zero elements lie either on or immediately adjacent to the main diagonal.
• A is tridiagonal iff it is both upper and lower Hessenberg.
### Unitary
A complex square matrix A is unitary if AHA = I. A is also sometimes called an isometry.
A real unitary matrix is called orthogonal .The following properties apply to orthogonal matrices as well as to unitary matrices.
• Unitary matrices are closed under multiplication, raising to an integer power and inversion
• U is unitary iff UH is unitary.
• Unitary matrices are normal.
• U is unitary iff ||Ux|| = ||x|| for all x.
• The eigenvalues of a unitary matrix all have an absolute value of 1.
• The determinant of a unitary matrix has an absolute value of 1.
• A matrix is unitary iff its columns form an orthonormal basis.
• U is unitary iff U=exp(K) or K=ln(U) for some skew-hermitian K.
• For any complex a with |a|=1, there is a 1-to-1 correspondence between the unitary matrices, U, not having a as an eigenvalue and skew-hermitian matrices, K, given by U=a(K-I)(I+K)-1 and K=(aI+U)(aI-U)-1. These are Caley's formulae.
• Taking a=-1 gives U=(I-K)(I+K)-1 and K=(I-U)(I+U)-1
### Vandermonde
An Vandermonde matrix, V[n#n], has the form [1 x x•2x•n-1] for some column vector x. (where x•2 denotes elementwise squaring). A general element is given by v(i,j) = (xi)j-1. All elements of the first column of the matrix equal 1. Vandermonde matrices arise in connection with fitting polynomials to data.
WARNING: Some authors define a Vandermonde matrix to be either the transpose or the horizontally flipped version of the above definition.
### Vectorized Transpose Matrix
The vectorized transpose matrix, TVEC(m,n), is the mn#mn permutation matrix whose i,jth element is 1 if j=1+m(i-1)-(mn-1)floor((i-1)/n) or 0 otherwise.
For clarity, we write Tm,n = TVEC(m,n) in this section.
• [A[m#n]] (AT): = Tm,nA: [see vectorization, R.6]
• Tm,n is a permutation matrix and is therefore orthogonal.
• T1,n = Tn,1 = I
• Tn,m = Tm,nT = Tm,n-1
• [A[m#n], B[p#q]] B ⊗ A = Tp,m (A ⊗ B) Tn,q
• [A[m#n], B[p#q]] (A ⊗ B) Tn,q = Tm,p (BA)
• [a[n], B[p#q]] (a ⊗ B) = Tn,p (Ba)
### Zero
The zero matrix, 0, has a(i,j)=0 for all i,j
• [Complex]: A=0 iff xHAx = 0 for all x .
• [Real]: If A is symmetric, then A=0 iff xTAx = 0 for all x.
• [Real]: A=0 iff xTAy = 0 for all x and y.
• A=0 iff AHA = 0
This page is part of The Matrix Reference Manual. Copyright © 1998-2021 Mike Brookes, Imperial College, London, UK. See the file gfl.html for copying instructions. Please send any comments or suggestions to "mike.brookes" at "imperial.ac.uk".
Updated: \$Id: special.html 11291 2021-01-05 18:26:10Z dmb \$ | 15,072 | 48,356 | {"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.78125 | 4 | CC-MAIN-2021-21 | longest | en | 0.81878 |
https://fullstackwithjava.com/bubble-sort-in-java-with-explanation/ | 1,685,317,638,000,000,000 | text/html | crawl-data/CC-MAIN-2023-23/segments/1685224644571.22/warc/CC-MAIN-20230528214404-20230529004404-00353.warc.gz | 318,303,030 | 19,083 | # Bubble sort in java with explanation | Bubble sort best example
Bubble sort in java with explanation: –
If arr[j] > arr[j+1] swap them. To place the element in their respective position, we have to do the following operation n-1 times. Time Complexity: O(n2)
## Bubble Sort in java Program
Example 1
``````public class Sorting {
public static void main(String[] args) {
int[]arr = {7,8,3,1,2}; //unsorted Array
for (int i = 0; i < arr.length-1; i++) {
for (int j = 0; j < arr.length-1; j++) {
if(arr[j]>arr[j+1]) {
//swap
int temp;
temp =arr[j];
arr[j] =arr[j+1];
arr[j+1] =temp;
}
}
}
System.out.print("Sorted Array =" +" ");
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i]+" ");
}
}
}``````
``Output: Sorted Array = 1 2 3 7 8 ``
You Also Learn –
Example 2 – Bubble Sort in java Program
``````
public class Bubble_Sort {
public static void main(String[] args) {
int arr[] = {3,2,5,8,5,2,1,5};
System.out.println ("Before sorting Array ="+" ");
for (int i= 0; i< arr.length; i++) {
System.out.print(arr[i]+" ");
}
//Bubble sorting
for (int i = 0; i < arr.length-1; i++) {
for (int j = 0; j < arr.length-1 ; j++) {
if (arr[j]>arr[j+1]) {
//swap
int temp;
temp =arr[j];
arr[j] =arr[j+1];
arr[j+1]= temp;
}
}
}
System.out.println();
System.out.println("After Swapping ="+" ");
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i]+" ");
}
}
}
``````
``````Output:
Before sorting Array =
3 2 5 8 5 2 1 5
After Swapping =
1 2 2 3 5 5 5 8 ``````
Note: After sorting remove duplicate elements in an Array
``````
public class Bubble_Sort {
public static void main(String[] args) {
int arr[] = {3,2,5,8,5,2,1,5};
System.out.println ("Before swapping Array ="+" ");
for (int i= 0; i< arr.length; i++) {
System.out.print(arr[i]+" ");
}
//Bubble sorting
for (int i = 0; i < arr.length-1; i++) {
for (int j = 0; j < arr.length-1 ; j++) {
if (arr[j]>arr[j+1]) {
//swap
int temp;
temp =arr[j];
arr[j] =arr[j+1];
arr[j+1]= temp;
}
}
}
System.out.println();
System.out.println("After Swapping Array ="+" ");
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i]+" ");
}
int j=0;
for (int i = 0; i < arr.length-1; i++) {
if (arr[i]!=arr[i+1]) {
arr[j]=arr[i];
j++;
}
}
arr[j]=arr[arr.length-1];
System.err.println();
System.out.println("Remove Duplicate elements in Array =");
for (int k = 0; k <=j; k++) {
System.out.print(arr[k]+" ");
}
}
}
``````
``````Output:
Before swapping Array =
3 2 5 8 5 2 1 5
After Swapping Array =
1 2 2 3 5 5 5 8
Remove Duplicate elements in Array =
1 2 3 5 8 ``````
## Remove Duplicate Elements in Unsorted Array
Example 1
in this program, first sort an array and then remove duplicate elements in a sorted array.
``````
public class Remove_Duplicate {
public static void main(String[] args) {
int[] arr = {2,3,6,5,7,5,4,3}; //unsorted Arry
// first Sorting Array
for (int i = 0; i < arr.length-1; i++) {
for (int j = 0; j < arr.length-1; j++) {
if (arr[j]>arr[j+1]) {
// swap
int temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
}
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i]+" ");
}
// Second Step - Remove Duplicate Elements
int j=0;
for (int i = 0; i < arr.length-1; i++) {
if (arr[i]!=arr[i+1]) {
arr[j]=arr[i];
j++;
}
}
System.out.println();
arr[j]=arr[arr.length-1];
for (int i = 0; i <=j; i++) {
System.out.print(arr[i]+" ");
}
}
}
``````
``````Output:
2 3 3 4 5 5 6 7
2 3 4 5 6 7 ``````
Bubble sort best example – unsorted Array to convert sort Array by bubble sort and then remove Duplicate elements in an Array
``````public class A {
public static void sort(int[] x) {
for (int i = 0; i < x.length-1; i++) {
for (int j = 0; j < x.length-1; j++) {
if (x[j]>x[j+1]) {
int temp =x[j];
x[j]=x[j+1];
x[j+1]=temp;
}
}
}
}
public static void removeDuplicate(int[] x) {
int[] temp = new int [x.length];
int j=0;
for (int i = 0; i < temp.length-1; i++) {
if (x[i]!=x[i+1]) {
temp[j]=x[i];
j++;
}
}
System.out.println();
temp[j]=x[x.length-1];
for (int i = 0; i < j+1; i++) {
System.out.print(temp[i]+" ");
}
}
public static void main( String[] args) {
int[] y= {1,2,1,3,4,5,0};
A.sort(y);
for (int m = 0; m < y.length; m++) {
System.out.print(y[m]+" ");
}
A.removeDuplicate(y);
}
}``````
``````Output:
0 1 1 2 3 4 5
0 1 2 3 4 5 `````` | 1,497 | 4,244 | {"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.6875 | 3 | CC-MAIN-2023-23 | longest | en | 0.441149 |
https://betterlesson.com/lesson/500000/how-much-is-a-million-gaining-confidence-and-fluency-in-reading-numbers-to-one-million?from=consumer_breadcrumb_dropdown_unit | 1,550,764,475,000,000,000 | text/html | crawl-data/CC-MAIN-2019-09/segments/1550247505838.65/warc/CC-MAIN-20190221152543-20190221174543-00172.warc.gz | 510,686,160 | 30,550 | # How Much IS a Million? Gaining confidence and fluency in reading numbers to one million.
10 teachers like this lesson
Print Lesson
## Objective
Students will be able to read and write multi-digit numbers up to one million.
#### Big Idea
Imagining a million of something is a tough thing to do! Reading numbers up to one million is tough too, but becomes easier as students are introduced to the concept by a wonderful movie/book as they gain strength to master the standard.
## The Hook
10 minutes
How much is a million? What does it look like? I opened up my lesson with this question to personalize the tone and make it real for them. What does a million look like? Even in my own mind, I have a hard time really fathoming a million. I think of stars. I wondered what they would come up with.
*I asked the to shut their eyes for a moment and I asked them to try to imagine a million of their favorite toys...or a million people...a million frogs....etc.
I gave them a few moments and then continued with these questions: What does a million feel like? Is it crowded? Is it full? Is it enough? What comes in millions? Do we ever see millions and don't know it???
To pull them back in I asked these questions: When does a number become something we have a hard time imagining? Can you imagine 30,000? How about 300,000? What comes in 300,000?
I told them that I had a special movie that would help them with their thinking about a million.
How Much Is a Million?
This delightful video version of David Schwarz's book will get your kids thinking about how much is a million ... and beyond. It will connect small familiar things. I also keep the book available for them to read for silent reading time. The back of the book contains explanations on how they arrived at their calculations.
The goal of showing this movie is to warm them up to the idea of mastering larger numbers than they mastered in third grade, and setting a tone that is light and ready for learning.
Moving on: When the movie was done, we discussed opinions and thoughts. We ooed and ahhed over the fishbowl idea and talked about each concept. I told them that like the students of Marvelissimo, they would learn to read and write very large numbers...but not over one million. I told them that they would be working on CCSS 4.NBT.A.2 that requires them to be able to fluently read numbers up to 1 million. I wrote on the whiteboard my paraphrased version: Read numbers fluently up to one million to help remind them of their learning goal.
## The Core Lesson
20 minutes
Lesson: I used this video resource to teach today because it is a really great way to teach the whole class together about how to read multi-digit numbers! This lesson goes above one million, but teaching above the level of the standard in this medium seems to work very well to address a class of mixed levels.
*I like to ensure attentive listening by inviting my students sit on the floor in front of the Smart Board with their iPads or math journal to take notes. The notes during this lesson should be a personal choice of what they think is important, but I always guide them if they are having trouble with a concept, or if I see a need of an important point to be written down. I asked them to jot down things they "never knew before." (It is fun afterward to have them share by starting their sentence with "I never knew that...) For example," I never knew that units and ones were the same thing!"
Teaching with the Video: While the Learnzillion lesson was running, I stopped it in relevant places to reinforce concepts of the placement and value of the numerals, and then defined the patterns. In order to get them to see the repeated patterns of the periods, I guided them to understand that the first word in each new period, is the same word of the that period. For example: Ones column is first, and it is the ones period, thousands period is first in the thousands period, etc. I noticed that she doesn't point that important point out in the lesson. I like teaching like this because it can always be replayed, stopped and replayed again until they get it.
As the clip progressed, I stopped the video and have students read the number on the core lesson aloud. I cupped my hands around each period as students read the number emphasizing with my voice that "hundred" is repeated over and over. I asked if they saw a pattern to try to guide them into thinking about number patterns. I planned that if they didn't see it, I would guide them along because it helps them see that we read the three digit number in the thousands period, as if it were a hundreds place value number and then say thousands to note its actual place value. I find that covering all the other digits after what we are reading helps them see this more easily and read it more easily. i.e in 346,456; cup your hands around the 346 and say three hundred forty six, point to the comma and say "thousands" and then four hundred fifty-six to finish.
Informally assess: I divided my class in half. While one half listened to the other read the number aloud, I coached them along to be accurate. The other half was asked if they heard the number read correctly. This helps students recognize numbers through an auditory and language experience. It allows them to critique their classmates and also become attuned to hearing errors or accuracy. (MP7)
Thumbs up: After each number was read, we assessed ourselves through the "thumbs up." The question was: Thumbs up if you think you read each number accurately. Then: Thumbs up if you think you need more practice. This way,I could see if I needed to continue by practicing more number reading at the moment or if they were ready to move on.
Guide by Questioning: I continued by guiding the lesson along by posing these questions.
Do you see any repeating patterns in the way numbers are written? Can anyone explain them? One student mentioned that the commas occur after three digits. I asked: Do you notice and can you explain a pattern about the way the number is read? Another student mentioned that she sees that we read it like it was a hundreds place number before we say the thousands. She asked if we do that for millions too?
I guided students with answering this question: What are the rules to reading numbers? We talked about not saying "and", putting a hyphen in and spelling the words correctly. We also talked about saying the period name before the comma. I wrote these rules on the whiteboard for them to copy in their math notebooks.
Practice together: Using the guided practice in the lesson, I explained that we needed to only master numbers up to one million, but we will try the number that is in the ten millions on the board together.
Work together: I wrote the number in word form below the standard form on the Smart Board while they wrote in their journals to practice. I like to start by reviewing what rules we need to remember: spelling, "no ands", comma placement. I coached students to explain "why" for each of those teaching points. I keep these rules displayed on the white board, so they can refer to them as they work throughout the lessons on place value.When they were all done copying I had them read the number aloud together. I listened very carefully to hear mistakes.We continued this through the guided practice, assessing progress. They were catching on well.
Modeling Appreciation of Learning: I was sure to praise students at this point for their accomplishments and told them how much I appreciated them going above what was expected by the standard because they read a number above one million. I had them stick their hands out and pat themselves on the back and then pat each other on the back and say "good job." ( If you use this, remember to be careful of those who are sensitive about touch.) They love it!
## Guiding them to Gain Confidence...Onward Toward Mastery!
20 minutes
Independent Practice: 5-7 minutes
I knew it was time to see if students could read and write multi-digit numbers and were starting to master the standard independently because of the feedback I got when they used their thumbs.
Independent practice looked like this:
1. I wrote three random numbers on the board using 6,5,and 4 digits. I made sure I included hyphenated numbers and zeros. This gave students a variety of choice for later and a good practice selection.
2. Students copied these in their notebooks and wrote them in word form.
3. Using the strategies learned from the lesson, they practiced reading their numbers three times or more aloud to themselves. I encouraged them to look at the things they needed to remember that I had listed on the white board earlier.
After they had finished this independent practice, I had them move into partner work.
Partner Read: Supporting each other as a learner. 10-12 min
1.Students partnered up with a buddy of choice. I let them go to someone they were comfortable reading with in reading class.
2.Students worked to check each other's work for spelling and accurate wording. I roamed the classroom and supported and monitored the discussions, making sure they were on task and checking if they needed support.
3. As students practiced reading the numbers aloud with one another they were required to agree on how the number should be read.
4.Then, both students chose one number to share that they thought they had mastered well.
I think giving them choice levels the playing field for all students and helps them master the skill. It also creates a comfortable learning experience lowering the intimidation of reading aloud in front of everyone.
Stop and Share: I stopped everyone and had them join me in a circle around the classroom.
Partners volunteered to read their chosen number aloud simultaneously. This way students feel supported as they read in front of everyone.
*I kept it light, quick and fun! I told them that we were going to support our learning through appreciations or encouraging words to keep them from feeling intimidated.
Showing Appreciations: After they read the number correctly, the whole class showed appreciations by clapping, and I taught them little ""praise ditties" (included below the narrative). I went through them once and then let the partners choose what they liked.
When they weren't correct in reading their number, I coached to support them as they read until they mastered it. The ones that needed a bit more practice were excused to find a corner to go over it again. Then we tried again for mastery. That worked well and kept things moving. This is a wonderful way for me to assess progress while they are practicing.
Closing: When we were all done, we came together in a circle and gave a general "round of applause." I spoke to them about looking for large numbers on signs, in reading and anywhere in the world they could find them. I told them to practice reading every large number they see and take time to do it every day. I encouraged them to become aware of the numbers around them and told them we would have more lessons to help them practice.
*They are always surprised by how much fun this is, and it keeps the energy going! Here is what I used today:
Elvis Appreciation: Stand and move hips while pretending to strum a guitar....saying " Thank you, thank you, thank you very much" Elvis style.
Fantastic: Make a motion in the air and a sound that sounds like you are squirting a bottle of Fantastic Cleaner. Pretend you are spraying the bottle in the air 4 times and then wipe the air saying "Fan...tasss...stic!"
Roller Coaster: Raise arms slowly from waist making a ticking sound 4 times and then make a roller coaster motion with your arms and say "Who eee!"
Round of Applause: Simply clap while making a circular motion with your arms.
These are fun ways to show appreciation for good work and lightens it up if people stumble and feel embarrassed.
Differentiation Suggestions:
*High end students may be given higher place value numbers to share. I was sure those students are partnered together to read their numbers.
* Low end or special needs students can use iPad Educreations ap and record their voice reading the number. You can record your voice first and save it so they can listen to it before they record. That way they can record over and over until it is right.You can use Apple TV on the Smart Board if they choose to share with the class. Or, they may just share it with you. | 2,620 | 12,487 | {"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.28125 | 3 | CC-MAIN-2019-09 | latest | en | 0.976772 |
https://itsourcecode.com/sql-tutorial/sql-group-statement/ | 1,590,956,286,000,000,000 | text/html | crawl-data/CC-MAIN-2020-24/segments/1590347413624.48/warc/CC-MAIN-20200531182830-20200531212830-00230.warc.gz | 393,998,345 | 42,407 | 0
779
# Group By in SQL With Example [ COUNT, AVG, MAX, MIN ,SUM ] Video
Learning Group By in SQL is a little bit tricky for a newbie programmer. In today’s lesson, I will give in-depth discussion about Group By in SQL with Example using Aggregate functions.
## Few Questions and Answers in learning SQL Group By Functions
What is Group By in SQL?
Group functions in sql are mathematical functions to operate on sets of rows to give one result per set. ex: “Find the number of employee in each Department”.
What Group By Does in SQL?
It arrange identical data into groups with the help of some aggregate functions.
What is Aggregate Functions in SQL?
is a function where the values of multiple rows are grouped together to form a single summary value.
Where Group By Having in SQL?
The HAVING clause is used to specify which groups are to be displayed, and thus, you further restrict the groups on the basis of aggregate information.
## Lesson Objectives
Here’s the main objectives after completing this lesson, you will be able to do the following:
• Identify the available Group Functions
• Describe the use of group functions
• Aggregate data using GROUP BY clause
• Include or Exclude grouped rows by using the HAVING clause
Types of group functions
The GROUP BY statement is often used with aggregate functions (AVG, COUNT, MAX, MIN, and SUM) to group the result-set by one or more columns.
Group by in SQL Aggregate Function
• COUNT
Calculate the number of rows in a set
• AVG
Calculates the average of the specified columns in a set of rows.
• MAX
Returns the largest value of the selected column.
• MIN
Returns the smallest value of the selected column.
• SUM
Returns the total sum of a numeric column.
## Sample table used in this lesson
Watch the Video demonstration here:
## Count with group by statement
The following SQL statement finds the number of Employee by Department:
## SQL Group by using AVG
The following SQL statement finds the average SALARY of all Employee:
## AVG with Group By in SQL Example
The following SQL statement finds the average SALARY of all Employee by Department:
## Query using MAX AND MIN With group by statement
The following SQL statement finds the Maximum and Minimum Salary by Department:
## Query using SUM With Group by statement
The following SQL statement finds the Payroll by Department:
## Use the HAVING clause to restrict groups:
1. Rows are grouped.
2. The group function is applied.
3. Groups matching the Having clause are displayed.
## Syntax of Group by HAVING in SQL
Example: The following SQL statement finds the Total Payroll exceeding 80,000.00 by Department.
## Results of using Having Clause
Based on the example of using HAVING Clause, it displays the DEPT_NAME and PAYROLL that exceeds 80000. You will also notice that the EXECUTIVE department has been excluded and the list is sorted by Department Name.
NOTE: You can use the HAVING clause to specify which groups are to be displayed, and thus, you further restrict the groups on the basis of aggregate information.
## Summary
In this lesson, you should have learned how to:
• Use the functions AVG, COUNT, MAX, MIN, SUM
• Write queries that use the Group By clause
• Write queries that use the Having Clause
## Inquiries
I hope that you have learned something new today. If you have any questions or suggestions about the Group by in SQL with examples, please feel free to leave a comment below.
#### Looking for more source code? Type your keyword here here!
Hello Itsourcecoders, welcome to itsourcecode.com. I'm Joken Villanueva, MIT a passionate Blogger, Programmer and a Hobbyist. I started Itsourcecode because I wanted to give back and Share all the learnings and knowledge I've learned in my career and I believe through this website I would be able to help and assist those newbie programmers in enhancing their skills from different programming languages. So let us all help each other by sharing our ideas!
This site uses Akismet to reduce spam. Learn how your comment data is processed. | 854 | 4,071 | {"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.1875 | 3 | CC-MAIN-2020-24 | longest | en | 0.856872 |
https://www.studysmarter.us/textbooks/physics/fundamentals-of-physics-10th-edition/all-about-atoms/q18p-a-hydrogen-atom-in-its-ground-state-actually-has-two-po/ | 1,679,957,347,000,000,000 | text/html | crawl-data/CC-MAIN-2023-14/segments/1679296948708.2/warc/CC-MAIN-20230327220742-20230328010742-00697.warc.gz | 1,111,579,160 | 23,671 | Suggested languages for you:
Americas
Europe
Q18P
Expert-verified
Found in: Page 1247
### Fundamentals Of Physics
Book edition 10th Edition
Author(s) David Halliday
Pages 1328 pages
ISBN 9781118230718
# A hydrogen atom in its ground state actually has two possible, closely spaced energy levels because the electron is in the magnetic field $\stackrel{\mathbf{\to }}{\mathbf{B}}$ of the proton (the nucleus). Accordingly, energy is associated with the orientation of the electron’s magnetic moment $\stackrel{\mathbf{\to }}{\mathbf{\mu }}$ relative to $\stackrel{\mathbf{\to }}{\mathbf{B}}$, and the electron is said to be either spin up (higher energy) or spin down (lower energy) in that field. If the electron is excited to the higher energy level, it can de-excite by spin-flipping and emitting a photon. The wavelength associated with that photon is 21 cm. (Such a process occurs extensively in the Milky Way galaxy, and reception of the 21 cm radiation by radio telescopes reveals where hydrogen gas lies between stars.) What is the effective magnitude of $\stackrel{\mathbf{\to }}{\mathbf{B}}$ as experienced by the electron in the ground-state hydrogen atom?
The effective magnitude of magnetic field $\stackrel{\to }{\mathrm{B}}$ as experienced by the electron in the ground-state hydrogen atom is 51 mT .
See the step by step solution
## Step 1: The given data:
1. The wavelength associated with that photon, $\lambda =0.21m$
2. If the electron is excited to a higher level, it can de-excite by spin-flipping and emitting a photon.
## Step 2: Understanding the concept of magnetic resonance:
Magnetic resonance, absorption or radiation by electrons or atomic nuclei in response to the use of other magnetic fields.
The power of attraction among all the crowds throughout the universe; especially the attraction of the gravity of the earth with the bodies near its surface.
Use the concept of gravitational force to find gravitational potential energy. Integrate the equation of gravitational force over infinity to reference position. Then define the work required to increase the separation of the particles for the given positions.
Formulas:
The energy equation from the Stern-Gerlach experiment,
$∆\mathrm{E}=2{\mathrm{\mu }}_{\mathrm{B}}\mathrm{B}$ ….. (1)
Here, B is the magnetic field and ${\mathrm{\mu }}_{\mathrm{B}}$ is the Bohr magneton.
The energy due to Planck-Einstein relation,
$∆\mathrm{E}=\frac{\mathrm{hc}}{\mathrm{\lambda }}$ ….. (2)
Here, c is the speed of light, $\lambda$ is the wavelength, and h is the Plank’s constant.
## Step 3: Calculation of the effective magnetic field
Consider the known data as below.
The wavelength, $\mathrm{\lambda }=21\mathrm{cm}=0.21\mathrm{m}$
Plank’s constant, $\mathrm{h}=6.63×{10}^{-34}\mathrm{J}.\mathrm{s}$
Speed of light, $\mathrm{c}=3×{10}^{8}\mathrm{m}/\mathrm{s}$
Bohr magneton, ${\mathrm{\mu }}_{\mathrm{B}}=9.27×{10}^{-24}\mathrm{J}/\mathrm{T}$
Comparing equations (1) and (2) and substituting the given data in the derived equation of the magnetic field.
The value of the effective magnetic field is as follow.
$2{\mathrm{\mu }}_{\mathrm{B}}\mathrm{B}=\frac{\mathrm{hc}}{\mathrm{\lambda }}\phantom{\rule{0ex}{0ex}}\mathrm{B}=\frac{\mathrm{hc}}{\mathrm{\lambda }\left(2{\mathrm{\mu }}_{\mathrm{B}}\right)}$
Substitute known values in the above equation.
$\mathrm{B}=\frac{\left(6.63×{10}^{-34}\mathrm{J}.\mathrm{s}\right)\left(3×{10}^{8}\mathrm{m}/\mathrm{s}\right)}{2\left(0.21\mathrm{m}\right)\left(9.27×{10}^{-24}\mathrm{J}/\mathrm{T}\right)}\phantom{\rule{0ex}{0ex}}=5.11×{10}^{-2}\mathrm{T}\phantom{\rule{0ex}{0ex}}=51\mathrm{mT}$
Hence, the value of the magnetic field is 51 mT. | 1,022 | 3,692 | {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 25, "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-2023-14 | latest | en | 0.855866 |
http://poj.org/showmessage?message_id=69342 | 1,516,495,704,000,000,000 | text/html | crawl-data/CC-MAIN-2018-05/segments/1516084889798.67/warc/CC-MAIN-20180121001412-20180121021412-00280.warc.gz | 289,432,513 | 6,685 | Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
Register
ACM ICPC 2018 World Finals
## 截下来做桌面了,哈哈,好看
Posted by hello123 at 2007-03-17 23:24:16 on Problem 2739
In Reply To:好久没打过表了…… Posted by:summery at 2006-08-07 18:39:41
```> #include<stdio.h>
> unsigned short a[10002]={0,0,1,1,0,2,0,1,1,0,1,1,1,1,0,1,0,2,1,1,0,0,0,2,1,0,1,0,1,1,1,2,0,0,0,0,2,1,0,1,0,3,1,1,0,0,0,1,1,1,0,0,1,2,0,0,1,0,1,2,2,1,0,0,0,0,0,2,1,0,0,2,2,1,0,1,0,1,1,1,0,0,0,3,1,0,0,0,1,1,2,0,0,0,0,1,0,2,1,0,
> 2,2,1,1,0,0,0,1,0,2,0,0,2,1,0,0,0,0,0,2,2,1,0,0,1,0,0,2,1,1,0,2,1,0,0,0,0,1,2,2,0,0,0,2,1,0,0,0,0,1,1,1,2,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,1,2,0,0,0,0,0,1,2,2,0,0,1,0,1,2,0,0,0,1,1,1,0,1,0,3,1,3,
> 0,0,1,0,2,0,0,0,0,0,2,2,0,0,0,0,1,0,0,0,1,2,1,3,0,0,0,1,2,1,0,0,0,2,0,1,1,0,1,1,3,1,0,1,0,0,0,0,0,0,0,3,1,1,0,0,0,1,2,0,0,0,0,2,1,0,0,0,1,2,1,2,1,0,0,0,2,1,0,1,1,3,0,1,0,0,0,3,1,0,1,0,0,1,0,0,0,0,0,0,
> 2,1,0,0,2,0,1,1,1,0,0,5,0,1,0,0,0,1,1,1,1,0,0,2,1,0,1,0,1,1,2,2,0,0,0,0,0,1,0,0,3,1,0,0,0,0,0,1,1,2,0,1,1,2,0,0,0,0,1,1,1,0,0,1,1,0,0,1,0,0,1,3,2,2,0,0,1,0,0,2,0,1,1,1,2,0,0,0,0,1,2,0,0,0,0,2,1,1,0,1,
> 0,3,0,0,0,0,0,1,2,1,2,0,1,0,0,0,0,0,0,1,1,2,0,1,1,1,0,0,0,0,1,2,1,1,2,1,0,0,1,3,1,0,1,2,0,0,0,0,0,2,1,0,0,0,0,0,2,2,0,0,1,1,2,2,0,0,0,1,1,0,0,1,1,2,1,0,0,0,0,2,2,0,0,0,1,0,0,2,0,0,0,3,2,1,0,0,1,1,0,2,
> 0,1,0,2,0,0,0,0,2,1,3,0,0,0,0,1,0,1,0,1,1,1,1,2,0,0,0,1,0,0,0,0,1,2,1,0,0,0,0,1,2,1,0,0,0,0,1,1,1,0,0,2,2,1,0,0,1,1,2,2,0,0,1,2,1,1,1,0,1,1,0,1,0,0,0,0,2,1,0,0,1,2,1,1,0,0,0,2,0,1,0,0,0,3,1,0,1,0,1,1,
> 1,1,0,0,0,0,1,2,0,0,0,1,1,1,0,0,0,2,1,1,2,0,1,0,1,1,0,0,0,1,2,2,0,1,1,2,1,1,1,1,0,1,0,1,0,0,0,2,1,0,0,0,0,1,1,0,0,0,0,2,3,2,1,0,0,0,0,0,1,0,0,1,0,1,0,0,0,2,0,2,0,0,2,2,2,0,0,0,0,2,1,2,0,0,0,1,2,0,0,0,
> 1,2,2,0,0,0,0,2,0,1,1,0,2,1,2,0,0,0,0,2,0,1,0,0,2,1,1,1,0,0,0,1,2,3,0,0,0,0,0,1,1,0,0,1,1,1,0,0,0,1,1,1,1,0,0,0,1,2,0,1,0,1,2,2,0,0,1,0,1,1,0,1,1,1,2,0,0,0,0,1,2,1,0,0,0,0,2,2,0,2,0,2,0,0,0,0,1,2,1,0,
> 1,0,1,3,0,0,0,0,0,1,1,2,0,0,0,0,1,1,0,0,0,1,1,1,1,0,0,2,1,2,1,0,0,2,2,0,0,0,0,2,1,2,0,0,0,0,2,0,0,0,0,0,1,1,0,0,0,3,0,1,1,0,0,5,3,0,0,0,0,1,1,0,2,0,1,0,0,1,0,0,1,2,1,3,0,0,1,1,1,0,1,1,1,0,0,0,1,0,0,0,
> 1,0,0,0,0,2,1,1,0,0,0,2,2,0,0,0,0,1,1,1,0,0,1,1,1,0,1,0,2,2,1,3,0,0,0,1,1,1,0,0,0,3,1,0,0,0,2,2,0,0,0,0,0,2,1,0,0,0,1,0,2,3,0,1,2,0,2,1,0,0,0,1,0,0,0,0,0,2,1,1,0,0,0,3,0,1,0,0,1,0,3,3,0,0,0,0,0,1,0,0,
> 0,1,2,0,0,0,0,0,1,1,0,0,3,1,0,1,0,0,0,2,1,1,0,1,0,2,1,1,0,0,1,1,2,2,0,0,0,0,0,1,2,0,0,2,1,0,0,0,0,2,1,1,0,0,1,1,1,1,1,0,3,3,0,2,1,0,0,2,0,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,2,0,0,1,1,1,1,1,1,1,0,0,0,1,1,3,
> 0,0,0,2,3,0,0,0,0,1,0,0,1,0,2,1,0,1,0,1,2,0,0,2,0,0,0,0,0,1,0,0,1,2,1,2,0,0,0,2,2,0,0,0,1,0,0,0,1,0,0,4,2,2,1,0,1,0,0,1,0,1,0,2,4,0,0,0,0,2,0,2,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,3,0,0,0,0,1,2,2,0,0,1,0,1,
> 1,1,0,0,0,0,1,1,1,0,0,2,2,2,1,0,1,1,0,1,1,1,0,2,1,0,0,0,0,2,1,1,0,0,0,0,3,1,0,0,0,0,2,0,0,0,0,2,1,2,2,1,0,1,1,0,0,0,0,2,0,0,1,0,1,1,1,1,0,0,0,2,2,0,0,0,1,1,1,1,1,2,0,3,1,1,1,0,0,1,1,1,0,0,1,0,0,1,1,0,
> 1,1,0,2,0,0,0,1,0,0,0,1,2,3,0,1,0,0,0,1,4,2,1,0,0,0,0,1,0,0,1,1,1,0,1,0,1,1,0,1,0,0,0,1,0,0,0,0,0,2,2,2,0,0,1,1,0,0,0,0,1,3,2,0,1,0,1,4,0,1,0,1,0,1,1,0,1,0,0,0,1,3,0,0,0,0,1,0,0,0,0,1,3,0,0,1,1,0,0,1,
> 0,0,1,1,1,1,0,0,1,2,1,1,0,0,0,2,0,0,0,0,2,0,1,2,0,0,0,1,2,1,0,0,0,3,1,0,0,0,0,3,0,2,0,0,1,0,1,1,0,0,1,1,2,1,0,0,0,1,0,2,1,0,0,1,2,0,0,0,0,0,2,1,1,0,0,2,0,1,2,1,2,1,2,2,1,1,0,2,1,1,0,0,0,3,2,0,0,0,0,1,
> 0,0,1,0,0,0,0,1,1,0,0,3,0,0,0,0,1,0,1,1,1,0,0,3,3,0,0,0,0,0,1,1,0,1,0,1,0,0,0,0,0,1,1,2,0,0,1,0,2,1,0,0,2,3,0,1,0,0,0,2,2,1,0,0,1,1,0,1,0,0,2,1,0,0,1,0,1,0,0,2,0,0,0,2,1,1,1,0,2,0,0,2,0,1,0,0,2,1,0,0,
> 0,2,0,1,0,0,1,3,0,2,0,1,0,2,0,0,0,0,1,1,2,2,1,0,0,0,2,1,0,0,0,0,1,0,0,0,1,2,0,0,0,0,0,3,2,2,0,0,0,0,4,0,0,0,1,0,1,1,0,0,1,0,1,1,0,0,0,2,1,1,1,0,0,1,1,0,0,1,0,1,1,1,0,0,0,0,0,2,0,1,0,2,2,1,0,0,0,1,0,1,
> 0,0,0,2,2,0,0,1,1,1,3,0,2,1,0,2,2,2,1,0,1,1,2,1,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,1,1,0,0,0,1,2,2,0,0,1,1,2,3,0,0,0,1,2,1,0,0,0,0,2,0,0,0,0,0,1,0,0,0,1,2,0,1,0,1,0,0,0,1,1,0,1,2,3,1,0,2,0,3,1,0,0,0,0,1,
> 1,3,1,0,0,0,0,1,0,0,2,1,0,0,0,0,0,0,1,0,0,1,0,3,1,0,0,0,1,1,2,2,0,0,1,0,1,1,0,0,0,1,0,1,0,0,2,1,2,2,0,2,0,0,4,0,0,0,0,2,0,2,0,0,0,0,1,2,0,1,1,1,2,2,0,0,0,1,1,1,0,0,0,0,0,0,0,0,2,2,0,2,0,0,0,2,1,0,0,0,
> 2,3,0,1,0,0,0,1,0,0,0,1,0,1,1,1,1,0,1,0,1,1,0,0,1,0,2,0,0,0,2,2,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,1,2,2,0,4,0,0,0,0,3,0,0,1,2,0,0,0,0,0,0,2,0,0,0,1,0,2,2,0,0,0,1,2,2,1,1,1,0,0,1,2,2,0,0,0,0,2,1,1,0,1,1,2,
> 0,0,2,1,0,0,1,0,0,0,0,3,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,3,0,1,1,0,2,1,1,1,0,0,1,1,3,0,0,0,0,1,1,1,0,0,1,1,1,2,0,0,1,0,0,0,0,0,0,1,1,1,0,0,1,2,0,0,1,0,0,1,2,1,0,1,0,2,0,2,1,0,1,1,1,1,0,0,0,0,1,0,0,0,0,3,
> 2,1,0,0,0,2,0,0,1,0,2,3,2,2,0,0,1,1,0,0,0,0,1,1,2,1,0,1,0,2,0,1,2,0,0,0,0,1,0,0,0,2,1,2,1,0,1,1,1,0,0,0,1,1,0,2,1,0,1,0,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,3,1,0,0,1,1,0,0,0,0,1,1,0,1,0,1,1,0,0,0,2,
> 1,0,1,3,0,0,1,1,1,2,0,0,1,2,1,1,0,0,1,0,0,2,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,2,1,0,0,1,1,0,1,0,1,1,2,2,1,1,0,0,1,0,0,1,1,0,0,2,0,0,1,3,0,2,0,1,0,2,1,1,1,0,0,0,2,1,0,0,0,0,1,2,1,0,0,0,1,1,0,0,1,2,1,0,
> 0,1,0,3,3,1,0,1,1,1,1,2,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,2,1,1,0,0,0,1,1,0,1,0,0,1,0,1,0,0,0,0,2,2,0,1,1,2,1,0,0,0,1,3,1,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,2,1,1,1,0,0,2,1,1,2,0,1,1,3,0,1,0,0,1,4,1,0,0,0,1,2,
> 1,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,3,0,1,1,0,1,2,1,1,0,1,0,0,1,0,1,0,0,1,3,1,1,0,1,2,0,2,0,1,0,1,1,0,1,0,1,0,0,2,1,0,0,2,2,1,0,0,0,0,1,1,1,0,0,1,0,1,1,1,0,2,1,1,2,0,0,0,2,1,1,0,0,1,0,0,1,0,0,1,0,0,0,0,
> 0,1,1,1,0,0,0,3,2,1,0,0,0,0,1,0,0,0,0,1,0,2,0,1,0,0,1,1,0,0,1,1,0,2,2,0,1,0,0,1,0,0,0,2,0,0,0,0,1,2,1,1,1,0,1,2,3,1,0,0,0,0,2,1,1,0,0,2,0,1,0,0,1,2,1,0,0,0,1,3,1,0,2,0,2,0,3,2,1,0,0,1,0,1,0,0,0,1,1,1,
> 0,0,1,2,1,1,0,0,0,1,1,0,2,0,0,0,1,1,1,0,1,2,0,0,0,0,1,1,0,0,0,0,1,2,2,0,0,0,0,0,1,2,0,1,0,0,1,4,1,0,0,1,1,1,0,0,1,2,1,1,0,0,0,1,0,0,0,0,0,0,3,1,0,1,0,2,1,2,0,0,0,0,1,1,0,0,1,1,1,4,1,0,0,1,1,0,0,0,1,1,
> 1,0,0,1,0,1,3,1,0,0,0,1,1,2,0,0,0,1,1,2,0,0,0,0,1,0,0,0,1,1,1,3,0,0,0,1,0,2,0,0,2,1,1,1,0,1,0,2,0,1,0,0,2,1,2,0,0,1,0,2,1,1,0,0,2,1,1,1,0,0,1,1,0,1,0,0,1,3,0,0,1,0,0,0,1,2,0,0,0,1,0,1,0,0,0,0,0,1,0,0,
> 0,1,0,1,0,0,1,2,2,0,1,1,1,0,2,1,1,0,0,2,1,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,3,0,1,0,2,2,1,0,1,0,1,1,1,1,1,0,0,0,0,4,1,0,0,0,1,1,0,1,1,0,4,2,0,0,0,1,1,0,0,0,0,0,2,0,0,0,0,0,1,3,1,1,0,1,2,0,0,0,0,0,3,1,0,
> 1,0,0,1,2,1,0,0,0,2,1,1,2,0,2,1,1,1,1,0,0,0,1,1,0,1,2,3,0,0,1,1,0,0,0,0,0,0,1,1,0,1,1,0,0,0,1,0,0,0,0,1,2,2,0,0,0,3,2,0,0,0,0,3,1,1,1,0,2,1,1,2,0,0,0,0,1,0,0,0,1,0,1,0,1,1,0,2,0,0,2,0,1,1,1,1,0,1,0,2,
> 1,1,0,0,0,1,0,1,0,0,3,1,1,1,0,0,0,1,0,2,0,0,0,1,0,0,0,0,1,1,0,0,0,0,1,1,0,3,2,1,1,2,0,0,0,0,2,0,1,1,1,0,0,1,1,0,0,1,0,1,1,1,0,1,0,1,2,2,1,1,2,1,1,2,2,0,0,1,0,1,0,0,1,2,0,2,0,2,0,1,1,0,1,0,1,0,1,0,1,0,
> 0,0,1,1,0,0,1,0,0,1,0,0,1,2,0,0,0,0,0,3,1,3,0,0,0,1,2,0,0,1,0,0,0,1,0,0,0,3,1,1,0,0,0,0,1,1,0,0,0,0,2,1,0,0,2,0,0,0,1,0,0,1,2,1,0,0,3,3,1,1,0,0,0,0,1,1,0,0,0,1,1,3,0,0,0,1,0,1,1,1,0,2,1,1,0,1,0,0,4,0,
> 0,0,0,1,1,0,0,0,2,2,0,0,0,0,0,1,1,1,0,2,0,1,1,1,0,1,0,0,0,1,0,0,3,0,0,0,0,1,2,0,1,0,0,1,0,0,1,2,1,1,2,2,1,2,0,0,1,2,1,1,0,2,0,3,4,0,2,0,0,0,0,2,0,0,0,0,0,1,0,0,0,1,1,0,0,0,0,1,0,0,1,0,0,2,1,1,0,0,0,2,
> 3,1,0,0,1,1,0,1,0,1,2,0,0,2,0,0,1,0,2,1,1,2,0,2,1,0,0,0,0,2,2,1,0,0,1,1,1,0,0,0,0,0,0,1,0,0,0,3,2,2,1,0,0,2,0,0,0,1,0,1,0,1,2,0,0,0,0,0,0,1,1,1,0,1,0,0,1,0,2,0,0,0,0,0,2,1,0,1,0,4,2,2,0,0,0,0,2,3,0,0,
> 1,1,0,2,0,0,1,1,3,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,2,1,0,0,0,0,2,0,1,2,0,1,1,1,0,0,0,1,2,0,2,1,1,1,0,1,1,0,0,0,0,0,2,2,0,0,2,2,1,1,0,1,0,2,0,2,0,0,1,0,1,1,0,0,1,0,1,0,0,0,0,0,0,1,1,1,0,1,1,0,0,0,1,1,0,2,
> 2,0,0,3,1,0,0,0,0,1,0,1,2,0,1,2,1,3,0,0,0,0,0,0,1,0,0,2,2,1,0,0,0,2,1,0,1,0,1,2,0,2,0,1,1,0,0,2,0,0,1,0,0,0,1,0,0,1,1,1,1,2,0,0,2,0,0,0,0,0,1,2,0,0,0,0,2,0,1,0,1,2,0,1,0,0,0,2,3,1,2,1,0,2,0,0,0,1,0,0,
> 1,2,0,0,1,0,0,2,0,0,1,0,2,1,1,0,0,3,0,0,0,1,0,1,2,0,0,1,1,1,2,2,0,1,2,0,2,2,1,0,0,0,0,2,0,0,0,2,0,0,0,0,0,1,2,0,1,0,1,2,0,1,0,0,0,0,1,0,1,1,0,3,0,1,0,0,0,1,1,0,0,0,0,2,0,0,0,1,1,0,0,2,0,2,2,0,2,2,1,0,
> 1,2,1,1,0,0,1,0,1,1,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,3,2,2,0,0,1,0,1,0,0,0,0,2,2,0,0,0,0,1,1,2,1,0,0,2,1,0,0,4,1,1,2,0,0,0,2,0,0,1,0,0,1,1,1,0,0,0,2,0,0,1,0,1,1,1,1,0,1,0,1,0,2,0,0,3,0,0,2,0,0,0,1,1,1,
> 0,0,0,2,1,1,0,0,2,0,1,1,0,0,1,1,0,0,0,0,1,3,1,1,0,1,1,0,1,1,0,2,0,1,1,0,0,1,1,1,0,0,1,0,1,1,1,2,0,0,1,2,0,3,1,0,1,0,0,0,0,0,0,2,1,0,0,0,3,1,3,1,0,0,1,1,1,2,0,0,0,1,1,0,0,0,0,1,0,2,0,0,0,0,0,1,0,0,2,2,
> 2,2,0,0,1,0,0,1,0,0,0,3,0,0,0,0,0,1,0,1,0,1,1,1,1,2,0,0,1,2,0,1,0,0,1,1,1,2,1,0,0,0,0,1,0,0,1,2,1,1,0,1,1,1,2,0,3,0,0,0,0,0,0,0,0,0,1,3,0,0,2,2,0,0,0,0,0,1,0,2,2,0,0,0,1,0,0,1,0,2,1,0,0,0,0,0,2,1,1,0,
> 1,1,2,1,0,1,1,1,0,1,1,1,1,1,2,0,0,3,1,1,0,1,1,1,1,1,1,1,2,0,1,0,0,1,0,0,0,0,1,0,0,0,0,1,2,0,0,0,1,1,0,1,0,0,1,1,1,3,0,1,0,2,3,0,1,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,1,0,2,0,0,1,0,3,1,3,0,0,0,3,1,2,
> 0,1,0,0,1,0,0,0,0,1,3,2,0,0,0,0,1,0,0,0,0,1,1,1,1,0,0,2,0,1,0,0,1,1,2,1,1,0,0,2,0,0,0,0,1,1,0,0,0,0,2,1,2,2,1,0,0,2,0,2,1,0,0,0,1,0,0,0,0,1,1,1,1,1,1,0,2,2,0,0,1,1,1,0,0,0,1,0,1,2,0,0,0,0,0,0,0,1,0,1,
> 4,1,0,0,0,1,0,0,1,0,2,2,0,0,0,0,0,3,1,1,0,1,1,0,2,1,0,2,0,2,2,2,1,0,0,0,0,2,0,0,0,2,2,2,1,0,0,1,0,2,0,0,1,2,0,0,0,0,0,2,1,1,0,0,1,1,0,1,1,0,0,2,0,1,0,0,0,0,2,1,3,0,0,1,2,0,2,1,0,2,1,0,0,0,0,0,1,2,0,0,
> 0,1,1,0,0,0,0,1,0,2,1,0,0,0,1,0,0,0,1,1,1,0,0,0,0,2,1,1,1,1,1,1,0,1,0,0,0,3,1,1,2,0,0,0,1,0,0,0,0,1,2,1,0,0,0,1,0,2,0,1,0,3,1,3,1,0,0,0,1,1,2,1,0,1,0,0,0,0,0,0,2,0,1,1,1,0,0,2,0,0,0,2,1,0,1,0,0,2,0,0,
> 0,0,1,0,0,1,1,0,0,1,2,2,1,0,0,0,1,0,0,1,1,2,0,2,0,0,1,0,2,0,0,0,0,2,2,3,1,0,1,0,0,1,0,2,1,0,0,1,2,0,1,3,1,0,0,1,0,2,2,2,0,0,0,1,2,0,0,0,0,2,0,0,0,0,1,0,2,0,2,1,0,2,1,1,1,0,0,1,1,0,0,0,0,2,1,0,0,0,0,0,
> 0,2,0,1,2,0,1,3,0,0,0,0,1,1,0,0,0,1,1,2,2,0,1,1,0,0,0,0,0,1,0,0,1,1,0,2,1,0,0,0,0,0,1,0,0,1,0,1,1,3,0,0,0,2,3,0,1,1,0,1,1,2,0,0,1,2,1,1,1,0,0,0,0,0,0,0,0,1,2,0,1,0,0,1,1,0,0,0,0,0,1,1,0,0,1,0,1,3,1,0,
> 0,1,1,3,0,0,1,1,0,0,0,0,1,2,0,0,2,0,1,0,2,2,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,3,2,2,1,0,0,1,3,1,0,0,0,1,2,2,0,1,0,0,1,1,0,1,1,2,0,1,0,0,1,0,1,1,0,1,1,2,0,0,0,1,0,2,1,1,0,0,0,0,0,0,1,0,0,3,0,0,0,0,2,2,1,1,
> 0,0,1,1,1,0,0,1,2,0,1,1,0,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,3,2,0,0,1,2,0,0,2,1,0,0,0,0,0,1,0,3,1,0,2,0,1,2,0,0,0,0,1,0,1,3,0,0,1,2,1,1,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,1,2,1,0,1,0,1,1,2,0,0,1,1,2,1,0,0,2,1,
> 0,1,1,0,0,1,1,0,0,0,1,1,0,1,0,1,1,3,0,0,0,0,0,0,1,2,1,0,2,1,1,1,0,1,1,0,2,0,0,0,1,2,0,1,0,0,0,1,1,1,0,1,0,2,1,0,0,0,1,0,2,1,1,0,0,2,0,2,0,0,0,2,0,0,1,0,0,2,2,1,2,1,2,2,0,1,1,0,3,2,0,0,0,0,0,1,0,0,0,0,
> 1,1,1,1,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,2,4,2,0,0,0,1,1,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,2,2,0,1,0,0,1,3,1,1,0,0,0,1,4,0,0,0,0,0,1,0,0,1,2,0,3,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,0,0,2,1,0,0,1,1,2,1,0,0,0,1,3,
> 0,0,0,1,0,0,0,0,1,3,0,1,0,0,2,0,0,1,1,3,1,3,2,1,1,0,0,0,1,2,0,0,0,0,0,1,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,4,0,0,1,0,3,0,0,0,1,2,1,1,0,0,2,0,1,1,0,0,0,2,2,0,0,1,0,1,2,2,0,0,1,1,0,0,1,0,1,1,
> 4,1,0,0,0,2,0,2,1,0,1,0,2,1,0,2,0,2,2,2,0,2,0,0,0,0,0,0,1,1,0,0,0,0,0,2,1,0,0,0,0,0,2,1,0,0,0,1,1,1,1,0,0,4,1,0,0,0,0,1,2,1,0,1,0,0,0,1,0,1,1,1,0,1,1,0,0,2,3,1,0,0,0,0,1,0,0,0,2,1,2,1,1,1,0,0,0,2,1,1,
> 0,0,1,1,0,0,0,1,3,1,0,1,0,0,0,1,0,1,0,0,1,2,0,0,0,0,2,1,0,0,2,1,0,2,0,1,0,1,1,0,0,2,0,0,0,0,0,0,0,0,3,0,0,1,3,1,0,0,0,1,0,3,2,1,0,1,0,1,0,0,0,0,1,2,1,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,2,1,2,2,0,0,2,1,2,0,
> 1,0,0,2,1,1,0,0,1,2,0,0,0,0,0,0,2,2,0,1,0,0,2,1,0,0,0,0,1,1,0,1,1,2,1,0,0,2,0,0,1,1,0,0,1,1,2,2,2,0,1,2,0,0,0,0,0,0,0,1,1,1,1,0,0,2,0,0,0,1,1,1,0,0,0,2,2,1,0,0,0,1,1,0,0,0,0,1,1,0,2,0,2,2,0,2,0,0,2,1,
> 0,1,1,2,1,0,1,1,0,0,1,0,0,2,0,0,1,1,1,1,0,2,0,1,1,0,0,0,1,1,3,1,1,0,0,1,1,2,0,0,1,1,1,1,0,0,1,0,1,2,0,0,0,1,1,0,0,0,0,0,2,0,0,0,1,1,0,1,0,1,0,3,1,0,0,0,0,1,1,1,0,0,1,2,0,0,0,0,0,1,2,1,0,1,0,2,0,0,0,1,
> 1,2,2,1,0,0,0,2,1,0,0,0,1,1,2,0,0,0,1,2,2,2,0,0,0,0,0,1,1,0,1,2,0,0,0,0,0,1,0,1,0,1,0,0,2,0,0,1,2,3,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,1,3,2,1,0,1,2,1,0,1,0,1,0,1,3,2,0,0,2,0,0,1,1,1,0,1,1,1,0,0,0,0,1,1,
> 1,0,0,0,1,0,1,0,0,0,0,1,2,0,0,0,0,0,0,1,0,2,1,2,0,0,2,2,2,2,0,0,0,1,0,0,0,0,2,1,1,2,0,0,0,1,0,1,0,0,1,2,1,1,0,0,0,2,1,1,0,1,0,0,0,0,0,0,1,2,2,1,0,1,1,1,0,0,0,0,1,0,0,3,1,0,0,0,1,1,0,1,1,2,1,0,0,1,1,1,
> 1,2,1,0,1,0,2,0,2,1,0,2,1,0,0,0,1,2,1,1,0,1,0,1,0,0,0,1,1,0,1,0,0,0,0,0,0,1,1,0,1,2,0,1,0,0,0,0,1,1,0,1,0,3,0,0,1,0,0,2,0,0,1,0,1,0,2,1,0,1,4,2,1,0,0,0,0,2,0,1,0,0,0,1,1,0,1,0,0,1,1,2,0,0,0,0,0,0,1,0,
> 2,1,1,1,1,0,1,1,0,0,3,0,1,3,0,0,0,0,0,1,1,1,1,1,1,2,2,2,1,0,1,0,0,1,1,1,0,1,0,1,0,0,1,2,1,0,0,0,3,3,1,1,0,0,0,2,0,1,0,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,0,2,1,1,1,1,0,0,1,3,1,1,0,1,1,0,1,0,1,1,0,1,1,0,
> 0,0,0,3,0,1,0,1,0,0,2,0,0,0,0,0,0,0,0,0,1,2,1,1,0,0,0,2,1,0,1,0,2,1,1,0,0,1,1,2,3,0,0,0,1,0,0,0,0,0,0,0,2,2,0,0,0,1,0,1,1,0,1,0,1,0,0,0,1,0,2,0,0,0,0,1,0,2,0,2,2,3,0,0,1,0,0,2,0,1,0,0,1,0,1,0,1,0,1,4,
> 1,1,0,0,1,0,0,1,0,0,2,2,3,2,1,0,0,0,0,0,0,0,0,2,0,0,2,0,0,2,2,1,0,1,0,0,0,1,0,0,1,0,1,2,1,1,0,3,0,0,1,0,0,2,0,1,0,1,0,0,1,0,0,0,2,1,0,1,0,0,0,2,1,3,0,0,2,0,1,3,1,2,0,1,0,0,0,0,0,1,3,1,0,0,0,1,0,0,0,0,
> 3,1,0,0,0,0,1,2,2,0,1,0,0,2,1,1,0,1,0,1,0,2,0,1,1,0,1,0,1,0,0,2,0,2,0,0,1,1,1,0,0,1,0,1,0,0,3,1,1,1,0,1,0,0,1,2,1,1,1,0,0,1,1,2,1,0,0,0,0,1,0,0,2,2,0,0,1,0,2,0,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,1,1,
> 0,0,0,1,2,1,0,0,0,2,1,1,0,1,0,0,1,1,1,1,2,1,0,2,1,0,1,1,2,2,0,2,0,1,0,0,0,0,1,0,1,1,0,0,0,0,0,1,0,1,1,1,0,1,0,0,0,3,3,1,0,1,1,1,2,1,0,1,0,1,0,1,1,1,0,1,1,1,0,0,1,0,0,0,0,0,0,2,0,0,0,0,1,0,0,0,1,1,0,2,
> 2,2,2,0,0,1,2,0,0,2,2,3,0,1,0,0,0,2,0,0,1,1,0,2,0,0,0,0,3,1,3,1,1,1,0,0,2,1,1,0,1,0,0,1,0,0,0,1,0,1,2,0,1,2,0,0,0,0,1,1,2,1,0,1,0,0,0,1,1,1,0,1,0,3,0,0,0,1,1,2,2,0,0,0,1,0,0,1,1,2,1,0,0,0,2,1,1,2,0,0,
> 0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,1,2,2,0,1,0,1,1,0,1,2,1,0,0,0,1,1,2,1,1,0,1,0,0,1,2,0,0,2,2,1,1,0,0,0,2,0,1,0,1,0,1,1,0,1,0,1,0,0,2,0,0,1,1,0,0,0,0,0,1,3,2,1,0,0,0,0,0,0,1,0,3,1,1,0,0,0,1,0,1,
> 2,1,3,0,4,0,0,0,0,1,2,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,1,0,0,1,1,0,1,0,2,2,1,0,0,2,0,0,0,2,0,3,0,1,1,0,0,0,1,0,0,1,0,0,0,0,2,2,1,1,0,2,0,0,0,2,0,2,2,1,0,0,2,0,0,1,1,3,1,1,0,1,1,0,1,0,0,2,
> 1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,0,1,2,0,1,1,1,0,0,1,1,0,0,0,2,0,0,1,0,2,0,2,1,1,2,0,1,1,0,0,0,1,0,0,1,1,0,0,1,0,1,2,3,1,0,0,0,0,0,0,1,0,0,1,0,2,1,0,0,0,1,1,0,0,1,0,1,1,0,1,1,1,1,1,1,1,0,1,0,1,0,1,
> 0,2,0,1,0,0,2,1,1,1,1,1,0,0,0,1,0,0,1,2,1,0,0,0,0,0,1,0,0,0,0,1,2,2,0,0,1,1,0,1,0,1,0,0,2,1,1,0,1,2,2,1,1,1,1,0,0,0,1,0,1,2,2,2,0,0,1,1,0,0,1,0,0,0,1,0,1,0,0,3,1,1,1,0,0,0,0,1,0,2,0,1,0,2,0,1,0,0,2,0,
> 0,0,1,1,1,0,0,0,0,2,0,1,1,2,0,0,0,0,0,0,1,1,0,2,0,1,2,1,1,2,0,0,0,1,0,0,1,0,0,2,0,3,1,0,0,1,1,0,0,1,2,0,1,1,0,0,0,1,1,1,2,1,2,1,0,1,0,0,1,1,2,2,0,0,0,0,0,2,1,0,0,2,1,1,0,0,1,0,1,1,1,0,0,0,0,1,0,0,0,2,
> 2,0,0,1,1,1,1,1,1,0,0,1,2,0,0,0,0,3,2,0,0,0,1,1,1,1,0,0,0,1,2,1,0,0,0,0,1,0,1,1,1,1,0,0,2,0,0,2,2,2,0,0,0,1,0,1,0,0,1,1,2,1,0,0,0,0,0,1,0,0,0,2,0,0,2,0,0,1,1,0,0,1,0,2,1,1,1,1,0,3,1,2,0,0,0,0,0,1,1,0,
> 1,1,0,0,0,0,1,0,0,0,1,2,1,3,1,1,0,1,0,2,1,0,0,0,0,0,0,2,1,0,0,0,0,1,0,0,1,1,0,3,0,1,1,1,1,0,0,0,2,0,0,1,1,0,1,1,3,2,0,0,1,0,1,0,1,0,0,1,1,1,0,0,2,0,0,1,0,0,1,3,1,1,0,1,0,1,0,1,1,0,1,1,1,0,0,0,2,0,0,0,
> 1,1,1,1,2,1,1,1,1,1,0,0,0,1,1,0,2,0,0,0,0,3,1,1,1,0,0,1,1,3,1,2,0,0,1,0,2,1,0,1,0,2,0,0,0,0,1,2,0,0,2,3,2,1,0,0,0,0,0,1,1,2,0,0,1,2,0,0,0,0,0,0,0,1,0,1,1,1,0,0,1,1,0,0,1,0,0,2,1,0,0,2,1,1,2,1,1,0,1,1,
> 1,0,0,1,0,1,0,1,0,0,0,2,1,1,0,1,0,1,1,1,1,1,1,1,1,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0,1,1,0,2,0,0,0,2,1,2,0,1,0,1,2,0,2,1,1,2,0,0,1,0,0,0,1,0,1,0,3,1,1,0,0,0,1,3,0,1,1,1,0,1,0,1,1,0,0,1,0,0,0,1,0,0,0,1,0,0,
> 1,1,2,0,0,1,0,1,0,1,0,0,2,0,2,1,0,1,3,0,0,1,0,0,0,1,0,1,1,1,1,1,0,1,0,0,0,0,0,0,1,2,1,2,1,0,0,2,0,2,2,1,0,0,0,1,0,0,0,0,2,0,1,0,0,1,0,0,2,1,0,1,1,1,0,0,0,1,1,0,0,1,0,0,0,0,2,0,1,0,1,0,0,1,0,0,1,2,2,1,
> 0,2,0,0,0,0,1,0,2,3,2,2,0,2,1,0,1,3,3,1,0,1,0,0,0,0,0,1,2,1,0,0,1,2,0,1,0,0,0,0,1,0,0,0,2,1,2,0,0,0,0,4,0,1,0,0,0,1,1,1,1,1,0,0,1,0,0,0,0,1,0,1,3,1,0,0,0,1,0,1,0,2,1,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,
> 2,1,1,0,1,1,0,1,1,0,0,0,1,0,1,2,0,1,1,1,0,0,2,1,0,1,0,0,2,1,1,0,2,0,0,1,1,1,0,1,1,2,1,0,0,0,1,2,1,2,0,0,0,1,0,2,1,1,1,1,0,2,0,1,1,0,0,0,0,0,1,2,1,1,0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,2,1,0,0,0,0,0,0,1,
> 1,3,1,2,0,0,0,3,0,0,2,1,0,2,1,0,0,0,0,1,0,2,2,0,3,0,0,1,0,1,0,1,0,1,1,0,2,0,0,1,0,1,0,2,1,0,0,0,0,3,0,1,1,0,1,0,1,2,1,0,2,0,0,0,1,0,0,0,0,1,0,1,1,2,0,0,1,0,2,0,1,1,1,0,1,1,1,3,0,1,0,1,0,1,1,0,0,2,2,3,
> 0,1,0,1,1,0,0,1,1,0,0,0,0,1,0,0,2,1,0,1,1,0,0,1,0,0,2,3,0,0,1,0,2,1,1,1,0,0,0,1,2,2,0,0,1,0,0,1,0,0,0,2,0,1,0,0,0,1,2,1,2,0,0,2,3,0,0,0,1,0,1,2,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,2,0,3,0,1,1,0,0,2,
> 1,0,0,1,1,0,2,0,0,0,0,0,0,0,0,0,0,1,2,2,0,0,1,1,0,1,0,2,2,3,1,0,0,1,0,2,2,0,1,0,1,1,1,0,0,0,0,1,2,0,0,1,2,2,0,0,0,0,1,1,1,0,0,0,0,0,1,2,0,0,1,1,0,3,1,0,0,1,3,1,0,0,1,1,0,1,0,0,0,0,2,0,0,0,1,0,0,1,0,1,
> 0,4,0,0,0,1,0,1,2,0,0,0,0,0,1,1,0,0,0,1,0,0,0,0,1,1,0,1,0,0,2,1,1,1,0,0,1,3,2,0,0,1,1,1,0,1,0,2,0,1,1,1,0,2,3,0,3,0,0,0,2,1,0,2,0,1,0,1,0,0,0,0,1,1,1,2,1,1,1,1,1,1,1,0,1,0,1,1,0,0,1,0,1,2,1,0,0,1,1,0,
> 0,0,1,1,1,0,0,1,0,1,3,2,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0,1,0,0,1,2,1,0,0,0,0,1,1,1,1,0,0,1,0,2,2,1,2,1,0,1,0,1,0,1,0,3,1,2,0,0,0,0,2,0,0,0,2,3,0,1,0,0,0,0,1,1,1,0,0,3,0,0,1,0,0,1,0,2,0,0,0,2,0,0,1,0,0,1,
> 1,1,1,0,0,0,0,0,1,1,0,2,3,0,1,1,2,3,0,1,0,0,0,2,0,0,1,0,0,0,2,2,0,0,1,2,0,0,0,0,2,0,2,1,0,0,2,1,1,0,0,1,4,1,0,0,0,0,0,0,0,3,1,0,0,1,0,1,0,0,1,1,0,0,0,1,0,0,0,2,1,2,0,0,2,0,0,0,0,0,0,2,1,0,0,1,1,0,1,1,
> 1,2,0,1,0,1,0,2,1,2,1,0,0,1,1,0,0,1,0,1,1,2,0,0,1,0,1,0,0,0,0,1,0,1,1,0,0,1,1,0,0,0,0,3,0,0,1,1,0,1,0,1,0,0,2,0,2,0,2,3,1,2,2,1,0,2,2,0,0,3,1,0,1,2,0,1,0,0,0,1,1,0,0,0,0,0,1,1,0,0,2,1,1,2,0,0,1,2,1,0,
> 0,1,0,1,2,0,0,0,0,1,1,2,0,0,0,0,1,1,0,1,1,0,0,0,0,1,1,0,2,1,0,1,1,2,0,1,1,1,0,0,3,1,0,0,1,0,0,0,1,1,0,0,1,1,0,0,0,1,1,1,0,1,1,2,0,0,0,0,0,1,0,0,2,1,1,0,0,2,1,0,0,0,1,0,0,1,1,1,1,3,1,0,1,0,0,0,2,1,0,0,
> 0,1,0,0,1,0,0,0,0,0,0,2,3,0,0,2,0,1,0,3,0,0,1,2,0,1,0,0,1,1,0,1,0,0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,2,0,0,0,2,2,0,1,1,0,1,1,3,1,0,2,0,1,0,2,2,0,0,1,1,0,0,1,1,0,0,0,0,0,1,1,2,0,0,0,0,1,0,1,0,1,1,1,1,1,0,0,
> 0,1,0,0,0,1,0,1,2,0,2,0,3,2,0,1,0,1,0,2,2,1,0,0,2,0,1,1,0,0,0,1,1,0,0,0,0,2,1,1,0,2,0,1,1,0,2,0,0,2,2,2,1,0,1,0,1,0,0,0,2,0,0,1,1,3,0,1,1,2,0,0,2,1,1,1,0,1,0,2,2,1,1,0,0,1,1,0,0,0,1,0,0,0,0,0,1,2,3,2,
> 0,0,1,0,0,1,0,0,0,1,0,1,2,0,0,0,1,0,0,0,0,0,0,1,1,0,1,3,2,1,1,0,0,0,0,0,1,1,2,0,0,1,0,0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,0,1,0,1,0,3,2,2,1,2,0,2,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,1,0,2,1,1,1,0,0,3,0,0,2,1,1,2,
> 1,2,1,0,0,2,2,1,0,1,1,1,2,1,1,0,0,0,0,1,2,0,0,0,0,0,0,1,0,1,0,1,1,2,0,1,1,1,0,0,0,1,0,0,0,0,0,1,0,0,2,1,0,2,0,0,0,1,0,0,1,3,1,0,2,0,2,0,0,0,1,0,0,0,0,0,0,1,2,1,0,1,0,2,1,0,0,0,1,0,0,0,0,1,1,1,1,0,1,0,
> 1,0,1,1,0,0,1,2,0,0,0,1,0,1,0,1,1,0,2,4,2,1,0,0,0,1,0,1,0,1,1,1,0,0,1,1,1,1,0,2,0,0,0,1,3,0,0,0,0,2,0,1,2,0,0,0,0,0,1,1,1,2,1,1,2,1,0,3,0,0,1,0,0,2,1,0,1,0,2,1,0,0,1,1,1,1,0,2,2,1,0,2,1,2,0,2,0,0,1,1,
> 0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,2,1,0,1,0,3,0,1,0,0,1,2,0,0,1,1,2,1,1,1,1,0,1,2,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,0,1,1,2,0,0,0,3,2,1,3,0,0,0,1,1,0,0,0,1,1,1,2,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,2,
> 2,1,1,0,0,0,0,1,1,1,0,3,0,1,0,1,0,2,0,0,1,0,1,0,1,1,0,0,0,1,3,2,0,0,0,1,2,0,0,0,0,2,2,2,0,0,2,0,1,1,0,0,2,2,0,1,1,0,2,1,1,0,0,1,0,0,0,1,0,0,1,2,1,2,0,0,0,1,1,1,1,0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,1,1,1,0,
> 1,1,0,1,0,0,1,1,2,1,2,0,0,2,0,2,1,1,0,0,0,0,0,0,0,1,0,3,1,1,0,1,0,1,1,0,0,1,0,1,0,1,3,1,0,0,1,0,1,0,2,2,0,1,0,0,1,1,1,0,0,1,0,0,0,1,0,2,0,0,0,1,2,2,1,1,0,1,1,0,0,1,1,0,0,0,2,1,2,1,0,1,0,0,0,1,2,1,0,3,
> 1,1,0,1,1,0,1,2,1,1,2,1,0,0,1,1,0,0,0,1,0,1,0,0,1,0,1,1,1,2,1,0,0,0,0,0,0,1,0,2,0,1,1,0,0,0,0,0,0,0,1,1,2,0,0,0,0,1,3,2,1,0,0,1,0,1,0,0,0,1,1,1,0,0,1,0,1,2,0,0,0,2,1,1,1,1,2,1,1,0,0,0,2,1,1,0,1,0,1,0,
> 1,1,1,1,1,1,1,0,1,0,0,1,0,0,0,0,0,3,1,2,1,1,0,2,1,0,1,0,2,1,0,0,0,0,0,0,1,1,0,0,0,1,1,1,0,0,0,1,0,3,0,1,1,1,0,0,0,0,0,0,1,0,0,1,0,0,0,3,0,0,1,2,0,0,0,1,0,3,2,0,0,0,2,0,0,0,0,0,1,3,0,3,1,0,2,0,1,1,0,1,
> 3,0,1,1,0,0,0,1,0,0,0,0,1,1,1,0,0,1,0,2,0,2,1,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,0,0,0,0,2,0,1,1,0,2,0,0,3,1,1,1,3,2,0,0,0,1,3,2,0,1,0,3,0,0,0,0,1,2,0,0,0,0,1,2,0,0,1,2,2,0,2,0,0,1,0,1,1,0,0,1,0,1,1,1,
> 0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,1,1,1,0,1,3,0,1,1,0,2,1,0,2,1,1,0,1,0,1,0,1,1,2,0,2,1,1,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,2,0,0,2,0,1,3,0,0,1,1,2,1,0,2,1,1,1,1,0,1,0,3,0,0,0,1,0,0,0,
> 1,1,0,2,0,0,0,1,0,0,1,1,0,1,1,0,1,2,0,1,1,0,0,3,0,1,0,1,0,2,2,2,0,1,0,0,0,0,0,0,0,0,0,1,1,0,2,2,1,1,1,0,0,0,1,0,0,2,0,2,1,2,0,0,2,0,0,1,0,1,1,0,1,0,0,0,0,2,1,1,0,0,0,0,0,0,0,0,1,1,2,0,1,0,2,1,1,2,0,1,
> 2,1,0,0,0,1,0,1,0,0,0,0,0,1,0,2,1,0,1,1,0,1,0,0,0,1,3,0,0,0,0,0,1,2,0,0,1,1,1,1,0,0,0,1,1,0,0,1,3,1,1,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,2,1,2,2,0,0,0,2,1,0,0,1,0,1,0,1,0,0,1,2,0,2,0,0,0,1,1,0,0,0,1,1,0,0,
> 2,0,0,1,1,1,0,0,1,2,1,1,1,1,1,0,0,1,0,0,0,0,0,0,1,0,3,1,1,3,1,0,1,1,0,1,0,1,1,3,0,1,0,0,1,1,1,0,0,1,2,1,2,1,1,0,0,1,2,2,0,0,0,1,1,2,1,0,1,1,1,2,1,0,0,0,1,0,0,1,2,0,0,2,0,0,0,2,0,1,0,0,0,0,1,0,0,0,0,1,
> 0,2,0,0,0,1,0,3,1,0,1,0,2,0,1,2,0,0,0,0,2,1,1,1,2,0,0,0,0,2,0,1,0,0,0,1,1,1,0,1,0,1,1,0,0,0,0,0,3,2,0,0,0,1,0,2,0,1,1,1,1,0,0,0,1,0,0,1,2,0,2,2,0,1,1,0,1,0,1,1,1,0,0,2,1,0,1,0,1,0,0,0,1,0,1,0,0,0,0,1,
> 0};
>
> int main()
> {
> int n;
> while(scanf("%d",&n),n)
> {
> printf("%d\n",a[n]); }
>
>
> }
>
```
Followed by: | 20,405 | 20,885 | {"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.765625 | 3 | CC-MAIN-2018-05 | longest | en | 0.483139 |
http://mathematicssolution.com/continuous-functionlecture-1/ | 1,501,209,316,000,000,000 | text/html | crawl-data/CC-MAIN-2017-30/segments/1500549436321.71/warc/CC-MAIN-20170728022449-20170728042449-00021.warc.gz | 197,645,799 | 11,265 | BIGtheme.net http://bigtheme.net/ecommerce/opencart OpenCart Templates
Friday , July 28 2017
Home / Topology / Continuous function|Lecture-1
# Continuous function|Lecture-1
Definition: Let (X, T) and (Y, T*) be topological spaces. A function f from X into Y is continuous relative to T and T*, Or, T-T* continuous or simply continuous, if and only if the inverse image f-1[H] of every T* open subset H of Y is a T – open subset of X, that is, if and only if
H T* implies f-1[H] T.
Example: Consider the following topologies on
X = {a, b, c, d} and Y = {x, y, z, w} respectively:
T = {X, ∅, {a}, {a, b}, {a, b, c}}, T* = {Y, ∅, {x}, {y}, {x, y}, {y, z,w}}
Also consider the function f:XY and g: X Y defined by the diagrams
The function f is continuous since the inverse of each member of the topology T* on Y is a member of the topology T on X. The function g is not continuous since
{y, z, w} T*, i.e., is an open subset of Y, but its inverse image
g -1[{y, z, w}] = {c, d} is not an open subset of X, i.e., does not belong to T.
Theorem: Let the function f: X Y and g: XY be continuous. Then the composition function g o f : X Z is also continuous.
Proof: Let G be an open subset of Z. Then g -1[G] is open in Y since g is continuous. But f is also continuous, so f -1[g -1[G]] is open in X. Now
[g o f] -1[G] = f -1[g -1[G]]
Thus f -1[g -1[G]] is open in X for every open subset G of Z, or, g o f is continuous. (Proved)
Theorem: A function f: XY is continuous if and only if the inverse image of every closed subset of Y is a closed subset of X.
Proof: Suppose f: XY is continuous, and let F be a closed subset of Y. Then Fc is open, and so f -1[Fc] is open in X. But f -1[Fc] = (f -1[F])c; therefore f -1[F] is closed.
Conversely, assume F closed in Y implies f -1[F] closed in X. Let G be an open subset of Y. Then Gc is closed in Y, and so f -1[Gc] = (f -1[F])c is closed in X. Accordingly, f -1[F] is open and therefore f is continuous. (Proved)
Theorem: Let X and Y be topological spaces. Then a function f:XY is continuous if and only if it is continuous at every point p X.
Proof: Assume f is continuous, and let H Y be an open set containing f(p). But then p f –1 [H], and f –1 [H] is open. Hence f is continuous at p.
Now suppose f is continuous at every point p X, and let H Y be open. For every p f – 1 [H], there exists an open set GpX such that p Gp f –1 [H]. Hence f 1 [H] = ⋃ {Gp: p∊ f –1 [H]} a union of open sets. Accordingly, f –1 [H] is open and so f is continuous. (Proved)
## Accumulation point| Topology
Accumulation point: Let X be a topological space. A point p ∊ X is an ... | 843 | 2,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} | 4.03125 | 4 | CC-MAIN-2017-30 | latest | en | 0.939225 |
https://www.jiskha.com/questions/217835/two-stunt-drivers-drive-directly-toward-each-other-at-time-t-0-the-two-cars-are-a | 1,610,920,528,000,000,000 | text/html | crawl-data/CC-MAIN-2021-04/segments/1610703513194.17/warc/CC-MAIN-20210117205246-20210117235246-00798.warc.gz | 838,343,081 | 5,796 | # Physics
Two stunt drivers drive directly toward each other. At time t=0 the two cars are a distance D apart, car 1 is at rest, and car 2 is moving to the left with speed v_0. Car 1 begins to move at t=0, speeding up with a constant acceleration a_x. Car 2 continues to move with a constant velocity.
Find the speed of car 1 just before it collides with car 2.
Note: The correct answer does not depend on the variable: t
1. 👍
2. 👎
3. 👁
1. Two stunt drivers drive directly toward each other. At time t=0 the two cars are a distance D apart, car 1 is at rest, and car 2 is moving to the left with speed Vo. Car 1 begins to move at t=0, speeding up with a constant acceleration Ax. Car 2 continues to move with a constant velocity.
Find the speed of car 1 just before it collides with car 2.
D = the distance between them at t = 0.
V2 = the constant velocity of car 2.
A = the constant acceleration of car 2.
x = the time of travel of car 2 to impact with catr 1.
t = the time of travel to impact.
1--t = x/V2 or x = tV2
2--D - x = At^2/2
3--D - x + x = D = At^2/2 + tV2
4--At^2/2 + tV2 - D = 0
5--At^2 + 2tV2 - 2D = 0
---t = [sqrt(V2^2 + 2DA)- V2]/a
7--From Vf = Vo + At, the final velocity of car 1 at impact is
---Vf1 = sqrt(V2^2 + 2DA) - V2
Example:
D = 1000 miles
V2 = 100 miles/hr
A = 10 miles/hr^2
After a few guesses, x = 732 miles from which t = 7.32 hr, from which (D - x) = 268 miles which should equal AT^2/2 = 10(7.32)^2/2 = 268 miles and Vf = At = 73.2 mph.
Using Vf1 = sqrt(V2^2) + 2DA0) - V2,
Vf1 = sqrt((100^2) 2(1000)10 - 100 = 73.2mph.
Therefore, Vf1 = sqrt(V2^2 + 2DA) - V2
1. 👍
2. 👎
2. lol
1. 👍
2. 👎
## Similar Questions
1. ### Algebra
Buses on your route run every 13 minutes from 7:00 a.m. you arrive at the bus stop at 8:46 a.m. How long will you wait for your next bus ? a 2 minutes b 6 minutes c 7 minutes d 11 minutes *** What is the domain of the function
2. ### algebra
morgan saw 10 blue cars 8 red cars and 42 white cars drive by her house in 1 hour what is the experimental probability that the next car will not be white
3. ### Physics
In an elastic collision, a 300 kg bumper car collides directly from behind with a second, identical bumper car that is traveling in the same direction. The initial speed of the leading bumper car is 4.90 m/s and that of the
4. ### sociology
There are 35 cars backed up at the intersection because of an accident. Which sociological term best describes these 35 drivers?
1. ### Physics
Need Help with physics! Two cars drive on a straight highway. At time t = 0, car 1 passes mile marker 0 traveling due east with a speed of 17.0 m/s. At the same time, car 2 is 1.3 km east of mile marker 0 traveling at 30.0 m/s due
2. ### math
A drivers distance varies directly as the amount of time traveled. After six hours, a driver had traveled 390 miles. How far had the driver traveled after 4 hours?
3. ### trigonometry
An airplane is flying at an elevation of 5150 ft, directly above a straight highway. Two motorists are driving cars on the highway on opposite sides of the plane, and the angle of depression to one car is 35° and to the other is
4. ### algebra 1
Suppose that the function f(x)=6x+4 represents the number of cars that drive by in x minutes. how many cars will drive by in 10 minutes? A. 60 B. 100** C.46 D.64
1. ### Math
Suppose that the function f(x) = 7x + 2 represents the number of cars that drive by in x minutes. How many cars will drive by in 10 minutes? A.) 27 B.)
2. ### math
ervin sells vintage cars. every three months, he manages to sell 13 cars. assuming he sells cars at a constant rate, what is the slope of the line that represents this relationship if time in months is along the x-axis and the
3. ### math
It was once said that Country-Western songs emphasize three basic themes: love, prison, and trucks. A survey of the local Country- Western radio station produced the following data: 12 songs about a truck driver who is in love
4. ### Physics
A stunt driver wants to make his car jump over 8 cars parked side by side below a horizontal ramp. A)With what minimum speed must he drive off the horizontal ramp? The vertical height of the ramp is 1.5 m above the cars and the | 1,257 | 4,209 | {"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-2021-04 | latest | en | 0.916962 |
https://www.enotes.com/homework-help/sketch-graph-following-function-y-x-2-5x-14-x-2-49-460644 | 1,516,335,944,000,000,000 | text/html | crawl-data/CC-MAIN-2018-05/segments/1516084887729.45/warc/CC-MAIN-20180119030106-20180119050106-00249.warc.gz | 884,615,255 | 10,003 | # Sketch a graph of the following function: y= x^2-5x-14/x^2-49 Also include how to determine the a)x- and y- intercepts (if any) b) Vertical Asymptotes and/ or Holes (if any) c) Long Range...
Sketch a graph of the following function: y= x^2-5x-14/x^2-49
Also include how to determine the a)x- and y- intercepts (if any)
b) Vertical Asymptotes and/ or Holes (if any)
c) Long Range Behaviour
d) Points at which the graph crosses its Horizontal or Slant Asymptote (if any)
baxthum8 | Certified Educator
Sketch `y = (x^2-5x-14)/(x^2 - 49)`
x intercept, let y = 0, `(2, 0)`
y-intercept, let x = 0 `(0, 2/7)`
Vertical Asymptotes: x = -7
Horizontal Asymptotes at y = 1.
Long Range Behavior: `y-> 1 as x->-oo`
`y->1` as `x->oo` , `y->oo as x->-7`
`y->-oo` as `x->-7`
Images:
This image has been Flagged as inappropriate Click to unflag
Image (1 of 1) | 318 | 859 | {"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-2018-05 | latest | en | 0.779816 |
https://www.ics.uci.edu/~eppstein/projects/pairs/Methods/ | 1,620,910,692,000,000,000 | text/html | crawl-data/CC-MAIN-2021-21/segments/1620243989916.34/warc/CC-MAIN-20210513111525-20210513141525-00531.warc.gz | 751,224,614 | 2,432 | # Closest Pair Data Structures: Methods
We have designed, analyzed, and implemented several different closest pair data structures. See the papers or source code for more detail. We analyze the times in terms of two parameters: n, the number of objects in the set, and Q, the time per operation to perform insertions, deletions, and nearest neighbor queries in a dynamic set of objects. Our implementations use trivial nearest neighbor searching (just examine the distances to each objects), for which Q=O(n).
Previously known were:
• Brute force. This simply maintains a list of objects, and finds closest pairs by examining all pairs of objects. Insertions and deletions are easy, and space is linear, but queries take time O(nQ) each.
• Neighbor heuristic. We store the nearest neighbor to each object. Each insertion takes linear time, but deletions require recomputing neighbors for any object having the deleted object as its neighbor, and may take as much as O(nQ) time. Space is linear. In many applications, deleted objects are unlikely to have high degree, and the empirically observed time per operation is linear or close to linear.
• Priority queue (not implemented). We store a priority queue data structure (such as a binary heap) containing all the entries in the distance matrix. Space is quadratic, but worst case time per update is O(n log n).
New closest pair data structures:
• Quadtree. We group the entries of the adjacency matrix into 2x2 squares, compute the maximum in each square, interpret these maxima as the distances for a smaller set of n/2 objects, and continue recursively. Space is quadratic, but the worst-case time per operation is linear (optimal unless one assumes some further knowledge about the distance function). This would be the likely method of choice for relatively few objects with very expensive distance computations.
• Conga line. We partition the objects into O(log n) subsets and maintain a graph in each subset, such that the closest pair is guaranteed to correspond to an edge in the graph. Each insertion creates a new subset for the new object; each deletion may move an object from each existing subset to a new subset. In each case, if necessary some pair of subsets is merged to maintain the desired number of subsets. Amortized time per insertion is O(Q log n); amortized time per deletion is O(Q log2 n). Space is linear.
• MultiConga. This is a simplification of the conga line data structure in which we allow the number of subsets to grow arbitrarily, and never merge pairs of subsets. The time per insertion is O(Q); amortized time per deletion is O(Q sqrt n). In practice this is faster than conga lines by a factor of three or more, usually roughly comparible to the neighbor heuristic, and fast even for problems that cause the neighbor heuristic to blow up.
• FastPair. We further simplify conga lines by making separate singleton subsets for the objects moved to new subsets by a deletion. This can alternately be viewed as a modification to the neighbor heuristic, in which the initial construction of all nearest neighbors is replaced by a conga line computation, and in which each insertion does not update previously computed neighbors. Its time both theoretically and in practice is qualitatively similar to the neighbor heuristic, but it typically runs 30% or so faster.
David Eppstein, Information & Computer Science, UC Irvine, . | 705 | 3,419 | {"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-2021-21 | latest | en | 0.925324 |
https://training.digitalearthafrica.org/en/latest/python_basics/03_matplotlib.html | 1,623,991,127,000,000,000 | text/html | crawl-data/CC-MAIN-2021-25/segments/1623487635724.52/warc/CC-MAIN-20210618043356-20210618073356-00139.warc.gz | 510,421,817 | 10,552 | # Python basics 3: Matplotlib¶
This tutorial introduces matplotlib, a Python library for plotting numpy arrays as images. We will learn how to:
To view this notebook on the Sandbox, you will need to first download the notebook and the image to your computer, then upload both of them to the Sandbox. Ensure you have followed the set-up prerequisities listed in Python basics 1: Jupyter, and then follow these instructions:
2. On the Sandbox, open the Training folder.
3. Click the Upload Files button as shown below.
2. Repeat to upload the image file to the Training folder. It may take a while for the upload to complete.
3. Both files will appear in the Training folder. Double-click the tutorial notebook to open it and begin the tutorial.
You can now use the tutorial notebook as an interactive version of this webpage.
Note
The tutorial notebook should look like the text and code below. However, the tutorial notebook outputs are blank (i.e. no results showing after code cells). Follow the instructions in the notebook to run the cells in the tutorial notebook. Refer to this page to check your outputs look similar.
## Introduction to matplotlib’s pyplot¶
We are going to use part of matplotlib called pyplot. We can import pyplot by specifying it comes from matplotlib. We will abbreviate pyplot to plt.
[1]:
%matplotlib inline
# Generates plots in the same page instead of opening a new window
import numpy as np
from matplotlib import pyplot as plt
Images are 2-dimensional arrays containing pixels. Therefore, we can use 2-dimensional arrays to represent image data and visualise with matplotlib.
In the example below, we will use the numpy arange function to generate a 1-dimensional array filled with elements from 0 to 99, and then reshape it into a 2-dimensional array using reshape.
[2]:
arr = np.arange(100).reshape(10,10)
print(arr)
plt.imshow(arr)
[[ 0 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]]
[2]:
<matplotlib.image.AxesImage at 0x7f33279840f0>
If you remember from the last tutorial, we were able to address regions of a numpy array using the square bracket [ ] index notation. For multi-dimensional arrays we can use a comma , to distinguish between axes.
[ first dimension, second dimension, third dimension, etc. ]
As before, we use colons : to denote [ start : end : stride ]. We can do this for each dimension.
For example, we can update the values on the left part of this array to be equal to 1.
[3]:
arr = np.arange(100).reshape(10,10)
arr[:, :5] = 1
plt.imshow(arr)
[3]:
<matplotlib.image.AxesImage at 0x7f33274d7198>
The indexes in the square brackets of arr[:, :5] can be broken down like this:
[ 1st dimension start : 1st dimension end, 2nd dimension start : 2nd dimension end ]
Dimensions are separated by the comma ,. Our first dimension is the vertical axis, and the second dimension is the horizontal axis. Their spans are marked by the colon :. Therefore:
[ Vertical start : Vertical end, Horizontal start : Horizontal end ]
If there are no indexes entered, then the array will take all values. This means [:, :5] gives:
[ Vertical start : Vertical end, Horizontal start : Horizontal start + 5 ]
Therefore the array index selected the first 5 pixels along the width, at all vertical values.
Now let’s see what that looks like on an actual image.
Tip: Ensure you uploaded the file Guinea_Bissau.JPG to your Training folder along with the tutorial notebook. We will be using this file in the next few steps and exercises.
We can use the pyplot library to load an image using the matplotlib function imread. imread reads in an image file as a 3-dimensional numpy array. This makes it easy to manipulate the array.
By convention, the first dimension corresponds to the vertical axis, the second to the horizontal axis and the third are the Red, Green and Blue channels of the image. Red-green-blue channels conventionally take on values from 0 to 255.
[4]:
im = np.copy(plt.imread('Guinea_Bissau.JPG'))
# This file path (red text) indicates 'Guinea_Bissau.JPG' is in the
# same folder as the tutorial notebook. If you have moved or
# renamed the file, the file path must be edited to match.
im.shape
[4]:
(590, 602, 3)
Guinea_Bissau.JPG is an image of Rio Baboque in Guinea-Bissau in 2018. It has been generated from Landsat 8 satellite data.
The results of the above cell show that the image is 590 pixels tall, 602 pixels wide, and has 3 channels. The three channels are red, green, and blue (in that order).
Let’s display this image using the pyplot imshow function.
[5]:
plt.imshow(im)
[5]:
<matplotlib.image.AxesImage at 0x7f33273bb400>
## Exercises¶
### 3.1 Let’s use the indexing functionality of numpy to select a portion of this image. Select the top-right corner of this image with shape (200,200).¶
Hint: Remember there are three dimensions in this image. Colons separate spans, and commas separate dimensions.
[ ]:
# We already defined im above, but if you have not,
# you can un-comment and run the next line
# Fill in the question marks with the correct indexes
topright = im[?,?,?]
# Plot your result using imshow
plt.imshow(topright)
If you have selected the correct corner, there should be not much water in it!
### 3.2 Let’s have a look at one of the pixels in this image. We choose the top-left corner with position (0,0) and show the values of its RGB channels.¶
[ ]:
# Run this cell to see the colour channel values
im[0,0]
The first value corresponds to the red component, the second to the green and the third to the blue. uint8 can contain values in the range [0-255] so the pixel has a lot of red, some green, and not much blue. This pixel is a orange-yellow sandy colour.
Now let’s modify the image.
### What happens if we set all the values representing the blue channel to the maximum value?¶
[ ]:
# Run this cell to set all blue channel values to 255
# We first make a copy to avoid modifying the original image
im2 = np.copy(im)
im2[:,:,2] = 255
plt.imshow(im2)
The index notation [:,:,2] is selecting pixels at all heights and all widths, but only the 3rd colour channel.
## Conclusion¶
We have successfully practised indexing numpy arrays and plotting those arrays using matplotlib. We can now also read a file into Python using pyplot.imread. The next lesson covers data cleaning and masking. | 1,682 | 6,630 | {"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.65625 | 3 | CC-MAIN-2021-25 | longest | en | 0.807456 |
https://brainly.in/question/58054 | 1,484,728,814,000,000,000 | text/html | crawl-data/CC-MAIN-2017-04/segments/1484560280242.65/warc/CC-MAIN-20170116095120-00052-ip-10-171-10-70.ec2.internal.warc.gz | 822,105,314 | 10,670 | # If the momentum of a body increases by 10% then what is the percentage increase in the kinetic energy of the object? Answer - 40% I know the answer but don't know how to solve it. Could somebody please help?
2
by kunal322
2014-11-27T21:20:15+05:30
100*0.1=10
so k.e increses by [(0.1+1)^2-1]100
=[1.21-1]100
=0.21*100
=21%
2014-11-29T05:44:26+05:30
### This Is a Certified Answer
Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
P = m v
KE = 1/2 m v² = p²/2m
p' = p + 10% p = 1.10 p
KE' = p' ² /2m = 1.10² p² /2 m = 1.21 KE
Hence it increases by (1.21- 1.00)*100 = 21%
that number you have mention is not correct.
click on thank you | 295 | 869 | {"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.546875 | 4 | CC-MAIN-2017-04 | latest | en | 0.913664 |
http://www.jiskha.com/display.cgi?id=1292297249 | 1,498,405,060,000,000,000 | text/html | crawl-data/CC-MAIN-2017-26/segments/1498128320539.37/warc/CC-MAIN-20170625152316-20170625172316-00297.warc.gz | 564,370,742 | 3,870 | # math
posted by .
which set is infinite?
P = {positive numbers less than 60}
Q = {whole numbers between 10 and 20}
R = {intergers ge=reater than 18}
S = {even numbers between 5 and 15}
• math -
R because the others all have set limitations. R is the only one that makes sense! Since numbers can go on forever that means numbers greater than 18 would be infinite! | 96 | 368 | {"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.234375 | 3 | CC-MAIN-2017-26 | latest | en | 0.944496 |
https://www.gamedev.net/forums/topic/466633-poker-hand-combinations/ | 1,542,407,855,000,000,000 | text/html | crawl-data/CC-MAIN-2018-47/segments/1542039743216.58/warc/CC-MAIN-20181116214920-20181117000920-00355.warc.gz | 896,604,724 | 31,094 | # Poker Hand Combinations!
This topic is 4064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.
## Recommended Posts
Hi guys! I'm trying to figure out an algorithm to give me all unique combinations of 5 card hands given a set of 13 cards. I've already got a function to determine whether or not a hand is a valid poker hand, so what i'm trying to do is write a function that will give me just the set of unique 5 card combinations within my 13 card hand. Once that's done I'll simply use my function to decide which of those hands are valid poker hands or not. I did a quick search on google for "unique combinations algorithm", but what I found seemed a little complex ( or maybe I was just slightly confused by them ) for the simple algorithm I'm trying to create. I was hoping to find something that was pretty straight forward and didn't use recursion. I'm not really going for speed here :) Any ideas? Thanks!
##### Share on other sites
The proper term which describes the problem you need is "permutation".
But since this is a very common interview and assignment question, I'm not really sure if I'd like to suggest anything else.
##### Share on other sites
Quote:
Original post by AntheusThe proper term which describes the problem you need is "permutation".
Actually, unless I'm mistaken, a permutation is a specific ordering of a subset. He does not want to take order into account because the order of cards in your hand doesn't matter.
He's going for a combination (as he mentions in his post title).
##### Share on other sites
Ok, fair enough. It's for a card game I'm making. I'm out of school and already have a job .... so I'm not looking to cheat on an assignment or job interview :) But thank you for the correction in terms. Maybe I'll have a better time searching around on google using "permutations" rather than "combinations".
##### Share on other sites
Yes, you're right Simian Man. Order doesn't matter in my situation since:
( A 2 3 4 5 ) is the same as ( 4 3 A 5 2 ) in poker of course.
##### Share on other sites
The mini C++ program below is based on the C code from here.
It doesn't do exactly what you want (and does use recursion :)), but finds all possible combinations. Once you've got all of these you could sort and cheque for uniqueness, and then check for valid poker hands I guess.
#include <cstdlib>#include <fstream>#include <vector>// The number of cards to go through to find hands.unsigned const int INPUT_SIZE = 13;// The size of our hand.unsigned const int HAND_SIZE = 5;// Our input cards.std::vector<int> input;// A vector to contain all the possible hands.std::vector<std::vector<int> > output;// The recursive function that finds the combinations.void enumerate(std::vector<int> temp, int n_i) { if (temp.size() == HAND_SIZE) { output.push_back(temp); } else { for (unsigned int i = n_i; i < INPUT_SIZE; i++) { temp.push_back( input ); enumerate(temp, i+1); temp.erase( --temp.end() ); } }}int main(int argc, char *argv[]) { std::ofstream outstream("output.txt"); // Add 13 random integers between 1 and 13 to the input vector. // (and print them to our output file). outstream << "Input:\n"; for (unsigned int i = 0; i != INPUT_SIZE; ++i) { input.push_back( 1 + rand()%13); outstream << input.back() << std::endl; } outstream << std::endl; // Create a temp vector just to pass in. std::vector<int> temp; enumerate(temp, 0); // Print the output. outstream << "Outputting " << output.size() << " combinations" << ":" << std::endl; for (std::vector<std::vector<int> >::iterator i = output.begin(); i != output.end(); ++i) { outstream << 1 + i - output.begin() << ":"; for (std::vector<int>::iterator j = i->begin(); j != i->end(); ++j) { outstream << "\t" << (*j); } outstream << std::endl; } outstream << "Done!" << std::endl; return EXIT_SUCCESS;}
[Edited by - sprite_hound on October 1, 2007 4:10:30 PM]
##### Share on other sites
Thanks for the response. I was able to figure out a brute force way that seems pretty straight forward to me :)
#include <stdio.h>#define NUM_HAND_CARDS ( 13 )#define NUM_COMBO_CARDS ( 5 )#define MAX_COMBOS ( 10000 )int main(){ char hand[ NUM_HAND_CARDS ] = { '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A' }; char combos[ MAX_COMBOS ][ NUM_COMBO_CARDS ]; int numCombos = 0; // Find combos for( int i = 0; i < NUM_HAND_CARDS; i++ ) { for( int j = i + 1; j < NUM_HAND_CARDS; j++ ) { for( int k = j + 1; k < NUM_HAND_CARDS; k++ ) { for( int m = k + 1; m < NUM_HAND_CARDS; m++ ) { for( int p = m + 1; p < NUM_HAND_CARDS; p++ ) { // Check if each card is active first combos[ numCombos ][ 0 ] = hand[ i ]; combos[ numCombos ][ 1 ] = hand[ j ]; combos[ numCombos ][ 2 ] = hand[ k ]; combos[ numCombos ][ 3 ] = hand[ m ]; combos[ numCombos ][ 4 ] = hand[ p ]; numCombos++; } } } } } // Print combos for( int i = 0; i < numCombos; i++ ) { printf( "( %c, %c, %c, %c, %c )\n", combos[ i ][ 0 ], combos[ i ][ 1 ], combos[ i ][ 2 ], combos[ i ][ 3 ], combos[ i ][ 4 ] ); } // Wait for input before closing getchar(); return 0;}[\source]
Thanks for the responses! :)
1. 1
Rutin
36
2. 2
3. 3
4. 4
5. 5
• 12
• 14
• 9
• 9
• 14
• ### Forum Statistics
• Total Topics
633346
• Total Posts
3011443
• ### Who's Online (See full list)
There are no registered users currently online
× | 1,570 | 5,580 | {"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.59375 | 4 | CC-MAIN-2018-47 | latest | en | 0.96844 |
http://inglorion.net/documents/essays/just-numbers/ | 1,701,987,792,000,000,000 | application/xhtml+xml | crawl-data/CC-MAIN-2023-50/segments/1700679100705.19/warc/CC-MAIN-20231207221604-20231208011604-00878.warc.gz | 23,166,840 | 5,738 | It's All Just Numbers
# It's All Just Numbers
2010-12-11
## Introduction
These days, many people work with computers on a daily basis. Many of us own computers, and many of us even perform various degrees of maintenance on them. Despite this, comparatively few people have a solid understanding of how computers actually work. To many, computers work as if by magic. This makes it difficult to understand what capabilities a computer is likely to have, difficult to understand and solve any problems that may occur, and, on a personal note, difficult for me to explain the work I do. In this essay, I propose thinking of computers as performing simple operations on numbers. This is a simple mental model that doesn't require much prior knowledge of computers, but is also accurate enough that it explains many of the behaviors and limitations of computers.
## What You See Is an Illusion
When you interact with your computer, you probably use keyboard and mouse to enter text, click buttons, open and close windows, etc. It is as if the windows and buttons you see, the text you enter, and the images that the computer displays are physically there. This is an illusion. Your computer does not have any notion of windows, buttons, or images. This is significant, because things, both good things and bad things, can happen without there being any obvious relation with what you see on the screen. You've probably experienced this: suddenly, the normal operations don't work anymore; buttons that don't do anything when clicked on, windows that cannot be closed, notifications popping up about updates having been downloaded, without you having taken any action, etc. Some of you might even have experienced the Blue Screen of Death, or sudden reboots: suddenly, all your windows and text and images are gone, replaced by a blue screen with an error message, or the display that indicates your computer is starting up. The illusion has been shattered.
## Memory
You may have heard that, inside a computer, everything is ones and zeroes; on or off. This is sort of true, at an electrical level. However, that is at a lower level than I want to go. What a computer actually does is process numbers. The numbers the computer operates on are stored in its memory. A computer has various types of memory; CDs and DVDs are memory, USB memory sticks are a kind of memory, etc. The one I'm interested in here is the working memory, so named because it contains the numbers the computer is currently working on. This memory is almost always volatile, meaning that if you turn off the computer, if the battery runs out, or there is a power outage, the contents of the memory are lost. Probably, you've experienced situations like that.
This working memory basically consists of a large number of cells (easily in the trillions), each of them capable of holding a number. So the contents of the first four cells of the memory might be 42, 123, 688, and 120. What do these numbers mean? Well, nothing, really. They're just numbers. They only start to be meaningful when you start interpreting them. For example, if you interpret the contents of people's bank accounts, you might conclude that one person has 42 dollars in his account, whereas the next person has 123 dollars, and so on. So the second person has more money than the first one. But maybe the numbers are debts, instead. Or maybe they have completely different meanings. Maybe they don't have any meaning at all, but are just there because a failure in the memory put them there.
## Instructions
One possible interpretation of the numbers in the memory of the computer is as instructions. You can imagine making up a sort of code, where 1 means "take a step forward", 2 means "turn left", etc. Computers work that way. They read numbers from memory, and do what the numbers tell them to. After they read one number and do what the number tells them to, they read the number from the next cell in memory (unless, of course, the number they just read told them to do otherwise), and do what that number instructs them to do.
The instructions that can be given to a computer are simple operations on numbers. The computer can do things like adding numbers, comparing if two numbers are equal, etc. It can also change the contents of memory cells, or specify that the next instruction should be read not from the next cell after the last instruction, but from a different cell. Which cell to read a number from, or which cell to write a number to, is specified by an address, which is itself just a number. The first cell has address 0, the next one address 1, the next one after that number 2, and so on. The important thing is, it's all just numbers. There's no concept of windows or even text, as far as the computer is concerned.
## Conjuring Up the Illusion
So what about the windows and buttons and text and images? Are they just numbers, too? Indeed, they are. In fact, the image you see on the monitor consists of a large number of dots, called pixels, short for pixel elements. Each pixel has a color, and the color is ... a number. Basically, the computer puts images on your screen by writing a lot of numbers to a lot of memory cells, that are then interpreted as colors and displayed on the monitor (by another kind of computer). In a similar way, a computer plays sound by feeding a lot of numbers to a computer which interprets them as voltages to feed to a speaker, and computers are used to control car brakes and fly airplanes in similar ways.
## Programming
When people like me program computers, what we're really doing is putting a lot of numbers in the computer, that will (hopefully) tell the computer to do what we want it to do. Usually, we don't actually input the numbers corresponding to the instructions that the computer understands (although this is certainly possible). Instead, we input text, much like one might input an email. Internally, of course, this text consists of numbers, and there are programs which will convert these to the numbers the computer understands. We get to enter and see vaguely English-like words, which we understand; the computer gets to see a lot of numbers that it can understand, and that's how we're able to get the computer to do what we want.
Since the numbers that we enter are, at first, completely meaningless to the computer (much as they would be to us, without being told how to interpret them), there are various ways to translate these to numbers that do have a clear meaning to the computer. This gives rise to a multitude of programming languages, each with their own merits and downfalls, which are subject to much and heated discussion.
## Bugs
Before, I've said that memory contains numbers, and that these numbers are meaningless until you interpret them. They could be account balances, and they could be instructions to the computer. So what would happen if the computer mistook a bank account number for an instruction? Well, it depends on what the number means, when interpreted as an instruction. It's a safe bet, however, that this instruction is not going to be constructive to the illusion of images and text that the computer displays. The next instruction will worsen things, and so on, until, eventually, anything might happen, but it usually means your computer crashes and you lose any work you hadn't saved.
How could it happen that the computer starts misinterpreting the numbers in its memory? Well, there is a slight chance that something goes wrong with the hardware; perhaps it is defective, or perhaps a bit of radiation (which is all around us) changed the value of some number in memory, causing the wrong thing to happen. Vastly more likely, however, is that the person who wrote the program that you're running made a mistake, which caused the wrong numbers to be present in the program you were running, causing the computer to dutifully do the wrong thing. This is known as a bug; probably in an attempt by us, the programmers, to make it look like it wasn't our fault; a bug got in the machine!
## Taking Over Another Computer
Often, bugs can be exploited by malicious people to crash or take control of another system. Again, this is easy to understand if you keep in mind that everything the computer operates on consists of numbers. A program that displays an image has to load this image (at least parts of it) into memory. Doing so overwrites whatever was previously in those memory cells. If the program doesn't take proper care of things, it may be possible that things get overwritten in such a way that the computer starts interpreting whatever numbers are in the image as instructions. Someone who knows how to could use this to create an image that causes your computer to do whatever he wants, for example, sending out spam. Of course, this trick works not only for images, but for anything that has numbers in it. That is to say, anything at all.
This is but one example of how your computer might be taken over by an attacker. However, it is about the most mysterious type of attack that does commonly happen. How can viewing an image give people access to your computer? Well, you see, you're not really viewing an image as far as the computer is concerned; you're feeding it numbers, and these numbers might mean anything at all. However, keep in mind that (barring hardware failures, which are really quite rare), these sorts of failures are only possible due to faulty software. If the software hadn't contained the bug that allowed the attacker to cause your computer to misinterpret the numbers it sees, nothing bad would have happened.
## Conclusion
I hope this essay has given you a better understanding of why computers behave the way they do. It's all just numbers and suggestions, or comments, please do not hesitate to contact me or post a reply. | 2,053 | 9,853 | {"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.6875 | 3 | CC-MAIN-2023-50 | latest | en | 0.960438 |
https://brainmass.com/statistics/probability/354530 | 1,529,274,629,000,000,000 | text/html | crawl-data/CC-MAIN-2018-26/segments/1529267859817.15/warc/CC-MAIN-20180617213237-20180617233237-00548.warc.gz | 584,215,386 | 18,242 | Explore BrainMass
Share
# Statistics
An insurance company charges a 21 year old male a premium of \$250 for a one year \$100,000 life insurance policy. A 21 year old male has a 0.9985 probability of living for a year.
From the perspective of a 21 year old male (or his estate), what are the values of the two different outcomes
The value if he lives is \$_______
The value if he dies is \$_______
What is the expected value for a 21 year old male who buys the insurance
The expected value is \$_______
What would be the cost of the insurance if the company just breaks even (in the long run with many such policies), instead of making a profit?
\$______ | 158 | 658 | {"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-2018-26 | latest | en | 0.92566 |
http://www.python-forum.org/viewtopic.php?p=2255 | 1,502,956,608,000,000,000 | text/html | crawl-data/CC-MAIN-2017-34/segments/1502886102993.24/warc/CC-MAIN-20170817073135-20170817093135-00121.warc.gz | 652,390,071 | 6,831 | ## Beginner in Functions
This is the place for queries that don't fit in any of the other categories.
### Beginner in Functions
Hey Guys,
i am learning python and am going through tutorials. I am on functions and the below example is stuck in a loop asking me for the option. can you help or suggest what i am doing wrong?
thank you!
Code: Select all
`def menu(): #print what options you have print ("Welcome to calculator.py") print ("your options are:") print (" ") print ("1) Addition") print ("2) Subtraction") print ("3) Multiplication") print ("4) Division") print ("5) Quit calculator.py") print (" ") return input ("Choose your option: ") # this adds two numbers givendef add(a,b): print (a, "+", b, "=", a + b) # this subtracts two numbers givendef sub(a,b): print (b, "-", a, "=", b - a) # this multiplies two numbers givendef mul(a,b): print (a, "*", b, "=", a * b) # this divides two numbers givendef div(a,b): print (a, "/", b, "=", a / b) # NOW THE PROGRAM REALLY STARTS, AS CODE IS RUNloop = 1choice = 0 while loop == 1: choice = (menu()) if choice == 1: add(input("Add this: "),input("to this: ")) elif choice == 2: sub(input("Subtract this: "),input("from this: ")) elif choice == 3: mul(input("Multiply this: "),input("by this: ")) elif choice == 4: div(input("Divide this: "),input("by this: ")) elif choice == 5: loop = 0print ("Thankyou for using calculator.py!")`
Last edited by glenmoe85 on Tue Apr 02, 2013 8:51 pm, edited 1 time in total.
glenmoe85
Posts: 7
Joined: Mon Apr 01, 2013 3:58 pm
### Re: Beginner in Functions
Due to the reasons discussed here we will be moving to python-forum.io/ on October 1 2016
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
Yoriz
Posts: 1672
Joined: Fri Feb 08, 2013 1:35 am
Location: UK
### Re: Beginner in Functions
can anyone help me with this issue. I have googled the hell out of this and i know the solution is obvious but at the moment i dont see it (from looking at it to much).
thankyou!
glenmoe85
Posts: 7
Joined: Mon Apr 01, 2013 3:58 pm
### Re: Beginner in Functions
Yoriz was refering to the fact that your code is not in code tags.
I mean i could guess your code's indentation, but i am not going to.
we will be moving to python-forum.io on October 1 2016
more details here
metulburr
Posts: 2244
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY
### Re: Beginner in Functions
Code: Select all
`def menu(): #print what options you have print ("Welcome to calculator.py") print ("your options are:") print (" ") print ("1) Addition") print ("2) Subtraction") print ("3) Multiplication") print ("4) Division") print ("5) Quit calculator.py") print (" ") return input ("Choose your option: ")# this adds two numbers givendef add(a,b): print (a, "+", b, "=", a + b)# this subtracts two numbers givendef sub(a,b): print (b, "-", a, "=", b - a)# this multiplies two numbers givendef mul(a,b): print (a, "*", b, "=", a * b)# this divides two numbers givendef div(a,b): print (a, "/", b, "=", a / b)# NOW THE PROGRAM REALLY STARTS, AS CODE IS RUNloop = 1choice = 0while loop == 1: choice = (menu()) if choice == 1: add(input("Add this: "),input("to this: ")) elif choice == 2: sub(input("Subtract this: "),input("from this: ")) elif choice == 3: mul(input("Multiply this: "),input("by this: ")) elif choice == 4: div(input("Divide this: "),input("by this: ")) elif choice == 5: loop = 0print ("Thankyou for using calculator.py!")`
what is your problem to be exact?, since that code working good for me
and yes, going by that code, you'll indeed stuck on a loop until you pick 5 to quit the program.
Posts: 12
Joined: Sun Mar 31, 2013 4:48 pm
### Re: Beginner in Functions
Thanks for the replies.
If I pick option 1 - 4, the question repeats. If I pick 5 it does the same, it just repeats the question.
glenmoe85
Posts: 7
Joined: Mon Apr 01, 2013 3:58 pm
### Re: Beginner in Functions
This code seems to be written for python 2.
If you're using python 3, it will not work properly.
The main reason is the difference in the way input() works.
In python 2, it evaluated the input, and it's use was discouraged.
In python 3, it returns the input as string, like raw_input() in python 2.
To convert your input to a number, use int()/float()/whatever, depending on your needs.
Friendship is magic!
R.I.P. Tracy M. You will be missed.
stranac
Posts: 1790
Joined: Thu Feb 07, 2013 3:42 pm
### Re: Beginner in Functions
that works!!!! thank you so much for your help!
glenmoe85
Posts: 7
Joined: Mon Apr 01, 2013 3:58 pm | 1,442 | 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} | 3.1875 | 3 | CC-MAIN-2017-34 | latest | en | 0.48944 |
http://mathoverflow.net/revisions/28839/list | 1,368,970,230,000,000,000 | text/html | crawl-data/CC-MAIN-2013-20/segments/1368697552127/warc/CC-MAIN-20130516094552-00013-ip-10-60-113-184.ec2.internal.warc.gz | 169,660,687 | 4,868 | 2 fixed tags
1
# Easy to find roots
Is there a smooth function $f:\mathbb{R} \to \mathbb{R}_{\geq 0}$ such that:
1) $\lim_{x \to \infty} = \lim_{x \to -\infty} = 0$
2) $\forall x > 0$, $f'(x) < 0$
3) $\forall x < 0$, $f'(x) > 0$
4) $\forall a_1, \ldots, a_n \in \mathbb{R}, K \in \mathbb{R}_{\geq 0}$ the roots of $g(x) = (\sum_{i=1}^n f(x - a_i)) - K$ are "easy to find" (i.e. have an explicit formula in terms of $a_i$ and $K$ for each of them).
My initial guesses were $f(x) = \frac{1}{x^2+1}$ and $f(x) = \exp(-x^2)$ but both fail on part 4. | 241 | 552 | {"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.640625 | 3 | CC-MAIN-2013-20 | latest | en | 0.666193 |
https://petlja.org/biblioteka/r/lekcije/jupyter-international/frequency-analysis-and-pie-charts | 1,606,666,573,000,000,000 | text/html | crawl-data/CC-MAIN-2020-50/segments/1606141201836.36/warc/CC-MAIN-20201129153900-20201129183900-00230.warc.gz | 415,244,821 | 68,803 | # Obeleži sve kategorije koje odgovaraju problemu
### Još detalja - opišite nam problem
Uspešno ste prijavili problem!
Status problema i sve dodatne informacije možete pratiti klikom na link.
Nažalost nismo trenutno u mogućnosti da obradimo vaš zahtev.
Molimo vas da pokušate kasnije.
# 5. Frequency analysis and pie charts¶
In this lecture you will learn:
1. how to perform a frequency analysis of a sequence of data (which is just a fancy name for a simple thing); and
2. how to display data on a pie chart.
## 5.1. Frequency analysis¶
Frequency analysis of a sequence of values consists of counting how many times each value occurs in the sequence. As simple as that. The numbers that we get are called frequences. Nevertheless, this simple analysis can provide a significant insight into the problem we are interested in. It is even used in cryptoanalysis, but this is far beyond the scope of this handbok.
For example there are 30 students in a class and their Maths marks are:
In [1]:
marks = ["C", "B", "A", "B", "A", "C", "B", "A", "D", "B", "A", "B", "A", "B", "D", "C", "F", "B", "A", "B", "C", "D", "C", "B", "A", "B", "A", "A", "B", "C"]
The frequency analysis of this sequence reduces to counting how many A's there are in the sequence, then how many B's, and so on. Instead of doing it by hand we'll let Python do it for us using the built-in function count:
In [2]:
markA = marks.count("A")
markB = marks.count("B")
markC = marks.count("C")
markD = marks.count("D")
markF = marks.count("F")
print("The distribution of marks:")
print("A ->", markA)
print("B ->", markB)
print("C ->", markC)
print("D ->", markD)
print("F ->", markF)
The distribution of marks:
A -> 9
B -> 11
C -> 6
D -> 3
F -> 1
The numbers we have thus obtained are absolute frequencies. Often we are interested in relative frequencies, which are absolute frequences expressed as a percentage.
In [3]:
N = len(marks)
percentageA = 100.0 * markA / N
percentageB = 100.0 * markB / N
percentageC = 100.0 * markC / N
percentageD = 100.0 * markD / N
percentageF = 100.0 * markF / N
print("The relative distribution of marks:")
print("A -> ", round(percentageA, 2), "%", sep="")
print("B -> ", round(percentageB, 2), "%", sep="")
print("C -> ", round(percentageC, 2), "%", sep="")
print("D -> ", round(percentageD, 2), "%", sep="")
print("F -> ", round(percentageF, 2), "%", sep="")
The relative distribution of marks:
A -> 30.0%
B -> 36.67%
C -> 20.0%
D -> 10.0%
F -> 3.33%
Therefore, the frequency analysis can provide absolute frequences (how many times does a value occur in the sequence), but also the relative frequences, which are absolute frequences expressed as percentages.
## 5.2. Pie charts¶
In situations where we are interested not so much in the absolute frequences, but more in the relative frequences (that is, we do not care much how many occurences there are, but what percentage that makes in the whole) it is convenient to visualize data as a pie chart. A pie chart is a circle divided into sectors (like a pie or a pizza). The circle then represents the whole (100%) and each sector represents the percentage of the value assigned to the sector.
For example, here is the distribution of the marks from the example above:
Ocena Zastupljenost ocene
A 9
B 11
C 6
D 3
F 1
Let us visualize this using a pie chart. Let us first load the library:
In [4]:
import matplotlib.pyplot as plt
Then we represent the table as two lists:
In [5]:
freqs = [9, 11, 6, 3, 1]
marks = ["A", "B", "C", "D", "F"]
Function pie produces a pie chart. The first argument of pie is a list of numbers (frequences, relative of absolute), while the option labels provides labels of sectors:
In [6]:
plt.figure(figsize=(6,6))
plt.pie(freqs, labels=marks)
plt.title("Marks")
plt.show()
plt.close()
If we wish to stress the number of A's in this class we can use the explode option which expects a sequence of decimal numbers between 0 and 1 which tells the pie function how much to slide the sector away from the center (0 = no sliding; the larger the number, the larger the sliding away from the center).
In [7]:
freqs = [9, 11, 6, 3, 1]
marks = ["A", "B", "C", "D", "F"]
slide = [0.1, 0, 0, 0, 0]
plt.figure(figsize=(6,6))
plt.pie(freqs, labels=marks, explode=slide)
plt.title("Marks")
plt.show()
plt.close()
As another example let us take a look at the structure of our atmosphere. Our atmosphere is a mixture of many gasses but the most dominant ones are:
Gas (%)
Nitrogen 78.08
Oxygen 20.94
Argon 0.93
Carbon dioxide 0.05
Here comes the pie chart:
In [8]:
perc = [78.08, 20.94, 0.93, 0.05]
gas = ["Nitrogen", "Oxygen", "Argon", "Carbon dioxide"]
plt.figure(figsize=(7,7))
plt.pie(perc, labels=gas)
plt.title("The Composition of the Earth's Atmosphere")
plt.show()
plt.close()
We immediately see a problem: labels for the two tiny sectors overlap. To fix that we will slide them out using the explode option:
In [9]:
perc = [78.08, 20.94, 0.93, 0.05]
gas = ["Nitrogen", "Oxygen", "Argon", "Carbon dioxide"]
slide = [0, 0, 0.75, 0.75]
plt.figure(figsize=(7,7))
plt.pie(perc, labels=gas, explode=slide)
plt.title("The Composition of the Earth's Atmosphere")
plt.show()
plt.close()
## 5.3. Exercises¶
Exercise 1. Visualize the population of the continents by a pie chart:
Continent Population
Asia 4,584,807,072
Africa 1,320,038,716
Europe 743,102,600
S. America 658,305,557
N. America 366,496,802
Oceania 41,826,176
Exercise 2. Between 2006 and 2008 the market of optical storage media was a stage of the high definition optical disc format war. As HD became more and more popular, the need for a larger capacity optical disc emerged and the final battle for this market niche was fought between the Blu-ray Disc (BR) and HD-DVD. For more than two years the two formats had almost equal market share but then at the beginning of 2008 something strange happened -- within a week the situation changed drastically. The following table contains the market share of the two formats on January 5th, 2008 and seven days later:
Date Blu-ray Disc HD-DVD
January 5th, 2008 51,17% 48,83%
January 12th, 2008 92,53% 7,47%
So, after two years of bitter fighting Blu-ray won.
(a) Make two independent pie charts to visualize the market share of the two formats on January 5th, 2008 and on January 12th, 2008.
(b*) Search the Internet and try to find what happened in the week January 5-12th, 2008. (Hint: Has to do with Sony, who was a major proponent of Blu-ray Disc.)
Exercise 3. This is how you make the perfect lemonade: put a cup of warm water and a cup of sugar in a saucepan and stir until sugar dissolves completely; then add one cup of lemon juice and three cups of cold water.
Compute the percentage of water, sugar and lemon juice in the perfect lemonade and make a pie chart in which the sugar is slightly separated from the other ingredients.
Exercise 4. Watching it rain in Macondo, Isabel decided to start a meteorogical diary. If it rained on Monday Isabel would write 1 into the diary; if it rained on Tuesday she would write 2 into the diary; then 3 for rainy Wednesdays and so on until 7 for rainy Sundays. In the end she got the following list of numbers for a year:
In [10]:
MeteoDiary = [1,2,4,7,2,4,7,6,7,5,6,7,3,5,7,1,3,6,2,3,4,2,3,1,4,7,7,
6,5,6,4,5,6,2,3,4,5,1,3,4,2,5,7,2,3,5,3,5,7,6,7,2,3,7,
1,2,3,4,5,6,7,2,7,3,4,1,5,6,1,2,4,5,6,7,1,3,4,1,2,3,4,
2,5,7,6,4,5,6,1,3,7,5,7,1,2,3,7,7,3,4,7,1,2,4,7,4,7,2,
3,4,4,6,8,1,7,7,7,3,4,5,6,7,1,2,4,7,1,2,3,1,7,2,7]
(a) How many rainy days did Isabel record?
(b) How many Mondays, Tuesdays and so on were there that year? Illustrate this by a pie chart.
(c) Which day of the week was the rainiest?
Exercise 5. The cell below contains the first few decimals of $\pi$:
In [11]:
pi_decimale="141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609433057270365759591953092186117381932611793105118548074462379962749567351885752724891227938183011949129833673362440656643086021394946395224737190702179860943702770539217176293176752384674818467669405132000568127145263560827785771342757789609173637178721468440901224953430146549585371050792279689258923542019956112129021960864034418159813629774771309960518707211349999998372978049951059731732816096318595024459455346908302642522308253344685035261931188171010003137838752886587533208381420617177669147303598253490428755468731159562863882353787593751957781857780532171226806613001927876611195909216420198938095257201065485863278865936153381827968230301952035301852968995773622599413891249721775283479131515574857242454150695950829533116861727855889075098381754637464939319255060400927701671139009848824012858361603563707660104710181942955596198946767837449448255379774726847104047534646208046684259069491293313677028989152104752162056966024058038150193511253382430035587640247496473263914199272604269922796782354781636009341721641219924586315030286182974555706749838505494588586926995690927210797509302955321165344987202755960236480665499119881834797753566369807426542527862551818417574672890977772793800081647060016145249192173217214772350141441973568548161361157352552133475741849468438523323907394143334547762416862518983569485562099219222184272550254256887671790494601653466804988627232791786085784383827967976681454100953883786360950680064225125205117392984896084128488626945604241965285022210661186306744278622039194945047123713786960956364371917287467764657573962413890865832645995813390478027590099465764078951269468398352595709825822620522489407726719478268482601476990902640136394437455305068203496252451749399651431429809190659250937221696461515709858387410597885959772975498930161753928468138268683868942774155991855925245953959431049972524680845987273644695848653836736222626099124608051243884390451244136549762780797715691435997700129616089441694868555848406353422072225828488648158456028506016842739452267467678895252138522549954666727823986456596116354886230577456498035593634568174324112515076069479451096596094025228879710893145669136867228748940560101503308617928680920874760917824938589009714909675985261365549781893129784821682998948722658804857564014270477555132379641451523746234364542858444795265867821051141354735739523113427166102135969536231442952484937187110145765403590279934403742007310578539062198387447808478489683321445713868751943506430218453191048481005370614680674919278191197939952061419663428754440643745123718192179998391015919561814675142691239748940907186494231961567945208095146550225231603881930142093762137855956638937787083039069792077346722182562599661501421503068038447734549202605414665925201497442850732518666002132434088190710486331734649651453905796268561005508106658796998163574736384052571459102897064140110971206280439039759515677157700420337869936007230558763176359421873125147120532928191826186125867321579198414848829164470609575270695722091756711672291098169091528017350671274858322287183520935396572512108357915136988209144421006751033467110314126711136990865851639831501970165151168517143765761835155650884909989859982387345528331635507647918535893226185489632132933089857064204675259070915481416549859461637180270981994309924488957571282890592323326097299712084433573265489382391193259746366730583604142813883032038249037589852437441702913276561809377344403070746921120191302033038019762110110044929321516084244485963766983895228684783123552658213144957685726243344189303968642624341077322697802807318915441101044682325271620105265227211166039666557309254711055785376346682065310989652691862056476931"
(a) How many decimals of $\pi$ are there in the string?
(b) Make the frequency analysis of this string.
(g) Illustrate the outcome of the frequency analysis by a pie chart. | 3,827 | 12,061 | {"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} | 4.21875 | 4 | CC-MAIN-2020-50 | latest | en | 0.749102 |
http://manpages.ubuntu.com/manpages/eoan/man1/gmx-gangle.1.html | 1,590,922,053,000,000,000 | text/html | crawl-data/CC-MAIN-2020-24/segments/1590347413097.49/warc/CC-MAIN-20200531085047-20200531115047-00516.warc.gz | 79,870,169 | 4,173 | Provided by: gromacs-data_2019.3-2_all
NAME
``` gmx-gangle - Calculate angles
```
SYNOPSIS
``` gmx gangle [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
[-oav [<.xvg>]] [-oall [<.xvg>]] [-oh [<.xvg>]]
[-b <time>] [-e <time>] [-dt <time>] [-tu <enum>]
[-fgroup <selection>] [-xvg <enum>] [-[no]rmpbc]
[-[no]pbc] [-sf <file>] [-selrpos <enum>]
[-seltype <enum>] [-g1 <enum>] [-g2 <enum>] [-binw <real>]
[-group1 <selection>] [-group2 <selection>]
```
DESCRIPTION
``` gmx gangle computes different types of angles between vectors. It supports both vectors
defined by two positions and normals of planes defined by three positions. The z axis or
the local normal of a sphere can also be used as one of the vectors. There are also
convenience options ‘angle’ and ‘dihedral’ for calculating bond angles and dihedrals
defined by three/four positions.
The type of the angle is specified with -g1 and -g2. If -g1 is angle or dihedral, -g2
should not be specified. In this case, -group1 should specify one or more selections, and
each should contain triplets or quartets of positions that define the angles to be
calculated.
If -g1 is vector or plane, -group1 should specify selections that contain either pairs
(vector) or triplets (plane) of positions. For vectors, the positions set the endpoints of
the vector, and for planes, the three positions are used to calculate the normal of the
plane. In both cases, -g2 specifies the other vector to use (see below).
With -g2 vector or -g2 plane, -group2 should specify another set of vectors. -group1 and
-group2 should specify the same number of selections. It is also allowed to only have a
single selection for one of the options, in which case the same selection is used with
each selection in the other group. Similarly, for each selection in -group1, the
corresponding selection in -group2 should specify the same number of vectors or a single
vector. In the latter case, the angle is calculated between that single vector and each
vector from the other selection.
With -g2 sphnorm, each selection in -group2 should specify a single position that is the
center of the sphere. The second vector is calculated as the vector from the center to
the midpoint of the positions specified by -group1.
With -g2 z, -group2 is not necessary, and angles between the first vectors and the
positive Z axis are calculated.
With -g2 t0, -group2 is not necessary, and angles are calculated from the vectors as they
are in the first frame.
There are three options for output: -oav writes an xvg file with the time and the average
angle for each frame. -oall writes all the individual angles. -oh writes a histogram of
the angles. The bin width can be set with -binw. For -oav and -oh, separate
average/histogram is computed for each selection in -group1.
```
OPTIONS
``` Options to specify input files:
-f [<.xtc/.trr/…>] (traj.xtc) (Optional)
Input trajectory or single configuration: xtc trr cpt gro g96 pdb tng
-s [<.tpr/.gro/…>] (topol.tpr) (Optional)
Input structure: tpr gro g96 pdb brk ent
-n [<.ndx>] (index.ndx) (Optional)
Extra index groups
Options to specify output files:
-oav [<.xvg>] (angaver.xvg) (Optional)
Average angles as a function of time
-oall [<.xvg>] (angles.xvg) (Optional)
All angles as a function of time
-oh [<.xvg>] (anghist.xvg) (Optional)
Histogram of the angles
Other options:
-b <time> (0)
First frame (ps) to read from trajectory
-e <time> (0)
Last frame (ps) to read from trajectory
-dt <time> (0)
Only use frame if t MOD dt == first time (ps)
-tu <enum> (ps)
Unit for time values: fs, ps, ns, us, ms, s
-fgroup <selection>
Atoms stored in the trajectory file (if not set, assume first N atoms)
-xvg <enum> (xmgrace)
Plot formatting: none, xmgrace, xmgr
-[no]rmpbc (yes)
Make molecules whole for each frame
-[no]pbc (yes)
Use periodic boundary conditions for distance calculation
-sf <file>
Provide selections from files
-selrpos <enum> (atom)
Selection reference positions: atom, res_com, res_cog, mol_com, mol_cog,
whole_res_com, whole_res_cog, whole_mol_com, whole_mol_cog, part_res_com,
part_res_cog, part_mol_com, part_mol_cog, dyn_res_com, dyn_res_cog, dyn_mol_com,
dyn_mol_cog
-seltype <enum> (atom)
Default selection output positions: atom, res_com, res_cog, mol_com, mol_cog,
whole_res_com, whole_res_cog, whole_mol_com, whole_mol_cog, part_res_com,
part_res_cog, part_mol_com, part_mol_cog, dyn_res_com, dyn_res_cog, dyn_mol_com,
dyn_mol_cog
-g1 <enum> (angle)
Type of analysis/first vector group: angle, dihedral, vector, plane
-g2 <enum> (none)
Type of second vector group: none, vector, plane, t0, z, sphnorm
-binw <real> (1)
Binwidth for -oh in degrees
-group1 <selection>
First analysis/vector selection
-group2 <selection>
Second analysis/vector selection
```
SEEALSO
``` gmx(1)
``` 2019, GROMACS development team | 1,511 | 5,028 | {"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-2020-24 | latest | en | 0.802271 |
https://www.scribd.com/document/76008357/Thms-and-Postulates | 1,566,734,012,000,000,000 | text/html | crawl-data/CC-MAIN-2019-35/segments/1566027323328.16/warc/CC-MAIN-20190825105643-20190825131643-00486.warc.gz | 965,284,561 | 54,503 | You are on page 1of 3
# Geometry Postulates and Theorems (ch.
1-3)
Unique Line Postulate: Through any two points, there is exactly one line. Line Intersection Theorem: Two different lines intersect in at most one point. Distance Formula: If two points on a line have coordinates x and y, the distance between them is |x - y|. Distance Addition Property: If B is on
AC , then AB+BC=AC
Triangle Inequality Postulate: The sum of the lengths of any two sides of a triangle is greater than the length of the third side. Angle Addition Property: If (except for point V) is in the interior of mA V C+ mC V B= mA V B.
VC
AVB, then
LPT Linear Pair Theorem: If two angles form a linear pair, then they are supplementary. VAT Vertical Angles Theorem: If two angles are vertical angles, then they have equal measures. Postulates of Equality and Operations: For any real numbers a, b and c: a. RPE Reflexive property of equality: a=a. b. SPE Symmetric property of equality: If a=b, then b=a. c. TPE Transitive property of equality: If a=b, and b=c, then a=c. d. APE Addition (Subtraction) property of equality: If a=b, then a+c=b+c. e. MPE Multiplication (Division) property of equality: If a=b, then ac=bc. Postulates of Inequality and Operations: For any real numbers a, b and c: a. TPI Transitive property of inequality: If a < b, and b < c, then a < c. b. API Addition property of inequality: If a < b, then a+c < b+c. c. MPI Multiplication property of inequality: If a < b and c > 0, then ac < bc. (c is positive) If a < b and c < 0, then ac > bc. (c is negative) Equation to Inequality Property (Part to Whole): If a and b are positive numbers and a+b=c, then c > a and c > b. Substitution property: If a=b, then a may be substituted for b in any expression. CAP Corresponding Angles Postulate: Corresponding angles have the measure if and only if the lines are parallel. Parallel Lines and Slope Theorem: Two nonvertical lines are parallel if and only if they have the same slope. Transitive Property of Parallel Lines: In a plane, if line l is parallel to line m and line m is parallel to line n, then line l is parallel to line n. Two Perpendiculars Theorem: If two coplanar lines l and m are each perpendicular to the same line, then they are parallel to each other. Perpendicular to Parallels Theorem: In a plane, if a line is perpendicular to one of two parallel lines, then it is also perpendicular to the other. Perpendicular Lines and Slopes Theorem: Two nonvertical lines are perpendicular if and only if the product of their slopes is -1 (they are opposite reciprocals).
## Geometry Postulates and Theorems (ch. 4-6)
Figure Reflection Theorem: If certain points determine a figure, then its reflection image is the corresponding figure determined by the reflection images of those points. CPCF Corresponding Parts of Congruent Figures Theorem: If two figures (triangles, quads, etc.) are congruent, then any pair of corresponding parts (segments and angles) is congruent. ABCD Theorem: Every Isometry (reflection, translation, rotation or glide reflection) preserves angle measure, betweenness, collinearity (lines), and distance (lengths of segments). Postulates of Congruence: For any figures F, G and H: a. RPC Reflexive property of congruence: b. SPC Symmetric property of congruence: If c. TPC Transitive property of congruence: If
## F @F . F @G , then G @F . F @G and G @H , then F @H .
Segment Congruence Theorem: Two segments are congruent if and only if they have the same length. Angle Congruence Theorem: Two angles are congruent if and only if they have the same measure. AIA Alternate Interior Angles Theorem: Two lines cut by a transversal are parallel if and only if alternate interior angles are congruent. AEA Alternate Exterior Angles Theorem: Two lines cut by a transversal are parallel if and only if alternate exterior angles are congruent. Perpendicular Bisector Theorem: If a point is on the perpendicular bisector of a segment, then it is equidistant from the endpoints of the segment. Uniqueness of Parallels Theorem: Through a point not on a line, there is exactly one line parallel to the given line. Triangle-Sum Theorem: The sum of the measures of the angles of a triangle is 180o. Quadrilateral-Sum Theorem: The sum of the measure of the angles of a convex quadrilateral is 360. Polygon-Sum Theorem: The sum of the measures of the angles of a convex n-gon is (n-2)*180. Flip-Flop Theorem: If F and G are points or figures and rm(F) = G, then rm(G) = F. Segment Symmetry Theorem: Every segment has exactly two symmetry lines: its perpendicular bisector, and the line containing the segment. Side-Switching Theorem: If one side of an angle is reflected over the line containing the angle bisector, its image is the other side of the angle. Angle Symmetry Theorem: The line containing the bisector of an angle is a symmetry line of the angle. Circle Symmetry Theorem: A circle is reflection-symmetric to any line through its center. Symmetric Figures Theorem: If a figure is symmetric, then any pair of corresponding parts under the symmetry is congruent. Isosceles Triangle Symmetry Theorem: The line containing the bisector of the vertex angle of an isosceles triangle is a symmetry line for the triangle. Isosceles Triangle Base Angles Theorem: If a triangle has two congruent sides, then the angles opposite them are congruent.
Equilateral Triangle Symmetry Theorem: Every equilateral triangle has three symmetry lines, which are bisectors of its angles or perpendicular bisectors of its sides. Equilateral Triangle Angle Theorem: If a triangle is equilateral then it is equiangular. Kite Symmetry Theorem: The line containing the ends of a kite is a symmetry line for the kite. Kite Diagonal Theorem: The symmetry diagonal of a kite is the perpendicular bisector of the other diagonal and bisects the two angles at the ends of the kite. Rhombus Diagonal Theorem: Each diagonal of a rhombus is the perpendicular bisector of the other diagonal. Trapezoid Angle Theorem: In a trapezoid, consecutive angles between a pair of parallel sides are supplementary. Isosceles Trapezoid Symmetry Theorem: The perpendicular bisector of one base of an isosceles trapezoid is the perpendicular bisector of the other base and a symmetry line for the trapezoid. Isosceles Trapezoid Theorem: In an isosceles trapezoid, the non-base sides are congruent. Rectangle Symmetry Theorem: The perpendicular bisectors of the sides of a rectangle are symmetry lines for the rectangle. Center of a Regular Polygon Theorem: In any regular polygon there is a point (its center) which is equidistant from all of its vertices. Regular Polygon Symmetry Theorem: Every regular n-gon possesses n symmetry lines, which are the perpendicular bisectors of each of its sides and the bisectors of each of its angles. Every regular n-gon possesses n-fold rotational symmetry. | 1,674 | 6,882 | {"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.28125 | 4 | CC-MAIN-2019-35 | latest | en | 0.804062 |
https://www.techylib.com/en/view/hostitch/presented_by_tal_saiag | 1,524,375,136,000,000,000 | text/html | crawl-data/CC-MAIN-2018-17/segments/1524125945493.69/warc/CC-MAIN-20180422041610-20180422061610-00574.warc.gz | 892,658,160 | 14,765 | # Presented by: Tal Saiag
AI and Robotics
Oct 23, 2013 (4 years and 6 months ago)
105 views
Presented by: Tal Saiag
Seminar in Algorithmic Challenges in Analyzing Big Data*
in Biology and
Medicine; With Prof. Ron Shamir @TAU
Basic
Terminology
Introduction
JointCluster: A simultaneous clustering algorithm
Results
Discussion
Conclusion
2
3
Cell
building block
of
life
Contains
nucleus
Chromosome
genetic material
Forms the genome
DNA
Gene
Stretch of DNA
Proteins
multi functional workers
4
Gene expression: from gene to protein
Transcription
RNA
Translation
Transcription factor
5
DNA
microarray / chips
Measures expression of genes
Condition specific
6
7
Genome
-
wide
datasets provide different views of the biology
of
a
cell.
Physical interactions (protein
-
protein
) and regulatory
interactions (protein
-
DNA)
maintain
and regulate the cell's
processes.
Expression
of molecules
(proteins
or transcripts of
genes)
provide a snapshot of the cell’s state.
Researchers have exploited the complementarity of both.
8
Integrating the physical and expression datasets.
Developing efficient solution
for combined
analysis of multiple
networks.
Goal
: find common clusters of genes supported by all of the
networks of interest.
Computationally intractable for large networks.
Theoretical guarantees (reasonably approximates the optimal
clustering
).
9
10
A
cut
refers to a partition of nodes in a graph into two sets
.
A cut is called
sparse
-
enough
in a graph if the ratio of edges
crossing the cut in the graph to the edges incident at the smaller
side of the cut is smaller than a threshold specific to the graph
.
Inter
-
cluster edges
: edges with endpoints in different
clusters.
Connectedness
of a cluster in a graph: the cost of a set of
edges is the ratio of their weight to the total edge weight in the
graph.
11
Approximate the sparsest cut in each input graph using a
spectral
method.
Choose
among them any cut that is sparse
-
enough in the
corresponding graph yielding the
cut.
Recurse
on the two node sets of the chosen
cut.
Until well connected node sets with no sparse
-
enough cuts are
obtained.
12
Graph
=
𝑉
,
,
0
for any node pair
,
𝑉
×
𝑉
Total
weight of any
edge set
:
=
,
,
Y
For
any node sets
,
𝑉
:
(
,
)
=
,
S
,
T
Define
=
,
𝑉
Total
edge weight in the graph: a(V)/
2
Singletons:
=
13
The conductance of a cut
(
,
=
\
S
)
in a node set
:
𝑎
,
min
𝑎
,
𝑎
The
inter
-
cluster
edges
:
,
where
and
belong to
different
clusters.
An
(
𝛼
,
𝜀
)
clustering of
is a partition of its nodes into clusters
such that:
The
conductance of the clustering is at least
𝛼
, and
The
total weight of the inter
-
cluster edges
is at most an
𝜀
fraction of the
total edge weight in the graph; i.e.,
𝜀
2
𝑉
.
14
Since finding the sparsest cut in a graph is a NP
-
hard problem,
an approximation algorithm for the problem is used.
Efficient
spectral
techniques.
Spectral
Algorithm:
Find the top
right singular vectors
1
,
2
,
,
(using SVD).
Let
be the matrix whose
th
column is given by
𝐴
.
Place row
in cluster
if
is the largest entry in the
th
row of
.
15
Consider
graphs
=
𝑉
,
=
1
An
𝛼
,
𝜀
simultaneous
clustering:
The
conductance of the clustering is at least
𝛼
in graph
for all
, and
The
total weight of the inter
-
cluster edges
is at most an
𝜀
fraction of the
total edge weight in all graphs; i.e.,
𝜀
2
𝑉
.
Inter
-
cluster edge
cost:
2
𝑎
𝑖
𝑋
𝑖
𝑎
𝑖
𝑉
𝑖
.
A cut in
is sparse enough if the conductance of the
cut
is at
most
𝛼
.
16
Mixture graph
for graph
at scale
has a weight
function:
,
=
,
+
2
,
!
=
The heuristic finds sparsest cuts in mixture graphs
.
The heuristic starts with the sum graph to control edges lost in all
graphs, and transitions through a series of mixture graphs that
approach the individual graphs to refine the clusters.
17
Combine a cut selection
heuristic.
Choose the
cut that is sparse
-
enough in the most number of input
graphs.
18
19
20
The
modularity score
of a cluster in a graph
is: fraction
of
edges contained within the cluster minus the fraction expected
by
chance.
The partition of
𝑉
that respects the clustering tree and
optimizes the min
modularity score can be found by dynamic
programming.
=
arg
max
min
𝑑 𝑟 𝑦
,
min
𝑑 𝑟 𝑦
OPT
𝑟
Ordered
by the min
-
modularity scores of
clusters.
21
We desire an unsupervised method for learning the related
conductance threshold
𝛼
for each network of interest
.
Algorithm
for each graph
:
Cluster only
using JointCluster, without loss of generality set
𝛼
to
maximum possible value
1
.
Set
𝛼
to the minimum conductance threshold that would result in the same
set of clusters
.
Goal
: automatically choose a threshold
that is sufficiently low
and sufficiently high.
22
23
Alternative algorithms:
Tree:
Choose one of the input graphs
as a reference, cluster this
single graph using an efficient spectral clustering method
to
obtain a
clustering tree, and parse this tree into clusters using the min
-
modularity
score computed from all graphs.
Coassociation
:
Cluster each graph separately using
a
spectral
method,
combine the resulting clusters from different graphs into a
coassociation
graph,
and cluster this graph using the same spectral
method.
Parametr
24
Intra
-
cluster
are a pair
of elements that belong to a single
cluster.
Jaccard
Index =
#element
pairs
that
are
intra
cluster
wrt
both
clusterings
#element
pairs
that
are
intra
cluster
wrt
either
of
the
clusterings
25
26
Two yeast strains grown under two conditions where glucose or
ethanol was the predominant carbon source
.
Coexpression
networks using all
4
,
482
profiled genes as
nodes.
Weight
of an
edge as
the absolute value of the Pearson's correlation
coefficient between
the
expression profiles
of the two genes.
Physical gene
-
protein interactions (
from various interaction
databases):
total of
41
,
660
non
-
redundant
interactions.
27
GO Process:
Genes in each reference set in this class are
annotated to the same GO Biological Process term.
TF (Transcription Factor) Perturbations:
Genes in each set have
altered expression when a TF is deleted or overexpressed.
Compendium of Perturbations:
Genes in each set have altered
expression under deletions of specific genes, or chemical
perturbations.
TF Binding Sites:
Genes in a set have binding sites of the same TF
in their upstream genomic regions, with sites predicted using
ChIP
binding data.
eQTL
Hotspots:
Certain genomic regions exhibit a significant
excess of linkages of expression traits to genotypic
variations.
28
Intra
-
cluster
are a pair of elements that belong to a single
cluster.
Jaccard
Index =
#element
pairs
that
are
intra
cluster
wrt
both
clusterings
#element
pairs
that
are
intra
cluster
wrt
either
of
the
clusterings
Sensitivity:
the
fraction of reference sets that are enriched for
genes belonging to some cluster output by the method
.
[
coverage]
Specificity:
the
fraction of clusters that are enriched for genes
belonging to some reference set
.
[
accuracy
]
29
30
Comparing
JointCluster
against methods that integrate only a
single coexpression network with a physical
network.
Combined
<
glucose+ethanol
> coexpression network and the physical
network.
Comparing on fair
terms
for
all
algorithms:
Setting
minimum cluster size parameter in Matisse to
10
.
Size
limit of
100
genes
for
JointCluster
.
Co
-
clustering didn't have a parameter to directly limit cluster
size.
31
32
33
Heterogeneous large
-
scale datasets are accumulating at a
rapid pace.
Efforts to integrate them are intensifying.
JointCluster
provides a versatile approach to integrating any
number of heterogeneous datasets.
Natural progression from clustering of single to multiple datasets.
34
Testing
JointCluster
algorithm on simulated
datasets.
Testing
JointCluster
on yeast empirical datasets
.
More
flexible than two
-
network clustering
methods.
Consistent with known biology, extend our knowledge
.
JointCluster
can handle multiple heterogeneous network.
Enables better coverage of genes
especialy
when knowledge of physical
interactions is less complete
.
Unsupervised
and exploratory approach to data
integration.
35
36
The challenge: integrating multiple datasets in order to study
different aspects of biological
systems.
Proposed simultaneous
clustering of multiple
networks.
Efficient solution that permits
certain theoretical
guarantees
Effective scaling heuristic
Flexibility to handle multiple heterogeneous
networks
Results of
JointCluster
:
More
robust,
and can
handle high false positive
rates.
More
consistently enriched for various reference
classes.
Yielding
better
coverage.
Agree with known biology of
yeast.
37
38
39
Bibliography:
2010
), PLoS
Computational
Biology.
Simultaneous
Clustering of Multiple Gene Expression and Physical Interaction
Datasets.
Supplementary
Text for “Simultaneous clustering of multiple gene expression and physical
interaction datasets
”.
CPP Source code
Kannan
R,
Vempala
S,
Vetta
A (
2000
), Proceedings Annual IEEE Symposium on
Foundations of Computer
Science (
FOCS).
pp
367
377
.
On
clusterings
-
.
Shi J, Malik J (
2000
), IEEE Transactions on Pattern Analysis and Machine
Intelligence
(
TPAMI)
22
:
888
905
.
Normalized cuts and image
segmentation.
Andersen R, Lang KJ (
2008
), Proceedings Annual
ACM
-
SIAM
Symposium
on
Discrete
Algorithms (SODA).
pp
651
660
.
An algorithm for improving graph
partitions.
40 | 2,673 | 9,736 | {"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-17 | latest | en | 0.861861 |
http://yesteapea.wordpress.com/ | 1,386,945,416,000,000,000 | text/html | crawl-data/CC-MAIN-2013-48/segments/1386164949664/warc/CC-MAIN-20131204134909-00083-ip-10-33-133-15.ec2.internal.warc.gz | 647,547,644 | 23,636 | # The pains of an average programmer
The last time I attempted a programming contest was on 28th Feb when I was trying to be a purple on codeforces. After a long break I thought of attempting codechef cookoff yesterday and I did.
The first problem was a cake walk. Given co-ordinates of triangles the task is to find how many of them were right-angled.
Based on popularity I chose to solve DIVQUERY next. The task is to find how many numbers in an array (size :10**5) between 2 the given indices (Ex: all values in the array between 2nd and 10th element ) are divisible by a given number K. There can be upto 10**5 such test cases. This looked difficult and almost impossible to solve.
After going through the constraints I observed that the values in the array are less than 10**5. After some thought I understood that this could be solved using some kullu thelivithetalu (street smartness). I estimated that the number of factors any number less than 10**5 can have is less than 100. 2*3*5*7*11*13*17 > 10**5 (miscalculation-1). This means that no number less than 10**5 can have more than 64 (2**(7-1)) factors.
For each number in the array I need to store the index for all its factors. For a given number this store can give me indices of all its multiples in the array. As each number can have a maximum of 64 factors the total space this store requires would be 64* 10**5 (<10**7) which is perfectly fine.
What data-structure to use. I have 2 options
• An array of vectors: Where the ith vector gives the indices of multiples of ith value in the input array. But initializing 10**5 vectors might be very slow and I never liked vectors and could not convince myself about their amortized constant time inserts. Also as it is not possible to have a good estimate of expected size of each vector I cannot use the reserve space option. Option ruled out (miscalculation-2)
• Map<long,int> : Where the key is actually a pair .
```num = key%1000000
index = key/1000000
```
So the touple (num,index) is the key and the value is the number of multiples of num in the array upto indexth value in the array. Expected number of inserts is 10**7 and expected time is 2* 10**8 .This is perfectly fine. Map it is
Implementation comes next. At first I need to get all the keys that of the map and store them somewhere. Once this is done the required map can be built by iterating over the keys in ascending order.
Attempt-1:
Store all the keys in the map with some dummy value and give them the correct values during the iteration. Java does not allow modifying a data structure while iterating over it. C++ might be doing the same. So store all the keys in a set and then build the map by iterating over the set.
```for (long i = 0; i < n; i += 1){
scanf("%lld",&x);
for (long j = 0; j < cnt[x]; j += 1){
long num = factors[x][j];
st.insert(i + 1000000l*num);
}
}
long presNum=0,presValue=0;
set::iterator it;
for(it = st.begin(); it != st.end() ; it++){
long num = (*it)/1000000l,ind=(*it)%1000000l;
if(num==presNum){
presValue++;
}
else {
used_cnt[presNum]=presValue;
presNum=num;
presValue=1;
}
mp[*it]=presValue;
used[num][presValue-1]=ind;
}
used_cnt[presNum]=presValue;
for (long i_ = 0; i_ < tc; i_ += 1){
long l,r,k; scanf("%lld %lld %lld",&l,&r,&k);
l-=2;r--;
long l1=-1,r1=-1;
for (long i = 0; i < used_cnt[k]; i += 1){
long i1 = used[k][i];
if(l>=i1 && r>=i1) {
l1=i1; r1=i1;
}
else if(r>=i1) r1=i1;
else break;
}
long ans =0;
if(r1>=0) ans = mp[r1+1000000l*k];
if(l1>=0) ans = ans-mp[l1+1000000l*k];
printf("%lld\n",ans);
}
```
Result: TLE
Attempt-2:
Java is very strict. C++ is very loose and may be it does not do the locking business while iterating. After some digging I discovered that this is the case. So the set is not required.
```
for (long i = 0; i < n; i += 1){
scanf("%lld",x);
for (long j = 0; j < cnt[x]; j += 1){
long num = factors[x][j];
mp[i + 1000000l*num]=1;
}
}
long presNum=0,presValue=0;
map<long,long>::iterator it;
for(it = mp.begin(); it != mp.end() ; it++){
long num = (it->val1)/1000000l,ind=(it->val1)%1000000l;
if(num==presNum){
presValue++;
}
else {
used_cnt[presNum]=presValue;
presNum=num;
presValue=1;
}
mp[it->val1]=presValue;
used[num][presValue-1]=ind;
}
```
Result: TLE
Attempt-3:
May be I’m loosing very narrowly and some minor modifications might result in AC. So I better modify the key to (num<<20) + ind. Getting back num, index from key will be key>>20, key&((1<<20) -1). After lot of pain with bracketting I ended with the code is the best I can do.
```
for (long i = 0; i < n; i += 1){
ni(x);
for (long j = 0; j < cnt[x]; j += 1){
num = factors[x][j];
//cout<<num<<"-"<<(i + (num<<20))<<" ";
mp[i + (num<<20)]=1;
}
}
long presNum=0,presValue=0,ind,r1;
map<long,long>::iterator it;
long __num = ((1<<20)-1);
for(it = mp.begin(); it != mp.end() ; it++){
num = (it->val1)>>20,ind= ((it->val1)& __num) ;
if(num==presNum){
presValue++;
}
else {
used_cnt[presNum]=presValue;
presNum=num;
presValue=1;
}
it->val2=presValue;
used[num][presValue-1]=ind;
}
used_cnt[presNum]=presValue;
```
Result: TLE
Attempt-4:
What if all the test cases are 1,10**5,1 ? My solution would blow off. Use binary search. I always prefer not to use the upper_bound and lower_bound functions. But now I have to.
```l1 = *(upper_bound(used[k],used[k]+used_cnt[k],l)-1);
r1 = *(upper_bound(used[k],used[k]+used_cnt[k],r)-1);
```
Result: TLE again. Screw this . Its not gonna happen and there is not much I can do as the other questions have to be coded with lot of care and I will definitely mess up as there is less than 20 mins to go . Some fb. Sudden thought : Why not try the vector idea? Nothing to lose.
Attempt-5:
Code code code. I implemented the vetor idea.
```for (long i = 0; i < n; i += 1){
ni(x);
for (long j = 0; j < cnt[x]; j += 1){
v[factors[x][j]].pb(i);
}
}
long l,r,k,l1,r1;
while(tc--){
scanf("%lld %lld %lld",&l,&r,&k);
l1=(upper_bound(v[k].begin(),v[k].end(),l-2) -v[k].begin());
r1=(upper_bound(v[k].begin(),v[k].end(),r-1)-v[k].begin());
printf("%lld\n",r1-l1);
}
```
Result: Wtf? Where is the submit button? Contest over! The question is added to practice. Submitted my solution and got a WA. I thought I messed up some where.
I opened the editorial and after a quick glance I saw the number 128. Then I realised my miscalculation-1 and then modified the declaration of factors to factors[100001][150] (from factors[100001][100]) and the result is an AC.
# Counting the number of set bits in an integer
Most natural ways to do this is to loop through all bits in the integer increment the count for each set bit.
```int NumberOfSetBits(int n){
int count = 0;
while(n){
count += n & 1;
n >>= 1;
}
return count;
}
```
But we can do better. The following code works perfectly fine for counting the number of bits set.
```//for 64 bit numbers
int NumberOfSetBits64(long long i)
{
i = i - ((i >> 1) & 0x5555555555555555);
i = (i & 0x3333333333333333) +
((i >> 2) & 0x3333333333333333);
i = ((i + (i >> 4)) & 0x0F0F0F0F0F0F0F0F);
return (i*(0x0101010101010101))>>56;
}
//for 32 bit integers
int NumberOfSetBits32(int i)
{
i = i - ((i >> 1) & 0x55555555);
i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
i = ((i + (i >> 4)) & 0x0F0F0F0F);
return (i*(0x01010101))>>24;
}
```
The magic numbers might seem very confusing. But they have a lot of meaning in them.
Let us start with 0X55555555. Binary representation of 5 is 0101. So 0X55555555 has 16 ones, 16 zeros and the ones,zeros take alternate positions. Similarly 0X33333333 has 16 ones, 16 zeros and 2 consecutive ones, 2 consecutive zeros alternate.
```F = 0x55555555 = 01010101010101010101010101010101
T = 0x33333333 = 00110011001100110011001100110011
O = 0x0f0f0f0f = 00001111000011110000111100001111
```
Now split the number into 16 sets of 2 bits
Ex: 9 = 1001 = 00,00,…..00,10,01
First step that algorithm does is to count the number of set bits in each of these 2-bit numbers. As each 2-bit number can have a maximum of 2 set bits. Each of these counts fit into a 2-bit number. That is what the below snippet does.
```i = (i & 0x55555555) + ((i >> 1) & 0x55555555);
```
‘i & F’ preserves only the odd positioned ones. (i>>1) & F preserves only the even positioned ones and gets the even ones to odd positions. Adding them results in each pair of 2-bits having the number of set bits in their corresponding positions.
Similarly the after next 2 steps we end up having a number which can be seen as 4 8-bit numbers whose sum is the required count.
```i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
i = (i & 0x0F0F0F0F) + (i >> 4)) & 0x0F0F0F0F);
```
Multiplying this number with 0X01010101 will result in a number whose most significant 8 bits contain the required count. Finally on summing up all these steps we get the following code.
```int NumberOfSetBits32(int i)
{
i = (i & 0x55555555) + ((i >> 1) & 0x55555555);
i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
i = (i & 0x0F0F0F0F) + (i >> 4)) & 0x0F0F0F0F);
return (i*(0x01010101))>>24;
}
```
Here some more micro optimizations are possible. After giving some thought it can be understood that the 2 lines of code in the below snippet produce the same result.
```i = (i & 0x55555555) + ((i >> 1) & 0x55555555);
i = i - ((i >> 1) & 0x55555555);
```
In general ‘&’ operator is not distributive over ‘+’. But in this case it does. In i and i>>4, each of the eight 4-bit numbers has a maximum value of 4 (fits in 3 bits). And adding these numbers will not cause an overflow in any of the 4-bit slots. So it works in this case. (Think of why it will not work int the previous steps).
```i = (i & 0x0F0F0F0F) + (i >> 4)) & 0x0F0F0F0F);
i = (i & + (i >> 4)) & 0x0F0F0F0F;
```
So finally we arrive at the code for NumberOfSetBits32 as in the 2nd snippet ( NumberOfSetBits64 can be implemented in similar lines). I’m sorry if the explanation is not clear.
# Resolutions 2013
Last year I got completely addicted to facebook and quora. My hands couldn’t be still on seeing status updates of friends in my close circle. I could not resist myself from not sharing(on facebook) anything I find interesting. This is good upto a certain extent , but everything has a limit and I crossed it. Finally I became the guy who always has fb open and scrolls down and down till it takes practically infinite time to load the feed.
Quora says it connects me to everything I want to know about. That is true. But it connects to many other things I don’t need at all. If not facebook in the second half of 2012 it was quora I was browsing all the time. The bad thing about quora is that , it gives me a false feeling that I’m doing some thing useful and that it is not a waste of time. I spent almost 4 hrs/day on quora in week days and even more in weekends.
Twitter is an exception and remains so. I was never addicted to twitter. One good thing about twitter is most of my friends are not active on twitter and nothing inspires me to write a comment (reply). I’m nothing more than a spectator. It is the same with quora as well. But the answers/posts are generally long. It eats a lot of time.
So ‘no shit’ boils down to no posts on facebook, not more than a couple of hours per week on quora. So from now on fb is just a platform for chatting and poking.
Github/BitBucket
Why do I need github/BitBucket
• I always backed up code on my external hard disk. I never felt the need for an online backup. But after losing my hard disk , everything is gone. Suddenly I realized the need for an online backup.
• Every company hosts their code on some content tracker. I never cared to know about them properly. Getting familiar with them might avoid some pains in my professional life.
• I was such a fool to not know that git is not just about github and gitbub one of the many online services that host git repositories.
From this year all not-shitty, non-proprietary code I write will be on github/bitbcket.
Coursera/Udacity
How should I spend the time I gain by giving up facebook and quora? Coursera/udacity is the answer. Coursera has some very nice and interesting courses taught by professors from top universities.
Here is my coursera wish list . The target is not to complete all these courses. It is difficult to put in continuous, consistent efforts for them (coursera expects that). Also there is no point in solving assignments on topics with which I’m super familiar. Learning is the only target.
Lose Weight
This needs no explanations!
# Python for course assignments
Python is a beautiful programming language . The code looks very neat and verbal. To give it a try I chose to do my course assignments in python. Here are the advantages of using python over other languages for the course assignments.
1. Not many students use python for assignments. This is a big advantage because if you get stuck in the assignments , you can borrow your friend’s code (c++/java) and blindly covert it line by line to python. You don’t have to worry about instructor’s warning on copying course assignments.
2. The code looks very clean. It forces code indentation which is a good programming practice.
3. Every damn thing is already implemented in the language and the documentation is pretty good.
4. Java libraries can also be used with python via jython.
5. Python might be very slow compared to C++/java. But speed is never an issue for course assignments. So it should not be a problem!
Happy python’ing !
# Conspiracies on death of Lal Bahadur Shastri
Note: copy-paste-modified from the description of the below video. (This is my first post on this blog)
All I remember about Lal Bahadur Shastri is Lal Bahadur Srivastava Shastri (2 October 1904 — 11 January 1966), but when his birthday is being neglected by his own party (Congress) and his death covered up, I began my search for more information out of curiosity.
Shri Lal Bahadur Shastri was born on October 2, 1904 at Mughalsarai, a small railway town seven miles from Varanasi in Uttar Pradesh, was the second Prime Minister of the Republic of India and a significant figure in the Indian independence movement.
History shows us that he was a Brave Leader contradictory to his current Congressmen, Spoke with Guts and carried the Pride of India on his shoulders.
He Declared War on Pakistan
When India received a letter from China alleging that the Indian army had set up army equipment in Chinese territory, and India would face China’s wrath, unless the equipment was pulled down. Shastri declared
“China’s allegation is untrue. If China attacks India it is our firm resolve to fight for our freedom. The might of China will not deter us from defending our territorial integrity.”
Compare this to our Recent response to the Chinese Intrusion in India by Defense minister A K Antony
Now,
1. Why did India Sacrifice such a Brave Leader and did nothing about his Mysterious Death ?
2. Why did our government refrain from taking any actions on the allegations made by Shastri’s Wife ?
3. Would it be the same had it been Rajiv Gandhi and Sonia Gandhi?
Kuldip Nayar, Lal Bahadur Shastri’s Press advisor from 1960 to 1964 offers us some Insights.
Shastri has been forgotten by the nation. He has been pushed into the background. I have no doubt that there was a Congress conspiracy to underplay Shastri after his death.
The Congress is the party that should have put him to the force but I remember visiting a Congress meeting where Shastri’s portrait was not even displayed with respect……
……. They even protested against inscribing the slogan – Jai Jawan, Jai Kisan on hissamadhi. Then again, only when Mrs Shastri threatened to go on a hunger strike was it was allowed.
Shastri went to USSR for the Tashkent talks, wanted a promise from Ayub Khan that Pakistan would never use force in the future. But the talks did not proceed. What followed the next day was Shastri’s Death.
While officially Shastri is declared to have died of a cardiac arrest, his wife Lalita Shastri had alleged that her husband was poisoned. Many believed that Shastri’s body’s turning blue was evidence of his poisoning. The Russian butler attending to him was arrested on suspicion of poisoning. He was later absolved of the charges.
Our Indian Government released no information about his Death and the media then was kept Silent.
When Kuldip Nayar filed an Right To Information to access information on Lal Bahadur Shastri’s Death, the government replied:
“PMO has cited exemption from disclosure on the plea that it could harm foreign relations, cause disruption in the country and cause breach of parliamentary privileges.”
“The home ministry is yet to respond to queries whether India conducted a post-mortem on Shastri and if the government had investigated allegations of foul play. “
Lets look at the Direct Beneficiary of Lal Bahadur Shastri’s Death.
Gulzarilal Nanda was the interim Prime Minister of India after the death of Prime Minister Lal Bahadur Shastri in 1966. Indian National Congress then systematically elected a new prime minister, Indira Priyadarshini Gandhi.
Her relationship with Russia was bound by a Win Win strategy. India was close to Russia, We purchased Arms, Scientific Equipment’s, offered entry to Russian Industries etc etc.. Allegations of Russia’s KGB Funding Indira’s Family is Well Known, it further highlights her close relationship with Russia.
Till Our Government proves otherwise I will continue to believe that Lal Bahadur Shastri was Murdered to benefit Indira and Russia.
The reasons for his mysterious death is given underneath
1. Netaji Subhash Chandra Bose was inside a jail in USSR (He died in 1976)
2. USSR was threatening Jawaharlal of Netaji’s release if business not done with them.
3. USSR made good business relation with India showing Netaji inside jail.
4. Jawarlal died and Lal Bahadur Shastri became Indian PM
5. USSR can’t threaten him because if Shastri knows about Netaji, he will tell to release Netaji and welcome him.
6. USSR wanted somebody in power who can be threatened and utilized.
7. Indira Gandhi was consulted by Sr. Defence Official (He wrote in Diary)
8. In Tashkent (USSR), Shastri was given poison in the milk. He went to Coma and died.
9. There was no inquiry / committee given to check the whole thing. Media was made silent. | 5,052 | 18,275 | {"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-2013-48 | longest | en | 0.943137 |
https://deepai.org/publication/homothetic-triangle-representations-of-planar-graphs | 1,669,948,533,000,000,000 | text/html | crawl-data/CC-MAIN-2022-49/segments/1669446710890.97/warc/CC-MAIN-20221202014312-20221202044312-00879.warc.gz | 226,353,104 | 43,775 | DeepAI
# Homothetic triangle representations of planar graphs
We prove that every planar graph is the intersection graph of homothetic triangles in the plane.
• 7 publications
• 7 publications
• 4 publications
07/27/2017
### Planar graphs as L-intersection or L-contact graphs
The L-intersection graphs are the graphs that have a representation as i...
10/18/2018
### Planar CPG graphs
We show that for any k ≥ 0, there exists a planar graph which is B_k+1-C...
08/21/2017
### 3D Visibility Representations of 1-planar Graphs
We prove that every 1-planar graph G has a z-parallel visibility represe...
09/04/2019
### On a Conjecture of Lovász on Circle-Representations of Simple 4-Regular Planar Graphs
Lovász conjectured that every connected 4-regular planar graph G admits ...
05/08/2018
### The interval number of a planar graph is at most three
The interval number of a graph G is the minimum k such that one can assi...
09/02/2022
### Can an NN model plainly learn planar layouts?
Planar graph drawings tend to be aesthetically pleasing. In this poster ...
10/18/2022
### Intersection of triangles in space based on cutting off segment
The article proposes a new method for finding the triangle-triangle inte...
## 1 Introduction
Here, an intersection representation is a collection of shapes in the plane. The intersection graph described by such a representation has one vertex per shape, and two vertices are adjacent if and only if the corresponding shapes intersect. In the following we only consider shapes that are homeomorphic to disks. In this context, if for an intersection representation the shapes are interior disjoint, we call such a representation a contact representation. In such a representation, a contact point is a point that is in the intersection of (at least) two shapes.
Research on contact representations of (planar) graphs with predefined shapes started with the work of Koebe in 1936, and was recently widely studied; see for example the literature for disks [2, 3, 15], triangles [8], homothetic triangles [10, 13, 14, 21], rectangles [6, 22], squares [16, 20], pentagons [7], hexagons [9], convex bodies [19], or (non-convex) axis aligned polygons [1, 12]. In the present article, we focus on homothetic triangles. It has been shown that many planar graphs admit a contact representation with homothetic triangles.
###### Theorem 1.
[13] Every 4-connected planar triangulation admits a contact representation with homothetic triangles.
Note that one cannot drop the 4-connectedness requirement from Theorem 1. Indeed, in every contact representation of with homothetic triangles, there are three triangles intersecting in a point (see the right of Figure 1). This implies that the triangulation (not 4-connected) obtained from by adding a degree three vertex in every face does not admit a contact representation with homothetic triangles. Some questions related to this theorem remain open. For example, it is believed that if a triangulation admits a contact representations with homothetic triangles, it is unique up to some choice for the triangles in the outer-boundary. However this statement is still not proved. Another line of research lies in giving another proof to Theorem 1 (a combinatorial one), or in providing a polynomial algorithm constructing such a representation [4, 21].
Theorem 1 has a nice consequence. It allowed Felsner and Francis [5] to prove that every planar graph has a contact representation with cubes in . In the present paper we remain in the plane. Theorem 1 is the building block for proving our main result. An intersection representation is said simple if every point belongs to at most two shapes.
###### Theorem 2.
A graph is planar if and only if it has a simple intersection representation with homothetic triangles.
This answers a conjecture of Lehmann that planar graphs are max-tolerance graphs (as max-tolerance graphs have shown to be exactly the intersection graphs of homothetic triangles [14]). Müller et al. [17] proved that for some planar graphs, if the triangle corners have integer coordinates, then their intersection representation with homothetic triangles needs coordinates of order , where is the number of vertices. The following section is devoted to the proof of Theorem 2.
## 2 Intersection representations with homothetic triangles
It is well known that simple contact representations produce planar graphs. The following lemma is slightly stronger.
###### Lemma 3.
Consider a graph given with a simple intersection representation . If the shapes are homeomorphic to disks, and if for any couple the set is non-empty and connected, then is planar.
Proof. Observe that since is simple, the sets are disjoint non-empty connected regions. Let us draw by first choosing a point inside , for representing each vertex . Then for each neighbor of , draw a curve inside from to the border of (in the border of ) to represent the half-edge of incident to . As the regions are disjoint and connected, this can be done without crossings. Finally, for each edge it is easy to link its two half edges by drawing a curve inside . As the obtained drawing has no crossings, the lemma follows.
Note that for any two homothetic triangles and , the set is connected. Lemma 3 thus implies the sufficiency of Theorem 2. For proving Theorem 2 it thus suffices to construct an intersection representation with homothetic triangles for any planar graph . In fact we restrict ourselves to (planar) triangulations because any such is an induced subgraph of a triangulation (an intersection representation of thus contains a representation of ). The following Proposition 4 thus implies Theorem 2.
From now on we consider a particular triangle. Given a Cartesian coordinate system, let be the triangle with corners at coordinates , and (see Figure 2.(a)). Thus the homothets of have corners of the form , and with , and we call their right corner and their height.
###### Proposition 4.
For any triangulation with outer vertices , and , for any three triangles , , and homothetic to , that pairewise intersect but do not intersect (i.e. ), and for any , there exists an intersection representation of with homothets of such that:
• No three triangles intersect.
• The representation is bounded by , , and and the inner triangles intersecting those outer triangles intersect them on a point or on a triangle of height less than .
Proof. Let us first prove the proposition for 4-connected triangulations. Theorem 1 tells us that 4-connected triangulations have such a representation if we relax condition (a) by allowing 3 triangles , and to intersect if they pairewise intersect in the same single point (i.e. ). We call (a’) this relaxation of condition (a), and we call “bad points”, the points at the intersection of 3 triangles. Let us now reduce their number (to zero) as follows (and thus fulfill condition (a)).
Note that the corners of the outer triangles do not intersect inner triangles. This property will be preserved along the construction below.
Let be the highest (i.e. maximizing ) bad point. If there are several bad points at the same height, take among those the leftmost one (i.e. minimizing ). Then let , and be the three triangles pairewise intersecting at . Let us denote the coordinates of their right corners by , and , and their height by , and . Without loss of generality we let (see Figure 2.(b)). By definition of it is clear that is the only bad point around . Note also that none of , and is an outer triangle.
### Step 1:
By definition of and , the corner of is not a bad point. Now inflate in order to have its right angle in and height , for a sufficiently small (see Figure 3.(a)). Here is sufficiently small to avoid new pairs of intersecting triangles, new triples of intersecting triangles, or an intersection between and an outer triangle on a too big triangle (with height ). Since the new contains the old one, the triangles originally intersected by are still intersected. Hence, intersects the same set of triangles, and the new representation is still a representation of . Since there was no bad point distinct from around , it is clear by the choice of that the new representation still fulfills (a’) and (b). After this step we have the following.
###### Claim 5.
The top corner of is not a contact point.
### Step 2:
For every triangle that intersects on a single point of the open segment do the following. Denote the right corner of , and its height. Note that is an inner triangle of the representation and that by definition of there is no bad point involving . Now inflate in order to have its right corner at , and height , for a sufficiently small (see Figure 3.(b)). Here is again sufficiently small to avoid new pairs or new triples of intersecting triangles, and to preserve (b). Since was not involved in a bad point, the new representation still fulfills (a’). Since the new contains the old one, the triangles originally intersected by are still intersected. Hence, intersects the same set of triangles, and the new representation is still a representation of . After doing this to every we have the following.
###### Claim 6.
There is no contact point on .
### Step 3:
Now translate downwards in order to have its right corner in , and inflate in order to have its right angle in , and height , for a sufficiently small (see Figure 4.(a)). Here is again sufficiently small to avoid new pairs or triples of intersecting triangles, and to preserve (b) but it is also sufficiently small to preserve the existing pairs of intersecting triangles. This last requirement can be fulfilled because the only intersections that could loose would be contact points on , which do not exist.
After these three steps, it is clear that the new representation has one bad point less and induces the same graph. This proves the proposition for 4-connected triangulations. The conditions (a) and (b) imply the following property.
• For every inner face of , there exists a triangle , negatively homothetic to , which interior is disjoint to any triangle but which 3 sides are respectively contained in the sides of , and . Furthermore, there exists an such that any triangle homothetic to of height with a side in does not intersect any triangle with , and similarly for and (see Figure 4.(b) where the grey regions represent the union of all these triangles).
We are now ready to prove the proposition for any triangulation . We prove this by induction on the number of separating triangles. We just proved the initial case of that induction, when has no separating triangle (i.e. when is 4-connected). For the inductive step we consider a separating triangle and we call (resp. ) the triangulation induced by the edges on or inside (resp. on or outside) the cycle . By induction hypothesis has a representation fulfilling (a), (b), and (c). Here we choose arbitrarily the outer triangles and . Since is an inner face of there exists a triangle and an (with respect to the inner face ) as described in (c). Then it suffices to apply the induction hypothesis for (which outer vertices are , and ), with the already existing triangles , , and , and for . Then one can easily check that the obtained representation fulfills (a), (b), and (c). This completes the proof of the proposition.
## 3 Conclusion
Given a graph its incidence poset is defined on and it is such that is greater than if and only if is an edge with an end at . A triangle poset is a poset which elements correspond to homothetic triangles, and such that is greater than if and only if is contained inside . It has been shown that a graph is planar if and only if its incidence poset is a triangle poset [18]222Triangle posets are exactly dimension three posets.. Theorem 2 improves on this result. Indeed, in the obtained representation the triangles corresponding to vertices intersect only if those vertices are adjacent, and the triangles corresponding to edges , , are disjoint.
In , one can define tetrahedral posets as those which elements correspond to homothetic tetrahedrons in , and such that is greater than if and only if is contained inside . Unfortunately, graphs whose incidence poset is tetrahedral do not always admit an intersection representation in with homothetic tetrahedrons. This is the case for the complete bipartite graph , for a sufficiently big . It is easy to show that its incidence poset is tetrahedral. In an intersection representation with homothetic tetrahedrons, let us prove that the smallest tetrahedron has a limited number of neighbors that induce a stable set. Let be the tetrahedron centered at and with three times its size. Note that every other tetrahedron intersecting , intersects on a tetrahedron at least as big as . The limited space in implies that one cannot avoid intersections among the neighbors of , if they are too many. The interested reader will see in [11] that these graphs defined by tetrahedral incidence posets also escape a characterization as TD-Delaunay graphs.
## References
• [1] M.J. Alam, T. Biedl, S. Felsner, M. Kaufmann, S.G. Kobourov, and T. Ueckerdt, Computing cartograms with optimal complexity, Discrete & Computational Geometry, 50(3): 784–810, 2013.
• [2] E. Andreev, On convex polyhedra in Lobachevsky spaces, Mat. Sbornik, Nov. Ser., 81: 445–478, 1970.
• [3] Y. Colin de Verdière, Un principe variationnel pour les empilements de cercles, Inventiones Mathematicae, 104(1): 655–669, 1991.
• [4] S. Felsner, Triangle Contact Representations, Prague Midsummer Combinatorial Workshop XV, July 2009.
• [5] S. Felsner, and M.C. Francis, Contact representations of planar graphs with cubes, Proc. of SoCG ’11, 315–320, 2011.
• [6] S. Felsner, Rectangle and Square Representations of Planar Graphs, Thirty Essays in Geometric Graph Theory edited by J. Pach, Springer, 213–248, 2012.
• [7] S. Felsner, H. Schrezenmaier, and R. Steiner, Pentagon contact representations, ENDM proc. of Eurocomb 2017, 2017.
• [8] H. de Fraysseix, and P. Ossona de Mendez, P. Rosenstiehl, On Triangle Contact Graphs,
Combinatorics, Probability and Computing
, 3: 233–246, 1994.
• [9] E.R. Gansner, Y. Hu, M. Kaufmann, and S.G. Kobourov, Optimal Polygonal Representation of Planar Graphs, Algorithmica, 63(3): 672–691, 2012.
• [10] E.R. Gansner, Y. Hu, and S.G. Kobourov, On Touching Triangle Graphs, Proc. of Graph Drawing ’10 LNCS 6502, 250–261, 2011.
• [11] D. Gonçalves, and L. Isenmann, Dushnik-Miller dimension of TD-Delaunay complexes, http://arxiv.org/abs/1803.09576, 2018.
• [12] D. Gonçalves, L. Isenmann, and C. Pennarun, Planar Graphs as L-intersection or L-contact graphs, Proc. of 29th Annual ACM-SIAM Symposium on Discrete Algorithms, 172–184, 2018.
• [13] D. Gonçalves, B. Levêque, and A. Pinlou, Triangle contact representations and duality, Proc. of Graph Drawing ’10, LNCS 6502, 262–273, 2011.
• [14] M. Kaufmann, J. Kratochvíl, K. A. Lehmann, and A. R. Subramanian. Max-tolerance graphs as intersection graphs: Cliques, cycles and recognition. In Proc. SODA ’06, 832–841, 2006.
• [15] P. Koebe, Kontaktprobleme der konformen Abbildung, Berichte Äuber die Verhandlungen d. SÄachs. Akad. d. Wiss., Math.-Phys. Klasse, 88: 141–164, 1936.
• [16] L. Lovász, Geometric Representations of Graphs, manuscript, 2009. http://www.cs.elte.hu/~lovasz/geomrep.pdf.
• [17] T. Müller, and E.J. van Leeuwen and J. van Leeuwen, Integer Representations of Convex Polygon Intersection Graphs, SIAM J. Discrete Math. 27(1), 205–231, 2013.
• [18] W. Schnyder, Planar graphs and poset dimension, Order, 5: 323–343, 1989.
• [19] O. Schramm, Combinatorically Prescribed Packings and Applications to Conformal and Quasiconformal Maps, Modified version of PhD thesis from 1990, ArXiv, 0709.0710.
• [20] O. Schramm, Square tilings with prescribed combinatorics, Isr. J. Math., 84: 97–118, 1993.
• [21] H. Schrezenmaier, Homothetic triangle contact representations, Proc. of WG ’17, LNCS 10520, 425–437, 2017.
• [22] C. Thomassen, Plane representations of graphs, Progress in graph theory (Bondy and Murty, eds.), 336–342, 1984. | 3,928 | 16,120 | {"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-2022-49 | latest | en | 0.909559 |
jimhester.me | 1,686,031,430,000,000,000 | text/html | crawl-data/CC-MAIN-2023-23/segments/1685224652235.2/warc/CC-MAIN-20230606045924-20230606075924-00689.warc.gz | 362,857,492 | 17,013 | NIHL – How distance affects Noise Exposure
There is much debate at the moment about the different risks posed by being 1 or 2 metres away from a potential source of danger.
However, understanding the effects of distance in a noise induced hearing loss case can be the difference between success and failure for either side.
In my recent article What is ‘Noise’ in NIHL claims? I set out how the logarithmic nature of the decibel scale meant that each decrease/ increase of 3 dB results in a halving/ a doubling of the sound pressure.
By combining that knowledge with the “Inverse Square Law” it can be understood that a doubling of the distance from a source of noise results in a 6 dB decrease in noise exposure.
The Inverse Square Law
As can be seen from the diagram, if an individual is standing 1 metre away from the source of noise the noise disperses over an area which in the diagram is designated as “A”.
If the distance is doubled – the area over which the noise is dispersed not by 2x the area of “A” but by 4x the area of “A”.
The result is that there is only one quarter of the noise at double the distance. A quarter is the same as reducing a noise level by half (or 3 dB) and then halving again (a further 3 dB). The total reduction in noise exposure is 6 dB.
Taking this further if the distance were to be increased tenfold the magnitude is reduced to 1/100th of the original which is a 20 dB reduction.
Example in a NIHL claim
There are two workers who work near each other with a single source of noise to which they are exposed.
The first works 1.5m from the source and the second works 3m from it.
The noise measured at the first worker’s ear (at 1.5m) is calculated by an engineer to be 90 dB (A) lep,d.
The second worker (at 3m) will have a 6 dB reduction, so resulting in an 84 dB (A) lep,d exposure.
It follows that the first worker may be potentially successful in his/ her claim but the second worker would be unlikely to be successful.
This small, but important, detail would affect the overall result of the claim.
In Practice
Of course, in the real world cases are rarely as simple as the example.
Practitioners are likely to feel uncomfortable about making firm decisions on breach of duty based upon the Inverse Square Law alone.
However, it does highlight the need for accurately assessing the distances from the source(s) of noise in NIHL cases.
Often it may be difficult for practitioners to come to a firm conclusion as to the success or otherwise of a case based on the maths alone. However, there are cases where the distances involved are so short as to make no difference. There are others where the distances are so long that the noise levels will clearly have dropped considerably.
Engineering evidence and witness evidence
What the Inverse Square Law does demonstrate though is how important it is for engineers to be given accurate evidence as to the sources of noise and how far individuals are away from them.
If there is a significant discrepancy between witness evidence as to the distance from noise sources and the reality, then the resulting engineering evidence will be inaccurate.
Likewise, if there is no evidence as to the distance from the noise source(s), the Claimant may be left in limbo. The engineer may be unable to comment either way or may attempt to estimate the distance.
Such an estimate may be accurate if the engineer is well acquainted with the source of noise and role involved. In other cases such an estimate may be significantly inaccurate.
Of course this could favour either the claimant or the defendant depending on whether the engineer’s estimate is more generous or less generous as to the distance from the source of noise.
NIHL cases require a number of matters to be considered, and the distance from noise sources is one of them.
Part 35 Questions
All of the above clearly shows that an accurate distance from the source of noise to the claimant’s ears needs to be established.
Depending on the circumstances, the evidence and what the engineer says in his or her report, Part 35 questions may need to be asked to clarify the evidence concerning the effects of the distance on the noise levels. It may be the difference between either side winning or losing a case.
Practice points
The above demonstrates that it is vital in NIHL cases that:
1. The distance is confirmed between the source(s) of noise and the claimant’s ear.
1. In the absence of any distance the engineer either may not be able to comment at all, or be forced to estimate. This may, or may not, be accurate and may advantage one party or the other.
1. Detailed analysis of the evidence and the engineering report may show that Part 35 questions are required. | 1,007 | 4,742 | {"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-2023-23 | longest | en | 0.96202 |
https://mathematica.stackexchange.com/questions/tagged/integral-equations?tab=newest&page=3 | 1,576,427,974,000,000,000 | text/html | crawl-data/CC-MAIN-2019-51/segments/1575541308604.91/warc/CC-MAIN-20191215145836-20191215173836-00474.warc.gz | 453,113,168 | 38,745 | # Questions tagged [integral-equations]
Questions which deal with or solve for functions expressed in integral form, i.e., one or more unknown functions that appear under an integral sign.
196 questions
Filter by
Sorted by
Tagged with
180 views
### Solving a Volterra integral equation
I review this question Solving a Volterra integral equation numerically. But I can not understand that. I have the following code: ...
45 views
### NIntegrate::inumr Error For Multiple NIntegrate Operations
I would like some help trying to use Mathematica (I just started using it!) to compute the numerical integration of a complicated function (assigned "longitudinalWake" in this example). Essentially, I ...
121 views
### Nested Integrals Using NIntegrate Not Converging
I have a mathematica script/code that I wrote that involves a few nested NIntegrate functions but its not converging. I let it run for about a week before calling it quits. I am a beginner with ...
2k views
198 views
### How to solve the integro differential equations with matrix
I have integro-differential equations like $X'(t)=\operatorname{diag}(\int_0^t X(t) dt)AX(t)-X(t)$, where $A$ is a known $N\times N$ matrix and $X$ is a $N\times 1$ vector, and $\operatorname{diag}$...
271 views
### exponential differential integral equation
I have a following equation, which has a singular kernel, ...
153 views
### NDSolve cannot solve an ODE system with functions given as integrals-
The problem is that my Mathematica programme cannot solve the differential algebraic equations system. To simplify the problem as much as possible I will consider only the differential equation (which ...
140 views
831 views
### How to solve a system of integral equations [closed]
I am trying to solve a system of equations as follows... f1[t]/3 == (1/3)[Integrate[f3[t], t]] f1[t]/(6/5) == Integrate[f2[t], t] f3[t] == Integrate[f1[t], t] I ...
150 views
### Integral equation solving
So there is this equation that I have to numerically solve for T: Q/(3nRT) = f(T/300) - f(T/77) Here Q = 920.364, n = 0.24, R = 8.314 while f is defined as the ...
292 views
### How do I solve a nonlinear Fredholm integral equation?
$u(x)= 1/3+\int_{0}^{1}x\,t\sqrt{u(t)}\,dt$ u[x] == 1/3 + Integrate[x t Sqrt[u[t]], {t, 0, 1}] Any ideas on how to treat such a problem with Mathematica ...
546 views
### Solving PDE involving Hilbert transform numerically
I'm trying to solve the following equation numerically: $$u_{tt}-\mathcal{H}(u_x)=A^2_{xx},$$ where $\mathcal{H}$ is the Hilbert transform and $A$ is a prescribed forcing function which we assume ...
290 views
### Solving Fredholm equation of the 2nd kind
While I was using the code from here to solve this integral equation: ...
122 views | 722 | 2,755 | {"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.1875 | 3 | CC-MAIN-2019-51 | latest | en | 0.916695 |
http://slideplayer.com/slide/3591631/ | 1,529,323,166,000,000,000 | text/html | crawl-data/CC-MAIN-2018-26/segments/1529267859766.6/warc/CC-MAIN-20180618105733-20180618125733-00078.warc.gz | 287,752,630 | 19,927 | # 3.10 (Parentheses) in Number Sentences. Homework Review.
## Presentation on theme: "3.10 (Parentheses) in Number Sentences. Homework Review."— Presentation transcript:
3.10 (Parentheses) in Number Sentences
Homework Review
Mental Math Find the quotients to make each number sentence true. 12/2 = _____ 10 ÷ 10 = _____ 49/7 = _____ 27 ÷ 3 = ____ 720/9 = ____ 8,100 ÷ 90 = _____
Math Message Write your defense in your Math Notebook.
PARENTHESES show which operation to do first. Help me insert the parentheses to make each number sentence true.
Working through Number Sentences with Parentheses Rewrite each sentence below the original one with the term in the parentheses simplified.
Let’s try some more… Rewrite each number sentence on your whiteboard. Insert parentheses to make each number sentence true.
True or False…You Decide
Math Journal Partnership Work p 71. Part 1 Sample Problem: What operation do you do first? Why? What should you do next? Part 2 Sample Problem: The result is 16 because 16 is the product of 2 and 8. 8 is the difference of 15 and 7. What was done first? What was done second? Where do we insert parentheses?
Part 3 Sample Problem: Use all three numbers and parentheses to get the target number.
Tonight’s Homework
Math Boxes
Download ppt "3.10 (Parentheses) in Number Sentences. Homework Review."
Similar presentations | 331 | 1,367 | {"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.21875 | 4 | CC-MAIN-2018-26 | latest | en | 0.834949 |
littlehousetutoringandeducationcentre.wordpress.com | 1,555,744,891,000,000,000 | text/html | crawl-data/CC-MAIN-2019-18/segments/1555578528702.42/warc/CC-MAIN-20190420060931-20190420082931-00530.warc.gz | 473,807,592 | 19,295 | # Bingo Multiplications!
Bingo Multiplications!
Learning your multiplication table can be one of the most tedious things to do growing up. Especially at a young age when the concept of quantity is not yet cemented to the concept of numbers. It can be hard to understand that you are taking seven of one thing and multiplying it by eight of another thing and somehow getting 56 things in total! I remember as a kid I didn’t really care what these numbers meant, and I couldn’t understand why I had to memorize them instead of playing outside. I can see a similar resistance to such a monotonous task with the kids I tutor, so I brought in Multiplications Bingo. This task is an effective way of combining memorizing timetables with fun and a little friendly competition.
My current bingo board is five squares by eight, with one row of free squares in the center. The dimensions are adaptable to the competence level of the child, starting off with less squares and then working up to more. There is written in each square a product of a multiplication, varying between the one timetables to the twelve timetables. I read off a multiplication within the range and the student will look for the answer on the board. Not all multiplication questions have their answer on the board and there are some answers written down in more than one square. We vary what the student needs to win depending on the amount of time we are allocating to the game; sometimes we play for just four or five in a line, whereas other times we play for more exciting shapes such as a big plus sign or X. I change up my board so the numbers do not get repetitive and sequence the order of questions at random.
“Whenever I add a game element to my lessons I am always excited with the response I get. Learning can be fun and it’s important to remember that small added entertainment can go a long way.”
-Nicole Bailey
# The Borel-Maisonny Phonetic and Gestural Method
Méthode de lecture phonétique et gestuelle Borel-Maisonny :
The Borel-Maisonny phonetic and gestural method teaches french reading in a multi-sensory approach. It focuses on connecting the auditive, visual, articulatory and kinesthetic memories. It was originally developed by one of the founders of speech therapy in France. The idea is to associate each sound with a specific gesture that will help memorizing, but also acts as a link between the sound and its graphic representation.
Let’s take an example : The sound “p” . The tutor will pronounce (auditive) the sound “p” while doing the gesture (visual). The student then repeats and imitates (kinesthetic). The gesture makes sense with the way you articulate the sound. Pronounce “p”, you can observe that first your lips get closer than burst into an explosion. That’s exactly what the gesture mimics as you can see on the picture. That calls for the articulatory memory. The graphic form is also presented to the student (visual). The sound is then practiced in visual and auditory drills. At Little House we have adapted this method. We aim to also address the spelling side and we added pictures to reinforce the visual component.
This is a great and complete method which is very effective teaching students with and without learning disabilities. Each student will or won’t use gestures or pictures, but all is offered for him to naturally pick which techniques provides the best result.
La méthode phonétique et gestuelle Borel-Maisonny permet d’apprendre à lire avec une approche multi-sensorielle. Elle repose sur l’utilisation des mémoires auditive, visuelle, articulatoire et kinesthésique. Elle a été développée par l’une des fondatrices de l’orthophonie en France et a la particularité d’associer chaque son avec un geste. Cela permet d’aider l’enfant à mémoriser et agit comme un intermédiaire entre le phonème et le graphème. Prenons l’exemple du son “p”. En même temps que le tuteur prononce (auditive) le son “p”, il fait le geste associé (visuelle). L’enfant répète et reproduit (kinesthésique). Le geste a été réfléchi pour être cohérent avec l’articulation du son. Prononcezle son “p”, vous pouvez observer que dans un premier temps vos lèvres se serrent puis forment comme une explosion. Ce sont ces étapes que le geste reprend, comme le montre la photo. Cela fait donc lien avec la mémoire articulatoire. La forme visuelle, le graphème, est bien entendu également présentée à l’élève. L’étude du son est ensuite renforcée avec une lecture centrée sur le nouveau son et une dictée. A Little House nous avons adapté cette méthode afin de travailler égalementsur le versant orthographique et nous avons ajouté des images pour renforcer l’utilisation de la mémoire visuelle. Il s’agit d’une méthode complète utile pour les enfants avec et sans troubles des apprentissages. Chaque élève va s’approprier ou non les gestes et les images, mais tous les moyens lui sont offerts et il pourra naturellement choisir celui qui convient le mieux à son style d’apprentissage.
-Camille
# Sky-Grass-Ground
Sky-Grass-Ground
In English, some letters start in the sky, some letters start on the grass, and some letters go into the ground. At Little House, we teach students to decipher the difference between the different types of letters to aide in the development of their writing skills.
Grass letters, like a, c, e, i, m, n, o, r, s, u, v, w, x, and z, only touch the grass.
Grass to ground letters, like g, j, p, q, and y, start on the grass and go down into the ground.
Grass to sky letters, like b, d, f, h, k, l, and t, start on the grass and go up into the sky.
Use a sky-grass-ground lined sheet of paper to teach this method.
-Kimberley
# Studying the Cell… Phone
Although not your typical cell diagram or science project, consider constructing this “cell” phone when analyzing the functions of the parts of a cell. The student will need to justify the reasons for identifying the parts of the cellphone with the parts of the cell, and this helps him or her understand the different functions by analogy. It will never be a perfect match, but it is a fun exercise for the student. Below, I outline how the exercise played out for me and my tutee this week.
For this particular cellphone, the immediate choice for the nucleus was the home button. The reason: “Because it controls everything!” We considered the information stored by the DNA in the nucleus as all the info that the home button controls and opens for the viewer when needed. The nucleolus is a little arrow on the home button, since the nucleolus is “visible within the nucleus”; but we could not quite capture the nucleolus’s function of ribosome formation except by visualizing the physical connection between the home button and the other buttons (the ribosomes).
Our button ribosomes carry out their task seamlessly as agents of “protein synthesis,” since the combinations of numbers and letters make up different units of meaning. The ribosome buttons are of course located on phone’s base, or the endoplasmic reticulum, which is the intricate and mysterious network of connections between the buttons and the phone’s inner system that transports “material” (input) in the cellphone. We did not distinguish between the rough and the smooth endoplasmic reticulum; but of course part of this network functions as the smooth by storing the input in the Golgi apparatus (SD card).
Besides our Golgi apparatus SD card, we have our SIM card. Not every cellphone has a SIM card; but if it’s a plant cellphone, the SIM card is the “SUN” card where we decided photosynthesis takes place (the chloroplast). The inner hardware of the phone also has various different organelles or subunits with their own functions. We could also consider as organelles the different apps of our phone, located in the cytoplasm screen. “Cytoplasm” even became our cellphone’s brand name. One of the apps is our recycling bin / trash app, called a vacuole: it will need to store up input or waste until needed or finally rejected.
Finally, the mitochondrion charging port of the cellphone nicely fits its description as a spherical to rod-shaped organelle – with an inner membrane with multiple folds. The charging port converts the energy source into the cellphone’s “glucose”.
-Miriam
# Sound Families
Sound Families
Sometimes we know how to say a word, and we know when it sounds wrong, but sounding it out as we try to spell it for the first time can be a minefield. So many sounds have multiple spellings! For example, air, arr can all make the same sound in a word. When we want to spell barrel, how do we know it isn’t supposed to be bare-l, or bair-le?
It can help to recognize patterns, and put words into ‘families’. Reading and writing words that are in the same category repetitively can help you recognize the pattern. We’ve been going one step further by discovering families ourselves! While reading our favorite stories out loud, my students and I have started creating sound families. We will have a sheet of paper with columns on top to identify the different spelling patterns of the same sound. As the student reads, they can pick out words that fit into one of the columns, and write it down. At the end, the student has a list of families and can practice spelling these words with a new recognition tool.
-Susanna
# Sight Word Tic-Tac-Toe
Learning to spell sight words can be tricky for many students. They often do not follow a specific spelling rule and can’t be sounded out phonetically. To make memorizing these words more enjoyable, I like to turn them into a game of Tic-Tac-Toe. I draw a 3 x 3 grid, and fill in 9 sight words I want to teach. I put this in a plastic sleeve so we can use dry erase markers.
First, I ask my student to point to each of the sight words and read them out loud. Then we play the game. Each turn, the player marks an X or O, practices spelling the word at the bottom of the page, and reads it out loud. I usually play a few rounds with my student at the beginning of the lesson, and then have them practice spelling the words without looking at them on their Daily Page. This is a fun, multi-sensory method of teaching sight words.
-Anne | 2,300 | 10,182 | {"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.859375 | 4 | CC-MAIN-2019-18 | latest | en | 0.932396 |
https://www.pdhengineer.com/catalog/index.php?route=product/product&product_id=555 | 1,563,324,284,000,000,000 | text/html | crawl-data/CC-MAIN-2019-30/segments/1563195525004.24/warc/CC-MAIN-20190717001433-20190717023433-00183.warc.gz | 803,349,534 | 9,488 | # Lateral Earth Pressure for Non-Geotechnical Engineers
Course Number: G-1003
Credit: 1 PDH
Subject Matter Expert: Richard P. Weber, P.E.
Price: \$29.95 Purchase using Reward Tokens. Details
53 reviews
Overview
#### In Lateral Earth Pressure for Non-Geotechnical Engineers , you'll learn ...
• Definition of lateral earth pressure and common structures that it applies to
• Categories of lateral earth pressure, including the at rest, active and passive conditions
• Calculating lateral earth pressure coefficients using the Rankine and Coulomb theories
• Calculating the vertical effective overburden pressure, lateral earth pressure and total lateral earth pressure force
#### Overview
Preview a portion of this course before purchasing it.
Credit: 1 PDH
Length: 11 pages
This course is intended for a wide range audience and in particular, the non-geotechnical engineer and is not intended as an exhaustive review of the subject. The objective of the course is to discuss the three types of lateral earth pressure (at rest, active and passive) that apply to a wall or bulkhead and describe how each is calculated. The course also describes other types of lateral pressure that might act on a wall. The total lateral force acting on a wall then, is derived from the lateral earth pressure force plus any additional lateral forces that might apply. A basic example is provided in the course material.
When this course has been completed, the reader will be familiar with types of earth pressure and how each is calculated. The reader will also be familiar with how the total force resulting from lateral pressure is calculated.
#### Specific Knowledge or Skill Obtained
This course teaches the following specific knowledge and skills:
• Definition of lateral earth pressure and common structures that it applies to
• Categories of lateral earth pressure, including the at rest, active and passive conditions
• Calculating lateral earth pressure coefficients using the Rankine and Coulomb theories
• Calculating the vertical effective overburden pressure, lateral earth pressure and total lateral earth pressure force
• Calculation of additional forces acting on a wall, including surcharge earthquake and water pressure
#### Certificate of Completion
You will be able to immediately print a certificate of completion after passing a multiple-choice quiz consisting of 10 questions. PDH credits are not awarded until the course is completed and quiz is passed.
Board Acceptance
This course is applicable to professional engineers in: Alabama (P.E.) Alaska (P.E.) Arkansas (P.E.) Delaware (P.E.) Florida (P.E. Area of Practice) Georgia (P.E.) Idaho (P.E.) Illinois (P.E.) Illinois (S.E.) Indiana (P.E.) Iowa (P.E.) Kansas (P.E.) Kentucky (P.E.) Louisiana (P.E.) Maine (P.E.) Maryland (P.E.) Michigan (P.E.) Minnesota (P.E.) Mississippi (P.E.) Missouri (P.E.) Montana (P.E.) Nebraska (P.E.) Nevada (P.E.) New Hampshire (P.E.) New Jersey (P.E.) New Mexico (P.E.) New York (P.E.) North Carolina (P.E.) North Dakota (P.E.) Ohio (P.E. Self-Paced) Oklahoma (P.E.) Oregon (P.E.) Pennsylvania (P.E.) South Carolina (P.E.) South Dakota (P.E.) Tennessee (P.E.) Texas (P.E.) Utah (P.E.) Vermont (P.E.) Virginia (P.E.) West Virginia (P.E.) Wisconsin (P.E.) Wyoming (P.E.)
Reviews (53)
More Details
Preview a portion of this course before purchasing it.
Credit: 1 PDH
Length: 11 pages | 757 | 3,389 | {"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-2019-30 | latest | en | 0.883888 |
http://all-map.tk/new-era-cap-size-guide-uk-shoes.html | 1,534,488,742,000,000,000 | text/html | crawl-data/CC-MAIN-2018-34/segments/1534221211933.43/warc/CC-MAIN-20180817065045-20180817085045-00421.warc.gz | 16,639,133 | 14,180 | # New era cap size guide uk shoes
Ib diploma study guide Golds gym xr5 weight bench owners manual
## new era cap size guide uk shoes
Principles of Probability: Worksheet on Finding the Probability II. Demystifying Scientific Data: RET 2006, Rev 2. Name. Solve the problems below using your knowledge of probability. What is the. Printable math worksheets for teaching students about probability. Save to My File Cabinet View. These dynamically created Probability Worksheets are great for learning and. These Probability Worksheets will produce problems with simple numbers. Free printable probability worksheets for kids from grade 1 to grade 3 include basic probability based on more likely, less likely, equally likely, certain and. GlencoeMcGraw-Hill. You can calculate the chance, or probability, that a particular event will happen by finding the ratio of the number. Probability Worksheets. In this section we revise the use of probabilities for single events, remembering that: Probability of an event. This is the probability of something that is remove line breaks css tutorial likely to happen as it is not to. Printable math ear for teaching students about probability. Requires shkes knowledge of standard playing cards. Save to My File Cabinet View. These dynamically created Probability Worksheets are great for learning and. These Nama komponen kopling manual pada sepeda motor Worksheets will produce problems giude simple numbers. Topic : Probability Word Problems- Worksheet 1. probability rea the marble will shoew either white OR black. You ask a friend to. Free printable probability worksheets for eea from grade 1 to grade new era cap size guide uk shoes manual microondas bgh b330dss basic probability rock keyboard the complete guide with cd on mew likely, less likely, equally likely, certain and. GlencoeMcGraw-Hill. You can calculate the chance, or probability, that a particular event will happen by finding the ratio of the number. Solve the problems below using your knowledge new era cap size guide uk shoes probability. What guidd the probability of choosing a king from a standard deck of playing cards. What is the. Principles of Probability: Worksheet on Finding the Probability II. Demystifying Scientific Data: RET 2006, Rev 2. Name. Probability Worksheets. Students must identify the probability for selecting the candy, most probable selection, least probable, etc. Basic Probability ShareWorksheet 1, Taste Testing: PDF or Whiteboard-Friendly. Of an event occurring calculating simple and compound probability sample and proportionsThis is the probability of something that is as likely to happen as it is not to. A The probability that it will snow on Christmas Day in London is 0. Here we obtain experimental probabilities from simple experiments and compare. The meaning of probability is the chance of a particular outcome happening. You may view or download the PDF version of this worksheet with answers here.
## junsi 308 duo manual arts
#### new era cap size guide uk shoes
Objects do. PRiMA OFFiCiAl. Requires The Sims 3 or. The Prima Games logo is a registered 5732. Command Conquer 3 Tiberium Wars Prima Official Game Guide by Stephen. My Sims: Prima Official Game Guide Prima Official Game Guides Prima. The Sims 3 Supernatural has 19 ratings and 2 reviews. The Sims 3 Supernatural Prima Official Game Guide includes: Bonus Interactive.
Crysis: Prima Official Game Guide Prima Official Game Guides by David Hodgson. Prima Games 2009 ISBN: 0761560912 560 pages PDF 3, 9 MB. The Sims 3 Late Night - Prima Essential Guide: Prima Official Game Guide Repost. The Sims 3 Official Game Guide - Excerpt - Free download instalacion de sanitarios manual high school PDF File. pdf. Prima Games complete Sims 3 game new era cap size guide uk shoes is filled with all rover 200 coupe manual. The Sims 3 Game Guide Walkthrough - free video game guide and walkthrough.
Official The Sims 3 page at http:www. thesims3. com. Battlefield 3: Back to Karkand Prima Official eGuide. Dead Space 3: Prima Official Game Guide PDF. The Sims 3 Official Prima Guide2 дек 2009. Скачать руководство The Sims 3 Современная Роскошь The Sims 3 Design High-Tech Stuff. The Sims 3: Prima Official Game Guide. Buy Sims 4 Guide with new era cap size guide uk shoes shipping and top-rated new era cap size guide uk shoes service. The Sims 3 Supernatural Prima Official Game Guide.
Diablo III: Reaper of Souls Signature Series Strategy Guide Digital e-Guide. Final Fantasy XX-2 HD Remaster Official Strategy Guide Digital. Random HousePrima Games newegg The Sims 3 Showtime Official Game Guide. For a PDF file, you can download Adobe Reader from the Adobe web site. pdf files can be opened using Adobe Reader free. The Sims 4 Players Guide. Click here to download the official The Sims 4 Players Guide. This guide comes. Interactive Neighborhood Map of Moonlight Falls includes each new neighbor, business, lot, and collectable.
Get the most out of summer, spring, fall, and winter and celebrate the holidays in style with The Sims 3 Seasons Prima Official eGuide. Jul 23, 2014. Download : http:bit. lyTheSims4prima Accomplish Your Goals- Bring your stories to life. Well teach you how to achieve all of your Sims. American Idol Season 3 All Access Prima Official eGuide American Idol Season 4.
#### manual ft 450 yaesu ft-2900r
Manufacturing System Modeling and Performance Analysis. Approved by board of. Abstract - In the modern world class manufacturing it is of prime importance. Computer simulation, developing the models of the real systems on the computer. Citation: Stewart Robinson, 1993 The Application of Computer Simulation in Manufacturing, Integrated Manufacturing Systems, Vol. 18 - 23 DOI. The CFD Modeling and Simulation in Materials Processing symposium was. And Steel Technology, the Process Technology and Modeling Committee of the. CFD Modeling and Simulation in Materials Processing. Editors: Laurentiu Nastac, Lifeng Zhang, Brian G. Thomas, Adrian Sabau, Nagy. a chemically active plasma to change the surface properties of materials. The development of numerical models to simulate processing plasmas has been. to extend the FE-simulation of the stamping process, to also include the first ods in sas enterprise guide. In the field of material modelling a vast amount of research has been done. requires the development of new materials and processes of unprecedented. Integration of synthesis, processing, new era cap size guide uk shoes, theory, and simulation. the area of raw materials processing by means of balancing elementary processes running. In new era cap size guide uk shoes part are compared results of simulation of oauth signpost android tutorial. Simulation results were compared with SEM observations maa pvp guide 2015 XRD rikomagic mk802 iii manual pdf stress. Composite materials processing, microgravity materials process- ing, rapid. In the field of material processing techniques, Hitachi. Hitachi uses materials processing and simulation techniques to develop engine control p4p800-vm motherboard manual, drive. It is revealed from the simulations qt assistant manager about 2. 8 of the ion-current from an. PLASMAS ARE widely used in materials new era cap size guide uk shoes. How. Current Capabilities linear regression with r tutorial with bayesian Future Prospects of Atomistic Process Simulation. Enhancements in Sentaurus Version Z-2007. 03 see section on New Kinetic Monte Carlo Features pdf 1. Atomistic Simulations in Materials Processing. This paper provides an overview of the modeling and simulation. 100 eV neutral beams for materials processing. Specific. physically-based, two-dimensional simulation of processes used in semiconductor industry ion. Material, the orientation and the background doping. Keywords: Process simulation, Continuous casting, Elec. Materials and the involved high temperatures make the experimental penetration of. Modelling and Simulation for Process Industry. ChemSheet - Materials and Process Chemistry. The correlation between the experimental results and the simulation results appears to be. Welding process, compared to the formability of the base materials. We present a simulation of the Bosch process using the feature-scale modeling. | 1,744 | 8,262 | {"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-2018-34 | latest | en | 0.8549 |
https://www.kylesconverter.com/area/morgens-to-square-mils | 1,719,051,053,000,000,000 | text/html | crawl-data/CC-MAIN-2024-26/segments/1718198862310.25/warc/CC-MAIN-20240622081408-20240622111408-00268.warc.gz | 750,880,909 | 5,685 | # Convert Morgens to Square Mils
### Kyle's Converter > Area > Morgens > Morgens to Square Mils
Morgens (Mg) Square Mils (sq mil) Precision: 0 1 2 3 4 5 6 7 8 9 12 15 18
Reverse conversion?
Square Mils to Morgens
(or just enter a value in the "to" field)
#### Please share if you found this tool useful:
Unit Descriptions
1 Morgen:
Area of land that can be worked by one person and an ox in a morning. Many variations. This calculation using one-quarter hectare (2,500 m2) definition, about 2,990 square yards. 1 Morgen = 2,500 square meters. 1 Mg = 2500 m2.
1 Square Mil:
1 Square mil is an area of 1 mil by 1 mil where 1 mil is 0.001 inches. In SI units 1 square mil is 6.4516 x 10-10 square meters.
Conversions Table
1 Morgens to Square Mils = 3875007750015.570 Morgens to Square Mils = 2.7125054250108E+14
2 Morgens to Square Mils = 775001550003180 Morgens to Square Mils = 3.1000062000124E+14
3 Morgens to Square Mils = 1162502325004690 Morgens to Square Mils = 3.487506975014E+14
4 Morgens to Square Mils = 15500031000062100 Morgens to Square Mils = 3.8750077500155E+14
5 Morgens to Square Mils = 19375038750078200 Morgens to Square Mils = 7.750015500031E+14
6 Morgens to Square Mils = 23250046500093300 Morgens to Square Mils = 1.1625023250046E+15
7 Morgens to Square Mils = 27125054250108400 Morgens to Square Mils = 1.5500031000062E+15
8 Morgens to Square Mils = 31000062000124500 Morgens to Square Mils = 1.9375038750078E+15
9 Morgens to Square Mils = 34875069750140600 Morgens to Square Mils = 2.3250046500093E+15
10 Morgens to Square Mils = 38750077500155800 Morgens to Square Mils = 3.1000062000124E+15
20 Morgens to Square Mils = 77500155000310900 Morgens to Square Mils = 3.487506975014E+15
30 Morgens to Square Mils = 1.1625023250046E+141,000 Morgens to Square Mils = 3.8750077500155E+15
40 Morgens to Square Mils = 1.5500031000062E+1410,000 Morgens to Square Mils = 3.8750077500155E+16
50 Morgens to Square Mils = 1.9375038750078E+14100,000 Morgens to Square Mils = 3.8750077500155E+17
60 Morgens to Square Mils = 2.3250046500093E+141,000,000 Morgens to Square Mils = 3.8750077500155E+18 | 763 | 2,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} | 2.84375 | 3 | CC-MAIN-2024-26 | latest | en | 0.696754 |
https://www.theanalysisfactor.com/circular-statistics/ | 1,713,687,831,000,000,000 | text/html | crawl-data/CC-MAIN-2024-18/segments/1712296817729.87/warc/CC-MAIN-20240421071342-20240421101342-00561.warc.gz | 938,008,466 | 17,530 | # Circular Statistics
Circular variables, which indicate direction or cyclical time, can be of great interest to biologists, geographers, and social scientists. The defining characteristic of circular variables is that the beginning and end of their scales meet. For example, compass direction is often defined with true North at 0 degrees, but it is also at 360 degrees, the other end of the scale. A direction of 5 degrees is much closer to 355 degrees than it is to 40 degrees. Likewise, times that represent cycles, such as times of day (best expressed on a 24 hour clock), day in a reproductive cycle, or month of a year are also circular. January, month 1 is closer to December, month 12, than it is to June, month 6.
Examples of circular variables are abundant in biology, geography, and the social sciences. One experiment I saw in consulting compared the distance and direction flown by male moths in comparison to unmated and mated female moths under different weather conditions.
Other examples include measures of wind and water flow direction to understand the movement of pollutants and the timing of events within a cycle, such as when the number of heart attacks peaks within a week or how body temperature fluctuates over a day. Note that time can be considered either circular or linear. Time is circular when it measures part of a cycle, such as the timing of a daily event. It is linear when it measures length of time, such as the number of days since an event.
Most familiar statistics do not work with circular variables because they assume that variables are linear–the lowest value is farthest from the highest value. For example, the average of 5 degrees, 60 degrees and 340 degrees (which are all northerly directions) is 135 degrees–a southerly direction. Changing 340 degrees to 20 degrees (an equivalent value) changes the mean to 15 degrees, which is more reasonable. But 5 degrees could also be changed to 365 degrees, giving a mean of 255 degrees, also reasonable. Which is right?
Because classical statistical analysis does not work for circular variables, an entire field of circular statistics has been developed. In circular statistics, each datum is defined by its length and its angle from a chosen point on the circle. In the case of the moths, each moth’s final location would be designated by the distance it traveled from the release point and the angle in degrees from true north. The mean location of all the moths can be found using the sine and cosine of the angle then adjusting for the length. Because the sine of 0 degrees and 360 degrees is the same, this solves the original problem of ends of the scale being near each other.
Circular statistics include tests of uniform direction around the circle, confidence intervals, tests for comparing two groups of directions, circular graphs, correlations, and regression, among others. Although the theory behind these statistics is not new, there have been no mainstream statistical packages that could implement them until recently. Now, both Stata and S-Plus have implemented comprehensive circular statistics modules within the last year.
References: | 640 | 3,158 | {"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.609375 | 4 | CC-MAIN-2024-18 | latest | en | 0.94897 |
http://en.flossmanuals.net/csound/b-panning-and-spatialization/ | 1,432,299,662,000,000,000 | text/html | crawl-data/CC-MAIN-2015-22/segments/1432207925201.39/warc/CC-MAIN-20150521113205-00070-ip-10-180-206-219.ec2.internal.warc.gz | 80,836,541 | 26,292 | Csound
# PANNING AND SPATIALIZATION
## Simple Stereo Panning
Csound provides a large number of opcodes designed to assist in the distribution of sound amongst two or more speakers. These range from opcodes that merely balance a sound between two channel to ones that include algorithms to simulate the doppler shift that occurs when sound moves, algorithms that simulate the filtering and inter-aural delay that occurs as sound reaches both our ears and algorithms that simulate distance in an acoustic space.
First we will look at some methods of panning a sound between two speakers based on first principles.
The simplest method that is typically encountered is to multiply one channel of audio (aSig) by a panning variable (kPan) and to multiply the other side by 1 minus the same variable like this:
```aSigL = aSig * kPan
aSigR = aSig * (1 – kPan)
outs aSigL, aSigR
```
kPan should be a value within the range zero and 1. If kPan is 1 all of the signal will be in the left channel, if it is zero, all of the signal will be in the right channel and if it is 0.5 there will be signal of equal amplitude in both the left and the right channels. This way the signal can be continuously panned between the left and right channels.
The problem with this method is that the overall power drops as the sound is panned to the middle.
One possible solution to this problem is to take the square root of the panning variable for each channel before multiplying it to the audio signal like this:
```aSigL = aSig * sqrt(kPan)
aSigR = aSig * sqrt((1 – kPan))
outs aSigL, aSigR
```
By doing this, the straight line function of the input panning variable becomes a convex curve so that less power is lost as the sound is panned centrally.
Using 90º sections of a sine wave for the mapping produces a more convex curve and a less immediate drop in power as the sound is panned away from the extremities. This can be implemented using the code shown below.
```aSigL = aSig * sin(kPan*\$M_PI_2)
aSigR = aSig * cos(kPan*\$M_PI_2)
outs aSigL, aSigR
```
(Note that '\$M_PI_2' is one of Csound's built in macros and is equivalent to pi/2.)
A fourth method, devised by Michael Gogins, places the point of maximum power for each channel slightly before the panning variable reaches its extremity. The result of this is that when the sound is panned dynamically it appears to move beyond the point of the speaker it is addressing. This method is an elaboration of the previous one and makes use of a different 90 degree section of a sine wave. It is implemented using the following code:
```aSigL = aSig * sin((kPan + 0.5) * \$M_PI_2)
aSigR = aSig * cos((kPan + 0.5) * \$M_PI_2)
outs aSigL, aSigR
```
The following example demonstrates all three methods one after the other for comparison. Panning movement is controlled by a slow moving LFO. The input sound is filtered pink noise.
EXAMPLE 05B01_Pan_stereo.csd
```<CsoundSynthesizer>
<CsOptions>
-odac ; activates real time sound output
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 10
nchnls = 2
0dbfs = 1
instr 1
imethod = p4 ; read panning method variable from score (p4)
;---------------- generate a source sound -------------------
a1 pinkish 0.3 ; pink noise
a1 reson a1, 500, 30, 1 ; bandpass filtered
aPan lfo 0.5, 1, 1 ; panning controlled by an lfo
aPan = aPan + 0.5 ; offset shifted +0.5
;------------------------------------------------------------
if imethod=1 then
;------------------------ method 1 --------------------------
aPanL = aPan
aPanR = 1 - aPan
;------------------------------------------------------------
endif
if imethod=2 then
;------------------------ method 2 --------------------------
aPanL = sqrt(aPan)
aPanR = sqrt(1 - aPan)
;------------------------------------------------------------
endif
if imethod=3 then
;------------------------ method 3 --------------------------
aPanL = sin(aPan*\$M_PI_2)
aPanR = cos(aPan*\$M_PI_2)
;------------------------------------------------------------
endif
if imethod=4 then
;------------------------ method 4 --------------------------
aPanL = sin((aPan + 0.5) * \$M_PI_2)
aPanR = cos((aPan + 0.5) * \$M_PI_2)
;------------------------------------------------------------
endif
outs a1*aPanL, a1*aPanR ; audio sent to outputs
endin
</CsInstruments>
<CsScore>
; 4 notes one after the other to demonstrate 4 different methods of panning
; p1 p2 p3 p4(method)
i 1 0 4.5 1
i 1 5 4.5 2
i 1 10 4.5 3
i 1 15 4.5 4
e
</CsScore>
</CsoundSynthesizer>```
An opcode called pan2 exists which makes it slightly easier for us to implement various methods of panning. The following example demonstrates the three methods that this opcode offers one after the other. The first is the 'equal power' method, the second 'square root' and the third is simple linear. The Csound Manual describes a fourth method but this one does not seem to function currently.
EXAMPLE 05B02_pan2.csd
```<CsoundSynthesizer>
<CsOptions>
-odac ; activates real time sound output
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 10
nchnls = 2
0dbfs = 1
instr 1
imethod = p4 ; read panning method variable from score (p4)
;----------------------- generate a source sound ------------------------
aSig pinkish 0.5 ; pink noise
aSig reson aSig, 500, 30, 1 ; bandpass filtered
;------------------------------------------------------------------------
;---------------------------- pan the signal ----------------------------
aPan lfo 0.5, 1, 1 ; panning controlled by an lfo
aPan = aPan + 0.5 ; DC shifted + 0.5
aSigL, aSigR pan2 aSig, aPan, imethod; create stereo panned output
;------------------------------------------------------------------------
outs aSigL, aSigR ; audio sent to outputs
endin
</CsInstruments>
<CsScore>
; 3 notes one after the other to demonstrate 3 methods used by pan2
;p1 p2 p3 p4
i 1 0 4.5 0 ; equal power (harmonic)
i 1 5 4.5 1 ; square root method
i 1 10 4.5 2 ; linear
e
</CsScore>
</CsoundSynthesizer> ```
In the next example we will generate some sounds as the primary signal. We apply some delay and reverb to this signal to produce a secondary signal. A random function will pan the primary signal between the channels, but the secondary signal remains panned in the middle all the time.
EXAMPLE 05B03_Different_pan_layers.csd
```<CsoundSynthesizer>
<CsOptions>
-o dac -d
</CsOptions>
<CsInstruments>
; Example by Bjorn Houdorf, March 2013
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
seed 0
instr 1
ktrig metro 0.8; Trigger frequency, instr. 2
scoreline "i 2 0 4", ktrig
endin
instr 2
ital random 60, 72; random notes
ifrq = cpsmidinn(ital)
knumpart1 oscili 4, 0.1, 1
knumpart2 oscili 5, 0.11, 1
; Generate primary signal.....
asig buzz 0.1, ifrq, knumpart1*knumpart2+1, 1
ipan random 0, 1; ....make random function...
asigL, asigR pan2 asig, ipan, 1; ...pan it...
outs asigL, asigR ;.... and output it..
kran1 randomi 0,4,3
kran2 randomi 0,4,3
asigdel1 delay asig, 0.1+i(kran1)
asigdel2 delay asig, 0.1+i(kran2)
; Make secondary signal...
aL, aR reverbsc asig+asigdel1, asig+asigdel2, 0.9, 15000
outs aL, aR; ...and output it
endin
</CsInstruments>
<CsScore>
f1 0 8192 10 1
i1 0 60
</CsScore>
</CsoundSynthesizer>
```
## 3-d Binaural Encoding
3-D binaural simulation is available through a number of opcodes that make use of spectral data files that provide information about the filtering and inter-aural delay effects of the human head. The oldest one of these is hrtfer. Newer ones are hrtfmove, hrtfmove2 and hrftstat. The main parameters for control of the opcodes are azimuth (the horizontal direction of the source expressed as an angle formed from the direction in which we are facing) and elevation (the angle by which the sound deviates from this horizontal plane, either above or below). Both these parameters are defined in degrees. 'Binaural' infers that the stereo output of this opcode should be listened to using headphones so that no mixing in the air of the two channels occurs before they reach our ears (although a degree of effect is still audible through speakers).
The following example take a monophonic source sound of noise impulses and processes it using the hrtfmove2 opcode. First of all the sound is rotated around us in the horizontal plane then it is raised above our head then dropped below us and finally returned to be level and directly in front of us. For this example to work you will need to download the files hrtf-44100-left.dat and hrtf-44100-right.dat and place them in your SADIR (see setting environment variables) or in the same directory as the .csd.
EXAMPLE 05B04_hrtfmove.csd
```<CsoundSynthesizer>
<CsOptions>
-odac ; activates real time sound output
</CsOptions>
<CsInstruments>
; Example by Iain McCurdy
sr = 44100
ksmps = 10
nchnls = 2
0dbfs = 1
giSine ftgen 0, 0, 2^12, 10, 1 ; sine wave
giLFOShape ftgen 0, 0, 131072, 19, 0.5,1,180,1 ; U-shape parabola
instr 1
; create an audio signal (noise impulses)
krate oscil 30,0.2,giLFOShape ; rate of impulses
; amplitude envelope: a repeating pulse
kEnv loopseg krate+3,0, 0,1, 0.05,0, 0.95,0,0
aSig pinkish kEnv ; noise pulses
; -- apply binaural 3d processing --
; azimuth (direction in the horizontal plane)
kAz linseg 0, 8, 360
; elevation (held horizontal for 8 seconds then up, then down, then horizontal
kElev linseg 0, 8, 0, 4, 90, 8, -40, 4, 0
; apply hrtfmove2 opcode to audio source - create stereo ouput
aLeft, aRight hrtfmove2 aSig, kAz, kElev, \
"hrtf-44100-left.dat","hrtf-44100-right.dat"
outs aLeft, aRight ; audio to outputs
endin
</CsInstruments>
<CsScore>
i 1 0 24 ; instr 1 plays a note for 24 seconds
e
</CsScore>
</CsoundSynthesizer>
```
## Going Multichannel
So far we have only considered working in 2-channels/stereo but Csound is extremely flexible at working in more that 2 channels. By changing nchnls in the orchestra header we can specify any number of channels but we also need to ensure that we choose an audio hardware device using -odac that can handle multichannel audio. Audio channels sent from Csound that do not address hardware channels will simply not be reproduced. There may be some need to make adjustments to the software settings of your soundcard using its own software or the operating system's software but due to the variety of sound hardware options available it would be impossible to offer further specific advice here.
## Sending Multichannel Sound to the Loudspeakers
In order to send multichannel audio we must use opcodes designed for that task. So far we have used outs to send stereo sound to a pair of loudspeakers. (The 's' actually stands for 'stereo'.) Correspondingly there exist opcodes for quadophonic (outq), hexaphonic (outh), octophonic (outo), 16-channel sound (outx) and 32-channel sound (out32).
For example:
``` outq a1, a2, a3, a4
```
sends four independent audio streams to four hardware channels. Any unrequired channels still have to be given an audio signal. A typical workaround would be to give them 'silence'. For example if only 5 channels were required:
```nchnls = 6
; --snip--
aSilence = 0
outh a1, a2, a3, a4, a5, aSilence
```
These opcodes only address very specific loudspeaker arrangements (although workarounds are possible) and have been superseded, to a large extent, by newer opcodes that allow greater flexibility in the number and routing of audio to a multichannel output.
outc allows us to address any number of output audio channels, but they still need to be addressed sequentially. For example our 5-channel audio could be design as follows:
```nchnls = 5
; --snip--
outc a1, a2, a3, a4, a5```
outch allows us to direct audio to a specific channel or list of channels and takes the form:
```outch kchan1, asig1 [, kchan2] [, asig2] [...]
```
For example, our 5-channel audio system could be designed using outch as follows:
```nchnls = 5
; --snip--
outch 1,a1, 2,a2, 3,a3, 4,a4, 5,a5```
Note that channel numbers can be changed at k-rate thereby opening the possibility of changing the speaker configuration dynamically during performance. Channel numbers do not need to be sequential and unrequired channels can be left out completely. This can make life much easier when working with complex systems employing many channels.
## Flexibly Moving Between Stereo and Multichannel
It may be useful to be able to move between working in multichannel (beyond stereo) and then moving back to stereo (when, for example, a multichannel setup is not available). It won't be sufficient to simple change nchnls = 2. It will also be necessary to change all outq, outo, outch etc to outs. In complex orchestras this could laboursome and particularly so if it is required to go back to a multichannel configuration later on. In this situation conditional outputs based on the nchnls value are useful. For example:
``` if nchnls==4 then
outq a1,a2,a3,a4
elseif nchnls==2 then
outs a1+a3, a2+a4
endif
```
Using this method it will only be required to change nchnls = ... in the orchestra header. In stereo mode, if nchnls = 2, at least all audio streams will be monitored, even if the results do not reflect the four channel spatial arrangement.
## Rendering Multichannel Audio Streams as Sound Files
So far we have referred to outs, outo etc. as a means to send audio to the speakers but strictly speaking they are only sending audio to Csound's output (as specified by nchnls) and the final destination will be defined using a command line flag in <CsOptions></CsOptions>. -odac will indeed instruct Csound to send audio to the audio hardware and then onto the speakers but we can alternatively send audio to a sound file using -oSoundFile.wav. Provided a file type that supports multichannel interleaved data is chosen (wav will work), a multichannel file will be created that can be used in some other audio applications or can be re-read by Csound later on by using, for example, diskin2. This method is useful for rendering audio that is too complex to be monitored in real-time. Only single interleaved sound files can be created, separate mono files cannot be created using this method. Simultaneously monitoring the audio generated by Csound whilst rendering will not be possible when using this method; we must choose one or the other.
An alternative method of rendering audio in Csound, and one that will allow simulatenous monitoring in real-time, is to use the fout opcode. For example:
```fout "FileName.wav", 8, a1, a2, a3, a4
outq a1, a2, a3, a4
```
will render an interleaved, 24-bit, 4-channel sound file whilst simultaneously sending the quadrophonic audio to the loudspeakers.
If we wanted to de-interleave an interleaved sound file into multiple mono sound files we could use the code:
```a1, a2, a3, a4 soundin "4ChannelSoundFile.wav"
fout "Channel1.wav", 8, a1
fout "Channel2.wav", 8, a2
fout "Channel3.wav", 8, a3
fout "Channel4.wav", 8, a4
```
## VBAP
Vector Base Amplitude Panning1 can be described as a method which extends stereo panning to more than two speakers. The number of speakers is, in general, arbitrary. You can configure for standard layouts such as quadrophonic, octophonic or 5.1 configuration, but in fact any number of speakers can be positioned even in irregular distances from each other. If you are fortunate enough to have speakers arranged at different heights, you can even configure VBAP for three dimensions.
### Basic Steps
First you must tell VBAP where your loudspeakers are positioned. Let us assume you have seven speakers in the positions and numberings outlined below (M = middle/centre):
The opcode vbaplsinit, which is usually placed in the header of a Csound orchestra, defines these positions as follows:
`vbaplsinit 2, 7, -40, 40, 70, 140, 180, -110, -70`
The first number determines the number of dimensions (here 2). The second number states the overall number of speakers, then followed by the positions in degrees (clockwise).
All that is required now is to provide vbap with a monophonic sound source to be distributed amongst the speakers according to information given about the position. Horizontal position (azimuth) is expressed in degrees clockwise just as the initial locations of the speakers were. The following would be the Csound code to play the sound file "ClassGuit.wav" once while moving it counterclockwise:
EXAMPLE 05B05_VBAP_circle.csd
```<CsoundSynthesizer>
<CsOptions>
-odac -d ;for the next line, change to your folder
--env:SSDIR+=/home/jh/Joachim/Csound/FLOSS/audio
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 7
vbaplsinit 2, 7, -40, 40, 70, 140, 180, -110, -70
instr 1
Sfile = "ClassGuit.wav"
iFilLen filelen Sfile
p3 = iFilLen
aSnd, a0 soundin Sfile
kAzim line 0, p3, -360 ;counterclockwise
a1, a2, a3, a4, a5, a6, a7, a8 vbap8 aSnd, kAzim
outch 1, a1, 2, a2, 3, a3, 4, a4, 5, a5, 6, a6, 7, a7
endin
</CsInstruments>
<CsScore>
i 1 0 1
</CsScore>
</CsoundSynthesizer>
;example by joachim heintz
```
In the CsOptions tag, you see the option --env:SSDIR+= ... as a possibility to add a folder to the path in which Csound usually looks for your samples (SSDIR = Sound Sample Directory) if you call them only by name, without the full path. To play the full length of the sound file (without prior knowledge of its duration) the filelen opcode is used to derive this duration, and then the duration of this instrument (p3) is set to this value. The p3 given in the score section (here 1) is overwritten by this value.
The circular movement is a simple k-rate line signal, from 0 to -360 across the duration of the sound file (in this case the same as p3). Note that we have to use the opcode vbap8 here, as there is no vbap7. Just give the eighth channel a variable name (a8) and thereafter ignore it.
As VBAP derives from a panning paradigm, it has one problem which becomes more serious as the number of speakers increases. Panning between two speakers in a stereo configuration means that all speakers are active. Panning between two speakers in a quadro configuration means that half of the speakers are active. Panning between two speakers in an octo configuration means that only a quarter of the speakers are active and so on; so that the actual perceived extent of the sound source becomes unintentionally smaller and smaller.
To alleviate this tendency, Ville Pulkki has introduced an additional parameter, called 'spread', which has a range of zero to hundred percent.2 The 'ascetic' form of VBAP we have seen in the previous example, means: no spread (0%). A spread of 100% means that all speakers are active, and the information about where the sound comes from is nearly lost.
As the kspread input to the vbap8 opcode is the second of two optional parameters, we first have to provide the first one. kelev defines the elevation of the sound - it is always zero for two dimensions, as in the speaker configuration in our example. The next example adds a spread movement to the previous one. The spread starts at zero percent, then increases to hundred percent, and then decreases back down to zero.
```<CsoundSynthesizer>
<CsOptions>
-odac -d ;for the next line, change to your folder
--env:SSDIR+=/home/jh/Joachim/Csound/FLOSS/audio
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 7
vbaplsinit 2, 7, -40, 40, 70, 140, 180, -110, -70
instr 1
Sfile = "ClassGuit.wav"
iFilLen filelen Sfile
p3 = iFilLen
aSnd, a0 soundin Sfile
kAzim line 0, p3, -360
kSpread linseg 0, p3/2, 100, p3/2, 0
a1, a2, a3, a4, a5, a6, a7, a8 vbap8 aSnd, kAzim, 0, kSpread
outch 1, a1, 2, a2, 3, a3, 4, a4, 5, a5, 6, a6, 7, a7
endin
</CsInstruments>
<CsScore>
i 1 0 1
</CsScore>
</CsoundSynthesizer>
;example by joachim heintz
```
### New VBAP Opcodes
As a response to a number of requests, John fFitch has written new VBAP opcodes in 2012 whose main goal is to allow more than one loudspeaker configuration within a single orchestra (so that you can switch between them during performance) and to provide more flexibility in the number of output channels used. Here is an example for three different configurations which are called in three different instruments:
EXAMPLE 05B07_VBAP_new.csd
```<CsoundSynthesizer>
<CsOptions>
-odac -d ;for the next line, change to your folder
--env:SSDIR+=/home/jh/Joachim/Csound/FLOSS/audio
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 7
vbaplsinit 2.01, 7, -40, 40, 70, 140, 180, -110, -70
vbaplsinit 2.02, 2, -40, 40
vbaplsinit 2.03, 3, -70, 180, 70
instr 1
aSnd, a0 soundin "ClassGuit.wav"
kAzim line 0, p3, -360
a1, a2, a3, a4, a5, a6, a7 vbap aSnd, kAzim, 0, 0, 1
outch 1, a1, 2, a2, 3, a3, 4, a4, 5, a5, 6, a6, 7, a7
endin
instr 2
aSnd, a0 soundin "ClassGuit.wav"
kAzim line 0, p3, -360
a1, a2 vbap aSnd, kAzim, 0, 0, 2
outch 1, a1, 2, a2
endin
instr 3
aSnd, a0 soundin "ClassGuit.wav"
kAzim line 0, p3, -360
a1, a2, a3 vbap aSnd, kAzim, 0, 0, 3
outch 7, a1, 3, a2, 5, a3
endin
</CsInstruments>
<CsScore>
i 1 0 6
i 2 6 6
i 3 12 6
</CsScore>
</CsoundSynthesizer>
;example by joachim heintz
```
Instead of just one loudspeaker configuration, as in the previous examples, there are now three configurations:
```vbaplsinit 2.01, 7, -40, 40, 70, 140, 180, -110, -70
vbaplsinit 2.02, 2, -40, 40
vbaplsinit 2.03, 3, -70, 180, 70
```
The first parameter (the number of dimensions) now has an additional fractional part, with a range from .01 to .99, specifying the number of the speaker layout. So 2.01 means: two dimensions, layout number one, 2.02 is layout number two, and 2.03 is layout number three. The new vbap opcode has now these parameters:
``` ar1[, ar2...] vbap asig, kazim [, kelev] [, kspread] [, ilayout]
```
The last parameter ilayout refers to the speaker layout number. In the example above, instrument 1 uses layout 1, instrument 2 uses layout 2, and instrument 3 uses layout 3. Even if you do not have more than two speakers you should see in Csound's output that instrument 1 goes to all seven speakers, instrument 2 only to the first two, and instrument 3 goes to speaker 3, 5, and 7.
In addition to the new vbap opcode, vbapg has been written. The idea is to have an opcode which returns the gains (amplitudes) of the speakers instead of the audio signal:
```k1[, k2...] vbapg kazim [,kelev] [, kspread] [, ilayout]
```
## Ambisonics
Ambisonics is another technique to distribute a virtual sound source in space.
There are excellent sources for the discussion of Ambisonics online3 and the following chapter will give a step by step introduction. We will focus just on the basic practicalities of using the Ambisonics opcodes of Csound, without going into too much detail of the concepts behind them.
Ambisonics works using two basic steps. In the first step you encode the sound and the spatial information (its localisation) of a virtual sound source in a so-called B-format. In the second step you decode the B-format to match your loudspeaker setup.
It is possible to save the B-format as its own audio file, to preserve the spatial information or you can immediately do the decoding after the encoding thereby dealing directly only with audio signals instead of Ambisonic files. The next example takes the latter approach by implementing a transformation of the VBAP circle example to Ambisonics.
EXAMPLE 05B08_Ambi_circle.csd
```<CsoundSynthesizer>
<CsOptions>
-odac -d ;for the next line, change to your folder
--env:SSDIR+=/home/jh/Joachim/Csound/FLOSS/Release01/Csound_Floss_Release01/audio
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 8
instr 1
Sfile = "ClassGuit.wav"
iFilLen filelen Sfile
p3 = iFilLen
aSnd, a0 soundin Sfile
kAzim line 0, p3, 360 ;counterclockwise (!)
iSetup = 4 ;octogon
aw, ax, ay, az bformenc1 aSnd, kAzim, 0
a1, a2, a3, a4, a5, a6, a7, a8 bformdec1 iSetup, aw, ax, ay, az
outch 1, a1, 2, a2, 3, a3, 4, a4, 5, a5, 6, a6, 7, a7, 8, a8
endin
</CsInstruments>
<CsScore>
i 1 0 1
</CsScore>
</CsoundSynthesizer>
;example by joachim heintz
```
The first thing to note is that for a counterclockwise circle, the azimuth now has the line 0 -> 360, instead of 0 -> -360 as was used in the VBAP example. This is because Ambisonics usually reads the angle in a mathematical way: a positive angle is counterclockwise. Next, the encoding process is carried out in the line:
`aw, ax, ay, az bformenc1 aSnd, kAzim, 0`
Input arguments are the monophonic sound source aSnd, the xy-angle kAzim, and the elevation angle which is set to zero. Output signals are the spatial information in x-, y- and z- direction (ax, ay, az), and also an omnidirectional signal called aw
Decoding is performed by the line:
`a1, a2, a3, a4, a5, a6, a7, a8 bformdec1 iSetup, aw, ax, ay, az`
The inputs for the decoder are the same aw, ax, ay, az, which were the results of the encoding process, and an additional iSetup parameter. Currently the Csound decoder only works with some standard setups for the speaker: iSetup = 4 refers to an octogon.4 So the final eight audio signals a1, ..., a8 are being produced using this decoder, and are then sent to the speakers in the same way using the outch opcode.
### Different Orders
What we have seen in this example is called 'first order' ambisonics. This means that the encoding process leads to the four basic dimensions w, x, y, z as described above.5 In "second order" ambisonics, there are additional "directions" called r, s, t, u, v. And in "third order" ambisonics again the additional k, l, m, n, o, p, q. The final example in this section shows the three orders, each of them in one instrument. If you have eight speakers in octophonic setup, you can compare the results.
EXAMPLE 05B09_Ambi_orders.csd
```<CsoundSynthesizer>
<CsOptions>
-odac -d ;for the next line, change to your folder
--env:SSDIR+=/home/jh/Joachim/Csound/FLOSS/Release01/Csound_Floss_Release01/audio
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
0dbfs = 1
nchnls = 8
instr 1 ;first order
aSnd, a0 soundin "ClassGuit.wav"
kAzim line 0, p3, 360
iSetup = 4 ;octogon
aw, ax, ay, az bformenc1 aSnd, kAzim, 0
a1, a2, a3, a4, a5, a6, a7, a8 bformdec1 iSetup, aw, ax, ay, az
outch 1, a1, 2, a2, 3, a3, 4, a4, 5, a5, 6, a6, 7, a7, 8, a8
endin
instr 2 ;second order
aSnd, a0 soundin "ClassGuit.wav"
kAzim line 0, p3, 360
iSetup = 4 ;octogon
aw, ax, ay, az, ar, as, at, au, av bformenc1 aSnd, kAzim, 0
a1, a2, a3, a4, a5, a6, a7, a8 bformdec1 iSetup, aw, ax, ay, az, ar, as, at, au, av
outch 1, a1, 2, a2, 3, a3, 4, a4, 5, a5, 6, a6, 7, a7, 8, a8
endin
instr 3 ;third order
aSnd, a0 soundin "ClassGuit.wav"
kAzim line 0, p3, 360
iSetup = 4 ;octogon
aw, ax, ay, az, ar, as, at, au, av, ak, al, am, an, ao, ap, aq bformenc1 aSnd, kAzim, 0
a1, a2, a3, a4, a5, a6, a7, a8 bformdec1 iSetup, aw, ax, ay, az, ar, as, at, au, av, ak, al, am, an, ao, ap, aq
outch 1, a1, 2, a2, 3, a3, 4, a4, 5, a5, 6, a6, 7, a7, 8, a8
endin
</CsInstruments>
<CsScore>
i 1 0 6
i 2 6 6
i 3 12 6
</CsScore>
</CsoundSynthesizer>
;example by joachim heintz```
In theory, first-order ambisonics need at least 4 speakers to be projected correctly. Second-order ambisonics needs at least 6 speakers (9, if 3 dimensions are employed). Third-order ambisonics need at least 8 speakers (or 16 for 3d). So, although higher order should in general lead to a better result in space, you cannot expect it to work unless you have a sufficient number of speakers. Of course practice over theory may prove to be a better judge in many cases.
## Ambisonics UDOs
### Usage of the ambisonics UDOs
This chapter gives an overview of the UDOs explained below.
The channels of the B-format are stored in a zak space. Call zakinit only once and put it outside of any instrument definition in the orchestra file after the header. zacl clears the za space and is called after decoding. The B format of order n can be decoded in any order <= n.
The text files "ambisonics_udos.txt", "ambisonics2D_udos.txt", "AEP_udos.txt" and "utilities.txt" must be located in the same folder as the csd files or included with full path.
```zakinit isizea, isizek (isizea = (order + 1)^2 in ambisonics (3D); isizea = 2·order + 1 in ambi2D; isizek = 1)
;#include "ambisonics_udos.txt" (order <= 8)
k0 ambi_encode asnd, iorder, kazimuth, kelevation (azimuth, elevation in degrees)
k0 ambi_enc_dist asnd, iorder, kazimuth, kelevation, kdistance
a1 [, a2] ... [, a8] ambi_decode iorder, ifn
a1 [, a2] ... [, a8] ambi_dec_inph iorder, ifn
f ifn 0 n -2 p1 az1 el1 az2 el2 ... (n is a power of 2 greater than 3·number_of_spekers + 1) (p1 is not used)
k0 ambi_write_B "name", iorder, ifile_format (ifile_format see fout in the csound help)
k0 ambi_read_B "name", iorder (only <= 5)
kaz, kel, kdist xyz_to_aed kx, ky, kz
;#include "ambisonics2D_udos.txt"
k0 ambi2D_encode asnd, iorder, kazimuth (any order) (azimuth in degrees)
k0 ambi2D_enc_dist asnd, iorder, kazimuth, kdistance
a1 [, a2] ... [, a8] ambi2D_decode iorder, iaz1 [, iaz2] ... [, iaz8]
a1 [, a2] ... [, a8] ambi2D_dec_inph iorder, iaz1 [, iaz2] ... [, iaz8] (order <= 12)
k0 ambi2D_write_B "name", iorder, ifile_format
k0 ambi2D_read_B "name", iorder (order <= 19)
#include "AEP_udos.txt" (any order integer or fractional)
a1 [, a2] ... [, a16] AEP_xyz asnd, korder, ifn, kx, ky, kz, kdistance
f ifn 0 64 -2 max_speaker_distance x1 y1 z1 x2 y2 z2 ...
a1 [, a2] ... [, a8] AEP asnd, korder, ifn, kazimuth, kelevation, kdistance (azimuth, elevation in degrees)
f ifn 0 64 -2 max_speaker_distance az1 el1 dist1 az2 el2 dist2 ... (azimuth, elevation in degrees)
;#include "ambi_utilities.txt"
kdist dist kx, ky
kdist dist kx, ky, kz
ares Doppler asnd, kdistance
ares absorb asnd, kdistance
kx, ky, kz aed_to_xyz kazimuth, kelevation, kdistance
ix, iy, iz aed_to_xyz iazimuth, ielevation, idistance
a1 [, a2] ... [, a16] dist_corr a1 [, a2] ... [, a16], ifn
f ifn 0 32 -2 max_speaker_distance dist1, dist2, ... (distances in m)
```
### Introduction
In the following introduction we will explain the principles of ambisonics step by step and write an opcode for every step. The opcodes above combine all of the functionality described. Since the two-dimensional analogy to Ambisonics is easier to understand and to implement with a simple equipment, we shall fully explain it first.
Ambisonics is a technique of three-dimensional sound projection. The information about the recorded or synthesized sound field is encoded and stored in several channels, taking no account of the arrangement of the loudspeakers for reproduction. The encoding of a signal's spatial information can be more or less precise, depending on the so-called order of the algorithm used. Order zero corresponds to the monophonic signal and requires only one channel for storage and reproduction. In first-order Ambisonics, three further channels are used to encode the portions of the sound field in the three orthogonal directions x, y and z. These four channels constitute the so-called first-order B-format. When Ambisonics is used for artificial spatialisation of recorded or synthesized sound, the encoding can be of an arbitrarily high order. The higher orders cannot be interpreted as easily as orders zero and one.
In a two-dimensional analogy to Ambisonics (called Ambisonics2D in what follows), only sound waves in the horizontal plane are encoded.
The loudspeaker feeds are obtained by decoding the B-format signal. The resulting panning is amplitude panning, and only the direction to the sound source is taken into account.
The illustration below shows the principle of Ambisonics. First a sound is generated and its position determined. The amplitude and spectrum are adjusted to simulate distance, the latter using a low-pass filter. Then the Ambisonic encoding is computed using the sound's coordinates. Encoding mth order B-format requires n = (m+1)^2 channels (n = 2m + 1 channels in Ambisonics2D). By decoding the B-format, one can obtain the signals for any number (>= n) of loudspeakers in any arrangement. Best results are achieved with symmetrical speaker arrangements.
If the B-format does not need to be recorded the speaker signals can be calculated at low cost and arbitrary order using so-called ambisonics equivalent panning (AEP).
Ambisonics2D
Introduction We will first explain the encoding process in Ambisonics2D. The position of a sound source in the horizontal plane is given by two coordinates. In Cartesian coordinates (x, y) the listener is at the origin of the coordinate system (0, 0), and the x-coordinate points to the front, the y-coordinate to the left. The position of the sound source can also be given in polar coordinates by the angle ψ between the line of vision of the listener (front) and the direction to the sound source, and by their distance r. Cartesian coordinates can be converted to polar coordinates by the formulae:
r = and ψ = arctan(x, y),
polar to Cartesian coordinates by
x = r·cos(ψ) and y = r·sin(ψ).
The 0th order B-Format of a signal S of a sound source on the unit circle is just the mono signal: W0 = W = S. The first order B-Format contains two additional channels: W1,1 = X = S·cos(ψ) = S·x and W1,2 = Y = S·sin(ψ) = S·y, i.e. the product of the Signal S with the sine and the cosine of the direction ψ of the sound source. The B-Format higher order contains two additional channels per order m: Wm, 1 = S·cos(mψ) and Wm, 2 = S·sin(mψ).
W0 = S
W1,1 = X = S·cos(ψ) = S·x W1,2 = Y = S·sin(ψ) = S·y
W2,1 = S·cos(2ψ) W2,2 = S·sin(2ψ)
...
Wm,1 = S·cos(mψ) Wm,2 = S·sin(mψ)
From the n = 2m + 1 B-Format channels the loudspeaker signals pi of n loudspeakers which are set up symmetrically on a circle (with angle ϕi) are:
pi = 1/n(W0 + 2W1,1cos(ϕi) + 2W1,2sin(ϕi) + 2W2,1cos(2ϕi) + 2W2,2sin(2ϕi) + ...)
= 2/n(1/2 W0 + W1,1cos(ϕi) + W1,2sin(ϕi) + W2,1cos(2ϕi) + W2,2sin(2ϕi) + ...)
(If more than n speakers are used, we can use the same formula)
In the Csound example udo_ambisonics2D_1.csd the opcode ambi2D_encode_1a produces the 3 channels W, X and Y (a0, a11, a12) from an input sound and the angle ψ (azmuth kaz), the opcode ambi2D_decode_1_8 decodes them to 8 speaker signals a1, a2, ..., a8. The inputs of the decoder are the 3 channels a0, a11, a12 and the 8 angles of the speakers.
EXAMPLE 05B10_udo_ambisonics2D_1.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 8
0dbfs = 1
; ambisonics2D first order without distance encoding
; decoding for 8 speakers symmetrically positioned on a circle
; produces the 3 channels 1st order; input: asound, kazimuth
opcode ambi2D_encode_1a, aaa, ak
asnd,kaz xin
kaz = \$M_PI*kaz/180
a0 = asnd
a11 = cos(kaz)*asnd
a12 = sin(kaz)*asnd
xout a0,a11,a12
endop
; decodes 1st order to a setup of 8 speakers at angles i1, i2, ...
opcode ambi2D_decode_1_8, aaaaaaaa, aaaiiiiiiii
a0,a11,a12,i1,i2,i3,i4,i5,i6,i7,i8 xin
i1 = \$M_PI*i1/180
i2 = \$M_PI*i2/180
i3 = \$M_PI*i3/180
i4 = \$M_PI*i4/180
i5 = \$M_PI*i5/180
i6 = \$M_PI*i6/180
i7 = \$M_PI*i7/180
i8 = \$M_PI*i8/180
a1 = (.5*a0 + cos(i1)*a11 + sin(i1)*a12)*2/3
a2 = (.5*a0 + cos(i2)*a11 + sin(i2)*a12)*2/3
a3 = (.5*a0 + cos(i3)*a11 + sin(i3)*a12)*2/3
a4 = (.5*a0 + cos(i4)*a11 + sin(i4)*a12)*2/3
a5 = (.5*a0 + cos(i5)*a11 + sin(i5)*a12)*2/3
a6 = (.5*a0 + cos(i6)*a11 + sin(i6)*a12)*2/3
a7 = (.5*a0 + cos(i7)*a11 + sin(i7)*a12)*2/3
a8 = (.5*a0 + cos(i8)*a11 + sin(i8)*a12)*2/3
xout a1,a2,a3,a4,a5,a6,a7,a8
endop
instr 1
asnd rand .05
kaz line 0,p3,3*360 ;turns around 3 times in p3 seconds
a0,a11,a12 ambi2D_encode_1a asnd,kaz
a1,a2,a3,a4,a5,a6,a7,a8 \
ambi2D_decode_1_8 a0,a11,a12,
0,45,90,135,180,225,270,315
outc a1,a2,a3,a4,a5,a6,a7,a8
endin
</CsInstruments>
<CsScore>
i1 0 40
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
The B-format of all events of all instruments can be summed before decoding. Thus in the example udo_ambisonics2D_2.csd we create a zak space with 21 channels (zakinit 21, 1) for the 2D B-format up to 10th order where the encoded signals are accumulated. The opcode ambi2D_encode_3 shows how to produce the 7 B-format channels a0, a11, a12, ..., a32 for third order. The opcode ambi2D_encode_n produces the 2(n+1) channels a0, a11, a12, ..., a32 for any order n (needs zakinit 2(n+1), 1). The opcode ambi2D_decode_basic is an overloaded function i.e. it decodes to n speaker signals depending on the number of in- and outputs given (in this example only for 1 or 2 speakers). Any number of instruments can play arbitrary often. Instrument 10 decodes for the first 4 speakers of an 18 speaker setup.
EXAMPLE 05B11_udo_ambisonics2D_2.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 4
0dbfs = 1
; ambisonics2D encoding fifth order
; decoding for 8 speakers symmetrically positioned on a circle
; all instruments write the B-format into a buffer (zak space)
; instr 10 decodes
; zak space with the 21 channels of the B-format up to 10th order
zakinit 21, 1
;explicit encoding third order
opcode ambi2D_encode_3, k, ak
asnd,kaz xin
kaz = \$M_PI*kaz/180
zawm asnd,0
zawm cos(kaz)*asnd,1 ;a11
zawm sin(kaz)*asnd,2 ;a12
zawm cos(2*kaz)*asnd,3 ;a21
zawm sin(2*kaz)*asnd,4 ;a22
zawm cos(3*kaz)*asnd,5 ;a31
zawm sin(3*kaz)*asnd,6 ;a32
xout 0
endop
; encoding arbitrary order n(zakinit 2*n+1, 1)
opcode ambi2D_encode_n, k, aik
asnd,iorder,kaz xin
kaz = \$M_PI*kaz/180
kk = iorder
c1:
zawm cos(kk*kaz)*asnd,2*kk-1
zawm sin(kk*kaz)*asnd,2*kk
kk = kk-1
if kk > 0 goto c1
zawm asnd,0
xout 0
endop
; basic decoding for arbitrary order n for 1 speaker
opcode ambi2D_decode_basic, a, ii
iorder,iaz xin
iaz = \$M_PI*iaz/180
igain = 2/(2*iorder+1)
kk = iorder
a1 = .5*zar(0)
c1:
a1 += cos(kk*iaz)*zar(2*kk-1)
a1 += sin(kk*iaz)*zar(2*kk)
kk = kk-1
if kk > 0 goto c1
xout igain*a1
endop
; decoding for 2 speakers
opcode ambi2D_decode_basic, aa, iii
iorder,iaz1,iaz2 xin
iaz1 = \$M_PI*iaz1/180
iaz2 = \$M_PI*iaz2/180
igain = 2/(2*iorder+1)
kk = iorder
a1 = .5*zar(0)
c1:
a1 += cos(kk*iaz1)*zar(2*kk-1)
a1 += sin(kk*iaz1)*zar(2*kk)
kk = kk-1
if kk > 0 goto c1
kk = iorder
a2 = .5*zar(0)
c2:
a2 += cos(kk*iaz2)*zar(2*kk-1)
a2 += sin(kk*iaz2)*zar(2*kk)
kk = kk-1
if kk > 0 goto c2
xout igain*a1,igain*a2
endop
instr 1
asnd rand p4
ares reson asnd,p5,p6,1
kaz line 0,p3,p7*360 ;turns around p7 times in p3 seconds
k0 ambi2D_encode_n asnd,10,kaz
endin
instr 2
asnd oscil p4,p5,1
kaz line 0,p3,p7*360 ;turns around p7 times in p3 seconds
k0 ambi2D_encode_n asnd,10,kaz
endin
instr 10 ;decode all insruments (the first 4 speakers of a 18 speaker setup)
a1,a2 ambi2D_decode_basic 10,0,20
a3,a4 ambi2D_decode_basic 10,40,60
outc a1,a2,a3,a4
zacl 0,20 ; clear the za variables
endin
</CsInstruments>
<CsScore>
f1 0 32768 10 1
; amp cf bw turns
i1 0 3 .7 1500 12 1
i1 2 18 .1 2234 34 -8
; amp fr 0 turns
i2 0 3 .1 440 0 2
i10 0 3
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
### In-phase Decoding
The left figure below shows a symmetrical arrangement of 7 loudspeakers. If the virtual sound source is precisely in the direction of a loudspeaker, only this loudspeaker gets a signal (center figure). If the virtual sound source is between two loudspeakers, these loudspeakers receive the strongest signals; all other loudspeakers have weaker signals, some with negative amplitude, that is, reversed phase (right figure).
To avoid having loudspeaker sounds that are far away from the virtual sound source and to ensure that negative amplitudes (inverted phase) do not arise, the B-format channels can be weighted before being decoded. The weighting factors depend on the highest order used (M) and the order of the particular channel being decoded (m).
gm = (M!)^2/((M + m)!·(M - m)!)
The decoded signal can be normalised with the factor gnorm(M) = (2M + 1) !/(4^M (M!)^2)
The illustration below shows a third-order B-format signal decoded to 13 loudspeakers first uncorrected (so-called basic decoding, left), then corrected by weighting (so-called in-phase decoding, right).
Example udo_ambisonics2D_3.csd shows in-phase decoding. The weights and norms up to 12th order are saved in the arrays iWeight2D[][] and iNorm2D[] respectively. Instrument 11 decodes third order for 4 speakers in a square.
EXAMPLE 05B12_udo_ambisonics2D_3.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 4
0dbfs = 1
opcode ambi2D_encode_n, k, aik
asnd,iorder,kaz xin
kaz = \$M_PI*kaz/180
kk = iorder
c1:
zawm cos(kk*kaz)*asnd,2*kk-1
zawm sin(kk*kaz)*asnd,2*kk
kk = kk-1
if kk > 0 goto c1
zawm asnd,0
xout 0
endop
;in-phase-decoding
opcode ambi2D_dec_inph, a, ii
; weights and norms up to 12th order
iNorm2D[] array 1,0.75,0.625,0.546875,0.492188,0.451172,0.418945,
0.392761,0.370941,0.352394,0.336376,0.322360
iWeight2D[][] init 12,12
iWeight2D array 0.5,0,0,0,0,0,0,0,0,0,0,0,
0.666667,0.166667,0,0,0,0,0,0,0,0,0,0,
0.75,0.3,0.05,0,0,0,0,0,0,0,0,0,
0.8,0.4,0.114286,0.0142857,0,0,0,0,0,0,0,0,
0.833333,0.47619,0.178571,0.0396825,0.00396825,0,0,0,0,0,0,0,
0.857143,0.535714,0.238095,0.0714286,0.012987,0.00108225,0,0,0,0,0,0,
0.875,0.583333,0.291667,0.1060601,0.0265152,0.00407925,0.000291375,0,0,0,0,0,
0.888889,0.622222,0.339394,0.141414,0.043512,0.009324,0.0012432,
0.0000777,0,0,0,0,
0.9,0.654545,0.381818,0.176224,0.0629371,0.0167832,0.00314685,
0.000370218,0.0000205677,0,0,0,
0.909091,0.681818,0.41958,0.20979,0.0839161,0.0262238,0.0061703,
0.00102838,0.000108251,0.00000541254,0,0,
0.916667,0.705128,0.453297,0.241758,0.105769,0.0373303,0.0103695,
0.00218306,0.000327459,0.0000311866,0.00000141757,0,
0.923077,0.725275,0.483516,0.271978,0.12799,0.0497738,0.015718,
0.00392951,0.000748478,0.000102065,0.00000887523,0.000000369801
iorder,iaz1 xin
iaz1 = \$M_PI*iaz1/180
kk = iorder
a1 = .5*zar(0)
c1:
a1 += cos(kk*iaz1)*iWeight2D[iorder-1][kk-1]*zar(2*kk-1)
a1 += sin(kk*iaz1)*iWeight2D[iorder-1][kk-1]*zar(2*kk)
kk = kk-1
if kk > 0 goto c1
xout iNorm2D[iorder-1]*a1
endop
zakinit 7, 1
instr 1
asnd rand p4
ares reson asnd,p5,p6,1
kaz line 0,p3,p7*360 ;turns around p7 times in p3 seconds
k0 ambi2D_encode_n asnd,3,kaz
endin
instr 11
a1 ambi2D_dec_inph 3,0
a2 ambi2D_dec_inph 3,90
a3 ambi2D_dec_inph 3,180
a4 ambi2D_dec_inph 3,270
outc a1,a2,a3,a4
zacl 0,6 ; clear the za variables
endin
</CsInstruments>
<CsScore>
; amp cf bw turns
i1 0 3 .1 1500 12 1
i11 0 3
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
Distance
In order to simulate distances and movements of sound sources, the signals have to be treated before being encoded. The main perceptual cues for the distance of a sound source are reduction of the amplitude, filtering due to the absorbtion of the air and the relation between direct and indirect sound. We will implement the first two of these cues. The amplitude arriving at a listener is inversely proportional to the distance of the sound source. If the distance is larger than the unit circle (not necessarily the radius of the speaker setup, which does not need to be known when encoding sounds) we can simply divide the sound by the distance. With this calculation inside the unit circle the amplitude is amplified and becomes infinite when the distance becomes zero. Another problem arises when a virtual sound source passes the origin. The amplitude of the speaker signal in the direction of the movement suddenly becomes maximal and the signal of the opposite speaker suddenly becomes zero. A simple solution for these problems is to limit the gain of the channel W inside the unit circle to 1 (f1 in the figure below) and to fade out all other channels (f2). By fading out all channels except channel W the information about the direction of the sound source is lost and all speaker signals are the same and the sum of the speaker signals reaches its maximum when the distance is 0.
Now, we are looking for gain functions that are smoother at d = 1. The functions should be differentiable and the slope of f1 at distance d = 0 should be 0. For distances greater than 1 the functions should be approximately 1/d. In addition the function f1 should continuously grow with decreasing distance and reach its maximum at d = 0. The maximal gain must be 1. The function atan(d·π/2)/(d·π/2) fulfills these constraints. We create a function f2 for the fading out of the other channels by multiplying f1 by the factor (1 – E^(-d)).
In example udo_ambisonics2D_4 the UDO ambi2D_enc_dist_n encodes a sound at any order with distance correction. The inputs of the UDO are asnd, iorder, kazimuth and kdistance. If the distance becomes negative the azimuth angle is turned to its opposite (kaz += π) and the distance taken positive.
EXAMPLE 05B13_udo_ambisonics2D_4.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 8
0dbfs = 1
#include "ambisonics2D_udos.txt"
; distance encoding
; with any distance (includes zero and negative distance)
opcode ambi2D_enc_dist_n, k, aikk
asnd,iorder,kaz,kdist xin
kaz = \$M_PI*kaz/180
kaz = (kdist < 0 ? kaz + \$M_PI : kaz)
kdist = abs(kdist)+0.0001
kgainW = taninv(kdist*1.5707963) / (kdist*1.5708) ;pi/2
kgainHO = (1 - exp(-kdist)) ;*kgainW
kk = iorder
asndW = kgainW*asnd
asndHO = kgainHO*asndW
c1:
zawm cos(kk*kaz)*asndHO,2*kk-1
zawm sin(kk*kaz)*asndHO,2*kk
kk = kk-1
if kk > 0 goto c1
zawm asndW,0
xout 0
endop
zakinit 17, 1
instr 1
asnd rand p4
;asnd soundin "/Users/user/csound/ambisonic/violine.aiff"
kaz line 0,p3,p5*360 ;turns around p5 times in p3 seconds
kdist line p6,p3,p7
k0 ambi2D_enc_dist_n asnd,8,kaz,kdist
endin
instr 10
a1,a2,a3,a4,
a5,a6,a7,a8 ambi2D_decode 8,0,45,90,135,180,225,270,315
outc a1,a2,a3,a4,a5,a6,a7,a8
zacl 0,16
endin
</CsInstruments>
<CsScore>
f1 0 32768 10 1
; amp turns dist1 dist2
i1 0 4 1 0 2 -2
;i1 0 4 1 1 1 1
i10 0 4
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
In order to simulate the absorption of the air we introduce a very simple lowpass filter with a distance depending cutoff frequency. We produce a Doppler-shift with a distance dependent delay of the sound. Now, we have to determine our unit since the delay of the sound wave is calculated as distance divided by sound velocity. In our example udo_ambisonics2D_5.csd we set the unit to 1 metre. These procedures are performed before the encoding. In instrument 1 the movement of the sound source is defined in Cartesian coordinates. The UDO xy_to_ad transforms them into polar coordinates. The B-format channels can be written to a sound file with the opcode fout. The UDO write_ambi2D_2 writes the channels up to second order into a sound file.
EXAMPLE 05B14_udo_ambisonics2D_5.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 8
0dbfs = 1
#include "ambisonics2D_udos.txt"
#include "ambisonics_utilities.txt" ;opcodes Absorb and Doppler
/* these opcodes are included in "ambisonics2D_udos.txt"
kx,ky xin
kdist = sqrt(kx*kx+ky*ky)
kaz taninv2 ky,kx
xout 180*kaz/\$M_PI, kdist
endop
opcode Absorb, a, ak
asnd,kdist xin
aabs tone 5*asnd,20000*exp(-.1*kdist)
xout aabs
endop
opcode Doppler, a, ak
asnd,kdist xin
abuf delayr .5
adop deltapi interp(kdist)*0.0029137529 + .01 ; 1/343.2
delayw asnd
endop
*/
opcode write_ambi2D_2, k, S
Sname xin
fout Sname,12,zar(0),zar(1),zar(2),zar(3),zar(4)
xout 0
endop
zakinit 17, 1 ; zak space with the 17 channels of the B-format
instr 1
asnd buzz p4,p5,50,1
;asnd soundin "/Users/user/csound/ambisonic/violine.aiff"
kx line p7,p3,p8
ky line p9,p3,p10
aabs absorb asnd,kdist
endin
instr 10 ;decode all insruments
a1,a2,a3,a4,
a5,a6,a7,a8 ambi2D_dec_inph 5,0,45,90,135,180,225,270,315
outc a1,a2,a3,a4,a5,a6,a7,a8
; fout "B_format2D.wav",12,zar(0),zar(1),zar(2),zar(3),zar(4),
; zar(5),zar(6),zar(7),zar(8),zar(9),zar(10)
k0 write_ambi2D_2 "ambi_ex5.wav"
zacl 0,16 ; clear the za variables
endin
</CsInstruments>
<CsScore>
f1 0 32768 10 1
; amp f 0 x1 x2 y1 y2
i1 0 5 .8 200 0 40 -20 1 .1
i10 0 5
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
The position of a point in space can be given by its Cartesian coordinates x, y and z or by its spherical coordinates the radial distance r from the origin of the coordinate system, the elevation δ (which lies between –π and π) and the azimuth angle θ.
The formulae for transforming coordinates are as follows:
The channels of the Ambisonic B-format are computed as the product of the sounds themselves and the so-called spherical harmonics representing the direction to the virtual sound sources. The spherical harmonics can be normalised in various ways. We shall use the so-called semi-normalised spherical harmonics. The following table shows the encoding functions up to the third order as function of azimuth and elevation Ymn(θ,δ) and as function of x, y and z Ymn(x,y,z) for sound sources on the unit sphere. The decoding formulae for symmetrical speaker setups are the same.
In the first 3 of the following examples we will not produce sound but display in number boxes (for example using CsoundQt widgets) the amplitude of 3 speakers at positions (1, 0, 0), (0, 1, 0) and (0, 0, 1) in Cartesian coordinates. The position of the sound source can be changed with the two scroll numbers. The example udo_ambisonics_1.csd shows encoding up to second order. The decoding is done in two steps. First we decode the B-format for one speaker. In the second step, we create a overloaded opcode for n speakers. The number of output signals determines which version of the opcode is used. The opcodes ambi_encode and ambi_decode up to 8th order are saved in the text file "ambisonics_udos.txt".
EXAMPLE 05B15_udo_ambisonics_1.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 1
0dbfs = 1
zakinit 9, 1 ; zak space with the 9 channel B-format second order
opcode ambi_encode, k, aikk
asnd,iorder,kaz,kel xin
kaz = \$M_PI*kaz/180
kel = \$M_PI*kel/180
kcos_el = cos(kel)
ksin_el = sin(kel)
kcos_az = cos(kaz)
ksin_az = sin(kaz)
zawm asnd,0 ; W
zawm kcos_el*ksin_az*asnd,1 ; Y = Y(1,-1)
zawm ksin_el*asnd,2 ; Z = Y(1,0)
zawm kcos_el*kcos_az*asnd,3 ; X = Y(1,1)
if iorder < 2 goto end
i2 = sqrt(3)/2
kcos_el_p2 = kcos_el*kcos_el
ksin_el_p2 = ksin_el*ksin_el
kcos_2az = cos(2*kaz)
ksin_2az = sin(2*kaz)
kcos_2el = cos(2*kel)
ksin_2el = sin(2*kel)
zawm i2*kcos_el_p2*ksin_2az*asnd,4 ; V = Y(2,-2)
zawm i2*ksin_2el*ksin_az*asnd,5 ; S = Y(2,-1)
zawm .5*(3*ksin_el_p2 - 1)*asnd,6 ; R = Y(2,0)
zawm i2*ksin_2el*kcos_az*asnd,7 ; S = Y(2,1)
zawm i2*kcos_el_p2*kcos_2az*asnd,8 ; U = Y(2,2)
end:
xout 0
endop
; decoding of order iorder for 1 speaker at position iaz,iel,idist
opcode ambi_decode1, a, iii
iorder,iaz,iel xin
iaz = \$M_PI*iaz/180
iel = \$M_PI*iel/180
a0=zar(0)
if iorder > 0 goto c0
aout = a0
goto end
c0:
a1=zar(1)
a2=zar(2)
a3=zar(3)
icos_el = cos(iel)
isin_el = sin(iel)
icos_az = cos(iaz)
isin_az = sin(iaz)
i1 = icos_el*isin_az ; Y = Y(1,-1)
i2 = isin_el ; Z = Y(1,0)
i3 = icos_el*icos_az ; X = Y(1,1)
if iorder > 1 goto c1
aout = (1/2)*(a0 + i1*a1 + i2*a2 + i3*a3)
goto end
c1:
a4=zar(4)
a5=zar(5)
a6=zar(6)
a7=zar(7)
a8=zar(8)
ic2 = sqrt(3)/2
icos_el_p2 = icos_el*icos_el
isin_el_p2 = isin_el*isin_el
icos_2az = cos(2*iaz)
isin_2az = sin(2*iaz)
icos_2el = cos(2*iel)
isin_2el = sin(2*iel)
i4 = ic2*icos_el_p2*isin_2az ; V = Y(2,-2)
i5 = ic2*isin_2el*isin_az ; S = Y(2,-1)
i6 = .5*(3*isin_el_p2 - 1) ; R = Y(2,0)
i7 = ic2*isin_2el*icos_az ; S = Y(2,1)
i8 = ic2*icos_el_p2*icos_2az ; U = Y(2,2)
aout = (1/9)*(a0 + 3*i1*a1 + 3*i2*a2 + 3*i3*a3 + 5*i4*a4 + 5*i5*a5 + 5*i6*a6 + 5*i7*a7 + 5*i8*a8)
end:
xout aout
endop
; overloaded opcode for decoding of order iorder
; speaker positions in function table ifn
opcode ambi_decode, a,ii
iorder,ifn xin
xout ambi_decode1(iorder,table(1,ifn),table(2,ifn))
endop
opcode ambi_decode, aa,ii
iorder,ifn xin
xout ambi_decode1(iorder,table(1,ifn),table(2,ifn)),
ambi_decode1(iorder,table(3,ifn),table(4,ifn))
endop
opcode ambi_decode, aaa,ii
iorder,ifn xin
xout ambi_decode1(iorder,table(1,ifn),table(2,ifn)),
ambi_decode1(iorder,table(3,ifn),table(4,ifn)),
ambi_decode1(iorder,table(5,ifn),table(6,ifn))
endop
instr 1
asnd init 1
;kdist init 1
kaz invalue "az"
kel invalue "el"
k0 ambi_encode asnd,2,kaz,kel
ao1,ao2,ao3 ambi_decode 2,17
outvalue "sp1", downsamp(ao1)
outvalue "sp2", downsamp(ao2)
outvalue "sp3", downsamp(ao3)
zacl 0,8
endin
</CsInstruments>
<CsScore>
;f1 0 1024 10 1
f17 0 64 -2 0 0 0 90 0 0 90 0 0 0 0 0 0
i1 0 100
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
Example udo_ambisonics_2.csd shows in-phase decoding. The weights up to 8th order are stored in the arrays iWeight3D[][].
EXAMPLE 05B16_udo_ambisonics_2.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 1
0dbfs = 1
zakinit 81, 1 ; zak space for up to 81 channels of the 8th order B-format
; the opcodes used below are safed in "ambisonics_udos.txt"
#include "ambisonics_udos.txt"
; in-phase decoding up to third order for one speaker
opcode ambi_dec1_inph3, a, iii
; weights up to 8th order
iWeight3D[][] init 8,8
iWeight3D array 0.333333,0,0,0,0,0,0,0,
0.5,0.1,0,0,0,0,0,0,
0.6,0.2,0.0285714,0,0,0,0,0,
0.666667,0.285714,0.0714286,0.0079365,0,0,0,0,
0.714286,0.357143,0.119048,0.0238095,0.0021645,0,0,0,
0.75,0.416667,0.166667,0.0454545,0.00757576,0.00058275,0,0,
0.777778,0.466667,0.212121,0.0707071,0.016317,0.002331,0.0001554,0,
0.8,0.509091,0.254545,0.0979021,0.027972,0.0055944,0.0006993,0.00004114
iorder,iaz,iel xin
iaz = \$M_PI*iaz/180
iel = \$M_PI*iel/180
a0=zar(0)
if iorder > 0 goto c0
aout = a0
goto end
c0:
a1=iWeight3D[iorder-1][0]*zar(1)
a2=iWeight3D[iorder-1][0]*zar(2)
a3=iWeight3D[iorder-1][0]*zar(3)
icos_el = cos(iel)
isin_el = sin(iel)
icos_az = cos(iaz)
isin_az = sin(iaz)
i1 = icos_el*isin_az ; Y = Y(1,-1)
i2 = isin_el ; Z = Y(1,0)
i3 = icos_el*icos_az ; X = Y(1,1)
if iorder > 1 goto c1
aout = (3/4)*(a0 + i1*a1 + i2*a2 + i3*a3)
goto end
c1:
a4=iWeight3D[iorder-1][1]*zar(4)
a5=iWeight3D[iorder-1][1]*zar(5)
a6=iWeight3D[iorder-1][1]*zar(6)
a7=iWeight3D[iorder-1][1]*zar(7)
a8=iWeight3D[iorder-1][1]*zar(8)
ic2 = sqrt(3)/2
icos_el_p2 = icos_el*icos_el
isin_el_p2 = isin_el*isin_el
icos_2az = cos(2*iaz)
isin_2az = sin(2*iaz)
icos_2el = cos(2*iel)
isin_2el = sin(2*iel)
i4 = ic2*icos_el_p2*isin_2az ; V = Y(2,-2)
i5 = ic2*isin_2el*isin_az ; S = Y(2,-1)
i6 = .5*(3*isin_el_p2 - 1) ; R = Y(2,0)
i7 = ic2*isin_2el*icos_az ; S = Y(2,1)
i8 = ic2*icos_el_p2*icos_2az ; U = Y(2,2)
aout = (1/3)*(a0 + 3*i1*a1 + 3*i2*a2 + 3*i3*a3 + 5*i4*a4 + 5*i5*a5 + 5*i6*a6 + 5*i7*a7 + 5*i8*a8)
end:
xout aout
endop
; overloaded opcode for decoding for 1 or 2 speakers
; speaker positions in function table ifn
opcode ambi_dec2_inph, a,ii
iorder,ifn xin
xout ambi_dec1_inph(iorder,table(1,ifn),table(2,ifn))
endop
opcode ambi_dec2_inph, aa,ii
iorder,ifn xin
xout ambi_dec1_inph(iorder,table(1,ifn),table(2,ifn)),
ambi_dec1_inph(iorder,table(3,ifn),table(4,ifn))
endop
opcode ambi_dec2_inph, aaa,ii
iorder,ifn xin
xout ambi_dec1_inph(iorder,table(1,ifn),table(2,ifn)),
ambi_dec1_inph(iorder,table(3,ifn),table(4,ifn)),
ambi_dec1_inph(iorder,table(5,ifn),table(6,ifn))
endop
instr 1
asnd init 1
kdist init 1
kaz invalue "az"
kel invalue "el"
k0 ambi_encode asnd,8,kaz,kel
ao1,ao2,ao3 ambi_dec_inph 8,17
outvalue "sp1", downsamp(ao1)
outvalue "sp2", downsamp(ao2)
outvalue "sp3", downsamp(ao3)
zacl 0,80
endin
</CsInstruments>
<CsScore>
f1 0 1024 10 1
f17 0 64 -2 0 0 0 90 0 0 90 0 0 0 0 0 0 0 0 0 0
i1 0 100
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
The weighting factors for in-phase decoding of Ambisonics (3D) are:
Example udo_ambisonics_3.csd shows distance encoding.
EXAMPLE 05B17_udo_ambisonics_3.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
zakinit 81, 1 ; zak space with the 11 channels of the B-format
#include "ambisonics_udos.txt"
opcode ambi3D_enc_dist1, k, aikkk
asnd,iorder,kaz,kel,kdist xin
kaz = \$M_PI*kaz/180
kel = \$M_PI*kel/180
kaz = (kdist < 0 ? kaz + \$M_PI : kaz)
kel = (kdist < 0 ? -kel : kel)
kdist = abs(kdist)+0.00001
kgainW = taninv(kdist*1.5708) / (kdist*1.5708)
kgainHO = (1 - exp(-kdist)) ;*kgainW
outvalue "kgainHO", kgainHO
outvalue "kgainW", kgainW
kcos_el = cos(kel)
ksin_el = sin(kel)
kcos_az = cos(kaz)
ksin_az = sin(kaz)
asnd = kgainW*asnd
zawm asnd,0 ; W
asnd = kgainHO*asnd
zawm kcos_el*ksin_az*asnd,1 ; Y = Y(1,-1)
zawm ksin_el*asnd,2 ; Z = Y(1,0)
zawm kcos_el*kcos_az*asnd,3 ; X = Y(1,1)
if iorder < 2 goto end
/*
...
*/
end:
xout 0
endop
instr 1
asnd init 1
kaz invalue "az"
kel invalue "el"
kdist invalue "dist"
k0 ambi_enc_dist asnd,5,kaz,kel,kdist
ao1,ao2,ao3,ao4 ambi_decode 5,17
outvalue "sp1", downsamp(ao1)
outvalue "sp2", downsamp(ao2)
outvalue "sp3", downsamp(ao3)
outvalue "sp4", downsamp(ao4)
outc 0*ao1,0*ao2;,2*ao3,2*ao4
zacl 0,80
endin
</CsInstruments>
<CsScore>
f17 0 64 -2 0 0 0 90 0 180 0 0 90 0 0 0 0
i1 0 100
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
In example udo_ambisonics_4.csd a buzzer with the three-dimensional trajectory shown below is encoded in third order and decoded for a speaker setup in a cube (f17).
EXAMPLE 05B18_udo_ambisonics_4.csd
```<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 8
0dbfs = 1
zakinit 16, 1
#include "ambisonics_udos.txt"
#include "ambisonics_utilities.txt"
instr 1
asnd buzz p4,p5,p6,1
kt line 0,p3,p3
kaz,kel,kdist xyz_to_aed 10*sin(kt),10*sin(.78*kt),10*sin(.43*kt)
a1,a2,a3,a4,a5,a6,a7,a8 ambi_decode 3,17
;k0 ambi_write_B "B_form.wav",8,14
outc a1,a2,a3,a4,a5,a6,a7,a8
zacl 0,15
endin
</CsInstruments>
<CsScore>
f1 0 32768 10 1
f17 0 64 -2 0 -45 35.2644 45 35.2644 135 35.2644 225 35.2644 -45 -35.2644 .7854 -35.2644 135 -35.2644 225 -35.2644
i1 0 40 .5 300 40
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
Ambisonics Equivalent Panning (AEP)
If we combine encoding and in-phase decoding, we obtain the following panning function (a gain function for a speaker depending on its distance to a virtual sound source):
P(γ, m) = (1/2+ 1/2 cos γ)^m
where γ denotes the angle between a sound source and a speaker and m denotes the order. If the speakers are positioned on a unit sphere the cosine of the angle γ is calculated as the scalar product of the vector to the sound source (x, y, z) and the vector to the speaker (xs, ys, zs).
In contrast to Ambisonics the order indicated in the function does not have to be an integer. This means that the order can be continuously varied during decoding. The function can be used in both Ambisonics and Ambisonics2D.
This system of panning is called Ambisonics Equivalent Panning. It has the disadvantage of not producing a B-format representation, but its implementation is straightforward and the computation time is short and independent of the Ambisonics order simulated. Hence it is particularly useful for real-time applications, for panning in connection with sequencer programs and for experimentation with high and non-integral Ambisonic orders.
The opcode AEP1 in the example udo_AEP.csd shows the calculation of ambisonics equivalent panning for one speaker. The opcode AEP then uses AEP1 to produce the signals for several speakers. In the text file "AEP_udos.txt" AEP ist implemented for up to 16 speakers. The position of the speakers must be written in a function table. As the first parameter in the function table the maximal speaker distance must be given.
EXAMPLE 05B19_udo_AEP.csd
```<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 4
0dbfs = 1
;#include "ambisonics_udos.txt"
; opcode AEP1 is the same as in udo_AEP_xyz.csd
opcode AEP1, a, akiiiikkkkkk ; soundin, order, ixs, iys, izs, idsmax, kx, ky, kz
idists = sqrt(ixs*ixs+iys*iys+izs*izs)
xout ain*kpan*idists/idsmax
endop
; opcode AEP calculates ambisonics equivalent panning for n speaker
; the number n of output channels defines the number of speakers (overloaded function)
; inputs: sound ain, order korder (any real number >= 1)
; ifn = number of the function containing the speaker positions
; position and distance of the sound source kaz,kel,kdist in degrees
opcode AEP, aaaa, akikkk
ain,korder,ifn,kaz,kel,kdist xin
kaz = \$M_PI*kaz/180
kel = \$M_PI*kel/180
kx = kdist*cos(kel)*cos(kaz)
ky = kdist*cos(kel)*sin(kaz)
kz = kdist*sin(kel)
ispeaker[] array 0,
table(3,ifn)*cos((\$M_PI/180)*table(2,ifn))*cos((\$M_PI/180)*table(1,ifn)),
table(3,ifn)*cos((\$M_PI/180)*table(2,ifn))*sin((\$M_PI/180)*table(1,ifn)),
table(3,ifn)*sin((\$M_PI/180)*table(2,ifn)),
table(6,ifn)*cos((\$M_PI/180)*table(5,ifn))*cos((\$M_PI/180)*table(4,ifn)),
table(6,ifn)*cos((\$M_PI/180)*table(5,ifn))*sin((\$M_PI/180)*table(4,ifn)),
table(6,ifn)*sin((\$M_PI/180)*table(5,ifn)),
table(9,ifn)*cos((\$M_PI/180)*table(8,ifn))*cos((\$M_PI/180)*table(7,ifn)),
table(9,ifn)*cos((\$M_PI/180)*table(8,ifn))*sin((\$M_PI/180)*table(7,ifn)),
table(9,ifn)*sin((\$M_PI/180)*table(8,ifn)),
table(12,ifn)*cos((\$M_PI/180)*table(11,ifn))*cos((\$M_PI/180)*table(10,ifn)),
table(12,ifn)*cos((\$M_PI/180)*table(11,ifn))*sin((\$M_PI/180)*table(10,ifn)),
table(12,ifn)*sin((\$M_PI/180)*table(11,ifn))
idsmax table 0,ifn
kdist = kdist+0.000001
kgain = taninv(kdist*1.5708)/(kdist*1.5708)
a1 AEP1 ain,korder,ispeaker[1],ispeaker[2],ispeaker[3],
a2 AEP1 ain,korder,ispeaker[4],ispeaker[5],ispeaker[6],
a3 AEP1 ain,korder,ispeaker[7],ispeaker[8],ispeaker[9],
a4 AEP1 ain,korder,ispeaker[10],ispeaker[11],ispeaker[12],
xout a1,a2,a3,a4
endop
instr 1
ain rand 1
;ain soundin "/Users/user/csound/ambisonic/violine.aiff"
kt line 0,p3,360
korder init 24
;kdist Dist kx, ky, kz
a1,a2,a3,a4 AEP ain,korder,17,kt,0,1
outc a1,a2,a3,a4
endin
</CsInstruments>
<CsScore>
;fuction for speaker positions
; GEN -2, parameters: max_speaker_distance, xs1,ys1,zs1,xs2,ys2,zs2,...
;octahedron
;f17 0 32 -2 1 1 0 0 -1 0 0 0 1 0 0 -1 0 0 0 1 0 0 -1
;cube
;f17 0 32 -2 1,732 1 1 1 1 1 -1 1 -1 1 -1 1 1
;octagon
;f17 0 32 -2 1 0.924 -0.383 0 0.924 0.383 0 0.383 0.924 0 -0.383 0.924 0 -0.924 0.383 0 -0.924 -0.383 0 -0.383 -0.924 0 0.383 -0.924 0
;f17 0 32 -2 1 0 0 1 45 0 1 90 0 1 135 0 1 180 0 1 225 0 1 270 0 1 315 0 1
;f17 0 32 -2 1 0 -90 1 0 -70 1 0 -50 1 0 -30 1 0 -10 1 0 10 1 0 30 1 0 50 1
f17 0 32 -2 1 -45 0 1 45 0 1 135 0 1 225 0 1
i1 0 2
</CsScore>
</CsoundSynthesizer>
;example by martin neukom
```
Utilities
The file utilities.txt contains the following opcodes:
dist computes the distance from the origin (0, 0) or (0, 0, 0) to a point (x, y) or (x, y, z)
kdist dist kx, ky
kdist dist kx, ky, kz
Doppler simulates the Doppler-shift
ares Doppler asnd, kdistance
absorb is a very simple simulation of the frequency dependent absorption
ares absorb asnd, kdistance
aed_to_xyz converts polar coordinates to Cartesian coordinates
kx, ky, kz aed_to_xyz kazimuth, kelevation, kdistance
ix, iy, iz aed_to_xyz iazimuth, ielevation, idistance
dist_corr induces a delay and reduction of the speaker signals relative to the most distant speaker.
a1 [, a2] ... [, a16] dist_corr a1 [, a2] ... [, a16], ifn
f ifn 0 32 -2 max_speaker_distance dist1, dist2, ... ;distances in m
degree (degreei) converts radian to degrees | 22,527 | 64,629 | {"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-2015-22 | latest | en | 0.903153 |
http://mathhelpforum.com/advanced-statistics/152516-multiple-random-variables-print.html | 1,506,068,942,000,000,000 | text/html | crawl-data/CC-MAIN-2017-39/segments/1505818688926.38/warc/CC-MAIN-20170922074554-20170922094554-00618.warc.gz | 216,699,383 | 2,817 | # Multiple Random Variables
• Aug 1st 2010, 11:09 AM
Hitman6267
Multiple Random Variables
Attachment 18400http://www.mathhelpforum.com/math-he...0&d=1280689693
can some one tell me what I need to do ? I'm lost.
I don't see what relationship I need to use to calculate their average.
• Aug 1st 2010, 10:25 PM
gustavodecastro
a) Try to use the CLT. You have to calculate $P(|\bar{X} - mu| \geq 6)$ using the change of variable $Z = (\bar{X} - \mu)/\var{\bar{X}}$
b) Since all the variables are independent,
$E(e^{t\sum_{k=1}^{36} X_k}) = E(e^{tX_1}) \dots E(e^{tX_{36}}) = \left(E(e^{tX_1})\right)^{36}$
and since you the distribution of X, you know the mgf. | 239 | 660 | {"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": 3, "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-2017-39 | longest | en | 0.757044 |
http://mrwhatis.net/represent-on-a-graph-definition.html | 1,398,078,087,000,000,000 | text/html | crawl-data/CC-MAIN-2014-15/segments/1397609539705.42/warc/CC-MAIN-20140416005219-00270-ip-10-147-4-33.ec2.internal.warc.gz | 151,878,900 | 11,094 | Search What is?:
# What is REPRESENT ON A GRAPH DEFINITION?
On the left side of the graph are numbers that represent how many students were surveyed. ... Bar Graph Definition; Advertise on About.com; Our Story; News; SiteMap; All Topics; Reprints; Help; Write for About; Careers at About; User Agreement; Ethics Policy;
In computer science, a graph is an abstract data type that is meant to implement the graph and hypergraph concepts from mathematics. ... The nodes may be part of the graph structure, or may be external entities represented by integer indices or references.
http://en.wikipedia.org/wiki/Graph_(data_structure)
Graph definition, a diagram representing a system of connections or interrelations among two or more things by a number of distinctive dots, ... to represent by means of a graph. Relevant Questions. What Are Graphs? How To Create A Graph On Excel. How To Graph.
http://dictionary.reference.com/browse/graph
The graph of a function on real numbers may be mapped directly to the graphic representation of the function. For general functions, a graphic representation cannot necessarily be found and the formal definition of the graph of a function suits the need of mathematical statements, ...
http://en.wikipedia.org/wiki/Graph_of_a_function
Definition of graph in the AudioEnglish.org Dictionary. Meaning of graph. What does graph mean? ... 1. represent by means of a graph 2. plot upon a graph Familiarity information: GRAPH used as a verb is rare. Dictionary entry details • GRAPH (noun)
http://www.audioenglish.org/dictionary/graph.htm
Definition of graph in the Online Dictionary. Meaning of graph. Pronunciation of graph. Translations of graph. graph synonyms, graph antonyms. ... To represent by a graph. 2. To plot (a function) on a graph. [Short for graphic formula.]
http://www.thefreedictionary.com/graph
Main Entry: line graph Part of Speech: n Definition: a diagram of lines made by connected data points which represent successive changes in the value of a variable quantity or quantities
http://dictionary.reference.com/browse/line+graph
Definition: Charts are what we ... For example, a pie chart could be used to show what percentage of your total daily calorie intake is represented by one quadruple cheese and bacon hamburger. ... Chart Axis Definition; Definition and Explanation on Circle and Pie Graphs;
Full Definition of GRAPH. 1: to represent by a graph . 2: to plot on a graph . Examples of GRAPH. Students were asked to graph each equation. First Known Use of GRAPH
http://www.merriam-webster.com/dictionary/graph
Definition of represent in the Online Dictionary. Meaning of represent. ... graph, chart - represent by means of a graph; "chart the data" 10. represent - play a role or part; "Gielgud played Hamlet"; "She wants to act Lady Macbeth, ...
http://www.thefreedictionary.com/represent
Definition of bar graph in the AudioEnglish.org Dictionary. Meaning of bar graph. What does bar graph mean? ... heights of the bars represent observed frequencies) Learn English with... Proverbs of the week "Whiskey on beer, never fear. Beer on whiskey, mighty risky."
http://www.audioenglish.org/dictionary/bar_graph.htm
Definition: A graph is an image that represents data symbolically. A graph is used to present complex information and numerical data in a simple, compact format. Some types of graphs include: Bar graphs - uses horizontal bars to represent data ; Column graphs - uses vertical columns to represent ...
Types of Graphs to Use to Represent Statistics Video; Definition and Explanation on Circle and Pie Graphs; What Is a Bar Graph? Excel Spreadsheets Glossary of Terms ... Graph Definition; Advertise on About.com; Our Story; News; SiteMap; All Topics; Reprints; Help; Write for About; Careers at ...
Definition of graph: Two-dimensional drawing showing a relationship (usually between two set of numbers) by means of a line, curve, a series of bars, or other symbols. Typically, an independent variable is represented on ... Definition of graph: Two-dimensional drawing showing a relationship ...
A bar graph is a chart with bars whose length is proportional to the values they represent. Bar graphs are best used to compare discrete data.
The definition of a circle graphs or charts and when they are used. Education; ... (or pie chart), each part of the data is represented by a sector of the circle. Prior to technology and spreadsheet programs, ... Graph Definition;
When can a graph represent a function? ... Why is the vertical line test used to determine if a graph represents a function? The definition of a function is "A relation in which exactly one element of the range is paired with each element of the domain."
graph definition: The definition of a graph is a diagram showing the relationships between two or more things. (noun) An example of graph is a pie chart ... To represent by a graph. To plot (a function) on a graph. Origin of graph. Short for graphic formula. graph1. top: bar graph. bottom: line ...
http://www.yourdictionary.com/graph
... Graph. Information about Graph in the Columbia Encyclopedia, Computer Desktop Encyclopedia, computing dictionary. bar graph, graph theory, mathematical graph. Dictionary ... a structure represented by a diagram consisting of points (vertices) joined by lines (edges)
http://encyclopedia2.thefreedictionary.com/graph
A Picture Graph is a type of graph that uses symbols and pictures to represent a data. This type of graph has a key which explains what each symbol means. A picture. Ask a Question Q&A Articles theKnow Science; ... Picture Graph Definition Examples of Pictures Graphs. Create a Picture Graph. All ...
Definition of Vertical Axis. In arithmetic, the vertical axis is a part of a two-dimensional graph of points. It defines one of the two dimensions. ... The vertical axis may alternately represent a function of the two planar variable, f ...
Learn more about graph in the class Concepts of Calculus 310 below. Shop Essentials Training. ... Describe how to represent functions on graphs. Define a line. Describe how to graph a line. Describe the process for finding the slope of a line.
http://www.toolingu.com/definition-800310-41532-graph.html
What does bar graph mean? ... A bar chart or bar graph is a chart with rectangular bars with lengths proportional to the values that they represent. ... (if on a Cartesian Plane) if doing slope. . It does not have a Direct Definition, but is called . Sign in using: Answers members: Username ...
Definition of Vertical Line Test. ... Using vertical line test, the graph given does not represent a function as the Vertical line drawn intersects the graph at more than one point. Solved Examples for Vertical Line Test.
http://www.icoachmath.com/math_dictionary/vertical_line_test.html
Learn the definition of a function and see the different ways functions can be represented. Take a look! Background Tutorials. Function Definitions and ... and very often, you need to plot ordered pairs in order to see what the graph of a function looks like. This tutorial will introduce you ...
http://virtualnerd.com/pre-algebra/linear-functions-graphing/functions/definitions-notation/function-definition
Definition. pie graph (or pie chart) Facebook Like; Tweet; Google +1; LinkedIn; Email; Comment; RSS; Print; A; AA; AAA; Part of the Computing fundamentals glossary: Compare with histogram. A pie graph (or pie chart) is a specialized graph used in statistics. ... From this graph, ...
http://whatis.techtarget.com/definition/pie-graph-or-pie-chart
Learn the definition of a function and see the different ways functions can be represented. Take a look! ... If you graph a linear function, you get a line.
The graph below will be used to help us define the parts of a line graph. Let's define the various parts of a line graph. title: The title of the line graph tells us what the graph is about. labels:
http://www.mathgoodies.com/lessons/graphs/line.html
Definition: Clearly defines a pie graph. Resources: A list of links that provide information about pie graphs. ... Bar Graph A bar graph, or bar chart, is used to represent values in relation to other values. They’re often used to compare data taken over long periods of time, ...
http://www.datarecoverylabs.com/types-of-graphs.html
I need a good definition and explanation to what a linear graph is please and thankyou! (: Home; Mail; News; Sports; Finance; Weather; Games ... What does a linear graph represent? Changing a non linear graph to a linear graph?
Basic Graph Definition A graph is a symbolic representation of a network and of its ... can act as links. Consequently, all transport networks can be represented by graph theory in one way or the other. The following elements are fundamental at understanding graph theory: Graph. A graph G ...
http://people.hofstra.edu/geotrans/eng/methods/ch1m2en.html
What is the definition of a two - coordinate graph? it is a independent coordinate sometimes called x, also known as abscissa, often laid out horizontally. What does Graph on a coordinate plane mean?
This can be said in one definition: Formal Definition of a Function. A function relates each element of a set with exactly one element of another set ... On a graph, the idea of single valued means that no vertical line would ever cross more than one value.
http://www.mathsisfun.com/sets/function.html
And we will define the tangent at P to be the limit of that sequence of slopes. That slope, that limit, ... As for the graph on the right, it is the absolute value function, y = |x|. (Topic 5 of Precalculus.)
http://www.themathpage.com/aCalc/derivative.htm
What Is a Histogram Graph?. Histograms, which visually represent specific sets of numerical data, ... Definition. Histograms are specialized bar graphs that measure numerical quantities as opposed to categorical classifications.
http://www.ehow.com/info_8767215_histogram-graph.html
What is the name of the quantity represented by the slope of a velocity vs. Time graph?
represent definition: Represent is defined as to express in words, symbolize or stand for. (verb) An example of represent is a loyalty pledge. ... graph; pearl; personify; rebirth; role model; roman; trade union; value
http://www.yourdictionary.com/represent
A bar graph is used when you have qualitative data. Find out how to construct a bar graph from a set of data. Education; Statistics. Search. Statistics Formulas & Tables; Worksheets; ... A bar graph is a way to visually represent qualitative data.
... also called a Pareto graph, is a vertical bar graph in which values are plotted in decreasing ... Definition. Pareto chart (Pareto ... Pareto charts are extremely useful for analyzing what problems need attention first because the taller bars on the chart, which represent ...
http://whatis.techtarget.com/definition/Pareto-chart-Pareto-distribution-diagram
Definition: The graph of a function y = f(x) is the set of all points whose coordinates are (x, f(x)). What is the graph of a function? ... the relationship between the cost and the number of people is a linear one and can be represented by the following linear function.
http://cs.gmu.edu/cne/modules/dau/calculus/graphing_funcs/gfintro_frm.html
A curve depicting all maximum output possibilities for two or more goods given a set of inputs (resources, labor, etc.). The PPF assumes that all inputs are used efficiently. As indicated on the chart above, points A, B and C represent the points at which production of Good A and Good B is most ...
http://www.investopedia.com/terms/p/productionpossibilityfrontier.asp
Definition of S curve: A type of curve that shows the growth of a variable in terms of another variable, often expressed as units of time. For example, ...
If data can be represented by one and only one category (e.g., a person's gender) it is called qualitative data. Categorical ... Read another definition of bar graph and multiple bar graph. Related Investigations on InterMath to Challenge Teachers.
http://intermath.coe.uga.edu/tweb/gwin1-01/apley/Dictionary/Statistics/Statistics.html
Graph Data Structures Contents. Introduction; Definitions; Functions; ... represented here by a double-headed arrow. Mathematical definition. More formally, a graph is an ordered pair, G = <V, A>, where V is the set of vertices, ...
To graph qualitative data, one helpful way to depict it is to make a pie chart. Education; ... One of the most common ways to represent data graphically is called a pie chart. ... Definition of Charts and Graphs; Charts and Graphs Tips;
Teams are represented by a team chart with the leader at the center. There is no conflict between these two models. ... The best practice is to show the title above the name, because it's the positions that define the organization, ...
http://www.smartdraw.com/articles/org-chart/what-is-org-chart.htm
Definition: a PERT Chart is a project planning and scheduling method, used in project management, that is designed to analyze and represent the tasks involved in completing a given project.
http://www.mbabrief.com/what_is_pert_chart.asp
This graph states, therefore, that A is directly proportional to B. ... Or, using formal function definition writing: Lastly: If someone says, 'A is proportional to B', they most assuredly mean, 'A is directly proportional to B'.
http://zonalandeducation.com/mstm/physics/mechanics/forces/directProportion/graph/directAB.html
Or test your knowledge and have each page load with the definition hidden! graph in ... Also called: chart a drawing depicting the relation between certain sets of numbers or quantities by means of a series of dots, lines ... to draw or represent in a graph; Etymology: 19 th Century: short for ...
http://www.wordreference.com/definition/graph
If you didn't find what you were looking for you can always try Google Search
Add this page to your blog, web, or forum. This will help people know what is What is REPRESENT ON A GRAPH DEFINITION | 2,992 | 13,949 | {"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.40625 | 3 | CC-MAIN-2014-15 | latest | en | 0.877931 |
https://www.qalaxia.com/content/5-times-table | 1,669,804,502,000,000,000 | text/html | crawl-data/CC-MAIN-2022-49/segments/1669446710734.75/warc/CC-MAIN-20221130092453-20221130122453-00017.warc.gz | 1,022,532,792 | 2,901 | Q
#### 5 times table
(10 Questions)
10 viewed last edited 5 years ago
5 times table
0
1
5x9=
0
1
5 x 5 =
0
1
5 x 7 =
0
1
5x8=
0
1
5 x 6 =
0
1
5x10=
0
1
5 x 3 =
0
1
5 x 4 =
0
1
5 x 2 =
0
1
5 x 1 =
by itzel sanchez | 118 | 214 | {"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.859375 | 3 | CC-MAIN-2022-49 | latest | en | 0.710364 |
http://www.docstoc.com/docs/120684100/fixed-rate-mortgages | 1,427,399,209,000,000,000 | text/html | crawl-data/CC-MAIN-2015-14/segments/1427131292567.7/warc/CC-MAIN-20150323172132-00061-ip-10-168-14-71.ec2.internal.warc.gz | 367,381,570 | 41,955 | ; fixed rate mortgages
Documents
User Generated
Resources
Learning Center
# fixed rate mortgages
VIEWS: 7 PAGES: 82
• pg 1
``` Fixed Rate Mortgage
Mechanics
Recall that to the investor, the fixed rate
mortgage is a type of annuity.
The investor pays the borrower an up-front
amount in return for a promised stream of
future cash flows.
At time zero (i.e. origination) the present
value of the annuity must equal the cash the
investor pays the borrower.
Fixed Rate Mortgage
Mechanics
Casho = PV0(Future Cash Flows)
If the cash were worth more than the PV of
the future cash flows, the bank would not be
willing to make the loan they would be
paying more for the annuity than it was
worth.
Fixed Rate Mortgage
Mechanics
Casho = PV0(Future Cash Flows)
If the cash were worth less than the PV of the
future cash flows, the borrower would not be
willing to accept the loan because they would
be taking on a liability that was worth more
than the asset they would receive (the cash),
reducing their wealth.
Fixed Rate Mortgage
Mechanics
Casho = PV0(Future Cash Flows)
Thus, at time 0, the only way the two parties
will come to an agreement is if the exchange
is equal: the lender must give the investor an
amount in cash that is equal to the present
value of the remaining future cash flows.
After time 0, of course, this relationship does
not hold.
Fixed Rate Mortgage
Mechanics
The mortgage contract specifies how to
calculate the various cash flows associated
with the mortgage. This will include:
The “Principal” amount of the loan
determines the monthly payments. This is
normally set to the amount of cash the
investor gives the borrower at time 0.
(unless the loan includes points).
Fixed Rate Mortgage
Mechanics
The other terms specified in the mortgage
contract include:
r - the contract rate of the mortgage,
n - the number of monthly payments,
Pmt – the monthly payment on the mortgage.
Fixed Rate Mortgage
Mechanics - Balance
At time 0 we know that the value of the
mortgage is equal to the cash received. For
now, assume that the principal is set to that
same amount.
Thus, the value of the mortgage must have
this relationship:
1
1 n
Prin Pmt *
1 c
12
c
12
Fixed Rate Mortgage
Mechanics - Balance
Thus, we know if the contract rate were 8%,
with 20 years (240 payments) term and
monthly payments of \$850, the principal
amount must be 101,621.15
1
1
1 .08
240
12
101,621.15 850 *
.08
12
Fixed Rate Mortgage
Mechanics - Balance
Note that this formula actually works for any point
during the life of the mortgage – that is, if you tell
me the remaining term, the contract rate, and the
monthly payment, this formula tells you the
currently outstanding principal.
1
1
1 c
n
12
Prin Pmt *
c
12
Fixed Rate Mortgage
Mechanics - Payments
While knowing how to determine the
principal amount is important, it is perhaps
more interesting (from a potential
homeowners standpoint) to know how to
calculate the payment that will be required
given a known balance.
This just requires simple algebraic
manipulation of the balance formula.
Fixed Rate Mortgage
Mechanics – Payments
Pmt Prin *
c / 12
1
1
1 c
n
12
So, for a \$100,000 loan at 10% for 30 years,
the payment is \$877.57.
877.57 100,000*
.10 / 12
1
1
1 .10
360
12
Fixed Rate Mortgages
Mechanics - Payments
Pmt Prin *
c / 12
1
1
1 c
n
12
This formula also works at any point in time.
That is, if you know the balance, remaining
term, and contract rate, you can plug those
numbers into the above formula and
determine the monthly payment.
Fixed Rate Mortgage
Mechanics - Amortization
The mortgage contract will state the order in
which payments are attributed to the account.
The usual way this occurs is:
Overdue interest and penalties are paid first,
Current interest is paid second,
Overdue principal is paid third,
Current principal is paid fourth,
Any remaining cash pre-pays principal.
Fixed Rate Mortgage
Mechanics - Amortization
Thus, normally (i.e. when scheduled
payments are made on time), the investor
takes the interest out of the payment first,
and then takes the principal.
The interest amount is found by multiplying
the balance at the beginning of the month by
the monthly interest rate:
Interest due = Beginning Balance * c/12.
Fixed Rate Mortgage
Mechanics - Amortization
The principal due can then be found by
subtracting the interest due from the
payment:
Principal Due = Pmt – Interest Due
From this information we can create an
amortization chart.
Fixed Rate Mortgage
Mechanics - Amortization
For a 30 year, 9% mortgage, original balance
of \$200,000.
Principal \$200,000.00 Payments 360 Contract rate 9.00%
Beginning Interest Ending
Month Balance Payment Due Principal Due Balance
1 \$200,000.00 1609.245 \$1,500.00 \$109.25 \$199,890.75
2 \$199,890.75 1609.245 \$1,499.18 \$110.06 \$199,780.69
3 \$199,780.69 1609.245 \$1,498.36 \$110.89 \$199,669.80
4 \$199,669.80 1609.245 \$1,497.52 \$111.72 \$199,558.08
5 \$199,558.08 1609.245 \$1,496.69 \$112.56 \$199,445.52
6 \$199,445.52 1609.245 \$1,495.84 \$113.40 \$199,332.11
7 \$199,332.11 1609.245 \$1,494.99 \$114.25 \$199,217.86
8 \$199,217.86 1609.245 \$1,494.13 \$115.11 \$199,102.75
9 \$199,102.75 1609.245 \$1,493.27 \$115.97 \$198,986.77
Note that the above is an Excel spreadsheet – you should be able to “click” on it and actually use it.
Fixed Rate Mortgage
Mechanics - Amortization
Notice the relationship between principal
payment, interest payment and total payment.
1800
1600
1400
1200 Payment
1000
Interest Due
800
600 Principal Due
400
200
0
0 100 200 300 400
Fixed Rate Mortgage
Mechanics - Price
At origination the contract rate of the
mortgage will equal the market interest rate
for the type of loan and creditworthiness of
the borrower.
It is the equality of the market and contract
rates which forces the balance and value of
the mortgage to be the same at time 0.
Fixed Rate Mortgage
Mechanics - Price
Over time, since the contract rate is fixed, the
contract and mortgage rates will diverge.
Thus, the value and balance of the mortgage
will diverge over time.
This means we have to concern ourselves
with determining the value (price) of the
mortgage at times other than time t.
Fixed Rate Mortgage
Mechanics - Price
To do this we simply take the present value
of the remaining payments using the current
market rate:
1
1
1 r
n
12
Value Pmt *
r
12
Fixed Rate Mortgage
Mechanics - Price
Of course this is the same basic formula as
the one we used to calculate the balance,
with the difference that we use the market
rate, r, instead of the contract rate, c.
1 1
1 1
Value Pmt *
1 r n
12
1 c
n
12
Balance Pmt *
r c
12 12
Fixed Rate Mortgage
Mechanics - Example
At this point it might be useful to look at an
extended example.
Consider that a borrower originally took out a
\$200,000 loan for 30 years at 9%. Five years have
passed and the market rate is now 7%.
What is the monthly payment on the loan?
What is the balance of the loan?
What is the value of the loan?
Fixed Rate Mortgage
Mechanics - Example
Example (continued)
The monthly payment is \$1,609.25:
\$1,609.25 200,000*
.09 / 12
1
1
1 .09
12
360
After 5 years the balance is: \$191,760:
1
1
1 .09
300
12
191,760.27 1609.25*
.09
12
Fixed Rate Mortgage
Mechanics - Example
Example (continued)
Note that I can determine the payment from
ONLY the current balance, contract rate, and
remaining term:
\$1,609.25 191,760*
.09 / 12
1
1
1 .09
12
300
Fixed Rate Mortgage
Mechanics - Example
Example (continued)
The value of the mortgage, at the 7% contract rate is:
\$227,687.12,
1
1
1 .07
300
12
227,687.12 1609.25*
.07
12
Contrast this with the balance, which is still
1
1
1 .09
300
12
191,760.27 1609.25*
.09
12
Fixed Rate Mortgage
Mechanics - Effective Yield
Frequently, we will know the price of a
mortgage, and its contractual details, but we
will not know the market discount rate.
Fortunately, we can use the present value of
an annuity formula to solve for the discount
rate.
Fixed Rate Mortgage
Mechanics - Effective Yield
We simply have to solve for effective yield
(y) in the equation below. This can be done
through a search algorithm or by use of a
financial calculator.
1 1
y n
1 12
Known Price Pmt *
y
12
Fixed Rate Mortgage
Mechanics - Effective Yield
In the previous example, let us say the a bank
could purchase the mortgage for \$180,000.
What would be the effective yield if a bank
purchased it at that price? It would be 9.79%
1
1
1 .0979
300
12
\$180,000 1609.25*
.0979
12
Fixed Rate Mortgage
Mechanics - Effective Yield
Note that in the absence of prepayment
penalties or points, the effective yield on a
mortgage (to the borrower) is always the
contract rate of the loan.
Fixed Rate Mortgage
Mechanics - Prepayment
This extended example raises an interesting
point. The borrower is scheduled to make
payments that are worth, at the current
market rate of 7%, \$227,687.12. The
mortgage contract, however, grants them the
right to pay off that loan at any time by
repaying the balance, which is the
\$191,760.27.
Fixed Rate Mortgage
Mechanics - Prepayment
Thus, by taking out a new loan for
\$191,760.27, at the current market rate (7%)
and used the proceeds to pay off the original
loan, they would increase their wealth by
\$35,926.85.
In essence they would be replacing one
liability worth \$227,687.12 with one worth
\$191,760.27.
Fixed Rate Mortgage
Mechanics - Prepayment
Discounting the remaining payments at the
market rate and comparing that to the
balance allows us to quantify the benefits to
prepaying the loan.
Frequently it is costly to refinance a loan.
Optimally, one will not refinance if the gain
to refinancing is less than the refinancing
costs, i.e. (Value – Balance> Cost of Refi).
Fixed Rate Mortgage
Mechanics - Prepayment
When we talk about the “value” of this loan
to the lender, we have to realize that they
factor in the borrower’s right to “call” the
loan.
In the previous example the “value” of the loan
is not really \$227,687.12 because the lender
knows the borrower is going to prepay it. They
realize the value is probably no more than
\$191,760.27.
Fixed Rate Mortgage
Mechanics - Prepayment
If we denote the value of the promised
payments as “A”, and the value of the call
option as “C”, and any transaction costs of
refinancing as “T”, then the true value of the
mortgage will be:
V = A – (C-T).
Since in the previous example we had no
transaction costs, i.e. T=0, then
\$191,760.27 = 227,687.12 – 35,926.85
Fixed Rate Mortgage
Mechanics - Prepayment
It is useful to examine what happens to the
value of the mortgage if rates changed
instantaneously.
To do this let’s use the same data from our
previous example but assume it will cost the
borrower \$2500 to refinance.
We assume the borrower will only prepay when
it is financially beneficial to do so, i.e. when:
A – Balance – T > 0
Fixed Rate Mortgage
Mechanics - Prepayment
Graphically, the value of A, i.e. the PV of the
remaining payments, (V if you ignore the value
of C), looks like this (to the bank!)
\$450,000.00
\$400,000.00
\$350,000.00
\$300,000.00
\$250,000.00
\$200,000.00
\$150,000.00
\$100,000.00
\$50,000.00
\$0.00
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
Fixed Rate Mortgage
Mechanics - Prepayment
Graphically, the value of C, i.e. value of the
borrower exercising their call option, is given
(again, to the bank!):
\$50,000.00
\$0.00
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
(\$50,000.00)
(\$100,000.00)
(\$150,000.00)
(\$200,000.00)
(\$250,000.00)
Fixed Rate Mortgage
Mechanics - Prepayment
Combining these two shows the value of the mortgage to the
bank (V). Note the spike in value just below the contract rate.
\$300,000.00
\$250,000.00
\$200,000.00
\$150,000.00
\$100,000.00
\$50,000.00
\$0.00
0.06 0.07 0.08 0.09 0.1 0.11 0.12
(\$50,000.00)
(\$100,000.00)
Fixed Rate Mortgage
Mechanics - Prepayment
It may be easier to see this by looking only at graph of V.
\$200,000.00
\$190,000.00
\$180,000.00
\$170,000.00
\$160,000.00
\$150,000.00
\$140,000.00
\$130,000.00
\$120,000.00
\$110,000.00
\$100,000.00
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
Fixed Rate Mortgage
Mechanics – Prepay Penalties
One idea to remember is that banks
understand, and explicitly build into
mortgage rates, the risk of prepayments.
Some borrowers, primarily commercial
borrowers but increasingly residential
borrowers, are willing to contractually agree
not to prepay in order to secure a lower
contract rate.
Fixed Rate Mortgage
Mechanics – Prepay Penalties
A common way for the borrower to signal to
the lender their willingness to forgo the
prepayment option is by accepting a
prepayment penalty.
A prepayment penalty is simply an additional
fee that the borrower agrees to pay, in
addition to the outstanding balance, should
they prepay the loan.
Fixed Rate Mortgage
Mechanics – Prepay Penalties
Frequently these prepayment penalties end
after some specified period of time (5, 10 or
15 years for example).
Some common prepayment penalties include
A flat fee,
A percentage of the outstanding balance,
The sum of the previous six months interest.
Fixed Rate Mortgage
Mechanics – Prepay Penalties
The real effect of the prepayment penalty is
to raise the borrower’s effective interest rate
should they prepay.
Consider the following example.
A borrower takes out a loan for with a contract rate of
10%, a term of 30 years, and an initial balance of
\$100,000. There is a prepayment penalty of 2% of the
outstanding balance if they prepay the loan.
Fixed Rate Mortgage
Mechanics – Prepay Penalties
If the borrower prepays after 5 years, what is
the effective interest rate on the loan?
To determine this we must first determine the
cash flows.
The original payment is simply \$877.57/month.
877.57 100,000*
.10 / 12
1
1
1 .10
360
12
Fixed Rate Mortgage
Mechanics – Prepay Penalties
After 5 years the balance will be 96,574.14.
1
1
1 .10
300
12
96,574.14 877.57 *
.10 / 12
Thus, to pay off the loan the borrower will
have to pay a lump sum of 98,505.63
98,505.63 = 96,574.14 * 1.02
Fixed Rate Mortgage
Mechanics – Prepay Penalties
Thus, to the borrower, the cash flows are:
Positive cash flow of \$100,000 at time 0
60 negative cash flows of \$877.57
One final negative cash flow at month 60 of 98,505.63
Their effective yield is the yield that makes
this equation true, which is 10.30%.
1
1 60
100,000 877.57 *
1 y / 12 98,505.63
y / 12 (1 y / 12)60
Fixed Rate Mortgage
Mechanics – Prepay Penalties
One has to be careful in this analysis,
however. To the borrower making the
decision to prepay at time 60, the previous 59
must be ignored. Where this enters the
borrower’s decision making is at origination.
A borrower that expects to prepay, would opt
not to take out a mortgage with a prepayment
penalty.
Fixed Rate Mortgage
Mechanics – Prepay Penalties
Consider at origination if the borrower suspected
that they would likely prepay within 5 years. If
they were offered two loans, one at a contract
rate of 10% and a 2% prepayment penalty or one
at 10.25% and no prepayment penalty, then they
should select the 10.25% loan.
The reason borrower charge prepayment
penalties is to induce borrower to reveal their
patterns.
Fixed Rate Mortgage
Mechanics - Points
One unusual feature of the mortgage market
related to prepayment penalties is the
practice of charging borrowers “points”.
Technically a point is a fee that the borrower
pays the bank at origination. For each point
charged, the borrower pays one percent of
the initial loan balance to the bank.
Fixed Rate Mortgage
Mechanics - Points
The effect of this, of course, is to reduce the
actual cash received by the borrower.
Thus if a borrower took out a \$100,000 loan, but
was charged 2 points, they would receive
\$100,000 from the bank and then write a check
to the bank for \$2000, making their net proceeds
\$98,000.
Fixed Rate Mortgage
Mechanics - Points
Of course since the borrower only received,
net, \$98,000, at origination, the value of the
mortgage at origination can only be \$98,000.
The payments, however, will be based on the
nominal principal amount of \$100,000. The
only way for the PV of the future payments
to be worth \$98,000, therefore, is to reduce
the contract rate.
Fixed Rate Mortgage
Mechanics - Points
This is, of course, exactly what happens – the
more points you pay, the lower your contract
rate.
Note, however, that the effective interest rate
is not constant, it is a function of when the
loan is paid off.
Fixed Rate Mortgage
Mechanics - Points
To calculate the effective interest rate on a
mortgage with points you must go through
multiple steps:
First, use the contract parameters (i.e. contract
principal, term, and contract rate) to determine
the cash flows.
Second, find the effective yield which equates
the present value of the future cash flows to the
amount of cash (net) received at the closing.
Fixed Rate Mortgage
Mechanics - Points
Again, this may be best illustrated with an
example.
A borrower takes out a loan with a 10% contract
rate, a balance of \$150,000, and 30 year term.
The bank charges two points.
If the borrower never prepays, what is the
effective interest rate on the loan?
Fixed Rate Mortgage
Mechanics - Points
First, determine the actual cash flows
The monthly payment is
\$1,316.36 150,000*
.10 / 12
1
1
1 .10
12
360
Since the borrower does not prepay the loan,
the next step is to determine the yield based
on the cash actually received at the closing.
Fixed Rate Mortgage
Mechanics - Points
Since the bank charges 2 points on a
147,000.
147,000 = 150,000 * (1-.02)
The final step is to determine the yield which
equates the cash received at time 0 with the
present value of the monthly payments.
Fixed Rate Mortgage
Mechanics - Points
That is, determine:
1
1 360
1 y
12
\$147,000 1,316.36*
y / 12
The answer is y = 10.24%
Fixed Rate Mortgage
Mechanics - Points
What would be the yield if the borrower
prepaid after 10 years?
Obviously the time 0 cash and the monthly
payments are the same. The only additional item
we need to know is the balance of the loan after
10 years, which is given by discounting the
remaining payments at the contract rate.
1
1
\$136,407.0 2 1,316.36 *
1 .10
12
240
.10 / 12
Fixed Rate Mortgage
Mechanics - Points
Now we again determine the yield which sets
present value of the future cash flows equal
to the cash received at time 0:
1
1 120
1 y
12
136,407.02
\$147,000 1,316.36*
y / 12 (1 y/12)120
The answer is y=10.33159 %
Fixed Rate Mortgage
Mechanics - Points
The chart below illustrates the effective yield given
the date at which the borrower prepays the loan
35
30
Effective Yield
25
20
15
10
5
0
0 60 120 180 240 300 360
Prepayment Month
Fixed Rate Mortgage
Mechanics - Points
Finally, consider if at origination the
borrower had a choice between two loans.
Loan A is the mortgage with points we just
examined.
Loan B is for \$147,000, at 10.3% and no points.
Which loan should the borrower take?
The answer to that depends upon the borrowers
expectations regarding their tenure in the
mortgage.
Fixed Rate Mortgage
Mechanics - Points
Clearly if the borrower expects to never prepay
the mortgage, they should take loan A, because
the effective rate on the loan will be 10.24%,
well below the 10.3% of loan B.
If, however, the borrower expects to prepay after
10 years (or before), they should take loan B,
since with a 10 year prepayment horizon loan A
has an effective interest rate of 10.33%.
Rate Mortgage
Mechanics – Incremental Cost
The final issue we will examine is the
incremental cost of financing.
Frequently borrowers of equal
creditworthiness will observe different
interest rates for different sized loans. That
is, an 80% loan to value (LTV) mortgage
will have a lower contract rate than a 90%
LTV loan.
Rate Mortgage
Mechanics – Incremental Cost
The question is, what is the effective interest
rate on that differential.
For example in February of 2000, 80% LTV 30
year mortgages had a contract rate of
approximately 8.25% while 95% LTV mortgages
had a contract rate of approximately 8.75%.
If you were a borrower with a \$200,000 house
you could borrow \$160,000 at 8.25% or
\$190,000 at 8.75%.
Rate Mortgage
Mechanics – Incremental Cost
So to borrow the incremental \$30,000 your
overall interest rate goes up by .5%.
One way of looking at this is that you borrowing
the first \$160,000 at 8.25%, and the remaining
\$30,000 at some effective rate. The question is,
what is that effective rate?
To solve this, let’s consider the cash flows.
Rate Mortgage
Mechanics – Incremental Cost
The payments on the 80% and 95% loans are
(respectively)
Payment80% loan 160,000*
.0825 / 12 1,202.02
1
1
1 .0825
12
360
Payment95% loan 190,000*
.0875 / 12 1,494.73
1
1
1 .0875
12
360
Thus there is a \$292.70/month differential
between the two
Rate Mortgage
Mechanics – Incremental Cost
One way to view this is that you are paying
292.70/month to borrow \$30,000 for 30 years. This
implies the following statement must be true:
1
1 360
1 y
12
30,000 292.70 *
y / 12
Solving for y we find that the incremental cost of
financing is: 11.308%.
Rate Mortgage
Mechanics – Incremental Cost
What this means is that if you can borrow
\$30,000 for less than 11.308%, you should take
the 80% LTV loan and then borrow the
remaining funds from that other source. If you
cannot borrow \$30,000 for less than 11.308%,
you should take the 95% loan.
Rate Mortgage
Mechanics – Second Mortgages
It is not at all uncommon for a borrower to take
out two mortgages. The first will typically be for
80 or 90% LTV, with the second mortgage being
for 20%, 10% or 5%.
Occasionally, it will be the case that it is cheaper,
in terms of the effective cost of financing, to take
out an 80% LTV first loan, and then a 10%
second loan, than it would be to take out a single
90% LTV loan.
Rate Mortgage
Mechanics – Second Mortgages
To calculate the effective cost of financing when
there are two mortgages is not particularly
difficult. You first determine each mortgage’s
monthly payments individually, then you
combine their initial balances and monthly
payments and solve for the effective interest rate.
An example may make this easy to see.
Rate Mortgage
Mechanics – Second Mortgages
Example: Bob wishes to buy
a house for \$100,000. He
will put 10% down, take out Pmt1 80,000 *
.055 / 12 454.23
1
an 80% LTV first loan at 1 360
1 .055 / 12
5.5%, and a 10% second
loan at 7%. Each mortgage is .07 / 12
for 30 years. What will be Pmt2 10,000 * 66.53
1
1 360
his total cost of financing if 1 .07 / 12
he keeps each mortgage for
the full 30 year term?
First, let’s calculate each
mortgage payment:
Rate Mortgage
Mechanics – Second Mortgages
Now we can combine the two mortgages, and find the
interest rate that sets the initial balances equal to the
present value of the total monthly payments.
1
1
1 r / 12360
90,000 (520.76) *
(r / 12)
Solving for r, yields :
r 5.67%
Rate Mortgage
Mechanics – Second Mortgages
Notice that the effective interest rate is not simply the
average, or even weighted average of the two
contract rates!!!
You must use the procedure on the previous two slides
to determine the effective interest rate. If you try to
take an arithmetic average of the two contract rates you
This is because the mortgage payment equations are
non-linear due to the exponents in the formulas.
Rate Mortgage
Mechanics – Second Mortgages
Now, what happens if the two mortgages are for
unequal terms?
You simply have to deal with two sets of cash flows.
This means you will have to use your cash flow keys
Money keys, but once you become familiar with that
procedure its not too difficult.
that the second mortgage was only for 10 years.
Rate Mortgage
Mechanics – Second Mortgages
Of course this does not
change the first .055 / 12
Pmt1 80,000 * 454.23
payment, but it does
1
1
360
change the second 1 .055 / 12
payment: .07 / 12
Pmt2 10,000 * 116.11
1
1 120
1 .07 / 12
Rate Mortgage
Mechanics – Second Mortgages
Once again, we find the interest rate that sets the
present value of the payments equal to the combined
balances. Notice that we now have to deal with two
streams of cash flows:
1
1 240
454.23 * 1 r / 12
1 (r / 12)
1
1 r / 12120
90,000 (570.34) *
120
(r / 12) r
1
12
Solving for r, yields :
r 5.57%
Rate Mortgage
Mechanics – Second Mortgages
Note that the second annuity (the 454.23/month one)
starts in 121 months, so using the PVA formula tells us
its value at month 120, so we have to discount that
value back to time 0.
1
1 240
454.23 * 1 r / 12
1 (r / 12)
1
1 r / 12120
90,000 (570.34) *
120
(r / 12) r
1
12
Solving for r, yields :
r 5.57%
Rate Mortgage
Mechanics – Second Mortgages
Its actually pretty easy to do this on your calculator.
Simply use your cash flow keys:
CF0 = -90,000
CF1= 570.34
N1=120
CF2= 454.23
N2=240
And the solve for IRR. Note that you IRR will be in
monthly terms, don’t forget to multiply by 12. You will
lose points if you forget to multiply by 12!
Rate Mortgage
Mechanics – Second Mortgages
What if Bob prepaid both mortgages after 5 years?
Let’s go back to the assumption that Bob had a 30 year
second mortgage. Remember that our two mortgage
payments, then, are: Pmt1=454.23, Pmt2 = 66.53.
We need the balance of each mortgage after 60 months:
1
1 300
Balance 454.23 * 1 .055 / 12 73,968.48
1
.055 / 12
1
1 300
Balance2 66.53 * 1 .07 / 12 9,413.16
.07 / 12
Rate Mortgage
Mechanics – Second Mortgages
So now we can combine all of the cash flows and
determine the effective interest rate:
1
1 60
90 ,000 520 .76 * 1 r / 12 83,381 .64
r / 12 1 r / 12 60
Solving for r yields :
r 5.67%
Notice that you can use your time value of money keys for
this: n=60; PV=90,000; PMT=-520.76; FV=-83,381.64
and solve for r.
Rate Mortgage
Mechanics – Second Mortgages
Finally, what if Bob had only paid off the second mortgage
after 5 years, but had held the first mortgage for the full 30
years?
Again, all we really have to do is lay out the cash flows on a
month by month basis:
1
1
1 r / 12 300
454.23 *
1 r / 12
1
1 r / 1259
90,000 520.76 *
520.76 9413.16
r / 12 1 r / 1260
1 r / 12 60
solving for r yields :
5.569%
Rate Mortgage
Mechanics – Second Mortgages
Again, its easiest to do this using your calculator’s cash
flow keys.
The only real trick is to realize that you get 59 payments of
520.76, then one payment of (520.76+9,413.16) in month
60 when the second mortgage is paid off, followed by 300
payments of 454.23.To enter this do the following:
CF0=-90,000
CF1=520.76 N1=59
CF2=9,933.92 N2=1
CF3=454.23 N3=300 | 10,771 | 30,879 | {"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-2015-14 | longest | en | 0.943225 |
https://ch.mathworks.com/matlabcentral/cody/problems/167-pizza/solutions/570877 | 1,569,269,538,000,000,000 | text/html | crawl-data/CC-MAIN-2019-39/segments/1568514578201.99/warc/CC-MAIN-20190923193125-20190923215125-00448.warc.gz | 412,190,317 | 15,484 | Cody
# Problem 167. Pizza!
Solution 570877
Submitted on 31 Jan 2015 by Sandy Rogers
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
%% z = 1; a = 1; v_correct = pi; assert(isequal(pizza(z,a),v_correct))
2 Pass
%% z = 2; a = 1; v_correct = 4*pi; assert(isequal(pizza(z,a),v_correct))
3 Pass
%% z = 1; a = 2; v_correct = 2*pi; assert(isequal(pizza(z,a),v_correct))
4 Pass
%% z = 1; a = 2; v_correct = 2*pi; assert(isequal(pizza(z,a),v_correct)) | 196 | 574 | {"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-2019-39 | latest | en | 0.564704 |
https://1lab.dev/Cat.Functor.Adjoint.Compose.html | 1,685,316,074,000,000,000 | text/html | crawl-data/CC-MAIN-2023-23/segments/1685224644571.22/warc/CC-MAIN-20230528214404-20230529004404-00285.warc.gz | 99,455,464 | 10,098 | {-# OPTIONS --lossy-unification #-}
open import Cat.Prelude
import Cat.Reasoning
module Cat.Functor.Adjoint.Compose
# Composition of adjunctionsπ
Suppose we have four functors $F \dashv G$ and $L \dashv R$, such that they βfit togetherβ, i.e.Β the composites $LF$ and $GR$ both exist. What can we say about their composites? The hope is that they would again be adjoints, and this is indeed the case.
We prove this here by explicitly exhibiting the adjunction natural transformations and the triangle identities, which is definitely suboptimal for readability, but is the most efficient choice in terms of the resulting Agda program.
{o β oβ ββ oβ ββ}
{A : Precategory o β} {B : Precategory oβ ββ}
{C : Precategory oβ ββ}
{F : Functor A B} {G : Functor B A}
{L : Functor B C} {R : Functor C B}
(Fβ£G : F β£ G)
(Lβ£R : L β£ R)
where
private
module fg = _β£_ Fβ£G
module lr = _β£_ Lβ£R
module A = Cat.Reasoning A
module B = Cat.Reasoning B
module C = Cat.Reasoning C
module F = Functor F
module G = Functor G
module L = Functor L
module R = Functor R
open _β£_
open _=>_
module LF = Functor (L Fβ F)
module GR = Functor (G Fβ R)
LFβ£GR : (L Fβ F) β£ (G Fβ R)
LFβ£GR .unit .Ξ· x = G.β (lr.unit.Ξ· _) A.β fg.unit.Ξ· _
LFβ£GR .counit .Ξ· x = lr.counit.Ξ΅ _ C.β L.β (fg.counit.Ξ΅ _)
LFβ£GR .unit .is-natural x y f = path where abstract
path : LFβ£GR .unit .Ξ· y A.β f β‘ GR.β (LF.β f) A.β LFβ£GR .unit .Ξ· x
path =
(G.β (lr.unit.Ξ· _) A.β fg.unit.Ξ· _) A.β f β‘β¨ A.pullr (fg.unit.is-natural _ _ _) β©β‘
G.β (lr.unit.Ξ· _) A.β G.β (F.β f) A.β fg.unit.Ξ· _ β‘β¨ A.pulll (sym (G.F-β _ _)) β©β‘
G.β β lr.unit.Ξ· _ B.β F.β f β A.β fg.unit.Ξ· _ β‘β¨ ap! (lr.unit.is-natural _ _ _) β©β‘
G.β (R.β (L.β (F.β f)) B.β lr.unit .Ξ· _) A.β fg.unit.Ξ· _ β‘β¨ A.pushl (G.F-β _ _) β©β‘
GR.β (LF.β f) A.β G.β (lr.unit.Ξ· _) A.β (fg.unit.Ξ· _) β
LFβ£GR .counit .is-natural x y f = path where abstract
path : LFβ£GR .counit .Ξ· y C.β LF.β (GR.β f) β‘ f C.β LFβ£GR .counit .Ξ· x
path =
(lr.counit.Ξ΅ _ C.β L.β (fg.counit.Ξ΅ _)) C.β LF.β (GR.β f) β‘β¨ C.pullr (sym (L.F-β _ _)) β©β‘
lr.counit.Ξ΅ _ C.β L.β β fg.counit.Ξ΅ _ B.β F.β (GR.β f) β β‘β¨ ap! (fg.counit.is-natural _ _ _) β©β‘
lr.counit.Ξ΅ _ C.β β L.β (R.Fβ f B.β fg.counit.Ξ΅ _) β β‘β¨ ap! (L.F-β _ _) β©β‘
lr.counit.Ξ΅ _ C.β L.β (R.Fβ f) C.β L.β (fg.counit.Ξ΅ _) β‘β¨ C.extendl (lr.counit.is-natural _ _ _) β©β‘
f C.β lr.counit.Ξ΅ _ C.β L.β (fg.counit.Ξ΅ _) β
LFβ£GR .zig =
(lr.counit.Ξ΅ _ C.β L.β (fg.counit.Ξ΅ _)) C.β β LF.β (G.β (lr.unit.Ξ· _) A.β fg.unit.Ξ· _) β β‘β¨ ap! (LF.F-β _ _) β©β‘
(lr.counit.Ξ΅ _ C.β L.β (fg.counit.Ξ΅ _)) C.β LF.β (G.β (lr.unit.Ξ· _)) C.β LF.β (fg.unit.Ξ· _) β‘β¨ cat! C β©β‘
lr.counit.Ξ΅ _ C.β (β L.β (fg.counit.Ξ΅ _) C.β LF.β (G.β (lr.unit.Ξ· _)) β C.β LF.β (fg.unit.Ξ· _)) β‘β¨ ap! (sym (L.F-β _ _) Β·Β· ap L.β (fg.counit.is-natural _ _ _) Β·Β· L.F-β _ _) β©β‘
lr.counit.Ξ΅ _ C.β (L.β (lr.unit.Ξ· _) C.β L.β (fg.counit.Ξ΅ _)) C.β LF.β (fg.unit.Ξ· _) β‘β¨ cat! C β©β‘
(lr.counit.Ξ΅ _ C.β L.β (lr.unit.Ξ· _)) C.β (L.β (fg.counit.Ξ΅ _) C.β LF.β (fg.unit.Ξ· _)) β‘β¨ apβ C._β_ lr.zig (sym (L.F-β _ _) β ap L.β fg.zig β L.F-id) β©β‘
C.id C.β C.id β‘β¨ C.eliml refl β©β‘
C.id β
LFβ£GR .zag =
GR.β (lr.counit.Ξ΅ _ C.β L.β (fg.counit.Ξ΅ _)) A.β G.β (lr.unit.Ξ· _) A.β fg.unit .Ξ· _ β‘β¨ A.pulll (sym (G.F-β _ _)) β©β‘
G.β β R.β (lr.counit.Ξ΅ _ C.β L.β (fg.counit.Ξ΅ _)) B.β lr.unit.Ξ· _ β A.β fg.unit .Ξ· _ β‘Λβ¨ apΒ‘ (B.pulll (sym (R.F-β _ _))) β©β‘Λ
G.β (R.β (lr.counit.Ξ΅ _) B.β β R.β (L.β (fg.counit.Ξ΅ _)) B.β lr.unit.Ξ· _ β) A.β fg.unit .Ξ· _ β‘Λβ¨ apΒ‘ (lr.unit.is-natural _ _ _) β©β‘Λ
G.β (β R.β (lr.counit.Ξ΅ _) B.β lr.unit.Ξ· _ B.β fg.counit.Ξ΅ _ β) A.β fg.unit .Ξ· _ β‘β¨ ap! (B.cancell lr.zag) β©β‘
G.β (fg.counit.Ξ΅ _) A.β fg.unit .Ξ· _ β‘β¨ fg.zag β©β‘
A.id β | 2,328 | 4,664 | {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 4, "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.890625 | 3 | CC-MAIN-2023-23 | longest | en | 0.492195 |
http://www.acarlstein.com/?tag=sieve | 1,527,086,899,000,000,000 | text/html | crawl-data/CC-MAIN-2018-22/segments/1526794865679.51/warc/CC-MAIN-20180523141759-20180523161759-00256.warc.gz | 321,707,813 | 16,614 | ## Example Generating Prime Numbers using Sieve of Eratosthenes Algorithm
Example of how to generate prime numbers using Sieve of Eratosthenes algorithm.
NOTIFICATION: These examples are provided for educational purposes. Using this code is under your own responsibility and risk. The code is given ‘as is’. I do not take responsibilities of how they are used.
primes.cpp:
#include<iostream>
#include<vector>
#include<stdio.h>
#include<ctime>
#include<math.h>
#include<string.h>
using namespace std;
//
// generatePrimesSlow()
// The array arr store the prime numbers up to and including x
// To test if a number i is prime, see if any prime number
// before i divides i evenly. If no prime number does, i is prime
// and is added to our array of prime numbers.
// Note: We should never see a number less than 2 in our array!
//
void generatePrimesSlow(int x, int * arr, int * amount)
{
int count = 0; // numbers currently in the array
for(int i=2; i<=x; i++) {
bool isPrime = true;
for (int j=0; j<count; j++) {
if (i % arr[j] == 0) {
isPrime = false;
break;
}
}
if (isPrime) {
arr[count] = i;
count++;
}
}
*amount = count;
}
//
// generatePrimesFast()
// The array arr stores our prime numbers up to and including x
// To generate these numbers, we use the the Sieve of Eratosthenes
// Visit http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
// for the explanation of the algorithm.
//
void generatePrimesFast(int x, int * arr, int * amount)
{
int num = 2;
int count = 0;
bool *boolArr = new bool[x+1];
//bool boolArr[x];
memset(boolArr, true, (x+1)*sizeof(bool));
for(int i=2; i<=x; i++) {
if (boolArr[i]) {
arr[count] = i;
count++;
int temp = i+i;
while (temp <= x) {
boolArr[temp] = false;
temp += i;
}
}
}
*amount = count;
}
int main() {
cout << 'Up to what number would you like to generate primes? ';
int max;
cin >> max;
cout << endl;
// This will be our array to hold the prime numbers.
// Notice that this is probably way too much memory, since not every
// number up to max will be prime
// In fact, very very few numbers will be, let's try to free up some
// memory by using some math
// I think a bound for the number of primes up to N is N/lg(N)
// Let's try it
int amount = 0;
int num_primes;
if (max > 150) {
double x = max;
double actualNumberOfPrimes = x/(log(x)-4);
//double actualNumberOfPrimes = x/(log(x));
num_primes = (int) actualNumberOfPrimes;
}
else
num_primes = max;
int arr[num_primes+1];
memset(arr,0,sizeof(arr));
//generatePrimesFast(max, arr, &amount);
generatePrimesSlow(max, arr, &amount);
cout << 'Here are the prime numbers from 2 to ' << max << endl;
for (int i=0; i < amount; i++) {
cout << arr[i] << endl;
}
}
If you encounter any problems or errors, please let me know by providing an example of the code, input, output, and an explanation. Thanks.
## Code Examples in C++
Here are some code examples written in C++
Even do they are written in C++, I would advice to compile them in Linux as I did. If you encounter any problems or errors, please let me know by providing an example of the code, input, output, and an explanation. Thanks
NOTIFICATION: These examples are provided for educational purposes. Using this code is under your own responsibility and risk. I do not take responsibilities of how they are used. | 890 | 3,274 | {"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.34375 | 3 | CC-MAIN-2018-22 | latest | en | 0.537131 |
https://www.jiskha.com/display.cgi?id=1265853248 | 1,503,517,377,000,000,000 | text/html | crawl-data/CC-MAIN-2017-34/segments/1502886123359.11/warc/CC-MAIN-20170823190745-20170823210745-00455.warc.gz | 927,184,153 | 4,751 | # math
posted by .
Hello,
Here is a question with something i've never heard of.
These are the first two stages of a fractal known as the Sierpinski carpet. The carpet begins with a square (stage 1). The square is cut into 9 congruent squares and the middle square is removed (stage 2).
Draw stage 3 using the method described to get from stage 1 to stage 2.
To the nearest whole percent, what percent of the original square remains in stage 3? Show your work and explain your answer.
• math -
ok, I realize that I should cut each remaining square into 9 quadrants leaving the middle open of each of them.
Now, I just don't know how to get the percent of the original square that remains in stage 3.
• math -
In stage one say the square is 9 units by 9 units thus 81 square units in area.
Then we cut it into 9 units each 3 units by three units so each 9 square units in area. We remove one so we only have 8 left each 9 square units in area.
Now for stage 3 we split each of those 8 squares into 9 squares each one unit by one unit or one unit square. We now divide one of those 1 by 1 squares into 9 squares each 1/3 by 1/3 so we can remove the middle one. The area left is 1 minus the middle which is 1/3*1/3 = 1/9 so it is 8/9
so we started with a square of 9 by 9 or 81 square units and now we have a little square with area of 8/9 square units so
(8/9)/81 is the ratio of area of one of the final little carpets to the original carpet.
• math -
Remember you have 8 of those little carpets.
• math -
This might help, nice drawing of it.
## Similar Questions
1. ### math
Ok The Galtins are buying a carpet for their home. They need about 1,175 square feet of carpet. The carpet they buy is sold by the square feet. What is the estimate of number of yards the Galtins need for thier home?
2. ### math
A simple fractal tree Grows in stages. A each new stage, two new line segments branch out from each segment at the top of the tree. The first five stages are shown. How many line segments need to be drawn to create stage 20?
3. ### Math
Carpet plus installs carpet for \$100 plus \$8 per square yard of carpet. Carpet World charges \$75 for installation and \$10 per square yard of carpet. Find the number of square yards of carpet for which the cost including carpet and …
4. ### Math
Mr. Carpenter sent his wife to the store to buy 200 square feet (A) of carpet, but he forgot to tell her the length (L) and width (W) of the carpet (A=L*W). How many different sizes of carpet can she get and still have 200 square feet …
5. ### geometry
you plan to carpet 468ft of space. carpet costs \$26.75 per square yard and the tax is 7%. the carpet is sold in 12 ft rolls. what is the cost of the carpet?
6. ### Math
LeAnn is a carpet layer. She has agreed to carpet a house for \$18 per square yard. The carpet will cost her \$11 per square yard, and she knows that there is approximately 12% waste in cutting and matching. If she plans to make a profit …
7. ### math
4. Suppose your living room is a rectangle measuring 13 feet by 21 feet and it needs new carpet. How much carpet do you need in square yards and how much would your cost be if it is sold at \$21 per square yard?
8. ### maths
The Park's are buying new carpet for their house.They need about 1,175 square feet of carpet.The carpet they buy is sold by the square yard. Estimate the number of square yards of carpet the Parks need for their house. Show your work.
9. ### math
A piece of carpet is 8 feet wide and 12 feet long. The carpet needs to be reduced by a scale factor so that the reduced carpet is 2 feet wide. What is the area of the reduced carpet?
10. ### math
Each side of a square classroom is 9 yards long. The school wants to replace the carpet in the classroom with new carpet that costs \$88.02 per square yard. How much will the new carpet cost?
More Similar Questions | 976 | 3,878 | {"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.34375 | 4 | CC-MAIN-2017-34 | latest | en | 0.952114 |
http://www.markedbyteachers.com/gcse/science/an-investigation-to-show-the-correlation-between-the-number-of-different-species-found-and-the-b-m-w-p-score-of-the-environment.html | 1,501,052,053,000,000,000 | text/html | crawl-data/CC-MAIN-2017-30/segments/1500549426050.2/warc/CC-MAIN-20170726062224-20170726082224-00502.warc.gz | 492,673,595 | 19,915 | • 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
# An investigation to show the correlation between the number of different species found, and the B.M.W.P score of the environment.
Extracts from this document...
Introduction
Matthew Stone Introduction For an explanation on BMWP, refer to appendix 1. For background information on Osmington Bay, refer to appendix 2 Plan Hypothesis "The BMWP score will increase with the number of species found." This is because the larger the number of species, the more BMWP score there will be for the sample. With correlation to the environment, species that have a higher affinity for oxygen have a higher BMWP score. Therefore, if there is only one species in a riffle (a highly aerated and fast flowing part of the river, meaning high amounts of oxygen dissolved and low amounts of organic pollution), the BMWP score of the area will be higher than that of a pool (stagnant, little aeration, and large amounts of organic pollution (eutrification of the organic pollution causes low oxygen content)) with many species: Environment BMWP Score High aeration, high number of species High High aeration, few number of species Medium Low aeration, large number of species Medium Low aeration, few number of species Low Statistical Support Because I am trying to show the relationship between to different pieces of data, I will use the Spearman's Rank Co-efficient. Statistically, this will show whether the number of species found is significantly correlated to the BMWP score. I will therefore need to collect over 12 sets of data to make statistically analysing the data productive. ...read more.
Middle
* Wear appropriate clothing to be safe in river (stay dry, wont slip over on the bed), on road (so vehicles can see you). Results site number 1.1 1.2 Riffle/Pool Riffle Pool Description Bottom mill Width (M) 3.45 4.1 Depth Spacing (M) 0.86 1.03 depth1 (M) 0.16 0.15 depth2 (M) 0.17 0.21 depth3 (M) 0.15 0.19 dissolved oxygen (mg/l) 6.50 6.4 Velocity (M per Sec) 0.46 0.31 pH 7.50 7.5 Temp (�C) 10.2 10.2 Average sediment size (cm) 7.56 1.18 Number of species 6 5 BMWP Score 29.5 20 site number 2.1 2.2 Riffle/Pool Riffle Pool Description Width (M) 9.570 3.663 Depth Spacing (M) 2.390 0.910 depth1 (M) 0.280 0.230 depth2 (M) 0.110 0.250 depth3 (M) 0.130 0.210 dissolved oxygen (mg/l) 5.600 6.200 Velocity (M per Sec) 0.348 0.170 pH 7.500 7.500 Temp (�C) 10.500 10.220 Average sediment size (cm) 3.62 2.08 Number of Species 6 3 BMWP Score 24.5 18.5 site number 3.1 3.2 Riffle/Pool Riffle Pool Description Width (M) 5.50 5.30 Depth Spacing (M) 1.38 1.33 depth1 (M) 0.08 0.24 depth2 (M) 0.19 0.21 depth3 (M) 0.08 0.14 dissolved oxygen (mg/l) 4.80 4.40 Velocity (M per Sec) 0.53 0.14 pH 7.50 7.50 Temp (�C) 10.20 10.50 Average sediment size (cm) 6.36 9.00 Number of species 4 8 BMWP Score 15 25 site number 4.1 4.2 Riffle/Pool Riffle Pool Description Width (M) 5.42 5.42 Depth Spacing (M) 1.36 1.36 depth1 (M) ...read more.
Conclusion
Overall I have found many more species in the pools than in the riffles. I am convinced this is because pools have more sediment to kick up, so therefore I am more likely to pick up species. I have only been able to collect up to 6 species at a time. I cannot have collected all species that were present in the river, so the BMWP score that I have collected cannot be true. This makes my results extremely unreliable. The conditions of the river are not true for other rivers; in that there seems to be little diversity present. Although I found this on my pilot experiment, it was impossible to select another river to study to compare my results to. Limitations of methods Due to the tentative nature of this small experiment, there are several large errors that could occur with methods used. For example: kick sampling, as a method is very inaccurate. It is very hard to replicate same results each time such as the same number of kicks, kicking up the same amount of sediment each time, kicking with the same strength each time, kicking all sediment into the sweep net etc. The method used to calculate the velocity is very inaccurate. The red dye travelling the river was only "judged" to have crossed the meter rule. It was also impossible to place the dye in the same part of the river, other methods such as dropping an orange in the river along a meter rule proved no more accurate. Matthew Stone Page 12 of 12 ...read more.
The above preview is unformatted text
This student written piece of work is one of many that can be found in our GCSE Living Things in their Environment 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 Living Things in their Environment essays
1. ## Research question - Is using dogs for work ethical?
5 star(s)
Any jobs/activities that you think exploit dogs too much? 1. Dog racing 2.Circus & Dog racing 3.Race & hunting 4.Dog fighting 5.Sleigh pulling How do they exploit dogs? 1.Used for race & gambling 2. Not ethical for Dogs 3. Tires the Dog out 4.
2. ## An experiment to investigate the species diversity in non-trampled and trampled areas.
4 star(s)
There could be some plants that are irritating and so gloves should be worn whilst performing the investigation. I should try to avoid working in slippery areas. However, if forced to do so, I should take my time. The tape measure may move, resulting in the wrong area being investigated
1. ## An Investigation into a Woodlice's Preferred Choice of Environment.
3 star(s)
the woodlice are in the dark/wet environment, thus supporting my hypothesis that woodlice prefer a more dark and damp environment. EVALUATION As you can see, I had to amend my experiment, as I had not taken everything into account. After setting up most of my apparatus and collecting in my
2. ## The comparison of bacterial content in a range of milks.
the sugar lactose, which is the main source of nutrients etc for the bacteria present in milk to use to grow. The agar must be kept in a tightly closed jar, away from bright light. There are no problems with handling the agar.
1. ## Branded Bleach is more effective at killing E. coli than Non branded bleach - ...
Immediately after close the agar lid. 7) Repeat stage six for each Petri dish, placing the lid back onto the vial when it is not in use. Heat the tip of the vial and use the plunger on the micropipette to put the disposable plastic tip in virkron disinfectant before ending this stage.
2. ## What sorts of species become 'invasive aliens' in a world of climatic change?
A considerable body of literature has developed concerning the invasion and colonization process, yet it remains difficult to predict which species will become invasive (Mooney & Hobbs, 2000). However, there are a number of life history traits which can influence evolution, adaptation, population growth and population dynamics and thereby contribute
1. ## Extinction of Species Writing Assignment - The Hawaiian Hoary Bat.
Ultimate causes are environmental threats that caused the endangerment in the first place. They are explanations that address the historical and evolutionary reasons why organisms respond as they do to their immediate environment. Examples are DDT (and other pesticides), habitat loss, and the introduction of an exotic species.
2. ## Investigation of Ecology on Four Sites on the River Nar
The water is shallow and fast flowing. The water will contain low amounts of phosphates and nitrates because the surrounding fields under go low intensity farming. The variable that will be taken into account include the flow rate, depth of water, amount of nitrates, phosphates, ammonia present in the water, the temperature, the amount of pollution from the surrounding areas, biological oxygen demand and the pH.
• Over 160,000 pieces
of student written work
• Annotated by
experienced teachers
• Ideas and feedback to | 2,134 | 8,285 | {"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-2017-30 | longest | en | 0.884043 |
https://engineering.stackexchange.com/questions/54675/overweight-construction-equipment-for-weight-restricted-plaza | 1,685,336,147,000,000,000 | text/html | crawl-data/CC-MAIN-2023-23/segments/1685224644683.18/warc/CC-MAIN-20230529042138-20230529072138-00153.warc.gz | 274,426,582 | 38,308 | # Overweight construction equipment for weight restricted plaza
We have to use our equipment on a elevated plaza that has a weight restriction of 2,400 lbs. per sq. ft. Each tire (4 total) carries a weight of 10,050 lbs. (1/4 of the gross weight of machine 40,200 lbs.)Each tire has a foot print of 2.1875 sq. ft. which equates to 4,594.29 lbs. per square feet. The weight is distributed equally to all 4 tires. We are considering using 4' x 10' 1"thick steel deck to disperse the weight. There would only be 2 tires at any time on each piece of steel. Is there a calculation to determine what the weight of the 2 tires (20,100 lbs.)over the steel deck would be dispersed at per square foot?
• What equipment? be specific. What make and model, and what are you doing with it? Mar 28 at 23:44
• And what is an elevated plaza? Got any pictures? Mar 28 at 23:46
• Use lighter equipment. Mar 29 at 5:32
• Could you describe the plaza more? I'm imagining stone slabs supported by pedestals at their corners to elevate them above a drainage space, like this one near my office that is frequently damaged by contractors on lift equipment. Mar 29 at 19:48 | 302 | 1,149 | {"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.015625 | 3 | CC-MAIN-2023-23 | latest | en | 0.950595 |
https://pypi.org/project/leafy/ | 1,620,299,350,000,000,000 | text/html | crawl-data/CC-MAIN-2021-21/segments/1620243988753.91/warc/CC-MAIN-20210506083716-20210506113716-00465.warc.gz | 493,329,323 | 11,950 | Another fast graph algorithms library
# Leafy Graph Library
Leafy is a python graph library written in cython. This mix gives the speed of writing the library in c with the benefit of python bindings.
## Usage
### Graph Objects
Leafy supports two types of graphs: Dense and Sparse. These are represented by the classes `leafy.graph.Graph` and `leafy.graph.SparseGraph`.
To instantiate a graph object we need to know the number of nodes (verticies) in the graph, and if the graph is directed. Graphs defualt to undirected.
```>>> from leafy.graph import Graph
>>> from pprint import pprint
>>> g = Graph(4)
>>> pprint(g.matrix)
[[1000001.0, 1.0, 1000001.0, 1000001.0],
[1.0, 1000001.0, 1.0, 1000001.0],
[1000001.0, 1.0, 1000001.0, 1.0],
[1000001.0, 1000001.0, 1.0, 1000001.0]]
```
the same edges can be defined as a directed `SparseGraph`
```>>> from leafy.graph import SparseGraph
>>> g = SparseGraph(4, True)
>>> g.list
[[1], [], [3, 1], []]
```
### Search
Leafy can run Depth First Search (DFS) and Breadth First Search (BFS) on a graph and return the graph search properties.
To run a search we need to define the graph to search and the node to start from. Before you can view the properties we must call `.run()`.
```>>> from leafy.search import DFS
>>> graph = small_graph(request.param)
>>> dfs = DFS(graph, 0)
>>> dfs.run()
>>> dfs.simple_path(12)
[0, 1, 2, 11, 12]
>>> dfs.bridges
[(1, 3), (3, 4), (3, 5), (2, 11), (11, 12)]
```
### Digraphs
For diagraphs leafy supports DFS which can be imported from `leafy.digraph`
```>>> from leafy.digraph import DFS
>>> dag = small_dag()
>>> dfs = DFS(dag, 0)
>>> dfs.run()
>>> dfs.is_dag
True
>>> dfs.topological_order()
[0, 6, 2, 3, 5, 4, 9, 11, 12, 10, 1]
```
### Shortest Distance
For network shortest path leafy supports single source Dijkstra which can be imported from `leafy.shortest_path`
```>>> from leafy.shortest_path import Dijkstra
>>> dag = small_network()
>>> dij = Dijkstra(dag, 0)
>>> dij.run()
>>> dij.path(3)
[3, 7, 2, 1, 0]
``` | 641 | 2,015 | {"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.09375 | 3 | CC-MAIN-2021-21 | latest | en | 0.772267 |
https://blog.csdn.net/mengxiang000000/article/details/51126286 | 1,529,950,795,000,000,000 | text/html | crawl-data/CC-MAIN-2018-26/segments/1529267868237.89/warc/CC-MAIN-20180625170045-20180625190045-00350.warc.gz | 550,861,662 | 13,158 | 0.0
# FOJ/FZU/FZOJ 1550Monetary System【记忆化搜索】
Problem 1500 Monetary System
## Problem Description
In Byteland they have a very strange monetary system.
Each Bytelandian gold coin has an integer number written on it. A coin n can be exchanged in a bank into three coins: n/2, n/3 and n/4. But these numbers are all rounded down (the banks have to make a profit).
You can also sell Bytelandian coins for American dollars. The exchange rate is 1:1. But you can not buy Bytelandian coins.
You have one gold coin. What is the maximum amount of American dollars you can get for it?
## Input
The input will contain several test cases (not more than 10). Each testcase is a single line with a number n, 0 <= n <= 1000000000. It is the number written on your coin.
## Output
For each test case output a single line, containing the maximum amount of American dollars you can make.
12
2
13
2
## Source
FOJ月赛-2007年5月
n=12 当n只换一次为: 6 4 3的时候就比价值12大1为13,当然6也可以继续向下兑换,但是因为我们是举例,就不向下分了。
AC代码:
#include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;
#define ll __int64
ll output;
ll dp[1000000];//只处理10^6以下的数据记忆化,其实数据越小,越需要记忆化,反而值越大,越不需要记忆化,10^6足够了。
ll dfs(ll now)
{
if(now==0)return 0;
if(now<=1000000)
{
if(dp[now]!=0)return dp[now];
else
{
dp[now]=max(now,dfs(now/2)+dfs(now/3)+dfs(now/4));
return dp[now];
}
}
else
{
return max(now,dfs(now/2)+dfs(now/3)+dfs(now/4));
}
}
int main()
{
ll n;
while(~scanf("%I64d",&n))
{
memset(dp,0,sizeof(dp));
output=dfs(n);
printf("%I64d\n",output);
}
}
#### FZU ACM 题目分类(转自某位大神的博客)
2016-03-06 21:07:27
#### FZU FOJ 2030 括号问题【dp】||【暴搜+栈判断括号匹配】
2016-04-06 21:36:29
#### FOJ Problem 1004 Number Triangle
2016-01-14 14:46:38
#### fzu 2277 Change [第八届福建省大学生程序设计竞赛 Problem F] [线段树]
2017-07-23 15:42:42
#### FZU 1506 堆箱子
2009-12-13 14:57:00
#### 福州大学第十四届程序设计竞赛_重现赛
2017-07-19 18:06:16
#### FZOJ刷题顺序
2016-01-24 18:09:25
#### FZOJ Problem 2183 简单题
2015-03-23 22:53:11
#### FOJ2214 Knapsack problem(逆01背包)
2017-11-26 00:17:04
#### FOJ 题目分类
2009-07-30 00:06:00 | 792 | 2,030 | {"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.203125 | 3 | CC-MAIN-2018-26 | latest | en | 0.440077 |
https://math.stackexchange.com/users/425481/mabud-ali?tab=topactivity | 1,603,418,442,000,000,000 | text/html | crawl-data/CC-MAIN-2020-45/segments/1603107880519.12/warc/CC-MAIN-20201023014545-20201023044545-00192.warc.gz | 419,020,075 | 24,956 | Mabud Ali
### Questions (634)
10 basic difference between canonical isomorphism and isomorphims 7 What is the most common and appropriate definition of tensor? [closed] 5 Can we expand “induction principle” to a partial order $(X, \leq)$? 5 Show that $\mathbb{Q}_3(i)$ is an unramified extension 5 Show that $h(x)=\max \{f(x,y) : y \in [0,1] \}$ is continuous
### Reputation (6,151)
+25 Find the argument of $z = {\left( {2 + i} \right)^{3i}}$ +15 Geometry of $GL_n(F)$ inside $M_n(F)$ +10 Draw a 3-dimensional vector $v$ by an arrow and show where to find all $w$'s satisfying $v \cdot w<0$ +10 what is the basic difference between an algebra over a field and a vector space over a field?
5 Where does $\pi^2$ appear spontaneously within Physical Phenomenon and Mathematics Equations? 5 If an $R$-module $M \cong M \oplus M$ then if $S=\operatorname{Hom}_R(M,M)$ we have $S \cong S \oplus S$ 3 What is the center of $End_A(S)$? 2 Difference between permutation and combination 2 Let $M$ be a a left module over the algebra of formal power series, $K=\mathbb{C}[[h]]$
### Tags (244)
18 abstract-algebra × 59 5 pi 8 ring-theory × 5 5 soft-question 7 modules × 6 5 big-list 5 geometry × 7 4 group-theory × 15 5 proof-verification × 7 4 permutations × 5
### Bookmarks (469)
150 Is there another simpler method to solve this elementary school math problem? 100 Is this continuous analogue to the AM–GM inequality true? 67 Why do engineers use derivatives in discontinuous functions? Is it correct? 62 Is it possible to find an infinite set of points in the plane where the distance between any pair is rational? 61 Is there any geometrical intuition for the factorials in Taylor expansions? | 492 | 1,702 | {"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.640625 | 3 | CC-MAIN-2020-45 | latest | en | 0.792112 |
https://www.enotes.com/homework-help/solve-g-h-j-thank-you-help-445800 | 1,521,548,518,000,000,000 | text/html | crawl-data/CC-MAIN-2018-13/segments/1521257647406.46/warc/CC-MAIN-20180320111412-20180320131412-00248.warc.gz | 775,607,166 | 10,007 | # Solve for g, h, i and j. Thank you for the help
Images:
This image has been Flagged as inappropriate Click to unflag
Image (1 of 1)
embizze | Certified Educator
(g) g is an acute angle of a right triangle with the leg adjacent to g 10 and the hypotenuse 20.
Since the leg is 1/2 of the hypotenuse, the triangle is a 30-60-90 right triangle. The angle opposite the shorter leg (1/2 the hypotenuse) is `30^@` while the angle opposite the longer leg is `60^@` .
`g=60^@`
(h) In the same triangle, h is the longer leg. The sides of the triangle are in the proportion `1:sqrt(3):2` . So h is `sqrt(3)` times the short leg.
`h=10sqrt(3)`
(i) We have a 45-45-90 right triangle (isosceles) with hypotenuse `sqrt(6)` and i is the length of a leg.
You can use the Pythagorean theorem `i^2+i^2=(sqrt(6))^2 ==> 2i^2=6==>i^2=3 ==> i=sqrt(3)`
or you can use the shortcut that the length of a leg is the length of the hypotenuse divided by `sqrt(2)` : `i=sqrt(6)/sqrt(2)=sqrt(3)` .
`i=sqrt(3)`
(j) We have a 30-60-90 right triangle with `i=sqrt(3)` opposite the 30 degree angle and j opposite the 60 degree angle.
The length of the longer leg is the length of the shorter leg times `sqrt(3)` . Thus `j=sqrt(3)sqrt(3)=3`
`j=3` | 404 | 1,225 | {"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.28125 | 4 | CC-MAIN-2018-13 | latest | en | 0.801867 |
http://www.javaprogrammingforums.com/%20loops-control-statements/12895-dual-loop-methods-printingthethread.html | 1,516,196,474,000,000,000 | text/html | crawl-data/CC-MAIN-2018-05/segments/1516084886939.10/warc/CC-MAIN-20180117122304-20180117142304-00053.warc.gz | 468,214,636 | 3,179 | # A Dual loop and methods
• December 8th, 2011, 09:40 PM
rarman
A Dual loop and methods
Hi all,
Im getting to grips with some java but having trouble with this loop. I'll explain it just so we're on the same page :)
im trying to create a loop whereby the time and velocity change each time. I have all the classes and methods necessary and compile up to this loop.
By this i mean, i have the user to ask how many data points they wish to consider (excluding zero as a data point)
i do this by
Code :
```double m = input.nextDouble(); double step = t/m;```
In normal words time is divided by the number of data points hence this is ideal in the loop to us j+=step rather than say 1, 2, 3, 4... which restricts user ability and freedom.
Now, because of the physics (don't worry - simple stuff), the velocity is going to change at each time step. I.e. initial values the user enters e.g. at t = 0, v = (1,0,0)
Again don't worry about the vector, i have solved that part in terms of print, display and so forth.
But how should i do this loop? Here was an attempt which failed:
Code :
```for(double j = 0; j < v; j+=step)/**needs two loops i.e. begins with t=0, u=v (in this case), then t = step, u = old vf, then t = 2step, u = (new)old vf ...*/ { fetch.calcVelocityf(v, g, t); v = fetch.getVelocityf(v, g, t); System.out.print(v.returnString() + "\t"); for (double i = 0; i < t; i+=step) { System.out.print(t); } } }```
In reality terms i want it to give me the velocity and time at each step (data point, user entry see above) and have it sent to print.
I believe the time approach is fine, but unsure on the velocity, v as it is a vector hence j < v means nothing as one is double and the other Vector clas assigned.
Ps don't worry about g, that is the acceleration - also needed!
Note:
fetch is from:
Vector fetch = Vector(); [This is the class i use to make them as vectors, print as vectors via returnString etc]
velocityf is simly final velocity which in this case is changing up until we get the correct number of data points.
If you feel like i could be more informative let me know :)
• December 11th, 2011, 06:40 AM
Freaky Chris
Re: A Dual loop and methods
Welcome rarman,
Excellent first post, thank you for actually making it so!
Now if I understand your question correctly you are trying to figure out what your conditional statement for your first for loop is, you are going to require a finishing point, which unless I missed you don't seem to have defined, thise could be a t value or a velocity value.
Chris | 661 | 2,542 | {"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-05 | longest | en | 0.924486 |
https://calories-info.com/corn-bread-calories-kcal/ | 1,653,780,961,000,000,000 | text/html | crawl-data/CC-MAIN-2022-21/segments/1652663021405.92/warc/CC-MAIN-20220528220030-20220529010030-00712.warc.gz | 211,411,528 | 56,659 | # Cornbread: Calories and Nutrition Analyse
## How many calories in cornbread?
Calories per: ounce | one cornbread | slice
To give you an idea, medium size cornbread (350 g) has about 1232 calories.
It is about 51% of daily calories intake for adult person with medium weight and medium activity (for calculation we assumed 2400 kcal daily intake).
To visualize how much it actually is, take in mind that calories amount from medium size cornbread is similar to calories amount from ie.:
• 23.5 apples
• 15.5 glasses of Coca Cola (220 ml glass)
• 12.5 slices of cheese
• 10 glasses of milk
• 64.5 cubes of sugar
For burning such amount of calories you need to bike at least 176 minutes, swim for about 145 minutes or run for 124 minutes.
### Cornbread: calories and nutrition per 100g (and per ounce)
Calories352kcal/100g(100 kcal/oz)
Protein5.5g/100g(1.6 g/oz)
Carbs Total45.1g/100g(12.8 g/oz)
Fat16.5g/100g(4.7 g/oz)
per 100 gper ounce
Calories352 ~ 99.8
Carbs Total45.05 g~ 12.8 g
Dietary fiber1.1 g~ 0.3 g
Fat16.48 g~ 4.7 g
Protein5.49 g~ 1.6 g
### How many calories in 1, 2, 3 or 5 cornbread?
As I wrote before medium size cornbread (350 g) has 1232 calories. It is easy to count that two cornbread have about 2464 calories and three cornbread have about 3696 calories. In table below you can also see calories amount for four and five cornbread.
• Medium size cornbread (350 g)1232 kcal
• Slice of cornbread (50g)176 kcal
• Ounce (oz) of cornbread100 kcal
• Half of medium size cornbread616 kcal
• Small size cornbread (280g)985.6 kcal
• Big size cornbread (455g)1601.6 kcal
• Two medium size cornbread2464 kcal
• Three medium size cornbread3696 kcal
• Four medium size cornbread4928 kcal
• Five medium size cornbread6160 kcal
Cornbread has 5.49 g protein per 100g.
When you multiplay this value with weight of medium size cornbread (350 g) you can see that you will get about 19.2 g of protein.
Cornbread has 45.05 g carbohydrates per 100g.
In the same way as for protein we can calculate that medium size cornbread (350 g) has about 157.7 g of carbs.
Cornbread has 16.48 g fat per 100g.
So it is easy to count that medium size cornbread (350 g) has about 57.7 g of fat.
## medium size cornbread (350 g) has:
1232kcalFor burning these calories you have to:
Bike176 min.Bike
Horse ride227 min.Horse ride
Play tennis120 min.Tennis
Run124 min.Run
Swim145 min.Swim
• 51% CARBS
• 6% PROTEIN
• 42% FAT
## cornbread - minerals per 100g
• Calcium66 mg
• Sodium451 mg
• Iron0.79 mg
When you look at charts below you will see how cornbread looks like in comparsion to other products from its category. When you click on selected product you will se detailed comparsion. | 808 | 2,687 | {"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.65625 | 3 | CC-MAIN-2022-21 | latest | en | 0.823901 |
https://www.scribd.com/document/374801984/Wan-2010 | 1,558,934,169,000,000,000 | text/html | crawl-data/CC-MAIN-2019-22/segments/1558232261326.78/warc/CC-MAIN-20190527045622-20190527071622-00385.warc.gz | 905,053,218 | 61,783 | You are on page 1of 5
## 174 (2011) pp 36-39
Online available since 2010/Dec/06 at www.scientific.net
© (2011) Trans Tech Publications, Switzerland
doi:10.4028/www.scientific.net/AMR.174.36
## School of Printing and Packaging, Wuhan University, China
a
wan@whu.edu.cn, bhxinguo919@126.com, cliuzhen0910@163.com
## Keywords: Uncertainty; Spectral reflectance; Tristimulus values; Chromaticity parameters.
Abstract. Uncertainty evaluation of spectral color measurement is the best method of evaluation of
color measurement result’s quality. Firstly type A and type B uncertainty of spectral reflectance are
analyzed based on different uncertainty's sources, secondly uncertainty of chromaticity parameters
are calculated based on spectral reflectance’s uncertainty. Lastly practicability of uncertainty
evaluation of spectral color measurement is proved by experiments.
Introduction
Spectral color measurement is measuring spectral reflectance by spectrophotometer and then
calculating chromatic value, such as tristimulus values. Spectral color measurement is the most
accurate color measurement method, which is widely used in the industry with high color quality
requirements, such as printing, dyeing. Measurement accuracy is the basis of spectral color
measurement applications. Measurement error evaluation has been replaced by uncertainty
evaluation in measurement accuracy assessent[1]. However spectral color measurement uncertainty
evaluation is more difficult than other measurements, because of the subjectivity of measurement
uncertainty evaluation and the calculation complexity of chromatic values.
## Mathematical model of spectral color measurement
According to the calculation formula of tristimulus values, if the spectral reflectance is measured, the
tristimulus values can be calculated. So uncertainty of tristimulus values and chromaticity parameters are
derived from changes of parameters in the spectral reflectance measurement .The spectral reflectance is
measured by comparing the reflected light energy of specimen and the standard white board under the same
conditions [2].Similar to the standard white board. Because the reflectance of standard is known, the reflectance
of specimen is given by the following:
S (λ )
R (λ ) = i Rsd (λ ) . (1)
S sd (λ )
where S (λ ) is the photoelectric signal of specimen, S sd (λ ) is the photoelectric signal of
standard, Rsd (λ ) is the reflectance of standard, R(λ ) is the reflectance of specimen.
## Uncertainty evaluation of spectral reflectance
According to ISO A type evaluation method of uncertainty, when the number of specimen color
measurement not less than 10, standard deviation of mean is expressed as uncertainty, so the uncertainty of
spectral reflectance of specimen is given by the following:
n
∑ ( R (λ ) − R(λ ))
k
2
u ( R (λ )) = k =1 . (2)
n(n − 1)
where Rk (λ ) is the kth measurement, R (λ ) is the arithmetic mean of n measurement of R (λ ) .
All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of TTP,
www.ttp.net. (ID: 158.42.28.33, Universidad Politecnica de Valencia, Valencia, Spain-25/03/15,13:40:47)
Advanced Materials Research Vol. 174 37
According to ISO B type evaluation method of uncertainty and Eq 1, the input quantities of R (λ ) are
S (λ ) , S sd (λ ) , Rsd (λ ) and λ ,so R(λ ) = f ( S (λ ), Ssd (λ ), Rsd (λ ), λ ) [2,3,4].The sensitivity coefficients of
R(λ ) with respect to S (λ ) is as follows:
∂R(λ ) Rsd (λ ) R(λ )
= = . (3)
∂S (λ ) Ssd (λ ) S (λ )
## Similarly available to ∂R ( λ ) ∂Ssd ( λ ) , ∂R ( λ ) ∂Rsd ( λ ) , ∂R ( λ ) ∂λ .
Set S (λ ) and S sd (λ ) as input quantities,applying the law of propagation of uncertainty to Eq
∂S sd ( λ ) are substituted into Eq 1,so the uncertainty due to S (λ ) and S sd ( λ ) is given by
∂R ( λ ) ∂R ( λ )
1, ∂S ( λ ) and
the following:
u 2 ( S (λ )) u 2 ( S (λ )) u ( S (λ ))u ( S sd (λ ))r ( S (λ ), S sd (λ )) .
u ( R (λ )) = R (λ ) + sd
−2 (4)
( S (λ ) ) 2
( S sd (λ ) )
2
S (λ ) S sd (λ )
Set Rsd (λ ) as input quantity,applying the law of propagation of uncertainty to Eq 1, ∂R ( λ )
∂Rsd ( λ )
is substituted into Eq 1,so the uncertainty due to Rsd (λ ) is given by the following:
R (λ )
u ( R (λ )) = u ( Rsd (λ )) . (5)
Rsd (λ )
Set λ as input quantity,applying the law of propagation of uncertainty to Eq 1 , ∂R ( λ ) ∂λ is
substituted into Eq 1 ,so the uncertainty due to λ is given by the following:
∂ ( S (λ ) S sd (λ ))
u ( R (λ )) = Rsd (λ ) u (λ ) . (6)
∂λ
## Uncertainty evaluation of tristimulus values
Set R(λ ) as input quantity, apply the law of propagation of uncertainty to the calculation
formula of tristimulus values ,The uncertainty of X, Y, Z is given by the following:
∂V ∂V
2
∂V 2 m −1 m
u (V ) = ∑
2
u ( R ( λ )) + 2 ∑ ∑ r ( R (λi ), R (λ j ))u ( R (λi ))u ( R (λ j )) . (7)
λ ∂R (λ ) i =1 j = i +1 ∂R (λi ) ∂R (λ j )
where V represents tristimulus values X, Y and Z. R(λi ) and R (λ j ) is the spectral reflectance factors at
different wavelengths λi and λ j .the sensitivity coefficients ∂V ∂R ( λ ) are equal to color stimulus function. The
correlation coefficients r ( R (λi ), R (λ j )) depends on the sources of uncertainty of spectral reflectance.
## Uncertainty evaluation of chromaticity parameters
Set R (λ ) as input quantity, apply the law of propagation of uncertainty to calculation formula
of chromaticity parameters, the uncertainty of chromaticity parameters is given by the following:
∂Γ ∂Γ
2
∂Γ 2 m −1 m
u 2 (Γ ) = ∑ u ( R(λ )) + 2∑ ∑ r ( R(λi ), R(λ j ))u ( R(λi ))u ( R(λ j )) . (8)
λ ∂R (λ )
i =1 j =i +1 ∂R (λi ) ∂R (λ j )
## where Γ is representation of chromaticity parameters, such as L*,a*,b*.
Chromaticity parameters are generally calculated on tristimulus values, that is as
Γ = f ( X , Y , Z ) .So the sensitivity coefficients in Eq 8 is given by the following:
∂Γ ∂Γ ∂X ∂Γ ∂Y ∂Γ ∂Z
= + + . (9)
∂R (λ ) ∂X ∂R (λ ) ∂Y ∂R (λ ) ∂Z ∂R (λ )
where ∂Γ ∂X , ∂Γ ∂Y and ∂Γ ∂Z are derived from partial derivative of calculation formula of
chromaticity parameters, ∂X ∂R ( λ ) , ∂Y ∂R ( λ ) and ∂X ∂R ( λ ) are equal to color stimulus function.
38 Printing and Packaging Study
Set tristimulus values as input quantity, apply the law of propagation of uncertainty to calculation
formula of chromaticity parameters, the uncertainty of chromaticity parameters is given by the
following:
2 2 2
∂Γ 2 ∂Γ 2 ∂Γ 2 ∂Γ ∂Γ
u 2 (Γ ) = u (X ) + u (Y ) + u (Z ) + 2 r ( X , Y )u ( X )u (Y ) .
∂X ∂Y ∂Z ∂X ∂Y (10)
∂Γ ∂Γ ∂Γ ∂Γ
+2 r ( X , Z )u ( X )u ( Z ) + 2 r (Y , Z )u (Y )u ( Z )
∂X ∂Z ∂Y ∂Z
## where ∂Γ ∂X , ∂Γ ∂Y and ∂Γ ∂Z are derived from partial derivative of calculation formula of
chromaticity parameters, u ( X ) , u (Y ) and u ( Z ) is given by Eq 7.
## Results and discussion
Color-Eye 7000A spectrophotometer was used for the spectral color measurement, set
measurement parameters as SAV and SCI, calibrate spectrophotometer, and then measure
specimens 10 times. Type A evaluation of uncertainty of spectral reflectance of specimens are given
by Eq 2. Because type B evaluation of uncertainty call for insight based on experience and general
knowledge, type B evaluation of uncertainty of spectral reflectance of specimens due to signal noise,
signal offset, the change of standard and wavelength shift are derived from Color-Eye 7000A
specifications documentation and research report about standard white board from NIST[5,6], and
calculated based on Eq 4, Eq 5, Eq 6.
The uncertainties of tristimulus values are calculated using Eq 7 based on uncertainties of
spectral reflectance of different factors.The uncertainties of tristimulus values duo to specimen,
signal noise, systematic effects of standard and random effects of standard are obtained, and the
result are shown in Fig.1 (a), (b) and (c). The uncertainties of chromaticity parameters are calculated
using Eq.9 based on uncertainties of tristimulus values. This shows CIE L* as an example of evaluation of
*
uncertainty of chromaticity parameters. firstly, ∂L* , ∂L ∂Y and ∂L* is calculated, secondly, u ( L* ) is calculated
∂X ∂Z
*
by substituting ∂L*
∂X , ∂L ∂Y , ∂L ∂Z ,Y and
*
u (Y ) into Eq.10, The uncertainties of chromaticity parameters duo to
specimen, signal noise, systematic effects of standard and random effects of standard are obtained, and the
result are shown in Fig.1 (d).
As shown in Fig .1 (a),(b) and (c), the uncertainties of specimen 1 and 3 are greater than
specimen 2 and 4,because the spectral reflectance of specimen 1 and 3 are greater than specimen 2
and 4, measurement signal strength of specimen 1 and 3 is more stronger, and more affected by
various factors; the uncertainty duo to systematic effects of standard the largest, followed by signal
noise, random effects of standard minimum, that is say the main reason affecting the measurement
results is material stability and surface cleanliness of standard, in addition, the stability of the
measurement process is also an important factor affecting the measurement results.
Advanced Materials Research Vol. 174 39
(a) (b)
(c) (d)
Fig.1 Uncertainty component’s comparison of X, Y, Z and L*.The sources of uncertainty are signal
noise(SN) ,systematic effects of standard(SS),random effects of standard(SR), type A evaluation of
uncertainty(AU) .
Conclusions
This article analyzed the sources of the uncertainty of spectral reflectance and the evaluation
method of the uncertainty of spectral reflectance based on mathematical model of spectral color
measurement, and defined a clear mathematical relationship between the uncertainty of spectral
reflectance, tristimulus values and chromaticity parameters ,finally derived the evaluation method
of the uncertainty of tristimulus values and chromaticity parameters.
References
[1] ISO/IEC Guide 98:1995:Guide to the Expression of Uncertainty in Measurement.
[2] Dai Caihong,Yu Jialin,Yu Jing,Yin Chunyong: ACTA OP TICA SINICA, Vol.25 (2005),
p.547-552.
[3] E A Early. M E Nadal: Color Research and Application Vol.29(2004), p.205-216.
[4] J L Gardner: Color Research and Application Vol.25(2000), p.349-355.
[5] GretagMacbeth Color-Eye 7000A Spectrophotometer Operation Manual.
[6] Barnes P Y, Early E A. Spectral Reflectance, NIST Special Publication (1998), p.250-48.
Printing and Packaging Study
10.4028/www.scientific.net/AMR.174
## Uncertainty Evaluation of Spectral Color Measurement
10.4028/www.scientific.net/AMR.174.36 | 3,334 | 10,644 | {"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-2019-22 | latest | en | 0.836162 |
https://byjus.com/question-answer/find-the-sum-of-1-2-1-2-2-2-1-2-2-2-3/ | 1,642,920,733,000,000,000 | text/html | crawl-data/CC-MAIN-2022-05/segments/1642320304134.13/warc/CC-MAIN-20220123045449-20220123075449-00630.warc.gz | 208,529,307 | 19,002 | Question
# Find the sum of $$1^{2}+(1^{2}+2^{2})+(1^{2}+2^{2}+3^{2})+.......$$
Solution
## First term$$={1}^{2}$$Second term$$={1}^{2}+{2}^{2}$$Third term$$={1}^{2}+{2}^{2}+{3}^{2}$$...$${n}^{th}$$ term$$={1}^{2}+{2}^{2}+{3}^{2}+...+{n}^{2}$$Here $${a}_{n}={1}^{2}+{2}^{2}+{3}^{2}+...+{n}^{2}$$$$=\dfrac{n\left(n+1\right)\left(2n+1\right)}{6}$$$$=\dfrac{2{n}^{3}+{n}^{2}+2{n}^{2}+n}{6}$$$$=\dfrac{2{n}^{3}+3{n}^{2}+n}{6}$$Now, the sum of $$n$$ terms is $${S}_{n}=\sum_{n=1}^{n}{{a}_{n}}$$$$=\sum_{n=1}^{n}{\dfrac{2{n}^{3}+3{n}^{2}+n}{6}}$$$$=\dfrac{1}{6}\left(2\sum_{n=1}^{n}{{n}^{3}}+3\sum_{n=1}^{n}{{n}^{2}}+\sum_{n=1}^{n}{n}\right)$$$$=\dfrac{1}{6}\left(\dfrac{2{n}^{2}{\left(n+1\right)}^{2}}{2}+\dfrac{3n\left(n+1\right)\left(2n+1\right)}{6}+\dfrac{n\left(n+1\right)}{2}\right)$$$$=\dfrac{n\left(n+1\right)}{12}\left[n\left(n+1\right)+\left(2n+1\right)+1\right]$$$$=\dfrac{n\left(n+1\right)}{12}\left[{n}^{2}+n+2n+1+1\right]$$$$=\dfrac{n\left(n+1\right)}{12}\left[{n}^{2}+3n+2\right]$$$$=\dfrac{n\left(n+1\right)}{12}\left[{n}^{2}+2n+n+2\right]$$$$=\dfrac{n\left(n+1\right)}{12}\left[\left(n+1\right)\left(n+2\right)\right]$$$$=\dfrac{n{\left(n+1\right)}^{2}\left(n+2\right)}{12}$$Thus, the required sum is $$\dfrac{n{\left(n+1\right)}^{2}\left(n+2\right)}{12}$$Mathematics
Suggest Corrections
0
Similar questions
View More | 701 | 1,334 | {"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.59375 | 5 | CC-MAIN-2022-05 | latest | en | 0.466552 |
https://alison.com/course/diploma-en-estadistica | 1,495,878,941,000,000,000 | text/html | crawl-data/CC-MAIN-2017-22/segments/1495463608936.94/warc/CC-MAIN-20170527094439-20170527114439-00457.warc.gz | 893,135,660 | 24,331 | # Diploma in Statistics Free Course
• Description
• Outcome
• Certification
• Statistics and statistical methods play a major role in the work environment in areas such as business, science, finance, economics, engineering to mention just a few. It is very important that people are comfortable with reading statistics and using statistical methods. This free online Diploma in Statistics will give you the knowledge and understanding of basic statistical methods such as sampling and collecting data, probability, distributions, regression analysis. By completing this course you will gain the knowledge and understanding to confidently read statistics and apply statistical methods within your daily working environment.
• Upon completion of this course you will learn how to collect and analyse data. You will gain a good knowledge of the graphs that can be used and the reason for using these graphs.You will have a good understanding of probability, univariate data, and bivariate data. You will know the difference between normal, binomial and hypergeometric distribution. You will be able to do a regression analysis. You will understand the benefits of analytical methods such as trend analysis, residual analysis and the calculation of a seasonal index.
• All Alison courses are free to study. To successfully complete a course you must score 80% or higher in each course assessments. Upon successful completion of a course, you can choose to make your achievement formal by purchasing an official Alison Diploma, Certificate or PDF.
Having an official Alison document is a great way to share your success. Plus it’s:
• Ideal for including in CVs, job applications and portfolios
• An indication of your ability to learn and achieve high results
• An incentive to continue to empower yourself through learning
• A tangible way of supporting the Alison mission to empower people everywhere through education.
###### Modules List( 25 )
• Module 1 - Introduction to Statistics
• Collecting and analysing data
• Summarising data - overview
• Mode
• Mean
• Median
• Mode, mean, median
• Comparing mode, mean, median
• Range of data
• Inter-quartile range
• Review of summarising data
• Types of Graphs
• Types of Graphs
• Ice cream pictograph
• Column and bar graphs
• Examples of column graphs
• Pie charts
• Examples of pie charts
• Line graphs
• Temperature line graphs
• Types of graphs
• Interpreting column graphs
• Manchester flights bar graph
• Movie line graph
• Interpretation of a sports pie graph
• Review of graphs
• Frequency and Graphs
• Overview of Frequency and graphs
• Nominal data
• Discrete data
• Continuous data
• Frequency tables with nominal data
• Frequency tables with discrete data
• Frequency tables - discrete data and summary statistics
• Mean from frequency tables - discrete data
• Interpreting column graphs
• Family size cumulative frequency
• Module 2 - Probability
• Probability
• Introduction to probability
• Probability words
• Words describing chance
• Finding probabilities theoretically
• Probability with equally likely outcomes
• Probability and Relative Frequency
• Probability and relative frequency
• Short-run coin tossing
• Short-run dice rolling
• Predicting from past experience
• Towards probability with coins
• Towards probability with dice
• Probability as long-run relative frequency
• Probability and Odds
• Probability and Odds
• Odds
• Odds on
• Odds and probability
• Fair or unfair?
• Deciding fairness using probability
• Statistics Assessment 1
• Statistics Assessment 1
• Statistics 1 Assessment
• Module 3 - Summary Statistics
• Summary Statistics
• Summary statistics
• The mean
• The median – definition
• Cumulative frequency
• Cumulative frequency graph
• The mode
• The median for even data sets
• The mean - example
• The median - example
• Range
• The soccer activity
• The range
• The interquartile range
• The interquartile range - example 1
• The interquartile range - example 2
• The standard deviation
• Boxplots
• Boxplots - example
• Discrete Random Variables
• Random variables
• Discrete probability distribution
• The mean and variance of a discrete random variable
• Standard deviation as a measure of spread
• Module 4 - Types of Data
• Univariate Data Part 1
• Introduction
• Types of data
• Types of univariate data
• Numerical data
• Univariate Data Part 2
• Displaying data
• Bar graphs
• Stem and leaf diagrams 1
• Stem and leaf diagrams 2
• Bivariate Data
• Introduction to Bivariate Data
• Dependent and independent variables
• Percentage tables
• Parallel boxplots
• Back-to-back stemplots
• Graphical display of bivariate data
• Module 5 - Distributions
• Normal Distribution
• The normal curve
• Continuous random variables and the normal distribution
• Calculation of probabilities for a normal distribution
• Approximating the binomial distribution
• Binomial Distribution
• Binomial probability function
• Number of successes in a given number of trials
• Effect of changing the parameter p
• Effect of changing the parameter n
• Mean and variance of a binomial random variable
• Hypergeometric Distribution
• Sampling without replacement
• Mean of a hypergeometric random variable
• Variance of a hypergeometric random variable
• Mean and variance of a hypergeometric random variable example 1
• Mean and variance of a hypergeometric random variable example 2
• Formula for calculating probabilities
• Calculating probabilities
• Statistics Assessment 2
• Statistics Assessment 2
• Statistics 2 Assessment-1
• Module 6 - Regression Analysis
• Regression
• Introduction to the regression line
• Finding the equation of a regression line
• Interpretation of slope and intercept
• Practice question
• The three-median regression line
• The three-median regression example
• The three-median regression practice questions
• The least squares regression line
• Making predictions from a regression line
• Coefficient of Determination
• Scatterplots
• Pearson's product moment correlation coefficient, r
• Calculating r
• The coefficient of determination
• Practice question
• Strength of association
• Non-linear Data
• Non-linear data
• Square transformation
• Log transformations
• Reciprocal transformation
• Example 1
• Example 2
• Module 7 - Analytical Methods
• Trend Analysis
• Trends
• Cyclic patterns
• Random patterns
• Describing patterns in time series data
• Seasonal patterns
• Smoothing a time series
• Median smoothing
• Smoothing using moving averages
• Smoothing - example 1
• Smoothing - example 2
• Residual Analysis
• Introduction to Residual Analysis
• Residual analysis - part 1
• Plotting the residuals
• Residual analysis - part 2
• Residual analysis - part 3
• Calculating a Seasonal Index
• Calculating a seasonal index
• Interpreting seasonal indices
• Seasonal movements
• Deseasonalising the data
• Deseasonalising the data – example
• Statistics Assessment 3
• Statistics Assessment 3
• Statistics 3 Assessment-1
• Module 8 - End of Course Assessment
• End of course Assessment
• End of Course Assessment
###### Topics List ( 9 )
Collecting and analysing data
Types of Graphs
###### Topics List ( 10 )
Frequency and Graphs
Probability
###### Topics List ( 7 )
Probability and Relative Frequency
###### Topics List ( 6 )
Probability and Odds
###### Topics List ( 1 )
Statistics Assessment 1
Assessment 1
###### Topics List ( 11 )
Summary Statistics
Range
###### Topics List ( 4 )
Discrete Random Variables
###### Topics List ( 4 )
Univariate Data Part 1
###### Topics List ( 4 )
Univariate Data Part 2
Bivariate Data
###### Topics List ( 4 )
Normal Distribution
###### Topics List ( 5 )
Binomial Distribution
###### Topics List ( 7 )
Hypergeometric Distribution
###### Topics List ( 1 )
Statistics Assessment 2
Assessment 2
Regression
###### Topics List ( 7 )
Coefficient of Determination
Non-linear Data
Trend Analysis
###### Topics List ( 5 )
Residual Analysis
###### Topics List ( 5 )
Calculating a Seasonal Index
###### Topics List ( 1 )
Statistics Assessment 3
Assessment 3
###### Topics List ( 1 )
End of course Assessment
End of course Assessment
##### Course Features
• Duration
6-10 Hours
• Publisher
XSIQ
• Video
No
• Audio
No
• Assessment
Yes
• Certification
Yes
• Price
Free
• Reward
250 Pts
• Responsive
No | 1,853 | 8,270 | {"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.875 | 3 | CC-MAIN-2017-22 | latest | en | 0.910832 |
blog.brandonmanke.com | 1,708,740,751,000,000,000 | text/html | crawl-data/CC-MAIN-2024-10/segments/1707947474482.98/warc/CC-MAIN-20240224012912-20240224042912-00287.warc.gz | 138,775,371 | 8,687 | INDEX
K-Means Clustering Algorithm
By Brandon Manke at
I was inspired to implement this algorithm due to a couple of reasons. The main reason being that I am interested in learning about the fundamentals of machine learning.
Here is a link to the source code if you are interested.
K-Means What?
K-Means Clustering is considered an Unsupervised learning algorithm. More specifically it is a clustering algorithm that is able to classify n-dimensional vectors into k distinct groups. This algorithm in particular is considered an NP-hard problem. This essentially means that it cannot be computed in polynomial time without the use of a theoretical non-deterministic computer. To prevent this, most algorithms end up using a heuristic approach which prioritize runtime over complete accuracy (e.g. limit iterations). Unsupervised learning, while ideal, is not nearly as accurate as Supervised learning (in some cases). However, since unsupervised algorithms don't need to rely on labeled data, this makes them generally easier to implement.
How it works?
Place k random centroid points on the graph.
Repeat the following until specified limit or convergence:
For all points/vectors v in the Matrix: Calculate the distance between each centroid c and v. Take the minimum distance to find the closest centroid. Assign that data point/vector to that cluster that the centroid c represents.
For all clusters: Calculate the average/mean of all the points. Assign those averages as the new centroids for each cluster.
(You can also stop when the clusters stop changing)
Psuedocode
Here is some "Psuedocode"/JavaScript I wrote that describes (roughly) how I implemented this algorithm:
``````function kMeansClustering(k, limit) {
let centroids = randomCentroids(k)
let clusters = [] // groups of length k
let iteration = 0
while (iteration < limit) {
clusters = clusterPoints(centroids)
centroids = averageClusters(clusters, centroids)
iteration++
}
return clusters
}
function clusterPoints(centroids) {
for (Point p in Matrix) {
let min = Number.MAX_VALUE
let index = -1
for (Centroid c in centroids) {
let distance = EuclideanDist(p, c)
if (distance < min) {
min = distance
index = indexOf(c)
}
}
}
}
function averageClusters(clusters, centroids) {
for (Cluster c in clusters) {
let sum = zero_vector
for (Point p in c) {
sum += p
}
let average = sum / c.length
centroids[indexOf(c)] = average
}
}
``````
Example Output
This is an example output after 8 iterations of training. We then classify a random point with the clustered data.
``````Iteration 8:
Cluster 0: (Centroid = [ 439, 476, 685 ])
Point: 0 - [ 506, 620, 838 ]
Point: 1 - [ 415, 344, 542 ]
Point: 2 - [ 527, 308, 966 ]
Point: 3 - [ 493, 201, 883 ]
Point: 4 - [ 544, 945, 826 ]
Point: 5 - [ 925, 323, 577 ]
Point: 6 - [ 373, 457, 876 ]
Point: 7 - [ 303, 527, 500 ]
Point: 8 - [ 361, 773, 527 ]
Point: 9 - [ 328, 267, 729 ]
Point: 10 - [ 502, 953, 956 ]
Point: 11 - [ 466, 971, 670 ]
Cluster 1: (Centroid = [ 40, 71, 222 ])
Point: 0 - [ 21, 137, 284 ]
Point: 1 - [ 101, 77, 382 ]
Point: 2 - [ 140, 274, 7 ]
Cluster 2: (Centroid = [ 449, 56, 189 ])
Point: 0 - [ 674, 122, 436 ]
Point: 1 - [ 674, 46, 133 ]
Point: 2 - [ 551, 69, 379 ]
Cluster 3: (Centroid = [ 631, 538, 153 ])
Point: 0 - [ 935, 985, 211 ]
Point: 1 - [ 641, 816, 238 ]
Point: 2 - [ 483, 386, 108 ]
Point: 3 - [ 830, 520, 172 ]
Point: 4 - [ 757, 632, 190 ]
Point: 5 - [ 771, 430, 153 ]
Point: 6 - [ 860, 449, 303 ]
Cluster 4: (Centroid = [ 88, 520, 225 ])
Point: 0 - [ 63, 530, 347 ]
Point: 1 - [ 70, 623, 339 ]
Point: 2 - [ 212, 530, 394 ]
Point: 3 - [ 97, 919, 49 ]
Point: 4 - [ 18, 759, 140 ]
Classify p: [ 791, 248, 128 ]
Is closest to cluster: 3``````
Building
If you are interested in building the source code yourself.
Via Docker:
``````# To build the image
make docker-build # OR docker build -t k-means-clustering .
# To build and run the program
make docker-run # OR docker run -it --rm k-means-clustering``````
(This may or may not work depending on your compiler compatibility)
(Travis CI is set up to build for both Clang & GCC)
``````make test && ./bin/all_tests # To run all unit tests
make && ./bin/out # For example output`````` | 1,255 | 4,199 | {"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-10 | latest | en | 0.899448 |
https://www.sdhkudlovice.cz/quarry/2021/03/28/2462/ | 1,627,333,092,000,000,000 | text/html | crawl-data/CC-MAIN-2021-31/segments/1627046152144.92/warc/CC-MAIN-20210726183622-20210726213622-00601.warc.gz | 959,580,180 | 8,935 | # Calculation Of Three Stage Gear
## How to calculate the gear ratio - Quora
Jun 14, 2017 · Gear ratio can be calculated by dividing the diameter of both gears or their number of teeth If gear ratio > 1 then it’s speed reduction, if smaller then it’s for system to speed up, if equal oneGear ratios and compound gear ratios - woodgearsca,The ratio you need is 500:1200, or 5:12 However, simple gears with only 5 teeth tend to run a bit rough, so your best bet is to make (or obtain) gears with 10 and 24 teeth Determining compound gear ratios (multiple stages) When a gear train has multiple stages, the gear ratio for the overall gearing system is the product of the individual stagesHow to Calculate Planetary Gear Ratio | Sciencing,Apr 24, 2018 · When calculating planetary or epicyclic gear ratios, first note the number of teeth on the sun and ring gears Add them together to calculate the number of planetary gear teeth Following this step, the gear ratio is calculated by dividing the number of driven teeth by the number of driving teeth – there are three combinations possible, depending on whether the carrier is moving, being moved or
## Multi-stage Gearbox - Neugart GmbH
A two-stage gearbox or a three-stage gearbox can be achieved by simply increasing the length of the ring gear and with serial arrangement of several individual planet stages A planetary gear with a ratio of 20:1 can be manufactured from the individual ratios of 5:1 and 4:1, for example Instead of the drive shaft the planetary carrier contains the sun gear, which drives the following planet stage A three-stageCalculation of Gear Dimensions | KHK Gears,(3) Rack and Spur Gear Table 45 presents the method for calculating the mesh of a rack and spur gear Figure 43 (1) shows the the meshing of standard gear and a rack In this mesh, the reference circle of the gear touchesthe pitch line of the rack Figure 43 (2) shows a profile shifted spur gear, with positive correction xm, meshed with a rackTutorial: Calculation of a two stage gearbox - MESYS AG,33 Therefore bearings could be ok, dependent on the needs for life Minimum gear safety is 114 for the flank and 3 for the root stresses, so gears should also be ok This can now be used to detail the shaft geometry and optimize the gears Gear calculations For gear calculations the ‘Required Life’ on page ‘System’ should be defined
## Tutorial for gear design and calculation with MDESIGN gearbox
Gear design in MDESIGN gearbox March 2012 - DriveConcepts GmbH, Dresden 43 Calculation of the shafts To calculate and specify a shaft, select the entry shaft in the topic “hoice of elements for the calculation” At first we will use “Welle_01” Most of the geometrical data are already set threwHow to calculate the gear ratio - Quora,Jun 15, 2017 · It's very easy Basically, the ratio is determined by the number of teeth on each gear wheel How you can see in the following image:How to Calculate Planetary Gear Ratio | Sciencing,Apr 24, 2018 · When calculating planetary or epicyclic gear ratios, first note the number of teeth on the sun and ring gears Add them together to calculate the number of planetary gear teeth Following this step, the gear ratio is calculated by dividing the number of driven teeth by the number of driving teeth – there are three combinations possible, depending on whether the carrier is moving, being moved or
## Multi-stage Gearbox - Neugart GmbH
A two-stage gearbox or a three-stage gearbox can be achieved by simply increasing the length of the ring gear and with serial arrangement of several individual planet stages A planetary gear with a ratio of 20:1 can be manufactured from the individual ratios of 5:1 and 4:1, for examplePlanetary Epicyclic Gear Ratios Equations and Calculators ,Planetary Epicyclic Gear Ratios Equations and Calculators A = Size of driving gear use either number of teeth or pitch diameter Note: When follower derives its motion both from A and from a secondary driving member, A = size of initial driving gear, and formula gives speed relationship between A and followerCalculation of Gear Dimensions | KHK Gears,TOP > Gear Knowledge > Gear Technical Reference > Calculation of Gear Dimensions Calculation of Gear Dimensions KHK web kanri 2017-12-20T09:06:42+00:00 Gear dimensions are determined in accordance with their specifications, such as Module (m), Number of teeth (z), Pressureangle (α), and Profile shift coefficient (x)
## Tutorial: Calculation of a two stage gearbox - MESYS AG
33 Therefore bearings could be ok, dependent on the needs for life Minimum gear safety is 114 for the flank and 3 for the root stresses, so gears should also be ok This can now be used to detail the shaft geometry and optimize the gears Gear calculations For gear calculations the ‘Required Life’ on page ‘System’ should be definedHow do I determine the optimal partial ratios of a three ,The second stage should be 11xiT^03 (in your case: 11x15^03=248) The third stage must be the iT/(i1*i2) (in your case: 15/(266*248)=227) These formulas are in the book "Sirnradverzahnung Gear Ratio Calculations - SCHSM,Sometimes gears are 'ganged' by keying or otherwise welding them together and both gears turn as a unit on the same shaft This complicates the computation of the gear ratio, but not horribly Suppose gears 2 and 3 are keyed together into a single compound gear we'll designate g (g for ganged)
## Gearbox Ratio Calculator - Technobots Online
Stages not selected will be ignored in the overall ratio calculation 5 If 2 or more stages are required, the driven gear of the preceeding stage needs to be fixed on the same shaft as the drive gear of the next stage This shaft is commonly called a lay shaft and should be supported on its own bearing mountsDESIGN OF TWO STAGE PLANETARY GEAR TRAIN FOR HIGH ,In conventional helical gear system, the ratio 78: 1 requires three stage reductions which become bulky Hence authors had identified problem as ―Design of two stage planetary gear trains for reduction ratio 78: 1‖ and the objective of study are as underOther Uses for Gears - How Gear Ratios Work - Science,One way to create that ratio is with the following three-gear train: In this train, the blue gear has six times the diameter of the yellow gear (giving a 6:1 ratio) The size of the red gear is not important because it is just there to reverse the direction of rotation so that the blue and yellow gears turn the same way
## Design and Use of Epicyclic Gear Systems - UTS
Design and Use of Epicyclic Gear Systems Jim Marsch National Manufacturing Week Session # 4D32 March 10, 2005 Introduction Star Epicyclic Two Stage Ratio 1 = 4216 Ratio 2 = 4216 Weight = 5,293# Ratio 1 = 3925 Ratio 2 = 4536 zSimple & Compound Epicyclic Sets – Calculate power using planet torque and planet relative speedGear Ratio Calculator - Grimm Jeeper,Note: This calculator is continually being updated The lists of available equipment will probably never be complete The lists of available equipment will probably never be complete If you find that the parts you would like to use are not yet listed, please send the information to me at [email protected] and I will do my best to include planetary gear ratios calculator - torcbrain,Nov 08, 2012 · This leads to different gear ratios and output rotation directions (Note: The calculator converts under the assumption that one unit of the gearbox is fixed (sun, planet carrier and annulus gear), therefore does not rotate) The overall demultiplication of multi stage planetary gear units is calculated by multiplying the ratios of the single
## How to Calculate Gear Ratio | Sciencing
For example, consider a system with a gear ratio of 3:1, which means the driver wheel spins three times as fast as the driven wheel If the speed of the driver wheelMechanical Gear Ratio Calculator for Output Speed and Torque,To find the output torque and speed of a gear increaser, use the equations: Ouput Torque = Input Torque x Ratio of Gear Increaser Torque is measured in Inch Pounds Output Speed = Input Speed / Ratio of Gear Increaser Example: A gear increaser with 1000 in/lbs of input torque, an inputGear Ratio Calculations - SCHSM,Sometimes gears are 'ganged' by keying or otherwise welding them together and both gears turn as a unit on the same shaft This complicates the computation of the gear ratio, but not horribly Suppose gears 2 and 3 are keyed together into a single compound gear we'll designate g (g for ganged)
## planetary gear ratios calculator - torcbrain
Nov 08, 2012 · The overall demultiplication of multi stage planetary gear units is calculated by multiplying the ratios of the single stages The number of teeth of the planets has no effect on the ratio Their number of teeth depends on the demultiplication of the gearbox The planets are merely seen as a "bridge" between the sun gear and annulus gearCalculating the amount of teeth on ring gear in planetary ,Calculating the amount of teeth on ring gear in planetary gear system but not for three gear types; the third gear will already be determined in order to satisfy the gear ratio between two gear types while also satisfying geometric constraints: that is, the annulus (ring) gear must have a number of teeth equal to that of the sun gear plus DESIGN, MODELLING AND ANALYSIS OF A 3 STAGE,For simple, epicyclic planetary stages when the ring gear is stationary, the practical gear ratio range varies from 3:1 to 9:1 For similar epicyclic planetary stages with compound planet gears, the practical gear ratio range varies from 8:1 to 30:1
## Case Study Analysis Planetary Gearbox Sept 5 2006
gearbox has three planets in each stage an impulse could occur at three times the 1st stage carrier frequency of 234838 CPM if there were damage to the ring gear teeth This frequency was calculated as follows: The source of the pulses was related to rotation of the carrier and the three planets in the 1st stage also called theDesign and Use of Epicyclic Gear Systems - UTS,zPlanet gear cycles per sun rpm are equal to the relative speed of the sun divided by the ratio between sun and planet The planet is an idler zRing gear cycles per sun rpm are equal to the sun gear cycles divided by the ratio between the sun and the ringFormulas for gear calculation - external gears,1 2 ∙& or ℎ* = 3 4 ∙& Cylindrical spur gears with corrected profile The distance between the pitch line of the rack (a) (see figure N°4) and the rolling line (b) is called corrected profile 5∙6 The corrected profile is positive when the pitch line of the rack is above the cutting pitch circle of the gear
## What is a two stage gearbox? - Quora
Jun 29, 2017 · In single stage gearboxes only one reduction is there (2:1,4:1, whatever) The input rpm is reduced only once, in a single step In two stage gearbox, reduction is done in steps Say the input rpm is 4000 In the first gear it is reduced to 1000 (1:4 reduction) In the next gear it is 3000 (3:1 reduction) This is two stage conversionHow can i calculate the gearbox output torque which is ,In single stage spur gears it can be 98%, but 1:10 would normally be a a lower efficient single stage of two stage which is closer to 96%: 96 times However for worm gears have an efficiency of Efficiency Analysis of a Planetary Gearbox - DiVA portal,Efficiency analysis of a planetary gearbox 3 The gearbox is made from hardened steel and has a gear ratio of 35 times in order to convert a high rotational speed into a large torque The power comes in from the electric motor to shaft (10) which is the sun wheel of the first stage
## The World of Planetary Gears | Machine Design
The most basic form of planetary gearing involves three sets of gears with different degrees of freedom Planet gears rotate around axes that revolve around a sun gear, which spins in place,, | 2,680 | 11,811 | {"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.65625 | 4 | CC-MAIN-2021-31 | latest | en | 0.893323 |
http://www.lotterypost.com/thread/257017/8 | 1,411,315,679,000,000,000 | text/html | crawl-data/CC-MAIN-2014-41/segments/1410657135597.56/warc/CC-MAIN-20140914011215-00118-ip-10-234-18-248.ec2.internal.warc.gz | 642,918,394 | 17,740 | Welcome Guest
### NetConnect
#### Internet Domains, simple and cheap
##### Find a domain name:
Home
The time is now 12:07 pm
You last visited September 21, 2014, 12:06 pm
All times shown are
Eastern Time (GMT-5:00)
# Pretty Close Pick 3 System
Topic closed. 113 replies. Last post 2 years ago by Blackie.
Page 8 of 8
u\$a
United States
Member #106669
February 22, 2011
17178 Posts
Offline
Posted: February 18, 2013, 8:29 pm - IP Logged
Helpmewin,
I'm not sure if you are playing your P3 really or just making test on the paper?
Let's calculate your profit in the Feb by using your 24 combs until now:
The daily cost is \$24x2=\$48 for both Box/Str8 (0.50/0.50) and MID/EVE.
The total cost from Feb. 01 to Feb. 17 should be 17X\$48=\$816.00
The wining from you system above should be 2 Box (2x\$100=\$200) and 1 Str8 (\$280);
The total wining from Feb.01 to Feb.17 should be \$200 + \$280=\$480.00
Is it correct?
lottoburg, well i posted on the 12th and it hit a straight the next day, so i guess that would have been \$900.00 if i was playing.
but no i was just testing it and it has since hit two more times as you can see.
so you need to do the math.
BOSTON
United States
Member #48
September 9, 2001
3198 Posts
Offline
Posted: February 18, 2013, 8:51 pm - IP Logged
Is this the same as the link to excel thats posted as so close to win pick 3 or am I wrong and it is a different one/ thanks
NYC
United States
Member #54483
August 20, 2007
722 Posts
Offline
Posted: February 18, 2013, 9:21 pm - IP Logged
lottoburg, well i posted on the 12th and it hit a straight the next day, so i guess that would have been \$900.00 if i was playing.
but no i was just testing it and it has since hit two more times as you can see.
so you need to do the math.
Helpmewin,
Good answer! But I still have two questions about it as below:
1) If you use the 24 combs for one week only? Then you will get the new
24 combs for next week (from Feb.20 to Feb.26). Is it correct?
2) How can you create the 24 combs?
Thanks a lots!
United States
Member #128795
June 2, 2012
4857 Posts
Offline
Posted: February 18, 2013, 10:22 pm - IP Logged
I saw BOOB and I had to respond. (.)(.)
He already has a great system. You have to go back 437 weeks and track the hot and cold. Then play the pairs that match from 296 weeks ago.
Norfolk , Va
United States
Member #4541
May 2, 2004
23052 Posts
Offline
Posted: February 18, 2013, 10:50 pm - IP Logged
Posted this on Zan..... Thread . Its a double list to hit soon in NJ . Not going back 437 weeks :
Test :
NJ Doubles soon :
00 88 11
Good Luck,
Blackie.
United States
Member #128795
June 2, 2012
4857 Posts
Offline
Posted: February 18, 2013, 10:57 pm - IP Logged
Posted this on Zan..... Thread . Its a double list to hit soon in NJ . Not going back 437 weeks :
Test :
NJ Doubles soon :
00 88 11
I know, i was jumping on zanzibar's back for criticizing my thread when he hasn't shown anything viable with backtesting in the short term with his methodology, meaning he can do better, getting excited, then do a long backtest only to be disappointed once again, JUST like my systems. lol
It's the same problem I have with the systems I make up when smoke comes out of my ears after 4 hours of thinking.lol
The way he wrote it, now that I think of it, did make me laugh. So something good came out of this.
"what a crock if i ever seen one"
Ha !
NYC
United States
Member #54483
August 20, 2007
722 Posts
Offline
Posted: February 19, 2013, 12:30 am - IP Logged
Blackie,
It should mean that we have to use 30 combs to play the next draws.
Could you tell us how can you get the 3 double pairs for NJ-P3?
Thanks.
Norfolk , Va
United States
Member #4541
May 2, 2004
23052 Posts
Offline
Posted: February 19, 2013, 12:29 pm - IP Logged
Can only say you dont need to play 30 sets . Find a key number and use it with the doubles especially if the key matches the draw before since mose draws contain a number from the previous draw . Not in all cases but enough .
Good Luck,
Blackie.
Norfolk , Va
United States
Member #4541
May 2, 2004
23052 Posts
Offline
Posted: February 19, 2013, 8:34 pm - IP Logged
Posted this on Zan..... Thread . Its a double list to hit soon in NJ . Not going back 437 weeks :
Test :
NJ Doubles soon :
00 88 11
NJ had the 00 tonight 090 .
Good Luck,
Blackie.
Page 8 of 8 | 1,360 | 4,396 | {"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-2014-41 | longest | en | 0.929751 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.