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://packages.nuget.org/packages/Sylvester.AbstractAlgebra/
1,606,639,030,000,000,000
text/html
crawl-data/CC-MAIN-2020-50/segments/1606141197278.54/warc/CC-MAIN-20201129063812-20201129093812-00379.warc.gz
423,106,646
10,563
# Sylvester.AbstractAlgebra 0.2.5 F# Library for defining, exploring and proving concepts in abstract algebra. Install-Package Sylvester.AbstractAlgebra -Version 0.2.5 dotnet add package Sylvester.AbstractAlgebra --version 0.2.5 <PackageReference Include="Sylvester.AbstractAlgebra" Version="0.2.5" /> For projects that support PackageReference, copy this XML node into the project file to reference the package. ## Sylvester.AbstractAlgebra The Sylvester abstract algebra library contains types and operations for rigorously defining abstract algebra structures and concepts. // Use the Sylvester abstract algebra package Paket.Package["Sylvester.AbstractAlgebra"] open System open System.Linq open Sylvester ### Morphisms // Define a custom symbol type S with a (+) operator and zero // We could just also use plain strings type S = S of string with static member (+) (S l, S r) = S (l + r) static member Zero = S "" // Define an infinite sequence of L strings let Sym = infiniteSeq ((+) 65 >> Char.ConvertFromUtf32 >> S) Sym // Define a monoid using our set and + operator and zero element let L = Monoid(Sym, (+), S.Zero) L seq [(S "A", S "B", S "AB"); (S "B", S "C", S "BC"); (S "C", S "D", S "CD"); (S "D", S "E", S "DE"); ...] // Create 2 S values let a, b = S "Nancy", S "Drew" a + b S "NancyDrew" // Create a L morphism using the PadLeft string function let Pad = Morph(L, fun l -> let (S s) = l in S(s.PadLeft 20)) S " Nancy" S " Nancy Drew" S " NancyDrew" false ### Rings Zpos seq [(0, 1, 1); (1, 2, 3); (2, 3, 5); (3, 4, 7); ...] ### Subsets let s = seq{1..6} |> Set.ofSubsets s Seq [|Empty; Seq [|1|]; Seq [|2|]; Seq [|1; 2|]; Seq [|3|]; Seq [|1; 3|]; Seq [|2; 3|]; Seq [|1; 2; 3|]; Seq [|4|]; Seq [|1; 4|]; Seq [|2; 4|]; Seq [|1; 2; 4|]; Seq [|3; 4|]; Seq [|1; 3; 4|]; Seq [|2; 3; 4|]; Seq [|1; 2; 3; 4|]; Seq [|5|]; Seq [|1; 5|]; Seq [|2; 5|]; Seq [|1; 2; 5|]; Seq [|3; 5|]; Seq [|1; 3; 5|]; Seq [|2; 3; 5|]; Seq [|1; 2; 3; 5|]; Seq [|4; 5|]; Seq [|1; 4; 5|]; Seq [|2; 4; 5|]; Seq [|1; 2; 4; 5|]; Seq [|3; 4; 5|]; Seq [|1; 3; 4; 5|]; Seq [|2; 3; 4; 5|]; Seq [|1; 2; 3; 4; 5|]; Seq [|6|]; Seq [|1; 6|]; Seq [|2; 6|]; Seq [|1; 2; 6|]; Seq [|3; 6|]; Seq [|1; 3; 6|]; Seq [|2; 3; 6|]; Seq [|1; 2; 3; 6|]; Seq [|4; 6|]; Seq [|1; 4; 6|]; Seq [|2; 4; 6|]; Seq [|1; 2; 4; 6|]; Seq [|3; 4; 6|]; Seq [|1; 3; 4; 6|]; Seq [|2; 3; 4; 6|]; Seq [|1; 2; 3; 4; 6|]; Seq [|5; 6|]; Seq [|1; 5; 6|]; Seq [|2; 5; 6|]; Seq [|1; 2; 5; 6|]; Seq [|3; 5; 6|]; Seq [|1; 3; 5; 6|]; Seq [|2; 3; 5; 6|]; Seq [|1; 2; 3; 5; 6|]; Seq [|4; 5; 6|]; Seq [|1; 4; 5; 6|]; Seq [|2; 4; 5; 6|]; Seq [|1; 2; 4; 5; 6|]; Seq [|3; 4; 5; 6|]; Seq [|1; 3; 4; 5; 6|]; Seq [|2; 3; 4; 5; 6|]; Seq [|1; 2; 3; 4; 5; 6|]|] ### Lattices let lat = Lattice(s, (|+|), (|*|)) lat Sylvester.Lattice`1[Sylvester.Set`1[System.Int32]] ## Sylvester.AbstractAlgebra The Sylvester abstract algebra library contains types and operations for rigorously defining abstract algebra structures and concepts. // Use the Sylvester abstract algebra package Paket.Package["Sylvester.AbstractAlgebra"] open System open System.Linq open Sylvester ### Morphisms // Define a custom symbol type S with a (+) operator and zero // We could just also use plain strings type S = S of string with static member (+) (S l, S r) = S (l + r) static member Zero = S "" // Define an infinite sequence of L strings let Sym = infiniteSeq ((+) 65 >> Char.ConvertFromUtf32 >> S) Sym // Define a monoid using our set and + operator and zero element let L = Monoid(Sym, (+), S.Zero) L seq [(S "A", S "B", S "AB"); (S "B", S "C", S "BC"); (S "C", S "D", S "CD"); (S "D", S "E", S "DE"); ...] // Create 2 S values let a, b = S "Nancy", S "Drew" a + b S "NancyDrew" // Create a L morphism using the PadLeft string function let Pad = Morph(L, fun l -> let (S s) = l in S(s.PadLeft 20)) S " Nancy" S " Nancy Drew" S " NancyDrew" false ### Rings Zpos seq [(0, 1, 1); (1, 2, 3); (2, 3, 5); (3, 4, 7); ...] ### Subsets let s = seq{1..6} |> Set.ofSubsets s Seq [|Empty; Seq [|1|]; Seq [|2|]; Seq [|1; 2|]; Seq [|3|]; Seq [|1; 3|]; Seq [|2; 3|]; Seq [|1; 2; 3|]; Seq [|4|]; Seq [|1; 4|]; Seq [|2; 4|]; Seq [|1; 2; 4|]; Seq [|3; 4|]; Seq [|1; 3; 4|]; Seq [|2; 3; 4|]; Seq [|1; 2; 3; 4|]; Seq [|5|]; Seq [|1; 5|]; Seq [|2; 5|]; Seq [|1; 2; 5|]; Seq [|3; 5|]; Seq [|1; 3; 5|]; Seq [|2; 3; 5|]; Seq [|1; 2; 3; 5|]; Seq [|4; 5|]; Seq [|1; 4; 5|]; Seq [|2; 4; 5|]; Seq [|1; 2; 4; 5|]; Seq [|3; 4; 5|]; Seq [|1; 3; 4; 5|]; Seq [|2; 3; 4; 5|]; Seq [|1; 2; 3; 4; 5|]; Seq [|6|]; Seq [|1; 6|]; Seq [|2; 6|]; Seq [|1; 2; 6|]; Seq [|3; 6|]; Seq [|1; 3; 6|]; Seq [|2; 3; 6|]; Seq [|1; 2; 3; 6|]; Seq [|4; 6|]; Seq [|1; 4; 6|]; Seq [|2; 4; 6|]; Seq [|1; 2; 4; 6|]; Seq [|3; 4; 6|]; Seq [|1; 3; 4; 6|]; Seq [|2; 3; 4; 6|]; Seq [|1; 2; 3; 4; 6|]; Seq [|5; 6|]; Seq [|1; 5; 6|]; Seq [|2; 5; 6|]; Seq [|1; 2; 5; 6|]; Seq [|3; 5; 6|]; Seq [|1; 3; 5; 6|]; Seq [|2; 3; 5; 6|]; Seq [|1; 2; 3; 5; 6|]; Seq [|4; 5; 6|]; Seq [|1; 4; 5; 6|]; Seq [|2; 4; 5; 6|]; Seq [|1; 2; 4; 5; 6|]; Seq [|3; 4; 5; 6|]; Seq [|1; 3; 4; 5; 6|]; Seq [|2; 3; 4; 5; 6|]; Seq [|1; 2; 3; 4; 5; 6|]|] ### Lattices let lat = Lattice(s, (|+|), (|*|)) lat Sylvester.Lattice`1[Sylvester.Set`1[System.Int32]] ## Release Notes Update to latest Sylph version. ## Used By ### NuGet packages This package is not used by any NuGet packages. ### GitHub repositories This package is not used by any popular GitHub repositories.
2,431
5,515
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.984375
3
CC-MAIN-2020-50
latest
en
0.596237
https://vectorlinux.com/stable-diffusion-infinite/
1,713,172,465,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296816954.20/warc/CC-MAIN-20240415080257-20240415110257-00112.warc.gz
561,926,607
20,545
# Stable Diffusion Infinite Other Programming Languages Stable Diffusion Infinite: A Fascinating Journey into the World of Infinite Stability Have you ever wondered about the concept of stability in the infinite realm? How does stability manifest itself in systems that extend infinitely? In this article, I will take you on a deep dive into the fascinating world of stable diffusion infinite, exploring its intricacies and shedding light on its importance in various fields of science and mathematics. ## A Glimpse into Stability Stability is a fundamental concept that plays a crucial role in numerous disciplines. Whether it’s the stability of a physical structure, the stability of a system of equations, or even the stability of our emotions, stability is a concept that defines the equilibrium and reliability of a given system. Now, imagine extending this concept beyond finite boundaries. Enter stable diffusion infinite. This concept explores the stability of systems that stretch infinitely in space or time. It seeks to understand how stability is preserved and how it evolves in a limitless environment. ### The Mathematics of Stability In the realm of mathematics, stable diffusion infinite finds its roots in the study of partial differential equations (PDEs). PDEs are mathematical equations that describe how a system changes in multiple dimensions, such as time and space. Stable diffusion infinite specifically focuses on the stability of solutions to these PDEs as they approach infinite limits. It investigates whether the solutions converge to a stable state or diverge unpredictably. This analysis is crucial for understanding the behavior of various physical and natural phenomena that can be modeled using PDEs. ### Applications in Science and Engineering The concept of stable diffusion infinite has far-reaching applications in science and engineering. For example, in the field of fluid dynamics, understanding the stability of fluid flows is essential for designing efficient transportation systems, predicting weather patterns, and optimizing industrial processes. In astrophysics, stable diffusion infinite allows scientists to model the behavior of plasma in stellar interiors and determine how energy is transported through the vastness of space. This knowledge provides insights into the life cycle of stars and helps us unravel the mysteries of the universe. ### My Personal Reflection As a mathematician, studying stable diffusion infinite has been a captivating journey for me. It has allowed me to explore the limits of stability and witness the elegance of mathematical concepts in the infinite realm. The intertwining of theory and real-world applications inspires me to delve deeper into the mysteries of stability and its role in shaping our understanding of the universe. ## Conclusion Stable diffusion infinite is a captivating field that delves into the stability of systems that extend infinitely. From its foundations in mathematics to its applications in science and engineering, this concept provides valuable insights into the behavior of complex systems. As we continue to push the boundaries of knowledge, stable diffusion infinite will undoubtedly play a vital role in unraveling the mysteries of the infinite realm.
575
3,284
{"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-2024-18
longest
en
0.897267
https://responsivedesigntool.com/qa/quick-answer-how-many-grams-is-a-cup-of-grated-parmesan.html
1,604,168,992,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107922411.94/warc/CC-MAIN-20201031181658-20201031211658-00666.warc.gz
487,574,800
8,981
# Quick Answer: How Many Grams Is A Cup Of Grated Parmesan? ## How many cups of flour is 100g? 3/4 cupsConvert 100 grams or g of flour to cups. 100 grams flour equals 3/4 cups.. ## How many cups is 20 grams of milk? How much is 20 grams of milk?…Volume of 20 Grams of Milk.20 Grams of Milk =0.07Imperial Cups0.08Metric Cups19.55Milliliters3 more rows ## How many grams is a cup of grated cheese? Approximate conversionsAlmonds, slivered108 grams = 4 ouncesButter1 cup = 227 grams = 8 ouncesCheese (grated)1 cup = 125g = 4 ouncesCocoa125 g = 4.4 ouncesCoconut1 cup = 125g = 4 ounces24 more rows ## How much does 1/4 cup grated cheese weigh? There cannot be too much cheese. Always… Well, 1/4 cup is 2 oz. ## How much does 1 cup of grated cheese weigh? FAQs: Measuring Cheese For soft or crumbly cheeses, 1 cup is equivalent to 6 ounces. For semi-hard cheeses like cheddar, 1 cup is equivalent to 4 ounces. Finally, for un-grated hard cheeses like parmesan, 1 cup is equivalent to 3 ounces. For smaller amounts use ½ a cup and divide the corresponding ounces by half. ## How many cups is 8 oz shredded cheese? 2 cups8 oz by weight of shredded cheese equals 2 cups (16 oz) by volume. ## How many cups is 40g grated cheese? So, 40 grams of cheddar looks like a piece of the package pictured about 3/4 inch long. 1/4 pound (115 g) of grated cheddar is one cup. So, 40 g of grated cheddar looks like about 1/3 cup (about 10 g per tablespoon). ## How do you convert grams into cups? Convert between cups and grams for popular baking and cooking ingredients – from flour, sugar and fats to nuts and fruits….Butter.CupsGramsOunces1 cup227 g8 oz3/4 cup113.5 g4 oz2/3 cup75.7 g2.7 oz1/2 cup56.8 g2 oz ## How many cups is 200 grams of desiccated coconut? 2200 grams of desiccated coconut = 2 US cups + 2 tablespoons of desiccated coconut. ## How many grams are in a cup? 128 gDry GoodsCupsGramsOunces1/2 cup64 g2.25 oz2/3 cup85 g3 oz3/4 cup96 g3.38 oz1 cup128 g4.5 oz3 more rows•May 28, 2014 ## How much grated Parmesan equals shredded? Parmesan cheese, however, is slightly different. One pound of this cheese equals about 4 1/2 cups grated which makes 1/4 pound come out to about 1 1/4 cups grated. ## How many cups is 16 oz shredded cheese? Grated cheese Conversion Chart Near 4 ouncesounces to US cups of Grated cheese16 ounces=5.46 (5 1/2 ) US cups17 ounces=5.8 (5 3/4 ) US cups18 ounces=6.14 (6 1/8 ) US cups19 ounces=6.49 (6 1/2 ) US cups21 more rows ## How many cups is 40g of parmesan? Cream Cheese/Soft CheeseUS cupsAmount in GramsAmount in Ounces1/3 cup40g1.5 oz1/2 cup60g2 oz2/3 cup80g3 oz3/4 cup90g3.25 oz3 more rows ## How do you measure grated cheese? When measuring semi-hard cheeses, such as cheddar, Swiss or mozzarella, by weight, it is generally accepted that 4 ounces yields 1 cup shredded cheese, or in answer your question, yes, 8 ounce of shredded cheese will fit into a 2-cup volume measuring cup. ## How many cups is 100 grams of Parmesan cheese? How many spoons are in 100 grams of grated (shredded) parmesan? 100 grated (shredded) parmesan = 1 cup of grated parmesan or 10 tablespoons of grated (shredded) parmesan. ## How many grams is 2 cups of shredded cheese? 166 gramsUS cup to Gram Conversion Chart – Grated cheeseUS cups to grams of Grated cheese1 US cup=83 grams2 US cups=166 grams4 US cups=332 grams5 US cups=415 grams19 more rows ## How many cups is 4 oz of grated Parmesan cheese? Ounce to US cup Conversion Chart – Grated parmesan cheeseounces to US cups of Grated parmesan cheese4 ounces=1.26 ( 1 1/4 ) US cups5 ounces=1.58 ( 1 1/2 ) US cups8 ounces=2.52 ( 2 1/2 ) US cups1/16 ounce=0.0197 US cup19 more rows ## Can I use grated Parmesan instead of shredded for Alfredo sauce? This Alfredo sauce uses Parmesan cheese – you need freshly grated or shredded Parmesan cheese. Do not use the powdered Parmesan cheese from the can – it has grainy texture. If you don’t have freshly grated or shredded Parmesan cheese, you can substitute it with Gruyere cheese or shredded Mozzarella cheese. ## How much does 1 cup of grated Parmesan weigh? 1 cup of grated parmesan cheese in ouncesIngredient:gram kilogram pound ounceCalculate!Significant Figures: 2 3 4 5Results 1 US cup of grated parmesan cheese weighs 3.17 ( ~ 3 1/8) ounces. (*) (*) or precisely 3.1712536917673 ounces. All values are approximate.6 more rows ## Is 100g 4 oz? WeightGramsPounds/ounces100g4oz125g5oz150g6oz200g7oz15 more rows ## How many cups is 125 grams? 0.53 cupsHow many cups is 125 grams? – 125 grams is equal to 0.53 cups.
1,368
4,563
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.265625
3
CC-MAIN-2020-45
latest
en
0.899038
https://www.sciences360.com/index.php/how-capacitors-work-2-6358/
1,638,414,815,000,000,000
text/html
crawl-data/CC-MAIN-2021-49/segments/1637964361064.69/warc/CC-MAIN-20211202024322-20211202054322-00255.warc.gz
1,046,133,601
7,651
Physics How Capacitors Work Tweet John Traveler's image for: "How Capacitors Work" Caption: Location: Image by: Next to resistors and inductors,  the capacitor is one of the simplest of electronic components to understand. The capacitor is referred to as a static electrical charge device because it is comprised of two plates upon which either a surplus or deficiency of electrons are amassed, hence a static electrical charge. The plate exhibiting the greatest number of electrons is said to have the highest negative charge and the opposite plate with fewer or no electrons the more positive charge. The plates of the capacitor are separated by an insulator material and the ratio of the charge on either plate to the potential difference between the plates is referred to as the property of capacitance. The unit of measure for capacitance is the “farad” named in honor of English physicists Michael Faraday who made monumental contributions to human understanding of electricity and magnetism in the 19th century. In addition to the relative square surface area of the plates of a capacitor, the material used as an insulator can also effect the value of capacitance of a device. This effect is known as the “dialectic constant.” The dialectic constant of a capacitor contributes to a property known as capacitive resistance and there are two variations of capacitors associated with this property. Capacitors with a non-electrolytic dielectric can be charged in either direction, while capacitors with an electrolytic dielectric can only be charged in one direction. In other words, one plate of an electrolytic capacitor will always hold the positive charge, and the other a negative  one. Also, electrolytic capacitors exhibit higher capacitance than non-electrolytic ones for the same plate surface area. (Incidentally, a footnote with respect to electrolytic capacitors might be appropriate here: when electrolytic capacitors are installed backwards in a D/C circuit they tend to break down and disintegrate, in other words blow up.) In D/C  electronic circuit applications a capacitor most often functions like a battery to provide damping or as an insulator to isolate different D/C potentials. Power supplies which rectify A/C currents to produce D/C currents commonly use large electrolytic capacitors to dampen A/C ripple and provide a pure constant voltage. Essentially, in a damping application, the capacitor in a D/C circuit is charged to the desired voltage potential. If the voltage begins to drop below that potential, the capacitor begins to discharge maintaining a constant current flow.  Most often a second capacitor is used to shunt the higher frequency peak voltage component of the A/C ripple voltage to ground. Capacitors in D/C circuits were once referred to as “condensers” as they could be charged up to a D/C potential and then discharged to provide a highly "condensed" instantaneous current. For instance, older automobiles ( pre-electronic ignition) used such condensers to build a 6 or12 volt D/C charge while the points are in the open position. When the points are mechanically closed, The capacitor discharges with high current through the primary winding of the induction coil to ground. This high current in the primary of the induction coil produces a high voltage (30-60KV) in the secondary winding of the coil, which when felt at the spark plug jumps the gap producing the spark that ignites the gas air mixture in the cylinder. Understanding how capacitors work in A/C electronic circuit applications is a little more complicated, because in addition to the property of capacitive resistance, the property of capacitive reactance must be taken into account. Reactance is defined as the non-resistive opposition to current flow in an A/C circuit. For a given value of capacitance, the reactance of a capacitor changes depending on the frequency of the A/C signal applied. For instance, a capacitor with a high value of capacitance may look like a short to a lower frequency A/C signal while it appears as an open to a higher frequency A/C signal. In other words, if an appropriate capacitance value is chosen, a capacitor can be used either to block or promote current flow at a given frequency. This property of capacitors is very useful in filtering out signals of different frequencies. In A/C circuits a range of filtering techniques, usually including combinations of capacitors and inductors are used to filter specific frequencies, or  as band-pass and band-reject filters. With respect to radio frequency receivers, all of these techniques are used to modulate and demodulate intelligence on a transmitter/receiver carrier frequency. On older radios, a variable capacitor with an air dialectic was used to adjust the receiver to the carrier frequency. Newer digital receivers use semiconductor switches to switch different values of capacitance in and out of a circuit accomplishing the same thing. Today’s electronic circuits are full of capacitors exploiting both the D/C as well as A/C properties  of the devices. They are most often found in conjunction with coils and chokes to design frequency sensitive circuit applications. We end with a safety warning about capacitors, particularly large electrolytic ones. These devices can develop a high voltage charge just from air molecules rubbing up against their contacts, and therefore represent a significant electrical shock hazard. In fact, capacitive discharge is a technique incorporated in defibrillating machines used to shock  the heart into a normal rhythm or even start or stop it. As such, capacitors are electronic devises which demand cautionary respect when handling them. Sources:
1,118
5,712
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.90625
3
CC-MAIN-2021-49
longest
en
0.928612
https://www.savemyexams.co.uk/notes/a-level-physics-cie-until-2021/19-oscillations-pre/19-1-simple-harmonic-motion-pre/19-1-5-shm-graphs-pre/
1,611,413,898,000,000,000
text/html
crawl-data/CC-MAIN-2021-04/segments/1610703538082.57/warc/CC-MAIN-20210123125715-20210123155715-00186.warc.gz
980,603,171
142,824
19.1.5 SHM Graphs SHM Graphs • The displacement, velocity and acceleration of an object in simple harmonic motion can be represented by graphs against time • All undamped SHM graphs are represented by periodic functions • This means they can all be described by sine and cosine curves • Key features of the displacement-time graph: • The amplitude of oscillations x0 can be found from the maximum value of x • The time period of oscillations T can be found from reading the time taken for one full cycle • The graph might not always start at 0 • If the oscillations starts at the positive or negative amplitude, the displacement will be at its maximum • Key features of the velocity-time graph: • It is 90o out of phase with the displacement-time graph • Velocity is equal to the rate of change of displacement • So, the velocity of an oscillator at any time can be determined from the gradient of the displacement-time graph: • An oscillator moves the fastest at its equilibrium position • Therefore, the velocity is at its maximum when the displacement is zero • Key features of the acceleration-time graph: • The acceleration graph is a reflection of the displacement graph on the x axis • This means when a mass has positive displacement (to the right) the acceleration is in the opposite direction (to the left) and vice versa • It is 90o out of phase with the velocity-time graph • Acceleration is equal to the rate of change of velocity • So, the acceleration of an oscillator at any time can be determined from the gradient of the velocity-time graph: • The maximum value of the acceleration is when the oscillator is at its maximum displacement Worked example: Using SHM graph data Step 1:            The velocity is at its maximum when the displacement x = 0 Step 2:            Reading value of time when x = 0 From the graph this is equal to 0.2 s Exam Tip These graphs might not look identical to what is in your textbook, depending on where the object starts oscillating from at t = 0 (on either side of the equilibrium, or at the equilibrium). However, if there is no damping, they will all always be a general sine or cosine curves. Author: Katie Katie has always been passionate about the sciences, and completed a degree in Astrophysics at Sheffield University. She decided that she wanted to inspire other young people, so moved to Bristol to complete a PGCE in Secondary Science. She particularly loves creating fun and absorbing materials to help students achieve their exam potential. Close
541
2,523
{"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.4375
4
CC-MAIN-2021-04
latest
en
0.892884
https://efoutem.ml/64303.jsp
1,579,738,356,000,000,000
text/html
crawl-data/CC-MAIN-2020-05/segments/1579250607596.34/warc/CC-MAIN-20200122221541-20200123010541-00330.warc.gz
421,072,751
3,914
# Skip counting by 5's number line ##### 2020-01-23 00:12 Number Line (0 to 1000) marks at 10s, numbers at 100s Number Line ( 0 to 100 ) numbers at 1s split into five lines Number Line Counting by 2s (0 to 50 with numbers at twos)To skip count you add the same number over and over. You can start at any number. When you count normally (like 1, 2, 3, 4, 5, 6) you add 1 to get the next number. skip counting by 5's number line 2. NA. 4 Continue number patterns based on ones, twos, fives, and tens. 61 learning outcomes click to view Samples: Write numbers to 30. Comparing numbers to 30. Number line. Counting to 10 on the Number Line. 3 Year 3. 3. NA Number and algebra. 3. NA. 3 Continue spatial patterns and number patterns based on simple addition or subtraction. Skip Counting by 10s. Skip Counting by 10s is the easiest. It is like normal counting (1, 2, 3, ) except there is an extra 0 : Skip Counting by 5s. Skip Counting by 5s has a nice pattern: 5, 10, 15, 20, 25, Skip Count on the Number Line. Also try skip counting on the number line. As a class, share and discuss the answers to the skip counting by 5s robot strips. Wrapping Up As a class, play a game of SamYukGu, skip counting by 5s and clapping on every fifth number.skip counting by 5's number line Counting By 5s Number Line. Showing top 8 worksheets in the category Counting By 5s Number Line. ## Skip counting by 5's number line free Book Report Critical Thinking Pattern Pattern Number Patterns Pattern Shape Patterns Easter Feelings& Emotions Grades Fifth Grade First Grade First Grade Fractions Fourth Grade Kindergarten Worksheets Kindergarten Addition Kindergarten Subtraction PreK Worksheets Preschool Worksheets Color, Trace& Draw Coloring Color by Number Spring skip counting by 5's number line Answer Key Skip count by 5s to complete each number line. Number Line Skip Count by 5s Level 1: S1 Printable Math Worksheets @ These worksheets are great tools for teaching kids to count by 5s. Count five, ten, fifteen, twenty, twentyfive, and so on. Click on the the core icon below specified worksheets to see connections to the Common Core Standards Initiative. Skip counting is a skill that progresses as the children broaden the range of numbers. Exclusive worksheets are available for skip counting by 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 11s and 12s. Each webpage contains enormous worksheets to reinforce the knowledge in skip counting. Rating: 4.33 / Views: 594
657
2,454
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.21875
3
CC-MAIN-2020-05
latest
en
0.890521
https://www.gamedev.net/forums/topic/183932-adding-up-bounding-spheres/
1,540,040,709,000,000,000
text/html
crawl-data/CC-MAIN-2018-43/segments/1539583512750.15/warc/CC-MAIN-20181020121719-20181020143219-00084.warc.gz
945,261,216
27,140
Archived This topic is now archived and is closed to further replies. This topic is 5492 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic. Recommended Posts Hi, Is there a quick way to add up many spheres into 1 big bounding sphere? Right now, I find create the bounding sphere encompassing all the points ( position of each sphere ). Then I add to the big bounding sphere radius the maximum radius of those little spheres. This doesn''t give me the optimal (near optimal) solution though. Any thoughts? Share on other sites Set min.x, min.y, min.z to very large value (1e8)Set max.x, max.y, max.z to very small negative value (-1e8)For each bounding sphere pmin.x = sphere center.x - sphere radius (repeat for y and z) pmax.x = sphere center.x + sphere radius (repeat for y and z) if(pmin.x < min.x) min.x = pmin.x (repeat for y and z) if(pmax.x > max.x) max.x = pmax.x (repeat for y and z)min and max now represent 2 corners of a cubeFind the center of the cube: (max + min) / 2Uber-sphere radius: distance from center to either min or maxThat should work for you. Share on other sites I would use the same center C for the sphere that ApochPiQ proposed, but for the radius, consider using the maximum over all spheres S of (distance(C,S.center)+S.radius). If you need an optimum solution, I can think of a method to find it, but it''s O(number_of_spheres^4) and not too easy to code. Share on other sites Thanks for the help guys. I didn''t think of converting the problem to bounding box first ... ApochPiQ: is there a way to remove the computation of the sqrt when calculating (distance(C,S.center)+S.radius). Share on other sites I remember the article about dynamic sphere tree in the games programming gems ||, by ratcliff, and they had this function to recompute a tight bounding sphere around a cluster of points. /*An Efficient Bounding Sphereby Jack Ritterfrom "Graphics Gems", Academic Press, 1990*//* Routine to calculate tight bounding sphere over *//* a set of points in 3D *//* This contains the routine find_bounding_sphere(), *//* the struct definition, and the globals used for parameters. *//* The abs() of all coordinates must be < BIGNUMBER *//* Code written by Jack Ritter and Lyle Rains. */#define BIGNUMBER 100000000.0 /* hundred million */void Sphere::Compute(const SphereInterface &source){ Vector3f xmin( BIGNUMBER, BIGNUMBER, BIGNUMBER); Vector3f xmax(-BIGNUMBER,-BIGNUMBER,-BIGNUMBER); Vector3f ymin( BIGNUMBER, BIGNUMBER, BIGNUMBER); Vector3f ymax(-BIGNUMBER,-BIGNUMBER,-BIGNUMBER); Vector3f zmin( BIGNUMBER, BIGNUMBER, BIGNUMBER); Vector3f zmax(-BIGNUMBER,-BIGNUMBER,-BIGNUMBER); Vector3f dia1; Vector3f dia2; int count = source.GetVertexCount(); int i; for (i=0; i<count; i++) { Vector3f caller_p; source.GetVertex(i,caller_p); if (caller_p.x<xmin.x) xmin = caller_p; /* New xminimum point */ if (caller_p.x>xmax.x) xmax = caller_p; if (caller_p.y<ymin.y) ymin = caller_p; if (caller_p.y>ymax.y) ymax = caller_p; if (caller_p.z<zmin.z) zmin = caller_p; if (caller_p.z>zmax.z) zmax = caller_p; } /* Set xspan = distance between the 2 points xmin & xmax (squared) */ float dx = xmax.x - xmin.x; float dy = xmax.y - xmin.y; float dz = xmax.z - xmin.z; float xspan = dx*dx + dy*dy + dz*dz; /* Same for y & z spans */ dx = ymax.x - ymin.x; dy = ymax.y - ymin.y; dz = ymax.z - ymin.z; float yspan = dx*dx + dy*dy + dz*dz; dx = zmax.x - zmin.x; dy = zmax.y - zmin.y; dz = zmax.z - zmin.z; float zspan = dx*dx + dy*dy + dz*dz; /* Set points dia1 & dia2 to the maximally separated pair */ dia1 = xmin; dia2 = xmax; /* assume xspan biggest */ float maxspan = xspan; if (yspan>maxspan) { maxspan = yspan; dia1 = ymin; dia2 = ymax; } if (zspan>maxspan) { dia1 = zmin; dia2 = zmax; } /* dia1,dia2 is a diameter of initial sphere */ /* calc initial center */ mCenter.x = (dia1.x+dia2.x)*0.5f; mCenter.y = (dia1.y+dia2.y)*0.5f; mCenter.z = (dia1.z+dia2.z)*0.5f; /* calculate initial radius**2 and radius */ dx = dia2.x-mCenter.x; /* x component of radius vector */ dy = dia2.y-mCenter.y; /* y component of radius vector */ dz = dia2.z-mCenter.z; /* z component of radius vector */ mRadius2 = dx*dx + dy*dy + dz*dz; mRadius = float(Asura_Maths::Sqrt(mRadius2)); /* SECOND PASS: increment current sphere */ for (i=0; i<count; i++) { Vector3f caller_p; source.GetVertex(i,caller_p); dx = caller_p.x-mCenter.x; dy = caller_p.y-mCenter.y; dz = caller_p.z-mCenter.z; float old_to_p_sq = dx*dx + dy*dy + dz*dz; if (old_to_p_sq > mRadius2) /* do r**2 test first */ { /* this point is outside of current sphere */ float old_to_p = float(Asura_Maths::Sqrt(old_to_p_sq)); /* calc radius of new sphere */ mRadius = (mRadius + old_to_p) * 0.5f; mRadius2 = mRadius*mRadius; /* for next r**2 compare */ float old_to_new = old_to_p - mRadius; /* calc center of new sphere */ float recip = 1.0f /old_to_p; float cx = (mRadius*mCenter.x + old_to_new*caller_p.x) * recip; float cy = (mRadius*mCenter.y + old_to_new*caller_p.y) * recip; float cz = (mRadius*mCenter.z + old_to_new*caller_p.z) * recip; mCenter.x = cx; mCenter.y = cy; mCenter.z = cz; } }} dunno if I am actually allowed to post that code, and how useful it is for you, but there you go. I'd guess, all you have to do after, is expand the big sphere with the radius of the child spheres, if a child spheres pierces through the bounding sphere, or if all your spheres have a similar radius, just add the radius of the child spheres to the bounding sphere. [edited by - oliii on October 7, 2003 8:43:26 AM] 1. 1 Rutin 30 2. 2 3. 3 4. 4 5. 5 • 13 • 14 • 11 • 10 • 14 • Forum Statistics • Total Topics 632961 • Total Posts 3009496 • Who's Online (See full list) There are no registered users currently online ×
1,819
5,813
{"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.046875
3
CC-MAIN-2018-43
latest
en
0.870425
http://www.phy.ntnu.edu.tw/ntnujava/msg.php?id=6684
1,556,194,557,000,000,000
text/html
crawl-data/CC-MAIN-2019-18/segments/1555578721441.77/warc/CC-MAIN-20190425114058-20190425140058-00130.warc.gz
282,996,713
1,118
It depends on the maximum current you need to flow through the circuit, For the same RC value, with smaller R, bigger C: you will have larger maximum current and more energy stored in the capacitor. YOu might need this for C to act as another power device. with larger R,smaller C: you will have smaller maximum current and less energy stored in the capacitor.you might need this for using RC as timing device. [quote]m delaying the continous square wave signal through an RC circuit ...[/quote] I do not understand why square wave can be delayed with RC circuit? The wave form will be changed. It is not a delayed waveform. Please describe in detail what is your application (and specification). 20 ns is a very short time. If you just need to delay signal, you should use a coaxial cable with length $L=3\cdot10^8 \times 2\cdot10^{-9}=0.6 \,\rm{m}$.
204
854
{"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": 1, "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-2019-18
longest
en
0.919487
https://library.isical.ac.in/cgi-bin/koha/opac-detail.pl?biblionumber=354539
1,606,242,935,000,000,000
text/html
crawl-data/CC-MAIN-2020-50/segments/1606141176922.14/warc/CC-MAIN-20201124170142-20201124200142-00094.warc.gz
378,782,672
16,697
Online Public Access Catalogue (OPAC) Library,Documentation and Information Science Division “A research journal serves that narrow borderland which separates the known from the unknown” -P.C.Mahalanobis Normal view MARC view ISBD view # Excel for the math classroom [electronic resource] / by Bill Hazlett with Bill Jelen. Material type: TextPublisher: Union Town, Ohio : Holy Macro! Books, c2007Description: 1 online resource (iv, a-f, 243 p.) : ill.ISBN: 1932802592 (electronic bk. : Adobe Reader); 9781932802597 (electronic bk. : Adobe Reader).Genre/Form: Electronic books. | Computer network resources.Additional physical formats: Print version:: Excel for the math classroom.DDC classification: 510/.285/554 Online resources: EBSCOhost Contents: Front Cover; Table of Contents; Dedications; Acknowledgements; About the Authors; Preface; Calculation Basics; Printing Grid Paper; Cartesian Coordinate Grids; Multiplication Tables; Math Exercise Sheets; Arithmetic Facts Quiz; Homework Checker; Magic Squares; Coordinate Grid Matching; Math Art; Candy Bar Fractions; Math Facts Game; Secret Code Maker; Probability with Coins or Dice; Demonstrating and Comparing Fractions with Charts; Finding Maximum Area and Volume; Solving Systems of Equations; Index; Back Cover. Tags from this library: No tags from this library for this title. No physical items for this record Includes index. Front Cover; Table of Contents; Dedications; Acknowledgements; About the Authors; Preface; Calculation Basics; Printing Grid Paper; Cartesian Coordinate Grids; Multiplication Tables; Math Exercise Sheets; Arithmetic Facts Quiz; Homework Checker; Magic Squares; Coordinate Grid Matching; Math Art; Candy Bar Fractions; Math Facts Game; Secret Code Maker; Probability with Coins or Dice; Demonstrating and Comparing Fractions with Charts; Finding Maximum Area and Volume; Solving Systems of Equations; Index; Back Cover. Description based on print version record. There are no comments for this item.
437
1,995
{"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-2020-50
latest
en
0.738016
https://askfunnels.com/northwest-territories/shear-stress-definition-with-example.php
1,643,047,123,000,000,000
text/html
crawl-data/CC-MAIN-2022-05/segments/1642320304572.73/warc/CC-MAIN-20220124155118-20220124185118-00498.warc.gz
171,455,591
12,273
# Northwest Territories Shear Stress Definition With Example ## Defining Yield Stress and Failure Stress (Strength) ### Transverse Shear Stresses in Beams ( ) Transverse Shear Stresses in Beams ( ). Beam shear is defined as the internal shear stress of a beam caused by the shear force applied to the beam. Example. Considering a 2D space in cartesian, This is the definition of stress What is the stress? Worked Example 2: Tensile, Compressive and Shear stress.. ### Viscosity and Shear Stress Example Fluid Mechanics YouTube shear Definition of shear in English by Oxford Dictionaries. One book defines the shear stress $\tau$ of a (Newtonian) fluid as $$\tau = \eta \frac{\partial v}{\partial r}$$ where $\eta$ is the viscosity. There is not much, This is the definition of stress What is the stress? Worked Example 2: Tensile, Compressive and Shear stress.. Shearing forces are unaligned forces pushing one part of a body in one specific direction, and another part of the body in the opposite direction. Shear Stress Definition - Shear Stress is the shear force per unit area acted on by shear force to sustain a constant rate of fluid movement. It... normal stress, shear stress, bulk stress, Lecture 10 (Elasticity) Example S2. A glass cube One book defines the shear stress $\tau$ of a (Newtonian) fluid as $$\tau = \eta \frac{\partial v}{\partial r}$$ where $\eta$ is the viscosity. There is not much Shearing forces are unaligned forces pushing one part of a body in one specific direction, and another part of the body in the opposite direction. Looking for online definition of shear in the Medical Dictionary? shear An example of a shearing force is seen when a patient slumps in shear stress. the Shear Strength Definition Shear strength is the maximum shear stress which a material can withstand without rupture. It's the maximum load required to cut off Shear Strength Definition Shear strength is the maximum shear stress which a material can withstand without rupture. It's the maximum load required to cut off A form of stress that subjects an object to which force is applied to skew, tending to cause shear strain. For example, shear stress on a block of wood would arise by Shear stress is calculated by dividing the force exerted on an object by that object's How Do I Calculate Shear Stress? What Is the Definition of Internal Determination of shear stress Shear rate and viscosity are directly related to the properties of the fluid. Non-Newtonian fluids are governed by a non-linear Shear Strain Definition - Shear strain is the ratio of deformation to original dimensions. In the case of shear strain, it is the amount of... Shearing stress is a force that causes layers or parts to slide upon each other in opposite directions. An example of shearing stress is the force of two connecting Define Wall shear stress. English dictionary definition of Wall shear stress. n. in terms of the relationship of the wall shear stress to the wall shear Calculation of Bed Shear Stress. Reach-Averaged Method. Mean Bed Shear Stress - force per unit area exerted by a “block” of water on the channel boundary as it moves Pressure is an example of a normal stress, and acts inward, toward the surface, Definition of shear stress - Shear stress is defined as a force per unit area, Calculation of Bed Shear Stress. Reach-Averaged Method. Mean Bed Shear Stress - force per unit area exerted by a “block” of water on the channel boundary as it moves Shear modulus: Shear modulus by definition, x/y. The shear modulus itself may be expressed mathematically as. shear modulus = (shear stress)/(shear strain) = 2/11/2015В В· Normal & Shear Stress Old Exam Question Lesson 3 - Shear Stress Example, Single and Double - Duration: Average Shear Stress and Simple Connections Home В» SHEAR CENTRE -WITH EXAMPLES Assuming a uniform distribution of shear stress EXAMPLE – 2. TO DETERMINE THE SHEAR CENTRE FOR THE SECTION SHOWN IN FIGURE: 3 Components of Stress On a real or imaginary plane through a material, there can be normal forces and shear forces. These forces create the stress Shear modulus: Shear modulus by definition, x/y. The shear modulus itself may be expressed mathematically as. shear modulus = (shear stress)/(shear strain) = Definition of shear in English: shear. More example sentences ‘The viscosity is defined as the ratio of shear stress to strain rate, Mechanical Properties - Stresses & Strains By definition, What is the shear stress П„ along the direction m = 0, 1, Shear Strength Definition Shear strength is the maximum shear stress which a material can withstand without rupture. It's the maximum load required to cut off 2/11/2015В В· Normal & Shear Stress Old Exam Question Lesson 3 - Shear Stress Example, Single and Double - Duration: Average Shear Stress and Simple Connections translation and definition "dynamic stress", Example sentences with "dynamic stress", together with the dynamic bulk stress and dynamic surface shear stress, Shear Strength Definition Shear strength is the maximum shear stress which a material can withstand without rupture. It's the maximum load required to cut off Shear Stress Definition - Shear Stress is the shear force per unit area acted on by shear force to sustain a constant rate of fluid movement. It... Shear definition is an action or stress resulting from applied forces that causes or tends to cause two contiguous parts of a body Examples of shear in a Shear stress refers to a type of shear which makes the shearing surfaces to glidetoward each other Benchmarking for milling machine + example of the required This is the definition of stress What is the stress? Worked Example 2: Tensile, Compressive and Shear stress. ### What is Shear Stress? Definition from Petropedia Shear stress dictionary definition shear stress defined. One book defines the shear stress $\tau$ of a (Newtonian) fluid as $$\tau = \eta \frac{\partial v}{\partial r}$$ where $\eta$ is the viscosity. There is not much, Calculation of Bed Shear Stress. Reach-Averaged Method. Mean Bed Shear Stress - force per unit area exerted by a “block” of water on the channel boundary as it moves. dynamic stress definition - English - Glosbe. Shear modulus: Shear modulus by definition, x/y. The shear modulus itself may be expressed mathematically as. shear modulus = (shear stress)/(shear strain) =, The mathematical definition of stress is As with the last example В­ the cube, the stress ellipsoid is none of the infinite plans feel a shear stress,. ### dynamic stress definition - English - Glosbe Definition of Shear Force And Shear Stress Chegg.com. Shear in Bending. Internal stresses a definition of shear force in a beam. as you might have guessed, shear stress it is not uniform throughout the cross-section. Shear stress: Shear stress, by definition, yield to shear stresses no matter how small the force per unit of area is called shear stress. For example,. BEAMS: BENDING STRESS by Dr. Ibrahim A. Assakkaf Definition A beam may be axial loading and shear stress due to Shear stress definition, the external force acting on an object or surface parallel to the slope or plane in which it lies; the stress tending to produce shear. See more. If the maximum shear stress Fig. 7.5 Examples of Stress Paths . 7-8 This demonstrates that q is the same regardless of whether total stresses or effective Shear stress refers to a type of shear which makes the shearing surfaces to glidetoward each other Benchmarking for milling machine + example of the required 2/11/2015В В· Normal & Shear Stress Old Exam Question Lesson 3 - Shear Stress Example, Single and Double - Duration: Average Shear Stress and Simple Connections Statics and Mechanics of Materials Stress, • The corresponding average shear stress is, Definition of stress. Shear Stress and Shear Strain: When Ok. let’s take an example to understand the scenario. Shear Stress Rigidity is by definition “The ratio of the shear Shearing forces are unaligned forces pushing one part of a body in one specific direction, and another part of the body in the opposite direction. Mechanical Properties - Stresses & Strains By definition, What is the shear stress П„ along the direction m = 0, 1, Shear stress definition: the form of stress in a body, part, etc, that tends to produce cutting rather than... Meaning, pronunciation, translations and examples Looking for online definition of shear in the Medical Dictionary? shear An example of a shearing force is seen when a patient slumps in shear stress. the Home В» SHEAR CENTRE -WITH EXAMPLES Assuming a uniform distribution of shear stress EXAMPLE – 2. TO DETERMINE THE SHEAR CENTRE FOR THE SECTION SHOWN IN FIGURE: Calculation of Bed Shear Stress. Reach-Averaged Method. Mean Bed Shear Stress - force per unit area exerted by a “block” of water on the channel boundary as it moves 29/01/2015В В· http://goo.gl/z20oaz for more FREE video tutorials covering Fluid Mechanics. In this video we are presented with an example of a 0.5m wide, 5m long belt Pressure is an example of a normal stress, and acts inward, toward the surface, Definition of shear stress - Shear stress is defined as a force per unit area, Determination of shear stress Shear rate and viscosity are directly related to the properties of the fluid. Non-Newtonian fluids are governed by a non-linear ## Defining Yield Stress and Failure Stress (Strength) Stress University of Sydney. Shear stress definition: the form of stress in a body, part, etc, that tends to produce cutting rather than... Meaning, pronunciation, translations and examples, Home В» SHEAR CENTRE -WITH EXAMPLES Assuming a uniform distribution of shear stress EXAMPLE – 2. TO DETERMINE THE SHEAR CENTRE FOR THE SECTION SHOWN IN FIGURE:. ### Definition of Shear Stress Chegg.com Defining Yield Stress and Failure Stress (Strength). Define Wall shear stress. English dictionary definition of Wall shear stress. n. in terms of the relationship of the wall shear stress to the wall shear, Chapter 1 Tension, Compression, and Shear Example 1-1 for a hollow definition of true stress "t = P / A. Shear force definition: Shear force is force that makes one surface of a substance move over another parallel... Meaning, pronunciation, translations and examples Define shear stress. shear stress synonyms, shear stress pronunciation, shear stress translation, English dictionary definition of shear stress. n. normal stress, shear stress, bulk stress, Lecture 10 (Elasticity) Example S2. A glass cube One book defines the shear stress $\tau$ of a (Newtonian) fluid as $$\tau = \eta \frac{\partial v}{\partial r}$$ where $\eta$ is the viscosity. There is not much Shear Stress Definition - Shear Stress is the shear force per unit area acted on by shear force to sustain a constant rate of fluid movement. It... Statics and Mechanics of Materials Stress, • The corresponding average shear stress is, Definition of stress. Shear modulus: Shear modulus by definition, x/y. The shear modulus itself may be expressed mathematically as. shear modulus = (shear stress)/(shear strain) = Shear definition is an action or stress resulting from applied forces that causes or tends to cause two contiguous parts of a body Examples of shear in a Shear stress definition, the external force acting on an object or surface parallel to the slope or plane in which it lies; the stress tending to produce shear. See more. Looking for online definition of shear stress in the Medical Dictionary? shear stress and self-doubt are all examples of conditions shear stress Shear. Frequently it is necessary to calculate the normal and the shear stress on an Example. The stress state at a point is Plane stress. Definition of plane Looking for online definition of Wall shear stress in the Medical Dictionary? shear stress Shear. (for example, Rayz, 2010). Using Define shear stress and strain. For example a strain of 0.000068 could be written as 68 x 10-6 but Shear stress is the force per unit area carrying Shear force definition: Shear force is force that makes one surface of a substance move over another parallel... Meaning, pronunciation, translations and examples Determination of shear stress Shear rate and viscosity are directly related to the properties of the fluid. Non-Newtonian fluids are governed by a non-linear Define Wall shear stress. English dictionary definition of Wall shear stress. n. in terms of the relationship of the wall shear stress to the wall shear Define shear stress. shear stress synonyms, shear stress pronunciation, shear stress translation, English dictionary definition of shear stress. n. Looking for online definition of shear in the Medical Dictionary? shear An example of a shearing force is seen when a patient slumps in shear stress. the Shear stress: Shear stress, by definition, yield to shear stresses no matter how small the force per unit of area is called shear stress. For example, Define shear stress. shear stress synonyms, shear stress pronunciation, shear stress translation, English dictionary definition of shear stress. n. Shear Stress and Shear Strain: When Ok. let’s take an example to understand the scenario. Shear Stress Rigidity is by definition “The ratio of the shear Here the concepts of stress analysis will be stated in a finite element context. That definition of the shear strain. For example, if Shear in Bending. Internal stresses a definition of shear force in a beam. as you might have guessed, shear stress it is not uniform throughout the cross-section. A form of stress that subjects an object to which force is applied to skew, tending to cause shear strain. For example, shear stress on a block of wood would arise by Yield Stress Definition uniaxial compression, shear, only a convenient approximation to the rigorous definition of yield stress in (1). In the examples the Define shear stress and strain. For example a strain of 0.000068 could be written as 68 x 10-6 but Shear stress is the force per unit area carrying Frequently it is necessary to calculate the normal and the shear stress on an Example. The stress state at a point is Plane stress. Definition of plane BEAMS: BENDING STRESS by Dr. Ibrahim A. Assakkaf Definition A beam may be axial loading and shear stress due to Shear strength is in our corpus but we don't have a definition yet. These example sentences show you how shear strength is used. These examples are from the Cambridge Looking for online definition of shear in the Medical Dictionary? shear An example of a shearing force is seen when a patient slumps in shear stress. the Chapter 1 Tension, Compression, and Shear Example 1-1 for a hollow definition of true stress "t = P / A The mathematical definition of stress is As with the last example В­ the cube, the stress ellipsoid is none of the infinite plans feel a shear stress, Normal & Shear Stress Old Exam Question YouTube. One book defines the shear stress $\tau$ of a (Newtonian) fluid as $$\tau = \eta \frac{\partial v}{\partial r}$$ where $\eta$ is the viscosity. There is not much, normal stress, shear stress, bulk stress, Lecture 10 (Elasticity) Example S2. A glass cube. ### Wall shear stress definition of Wall shear stress by Viscosity and Shear Stress Example Fluid Mechanics YouTube. Shear Stress and Shear Strain: When Ok. let’s take an example to understand the scenario. Shear Stress Rigidity is by definition “The ratio of the shear, A form of stress that subjects an object to which force is applied to skew, tending to cause shear strain. For example, shear stress on a block of wood would arise by. What is Shear stress and Shear strain? ExtruDesign. Shear in Bending. Internal stresses a definition of shear force in a beam. as you might have guessed, shear stress it is not uniform throughout the cross-section., 3 Components of Stress On a real or imaginary plane through a material, there can be normal forces and shear forces. These forces create the stress. ### Shear stress definition and meaning Collins English Shear force definition and meaning Collins English. Unlike shear force, Shear stress acts in a parallel to the surface. It causes one object to slip over another. Q&A related to Shear Force And Shear Stress. Shear stress definition: the form of stress in a body, part, etc, that tends to produce cutting rather than... Meaning, pronunciation, translations and examples. • Vascular Wall Shear Stress Basic Principles and Methods • What is Fluid Mechanics? mne.psu.edu • Shear stress definition and meaning Collins English • Mechanical Properties - Stresses & Strains By definition, What is the shear stress П„ along the direction m = 0, 1, Beam shear is defined as the internal shear stress of a beam caused by the shear force applied to the beam. Example. Considering a 2D space in cartesian Chapter 1 Tension, Compression, and Shear Example 1-1 for a hollow definition of true stress "t = P / A Here the concepts of stress analysis will be stated in a finite element context. That definition of the shear strain. For example, if The mathematical definition of stress is As with the last example В­ the cube, the stress ellipsoid is none of the infinite plans feel a shear stress, Shear stress is calculated by dividing the force exerted on an object by that object's How Do I Calculate Shear Stress? What Is the Definition of Internal Define shear stress and strain. For example a strain of 0.000068 could be written as 68 x 10-6 but Shear stress is the force per unit area carrying Shear Stress and Shear Strain: When Ok. let’s take an example to understand the scenario. Shear Stress Rigidity is by definition “The ratio of the shear shear stress and o oks/Cole, a division of Thoms change in height of specimen against shear displacement for loose В©2001 Br displacement for loose Stress parallel to a plane is usually denoted as "shear stress" and can be expressed as. П„ = F p / A (2) Example - Stress and Change of Length. This is the definition of stress What is the stress? Worked Example 2: Tensile, Compressive and Shear stress. normal stress, shear stress, bulk stress, Lecture 10 (Elasticity) Example S2. A glass cube Statics and Mechanics of Materials Stress, • The corresponding average shear stress is, Definition of stress. Pressure is an example of a normal stress, and acts inward, toward the surface, Definition of shear stress - Shear stress is defined as a force per unit area, Unlike shear force, Shear stress acts in a parallel to the surface. It causes one object to slip over another. Q&A related to Shear Force And Shear Stress. Frequently it is necessary to calculate the normal and the shear stress on an Example. The stress state at a point is Plane stress. Definition of plane Pressure is an example of a normal stress, and acts inward, toward the surface, Definition of shear stress - Shear stress is defined as a force per unit area, Shear force definition: Shear force is force that makes one surface of a substance move over another parallel... Meaning, pronunciation, translations and examples View all posts in Northwest Territories category
4,262
19,169
{"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.3125
3
CC-MAIN-2022-05
latest
en
0.891891
https://www.smore.com/f8mrh
1,534,268,035,000,000,000
text/html
crawl-data/CC-MAIN-2018-34/segments/1534221209216.31/warc/CC-MAIN-20180814170309-20180814190309-00198.warc.gz
1,004,333,848
12,337
# Ms. Webb's Weekly Words ## Language Arts First Graders have been comparing and contrasting fantasy and reality text. They have retold stories with details in the characters and setting and are starting to come up with their own questions and making inferences from what they know in a text to predict what will happen next. In grammar, we have worked on identifying the subject of a sentence and are now going to focus on replacing specific names with pronouns like he, she, they, or it. We are reading narratives this unit that are connected to an adventure of some kind. We will write our own narratives based on adventures we have experienced. Standard: RL.9. Compare and contrast the adventures and experiences of characters in stories. ## Math Last week the kids focused on place value review. They built with base ten blocks, made number bonds, and equations with tens and ones. They are also starting to write number words for numbers over 100. For example: 104 is one hundred and four. This week, they are reviewing estimation, number order, adding ones and tens, and comparing numbers within 120. Standards: Extend the counting sequence. 1. Count to 120, starting at any number less than 120. In this range, read and write numerals and represent a number of objects with a written numeral. Understand place value. 2. Understand that the two digits of a two-digit number represent amounts of tens and ones. Understand the following as special cases: a. 10 can be thought of as a bundle of ten ones—called a “ten.” b. The numbers from 11 to 19 are composed of a ten and one, two, three, four, five, six, seven, eight, or nine ones. c. The numbers 10, 20, 30, 40, 50, 60, 70, 80, 90 refer to one, two, three, four, five, six, seven, eight, or nine tens (and 0 ones). 3. Compare two two-digit numbers based on meanings of the tens and ones digits, recording the results of comparisons with the symbols >, =, and <. ## Social Studies This week and last week students are learning more about the leaders of a city, state, and national government. (the mayor, the governor, and the president.) They are also learning how a bill becomes a law. With that knowledge they are being active citizens in their community by writing letters to their representatives to try and get a bill passed about land conservation. ## Science Students are investigating with an experiment on how pinto bean seeds grow. They are recording their observations and making predictions for what they expect to see next. They are also reading and writing about the life cycle of a plant.
570
2,581
{"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-2018-34
latest
en
0.945034
http://www.math.cmu.edu/~rami/21-610.S05.HW.html
1,558,559,736,000,000,000
text/html
crawl-data/CC-MAIN-2019-22/segments/1558232256958.53/warc/CC-MAIN-20190522203319-20190522225319-00157.warc.gz
286,644,924
1,879
Homework is from Text: "Algebra" by T.W. Hungerford Springer-Verlag (GTM 73). Homework is due for the begining of the Wednesday lecture • Due Wednesday January 19: Section 1.1: 5, 7, 8, ,10, 13, 15 Section 1.2: 1, 2, 5, 8, 9, 11, Section 1.4: 1, Section 1.5: 1, 2, 6. • Due Wednesday January 26: Section 1.2: 18, 19(a), Section 1.3: 1, 2, 8, 9, Section 1.4: 5, 6, 8, Section 1.5: 11, 18. • Due Wednesday February 2: Section 1.5: 19, 21, Section 2.4: 1, 2, 3, 4, 5, 7, 9, Section 2.5: 2, Extra Problem: Suppose G is finite. If H is a proper subgroup then G is not equal to the union of all conjugates of H. • Due Wednesday February 9: Section 1.8: 5, 9, 13, Section 2.5: 3,5, 6, 13, Section 2.7: 4, 5. • Due Wednesday 23: Section 2.3: 1, 3, 5, 6, 8, 9, and 13, Section 2.7: 13. • Due Wednesday March 2: Section 3.1: 11, 12, 14, 18, Section 3.2: 1, 3, 10, 17, 18, 20. • Due Wednesday March 16: Section 3.6: 1, 9, 10, Section 8.4: 7 (this is not a typo!) Extra problem: Let F be a field and suppose R is a ring with 1. A ring homo from F to R must be injective. • Due Wednesday March 23: Section 8.2: 2, 5, 12(a), Section 8.7: 8(a),9, Section 3.4: 5, 7 • Due Wednesday March 30: Appendix of Chapter V: 8, 9, Section 6.1: 1, 2, 4, 6, 7, 8. • Due Wednesday April 6: Section 3.3: 10, 11, Section 5.1 (page 240): 1, 3, 10, 16, 19, 23, Section 5.2 (page 255): 1, 2. • Due Wednesday April 13: Compare the presentation in class (using pregeometries) to Section 1 of Chapter 6. Section 6.1: 3, Section 5.1: 7, 12, 18 and Section 5.2: 3, 6. • Due Friday April 22: Section 5.2: 16 Section 5.3: 1, 2, 5, 9, 10, Section 5.5: 1, 2. The first test was held on Wednesday, February 16. The grades where: 100x6, 98, 95, 90x2, 85, 80x2, 65x2 and 45. The results of the second midterm: 100x5, 99, 90x2, 85, 80x2, 68, 65x2, 60, 50. This course web page.
841
1,846
{"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-2019-22
latest
en
0.865966
https://www.lesswrong.com/posts/nEt2MhG8rbmvhrdjG/rationalist-clue
1,695,766,006,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233510225.44/warc/CC-MAIN-20230926211344-20230927001344-00375.warc.gz
950,061,584
42,296
# 38 (not by Parker Bros., or, for that matter, Waddingtons) A response to: 3 Levels of Rationality Verification Related to: Diplomacy as a Game Theory Laboratory It's a classic who-dun-it…only instead of using an all-or-nothing process of elimination driven by dice rolls and lucky guesses, players must piece together Bayesian clues while strategically dividing their time between gathering evidence, performing experiments, and interrogating their fellow players! ROOMS: Hematology Lab -- bring a blood sample over here, and you can find out one bit of information about the serotype…is it A or O? B or O? + or - ? The microscope knows. Don't know how to use a microscope? Try reading up on it in the Library. Autopsy Table -- bring a body part over here, and you can take an educated guess as to what kind of weapon caused the murder wounds. (Flip over 1 of 10 cards, 4 of which show the correct murder weapon and 6 of which are randomly distributed among the other five weapons.) The error in guesses doesn't correlate across body parts, so if you personally examine enough of them, or if you can persuade your fellow dinner-guests to bust out all the body parts at the same time, you should be able to get the right answer. Lie Detector -- bring a fellow player over here, and you can ask him/her a yes-or-no question and get some evidence as to whether it was answered honestly. Have the answerer roll a D10, add a secret constant unique to his/her character, multiply the sum by the truth value of his/her statement (1 for true, 2 for false), and then look up the number on a chart that returns the value "stress" or "no-stress."  It's up to the interrogator to figure out the correlation (if any) between stress and lying for each player! How do you get the other player into the Lie Detector room in the first place? Good question! When you figure it out, let me know…I have a paper I'd like you to co-author with me on the Prisoner's Dilemma. Plus the usual collection of Kitchens, Billiards Rooms, Parlours, and so forth. One room is inaccurately labeled. PIECES OF EVIDENCE: If you spend your turn searching a room, you might find… Blood stains -- most of them are either from the murderer or the victim, but some are not. You can take a sample so as to carry it with you to the Hematology Lab. Body parts -- all of them belong to Mr. Boddy, and all the parts are nice and portable…just the right size to shove one in your pocket and dash back to the autopsy table to sneak a peek by yourself. Of course, if you're feeling cooperative, it might be more efficient to get the gang together and lay all your cards, er, on the table, at the same time. Video footage of the murder -- just kidding. What kind of game did you think you were playing here, anyway? WHERE DID THE MURDER TAKE PLACE? The game rules chattily assure you that the murder did not take place in the Lab, on the Table, or by the Detectorbut of course this is simply disinformation coming from a source that you are likely to erroneously assume is authoritative, even though you have no firm evidence that the rulebook is a reliable narrator. You don't need to know where the murder took place to win, as each player only gets one guess, and there are 36 weapon * character possibilities, which is a lot to sift through with just a handful of sadistic clues. However, for bonus points, you can try noticing that most of the useful clues come from the same room, and that the murderer knows where (s)he killed Mr. Boddy, so if you ask real nicely you might be able to ask him/her a few thoughtful questions over at the Lie Detector. HOW DOES THE GAME END? Once you realized Mr. Boddy had been killed on a dark, snowy night that shut down all travel in and out of the mansion, one of you took the precaution of activating the house's high-tech security cameras -- the murderer will not kill again this night. Rather, you will all dither endlessly until all but one of you can agree on a prime suspect, at which point you will join forces, handcuff him or her to the telescope in the Observatory, and wait for the snowplow to come through and the police to arrive, at which point you will find out just how right (or wrong) you were. This has the distinct advantage that if most people want to stop playing they can rule-fully end the game at any time. Note, by the way, that while I hope at least some parts of my description are funny, this is not really a joke -- I would like to design this board game and then playtest it with casual Less Wrong readers to see if it motivates us or otherwise helps us to test, develop, or practice rationality skills. If you have feedback about either the game's playability or its educational value, I'd love to hear it. # 38 New Comment If you did design this game, The game rules chattily assure you that the murder did not take place in the Lab, on the Table, or by the Detector…but of course this is simply disinformation coming from a source that you are likely to erroneously assume is authoritative, even though you have no firm evidence that the rulebook is a reliable narrator. ...should be in the rulebook. Agreed. Especially since not everyone will read the rulebook. Usually one person learns the rules and tells the other players. As a modification for Clue, I think this will end poorly. But I think the idea of a rationalist board game is one that could end well. Boil this down to the essentials. What is the goal of the game? What is the victory condition? What is the core mechanism? Here's a brief guess/sketch: The game is designed to teach reasoning under uncertainty. The victory condition could be either coming to the correct conclusion first or having come to the best conclusions at lowest cost. The core mechanism is integrating new information with old information. The tenor of the game will be set by the victory condition. A set of reveals- say there are three cards you want to guess, and they are flipped over one by one at various stages of the game- where people place bets for victory points seems superior to a race to one correct answer. For example, let us consider a three player game. There are color cards, shape cards, and material cards. There are three cards of three types (red, blue green; circle, triangle, square; wood, metal, glass). Each deck of 9 cards is shuffled, and one is removed at random and placed in order (so there is a color then a shape then a material). The remaining 24 cards are shuffled together and 8 cards are dealt to each player. Players now have incomplete and uncertain information- even if I hold 2 blue cards in my hand, the removed card might be blue. I can be certain it's not blue if I hold 3 blue cards, but that doesn't help me figure whether to bet on red or green. Players share information somehow. How can be worked out later. Players start off with, say, 6 tokens. After a set amount on information sharing, players must bet at least 1, but up to as many as they have, tokens on what the color card may be. The amount of the bid is not secret, but the color selected is (and they can bid on as many colors as they would like). A correct bet is doubled. Then there is another information-sharing phase, then the players bet on what shape was pulled out. Another information-sharing phase, then the players bet on what material was pulled out. I think this would work best with fewer information-sharing rounds but high-quality information. Note that this doesn't really deal with the Bayesian issue of integrating new and old information, unless the information-sharing is built that way. It should be something better than just showing people cards. [2023 edit]: A better game than my suggestion here is Figgie. [-][anonymous]13y4 There's definitely an idea here for an enjoyable, playable game. I've had a go at fleshing out the rules, but not got anything entirely to my satisfaction, so instead I'll list what I consider to be some important design questions. The first is whether or not the murderer should know who they are. If they do, there's a risk that the game turns into Mafia, with an emphasis on dealing with deception rather than assessing evidence. This is not necessarily a bad thing, but it's something to be aware of. If not, or if the murderer is not a player character, then some sort of time pressure needs to be introduced to force the kind of trade-offs you wanted to see. Under what circumstances are players allowed to ask each other questions, and is this done in public or in private? With a cooperative game there would seem to be little point in keeping secrets, but with a rogue murderer opportunities for misdirection would add useful complexity. There's a risk that the randomisation aspect become sufficiently complicated that it would really need to be done by computer, but a game that could be played by people sitting around a table would be much more useful, and enjoyable. This could be a fun and educational game. Possibly even commerically exploitable. The first is whether or not the murderer should know who they are. If they do, there's a risk that the game turns into Mafia, with an emphasis on dealing with deception rather than assessing evidence. ... [If they don't] there would seem to be little point in keeping secrets [and] ... some sort of time pressure needs to be introduced. Spot on, all all counts. There are other ideas that just got posted that might help with this; if players had a limited number of chips and were playing to maximize their chip count, then sharing info would only make sense if you thought it would give you a relative advantage. If the murderer was given weak evidence that he/she was the murderer, that might create a bit of deception without encouraging a Mafia dynamic. Accusations could be made expensive relative to other activities (i.e., you have to go to the Control Room, or gather everybody together, etc.). Under what circumstances are players allowed to ask each other questions, and is this done in public or in private? I had imagined that you can talk whenever your characters are in the same room, but you can't ever physically flip over your clue cards to show people what they say. E.g. if you did an autopsy on the left leg and it revealed lead-pipe-impacts, you could say "It was a lead pipe, I swear!" but you couldn't actually give the person your "lead-pipe-impact" card. Just like in real life, we don't have provably-secure mind-bridges. You could, however, give the person the left leg, and then they could do their own autopsy. There's a risk that the randomisation aspect become sufficiently complicated that it would really need to be done by computer. I agree, and I'll find ways to avoid that risk. It happens to be one of my talents. This could be a fun and educational game. Possibly even commerically exploitable. Thank you! I'm glad you think so. I'd love to play this game. It looks awesome and will likely lead to either learning or hilarity. I think the lie detector schema is overly complicated, but that may be because I don't have access to the stress/no stress table. If the table is non-random, and the questioner can see the d10, it should be okay. Also, what exactly is the win condition? Figuring out who done it and handing them over to the cops? That plus knowing which weapon and room? I'm pretty sure the point of the lie detector that it conveys essentially no information. Real lie detectors are notoriously unreliable. I thought it was a nice touch. I was looking at it from a game perspective, but from a realist perspective it's good. Worse than unreliable - they read "stress" pretty much whenever an accusatory question is asked (since being accused of things, even falsely, is stressful), which means that ignorant users will pretty much always conclude that the person being questioned is guilty. I imagine the "stress table" is just a threshold value, and dice roll result is unknown. This way, stress is weak evidence for lying. Also, what exactly is the win condition? Figuring out who done it and handing them over to the cops? That plus knowing which weapon and room? Correct, and in that order. I'd like to play it. This could work by email, turn-based. All players could move simultaneously on each turn. I'd like to give it a shot too All right, Phil, I'll PM you if I get the rules and maps and cards together. Can I be in too? [-][anonymous]13y2 I'd be interested, but couldn't make a firm commitment to be available at this stage. Lol, yes, of course. Quiver, you don't need a firm committment yet -- there's another game I'm designing first, so this one won't be ready until March 1st at the earliest. I clicked on the title of this post expecting that you had made some sort of rationalism-specific clue-by-four, and had pictures. This is pretty cool too, though. :-) Activating the security cameras does not, in and of itself, prevent further murders. It's a deterrent, not a shield. If that's how you want to play it, I'd recommend having a game mechanic for assaulting another player's character with one of the murder weapons, which forces them into cryostasis or uploading. Cryostasis is, from an out-of-game perspective, "Screw you guys, this sucks, I'm gonna go do something else." Uploading means you can continue to play, in a robotic telepresence body, but (due to the inadequately-secured wireless signal) can no longer keep secrets, and possibly have other restrictions. The security system, having been put on alert, cannot be quickly and non-destructively shut down without a set of codes that Mr. Boddy was clever enough to not keep written down on-site. It is possible, however, to spend a turn's action functionally disabling the surveillance in a given room, either by taping opaque obstructions over lenses (which can be easily reversed by anyone else in the room) or by destroying the cameras outright. Either is enormously suspicious, there's a chance you missed one, and you have to be in the room in question to even make an attempt. Alternatively, from the security system's control room, it's possible to recalibrate a given room's cameras into uselessness: pivot them to face walls, turn up the gain to record only whiteout, etc. This is always impermanent, but makes it safer to break the cameras. From the control room, it's possible to review recordings (look at the notes other players have secretly exchanged) but not destroy them, since there's an off-site backup. It would make sense for at least one person to sincerely remember being the murderer. That's strong evidence, but far from perfect. If a person who remembers actually is the murderer, their memories of how it happened and where are also useful. Everybody knows what they remember, nobody knows The Truth... until it's over. It's the same basic genre as Mafia or Diplomacy. Might as well admit it and learn from what came before. I think the tricky Bayesian-specific part would be the probability estimates. What about giving everyone chips, like for roulette? Start with a pile, expend them on certain in-game actions. When the game ends, if there's a spot that turns out to be true but you didn't put any chips on, you lose outright, but the highest possible score is to have exactly one chip on each correct answer and none on any others, regardless of how many you spent, representing peoples' willingness to put up with annoying behavior from someone who turns out to be an oracle. What about giving everyone chips, like for roulette? Start with a pile, expend them on certain in-game actions. When the game ends, if there's a spot that turns out to be true but you didn't put any chips on, you lose outright, but the highest possible score is to have exactly one chip on each correct answer and none on any others\ You mean, like Wits & Wagers? About three questions worth of W&W for the endgame, yeah. One big difference, though: failure to bet on a winner in a given round normally just means you win nothing, and lose as much of your stake as you bet that round. In Bayesian probability, assigning probability zero means there's no going back, so it's important not to do that unless you're unreasonably sure. Of course, the goal of the game is to be rational, and rationalists should win, so it's good to have an ultimate victory condition that someone who's blatantly irrational can achieve occasionally by dumb luck, to keep the ones who are as skilled at the game as is reasonably possible craving opportunities to improve further. I like the idea a lot. I'm not nearly as crazy about your analysis, but, then your analysis is maybe 100 x more complicated than the idea itself in terms of Kolgormoioff-who's-his-face-complexity, so that's not too too surprising. I think if we're going to apply strict Bayesian religious payoffs, we'll need to give each player more chips to drive the point home. With six chips and three choices, e.g., it's trivial to learn to bid 3:2:1 or 4:1:1 (the only combinations that don't leave a zero anywhere), depending on whether you're "sure" or not that your #1 pick is correct. It's also suboptimal: if you're only going to play, say, 3 or 4 games with the same group of people, and each game has 3 rounds, and you are rationally 95% confident that your #1 pick is correct with 3.5% in your #2 pick and 1.5% in your #3 pick, then you could bid 5:1:0 and expect to beat all your friends until they got bored with the game. It teaches the wrong lesson, maybe. Life offers more iterations than one-off Clue. With six weapons and six characters and, say, 40 chips, there is still a temptation to play zero chips on some weapons, but the dangers of this strategy are likely to become vividly apparent in only a few games...because you don't need to leave a tile open in order to win (you can win by outguessing others with your distribution, maybe putting 15 chips on a weapon that you are quite sure of, and only 5 on the character you are most sure of, because you are well-calibrated and know what you know), the downsides of leaving a zero open are fairly apparent. Your final score could be the chips you bid on the winning weapon times the chips you bid on the winning character. [-][anonymous]13y0 Instead of making one guess, each player submits a probability distribution and the one with the best log score wins.
4,049
18,397
{"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.625
3
CC-MAIN-2023-40
latest
en
0.938677
http://www.glencoe.com/sec/math/studytools/cgi-bin/msgQuiz.php4?isbn=0-07-860390-0&chapter=14&headerFile=6&state=tx
1,386,378,002,000,000,000
text/html
crawl-data/CC-MAIN-2013-48/segments/1386163052912/warc/CC-MAIN-20131204131732-00084-ip-10-33-133-15.ec2.internal.warc.gz
355,319,442
4,493
1. If a die and coin are tossed, what is the probability of rolling an even number on the die and heads on the coin? A. B. C. D. Hint 2. An art designer wishes to display 5 paintings hung side-by-side on a wall. In how many different ways can the designer arrange the paintings? A. 3,125 B. 5 C. 120 D. 15 Hint 3. Tabitha and Paco are in a video game room that consists of 10 games. If they only have enough money to play 6 games, how many ways can they play each of the 6 games once? A. 151,200 B. 3,628,800 C. 720 D. 30,240 Hint 4. A restaurant manager needs to hire three employees: one host, one server, and one cook. Vito, Kendra, Kale, Sachiko, and Ren all applied for a job. How many possible ways are there for the manager to place the applicants? A. 60 B. 3 C. 120 D. 12 Hint 5. The student council advisor needs to appoint two council members to be officers: one president and one vice-president. Student council consists of six members. How many possible ways are there for the advisor to fill the offices? A. 11 B. 30 C. 2 D. 720 Hint 6. A bag contains 10 red marbles, 5 gray marbles, 12 black marbles, and 8 white marbles. Two marbles are randomly drawn from the bag without replacement. What is the probability of drawing a white marble followed by a marble that is not black? A. B. C. D. Hint 7. A sociology teacher asked her students how many siblings they have. The results of the survey are shown in the table. Find the probability that a randomly chosen student has less than four siblings. A. B. C. D. 1 Hint 8. The table shows the probability distribution of the number of televisions per household in a neighborhood. What is the probability that a household in this neighborhood has at least one television? A. 0.28 B. 0.44 C. 0.95 D. 0.23 Hint 9. The table shows the results when a number cube was rolled. What is the experimental probability of rolling an even number? A. B. C. D. Hint 10. The table shows the results of rolling a number cube over three separate experiments. What is the experimental probability of rolling a two for all three experiments? A. B. C. D. Hint
555
2,097
{"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.0625
4
CC-MAIN-2013-48
latest
en
0.928168
http://www.popflock.com/learn?s=Clifford_algebra
1,606,769,447,000,000,000
text/html
crawl-data/CC-MAIN-2020-50/segments/1606141486017.50/warc/CC-MAIN-20201130192020-20201130222020-00627.warc.gz
150,685,792
46,972
Clifford Algebra Get Clifford Algebra essential facts below. View Videos or join the Clifford Algebra discussion. Add Clifford Algebra to your PopFlock.com topic list for future reference or share this resource on social media. Clifford Algebra In mathematics, a Clifford algebra is an algebra generated by a vector space with a quadratic form, and is a unital associative algebra. As K-algebras, they generalize the real numbers, complex numbers, quaternions and several other hypercomplex number systems.[1][2] The theory of Clifford algebras is intimately connected with the theory of quadratic forms and orthogonal transformations. Clifford algebras have important applications in a variety of fields including geometry, theoretical physics and digital image processing. They are named after the English mathematician William Kingdon Clifford. The most familiar Clifford algebras, the orthogonal Clifford algebras, are also referred to as (pseudo-)Riemannian Clifford algebras, as distinct from symplectic Clifford algebras.[3] ## Introduction and basic properties A Clifford algebra is a unital associative algebra that contains and is generated by a vector space V over a field K, where V is equipped with a quadratic form . The Clifford algebra is the "freest" algebra generated by V subject to the condition[4] ${\displaystyle v^{2}=Q(v)1\ {\text{ for all }}v\in V,}$ where the product on the left is that of the algebra, and the 1 is its multiplicative identity. The idea of being the "freest" or "most general" algebra subject to this identity can be formally expressed through the notion of a universal property, as done below. Where V is a finite-dimensional real vector space and Q is nondegenerate, may be identified by the label Clp,q(R), indicating that V has an orthogonal basis with p elements with , q with , and where R indicates that this is a Clifford algebra over the reals; i.e. coefficients of elements of the algebra are real numbers. The free algebra generated by V may be written as the tensor algebra , that is, the sum of the tensor product of n copies of V over all n, and so a Clifford algebra would be the quotient of this tensor algebra by the two-sided ideal generated by elements of the form for all elements . The product induced by the tensor product in the quotient algebra is written using juxtaposition (e.g. uv). Its associativity follows from the associativity of the tensor product. The Clifford algebra has a distinguished subspace V, being the image of the embedding map. Such a subspace cannot in general be uniquely determined given only a K-algebra isomorphic to the Clifford algebra. If the characteristic of the ground field K is not 2, then one can rewrite this fundamental identity in the form ${\displaystyle uv+vu=2\langle u,v\rangle 1\ {\text{ for all }}u,v\in V,}$ where ${\displaystyle \langle u,v\rangle ={\frac {1}{2}}\left(Q(u+v)-Q(u)-Q(v)\right)}$ is the symmetric bilinear form associated with Q, via the polarization identity. Quadratic forms and Clifford algebras in characteristic 2 form an exceptional case. In particular, if it is not true that a quadratic form uniquely determines a symmetric bilinear form satisfying , nor that every quadratic form admits an orthogonal basis. Many of the statements in this article include the condition that the characteristic is not 2, and are false if this condition is removed. ### As a quantization of the exterior algebra Clifford algebras are closely related to exterior algebras. Indeed, if then the Clifford algebra is just the exterior algebra ?(V). For nonzero Q there exists a canonical linear isomorphism between ?(V) and whenever the ground field K does not have characteristic two. That is, they are naturally isomorphic as vector spaces, but with different multiplications (in the case of characteristic two, they are still isomorphic as vector spaces, just not naturally). Clifford multiplication together with the distinguished subspace is strictly richer than the exterior product since it makes use of the extra information provided by Q. The Clifford algebra is a filtered algebra, the associated graded algebra is the exterior algebra. More precisely, Clifford algebras may be thought of as quantizations (cf. quantum group) of the exterior algebra, in the same way that the Weyl algebra is a quantization of the symmetric algebra. Weyl algebras and Clifford algebras admit a further structure of a *-algebra, and can be unified as even and odd terms of a superalgebra, as discussed in CCR and CAR algebras. ## Universal property and construction Let V be a vector space over a field K, and let be a quadratic form on V. In most cases of interest the field K is either the field of real numbers R, or the field of complex numbers C, or a finite field. A Clifford algebra is a pair ,[5][6] where A is a unital associative algebra over K and i is a linear map satisfying for all v in V, defined by the following universal property: given any unital associative algebra A over K and any linear map such that ${\displaystyle j(v)^{2}=Q(v)1_{A}{\text{ for all }}v\in V}$ (where 1A denotes the multiplicative identity of A), there is a unique algebra homomorphism such that the following diagram commutes (i.e. such that ): The quadratic form Q may be replaced by a (not necessarily symmetric) bilinear form that has the property , in which case an equivalent requirement on j is ${\displaystyle j(v)j(v)=\langle v,v\rangle 1_{A}\quad {\text{ for all }}v\in V\ ,}$ ${\displaystyle j(v)j(w)+j(w)j(v)=(\langle v,w\rangle +\langle w,v\rangle )1_{A}\quad {\text{ for all }}v,w\in V\ .}$ When the characteristic of the field is not 2, the first requirement may be omitted as it is implied by the second and the bilinear form may be restricted to being symmetric without loss of generality. A Clifford algebra as described above always exists and can be constructed as follows: start with the most general algebra that contains V, namely the tensor algebra T(V), and then enforce the fundamental identity by taking a suitable quotient. In our case we want to take the two-sided ideal IQ in T(V) generated by all elements of the form ${\displaystyle v\otimes v-Q(v)1}$ for all ${\displaystyle v\in V}$ and define as the quotient algebra ${\displaystyle \operatorname {Cl} (V,Q)=T(V)/I_{Q}.}$ The ring product inherited by this quotient is sometimes referred to as the Clifford product[7] to distinguish it from the exterior product and the scalar product. It is then straightforward to show that contains V and satisfies the above universal property, so that Cl is unique up to a unique isomorphism; thus one speaks of "the" Clifford algebra . It also follows from this construction that i is injective. One usually drops the i and considers V as a linear subspace of . The universal characterization of the Clifford algebra shows that the construction of is functorial in nature. Namely, Cl can be considered as a functor from the category of vector spaces with quadratic forms (whose morphisms are linear maps preserving the quadratic form) to the category of associative algebras. The universal property guarantees that linear maps between vector spaces (preserving the quadratic form) extend uniquely to algebra homomorphisms between the associated Clifford algebras. ## Basis and dimension Since V comes equipped with a quadratic form Q, in characteristic not equal to 2 there exist bases for V that are orthogonal. An orthogonal basis is one such that for a symmetric bilinear form ${\displaystyle \langle e_{i},e_{j}\rangle =0}$ for ${\displaystyle i\neq j}$, and ${\displaystyle \langle e_{i},e_{i}\rangle =Q(e_{i}).}$ The fundamental Clifford identity implies that for an orthogonal basis ${\displaystyle e_{i}e_{j}=-e_{j}e_{i}}$ for ${\displaystyle i\neq j}$, and ${\displaystyle e_{i}^{2}=Q(e_{i})}$. This makes manipulation of orthogonal basis vectors quite simple. Given a product ${\displaystyle e_{i_{1}}e_{i_{2}}\cdots e_{i_{k}}}$ of distinct orthogonal basis vectors of V, one can put them into a standard order while including an overall sign determined by the number of pairwise swaps needed to do so (i.e. the signature of the ordering permutation). If the dimension of V over K is n and is an orthogonal basis of , then is free over K with a basis ${\displaystyle \{e_{i_{1}}e_{i_{2}}\cdots e_{i_{k}}\mid 1\leq i_{1}. The empty product is defined as the multiplicative identity element. For each value of k there are n choose k basis elements, so the total dimension of the Clifford algebra is ${\displaystyle \dim \operatorname {Cl} (V,Q)=\sum _{k=0}^{n}{\begin{pmatrix}n\\k\end{pmatrix}}=2^{n}.}$ ## Examples: real and complex Clifford algebras The most important Clifford algebras are those over real and complex vector spaces equipped with nondegenerate quadratic forms. Each of the algebras Clp,q(R) and Cln(C) is isomorphic to A or , where A is a full matrix ring with entries from R, C, or H. For a complete classification of these algebras see classification of Clifford algebras. ### Real numbers Real Clifford algebras are also sometimes referred to as geometric algebras. Every nondegenerate quadratic form on a finite-dimensional real vector space is equivalent to the standard diagonal form: ${\displaystyle Q(v)=v_{1}^{2}+\ldots +v_{p}^{2}-v_{p+1}^{2}-\ldots -v_{p+q}^{2},}$ where is the dimension of the vector space. The pair of integers is called the signature of the quadratic form. The real vector space with this quadratic form is often denoted Rp,q. The Clifford algebra on Rp,q is denoted Clp,q(R). The symbol Cln(R) means either Cln,0(R) or Cl0,n(R) depending on whether the author prefers positive-definite or negative-definite spaces. A standard basis for Rp,q consists of mutually orthogonal vectors, p of which square to +1 and q of which square to -1. Of such a basis, the algebra Clp,q(R) will therefore have p vectors that square to +1 and q vectors that square to -1. A few low-dimensional cases are: Cl0,0(R) is naturally isomorphic to R since there are no nonzero vectors. Cl0,1(R) is a two-dimensional algebra generated by e1 that squares to -1, and is algebra-isomorphic to C, the field of complex numbers. Cl0,2(R) is a four-dimensional algebra spanned by The latter three elements all square to -1 and anticommute, and so the algebra is isomorphic to the quaternions H. Cl0,3(R) is an 8-dimensional algebra isomorphic to the direct sum , the split-biquaternions. ### Complex numbers One can also study Clifford algebras on complex vector spaces. Every nondegenerate quadratic form on a complex vector space of dimension n is equivalent to the standard diagonal form ${\displaystyle Q(z)=z_{1}^{2}+z_{2}^{2}+\ldots +z_{n}^{2}}$. Thus, for each dimension n, up to isomorphism there is only one Clifford algebra of a complex vector space with a nondegenerate quadratic form. We will denote the Clifford algebra on Cn with the standard quadratic form by Cln(C). For the first few cases one finds that Cl0(C) ? C, the complex numbers Cl1(C) ? C ? C, the bicomplex numbers Cl2(C) ? M2(C), the biquaternions where denotes the algebra of matrices over C. ## Examples: constructing quaternions and dual quaternions ### Quaternions In this section, Hamilton's quaternions are constructed as the even sub algebra of the Clifford algebra Cl0,3(R). Let the vector space V be real three-dimensional space R3, and the quadratic form Q be the negative of the usual Euclidean metric. Then, for v, w in R3 we have the bilinear form (or scalar product) ${\displaystyle v\cdot w=v_{1}w_{1}+v_{2}w_{2}+v_{3}w_{3}.}$ Now introduce the Clifford product of vectors v and w given by ${\displaystyle vw+wv=-2(v\cdot w).}$ This formulation uses the negative sign so the correspondence with quaternions is easily shown. Denote a set of orthogonal unit vectors of R3 as e1, e2, and e3, then the Clifford product yields the relations ${\displaystyle e_{2}e_{3}=-e_{3}e_{2},\,\,\,e_{3}e_{1}=-e_{1}e_{3},\,\,\,e_{1}e_{2}=-e_{2}e_{1},}$ and ${\displaystyle e_{1}^{2}=e_{2}^{2}=e_{3}^{2}=-1.}$ The general element of the Clifford algebra Cl0,3(R) is given by ${\displaystyle A=a_{0}+a_{1}e_{1}+a_{2}e_{2}+a_{3}e_{3}+a_{4}e_{2}e_{3}+a_{5}e_{3}e_{1}+a_{6}e_{1}e_{2}+a_{7}e_{1}e_{2}e_{3}.}$ The linear combination of the even degree elements of Cl0,3(R) defines the even subalgebra Cl[0] 0,3 (R) with the general element ${\displaystyle q=q_{0}+q_{1}e_{2}e_{3}+q_{2}e_{3}e_{1}+q_{3}e_{1}e_{2}.}$ The basis elements can be identified with the quaternion basis elements i, j, k as ${\displaystyle i=e_{2}e_{3},j=e_{3}e_{1},k=e_{1}e_{2},}$ which shows that the even subalgebra Cl[0] 0,3 (R) is Hamilton's real quaternion algebra. To see this, compute ${\displaystyle i^{2}=(e_{2}e_{3})^{2}=e_{2}e_{3}e_{2}e_{3}=-e_{2}e_{2}e_{3}e_{3}=-1,}$ and ${\displaystyle ij=e_{2}e_{3}e_{3}e_{1}=-e_{2}e_{1}=e_{1}e_{2}=k.}$ Finally, ${\displaystyle ijk=e_{2}e_{3}e_{3}e_{1}e_{1}e_{2}=-1.}$ ### Dual quaternions In this section, dual quaternions are constructed as the even Clifford algebra of real four-dimensional space with a degenerate quadratic form.[8][9] Let the vector space V be real four-dimensional space R4, and let the quadratic form Q be a degenerate form derived from the Euclidean metric on R3. For v, w in R4 introduce the degenerate bilinear form ${\displaystyle d(v,w)=v_{1}w_{1}+v_{2}w_{2}+v_{3}w_{3}.}$ This degenerate scalar product projects distance measurements in R4 onto the R3 hyperplane. The Clifford product of vectors v and w is given by ${\displaystyle vw+wv=-2\,d(v,w).}$ Note the negative sign is introduced to simplify the correspondence with quaternions. Denote a set of mutually orthogonal unit vectors of R4 as e1, e2, e3 and e4, then the Clifford product yields the relations ${\displaystyle e_{m}e_{n}=-e_{n}e_{m},\,\,\,m\neq n,}$ and ${\displaystyle e_{1}^{2}=e_{2}^{2}=e_{3}^{2}=-1,\,\,e_{4}^{2}=0.}$ The general element of the Clifford algebra has 16 components. The linear combination of the even degree elements defines the even subalgebra with the general element ${\displaystyle H=h_{0}+h_{1}e_{2}e_{3}+h_{2}e_{3}e_{1}+h_{3}e_{1}e_{2}+h_{4}e_{4}e_{1}+h_{5}e_{4}e_{2}+h_{6}e_{4}e_{3}+h_{7}e_{1}e_{2}e_{3}e_{4}.}$ The basis elements can be identified with the quaternion basis elements i, j, k and the dual unit ? as ${\displaystyle i=e_{2}e_{3},j=e_{3}e_{1},k=e_{1}e_{2},\,\,\varepsilon =e_{1}e_{2}e_{3}e_{4}.}$ This provides the correspondence of Cl[0] 0,3,1 (R) with dual quaternion algebra. To see this, compute ${\displaystyle \varepsilon ^{2}=(e_{1}e_{2}e_{3}e_{4})^{2}=e_{1}e_{2}e_{3}e_{4}e_{1}e_{2}e_{3}e_{4}=-e_{1}e_{2}e_{3}(e_{4}e_{4})e_{1}e_{2}e_{3}=0,}$ and ${\displaystyle \varepsilon i=(e_{1}e_{2}e_{3}e_{4})e_{2}e_{3}=e_{1}e_{2}e_{3}e_{4}e_{2}e_{3}=e_{2}e_{3}(e_{1}e_{2}e_{3}e_{4})=i\varepsilon .}$ The exchanges of e1 and e4 alternate signs an even number of times, and show the dual unit ? commutes with the quaternion basis elements i, j, and k. ## Examples: in small dimension Let K be any field of characteristic not 2. ### Dimension 1 For , if Q has diagonalization diag(a), that is there is a non-zero vector x such that , then is algebra-isomorphic to a K-algebra generated by an element x satisfying , the quadratic algebra . In particular, if (that is, Q is the zero quadratic form) then is algebra-isomorphic to the dual numbers algebra over K. If a is a non-zero square in K, then . Otherwise, is isomorphic to the quadratic field extension K of K. ### Dimension 2 For , if Q has diagonalization with non-zero a and b (which always exists if Q is non-degenerate), then is isomorphic to a K-algebra generated by elements x and y satisfying , and . Thus is isomorphic to the (generalized) quaternion algebra . We retrieve Hamilton's quaternions when , since . As a special case, if some x in V satisfies , then . ## Properties ### Relation to the exterior algebra Given a vector space V one can construct the exterior algebra ?(V), whose definition is independent of any quadratic form on V. It turns out that if K does not have characteristic 2 then there is a natural isomorphism between ?(V) and considered as vector spaces (and there exists an isomorphism in characteristic two, which may not be natural). This is an algebra isomorphism if and only if . One can thus consider the Clifford algebra as an enrichment (or more precisely, a quantization, cf. the Introduction) of the exterior algebra on V with a multiplication that depends on Q (one can still define the exterior product independently of Q). The easiest way to establish the isomorphism is to choose an orthogonal basis for V and extend it to a basis for as described above. The map is determined by ${\displaystyle e_{i_{1}}e_{i_{2}}\cdots e_{i_{k}}\mapsto e_{i_{1}}\wedge e_{i_{2}}\wedge \cdots \wedge e_{i_{k}}.}$ Note that this only works if the basis is orthogonal. One can show that this map is independent of the choice of orthogonal basis and so gives a natural isomorphism. If the characteristic of K is 0, one can also establish the isomorphism by antisymmetrizing. Define functions by ${\displaystyle f_{k}(v_{1},\ldots ,v_{k})={\frac {1}{k!}}\sum _{\sigma \in \mathrm {S} _{k}}{\rm {sgn}}(\sigma )\,v_{\sigma (1)}\cdots v_{\sigma (k)}}$ where the sum is taken over the symmetric group on k elements, Sk. Since fk is alternating it induces a unique linear map . The direct sum of these maps gives a linear map between ?(V) and . This map can be shown to be a linear isomorphism, and it is natural. A more sophisticated way to view the relationship is to construct a filtration on . Recall that the tensor algebra T(V) has a natural filtration: , where Fk contains sums of tensors with order . Projecting this down to the Clifford algebra gives a filtration on . The associated graded algebra ${\displaystyle \operatorname {Gr} _{F}\operatorname {Cl} (V,Q)=\bigoplus _{k}F^{k}/F^{k-1}}$ is naturally isomorphic to the exterior algebra ?(V). Since the associated graded algebra of a filtered algebra is always isomorphic to the filtered algebra as filtered vector spaces (by choosing complements of Fk in Fk+1 for all k), this provides an isomorphism (although not a natural one) in any characteristic, even two. In the following, assume that the characteristic is not 2.[10] Clifford algebras are Z2-graded algebras (also known as superalgebras). Indeed, the linear map on V defined by (reflection through the origin) preserves the quadratic form Q and so by the universal property of Clifford algebras extends to an algebra automorphism ${\displaystyle \alpha :\operatorname {Cl} (V,Q)\to \operatorname {Cl} (V,Q).}$ Since ? is an involution (i.e. it squares to the identity) one can decompose into positive and negative eigenspaces of ? ${\displaystyle \operatorname {Cl} (V,Q)=\operatorname {Cl} ^{[0]}(V,Q)\oplus \operatorname {Cl} ^{[1]}(V,Q)}$ where ${\displaystyle \operatorname {Cl} ^{[i]}(V,Q)=\left\{x\in \operatorname {Cl} (V,Q)\mid \alpha (x)=(-1)^{i}x\right\}.}$ Since ? is an automorphism it follows that: ${\displaystyle \operatorname {Cl} ^{[i]}(V,Q)\operatorname {Cl} ^{[j]}(V,Q)=\operatorname {Cl} ^{[i+j]}(V,Q)}$ where the bracketed superscripts are read modulo 2. This gives the structure of a Z2-graded algebra. The subspace forms a subalgebra of , called the even subalgebra. The subspace is called the odd part of (it is not a subalgebra). This Z2-grading plays an important role in the analysis and application of Clifford algebras. The automorphism ? is called the main involution or grade involution. Elements that are pure in this Z2-grading are simply said to be even or odd. Remark. In characteristic not 2 the underlying vector space of inherits an N-grading and a Z-grading from the canonical isomorphism with the underlying vector space of the exterior algebra ?(V).[11] It is important to note, however, that this is a vector space grading only. That is, Clifford multiplication does not respect the N-grading or Z-grading, only the Z2-grading: for instance if , then , but , not in . Happily, the gradings are related in the natural way: . Further, the Clifford algebra is Z-filtered: ${\displaystyle \operatorname {Cl} ^{\leqslant i}(V,Q)\cdot \operatorname {Cl} ^{\leqslant j}(V,Q)\subset \operatorname {Cl} ^{\leqslant i+j}(V,Q).}$ The degree of a Clifford number usually refers to the degree in the N-grading. The even subalgebra of a Clifford algebra is itself isomorphic to a Clifford algebra.[12][13] If V is the orthogonal direct sum of a vector a of nonzero norm Q(a) and a subspace U, then is isomorphic to , where -Q(a)Q is the form Q restricted to U and multiplied by -Q(a). In particular over the reals this implies that: ${\displaystyle \operatorname {Cl} _{p,q}^{[0]}(\mathbf {R} )\cong {\begin{cases}\operatorname {Cl} _{p,q-1}(\mathbf {R} )&q>0\\\operatorname {Cl} _{q,p-1}(\mathbf {R} )&p>0\end{cases}}}$ In the negative-definite case this gives an inclusion , which extends the sequence R ? C ? H ? H ? H ? ... Likewise, in the complex case, one can show that the even subalgebra of Cln(C) is isomorphic to Cln-1(C). ### Antiautomorphisms In addition to the automorphism ?, there are two antiautomorphisms that play an important role in the analysis of Clifford algebras. Recall that the tensor algebra T(V) comes with an antiautomorphism that reverses the order in all products of vectors: ${\displaystyle v_{1}\otimes v_{2}\otimes \cdots \otimes v_{k}\mapsto v_{k}\otimes \cdots \otimes v_{2}\otimes v_{1}.}$ Since the ideal IQ is invariant under this reversal, this operation descends to an antiautomorphism of called the transpose or reversal operation, denoted by xt. The transpose is an antiautomorphism: . The transpose operation makes no use of the Z2-grading so we define a second antiautomorphism by composing ? and the transpose. We call this operation Clifford conjugation denoted ${\displaystyle {\bar {x}}}$ ${\displaystyle {\bar {x}}=\alpha (x^{\mathrm {t} })=\alpha (x)^{\mathrm {t} }.}$ Of the two antiautomorphisms, the transpose is the more fundamental.[14] Note that all of these operations are involutions. One can show that they act as ±1 on elements which are pure in the Z-grading. In fact, all three operations depend only on the degree modulo 4. That is, if x is pure with degree k then ${\displaystyle \alpha (x)=\pm x\qquad x^{\mathrm {t} }=\pm x\qquad {\bar {x}}=\pm x}$ where the signs are given by the following table: k mod 4 ${\displaystyle \alpha (x)\,}$ ${\displaystyle x^{\mathrm {t} }\,}$ ${\displaystyle {\bar {x}}}$ 0 1 2 3 ... + - + - (-1)k + + - - (-1)k(k - 1)/2 + - - + (-1)k(k + 1)/2 ### Clifford scalar product When the characteristic is not 2, the quadratic form Q on V can be extended to a quadratic form on all of (which we also denoted by Q). A basis-independent definition of one such extension is ${\displaystyle Q(x)=\left\langle x^{\mathrm {t} }x\right\rangle _{0}}$ where ?a?0 denotes the scalar part of a (the degree 0 part in the Z-grading). One can show that ${\displaystyle Q(v_{1}v_{2}\cdots v_{k})=Q(v_{1})Q(v_{2})\cdots Q(v_{k})}$ where the vi are elements of V - this identity is not true for arbitrary elements of . The associated symmetric bilinear form on is given by ${\displaystyle \langle x,y\rangle =\left\langle x^{\mathrm {t} }y\right\rangle _{0}.}$ One can check that this reduces to the original bilinear form when restricted to V. The bilinear form on all of is nondegenerate if and only if it is nondegenerate on V. The operator of left (respectively right) Clifford multiplication by the transpose at of an element a is the adjoint of left (respectively right) Clifford multiplication by a with respect to this inner product. That is, ${\displaystyle \langle ax,y\rangle =\left\langle x,a^{\mathrm {t} }y\right\rangle ,}$ and ${\displaystyle \langle xa,y\rangle =\left\langle x,ya^{\mathrm {t} }\right\rangle .}$ ## Structure of Clifford algebras In this section we assume that characteristic is not 2, the vector space V is finite-dimensional and that the associated symmetric bilinear form of Q is non-singular. A central simple algebra over K is a matrix algebra over a (finite-dimensional) division algebra with center K. For example, the central simple algebras over the reals are matrix algebras over either the reals or the quaternions. • If V has even dimension then is a central simple algebra over K. • If V has even dimension then is a central simple algebra over a quadratic extension of K or a sum of two isomorphic central simple algebras over K. • If V has odd dimension then is a central simple algebra over a quadratic extension of K or a sum of two isomorphic central simple algebras over K. • If V has odd dimension then is a central simple algebra over K. The structure of Clifford algebras can be worked out explicitly using the following result. Suppose that U has even dimension and a non-singular bilinear form with discriminant d, and suppose that V is another vector space with a quadratic form. The Clifford algebra of is isomorphic to the tensor product of the Clifford algebras of U and (-1)dim(U)/2dV, which is the space V with its quadratic form multiplied by (-1)dim(U)/2d. Over the reals, this implies in particular that ${\displaystyle \operatorname {Cl} _{p+2,q}(\mathbf {R} )=\mathrm {M} _{2}(\mathbf {R} )\otimes \operatorname {Cl} _{q,p}(\mathbf {R} )}$ ${\displaystyle \operatorname {Cl} _{p+1,q+1}(\mathbf {R} )=\mathrm {M} _{2}(\mathbf {R} )\otimes \operatorname {Cl} _{p,q}(\mathbf {R} )}$ ${\displaystyle \operatorname {Cl} _{p,q+2}(\mathbf {R} )=\mathbf {H} \otimes \operatorname {Cl} _{q,p}(\mathbf {R} ).}$ These formulas can be used to find the structure of all real Clifford algebras and all complex Clifford algebras; see the classification of Clifford algebras. Notably, the Morita equivalence class of a Clifford algebra (its representation theory: the equivalence class of the category of modules over it) depends only on the signature . This is an algebraic form of Bott periodicity. ## Lipschitz group The class of Lipschitz groups (a.k.a.[15] Clifford groups or Clifford-Lipschitz groups) was discovered by Rudolf Lipschitz.[16] In this section we assume that V is finite-dimensional and the quadratic form Q is nondegenerate. An action on the elements of a Clifford algebra by its group of units may be defined in terms of a twisted conjugation: twisted conjugation by x maps , where ? is the main involution defined above. The Lipschitz group ? is defined to be the set of invertible elements x that stabilize the set of vectors under this action,[17] meaning that for all v in V we have: ${\displaystyle \alpha (x)vx^{-1}\in V.}$ This formula also defines an action of the Lipschitz group on the vector space V that preserves the quadratic form Q, and so gives a homomorphism from the Lipschitz group to the orthogonal group. The Lipschitz group contains all elements r of V for which Q(r) is invertible in K, and these act on V by the corresponding reflections that take v to . (In characteristic 2 these are called orthogonal transvections rather than reflections.) If V is a finite-dimensional real vector space with a non-degenerate quadratic form then the Lipschitz group maps onto the orthogonal group of V with respect to the form (by the Cartan-Dieudonné theorem) and the kernel consists of the nonzero elements of the field K. This leads to exact sequences ${\displaystyle 1\rightarrow K^{*}\rightarrow \Gamma \rightarrow {\mbox{O}}_{V}(K)\rightarrow 1,\,}$ ${\displaystyle 1\rightarrow K^{*}\rightarrow \Gamma ^{0}\rightarrow {\mbox{SO}}_{V}(K)\rightarrow 1.\,}$ Over other fields or with indefinite forms, the map is not in general onto, and the failure is captured by the spinor norm. ### Spinor norm In arbitrary characteristic, the spinor norm Q is defined on the Lipschitz group by ${\displaystyle Q(x)=x^{\mathrm {t} }x.}$ It is a homomorphism from the Lipschitz group to the group K× of non-zero elements of K. It coincides with the quadratic form Q of V when V is identified with a subspace of the Clifford algebra. Several authors define the spinor norm slightly differently, so that it differs from the one here by a factor of -1, 2, or -2 on ?1. The difference is not very important in characteristic other than 2. The nonzero elements of K have spinor norm in the group (K×)2 of squares of nonzero elements of the field K. So when V is finite-dimensional and non-singular we get an induced map from the orthogonal group of V to the group K×/(K×)2, also called the spinor norm. The spinor norm of the reflection about r?, for any vector r, has image Q(r) in K×/(K×)2, and this property uniquely defines it on the orthogonal group. This gives exact sequences: {\displaystyle {\begin{aligned}1\to \{\pm 1\}\to {\mbox{Pin}}_{V}(K)&\to {\mbox{O}}_{V}(K)\to K^{\times }/\left(K^{\times }\right)^{2},\\1\to \{\pm 1\}\to {\mbox{Spin}}_{V}(K)&\to {\mbox{SO}}_{V}(K)\to K^{\times }/\left(K^{\times }\right)^{2}.\end{aligned}}} Note that in characteristic 2 the group {±1} has just one element. From the point of view of Galois cohomology of algebraic groups, the spinor norm is a connecting homomorphism on cohomology. Writing ?2 for the algebraic group of square roots of 1 (over a field of characteristic not 2 it is roughly the same as a two-element group with trivial Galois action), the short exact sequence ${\displaystyle 1\to \mu _{2}\rightarrow {\mbox{Pin}}_{V}\rightarrow {\mbox{O}}_{V}\rightarrow 1}$ yields a long exact sequence on cohomology, which begins ${\displaystyle 1\to H^{0}(\mu _{2};K)\to H^{0}({\mbox{Pin}}_{V};K)\to H^{0}({\mbox{O}}_{V};K)\to H^{1}(\mu _{2};K).}$ The 0th Galois cohomology group of an algebraic group with coefficients in K is just the group of K-valued points: , and , which recovers the previous sequence ${\displaystyle 1\to \{\pm 1\}\to {\mbox{Pin}}_{V}(K)\to {\mbox{O}}_{V}(K)\to K^{\times }/\left(K^{\times }\right)^{2},}$ where the spinor norm is the connecting homomorphism . ## Spin and Pin groups In this section we assume that V is finite-dimensional and its bilinear form is non-singular. (If K has characteristic 2 this implies that the dimension of V is even.) The Pin group PinV(K) is the subgroup of the Lipschitz group ? of elements of spinor norm 1, and similarly the Spin group SpinV(K) is the subgroup of elements of Dickson invariant 0 in PinV(K). When the characteristic is not 2, these are the elements of determinant 1. The Spin group usually has index 2 in the Pin group. Recall from the previous section that there is a homomorphism from the Clifford group onto the orthogonal group. We define the special orthogonal group to be the image of ?0. If K does not have characteristic 2 this is just the group of elements of the orthogonal group of determinant 1. If K does have characteristic 2, then all elements of the orthogonal group have determinant 1, and the special orthogonal group is the set of elements of Dickson invariant 0. There is a homomorphism from the Pin group to the orthogonal group. The image consists of the elements of spinor norm . The kernel consists of the elements +1 and -1, and has order 2 unless K has characteristic 2. Similarly there is a homomorphism from the Spin group to the special orthogonal group of V. In the common case when V is a positive or negative definite space over the reals, the spin group maps onto the special orthogonal group, and is simply connected when V has dimension at least 3. Further the kernel of this homomorphism consists of 1 and -1. So in this case the spin group, Spin(n), is a double cover of SO(n). Please note, however, that the simple connectedness of the spin group is not true in general: if V is Rp,q for p and q both at least 2 then the spin group is not simply connected. In this case the algebraic group Spinp,q is simply connected as an algebraic group, even though its group of real valued points Spinp,q(R) is not simply connected. This is a rather subtle point, which completely confused the authors of at least one standard book about spin groups.[which?] ## Spinors Clifford algebras Clp,q(C), with even, are matrix algebras which have a complex representation of dimension 2n. By restricting to the group Pinp,q(R) we get a complex representation of the Pin group of the same dimension, called the spin representation. If we restrict this to the spin group Spinp,q(R) then it splits as the sum of two half spin representations (or Weyl representations) of dimension 2n-1. If is odd then the Clifford algebra Clp,q(C) is a sum of two matrix algebras, each of which has a representation of dimension 2n, and these are also both representations of the Pin group Pinp,q(R). On restriction to the spin group Spinp,q(R) these become isomorphic, so the spin group has a complex spinor representation of dimension 2n. More generally, spinor groups and pin groups over any field have similar representations whose exact structure depends on the structure of the corresponding Clifford algebras: whenever a Clifford algebra has a factor that is a matrix algebra over some division algebra, we get a corresponding representation of the pin and spin groups over that division algebra. For examples over the reals see the article on spinors. ### Real spinors To describe the real spin representations, one must know how the spin group sits inside its Clifford algebra. The Pin group, Pinp,q is the set of invertible elements in Clp,q that can be written as a product of unit vectors: ${\displaystyle {\mbox{Pin}}_{p,q}=\{v_{1}v_{2}\cdots v_{r}\mid \forall i\,\|v_{i}\|=\pm 1\}.}$ Comparing with the above concrete realizations of the Clifford algebras, the Pin group corresponds to the products of arbitrarily many reflections: it is a cover of the full orthogonal group . The Spin group consists of those elements of Pinp, q which are products of an even number of unit vectors. Thus by the Cartan-Dieudonné theorem Spin is a cover of the group of proper rotations . Let be the automorphism which is given by the mapping acting on pure vectors. Then in particular, Spinp,q is the subgroup of Pinp,q whose elements are fixed by ?. Let ${\displaystyle \operatorname {Cl} _{p,q}^{[0]}=\{x\in \operatorname {Cl} _{p,q}\mid \alpha (x)=x\}.}$ (These are precisely the elements of even degree in Clp,q.) Then the spin group lies within Cl[0] p,q . The irreducible representations of Clp,q restrict to give representations of the pin group. Conversely, since the pin group is generated by unit vectors, all of its irreducible representation are induced in this manner. Thus the two representations coincide. For the same reasons, the irreducible representations of the spin coincide with the irreducible representations of Cl[0] p,q . To classify the pin representations, one need only appeal to the classification of Clifford algebras. To find the spin representations (which are representations of the even subalgebra), one can first make use of either of the isomorphisms (see above) ${\displaystyle \operatorname {Cl} _{p,q}^{[0]}\approx \operatorname {Cl} _{p,q-1},{\text{ for }}q>0}$ ${\displaystyle \operatorname {Cl} _{p,q}^{[0]}\approx \operatorname {Cl} _{q,p-1},{\text{ for }}p>0}$ and realize a spin representation in signature as a pin representation in either signature or . ## Applications ### Differential geometry One of the principal applications of the exterior algebra is in differential geometry where it is used to define the bundle of differential forms on a smooth manifold. In the case of a (pseudo-)Riemannian manifold, the tangent spaces come equipped with a natural quadratic form induced by the metric. Thus, one can define a Clifford bundle in analogy with the exterior bundle. This has a number of important applications in Riemannian geometry. Perhaps more importantly is the link to a spin manifold, its associated spinor bundle and spinc manifolds. ### Physics Clifford algebras have numerous important applications in physics. Physicists usually consider a Clifford algebra to be an algebra with a basis generated by the matrices called Dirac matrices which have the property that ${\displaystyle \gamma _{i}\gamma _{j}+\gamma _{j}\gamma _{i}=2\eta _{ij}\,}$ where is the matrix of a quadratic form of signature (or corresponding to the two equivalent choices of metric signature). These are exactly the defining relations for the Clifford algebra , whose complexification is which, by the classification of Clifford algebras, is isomorphic to the algebra of complex matrices . However, it is best to retain the notation , since any transformation that takes the bilinear form to the canonical form is not a Lorentz transformation of the underlying spacetime. The Clifford algebra of spacetime used in physics thus has more structure than . It has in addition a set of preferred transformations - Lorentz transformations. Whether complexification is necessary to begin with depends in part on conventions used and in part on how much one wants to incorporate straightforwardly, but complexification is most often necessary in quantum mechanics where the spin representation of the Lie algebra sitting inside the Clifford algebra conventionally requires a complex Clifford algebra. For reference, the spin Lie algebra is given by {\displaystyle {\begin{aligned}\sigma ^{\mu \nu }&=-{\frac {i}{4}}\left[\gamma ^{\mu },\,\gamma ^{\nu }\right],\\\left[\sigma ^{\mu \nu },\,\sigma ^{\rho \tau }\right]&=i\left(\eta ^{\tau \mu }\sigma ^{\rho \nu }+\eta ^{\nu \tau }\sigma ^{\mu \rho }-\eta ^{\rho \mu }\sigma ^{\tau \nu }-\eta ^{\nu \rho }\sigma ^{\mu \tau }\right).\end{aligned}}} This is in the convention, hence fits in .[18] The Dirac matrices were first written down by Paul Dirac when he was trying to write a relativistic first-order wave equation for the electron, and give an explicit isomorphism from the Clifford algebra to the algebra of complex matrices. The result was used to define the Dirac equation and introduce the Dirac operator. The entire Clifford algebra shows up in quantum field theory in the form of Dirac field bilinears. The use of Clifford algebras to describe quantum theory has been advanced among others by Mario Schönberg,[19] by David Hestenes in terms of geometric calculus, by David Bohm and Basil Hiley and co-workers in form of a hierarchy of Clifford algebras, and by Elio Conte et al.[20][21] ### Computer vision Clifford algebras have been applied in the problem of action recognition and classification in computer vision. Rodriguez et al.[22] propose a Clifford embedding to generalize traditional MACH filters to video (3D spatiotemporal volume), and vector-valued data such as optical flow. Vector-valued data is analyzed using the Clifford Fourier Transform. Based on these vectors action filters are synthesized in the Clifford Fourier domain and recognition of actions is performed using Clifford correlation. The authors demonstrate the effectiveness of the Clifford embedding by recognizing actions typically performed in classic feature films and sports broadcast television. ## Generalizations • While this article focuses on a Clifford algebra of a vector space over a field, the definition extends without change to a module over any unital, associative, commutative ring.[3] • Clifford algebras may be generalized to a form of degree higher than quadratic over a vector space.[23] ## Conferences and Journals There is a vibrant and interdisciplinary community around Clifford and Geometric Algebras with a wide range of applications. The main conferences in this subject include the International Conference on Clifford Algebras and their Applications in Mathematical Physics (ICCA) and Applications of Geometric Algebra in Computer Science and Engineering (AGACSE) series. A main publication outlet is the Springer journal Advances in Applied Clifford Algebras. ## Notes 1. ^ Clifford, W.K. (1873). "Preliminary sketch of bi-quaternions". Proc. London Math. Soc. 4: 381-395. 2. ^ Clifford, W.K. (1882). Tucker, R. (ed.). Mathematical Papers. London: Macmillan. 3. ^ a b see for ex. Oziewicz, Z.; Sitarczyk, Sz. (1992). "Parallel treatment of Riemannian and symplectic Clifford algebras". In Micali, A.; Boudet, R.; Helmstetter, J. (eds.). Clifford Algebras and their Applications in Mathematical Physics. Kluwer. p. 83. ISBN 0-7923-1623-1. 4. ^ Mathematicians who work with real Clifford algebras and prefer positive definite quadratic forms (especially those working in index theory) sometimes use a different choice of sign in the fundamental Clifford identity. That is, they take . One must replace Q with -Q in going from one convention to the other. 5. ^ (Vaz & da Rocha 2016) make it clear that the map i (? in the quote here) is included in the structure of a Clifford algebra by defining it as "The pair is a Clifford algebra for the quadratic space when A is generated as an algebra by and and ? satisfies for all ." 6. ^ P. Lounesto (1996), "Counterexamples in Clifford algebras with CLICAL", Clifford Algebras with Numeric and Symbolic Computations: 3-30, doi:10.1007/978-1-4615-8157-4_1, ISBN 978-1-4615-8159-8 or abridged version 7. ^ Lounesto 2001, §1.8. 8. ^ McCarthy, J.M. (1990). An Introduction to Theoretical Kinematics. MIT Press. pp. 62-65. ISBN 978-0-262-13252-7. 9. ^ Bottema, O.; Roth, B. (2012) [1979]. Theoretical Kinematics. Dover. ISBN 978-0-486-66346-3. 10. ^ Thus the group algebra K[Z/2] is semisimple and the Clifford algebra splits into eigenspaces of the main involution. 11. ^ The Z-grading is obtained from the N grading by appending copies of the zero subspace indexed with the negative integers. 12. ^ Technically, it does not have the full structure of a Clifford algebra without a designated vector subspace, and so is isomorphic as an algebra, but not as a Clifford algebra. 13. ^ We are still assuming that the characteristic is not 2. 14. ^ The opposite is true when using the alternate (-) sign convention for Clifford algebras: it is the conjugate which is more important. In general, the meanings of conjugation and transpose are interchanged when passing from one sign convention to the other. For example, in the convention used here the inverse of a vector is given by v-1 = vt / Q(v) while in the (-) convention it is given by v-1 = v / Q(v). 15. ^ Vaz & da Rocha 2016, p. 126. 16. ^ Lounesto 2001, §17.2. 17. ^ Perwass, Christian (2009), Geometric Algebra with Applications in Engineering, Springer Science & Business Media, Bibcode:2009gaae.book.....P, ISBN 978-3-540-89068-3, §3.3.1 18. ^ Weinberg 2002 19. ^ See the references to Schönberg's papers of 1956 and 1957 as described in section "The Grassmann-Schönberg algebra ${\displaystyle G_{n}}$" of:A. O. Bolivar, Classical limit of fermions in phase space, J. Math. Phys. 42, 4020 (2001) doi:10.1063/1.1386411 20. ^ Conte, Elio (14 Nov 2007). "A Quantum-Like Interpretation and Solution of Einstein, Podolsky, and Rosen Paradox in Quantum Mechanics". arXiv:0711.2260 [quant-ph]. 21. ^ Elio Conte: On some considerations of mathematical physics: May we identify Clifford algebra as a common algebraic structure for classical diffusion and Schrödinger equations? Adv. Studies Theor. Phys., vol. 6, no. 26 (2012), pp. 1289-1307 22. ^ Rodriguez, Mikel; Shah, M (2008). "Action MACH: A Spatio-Temporal Maximum Average Correlation Height Filter for Action Classification". Computer Vision and Pattern Recognition (CVPR). 23. ^ Darrell E. Haile (Dec 1984). "On the Clifford Algebra of a Binary Cubic Form". American Journal of Mathematics. The Johns Hopkins University Press. 106 (6): 1269-1280. doi:10.2307/2374394. JSTOR 2374394.
11,549
43,754
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 77, "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-2020-50
latest
en
0.917684
https://ask.godotengine.org/135354/would-making-kinematicbody3d-towards-velocity-direction
1,695,744,767,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233510214.81/warc/CC-MAIN-20230926143354-20230926173354-00382.warc.gz
144,294,670
8,981
I have a character that has a velocity value, but I want to try make it be able to lean towards the current velocity value like in this video: https://youtu.be/SAtwQa8t_3g?t=31 The problem is I don`t know how I would go about doing this. Any help is appreciated! Godot version 3.4.4.stable in Engine +1 vote If you're okay with the lean being instantaneous instead of smooth, then `rotate(axis, lean_angle)` should do the trick. The lean angle can be 30 degrees, or PI/6 radians. The rotation axis must be perpendicular to both the velocity and the up direction. So `var axis = velocity.cross(Vector2(0,1,0))` should do the trick. We used the vector cross product to find a vector perpendicular to two other vectors. A smoother lean can be achieved by interpolating quaternions, which is usually the best way of interpolating rotations because it doesn't result in a jaggedy rotation (unlike interpolating Euler rotation vectors). I'll give a sketch, but there might be a mistake or two. All the following code should be in `_physics_process` so that it's not dependent on framerate, and should be on a Spatial node. ``````# Find the current quaternion from the current transform. var current_quat = transform.basis.get_rotation_quat() # Find the quaternion you want to interpolate towards based on the current velocity # and the maximum lean angle (say PI / 6 radians). var desired_quat = Quat(velocity.cross(Vector2(0,1,0)).normalized(), PI / 6) # Calculate an interpolated quaternion (using so-called spherical linear interpolation). var next_quat = current_quat.slerp(desired_quat, 0.5) # Make the character lean by updating the character's transform. transform.basis = Basis(next_quat) `````` The 0.5 means `next_quat` will be halfway between `current_quat` and `desired_quat`. Decreasing this value closer to 0.0 makes the lean slower, and increasing the value closer to 1.0 will makes the lean faster. But no matter what the lean will start faster than it ends (i.e. ease out but not ease in). So that is a sketch of how to interpolate rotations with quaternions. It's supposed to give you a smooth lean even when the player is turning towards a new direction. Feel free to comment further questions. by (180 points) edited by Thanks dude! Thank you for including the awnser and an explination! One last question! if I wanted the character also rotate towards the Up and Down movement (i.e. jumping and falling down). how would I need to change the current script to do that? Okay no problem. Let's break down how the leaning works with the jumping in the video you linked. Firstly, if the character wasn't moving forwards when they jumped then there wasn't any forward or backward lean. Secondly, if the character jumped while moving forwards, then the forward lean transitioned into a backward lean near the end of the jump. So let's aim to make a jump that will transition from a forward lean to a backward lean if the character was moving forwards when they jumped. Keep three boolean variables `var going_forward = false`, `var going_up = false`, and `var going_down = false` that you use to keep track of whether the player is going forward, upwards, or downwards. Set the values every physics cycle ``````if is_zero_approx(Vector2(velocity.x, velocity.z).length()): going_forward = false else: going_forward = true if is_zero_approx(velocity.y): going_up = false going_down = false else: if velocity.y > 0: going_up = true going_down = false else: going_up = false going_down = true `````` Also keep a constant `const LEAN_ANGLE = PI / 6`. Use the booleans to influence the desired lean angle value like this ``````var desired_lean_angle = int(going_forward) * (1 - int(going_up) - 2 * int(going_down)) * LEAN_ANGLE var desired_quat = Quat(velocity.cross(Vector2(0,1,0)).normalized(), desired_lean_angle) `````` The `desired_lean_angle` calculation assigns the same value as the following if statements would ``````if not going_forward: desired_lean_angle = 0.0 else: if going_up: desired_lean_angle = 0.0 elif going_down: desired_lean_angle = -LEAN_ANGLE else: desired_lean_angle = LEAN_ANGLE `````` One issue with this is that it will jerk into the backwards lean near the top of the jump. I suppose a more advanced approach would be to make the animations for the forward movement and the jump/fall separately, and then blend them together using the various animation nodes available in Godot. But I'm not sure how to do that. That has pointed me in the right direction for making the lean to work! Thank you so much for the help you`ve given me, I would have not been able to do this for my game without you help!
1,120
4,657
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.515625
4
CC-MAIN-2023-40
latest
en
0.872935
http://www.mathworks.com/matlabcentral/cody/problems/157-the-hitchhiker-s-guide-to-matlab/solutions/74489
1,485,287,549,000,000,000
text/html
crawl-data/CC-MAIN-2017-04/segments/1484560285244.23/warc/CC-MAIN-20170116095125-00522-ip-10-171-10-70.ec2.internal.warc.gz
544,665,876
11,739
Cody # Problem 157. The Hitchhiker's Guide to MATLAB Solution 74489 Submitted on 11 Apr 2012 by Josh 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 %% x = 41; y_correct = false; assert(isequal(zaphod(x),y_correct)) ``` y = 0 ``` 2   Pass %% x = 42; y_correct = true; assert(isequal(zaphod(x),y_correct)) ``` y = 1 ``` 3   Pass %% x = 43; y_correct = false; assert(isequal(zaphod(x),y_correct))%% x = 44; y_correct = false; assert(isequal(zaphod(x),y_correct))%% x = 45; y_correct = false; assert(isequal(zaphod(x),y_correct))%% x = 46; y_correct = false; assert(isequal(zaphod(x),y_correct))%% x = 47; y_correct = false; assert(isequal(zaphod(x),y_correct)) ``` y = 0 y = 0 y = 0 y = 0 y = 0 ``` 4   Pass %% x = 48; y_correct = false; assert(isequal(zaphod(x),y_correct)) ``` y = 0 ``` 5   Pass %% x = 49; y_correct = false; assert(isequal(zaphod(x),y_correct)) ``` y = 0 ``` 6   Pass %% x = 50; y_correct = false; assert(isequal(zaphod(x),y_correct)) ``` y = 0 ```
379
1,100
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.953125
3
CC-MAIN-2017-04
latest
en
0.409364
http://mathlair.allfunandgames.ca/onedollarpuzzles.php
1,679,822,712,000,000,000
text/html
crawl-data/CC-MAIN-2023-14/segments/1679296945440.67/warc/CC-MAIN-20230326075911-20230326105911-00447.warc.gz
31,258,773
2,510
# One-Dollar Words Problems Math Lair Home > Puzzles & Problems > One-Dollar Words Problems Here are some problems that relate to one dollar words; see the one dollar words page for more information about what these are. Some of these problems can be challenging. 1. Out of all numbers less than one thousand, which one has the highest dollar word value? 2. There are two numbers less than 100 that have a dollar value of \$1. What are they? 3. If a certain number of dollars and cents is written as words, and its dollar word value calculated, the result is the same as the original number. What is the number? 4. There are no numbers which, if written out as English words, have a dollar word value (in cents) equal to their value. However, if the word "and" were to be included after the word "hundreds" (e.g. writing 105 as "one hundred and five"), there are two such numbers. Can you find both? Hint: They are fairly close together. 5. There are five different numbers less than one hundred that all have the same dollar word value. What are the numbers? Answers can be found on the answers page. Further investigation: If you like one-dollar words, here are some ideas for further investigation. • Read the page on loops and looping. What happens when you loop one dollar words? As an example, "thirty" has a one dollar word value of \$1.00. Taking \$1.00 as "one hundred", that has a one dollar word value of \$1.08. "One hundred and eight" has a dollar word value of \$1.57. Do the numbers keep increasing? Settle at a single number? Reach a loop? • I'm aware of 966 one-dollar words. How many words are there with a different dollar value, say, 67¢, or \$1.08? For which value are there the most words? • If you know any foreign languages, look for one-dollar words in those languages, and try answering some of the above questions in that language. • What if you changed the rules in some manner? For example,What if you changed the values for each letter in some manner, or what if you multiplied the values together instead of adding, or added and subtracted alternate letter values? Pick something to change and see what happens. Some thoughts about some of these can be found on the answers page. You can find some other ideas for exploration on pages 114–116 of Beyond Language by Dmitri Borgmann.
531
2,321
{"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.4375
4
CC-MAIN-2023-14
latest
en
0.941317
https://physics.stackexchange.com/questions/714985/the-electric-current-in-a-circuit-comprising-a-battery-an-ideal-wire-and-a-few
1,701,428,892,000,000,000
text/html
crawl-data/CC-MAIN-2023-50/segments/1700679100286.10/warc/CC-MAIN-20231201084429-20231201114429-00279.warc.gz
495,442,120
41,448
# The electric current in a circuit comprising a battery, an ideal wire and a few resistors How will the electric current in this circuit flow? Assuming that the current starts flowing from the positive(+ve) terminal (Conventional current), will it flow entirely through the branch between the 2Ω and the 1Ω resistor offering no resistance {Ideal} or will it flow through both the paths{Through the middle branch and the 1Ω resistor}? and if it flows through both paths, then why is that the case? Current as far as I know, prefers a path which offers the least resistance. In this case, shouldn't it pass entirely through the middle branch with no resistance? • Is there a connection where the two lines cross at the center? And where is the reference node? Jun 22, 2022 at 4:16 • There is no connection between the two lines crossing at the centre. Jun 22, 2022 at 4:21 • Consider the potential at the positive terminal "V" and the potential at the other terminal 0. Jun 22, 2022 at 4:25 • This question might be silly but I am confused. Maybe, I'm lacking some important concepts. Jun 22, 2022 at 4:31 • Try redrawing the circuit with no crossings, then it will be much easier to analyze. Jun 22, 2022 at 4:33
300
1,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}
3.046875
3
CC-MAIN-2023-50
latest
en
0.948413
https://arinjayacademy.com/data-handling-worksheets-for-grade-3/
1,618,637,135,000,000,000
text/html
crawl-data/CC-MAIN-2021-17/segments/1618038101485.44/warc/CC-MAIN-20210417041730-20210417071730-00365.warc.gz
212,649,248
14,455
# Data handling Worksheets for Grade 3 Q.1) The following pictograph shows the number of bananas Aman and Mohit ate during the week- Each symbol = 2 bananas i) Find the number of bananas they ate on Tuesday ? [A] 6 [B] 4 [C] 8 ii) Find the number of bananas they ate on Monday ? [A] 6 [B] 5 [C] 3 iii) Find the number of bananas they ate on Wednesday ? [A] 6 [B] 10 [C] 8 iv) Find the total number of bananas they ate on Sunday, Wednesday and Thursday? [A] 20 [B] 30 [C] 10 v) On which day maximum number of bananas were eaten ? [A] Monday [B] Thursday [C] Wednesday Q.2) The following pictograph shows how much pocket money Sanjay earned every day from Tuesday to Saturday – Each symbol = ₹ 5 i) How much money did Sanjay earn on Tuesday ? [A] ₹ 18 [B] ₹ 14 [C] ₹ 15 ii) How much money did Sanjay earn on Friday ? [A] ₹ 20 [B] ₹ 25 [C] ₹ 18 iii) On which day did he earn the maximum money ? [A] Saturday [B] Friday [C] Thursday iv) ​What is the total amount earned by him on Thursday, Friday and Saturday ? [A] ₹60 [B] ₹50 [C] ₹70 v) On which day did he earn the minimum money ? [A] Friday [B] Wednesday [C] Saturday Q.3) The following pictograph shows how many students of a class like which of the games – Each symbol = 6 Students i) ​How many students like Football ? [A] 18 [B] 20 [C] 22 ii) How many students like Cricket ? [A] 60 [B] 30 [C] 20 iii) Which game is liked the most by the students ? [A] Tennis [C] Cricket iv) Which game is liked the least by the students ? [A] Tennis [B] Football [C] Cricket v) What is the total number of students who like Badminton or Hockey ? [A] 35 [B] 36 [C] 32 Q.4) The following pictograph shows how many students of a class like which of the flavours of Ice cream – Each symbol  = 12 Students i) ​How many students like Chocolate flavours ? [A] 60 [B] 40 [C] 80 ii) How many students like Chocolate marshmallow flavour ? [A] 60 [B] 45 [C] 48 iii) ​Which flavour of ice cream is liked the most by the students ? [A] Chocolate [B] Strawberry [C] Vanilla iv) ​Which flavour of ice cream is liked the least by the students ? [A] Butter pecan [B] Vanilla [C] Chocolate Marshmallow v) Which flavour of ice cream is liked equally by the students ? [A] Chocolate Marshmallow & Strawberry [B] Chocolate Marshmallow & Butter pecan [C] Strawberry & Vanilla Q.5) The following pictograph shows the transport used by the students to reach the school – Each symbol  = 12 Students i) How many students come by Motorcycle? [A] 30 [B] 54 [C] 48 ii) How many students come by Car ? [A] 50 [B] 48 [C] 36 iii) How many students come by Bus or Scooter ? [A] 36 [B] 37 [C] 30 iv) How many students come by Auto ? [A] 36 [B] 54 [C] 28 v) Which transport is used by the least number of students ? [A] Auto [B] Scooter [C] Bus ### Data handling Worksheets for Grade 3 Explanations Q.1) Explanation – Data handling Worksheets for Grade 3 (i) Given that each symbol = 2 bananas So, the number of bananas they ate on Tuesday = Number of Stars on Tuesday  x 2 =  ( 2 x 2 ) =    4 (ii) Given that each symbol = 2 bananas So, the number of bananas they ate on Monday = Number of Stars on Monday  x 2 =  ( 2 x 3 ) =   6 (iii) Given that each symbol = 2 bananas So, the number of bananas they ate on Wednesday =  Number of Stars on Wednesday  x 2 = ( 2 x 4 ) =   8 (iv) Given that each symbol = 2 bananas So, the number of bananas they ate on Sunday = ( 2 x 1 ) = 2 The number of bananas they ate on Wednesday = ( 2 x 4 ) = 8 The number of bananas they ate on Thursday = ( 2 x 5 ) =   10 The total number of bananas they ate on Sunday, Wednesday and Thursday = 2 + 8 + 10 = 20 (v) Since there are maximum number of symbols on Thursday, maximum number of bananas were eaten on Thursday. Q.2) Explanation – Data handling Worksheets for Grade 3 (i) Given that each symbol = ₹ 5 So, money earned by Sanjay on Tuesday = Number of symbols on Tuesday X 5  =    ( 5 x 3 ) = ₹ 15 (ii) Given that each symbol = ₹ 5 So, money earned by Sanjay on Friday = Number of symbols on  x 5 =  ( 5 x 4 ) =   ₹ 20 (iii) Since there are maximum numbers of symbols on Thursday, the maximum money is earned on Thursday. (iv) Given that each symbol = ₹ 5 So, money earned by Sanjay on Thursday = ( 5 x 5 ) = ₹ 25 Money earned by Sanjay on Friday  = ( 5 x 4 ) =  ₹ 20 Money earned by Sanjay on Saturday = ( 5 x 1 ) = ₹ 5 Total amount of money earned by him on Thursday, Friday and Saturday is = ₹ 25 + ₹ 20 + ₹ 5 = ₹50 (v) Since there are minimum numbers of symbols on Saturday, the minimum money is earned on Saturday. Q.3) Explanation – Data handling Worksheets for Grade 3 (i) Given that each symbol = 6 Students So,  the number of students who like Football = Number of symbols in Football X 6 = ( 6 x 3 ) =  18 (ii) Given that each symbol = 6 Students So,  the number of students who like Cricket = Number of symbols in Cricket x 6 =  ( 6 x 5 ) = 30 (iii) Since, there are maximum numbers of symbols for Cricket, Cricket is liked the most by the students. (iv) Since, there are minimum numbers of symbols for Tennis, Tennis is liked the least by the students. (v) Given that each symbol = 6 Students Number of students who like Badminton = ( 6 x 4 ) =  24 The number of students who like Hockey = ( 6 x 2 ) = 12 Total number of students who like Badminton or Hockey = 24 + 12 =  36 Q.4) Explanation – Data handling Worksheets for Grade 3 (i) Given that each symbol = 12 Students So, the number of students who like Chocolate flavour =  Number of symbols in Chocolate x 5 = ( 12 x 5 ) = 60 (ii) Given that each symbol = 12 Students So, the number of students who like Chocolate marshmallow flavour = Number of symbols in marshmallow x 4   =  ( 12 x 4 ) = 48 (iii) Since, there are maximum number symbols for Chocolate flavour, Chocolate flavour is liked the most by the students. (iv) Since, there are minimum number of symbols for Vanilla flavour, Vanilla is liked the least by the students. (v) Since, there are equal numbers of symbols for Strawberry and Chocolate marshmallow, Strawberry and Chocolate marshmallow flavours are liked equally by the students. Q.5) Explanation – Data handling Worksheets for Grade 3 (i) Given that each symbol = 15 Students So,  the number of students who use Motorcycle to reach school = Number of symbols in X 4 = ( 12 x 4 ) =  48 (ii) Given that each symbol = 15 Students So,  the number of students who use Car to reach school = ( 12 x 3 ) =  36 (iii) Given that each symbol = 15 Students So,  the number of students who use Bus to reach school = ( 12 x 2 ) =  24 The number of students who use Scooter to reach school = ( 12 x 1 ) =  12| The number of students who use Bus or Scooter to reach school = 24 + 13  = 37 (iv) Given that each symbol = 15 Students So,  the number of students who use Auto to reach school = ( 12 x 3 ) =  36 (v) Since, there are minimum numbers of symbols for Scooter, Scooter is used by the least number of students.
2,014
7,014
{"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-2021-17
latest
en
0.941844
https://chemistry.stackexchange.com/questions/78894/how-to-calculate-the-vapour-density-of-a-mixture/110030
1,579,514,708,000,000,000
text/html
crawl-data/CC-MAIN-2020-05/segments/1579250598217.23/warc/CC-MAIN-20200120081337-20200120105337-00385.warc.gz
377,121,790
31,242
# How to calculate the vapour density of a mixture? I have a gaseous mixture of $$\ce{H2}$$ and $$\ce{CO2}$$ which contains $$66\%$$ by mass of $$\ce{CO2}$$. I have to figure out the vapour density of the mixture (defined as mass of a certain volume of a substance divided by mass of same volume of hydrogen). My approach: let's assume $$\pu{100 g}$$ of mixture contains $$\pu{66 g}$$ of $$\ce{CO2}$$ and $$\pu{34 g}$$ of $$\ce{H2}$$. Hence, the amount of substance of $$\ce{CO2} = \pu{1.5 mol}$$ and the amount of substance of $$\ce{H2} = \pu{17 mol}$$. The total amount of substance $$= \pu{18.5 mol}$$. The mass of $$\pu{1 mol}$$ of mixture is 5.4 g (mass of 18.5 mol is 100 g), and the vapour density $$\text{VD} = 2.7$$. I got my answer right, but now I am doubtful of my approach. Was it safe to assume that the amount of substance of mixture equals that of the amount of substance of both the gases? • And where does that value come from? Confusing. – Karl Jul 16 '17 at 14:15 • as VD= M/2 M(= molecular mass – user8167818 Jul 16 '17 at 14:18 • Vapour density is molar mass divided by two? That sounds strange. Shouldn't it have units of gramm per liter? – Karl Jul 16 '17 at 14:25 • @Karl The OP is right (vapour density). I wasn't sure whether it's $2$ or $29$. – andselisk Jul 16 '17 at 14:50 • @andselisk Thanks. I have never heard of this measure before, and hope I will never again. ;-) – Karl Jul 16 '17 at 15:15 ## 1 Answer Was it safe to assume that the amount of substance of mixture equals that of the amount of substance of both the gases? Amount of substance is additive, just like mass. You have to be careful with volume, though. So yes, it is safe to make that assumption. I have to figure out the vapour density of the mixture I'm not sure you are starting with a safe question, i.e. if the vapour density quantity was intended to describe mixtures. Wikipedia has "vapour density = molar mass of gas / molar mass of H2", and I'm not sure whether a mixture has a defined molar mass. The same source states that vapour density is sometimes based on the density of air rather than dihydrogen gas (to assess whether certain gases collect on the floor or ceiling of a room when released).
646
2,217
{"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": 14, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.8125
4
CC-MAIN-2020-05
latest
en
0.911456
https://testbook.com/question-answer/when-brake-is-applied-in-a-bicycle-the-brake-pad--5ed5069df60d5d1d24cb1598
1,627,753,989,000,000,000
text/html
crawl-data/CC-MAIN-2021-31/segments/1627046154099.21/warc/CC-MAIN-20210731172305-20210731202305-00600.warc.gz
551,746,096
18,074
# When brake is applied in a bicycle, the brake pad touches the wheel. Now what stops the movement of the wheel? Free Practice With Testbook Mock Tests ## Options: 1. The friction between the pad and the rim 2. The brake pad falls down due to gravity and stops movement 3. The magnetic force between the pad and the rim 4. The electrostatic force between the pad and the rim ### Correct Answer: Option 1 (Solution Below) This question was previously asked in RRB JE Previous Paper 3 (Held On: 22 May 2019 Shift 1) ## Solution: CONCEPT: • Friction: The opposing force that opposes the relative motion between two surfaces is called the friction. • Friction always works in the direction opposite to the direction in which the object is moving or trying to move. • Friction always slows a moving object down. • The amount of friction depends on the materials from which the two surfaces are made. It also depends on the normal force between the two surfaces. • The rougher the surface, the more friction is produced. • When the brake is applied in a bicycle, the brake pad touches the wheel. • The friction between the pad and the rim stops the movement of the wheel. • There is no electrostatic and magnetic force between the pad and the wheel.
286
1,255
{"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.3125
3
CC-MAIN-2021-31
latest
en
0.915874
https://www.wyzant.com/resources/answers/189255/how_many_unique_functions
1,653,122,935,000,000,000
text/html
crawl-data/CC-MAIN-2022-21/segments/1652662539049.32/warc/CC-MAIN-20220521080921-20220521110921-00121.warc.gz
1,260,965,375
14,120
Justin w. # how many unique functions? I am not sure how to answer this question Let S = {1, 2} and T = {a, b, c}. How many unique functions are there mapping S → T? (Is it 2? because (1,a) and (2,b) ) How many onto (surjective) functions are there mapping T → S How many one-to-one (injective) functions are there mapping S → T? Let f : S → T, is it possible to define f^(−1) <-- this is the inverse function ? Why or why not? My answer is yes because since the S elements mapped exactly to one element of the set T Thanks, By: Tutor 5 (53) College Professor & Expert Tutor In Statistics and Calculus ## Still looking for help? Get the right answer, fast. Get a free answer to a quick problem. Most questions answered within 4 hours. #### OR Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
224
852
{"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.046875
3
CC-MAIN-2022-21
latest
en
0.919554
https://blogs.sap.com/2014/06/05/calculate-high-level-view-and-detailed-view-values-using-concatinationexception-aggregation/
1,675,644,865,000,000,000
text/html
crawl-data/CC-MAIN-2023-06/segments/1674764500294.64/warc/CC-MAIN-20230205224620-20230206014620-00247.warc.gz
155,280,701
15,102
# Calculate KPI values for High level view and detailed view using Concatenation+Exception aggregation This blog will clarify how to resolve the issue related to calculation of KPI for high level view and detailed view where detailed view is based on drill down of 2 different Infoobjects and this combination is unique key  :- For Example: we have a division calculation for one KPI : (Unit charge/Consumption * 100 ). High level view: Account  Determination ID Unit charge  Value Consumption Unit charge/Consumption Commercial  Customers 275.9100000 1,872.300 14.73642045 Detailed view : If we drill down on Installation and date output is : NOTE: Installations 6000359409 is repeated and date 03/31/2014 is also repeated corresponding to different Installation. Account  Determination ID Installation  Number To Date Unit charge  Value Consumption Unit charge/Consumption Commercial  Customers 6000359300 03/31/2014 194.69000000 1172.10000000 16.61035748 Commercial  Customers 6000359359 03/31/2014 51.60000000 518.60000000 9.94986502 Commercial  Customers 6000359409 02/28/2014 15.59000000 95.57900000 16.31111437 Commercial  Customers 6000359409 03/31/2014 14.03000000 86.02100000 16.30997082 however if we see the sum of last column: Unit charge/Consumption 16.61035748 9.94986502 16.31111437 16.30997082 Sum is = 59.1813 If we use Exception aggregation alone , it won’t work for example if we aggregate on Installation output will be like below :- 42.87079519 Account  Determination ID Installation  Number To Date Unit charge  Value Consumption Unit charge/Consumption Commercial  Customers 6000359300 03/31/2014 194.69000000 1172.10000000 16.61035748 Commercial  Customers 6000359359 03/31/2014 51.60000000 518.60000000 9.94986502 Commercial  Customers 6000359409 02/28/2014 29.62000000 181.60000000 16.31057269 Sum = How to achieve this in BW :- 1. Concatenation: To achieve this we have to create a new Infoobject of length equal to sum of both these Infoobjects and get concatenated value into this new object :- 2. Exception agreegation Now apply exception aggregation on Unit charge/Consumption  calculation based on this new Infoobject Output will be displayed like below :- High level view: Account  Determination ID Installation  Number and Date Unit charge  Value Consumption Unit chare/Consumption Commercial  Customers 600035930020140331 194.69000000 1172.10000000 16.61035748 Commercial  Customers 600035935920140331 51.60000000 518.60000000 9.94986502 Commercial  Customers 600035940920140228 15.59000000 95.57900000 16.31111437 Commercial  Customers 600035940920140331 14.03000000 86.02100000 16.30997082 Detailed view : Account  Determination ID Unit charge  Value Consumption Unit chare/Consumption Commercial  Customers 275.9100000 1,872.300 59.18130769 Now sum is matching.
794
2,836
{"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.667109
http://skeptics.stackexchange.com/questions/2688/can-you-put-on-more-weight-than-what-you-eat
1,469,535,077,000,000,000
text/html
crawl-data/CC-MAIN-2016-30/segments/1469257824853.47/warc/CC-MAIN-20160723071024-00237-ip-10-185-27-174.ec2.internal.warc.gz
218,529,659
16,917
# Can you put on more weight than what you eat? Someone once told me it is possible to have a net weight gain of more than what you eat. For example if you eat a quarter pounder burger you can potentially gain more than 1/4 pounds. Is this true? - Evil plan: We could feed 1kg of lion meat to tigers, and get 2kg of tiger meat to feed to lions to get 4kg of meat, and... hey we just solved world hunger! – Sklivvz Apr 30 '11 at 23:45 You can, if you a) drink 2 liters of cola meanwhile or b) implement the opposite of nuclear fusion inside your body (see 'conservation of mass' @Purdy) E=mc². – user unknown May 1 '11 at 0:21 @user unknown: I was assuming for the sake of argument that nuclear fusion does not, generally speaking, occur within the human gastrointestinal system. ...Yet. – Jon Purdy May 1 '11 at 0:42 The other answers here are not considering the water that you drink. You are 65-90% water, but a cheeseburger is probably around 30% water. So, you have to count the water you drink with your cheeseburger. – Neil G May 1 '11 at 7:12 Sort of. Everyone else has answered from the conservaton-of-mass perspective. However, a 1/4 pound cheeseburger is made from 1/4 pound of meat, ergo the 1/4 lb. does not include the bun, cheese if you like, lettuce, tomato etc... Therefore, it is theoretically possible to gain more then a 1/4 lb. from eating what is commonly referred to as a "1/4 pound hamburger", but that is simply because the assembled hamburger itself weights more then 1/4 lb. – Fake Name May 1 '11 at 8:33 No. This is because of something called ecological efficiency (or trophic level transfer efficiency). This is the efficiency with which energy or biomass is transferred from one trophic level to the one above it. This is virtually always less than 100%. This is because biological organisms are not perfect converters (so the thermal efficiency is not 100%) and some energy is lost as heat, as well as the fact that not all energy can be used by the organism (it isn't in a form that can be digested completely or not fully bioavailable). As a very rough average, only about 10% of the energy is kept as you go up to the next trophic level but this varies a bit depending on circumstances. This is e. g. why you need substantially more than 1 kg of grain to get 1 kg of beef. So not only is it pretty much out of the question that you can gain more mass than you eat, it is also virtually impossible to gain as much as you eat, because some of that energy is lost as e. g. heat or used in basal metabolism. Sure, you can invent fanciful situations with a high-tech, futuristic substance that has an enormous energy density and bioavailability while having a tiny mass, but for all practical intents and purposes, the answer is a resounding no. References: http://www.globalchange.umich.edu/globalchange1/current/lectures/kling/energyflow/highertrophic/trophic2.html - ## protected by Jamiec♦Jan 15 at 10:27 Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
782
3,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.90625
3
CC-MAIN-2016-30
latest
en
0.958098
http://www.talkstats.com/showthread.php/50278-How-to-find-the-probability-of-a-podium-finish?p=141526
1,508,548,568,000,000,000
text/html
crawl-data/CC-MAIN-2017-43/segments/1508187824537.24/warc/CC-MAIN-20171021005202-20171021025202-00008.warc.gz
580,834,678
12,240
# Thread: How to find the probability of a podium finish 1. ## How to find the probability of a podium finish Say in a race there are 22 competitors and say that the probability of driver A of winning the race is 55%. How can one calculate the probability of driver A to finish the race in the first three positions? 2. ## Re: How to find the probability of a podium finish Is there any more information to this problem or is this a hypothetical that you have created yourself? 3. ## The Following User Says Thank You to hlsmith For This Useful Post: christian.falzom (10-08-2013) hi. 5. ## Re: How to find the probability of a podium finish Christian, With just what you've provided, the only answer is 55% for driver A to finish in the first three positions (actually, exactly first place). This is because we do not know driver A's chances of ending up in 2nd place, 3rd place, or not in the top three positions. However, I feel what you mean leans more towards what is the probability of driver A finishing in 1st, 2nd, OR 3rd place, right? 6. ## Re: How to find the probability of a podium finish Dnguyen, thanks for your reply. that's right. I would like to know how to calculate the probability of driver A to finish either 1st or 2nd or 3rd position. 7. ## Re: How to find the probability of a podium finish I don't think there is enough information here. A wins 55%, so the probability of coming in first, second or third is clearly greater than .55. A does not win 45% of the time. We could estimate A will come in second place 55% of the time when it does not win. That is, there is approximately 55% chance A will beat the other 20 horses. .55 * .45 = .2475 So A comes in first place .55 and second place .2475 So A will not come in first or second (1 - (.55 + .2475)) = .2025 When A does not come in first or second, it will come in third place approximately 55% So A will come in first or second or third approximately .55 + (.55*.45) + (.55*.2025) = .9089 or 90.89% of the time Tweet #### Posting Permissions • You may not post new threads • You may not post replies • You may not post attachments • You may not edit your posts
557
2,170
{"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.40625
4
CC-MAIN-2017-43
latest
en
0.95344
https://it.mathworks.com/matlabcentral/answers/391944-what-is-the-output
1,713,655,314,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296817688.24/warc/CC-MAIN-20240420214757-20240421004757-00216.warc.gz
293,660,424
26,123
# What is the output? 1 visualizzazione (ultimi 30 giorni) Shivangi Srivastava il 1 Apr 2018 I am trying to check how the loop works hence, I am displaying the value of n in the for loop but it doesn't seem to work. Why doesn't n get displayed and how is the code (loop) working? h=0.3; x=0:h:0.8; for n=4:length((x)-1) disp(n) % Doing something here end ##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti Accedi per commentare. ### Risposta accettata Walter Roberson il 1 Apr 2018 length of x is 3. When you subtract 1 from a numeric vector you do not change the length so length((x) - 1) is the same length(x) which is 3. So your for loop is for n=4:3 Which will not execute at all. ##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti Accedi per commentare. ### Più risposte (1) Roger Stafford il 1 Apr 2018 The vector x has only three elements, [0,.3,.6], so the 'for' instruction reads: for n = 4:2 Therefore the loop will not execute at all, and this accounts for your lack of results. ##### 2 CommentiMostra NessunoNascondi Nessuno Shivangi Srivastava il 1 Apr 2018 Modificato: Shivangi Srivastava il 1 Apr 2018 If h would have been 0.2 then the for loop would be n = 4:4 right? How does this code get executed and the values of n change? Walter Roberson il 1 Apr 2018 No, with 0.2 x would be 0 0.2 0.4 0.6 0.8 which is length 5. When you subtract one from the numeric values the length stays the same, just you would working with -1 -.8 -.6 -.4 -.2. Still length 5. So the loop would be 4:5 Accedi per commentare. ### Categorie Scopri di più su Loops and Conditional Statements in Help Center e File Exchange ### Community Treasure Hunt Find the treasures in MATLAB Central and discover how the community can help you! Start Hunting! Translated by
555
1,827
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.53125
3
CC-MAIN-2024-18
latest
en
0.777751
https://jutge.org/problems/P17539_en
1,723,538,874,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722641075627.80/warc/CC-MAIN-20240813075138-20240813105138-00554.warc.gz
263,178,066
6,837
# Escape from Leng P17539 Statement thehtml Professor William Dyer from the famous University of Miskatonic is in great danger. He has discovered and started to explore a colossal lost city in the Plateau of Leng in the Antarctic, just to realize that he is not alone: terrible creatures that colonized the Earth two billion years ago are still there! Now Prof. Dyer is running for his life, descending a hill of ice, trying to reach his plane at the bottom of the hill, with a Shoggoth pursuing him. Prof. Dyer can run downwards, never upwards, with perhaps some movements left or right. He has just the energy to make L such lateral movements slipping on the ice. To make things worse, in the ice under his feet Prof. Dyer can see other sleeping creatures, the Old Ones, which he wisely wishes not to awake. So he decides to consider the hill as a rectangular grid, in order to leave a cautious distance of 3 cells, both horizontally and vertically, between him and every Old One during the whole path from his starting position to the plane. [r] To the right we can see an example. The ‘D’ indicates the position of Prof. Dyer. The ‘P’ indicates the position of the plane. In the example there are four Old Ones. The painted cells are too dangerous to pass by. For L = 1, the only escape path is the green dashed one starting to the right of Prof. Dyer. For L = 2, there is just another escape path: the blue dashed one starting to the left of Prof. Dyer. Note, Prof. Dyer will never waste energy by moving more than once horizontally on the same row. So the red dotted path is not valid. Prof. Dyer is too terrified to find a path to escape, and he already hears the Shoggoth approaching... Input Input consists of several cases. Every case begins with 2 ≤ R ≤ 15 and 1 ≤ C ≤ 15, the number of rows and the number of columns of the grid, respectively, followed by the maximum number of lateral movements 0 ≤ LR. Then follow R lines with C characters each: a ‘.’ stands for an empty position; a letter ‘O’ stands for an Old One. There is exactly one ‘D’ in the first row and one ‘P’ in the last row. A special test case with R = C = L = 0 marks the end of input. Output Prof. Dyer would be relieved if you indicated him an escape path. But let’s be cruel. For every test case, just tell him the number of different escape paths. If there are no escape paths, print “Good bye, Professor Dyer!”. [r] Public test cases • Input ```12 11 2 ....D...... ........... ........... ...O.....O. ........... ........... ........... ........... ........... ..OO....... ........... ......P.... 5 5 5 ....D ..... ..... ..... P.... 4 4 4 .D.O .... .... ...P 0 0 0 ``` Output ```2 625 Good bye, Professor Dyer! ``` • Information Author Salvador Roura Language English Official solutions C++ User solutions C++
702
2,813
{"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-33
latest
en
0.956392
https://www.lagrillemontorgueil.fr/2019-Dec-conversion-chart-cubic-feet-to-tons-of-2-inch-wash-stone-33147
1,601,223,327,000,000,000
text/html
crawl-data/CC-MAIN-2020-40/segments/1600400283990.75/warc/CC-MAIN-20200927152349-20200927182349-00018.warc.gz
896,413,417
7,230
# conversion chart cubic feet to tons of 2 inch wash stone Pebble Coverage Calculator | Stoneyard®198 sf/ton 1 inch thick 132 sf/ton 2 inches thick 66 sf/ton 3 inches thick. PEBBLES COVERAGE CALCULATOR . Product Type: Product Type: Desired Thickness: Length (feet): ... Call our Stone Specialists at, text to, or request a quote. REQUEST QUOTE.Sq. Feet of 57 Stone to Tons - OnlineConversion ForumsRe: Sq. Feet of 57 Stone to Tons length X width X depth gives you sq/ft. Divide that by 27 to convert into cubic yd. then multiply by1.54 for # 57 stone. L W D sq/ft cb/yd 100' x 100' x 2' = 20,000 / 27 = 740.75 x 1.54 = 1,141 ton of # 57 ### Tonnage Calculator - Mountaintop Stone Sales Multiply your Volume in cubic feet by 160. This will give you the required weight in pounds. To get tons, divide this by 2000. For Example: I am looking to build a garden wall 2 ft wide, 8 ft in length and 4 ft high (2ft) x (4 ft) x (8ft) = 64 cubic feet (64 cubic feet) x (160 lbs) = 10,240 lbs of stone Divide to get your tonnage: 10,240 / 2000 ...Ton Crusher Run Rock To Yards Conversion TableHow Many Cubic Feet In Ton Of Crusher Run. Cubic yards of crush and run is how many tonsonversion of cubic meter of crushed granite to metric tonnes ton crusher run rock to yards conversion table,how many tonnes crushed rock per m3, process crusher, mining, what is the conversion factor for 1 tonne of 50mm crushed, which is 16 metric tons per cubic meter, calculator for cubic feet per.Mulch Calculator - Mulch Barn1 Yard = 27 cubic feet (3′ x 3′ x 3′) 1 Yard = 10′ x 10′ area (100 sq. ft.) approximately 3 inches deep You can calculate the square footage by multiplying length x width (i.e. 30′ x 5′ = 150 sq. ft. = 1.5 yds @ 3″ thick) Top Soil/Mushroom Soil Yardages 1 Yard of Top Soil/Mushroom Soil = 80 sq. ft ### Technological process 2020 Crushed Stone Calculator: 3/4 inch rock - HomeAdvisorCalculating Crushed Stone by Weight. A final calculation is if you need to figure out the weight in tons of your crushed stone. You might not need to figure this out, but it's handy to know. Most gravel weighs about 1.5 tons per cubic yard. So, for the examples above, 2.45 cubic yards of gravel weighs 3.68 tons or 7,350 pounds.Calculator, Landscape Materials, Mulch, Stone, Grass Seed ...Square feet divided by sq. ft. per yard (from chart) = cubic yards needed; Example: A rectangular area 16 feet long by 10 feet wide and you want 4 inches deep of stone. Calculations: 16 x 10 = 160 square feet; 160 divided by 81 = 2 cubic yards (81 comes from the chart, 81 is how many square feet 1 cubic yard covers at a 4 inch depth) TriangleHow to Convert Yards to Tons in Gravel | HunkerMay 03, 2018· Most gravel and crushed stone products have similar weights per ton. A general rule of thumb when converting cubic yards of gravel to tons is to multiply the cubic area by 1.4. For your reference, gravel typically weighs 2,800 pounds per cubic yard. In addition, there are 2,000 pounds to a ton.Tonnage Calculator - Mountaintop Stone SalesMultiply your Volume in cubic feet by 160. This will give you the required weight in pounds. To get tons, divide this by 2000. For Example: I am looking to build a garden wall 2 ft wide, 8 ft in length and 4 ft high (2ft) x (4 ft) x (8ft) = 64 cubic feet (64 cubic feet) x (160 lbs) = 10,240 lbs of stone Divide to get your tonnage: 10,240 / 2000 ... Landscaping Coverage Chart | Alsip Home & NurseryBelow are charts to assist you in configuring how much material you may need for your projects. Soil & Mulch by the Cubic Yard. Need to know how much a cubic yard of mulch or soil will cover? Try this. One Cubic Yard Cover in Square Feet Depth in Inches; 300 sq.ft. 1" 150 sq.ft. 2" ... One Ton of Stone Cover in Square Feet Depth in Inches; 240 ...Material Coverage & Conversion ChartMaterial Coverage & Conversion Chart All rock products, rip rap, boulders and soils are sold by the ton. All mulches and plant mixes are sold by cubic yard. 1 Ton/Cy of the material listed below at a 3" depth will cover square feet Concrete Sand 86 Sq. Ft. Squeege 83 Sq. Ft. Pea Gravel 83 Sq. Ft. 314" Rock 77 Sq. Ft. 1 112" Rock 77 Sq. Ft. ### Conversion Table - The Epoxy Experts 1 gallon of resin covers 1608 square feet per 1 mil or 0.001 inch cured coating thickness on a smooth and none absorbent substrate (a pane of glass for example) (length x width x coating thickness)/ 231 cubic inches per gallon = cubic inches of coating need. 50 inches x 36 inches x 0.010 (10 mils) = 18 cubic inches. 18/231= .0779 gallon of ...Stone Tonnage Calculator - Rohrer's IncorporatedStone Tonnage Calculator rohrers-admin T15:51:08-04:00 Tonnage calculations are based on averages and should be used as estimates. Actual amounts needed may vary.convert crusher stone from cubic meters to tonnesconvert crusher stone from cubic meters to tonnes; Crusher & mill. PF Series Impact Crusher; ... Pit run gravel follows at 1.25 tons per cubic meter, regardless of whether it is 2-inch or 4-inch. The heaviest of the crushed rock selections are... Chat Online.Convert ton/(mm^3) to grain/cubic inch - Conversion of ...Do a quick conversion: 1 tons/cubic millimeter = .57 grains/cubic inch using the online calculator for metric conversions. 1. 2020 Gravel Prices | Crushed Stone Cost (Per Ton, Yard & Load)Sub-base SB2 gravel between 1 to 4 inches costs \$38 per cubic yard, \$1.41 per cubic foot, or \$27 per ton when you buy from landscaping suppliers. SB2 gravel 3 to 4 inches, also called #3 Stone, costs \$62 per cubic yard, \$2.30 per cubic foot, or \$31.43 per ton if you order 17.5 tons or more.Calculate 2A Limestone | cubic yards / TonsType in inches and feet of your project and calculate the estimated amount of Limestone Gravel in cubic yards, cubic feet and Tons, that your need for your project. The Density of 2A Limestone : 2,410 lb/yd³ or 1.21 t/yd³ or 0.8 yd³/tHow many tons of riprap are in one cubic yard?The conversion for riprap varies by size but generally speaking, a conversion of 2 tons per cubic yard is sufficient. Limestone has an in situ unit weight of approximately 160 pounds per cubic foot but voids on average reduce the unit weight of riprap to closer to 150 pounds per cubic foot. 2. Sand CalculatorCalculate the area of the excavation by multiplying the length by the width. In our case, A = 12 * 3 = 36 yd 2. You can also type the area of the excavation directly into our calculator if you choose an excavation of some more sophisticated shape. Establish the depth of the excavation. Let's say it's d = 0.5 yd.Cubic Yards CalculatorCalculate cubic yards, cubic feet or cubic meters for landscape material, mulch, land fill, gravel, cement, sand, containers, etc. Enter measurements in US or metric units and get volume conversions to other units. How to calculate cubic yards for rectangular, circular, annular and triangular areas. Calculate project cost based on price per cubic foot, cubic yard or cubic meter.Material Coverage & Conversion ChartMaterial Coverage & Conversion Chart All rock products, rip rap, boulders and soils are sold by the ton. All mulches and plant mixes are sold by cubic yard. 1 Ton/Cy of the material listed below at a 3" depth will cover square feet Concrete Sand 86 Sq. Ft. Squeege 83 Sq. Ft. Pea Gravel 83 Sq. Ft. 314" Rock 77 Sq. Ft. 1 112" Rock 77 Sq. Ft. 3. Bulk Material Calculator | Contractors Stone SupplyContractors Stone Supply bulk materials calculator feature lets you calculate bulk materials for your measurements to have your product delivered. ... 1.25 tons(2,200 - 2,500 lb.) per cubic yard Planting Mix 1 ton (2,000 lb.) per cubic yard ... 8" CHOPPED STONE WILL COVER 45-50 LINEAR FEET PER TON 10 CHOPPED STONE WILL COVER 35-40 LINEAR FEET ...Calculator - Summit - Topsoil and GravelCalculator; Contact Us; A cubic yard is equal to 27 cubic feet. You can use the online calculator to determine how many cubic yards of material are required. Formulas Used Rectangular Area: (Lenght Ft. x Width Ft. x Depth Ft.) / 27 Triangular Area: (Lenght Ft. / 2) x Width Ft. x Depth Ft.] / 27 Round Area: (3.1416 x (Radius x Radius) x Depth in ...Calculator, Landscape Materials, Mulch, Stone, Grass Seed ...Square feet divided by sq. ft. per yard (from chart) = cubic yards needed; Example: A rectangular area 16 feet long by 10 feet wide and you want 4 inches deep of stone. Calculations: 16 x 10 = 160 square feet; 160 divided by 81 = 2 cubic yards (81 comes from the chart, 81 is how many square feet 1 cubic yard covers at a 4 inch depth) Triangle ### Pebble Coverage Calculator | Stoneyard® 198 sf/ton 1 inch thick 132 sf/ton 2 inches thick 66 sf/ton 3 inches thick. PEBBLES COVERAGE CALCULATOR . Product Type: Product Type: Desired Thickness: Length (feet): ... Call our Stone Specialists at, text to, or request a quote. REQUEST QUOTE.Gravel Calculator - Estimate Landscaping Material in Yards ...Now, convert the volume to cubic yards. If the initial measurements were in inches, then convert cubic inches to cubic yards by dividing by 46,656. If the initial measurements were in feet then divide by 27 to get cubic yards. As a shortcut, try our cubic yardage calculator to conveniently calculate your volume. Step Two: Calculate Weight in TonsSand Calculator - how much sand do you need in tons ...A cubic meter of typical sand weighs 1,600 kilograms 1.6 tonnes. A square meter sandbox with a depth of 35 cm weighs about 560 kg or 0.56 tonnes. The numbers are obtained using this sand calculator. How much is a ton of sand? A ton of sand is typically about 0.750 cubic yards (3/4 cu yd), or 20 cubic feet.How to Convert Cubic Yards to Tons of Rip Rap | SciencingAug 07, 2017· How to Convert Cubic Yards to Tons of Rip Rap. People who live near the sea fortify shorelines with riprap, a collection of rock or rubble. This stone barrier absorbs the waves' force, helping an otherwise vulnerable shore resist erosion. Engineers refer to a .Calculations & Conversions :: scruggscompanyConcrete – How Many Cubic Yards of Concrete are needed to fill in a 10 FT x 10 FT area 6 Inches Thick? 10 FT x 10 FT x 0.5 FT = 50 CF / 27 = 1.8 Cubic Yards Limerock/Granite GAB –How many tons of GAB is needed to construct a 10FT wide x 100FT long Driveway 6 Inches thick?Crushed Stone: Determing Yards Per TonYour stone dealer tells you he has a truck that can deliver 20 tons of stone per load. You need to know who many cubic yards that comes out to. Here is the math: 20 tons X 2000 pounds per ton = 40,000 pounds 40,000 pounds / 2700 pounds per cubic yard = 14.29 cubic yards. One 20-ton truckload of crushed stone will yield 14-15 cubic yards of ... Pebble Coverage Calculator | Stoneyard®198 sf/ton 1 inch thick 132 sf/ton 2 inches thick 66 sf/ton 3 inches thick. PEBBLES COVERAGE CALCULATOR . Product Type: Product Type: Desired Thickness: Length (feet): ... Call our Stone Specialists at, text to, or request a quote. REQUEST QUOTE.Gravel Calculator - Estimate Landscaping Material in Yards ...Now, convert the volume to cubic yards. If the initial measurements were in inches, then convert cubic inches to cubic yards by dividing by 46,656. If the initial measurements were in feet then divide by 27 to get cubic yards. As a shortcut, try our cubic yardage calculator to conveniently calculate your volume. Step Two: Calculate Weight in TonsSand Calculator - how much sand do you need in tons ...A cubic meter of typical sand weighs 1,600 kilograms 1.6 tonnes. A square meter sandbox with a depth of 35 cm weighs about 560 kg or 0.56 tonnes. The numbers are obtained using this sand calculator. How much is a ton of sand? A ton of sand is typically about 0.750 cubic yards (3/4 cu yd), or 20 cubic feet.
3,103
11,680
{"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-2020-40
latest
en
0.817522
https://tunxis.commnet.edu/view/answer-answer-key-solubility-curve-worksheet.html
1,718,748,806,000,000,000
text/html
crawl-data/CC-MAIN-2024-26/segments/1718198861794.76/warc/CC-MAIN-20240618203026-20240618233026-00767.warc.gz
519,127,985
7,036
Answer Answer Key Solubility Curve Worksheet - Web if you are struggling with the problems concerning the solubility curve, please don’t be worried, we have prepared numerous free solubility curve worksheets with answer. 2.at what temperature will exactly 100g of sodium nitrate dissolve in 100ml of water? For example, both table salt (nacl). What are the customary units of solubility on. 1) what mass of solute will dissolve in 100ml of water at the following temperatures? Web solubility curve worksheet part 1. 2.at what temperature will exactly 100g of sodium nitrate dissolve in 100ml of water? 1) what mass of solute will dissolve in 100ml of water at the following temperatures? Web use the provided solubility graph to answer the following questions: For example, both table salt (nacl). Web websolubility curve worksheet answer key key: Web 1.how much potassium nitrate will dissolve in 100ml of 30°c water? What are the customary units of solubility on. $$agcn$$ with $$k_{sp} = 2.0 \times. Web solubility curve practice problems worksheet 1. Web using a solubility curve, determine the amount of each solute that can dissolve in i of water at the given temperature. ## ️Solubility Worksheet 1 Answer Key Free Download Gambr.co ## Temperature And Solubility Worksheet Answer Key The Latest Update ## Solubility Rules Worksheet KEY ## 30++ Solubility Curve Worksheet Answers ## ️Solubility Curve Worksheet 1 Answers Free Download Gambr.co ## Solubility Curve Practice Worksheet Answers / worksheet. Solubility ## 50 Solubility Graph Worksheet Answers ## 30++ Solubility Curve Worksheet Answer Key Worksheets Decoomo ## Solubility Curve Practice Problems Worksheet 1 Answer Key ## Solubility Curve Worksheet 2 Answer Key Answer Answer Key Solubility Curve Worksheet - Use the graph to answer the following questions. Use your solubility curve graphs provided to answer the following questions. Web use the provided solubility graph to answer the following questions: A solute is considered soluble if an appreciable amount of it can be dissolved in a given amount of the solvent. How many grams of potassium. Web solubility curve worksheet part 1. Web calculate the solubility in moles/l of each of three salts and the concentration of the cations in mg/ml in each of the saturated solutions. Convert pdf/images to interactive worksheets. \(agcn$$ with \(k_{sp} = 2.0 \times. This is also an important as states are. Web solubility curve worksheet part 1. Web using a solubility curve, determine the amount of each solute that can dissolve in i of water at the given temperature. Web solubility curve answer key. Use your solubility curve graph provided to answer the following questions. Web solubility curve worksheet key use your solubility curve graphs provided to answer the following questions. Francis (usf) | solubility curve worksheet. 34) which salt is least soluble at 20 °c? Web if you are struggling with the problems concerning the solubility curve, please don’t be worried, we have prepared numerous free solubility curve worksheets with answer. 2.at what temperature will exactly 100g of sodium nitrate dissolve in 100ml of water? Use your solubility curve graphs provided to answer the following questions. Find the mass of solute will dissolve in 100ml of water at the following temperatures? 34) which salt is least soluble at 20 °c? Use the graph below to answer the following. This is also an important as states are. If all of the solute could be. ## Which Salt Is Least Soluble In Water. What are the customary units of solubility on. What are the customary units of solubility on. This is also an important as states are. Web solubility curve answer key. ## Web Solubility Curve Worksheet Part 1. Web use the solubility cure below to answer the following questions: What are the customary units of. 100 ml of saturated solutions of the following salts are prepared at 20°c. Convert pdf/images to interactive worksheets. ## Web If You Are Struggling With The Problems Concerning The Solubility Curve, Please Don’t Be Worried, We Have Prepared Numerous Free Solubility Curve Worksheets With Answer. Use the graph below to answer the following. Use your solubility curve graphs provided to answer the following questions. A solute is considered soluble if an appreciable amount of it can be dissolved in a given amount of the solvent. Web free collection of solubility curve worksheet answer key for students the maximum mass of a substance that will dissolve in 100 g of water at a specific temperature is. ## Web 1.How Much Potassium Nitrate Will Dissolve In 100Ml Of 30°C Water? For example, both table salt (nacl). Use the solubility graph to answer the following: Web solubility curve practice problems worksheet 1. Too 10 20 30 40 so eo 90 '00 temperature (o'c).
1,096
4,813
{"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.78125
3
CC-MAIN-2024-26
latest
en
0.755586
https://www.thecoursehero.com/cost-of-capital-assignment-top-essay-writing/
1,610,862,699,000,000,000
text/html
crawl-data/CC-MAIN-2021-04/segments/1610703509973.34/warc/CC-MAIN-20210117051021-20210117081021-00643.warc.gz
1,000,595,257
8,928
# Cost of capital Assignment | Top Essay Writing Prompt: First, review the module resources, especially Chapter 11 in the textbook ( final Reporting, Financial statement Analysis and valuation 9th edition). Then, address the following:  Answer the following questions based on your organization chosen for the final project. Write your response in a separate Microsoft Word document: o Importance of Cost of Capital: Why is cost of capital important to an organization, and what does it measure? o Meaning of Calculations: How do organizations calculate various costs, and what do these calculations mean to business?  After completing the written portion, calculate answers to the problems in the worksheet. Activity Worksheet Don't use plagiarized sources. Get Your Custom Essay on Cost of capital Assignment | Top Essay Writing Just from \$13/Page Prompt: After reviewing the data in the problem, respond to the problems below. Indicate the answer you believe is correct. Rollins Corporation has a target capital structure consisting of 20% debt, 20% preferred stock, and 60% common equity.  Assume the firm has insufficient retained earnings to fund the equity portion of its capital budget. It has 20-year, 12% semiannual coupon bonds that sell at their par value of \$1,000.  The firm could sell, at par, \$100 preferred stock that pays a 12% annual dividend, but flotation costs of 5% would be incurred.  Rollins’ beta is 1.2, the risk-free rate is 10%, and the market risk premium is 5%. Rollins is a constant growth firm that just paid a dividend of \$2.00, sells for \$27.00 per share, and has a growth rate of 8%.  The firm’s policy is to use a risk premium of 4% when using the bond-yield-plus-risk-premium method to find rs.  Flotation costs on new common stock total 10%, and the firm’s marginal tax rate is 40%. Cost of debt 1. What is Rollins’ component cost of debt? 1. 0% 2. 1% 3. 6% 4. 0% 5. 2% 1. What is Rollins’ cost of preferred stock? 1. 0% 2. 0% 3. 0% 4. 6% 5. 2% 1. What is Rollins’ cost of retained earnings using the CAPM approach? 1. 6% 2. 1% 3. 0% 4. 6% 5. 9% 1. What is the firm’s cost of retained earnings using the DCF approach? 1. 6% 2. 1% 3. 0% 1. What is Rollins’ cost of retained earnings using the bond-yield-plus-risk-premium approach? 1. 6% 2. 1% 3. 0% 4. 6% 5. 9% 1. What is Rollins’ WACC, if the firm has insufficient retained earnings to fund the equity portion of its capital budget? 1. 6% 2. 1% 3. 0% 4. 6% 5. 9% Grab A 14% Discount on This Paper Pages (550 words) Approximate price: - Paper format • 275 words per page • 12 pt Arial/Times New Roman • Double line spacing • Any citation style (APA, MLA, Chicago/Turabian, Harvard) Try it now! Total price: \$0.00 How it works?
741
2,745
{"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-2021-04
latest
en
0.90087
https://oeis.org/A237127
1,540,310,773,000,000,000
text/html
crawl-data/CC-MAIN-2018-43/segments/1539583516480.46/warc/CC-MAIN-20181023153446-20181023174946-00024.warc.gz
728,653,378
3,922
This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!) A237127 Number of ways to write n = k + m (0 < k < m) with k and m terms of A072281. 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 3, 2, 3, 2, 3, 3, 3, 2, 2, 4, 3, 3, 2, 2, 4, 3, 4, 3, 4, 4, 3, 3, 4, 5, 4, 1, 3, 3, 5, 4, 4, 4, 4, 5, 3, 4, 2, 4, 4, 4, 5, 2, 4, 1, 4, 4, 4, 4, 1, 3, 4, 4, 5, 5 (list; graph; refs; listen; history; text; internal format) OFFSET 1,15 COMMENTS Conjecture: a(n) > 0 for all n > 11. Clearly, this implies the twin prime conjecture. LINKS Zhi-Wei Sun, Table of n, a(n) for n = 1..10000 EXAMPLE a(13) = 1 since 13 = 5 + 8 with phi(5) - 1 = 3, phi(5) + 1 = 5, phi(8) - 1 = 3 and phi(8) + 1 = 5 all prime. a(60) = 1 since 60 = 18 + 42 with phi(18) - 1 = 5, phi(18) + 1 = 7, phi(42) - 1 = 11 and phi(42) + 1 = 13 all prime. a(84) = 1 since 84 = 7 + 77 with phi(7) - 1 = 5, phi(7) + 1 = 7, phi(77) - 1 = 59 and phi(77) + 1 = 61 all prime. MATHEMATICA PQ[n_]:=PrimeQ[EulerPhi[n]-1]&&PrimeQ[EulerPhi[n]+1] a[n_]:=Sum[If[PQ[k]&&PQ[n-k], 1, 0], {k, 1, (n-1)/2}] Table[a[n], {n, 1, 70}] CROSSREFS Cf. A000010, A000040, A001359, A006512, A014574, A072281. Sequence in context: A305030 A110917 A070956 * A262746 A007828 A070804 Adjacent sequences:  A237124 A237125 A237126 * A237128 A237129 A237130 KEYWORD nonn AUTHOR Zhi-Wei Sun, Feb 04 2014 STATUS approved Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages The OEIS Community | Maintained by The OEIS Foundation Inc. Last modified October 23 12:00 EDT 2018. Contains 316527 sequences. (Running on oeis4.)
795
1,758
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.625
4
CC-MAIN-2018-43
latest
en
0.651518
https://calculator.academy/daily-interest-calculator/
1,702,146,158,000,000,000
text/html
crawl-data/CC-MAIN-2023-50/segments/1700679100942.92/warc/CC-MAIN-20231209170619-20231209200619-00829.warc.gz
174,341,215
51,662
Enter a loan balance or principle, the total length of the loan, and the annual interest rate (%) to calculator the daily interest owed on the loan. ## Daily Interest Formula The following formula is used by the calculator above to determine the daily interest of a loan or mortgage. DI = LB X AIR / 365 • Where DI is the daily interest ($) • LB is the loan balance ($) • AIR is the annual interest rate • 365 is the number of days in a year To calculate daily interest, multiply the loan balance by the annual interest rate, then divide by 365. This formula calculates the total interest you would pay each day on a loan throughout its lifetime. This will not equal your actual payments since that is most often paid in terms of months. ## Daily Interest Definition Daily interest is the average daily interest paid on a loan or credit based on the annual interest rate and total loan balance. ## How to calculate daily interest? How to calculate daily interest? 1. First, determine the loan balance. Determine the total loan balance for 1 year. It’s important to note that this is the annual loan balance and not the overall loan balance. 2. Next, determine the annual interest rate. Calculate or determine the annual interest rate. 3. Finally, calculate the daily interest. Using the formula above, calculate the daily interest. ## FAQ What is daily interest? Daily interest is the average daily interest paid on a loan or credit based on the annual interest rate and total loan balance.
308
1,508
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.21875
3
CC-MAIN-2023-50
latest
en
0.956779
https://topic.alibabacloud.com/a/poj-2528-mayor-39-s-font-classtopic-s-color00c1depostersfont-mdashmdashmdashmdashmdashmdash-quotsegment-tree-interval-substitution-finding-different-intervals-of-existencequot_8_8_31497001.html
1,685,975,812,000,000,000
text/html
crawl-data/CC-MAIN-2023-23/segments/1685224652116.60/warc/CC-MAIN-20230605121635-20230605151635-00030.warc.gz
622,445,172
17,680
# POJ 2528--mayor ' s posters —————— "segment tree interval substitution, finding different intervals of existence" Source: Internet Author: User Tags integer numbers Mayor ' s PostersTime limit:1000MS Memory Limit:65536KB 64bit IO Format:%i64d &%i64 U SubmitStatusPracticePOJ 2528 Description The citizens of Bytetown, AB, could not stand then the candidates in the mayoral election campaign has been placing their Electoral posters at all places at their whim. The city council have finally decided to build a electoral wall for placing the posters and introduce the following rules: • Every candidate can place exactly one poster on the wall. • All posters is of the same height equal to the height of the wall; The width of a poster can be any integer number of bytes (byte was the unit of length in Bytetown). • The wall is divided to segments and the width of each segment is one byte. • Each poster must completely cover a contiguous number of wall segments. They has built a wall 10000000 bytes long (such that there are enough place for all candidates). When the electoral campaign is restarted, the candidates were placing their posters on the wall and their posters differe D widely in width. Moreover, the candidates started placing their posters on wall segments already occupied by other posters. Everyone in Bytetown is curious whose posters would be visible (entirely or in part) on the last day before elections. Your task is to find the number of visible posters when all the posters was placed given the information about posters ' Si Ze, their place and order of placement on the electoral wall. Input The first line of input contains a number C giving the number of cases that follow. The first line of data for a single case contains number 1 <= n <= 10000. The subsequent n lines describe the posters in the order in which they were placed. The i-th line among the n lines contains II integer numbers L and RI which are the number of the wall segment occupied By the left end and the right end of the i-th poster, respectively. We know that for each 1 <= i <= N, 1 <= l i <= ri <= 10000000. After the i-th poster are placed, it entirely covers all wall segments numbered L I, l i+1,..., RI. Output For each input data set print the number of visible posters after all the posters is placed. The picture below illustrates the case of the sample input. Sample Input `151 42 68 103 47 10` Sample Output `4` The main topic: in the publicity bar to paste the leaflet, the same width, the length is different. Paste in a certain order, give the starting and ending position of the flyer, where the position can not be ignored as a point (but a length), asked to see a number of leaflets at the end. Problem-solving ideas: Due to the extent of the data given, so we have to discretization to reduce the complexity, because here is not the "point" is a band length, so the general discretization will appear discrete distortion, here can be in the discrete time to increase the skill, that is, in the non-adjacent data to increase the separation point, highlighting discontinuity. Then the segment is replaced by the segment tree, and finally the different propagating individual numbers of the whole interval are obtained. `#include <stdio.h> #include <string.h> #include <algorithm>using namespace std; #define MID (L+r)/2# Define Lson rt*2,l,mid#define rson rt*2+1,mid+1,rconst int maxn=50000;int lm[maxn/2],rm[maxn/2];int col[maxn*4];int Hash[maxn];int a[maxn];int num=0;int discretization (int l,int r,int key) {//discretization while (l<=r) {int m= (L+R)/2 ; if (Key==a[m]) {return m; }else if (Key<a[m]) {r=m-1; }else{l=m+1; }}}void pushdown (int rt) {if (col[rt]!=-1) {COL[RT*2]=COL[RT]; COL[RT*2+1]=COL[RT]; Col[rt]=-1; }}void Update (int rt,int l,int r,int l_ran,int r_ran,int _col) {if (L_ran<=l&&r<=r_ran) {Col[rt]=_c Ol return; } pushdown (RT); if (l_ran<=mid) update (LSON,L_RAN,R_RAN,_COL); if (r_ran>mid) update (RSON,L_RAN,R_RAN,_COL);} void query (int rt,int l,int R) {if (col[rt]!=-1) {if (! HASH[COL[RT]]) {num++; Hash[coL[rt]]=1; } return; } if (l==r) return; Query (Lson); Query (Rson);} void Debug () {for (int i=1;i<32;i++) {printf ("%d%d\n", i,col[i]); }}int Main () {int t; scanf ("%d", &t); while (t--) {int n,nn=0,m; scanf ("%d", &n); for (int i=0;i<n;i++) {scanf ("%d%d", &lm[i],&rm[i]); A[nn++]=lm[i]; A[nn++]=rm[i]; } sort (A,A+NN); M=1; for (int i=0;i<nn-1;i++) {//de-weight if (a[i]!=a[i+1]) {a[m++]=a[i+1]; }} for (int i=m-1;i>0;i--) {//Add separator point if (a[i]!=a[i-1]+1) {a[m++]=a[i-1]+1; }} sort (a,a+m); int TML,TMR; memset (col,-1,sizeof (col)); for (int i=0;i<n;i++) {tml= discretization (0,m-1,lm[i]); Discretization of Tmr= discretization (0,m-1,rm[i]); Discrete update (1,0,M-1,TML,TMR,I); }//debug (); memset (hash,0,sizeof (Hash)); num=0; Query (1,0,M-1); printf ("%d\n", num); } return 0;}` POJ 2528--mayor ' s posters —————— "segment tree interval substitution, finding different intervals of existence" Related Keywords: ### Contact Us The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email. If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days. ## A Free Trial That Lets You Build Big! Start building with 50+ products and up to 12 months usage for Elastic Compute Service • #### Sales Support 1 on 1 presale consultation • #### After-Sales Support 24/7 Technical Support 6 Free Tickets per Quarter Faster Response • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.
1,634
6,159
{"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-23
latest
en
0.930601
https://www.lotterypost.com/thread/260255
1,495,601,873,000,000,000
text/html
crawl-data/CC-MAIN-2017-22/segments/1495463607786.59/warc/CC-MAIN-20170524035700-20170524055700-00584.warc.gz
912,191,582
15,647
Welcome Guest You last visited May 24, 2017, 12:10 am All times shown are Eastern Time (GMT-5:00) # Before our Number Houses Close Down Lets Win..BIG.. Topic closed. 6 replies. Last post 4 years ago by mbain. Page 1 of 1 Bahamas Member #139033 February 12, 2013 2733 Posts Offline Posted: April 28, 2013, 10:54 am - IP Logged Hello Everyone out there but a specialhello to all die hard number players in the bahamas ... Well as we can see there are some powers out there that are trying to sabotage our interest... My name is Michael and i work at whatfall so the truth is out but really i'm dissapointed with how thing are but only wish i had more time to do this so i going with a Gambit today..... Come Along With Me... 871=..771=971=816=818=872=870=326 424=..414=434=525=323=324=425=979 525=..626=424=535=515=425=526=070 Now if you would be wise and see that all of the above are numbers that have hit ...so in explaination these are numbers that are advisiblde to play in Tri-state miami and cali now....but with this system they are the drop for what Atl -Ny-and Chicago....can bring this morning... Now for the others... 750=..650=850=760=704=751=759=205 051=..151=951=061=041=052=050=506 962=..862=062=972=952=963=961=417 These are the drop for what tri-mia-cali would come out with this morning.... A back up plan is always in order to survive.... 371=821=876. 924=474=428. 025=575=522 These should be shoved in Ny-atl-Chic...They are slippery... 250=700=755. 551=001=056. 462=912=967. And these are to nbe played in Tri-Mia-Cali...For a Great win.. And for the good observers you can clearly see that some of the numbers are twice and three .four times.. Look at the concepts.... MCAL 936 XXXX Sunday, April 21, 2013 ECHA 598 2233 Sunday, April 21, 2013 EMIA 811 8544 Sunday, April 21, 2013 ENY 623 6261 Sunday, April 21, 2013 ETRI 336 6881 Sunday, April 21, 2013 EGA 535 4675 Sunday, April 21, 2013 Lets see what last week sunday Looked like.... To me it looked like 3 had an impact... Pairs=35...=...36...=39... Then we had the issue of =...11... in miami..could possibily be a return... LCHA 260 8467 Sunday, April 21, 2013 LCAL 472 8148 Sunday, April 21, 2013 LMIA 163 9740 Sunday, April 21, 2013 LNY 847 4797 Sunday, April 21, 2013 LTRI 946 1549 Sunday, April 21, 2013 LGA 088 6174 Sunday, April 21, 2013 And here we see what happen that night .. There seem to be a trend of =4's.. Pairs are 46=47=49=48=42. look at the 4balls as well.... It would be Excellent that you play back these number to ...write me... NASSAU Bahamas Member #100280 November 8, 2010 156 Posts Offline Posted: April 28, 2013, 11:10 am - IP Logged Hey Mike i see u are really good , i am a double lover 99percent of my picks are doubles i hit fml everyday twice and three times a day... check my predictions for confirmation on your picks... however i am brilliant at singles this is wat i am playing759,247,446,466,223,233,447,477, and 224,778 and779 back . Good luck and hit em hard..... Play Big, Win Big, Play Small Win Small... HOTEP (PEACE) Bahamas Member #139033 February 12, 2013 2733 Posts Offline Posted: April 28, 2013, 1:23 pm - IP Logged 704 in tri state str8 got em Bahamas Member #139033 February 12, 2013 2733 Posts Offline Posted: April 28, 2013, 1:25 pm - IP Logged haj hahahgagahaha.... Now for 279 in chicago..... 279 Bahamas Member #139033 February 12, 2013 2733 Posts Offline Posted: April 28, 2013, 4:11 pm - IP Logged ECHA 421 8927 Sunday, April 28, 2013 EMIA 820 2513 Sunday, April 28, 2013 ENY 357 5329 Sunday, April 28, 2013 ETRI 704 9948 Sunday, April 28, 2013 EGA 981 8715 Sunday, April 28, 2013 ECHA 598 2233 Sunday, April 21, 2013 EMIA 811 8544 Sunday, April 21, 2013 ENY 623 6261 Sunday, April 21, 2013 ETRI 336 6881 Sunday, April 21, 2013 EGA 535 4675 Sunday, April 21, 2013 LCHA 260 8467 Sunday, April 21, 2013 LCAL 472 8148 Sunday, April 21, 2013 LMIA 163 9740 Sunday, April 21, 2013 LNY 847 4797 Sunday, April 21, 2013 LTRI 946 1549 Sunday, April 21, 2013 LGA 088 6174 Sunday, April 21, 2013 MCAL 936 XXXX Sunday, April 21, 2013 Bahamas Member #139033 February 12, 2013 2733 Posts Offline Posted: April 29, 2013, 2:04 pm - IP Logged haj hahahgagahaha.... Now for 279 in chicago..... 279 do any remember this thanks Nassau Bahamas Member #129751 June 27, 2012 99 Posts Offline Posted: April 29, 2013, 3:21 pm - IP Logged Are they closing for good  wednesday? Page 1 of 1
1,529
4,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.9375
3
CC-MAIN-2017-22
latest
en
0.837322
https://studyslide.com/doc/63516/relational-query-optimization
1,721,655,913,000,000,000
text/html
crawl-data/CC-MAIN-2024-30/segments/1720763517878.80/warc/CC-MAIN-20240722125447-20240722155447-00675.warc.gz
474,534,430
18,651
#### Transcript Relational Query Optimization ```Relational Query Optimization Chapters 13 and 14 Implementation of Database Systems, Jarek Gryz 1 Overview of Query Optimization • Plan: Tree of R.A. ops, with choice of alg for each op.  • Each operator typically implemented using a `pull’ interface: when an operator is `pulled’ for the next output tuples, it `pulls’ on its inputs and computes them. Two main issues:  For a given query, what plans are considered? • Algorithm to search plan space for cheapest (estimated) plan.  • • How is the cost of a plan estimated? Ideally: Want to find best plan. Practically: Avoid worst plans! We will study the System R approach. Implementation of Database Systems, Jarek Gryz 2 Highlights of System R Optimizer • Impact:  • Cost estimation: Approximate art at best.   • Most widely used currently; works well for < 10 joins. Statistics, maintained in system catalogs, used to estimate cost of operations and result sizes. Considers combination of CPU and I/O costs. Plan Space: Too large, must be pruned.  Only the space of left-deep plans is considered. • Left-deep plans allow output of each operator to be pipelined into the next operator without storing it in a temporary relation.  Cartesian products avoided. Implementation of Database Systems, Jarek Gryz 3 Schema for Examples Sailors (sid: integer, sname: string, rating: integer, age: real) Reserves (sid: integer, bid: integer, day: dates, rname: string) • • Similar to old schema; rname added for variations. Reserves:  • Each tuple is 40 bytes long, 100 tuples per page, 1000 pages. Sailors:  Each tuple is 50 bytes long, 80 tuples per page, 500 pages. Implementation of Database Systems, Jarek Gryz 4 Motivating Example RA Tree: SELECT S.sname FROM Reserves R, Sailors S WHERE R.sid=S.sid AND R.bid=100 AND S.rating>5 • • • • sname bid=100 rating > 5 sid=sid Reserves Sailors Cost: 500+500*1000 I/Os (On-the-fly) By no means the worst plan! Plan: sname Misses several opportunities: selections could have been rating > 5 (On-the-fly) bid=100 `pushed’ earlier, no use is made of any available indexes, etc. (Simple Nested Loops) Goal of optimization: To find more sid=sid efficient plans that compute the Implementation of Database Systems, Jarek Gryz Reserves Sailors 5 Alternative Plans 1 (No Indexes) • • Main difference: push selects. With 5 buffers, cost of plan:     • • (On-the-fly) sname (Sort-Merge Join) sid=sid (Scan; write to bid=100 temp T1) Reserves rating > 5 (Scan; write to temp T2) Sailors Scan Reserves (1000) + write temp T1 (10 pages, if we have 100 boats, uniform distribution). Scan Sailors (500) + write temp T2 (250 pages, if we have 10 ratings). Sort T1 (2*2*10), sort T2 (2*3*250), merge (10+250) Total: 3560 page I/Os. If we used BNL join, join cost = 10+4*250, total cost = 2770. If we `push’ projections, T1 has only sid, T2 only sid and sname:  T1 fits in 3 pages, cost of BNL drops to under 250 pages, total < 2000. Implementation of Database Systems, Jarek Gryz 6 sname Alternative Plans 2 With Indexes • • With clustered index on bid of Reserves, we get 100,000/100 = 1000 tuples on 1000/100 = 10 pages. INL with pipelining (outer is not materialized). (On-the-fly) rating > 5 (On-the-fly) sid=sid (Use hash index; do not write result to temp) bid=100 (Index Nested Loops, with pipelining ) Sailors Reserves –Projecting out unnecessary fields from outer doesn’t help. •Join column sid is a key for Sailors. •At most one matching tuple, unclustered index on sid OK. •Decision not to push rating>5 before the join is based on availability of sid index on Sailors. Cost: Selection of Reserves tuples (10 I/Os); for each, must get matching Sailors tuple (1000*1.2); total 1210 I/Os. Implementation of Database Systems, Jarek Gryz 7 • • • Query Blocks: Units of Optimization SELECT S.sname An SQL query is parsed into a FROM Sailors S collection of query blocks, and these WHERE S.age IN are optimized one block at a time. (SELECT MAX (S2.age) Nested blocks are usually treated as FROM Sailors S2 calls to a subroutine, made once per GROUP BY S2.rating) outer tuple. (This is an overNested block simplification, but serves for now.) Outer block For each block, the plans considered are: – All available access methods, for each reln in FROM clause. – All left-deep join trees (i.e., all ways to join the relations oneat-a-time, with the inner reln in the FROM clause, considering all reln permutations and join methods.) Implementation of Database Systems, Jarek Gryz 8 Cost Estimation • For each plan considered, must estimate cost:  Must estimate cost of each operation in plan tree. • Depends on input cardinalities. • We’ve already discussed how to estimate the cost of operations (sequential scan, index scan, joins, etc.)  Must estimate size of result for each operation in tree! • Use information about the input relations. • For selections and joins, assume independence of predicates. • We’ll discuss the System R cost estimation approach.   Very inexact, but works ok in practice. More sophisticated techniques known now. Implementation of Database Systems, Jarek Gryz 9 Statistics and Catalogs • Need information about the relations and indexes involved. Catalogs typically contain at least:    • Catalogs updated periodically.  • # tuples (NTuples) and # pages (NPages) for each relation. # distinct key values (NKeys) and NPages for each index. Index height, low/high key values (Low/High) for each tree index. Updating whenever data changes is too expensive; lots of approximation anyway, so slight inconsistency ok. More detailed information (e.g., histograms of the values in some field) are sometimes stored. Implementation of Database Systems, Jarek Gryz 10 Size Estimation and Reduction Factors • • • SELECT attribute list FROM relation list WHERE term1 AND ... AND termk Consider a query block: Maximum # tuples in result is the product of the cardinalities of relations in the FROM clause. Reduction factor (RF) associated with each term reflects the impact of the term in reducing result size. Result cardinality = Max # tuples * product of all RF’s.     Implicit assumption that terms are independent! Term col=value has RF 1/NKeys(I), given index I on col Term col1=col2 has RF 1/MAX(NKeys(I1), NKeys(I2)) Term col>value has RF (High(I)-value)/(High(I)-Low(I)) Implementation of Database Systems, Jarek Gryz 11 Relational Algebra Equivalences Allow us to choose different join orders and to `push’ selections and projections ahead of joins. Selections:  c1 ... cn  R   c1  . . .  cn  R  • •  c1  c 2  R    c 2  c1  R  • Projections:  a1,..., an R  a1 ... an R  • Joins: R  (S  T)  (R S)  T (R  S)  (S  R) + Show that: (Commute) (Associative) (Commute) R  (S  T)  (T  R)  S Implementation of Database Systems, Jarek Gryz 12 More Equivalences • • • • A projection commutes with a selection that only uses attributes retained by the projection. Selection between attributes of the two arguments of a cross-product converts cross-product to a join. A selection on just attributes of R commutes with R  S. (i.e.,  (R  S)   (R)  S ) Similarly, if a projection follows a join R  S, we can `push’ it by retaining only attributes of R (and S) that are needed for the join or are kept by the projection. Implementation of Database Systems, Jarek Gryz 13 Enumeration of Alternative Plans • There are two main cases:   • Single-relation plans Multiple-relation plans For queries over a single relation, queries consist of a combination of selects, projects, and aggregate ops:   Each available access path (file scan / index) is considered, and the one with the least estimated cost is chosen. The different operations are essentially carried out together (e.g., if an index is used for a selection, projection is done for each retrieved tuple, and the resulting tuples are pipelined into the aggregate computation). Implementation of Database Systems, Jarek Gryz 14 Cost Estimates for Single-Relation Plans • Index I on primary key matches selection:  • Clustered index I matching one or more selects:  • (NPages(I)+NTuples(R)) * product of RF’s of matching selects. Sequential scan of file:  + (NPages(I)+NPages(R)) * product of RF’s of matching selects. Non-clustered index I matching one or more selects:  • Cost is Height(I)+1 for a B+ tree, about 1.2 for hash index. NPages(R). Note: Typically, no duplicate elimination on projections! (Exception: Done on answers if user says DISTINCT.) Implementation of Database Systems, Jarek Gryz 15 Example • If we have an index on rating:    • (1/NKeys(I)) * NTuples(R) = (1/10) * 40000 tuples retrieved. Clustered index: (1/NKeys(I)) * (NPages(I)+NPages(R)) = (1/10) * (50+500) pages are retrieved. (This is the cost.) Unclustered index: (1/NKeys(I)) * (NPages(I)+NTuples(R)) = (1/10) * (50+40000) pages are retrieved. If we have an index on sid:  • SELECT S.sid FROM Sailors S WHERE S.rating=8 Would have to retrieve all tuples/pages. With a clustered index, the cost is 50+500, with unclustered index, 50+40000. Doing a file scan:  We retrieve all file pages (500). Implementation of Database Systems, Jarek Gryz 16 Queries Over Multiple Relations • Fundamental decision in System R: only left-deep join trees are considered.   As the number of joins increases, the number of alternative plans grows rapidly; we need to restrict the search space. Left-deep trees allow us to generate all fully pipelined plans. • Intermediate results not written to temporary files. • Not all left-deep trees are fully pipelined (e.g., SM join). D D C A B C Implementation of Database Systems, Jarek Gryz D A B C A B 17 Enumeration of Left-Deep Plans • • Left-deep plans differ only in the order of relations, the access method for each relation, and the join method for each join. Enumerated using N passes (if N relations joined):    • Pass 1: Find best 1-relation plan for each relation. Pass 2: Find best way to join result of each 1-relation plan (as outer) to another relation. (All 2-relation plans.) Pass N: Find best way to join result of a (N-1)-relation plan (as outer) to the N’th relation. (All N-relation plans.) For each subset of relations, retain only:   Cheapest plan overall, plus Cheapest plan for each interesting order of the tuples. Implementation of Database Systems, Jarek Gryz 18 Enumeration of Plans (Contd.) • • ORDER BY, GROUP BY, aggregates etc. handled as a final step, using either an `interestingly ordered’ plan or an addional sorting operator. An N-1 way plan is not combined with an additional relation unless there is a join condition between them, unless all predicates in WHERE have been used up.  • i.e., avoid Cartesian products if possible. In spite of pruning plan space, this approach is still exponential in the # of tables. Implementation of Database Systems, Jarek Gryz 19 Example • Sailors: B+ tree on rating Hash on sid Reserves: B+ tree on bid Pass1:  Sailors: B+ tree matches rating>5, and is probably cheapest. However, if this selection is expected to retrieve a lot of tuples, and index is unclustered, file scan may be cheaper. sname sid=sid bid=100 rating > 5 Reserves Sailors • Still, B+ tree plan kept (because tuples are in rating order). Reserves: B+ tree on bid matches bid=100; cheapest. Pass 2:  We consider each plan retained from Pass 1 as the outer, and consider how to join it with the (only) other relation.  • e.g., Reserves as outer: Hash index can be used to get Sailors tuples that satisfy sid = outer tuple’s sid value. Implementation of Database Systems, Jarek Gryz 20 Nested Queries • • • Nested block is optimized independently, with the outer tuple considered as providing a selection condition. Outer block is optimized with the cost of `calling’ nested block computation taken into account. Implicit ordering of these blocks means that some good strategies are not considered. The nonnested version of the query is typically optimized better. Implementation of Database Systems, Jarek Gryz SELECT S.sname FROM Sailors S WHERE EXISTS (SELECT * FROM Reserves R WHERE R.bid=103 AND R.sid=S.sid) Nested block to optimize: SELECT * FROM Reserves R WHERE R.bid=103 AND S.sid= outer value Equivalent non-nested query: SELECT S.sname FROM Sailors S, Reserves R WHERE S.sid=R.sid AND R.bid=103 21 Summary • • • Query optimization is an important task in a relational DBMS. Must understand optimization in order to understand the performance impact of a given database design (relations, indexes) on a workload (set of queries). Two parts to optimizing a query:  Consider a set of alternative plans. • Must prune search space; typically, left-deep plans only.  Must estimate cost of each plan that is considered. • Must estimate size of result and cost for each plan node. • Key issues: Statistics, indexes, operator implementations. Implementation of Database Systems, Jarek Gryz 22 Summary (Contd.) • Single-relation queries:   • All access paths considered, cheapest is chosen. Issues: Selections that match index, whether index key has all needed fields and/or provides tuples in a desired order. Multiple-relation queries:     All single-relation plans are first enumerated. • Selections/projections considered as early as possible. Next, for each 1-relation plan, all ways of joining another relation (as inner) are considered. Next, for each 2-relation plan that is `retained’, all ways of joining another relation (as inner) are considered, etc. At each level, for each subset of relations, only best plan for each interesting order of tuples is `retained’. Implementation of Database Systems, Jarek Gryz 23 ```
3,935
13,699
{"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-2024-30
latest
en
0.806871
http://stackoverflow.com/questions/235003/acm-problem-coin-flipping-help-me-identify-the-type-of-problem-this-is/1566323
1,409,424,769,000,000,000
text/html
crawl-data/CC-MAIN-2014-35/segments/1408500835670.21/warc/CC-MAIN-20140820021355-00390-ip-10-180-136-8.ec2.internal.warc.gz
182,900,597
27,122
# ACM Problem: Coin-Flipping, help me identify the type of problem this is I'm practicing for the upcoming ACM programming competition in a week and I've gotten stumped on this programming problem. The problem is as follows: You have a puzzle consisting of a square grid of size 4. Each grid square holds a single coin; each coin is showing either heads (H) and tails (T). One such puzzle is shown here: H H H H T T T T H T H T T T H T Any coin that is current showing Tails (T) can be flipped to Heads (H). However, any time we flip a coin, we must also flip the adjacent coins direct above, below and to the left and right in the same row. Thus if we flip the second coin in the second row we must also flip 4 other coins, giving us this arrangment (coins that changed are shown in bold). H T H H H H H T H H H T T T H T If a coin is at the edge of the puzzle, so there is no coin on one side or the other, then we flip fewer coins. We do not "wrap around" to the other side. For example, if we flipped the bottom right coin of the arragnement above we would get: H T H H H H H T H H H H T T T H Note: Only coins showing (T) tails can be selected for flipping. However, anytime we flip such a coin, adjacent coins are also flipped, regardless of their state. The goal of the puzzle is to have all coins show heads. While it is possible for some arragnements to not have solutions, all the problems given will have solutions. The answer we are looking for is, for any given 4x4 grid of coins what is the least number of flips in order to make the grid entirely heads. For Example the grid: H T H H T T T H H T H T H H T T The answer to this grid is: 2 flips. What I have done so far: I'm storing our grids as two-dimensional array of booleans. Heads = true, tails = false. I have a flip(int row, int col) method that will flip the adjacent coins according the rules above and I have a isSolved() method that will determine if the puzzle is in a solved state (all heads). So we have our "mechanics" in place. The part we are having problems with is how should we loop through, going an the least amount of times deep? - "Lights out" with a slight twist, cool. –  avgbody Oct 24 '08 at 21:14 This might help, if you need to look into the math. geocities.com/jaapsch/puzzles/lomath.htm#litonly –  avgbody Oct 24 '08 at 21:32 Is this problem on line? –  Kiewic Nov 16 '08 at 15:07 It might be on some ACM Programming competitions past-problems page but I haven't found it there. This was given to me in a packet of problems we had to attempt in a 5 hour period. –  Simucal Nov 16 '08 at 22:49 Your puzzle is a classic Breadth-First Search candidate. This is because you're looking for a solution with the fewest possible 'moves'. If you knew the number of moves to the goal, then that would be ideal for a Depth-First Search. Those Wikipedia articles contain plenty of information about the way the searches work, they even contain code samples in several languages. Either search can be recursive, if you're sure you won't run out of stack space. - I'm not sure I'd particularly call this a breadth-first search candidate. I view it as a simple brute force candidate - it's easy to check all solutions, and I'm not even sure whether my implementation would count as "breadth first" or "depth first". Arguably depth first.. –  Jon Skeet Oct 24 '08 at 20:07 Any model with states and transitions can be treated as a graph problem. At the top of the graph is the starting position. All possible moves can be child nodes. Breadth first makes is easier to remove duplicate states from the search. Blimey, you don't get many characters for a comment, do you? –  Lee Kowalkowski Oct 24 '08 at 20:17 @Lee: No, you don't get many characters :) I would agree with your analysis if it were really transitional in the normal sense. But think about what effect it has to do move X then move Y vs move Y then move X in this particular case. –  Jon Skeet Oct 24 '08 at 20:21 @Jon: Does the fact that XY results in the same state as YX mean this is not transitional? Wouldn't you just have node 1 referencing nodes 1.1 and 1.2, node 1.1 would reference node 1.1.1, and node 1.2.1 could either be disarded as a duplicate of 1.1.1 or 1.2 could reference 1.1.1 directly? –  Lee Kowalkowski Oct 24 '08 at 20:32 It means that there's little point in looking at it as a tree - it makes more sense to look at any one attempt as a set of flips instead of a path of flips. IMO, anyway :) Working out all possible sets is easier than working out all possible paths. –  Jon Skeet Oct 24 '08 at 20:49 EDIT: I hadn't noticed that you can't use a coin as the primary move unless it's showing tails. That does indeed make order important. I'll leave this answer here, but look into writing another one as well. No pseudo-code here, but think about this: can you ever imagine yourself flipping a coin twice? What would be the effect? Alternative, write down some arbitrary board (literally, write it down). Set up some real world coins, and pick two arbitrary ones, X and Y. Do an "X flip", then a "Y flip" then another "X flip". Write down the result. Now reset the board to the starting version, and just do a "Y flip". Compare the results, and think about what's happened. Try it a few times, sometimes with X and Y close together, sometimes not. Become confident in your conclusion. That line of thought should lead you to a way of determining a finite set of possible solutions. You can test all of them fairly easily. Hope this hint wasn't too blatant - I'll keep an eye on this question to see if you need more help. It's a nice puzzle. As for recursion: you could use recursion. Personally, I wouldn't in this case. EDIT: Actually, on second thoughts I probably would use recursion. It could make life a lot simpler. Okay, perhaps that wasn't obvious enough. Let's label the coins A-P, like this: ``````ABCD EFGH IJKL MNOP `````` Flipping F will always involve the following coins changing state: BEFGJ. Flipping J will always involve the following coins changing state: FIJKN. What happens if you flip a coin twice? The two flips cancel each other out, no matter what other flips occur. In other words, flipping F and then J is the same as flipping J and then F. Flipping F and then J and then F again is the same as just flipping J to start with. So any solution isn't really a path of "flip A then F then J" - it's "flip <these coins>; don't flip <these coins>". (It's unfortunate that the word "flip" is used for both the primary coin to flip and the secondary coins which change state for a particular move, but never mind - hopefully it's clear what I mean.) Each coin will either be used as a primary move or not, 0 or 1. There are 16 coins, so 2^16 possibilities. So 0 might represent "don't do anything"; 1 might represent "just A"; 2 might represent "just B"; 3 "A and B" etc. Test each combination. If (somehow) there's more than one solution, count the number of bits in each solution to find the least number. Implementation hint: the "current state" can be represented as a 16 bit number as well. Using a particular coin as a primary move will always XOR the current state with a fixed number (for that coin). This makes it really easy to work out the effect of any particular combination of moves. Okay, here's the solution in C#. It shows how many moves were required for each solution it finds, but it doesn't keep track of which moves those were, or what the least number of moves is. That's a SMOP :) The input is a list of which coins are showing tails to start with - so for the example in the question, you'd start the program with an argument of "BEFGJLOP". Code: ``````using System; public class CoinFlip { // All ints could really be ushorts, but ints are easier // to work with static readonly int[] MoveTransitions = CalculateMoveTransitions(); static int[] CalculateMoveTransitions() { int[] ret = new int[16]; for (int i=0; i < 16; i++) { int row = i / 4; int col = i % 4; ret[i] = PositionToBit(row, col) + PositionToBit(row-1, col) + PositionToBit(row+1, col) + PositionToBit(row, col-1) + PositionToBit(row, col+1); } return ret; } static int PositionToBit(int row, int col) { if (row < 0 || row > 3 || col < 0 || col > 3) { // Makes edge detection easier return 0; } return 1 << (row * 4 + col); } static void Main(string[] args) { int initial = 0; foreach (char c in args[0]) { initial += 1 << (c-'A'); } Console.WriteLine("Initial = {0}", initial); ChangeState(initial, 0, 0); } static void ChangeState(int current, int nextCoin, int currentFlips) { // Reached the end. Success? if (nextCoin == 16) { if (current == 0) { // More work required if we want to display the solution :) Console.WriteLine("Found solution with {0} flips", currentFlips); } } else { // Don't flip this coin ChangeState(current, nextCoin+1, currentFlips); // Or do... ChangeState(current ^ MoveTransitions[nextCoin], nextCoin+1, currentFlips+1); } } } `````` - Well, I state in my problem that we've considered flipping a coin once, checking if it is "Solved", if not.. flipping it back. But thigns get confusing when you are thinking about it taking several layers of flipping inorder to reach a solved state. –  Simucal Oct 24 '08 at 19:49 Well, suppose you flip coin X, then coin Y, then coin X again. Compare the result with just flipping coin Y and never touching X... –  Jon Skeet Oct 24 '08 at 19:52 right, but then we will be flipping all of the adjacent coins to Y also, so even though we have restored the adjacent coins of X to their original state except for Y, we have effected the coins surrounding Y. Right? –  Simucal Oct 24 '08 at 19:55 I don't think I've quite made myself clear - but 300 characters may not be enough. I'll edit my answer. –  Jon Skeet Oct 24 '08 at 20:04 Okay, I'll get more blatant :) –  Jon Skeet Oct 24 '08 at 21:12 I would suggest a breadth first search, as someone else already mentioned. The big secret here is to have multiple copies of the game board. Don't think of "the board." I suggest creating a data structure that contains a representation of a board, and an ordered list of moves that got to that board from the starting position. A move is the coordinates of the center coin in a set of flips. I'll call an instance of this data structure a "state" below. My basic algorithm would look something like this: ``````Create a queue. Create a state that contains the start position and an empty list of moves. Put this state into the queue. Loop forever: Pull first state off of queue. For each coin showing tails on the board: Create a new state by flipping that coin and the appropriate others around it. Add the coordinates of that coin to the list of moves in the new state. If the new state shows all heads: Rejoice, you are done. Push the new state into the end of the queue. `````` If you like, you could add a limit to the length of the queue or the length of move lists, to pick a place to give up. You could also keep track of boards that you have already seen in order to detect loops. If the queue empties and you haven't found any solutions, then none exist. Also, a few of the comments already made seem to ignore the fact that the problem only allows coins that show tails to be in the middle of a move. This means that order very much does matter. If the first move flips a coin from heads to tails, then that coin can be the center of the second move, but it could not have been the center of the first move. Similarly, if the first move flips a coin from tails to heads, then that coin cannot be the center of the second move, even though it could have been the center of the first move. - Ah, that's interesting... yes, I hadn't noticed that restriction at all - well spotted. –  Jon Skeet Oct 25 '08 at 6:30 The grid, read in row-major order, is nothing more than a 16 bit integer. Both the grid given by the problem and the 16 possible moves (or "generators") can be stored as 16 bit integers, thus the problems amounts to find the least possible number of generators which, summed by means of bitwise XOR, gives the grid itself as the result. I wonder if there's a smarter alternative than trying all the 65536 possibilities. EDIT: Indeed there is a convenient way to do bruteforcing. You can try all the 1-move patterns, then all the 2-moves patterns, and so on. When a n-moves pattern matches the grid, you can stop, exhibit the winning pattern and say that the solution requires at least n moves. Enumeration of all the n-moves patterns is a recursive problem. EDIT2: You can bruteforce with something along the lines of the following (probably buggy) recursive pseudocode: ``````// Tries all the n bit patterns with k bits set to 1 tryAllPatterns(unsigned short n, unsigned short k, unsigned short commonAddend=0) { if(n == 0) else { // All the patterns that have the n-th bit set to 1 and k-1 bits // set to 1 in the remaining tryAllPatterns(n-1, k-1, (2^(n-1) xor commonAddend) ); // All the patterns that have the n-th bit set to 0 and k bits // set to 1 in the remaining } } `````` - Can you elaborate on the structure of a such a bruteforcing method? I'm really looking for at least some pseudo-code to help visualize it. What you are saying with your second method is what I already stated in my problem I wanted to do. I need a little more help getting there –  Simucal Oct 24 '08 at 20:58 My idea of bruteforcing is slightly simpler: there are 65536 possible approaches, easily mapped from numbers 0-65535. I don't think there can ever be more than one solution (which only uses each move 0 or 1 time) to any problem, but if there were, determining the number of bits is simple :) –  Jon Skeet Oct 24 '08 at 21:03 If he wants to compete in an ACM contest, probably he is searching for elegant/fast/beautiful solutions, and mine are only suggestions. –  Federico A. Ramponi Oct 24 '08 at 21:17 Of course, if I wanted to solve the problem in a quick way, I would go for the straight bruteforce one (for i = 0 to 65535 do...) :D –  Federico A. Ramponi Oct 24 '08 at 21:18 I view the simplest solution as the most elegant, when it's obviously going to run quickly anyway :) –  Jon Skeet Oct 24 '08 at 21:20 To elaborate on Federico's suggestion, the problem is about finding a set of the 16 generators that xor'ed together gives the starting position. But if we consider each generator as a vector of integers modulo 2, this becomes finding a linear combination of vectors, that equal the starting position. Solving this should just be a matter of gaussian elimination (mod 2). EDIT: After thinking a bit more, I think this would work: Build a binary matrix `G` of all the generators, and let `s` be the starting state. We are looking for vectors `x` satisfying `Gx=s` (mod 2). After doing gaussian elimination, we either end up with such a vector `x` or we find that there are no solutions. The problem is then to find the vector `y` such that `Gy = 0` and `x^y` has as few bits set as possible, and I think the easiest way to find this would be to try all such `y`. Since they only depend on `G`, they can be precomputed. I admit that a brute-force search would be a lot easier to implement, though. =) - Okay, here's an answer now that I've read the rules properly :) It's a breadth-first search using a queue of states and the moves taken to get there. It doesn't make any attempt to prevent cycles, but you have to specify a maximum number of iterations to try, so it can't go on forever. This implementation creates a lot of strings - an immutable linked list of moves would be neater on this front, but I don't have time for that right now. ``````using System; using System.Collections.Generic; public class CoinFlip { struct Position { public Position(string moves, int state) { this.moves = moves; this.state = state; } public string Moves { get { return moves; } } public int State { get { return state; } } public IEnumerable<Position> GetNextPositions() { for (int move = 0; move < 16; move++) { if ((state & (1 << move)) == 0) { } int newState = state ^ MoveTransitions[move]; yield return new Position(moves + (char)(move+'A'), newState); } } } // All ints could really be ushorts, but ints are easier // to work with static readonly int[] MoveTransitions = CalculateMoveTransitions(); static int[] CalculateMoveTransitions() { int[] ret = new int[16]; for (int i=0; i < 16; i++) { int row = i / 4; int col = i % 4; ret[i] = PositionToBit(row, col) + PositionToBit(row-1, col) + PositionToBit(row+1, col) + PositionToBit(row, col-1) + PositionToBit(row, col+1); } return ret; } static int PositionToBit(int row, int col) { if (row < 0 || row > 3 || col < 0 || col > 3) { return 0; } return 1 << (row * 4 + col); } static void Main(string[] args) { int initial = 0; foreach (char c in args[0]) { initial += 1 << (c-'A'); } int maxDepth = int.Parse(args[1]); Queue<Position> queue = new Queue<Position>(); queue.Enqueue(new Position("", initial)); while (queue.Count != 0) { Position current = queue.Dequeue(); if (current.State == 0) { Console.WriteLine("Found solution in {0} moves: {1}", current.Moves.Length, current.Moves); return; } if (current.Moves.Length == maxDepth) { continue; } // Shame Queue<T> doesn't have EnqueueRange :( foreach (Position nextPosition in current.GetNextPositions()) { queue.Enqueue(nextPosition); } } Console.WriteLine("No solutions"); } } `````` - If you are practicing for the ACM, I would consider this puzzle also for non-trivial boards, say 1000x1000. Brute force / greedy may still work, but be careful to avoid exponential blow-up. - The is the classic "Lights Out" problem. There is actually an easy `O(2^N)` brute force solution, where `N` is either the width or the height, whichever is smaller. Let's assume the following works on the width, since you can transpose it. One observation is that you don't need to press the same button twice - it just cancels out. The key concept is just that you only need to determine if you want to press the button for each item on the first row. Every other button press is uniquely determined by one thing - whether the light above the considered button is on. If you're looking at cell `(x,y)`, and cell `(x,y-1)` is on, there's only one way to turn it off, by pressing `(x,y)`. Iterate through the rows from top to bottom and if there are no lights left on at the end, you have a solution there. You can then take the min of all the tries. - It's a finite state machine, where each "state" is the 16 bit integer corresponding the the value of each coin. Each state has 16 outbound transitions, corresponding to the state after you flip each coin. Once you've mapped out all the states and transitions, you have to find the shortest path in the graph from your beginning state to state 1111 1111 1111 1111, - Considering it as paths of transitions will take a very long time compared with considering it as sets. There's a useful property here - see my other comments :) –  Jon Skeet Oct 24 '08 at 20:50 I sat down and attempted my own solution to this problem (based on the help I received in this thread). I'm using a 2d array of booleans, so it isn't as nice as the people using 16bit integers with bit manipulation. In any case, here is my solution in Java: ``````import java.util.*; class Node { public boolean[][] Value; public Node Parent; public Node (boolean[][] value, Node parent) { this.Value = value; this.Parent = parent; } } public class CoinFlip { public static void main(String[] args) { boolean[][] startState = {{true, false, true, true}, {false, false, false, true}, {true, false, true, false}, {true, true, false, false}}; List<boolean[][]> solutionPath = search(startState); System.out.println("Solution Depth: " + solutionPath.size()); for(int i = 0; i < solutionPath.size(); i++) { System.out.println("Transition " + (i+1) + ":"); print2DArray(solutionPath.get(i)); } } public static List<boolean[][]> search(boolean[][] startState) { Node StartNode = new Node(startState, null); while(!Open.isEmpty()) { Node nextState = Open.remove(); System.out.println("Considering: "); print2DArray(nextState.Value); if (isComplete(nextState.Value)) { System.out.println("Solution Found!"); return constructPath(nextState); } else { List<Node> children = generateChildren(nextState); for(Node child : children) { if (!Open.contains(child)) } } } return new ArrayList<boolean[][]>(); } public static List<boolean[][]> constructPath(Node node) { List<boolean[][]> solutionPath = new ArrayList<boolean[][]>(); while(node.Parent != null) { node = node.Parent; } Collections.reverse(solutionPath); return solutionPath; } public static List<Node> generateChildren(Node parent) { System.out.println("Generating Children..."); List<Node> children = new ArrayList<Node>(); boolean[][] coinState = parent.Value; for(int i = 0; i < coinState.length; i++) { for(int j = 0; j < coinState[i].length; j++) { if (!coinState[i][j]) { boolean[][] child = arrayDeepCopy(coinState); flip(child, i, j); } } } return children; } public static boolean[][] arrayDeepCopy(boolean[][] original) { boolean[][] r = new boolean[original.length][original[0].length]; for(int i=0; i < original.length; i++) for (int j=0; j < original[0].length; j++) r[i][j] = original[i][j]; return r; } public static void flip(boolean[][] grid, int i, int j) { //System.out.println("Flip("+i+","+j+")"); // if (i,j) is on the grid, and it is tails if ((i >= 0 && i < grid.length) && (j >= 0 && j <= grid[i].length)) { // flip (i,j) grid[i][j] = !grid[i][j]; // flip 1 to the right if (i+1 >= 0 && i+1 < grid.length) grid[i+1][j] = !grid[i+1][j]; // flip 1 down if (j+1 >= 0 && j+1 < grid[i].length) grid[i][j+1] = !grid[i][j+1]; // flip 1 to the left if (i-1 >= 0 && i-1 < grid.length) grid[i-1][j] = !grid[i-1][j]; // flip 1 up if (j-1 >= 0 && j-1 < grid[i].length) grid[i][j-1] = !grid[i][j-1]; } } public static boolean isComplete(boolean[][] coins) { boolean complete = true; for(int i = 0; i < coins.length; i++) { for(int j = 0; j < coins[i].length; j++) { if (coins[i][j] == false) complete = false; } } return complete; } public static void print2DArray(boolean[][] array) { for (int row=0; row < array.length; row++) { for (int col=0; col < array[row].length; col++) { System.out.print((array[row][col] ? "H" : "T") + " "); } System.out.println(); } } } `````` -
5,818
22,420
{"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-2014-35
latest
en
0.935532
https://mathoverflow.net/questions/tagged/probability-distributions
1,621,271,545,000,000,000
text/html
crawl-data/CC-MAIN-2021-21/segments/1620243991258.68/warc/CC-MAIN-20210517150020-20210517180020-00188.warc.gz
403,895,599
38,592
# Questions tagged [probability-distributions] In probability and statistics, a probability distribution assigns a probability to each measurable subset of the possible outcomes of a random experiment, survey, or procedure of statistical inference. 1,479 questions Filter by Sorted by Tagged with 128 views ### Random walk on $n$-dimensional cube Consider a symmetric random walk along the edges of an $n$-dimensional unit cube. At each time step, a particle located at a particular vertex $(a_1, \ldots, a_n)$ moves to an adjacent neighbor each ... 105 views +50 ### Maximum mutual information of random unitary transformation Let $\mathbf{U}$ and $\mathbf{V}$ be random unitary matrices independent of random input vector $\mathbf{x}$. Moreover, $\mathbf{z}$ be random iid complex Gaussian vector with zero mean and identity ... 50 views 102 views ### A slight generalization of Skorokhod's representation theorem Let $f:\mathbb{R}^p\rightarrow\mathbb{R}^q$ $(p,q\geq 1)$ be a continuous function and $(X_n)_{n\geq 1}$ a sequence of random values on $\mathbb{R}^p$ such that $f(X_n)$ converges in law to a random ... 111 views 47 views 35 views 512 views ### Convergence speed of a random dyadic rational generator We are given a multiset $M$ of real numbers which initially is equal to $\{0,1\}$. In a sequential fashion, at each round $r\in\mathbb{N}$ two distinct instances $x_r$ and $y_r$ of $M$'s numbers are ... 30 views ### Log-concave probability measure with slowest decay Let $X$ be a real valued random variable with log-concave distribution $\mu$. For each $x \in {\mathbb R}$, let $$\phi_\mu(x)=\min\limits_{c\in{\mathbb R}}E[e^{c(X-x)}]$$ be the minimal value of the ... 102 views ### Is the topology generated by the convergence of finite-dimensional distributions metrizable? Let $\mathbf{D} := D([0,1]; \mathbb{R}^d)$ be the Skorokhod space (equipped with the Skorokhod metric) of càdlàg functions, and let $X = (X_t)_{t \geq 0}$ be its canonical process. The space of ... 69 views ### Distribution of iid hypergeometric random variables conditioned on the sum Let $X_1,X_2,\ldots,X_n$ be iid random variables with hypergeometric distribution. To be specific, $$\mathrm{Prob}(X_1=i) = \frac{\binom{N}{i}\binom{M-N}{m-i}}{\binom{M}{m}}.$$ Let $S=X_1+\cdots+X_n$.... 114 views ### What is the expected value of the sum of the k (out of a set of n) smallest normal random variables? Given $n$ independent normally distributed random variables $X_1,X_2,...,X_n \sim N(\mu,\sigma)$. For any $k\leq n$, let $X_{(k)}$ be the k-th order statistics (i.e., the k-th smallest value). What is ... 68 views ### sub-exponential type upper bound on the Poisson probability I posted this question on Math Stack Exchange, though I'm not satisfied with the answer I received. Question: For a Poisson random variable $Z$ with the parameter $\lambda,\,$ what would be a good ... 62 views ### Rate of variance's decrease for the mean's distribution of infinite variance i.i.d. random variables Consider a set of i.i.d. (positive) random variables $\{X_i\}_{i=1}^N$. Each variable $X_i$ has a distribution with finite mean but infinite variance. In particular, if $P_{X_i}(x)$ is the P.D.F. of ... Suppose I can sample from a random variable $X$ which is distributed on a compact interval, say, $[0,1]$. Fix a distance measure between distributions, say total variation. Let $\epsilon\in(0,1)$. How ... ### Distribution of a certain functional of iid $N(0,1)$ random variables Suppose that $X_1,\ldots,X_n$ are iid $N(0,1)$ random variables. Consider the random variable given by \xi_n =\Bigl|\frac1{\sqrt{n}}\sum_{t=1}^nX_t\Bigr|^2-\frac1n\sum_{t=1}^nX_t^2 =\frac1n\sum_{s\...
1,048
3,701
{"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.046875
3
CC-MAIN-2021-21
longest
en
0.74576
https://swharden.com/blog/2009-06-19-reading-pcm-audio-with-python/
1,713,832,686,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296818452.78/warc/CC-MAIN-20240423002028-20240423032028-00730.warc.gz
487,048,343
6,607
# SWHarden.com The personal website of Scott W Harden # Reading PCM Audio with Python ``` python``` ``` obsolete``` When I figured this out I figured it was simply way too easy and way to helpful to keep to myself. Here I post (for the benefit of friends, family, and random Googlers alike) two examples of super-simplistic ways to read PCM data from Python using Numpy to handle the data and Matplotlib to display it. First, get some junk audio in PCM format (test.pcm). ``````import numpy data = numpy.memmap("test.pcm", dtype='h', mode='r') print "VALUES:",data `````` This code prints the values of the PCM file. Output is similar to: ``````VALUES: [-115 -129 -130 ..., -72 -72 -72] `````` To graph this data, use matplotlib like so: ``````import numpy, pylab data = numpy.memmap("test.pcm", dtype='h', mode='r') print data pylab.plot(data) pylab.show() `````` This will produce a graph that looks like this: Could it have been ANY easier? I’m so in love with python I could cry right now. With the powerful tools Numpy provides to rapidly and efficiently analyze large arrays (PCM potential values) combined with the easy-to-use graphing tools Matplotlib provides, I’d say you can get well on your way to analyzing PCM audio for your project in no time. Good luck! Let’s get fancy and use this concept to determine the number of seconds in a 1-minute PCM file in which a radio transmission occurs. I was given a 1-minute PCM file with a ~45 second transmission in the middle. Here’s the graph of the result of the code posted below it. (Detailed descriptions are at the bottom) Figure description: The top trace (light blue) is the absolute value of the raw sound trace from the PCM file. The solid black line is the average (per second) of the raw audio trace. The horizontal dotted line represents the threshold, a value I selected. If the average volume for a second is above the threshold, that second is considered as “transmission” (1), if it’s below the threshold it’s “silent” (0). By graphing these 60 values in bar graph form (bottom window) we get a good idea of when the transmission starts and ends. Note that the ENTIRE graphing steps are for demonstration purposes only, and all the math can be done in the 1st half of the code. Graphing may be useful when determining the optimal threshold though. Even when the radio is silent, the microphone is a little noisy. The optimal threshold is one which would consider microphone noise as silent, but consider a silent radio transmission as a transmission. ``````### THIS CODE DETERMINES THE NUMBER OF SECONDS OF TRANSMISSION ### FROM A 60 SECOND PCM FILE (MAKE SURE PCM IS 60 SEC LONG!) import numpy threshold=80 # set this to suit your audio levels dataY=dataY-numpy.average(dataY) #adjust the sound vertically the avg is at 0 dataY=numpy.absolute(dataY) #no negative values valsPerSec=float(len(dataY)/60) #assume audio is 60 seconds long dataX=numpy.arange(len(dataY))/(valsPerSec) #time axis from 0 to 60 secY,secX,secA=[],[],[] for sec in xrange(60): secData=dataY[valsPerSec*sec:valsPerSec*(sec+1)] val=numpy.average(secData) secY.append(val) secX.append(sec) if val>threshold: secA.append(1) else: secA.append(0) print "%d sec of 60 used = %0.02f"%(sum(secA),sum(secA)/60.0) raw_input("press ENTER to graph this junk...") ### CODE FROM HERE IS ONLY USED TO GRAPH THE DATA ### IT MAY BE USEFUL FOR DETERMINING OPTIMAL THRESHOLD import pylab ax=pylab.subplot(211) pylab.title("PCM Data Fitted to 60 Sec") pylab.plot(dataX,dataY,'b',alpha=.5,label="sound") pylab.axhline(threshold,color='k',ls=":",label="threshold") pylab.plot(secX,secY,'k',label="average/sec",alpha=.5) pylab.legend() pylab.grid(alpha=.2) pylab.axis([None,None,-1000,10000]) pylab.subplot(212,sharex=ax) pylab.title("Activity (Yes/No) per Second") pylab.grid(alpha=.2) pylab.bar(secX,secA,width=1,linewidth=0,alpha=.8) pylab.axis([None,None,-0.5,1.5]) pylab.show() `````` The output of this code: `46 sec of 60 used = 0.77`
1,060
3,982
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.96875
3
CC-MAIN-2024-18
latest
en
0.851664
https://www.physicsforums.com/threads/find-the-sinusoidal-signal-at-specific-frequency.709059/
1,508,590,613,000,000,000
text/html
crawl-data/CC-MAIN-2017-43/segments/1508187824775.99/warc/CC-MAIN-20171021114851-20171021134851-00809.warc.gz
998,562,216
16,861
# Find the sinusoidal signal at specific frequency 1. Sep 6, 2013 ### DODGEVIPER13 1. The problem statement, all variables and given/known data For a phasor V(x) = 8 + 4j find the sinusoidal signal that it represents if the frequency is 50 Hz? 2. Relevant equations 3. The attempt at a solution sqrt(64+16)=8.944sin(50t) so clearly this is not correct? 2. Sep 6, 2013 ### DODGEVIPER13 8.944sin(100∏t+26.56) 3. Sep 6, 2013 ### DODGEVIPER13 where ω=2(pi)f=100(pi) and sin(ωt+θ) I found θ by tan^-1(4/8)=26.56° 4. Sep 6, 2013 ### Staff: Mentor Yup. That'll do it. Although strictly speaking you should indicate the units of the arguments to the sin function, since one is clearly radians and the other degrees... 5. Sep 6, 2013 ### DODGEVIPER13 8.944sin(100(pi)t+.463) 6. Sep 6, 2013 ### DODGEVIPER13 converted 26.56 to radians 7. Sep 6, 2013 ### DODGEVIPER13 oor would just doing 26.56° 8. Sep 6, 2013 ### Staff: Mentor Either way works. You're more likely to see the degrees version in practice.
355
1,020
{"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-2017-43
longest
en
0.823303
https://paytodoexam.com/what-is-the-difference-between-fifo-and-lifo
1,722,887,391,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722640454712.22/warc/CC-MAIN-20240805180114-20240805210114-00817.warc.gz
354,021,332
31,285
# What is the difference between FIFO and LIFO? ## What is the difference between FIFO and LIFO? What is the difference between FIFO and LIFO? There are two ways to understand FIFO. The first of these is that it is a capacitor that lives in a capacitor. The other is that it supports the charge of electrons in the cell and turns on the electron in the cell. As we know, these two are connected in the form of two capacitors. The first capacitor is called the FIFO capacitor. The second capacitor is called LIFO capacitor (also called FICO). The FIFO circuit can be described as follows. With the FIFOS in a capacitor, electrons are introduced into the FIFOC. The electrons move in a direction opposite to the direction of movement of the cells. The electrons are further transferred in the direction opposite to that of movement of cells. However, this does not work for the cell. The electrons do not move in the direction of the movement of cells, but move randomly in the cell direction. To measure the speed and characteristic of a cell, we can use the characteristics of the FIFOs, which are the characteristics of a cell: the characteristic of the capacitance, the capacitance-to-voltage characteristic, and the capacitance of the cell. A capacitor is a structure that supports the charge in a cell and turns the charge into the capacitor. The capacitor is used as a power source for the electricity. One of the advantages of using a capacitor is that it can be made a small size and that it can also be small in a short time. This is a way to increase the size of a cell. The capacitor is used to make a cell larger than a standard cell, and to use a large size cell that is very small in size. In addition, the capacitor is used for making a small cell larger than standard cells, and it can be used as a small cell smaller than a standard cells that is small in size (such as in the form shown in FIG. 1). ## Mymathlab Test Password If an FIFO is formed on an Continued film, the charge from the FIFOP is transferred to the cell via the FIFOF. The FIFO can be used to make cells smaller and smaller in size. The FICO can click reference made smaller and smaller by using a capacitor as a power supply. When all of the cells are made smaller, the capacitors are made smaller in size than a standard. If the capacity of a cell is made smaller than a cell capacity, the cell is made larger. FIFO is made large by using a FIFO cell. If the cell size is made smaller in the cell size than a cell size, the cell size becomes have a peek at this site As a result, the number of memory cells increases more. For example, if a cell is composed of 32 (8 × 32) memory cells, it is possible to make a large cellWhat is the difference between FIFO and LIFO? The difference between FTO and LIFOR is that FTO is the energy release rate produced in the process of FTO and is released when the FTO is at low temperatures. LIFOR can be used to measure the energy release from the FTO and can be used as a tool for thermodynamic studies of the FTO. FIFO and FTO FTO is the fuel for the flue gas of the fuel cell. It is the fuel of the fuel cells for the fuel cell stack and is the fuel used by the fuel cell to produce the flue gases of the fuel. FTO is responsible for the fuel in the fuel cell and is used to generate the energy in the fuel cells. FTO can be used in the following: In the FTO cells of the fuel electrode, the fuel electrode is a dielectric substrate and is joined to the fuel electrode by a series of interdigitated layers, which are connected to a pair of electrodes. The electrodes are connected to the fuel supply electrodes by a pair of interdigition layers, which is formed by a dielectrics dielectric layer and a conductive epoxy layer. The interdigition layer is formed by an visite site dielectric of a layer of a metal layer, a metal insulating layer, or a metal and metal interdigition insulating layer. The metal layer is made from a metal and is used for the interdigition of the metal layer. The conductive layer is formed from a conductive metallic layer. The insulating layer is formed of a metal, a metal interdigitation layer, or an inert ion exchange layer. The metals interdigition plates are formed by a metal interposed between the metal interdigitions of the metal interdimensional layers. ## About My Class Teacher The metal interdigitate layer is made of a metal interposition layer. The inert ion exchange layers are formed between the interdigitation layers of the metal layers. The conductivity of the metal can be varied by the interdigitating layers. The FTO can also be used to monitor the movement of the fuel during the fuel cell operation. The fuel can be fed from the fuel cells to the flue cells and fed back to the fluamers. The FTO is used to monitor fuel flow into the fuel cell using the principle of the “flow reaction.” The flow reaction is a reaction of the fuel and the flue. The fuel is fed to a fuel cell in a fuel cell stack by a fuel cell assembly. The fuel cell is a hop over to these guys cell, and the fluamer is a fuel. The fuel from the fuel cell assembly is used as a fuel and the fuel is fed in the fuel assembly to the fliouers. The fuel in the flue assembly is also fed to the fuel cell in the fuel tank. LIFOR The LIFOR used by the FWhat is the difference between FIFO and LIFO? LIFO is a way of removing the lag in the photon flux of the electron. It provides a measure of the electron’s electron energy and its kinetic energy. FIFO is the energy and kinetic energy of an electron (an electron’s energy, not the energy of its electrons). The FIFO equation is: where the subscript FIFO refers to the energy of the electron and the subscript FRET refers to the kinetic energy of the electrons. The emission of photons is described in terms of the FIFO electron kinetic energy, which is the electron’s energy from the electron. While the electron is the electron itself, the photon energy is the energy of a particle or an electron in the particle’s environment. The FIFORF equation is: FIFO / FIFO + FIFO One important difference between FFI and FIFO is that FIFO in the second equation has an even higher energy than FIFO. What is the relationship between FIF and FIFORFs? FFI has been used in the field of light-based experiments to determine the electron energy and the strength of the electron-photon interaction. The result is a pair of gamma-ray photons that are emitted from the electron and are about the same energy, but their energy is lower. ## My Math Genius Cost How does an electron-phonon interaction occur? The electron-phronon interaction is the process of a pair of electrons and an electron-ion pair which have the same energy. The electron and the electron-ion pairs are in the same electronic state and in each of the different photons. Who is FIFO? The FIFOSR model In the FIFOSRE model, the electron and an electron pair are in the form of a pair. The electron-phion pair can be in the form a pair of particles together with a heavy electron. The light electron is an electron in a small system of particles. The light and heavy electrons interact with each other to form a photon. In FIFO, the electron-electron energy difference is the difference of the energy of two photons of the same energy and the energy of one photon of the opposite energy. The difference of the electron energy is the difference in the kinetic energy. The kinetic energy of a photon is its kinetic energy, the photon’s kinetic energy, or the photon’s energy. The FFI equation is: FIFO/FIFO + FIFORFFI The FIFO equations of FFI are: FIO = FIFO/(FIFO) FQO = FIFORDFI/(FIFORFFIFI) The terms FIFO (FIFO), FIF (FIFORF), and FIF (FFIF) ### Related Post What was go to the website role of the Mongols How long does it take to receive my ATI TEAS What is the purpose of planning in management? In this How do I calculate correlation coefficients in MyStatLab? Here are What is financial management? How to make your first trip How do job placement services screen candidates? Job & Job What is the Microsoft Certified: Dynamics 365 for Finance and What is the policy on rescheduling the midterm you can What is the policy on missed group work affecting the What is the English and Language Usage section of the
1,843
8,287
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.125
3
CC-MAIN-2024-33
latest
en
0.960027
https://www.netlib.org/lapack/explore-html/d3/dd5/group__rotmg_ga4e2582ebf7f445a7628954183c4cce30.html
1,714,044,709,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712297292879.97/warc/CC-MAIN-20240425094819-20240425124819-00403.warc.gz
822,967,670
5,255
LAPACK 3.12.0 LAPACK: Linear Algebra PACKage Searching... No Matches ## ◆ srotmg() subroutine srotmg ( real sd1, real sd2, real sx1, real sy1, real, dimension(5) sparam ) SROTMG Purpose: ``` CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS THE SECOND COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)*> SY2)**T. WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS.. SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0 (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0) H=( ) ( ) ( ) ( ) (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0). LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22 RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.) THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE OF SD1 AND SD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.``` Parameters [in,out] SD1 ` SD1 is REAL` [in,out] SD2 ` SD2 is REAL` [in,out] SX1 ` SX1 is REAL` [in] SY1 ` SY1 is REAL` [out] SPARAM ``` SPARAM is REAL array, dimension (5) SPARAM(1)=SFLAG SPARAM(2)=SH11 SPARAM(3)=SH21 SPARAM(4)=SH12 SPARAM(5)=SH22``` Definition at line 89 of file srotmg.f. 90* 91* -- Reference BLAS level1 routine -- 92* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- 93* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 94* 95* .. Scalar Arguments .. 96 REAL SD1,SD2,SX1,SY1 97* .. 98* .. Array Arguments .. 99 REAL SPARAM(5) 100* .. 101* 102* ===================================================================== 103* 104* .. Local Scalars .. 105 REAL GAM,GAMSQ,ONE,RGAMSQ,SFLAG,SH11,SH12,SH21,SH22,SP1,SP2,SQ1, 106 \$ SQ2,STEMP,SU,TWO,ZERO 107* .. 108* .. Intrinsic Functions .. 109 INTRINSIC abs 110* .. 111* .. Data statements .. 112* 113 DATA zero,one,two/0.e0,1.e0,2.e0/ 114 DATA gam,gamsq,rgamsq/4096.e0,1.67772e7,5.96046e-8/ 115* .. 116 117 IF (sd1.LT.zero) THEN 118* GO ZERO-H-D-AND-SX1.. 119 sflag = -one 120 sh11 = zero 121 sh12 = zero 122 sh21 = zero 123 sh22 = zero 124* 125 sd1 = zero 126 sd2 = zero 127 sx1 = zero 128 ELSE 129* CASE-SD1-NONNEGATIVE 130 sp2 = sd2*sy1 131 IF (sp2.EQ.zero) THEN 132 sflag = -two 133 sparam(1) = sflag 134 RETURN 135 END IF 136* REGULAR-CASE.. 137 sp1 = sd1*sx1 138 sq2 = sp2*sy1 139 sq1 = sp1*sx1 140* 141 IF (abs(sq1).GT.abs(sq2)) THEN 142 sh21 = -sy1/sx1 143 sh12 = sp2/sp1 144* 145 su = one - sh12*sh21 146* 147 IF (su.GT.zero) THEN 148 sflag = zero 149 sd1 = sd1/su 150 sd2 = sd2/su 151 sx1 = sx1*su 152 ELSE 153* This code path if here for safety. We do not expect this 154* condition to ever hold except in edge cases with rounding 155* errors. See DOI: 10.1145/355841.355847 156 sflag = -one 157 sh11 = zero 158 sh12 = zero 159 sh21 = zero 160 sh22 = zero 161* 162 sd1 = zero 163 sd2 = zero 164 sx1 = zero 165 END IF 166 ELSE 167 168 IF (sq2.LT.zero) THEN 169* GO ZERO-H-D-AND-SX1.. 170 sflag = -one 171 sh11 = zero 172 sh12 = zero 173 sh21 = zero 174 sh22 = zero 175* 176 sd1 = zero 177 sd2 = zero 178 sx1 = zero 179 ELSE 180 sflag = one 181 sh11 = sp1/sp2 182 sh22 = sx1/sy1 183 su = one + sh11*sh22 184 stemp = sd2/su 185 sd2 = sd1/su 186 sd1 = stemp 187 sx1 = sy1*su 188 END IF 189 END IF 190 191* PROCEDURE..SCALE-CHECK 192 IF (sd1.NE.zero) THEN 193 DO WHILE ((sd1.LE.rgamsq) .OR. (sd1.GE.gamsq)) 194 IF (sflag.EQ.zero) THEN 195 sh11 = one 196 sh22 = one 197 sflag = -one 198 ELSE 199 sh21 = -one 200 sh12 = one 201 sflag = -one 202 END IF 203 IF (sd1.LE.rgamsq) THEN 204 sd1 = sd1*gam**2 205 sx1 = sx1/gam 206 sh11 = sh11/gam 207 sh12 = sh12/gam 208 ELSE 209 sd1 = sd1/gam**2 210 sx1 = sx1*gam 211 sh11 = sh11*gam 212 sh12 = sh12*gam 213 END IF 214 ENDDO 215 END IF 216 217 IF (sd2.NE.zero) THEN 218 DO WHILE ( (abs(sd2).LE.rgamsq) .OR. (abs(sd2).GE.gamsq) ) 219 IF (sflag.EQ.zero) THEN 220 sh11 = one 221 sh22 = one 222 sflag = -one 223 ELSE 224 sh21 = -one 225 sh12 = one 226 sflag = -one 227 END IF 228 IF (abs(sd2).LE.rgamsq) THEN 229 sd2 = sd2*gam**2 230 sh21 = sh21/gam 231 sh22 = sh22/gam 232 ELSE 233 sd2 = sd2/gam**2 234 sh21 = sh21*gam 235 sh22 = sh22*gam 236 END IF 237 END DO 238 END IF 239 240 END IF 241 242 IF (sflag.LT.zero) THEN 243 sparam(2) = sh11 244 sparam(3) = sh21 245 sparam(4) = sh12 246 sparam(5) = sh22 247 ELSE IF (sflag.EQ.zero) THEN 248 sparam(3) = sh21 249 sparam(4) = sh12 250 ELSE 251 sparam(2) = sh11 252 sparam(5) = sh22 253 END IF 254 255 sparam(1) = sflag 256 RETURN 257* 258* End of SROTMG 259* Here is the caller graph for this function:
1,813
4,617
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.546875
3
CC-MAIN-2024-18
latest
en
0.350953
https://www.lmfdb.org/Character/Dirichlet/1045/502
1,652,982,925,000,000,000
text/html
crawl-data/CC-MAIN-2022-21/segments/1652662529658.48/warc/CC-MAIN-20220519172853-20220519202853-00640.warc.gz
1,038,213,111
7,000
# Properties Label 1045.502 Modulus $1045$ Conductor $1045$ Order $60$ Real no Primitive yes Minimal yes Parity odd # Related objects Show commands: Pari/GP / SageMath sage: from sage.modular.dirichlet import DirichletCharacter sage: H = DirichletGroup(1045, base_ring=CyclotomicField(60)) sage: M = H._module sage: chi = DirichletCharacter(H, M([15,42,10])) pari: [g,chi] = znchar(Mod(502,1045)) ## Basic properties Modulus: $$1045$$ Conductor: $$1045$$ sage: chi.conductor()  pari: znconreyconductor(g,chi) Order: $$60$$ sage: chi.multiplicative_order()  pari: charorder(g,chi) Real: no Primitive: yes sage: chi.is_primitive()  pari: #znconreyconductor(g,chi)==1 Minimal: yes Parity: odd sage: chi.is_odd()  pari: zncharisodd(g,chi) ## Galois orbit 1045.cg sage: chi.galois_orbit() pari: order = charorder(g,chi) pari: [ charpow(g,chi, k % order) | k <-[1..order-1], gcd(k,order)==1 ] ## Related number fields Field of values: $$\Q(\zeta_{60})$$ Fixed field: Number field defined by a degree 60 polynomial ## Values on generators $$(837,761,496)$$ → $$(i,e\left(\frac{7}{10}\right),e\left(\frac{1}{6}\right))$$ ## Values $$a$$ $$-1$$ $$1$$ $$2$$ $$3$$ $$4$$ $$6$$ $$7$$ $$8$$ $$9$$ $$12$$ $$13$$ $$14$$ $$\chi_{ 1045 }(502, a)$$ $$-1$$ $$1$$ $$e\left(\frac{7}{60}\right)$$ $$e\left(\frac{31}{60}\right)$$ $$e\left(\frac{7}{30}\right)$$ $$e\left(\frac{19}{30}\right)$$ $$e\left(\frac{3}{20}\right)$$ $$e\left(\frac{7}{20}\right)$$ $$e\left(\frac{1}{30}\right)$$ $$-i$$ $$e\left(\frac{17}{60}\right)$$ $$e\left(\frac{4}{15}\right)$$ sage: chi.jacobi_sum(n) $$\chi_{ 1045 }(502,a) \;$$ at $$\;a =$$ e.g. 2
619
1,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": 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
3
CC-MAIN-2022-21
latest
en
0.301069
https://rosettacode.org/wiki/Jump_anywhere?oldid=353790
1,718,998,494,000,000,000
text/html
crawl-data/CC-MAIN-2024-26/segments/1718198862157.88/warc/CC-MAIN-20240621191840-20240621221840-00272.warc.gz
433,853,782
90,079
# Attractive numbers Attractive numbers You are encouraged to solve this task according to the task description, using any language you may know. A number is an   attractive number   if the number of its prime factors (whether distinct or not) is also prime. Example The number   20,   whose prime decomposition is   2 × 2 × 5,   is an   attractive number   because the number of its prime factors   (3)   is also prime. Show sequence items up to   120. Reference ## 11l Translation of: Python ```F is_prime(n) I n < 2 R 0B L(i) 2 .. Int(sqrt(n)) I n % i == 0 R 0B R 1B F get_pfct(=n) V i = 2 [Int] factors L i * i <= n I n % i i++ E n I/= i factors.append(i) I n > 1 factors.append(n) R factors.len [Int] pool L(each) 0..120 pool.append(get_pfct(each)) [Int] r L(each) pool I is_prime(each) r.append(L.index) print(r.map(String).join(‘,’))``` Output: ```4,6,8,9,10,12,14,15,18,20,21,22,25,26,27,28,30,32,33,34,35,38,39,42,44,45,46,48,49,50,51,52,55,57,58,62,63,65,66,68,69,70,72,74,75,76,77,78,80,82,85,86,87,91,92,93,94,95,98,99,102,105,106,108,110,111,112,114,115,116,117,118,119,120 ``` ## 8080 Assembly ``` ;;; Show attractive numbers up to 120 MAX: equ 120 ; can be up to 255 (8 bit math is used) ;;; CP/M calls puts: equ 9 bdos: equ 5 org 100h ;;; -- Zero memory ------------------------------------------------ lxi b,fctrs ; page 2 mvi e,2 ; zero out two pages xra a mov d,a zloop: stax b inx b dcr d jnz zloop dcr e jnz zloop ;;; -- Generate primes -------------------------------------------- lxi h,plist ; pointer to beginning of primes list mvi e,2 ; first prime is 2 pstore: mov m,e ; begin prime list pcand: inr e ; next candidate jz factor ; if 0, we've rolled over, so we're done mov l,d ; beginning of primes list (D=0 here) mov c,m ; C = prime to test against ptest: mov a,e ploop: sub c ; test by repeated subtraction jc notdiv ; if carry, not divisible jz pcand ; if zero, next candidate jmp ploop notdiv: inx h ; get next prime mov c,m mov a,c ; is it zero? ora a jnz ptest ; if not, test against next prime jmp pstore ; otherwise, add E to the list of primes ;;; -- Count factors ---------------------------------------------- fnum: mvi a,MAX ; is candidate beyond maximum? cmp c jc output ; then stop mvi d,0 ; D = number of factors of C mov l,d ; L = first prime mov e,c ; E = number we're factorizing fprim: mvi h,ppage ; H = current prime mov h,m ftest: mvi b,0 mov a,e cpi 1 ; If one, we've counted all the factors jz nxtfac fdiv: sub h jz divi jc ndivi inr b jmp fdiv divi: inr d ; we found a factor inr b mov e,b ; we've removed it, try again jmp ftest ndivi: inr l ; not divisible, try next prime jmp fprim nxtfac: mov a,d ; store amount of factors mvi b,fcpage stax b inr c ; do next number jmp fnum ;;; -- Check which numbers are attractive and print them ---------- mvi h,ppage ; H = page of primes onum: mvi a,MAX ; is candidate beyond maximum? cmp c rc ; then stop ldax b ; get amount of factors mvi l,0 ; start at beginning of prime list chprm: cmp m ; check against current prime jz print ; if it's prime, then print the number inr l ; otherwise, check next prime jp chprm next: inr c ; check next number jmp onum print: push b ; keep registers push h mov a,c ; print number call printa pop h ; restore registers pop b jmp next ;;; Subroutine: print the number in A printa: lxi d,num ; DE = string mvi b,10 ; divisor digit: mvi c,-1 ; C = quotient divlp: inr c sub b jnc divlp dcx d ; store digit stax d mov a,c ; again with new quotient ora a ; is it zero? jnz digit ; if not, do next digit mvi c,puts ; CP/M print string (in DE) jmp bdos db '000' ; placeholder for number num: db ' \$' fcpage: equ 2 ; factors in page 2 ppage: equ 3 ; primes in page 3 fctrs: equ 256*fcpage plist: equ 256*ppage``` Output: `4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120` ## Action! ```INCLUDE "H6:SIEVE.ACT" BYTE FUNC IsAttractive(BYTE n BYTE ARRAY primes) BYTE count,f IF n<=1 THEN RETURN (0) ELSEIF primes(n) THEN RETURN (0) FI count=0 f=2 DO IF n MOD f=0 THEN count==+1 n==/f IF n=1 THEN EXIT ELSEIF primes(n) THEN f=n FI ELSEIF f>=3 THEN f==+2 ELSE f=3 FI OD IF primes(count) THEN RETURN (1) FI RETURN (0) PROC Main() DEFINE MAX="120" BYTE ARRAY primes(MAX+1) BYTE i Put(125) PutE() ;clear the screen Sieve(primes,MAX+1) PrintF("Attractive numbers in range 1..%B:%E",MAX) FOR i=1 TO MAX DO IF IsAttractive(i,primes) THEN PrintF("%B ",i) FI OD RETURN``` Output: ```Attractive numbers in range 1..120: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` Translation of: C ```with Ada.Text_IO; procedure Attractive_Numbers is function Is_Prime (N : in Natural) return Boolean is D : Natural := 5; begin if N < 2 then return False; end if; if N mod 2 = 0 then return N = 2; end if; if N mod 3 = 0 then return N = 3; end if; while D * D <= N loop if N mod D = 0 then return False; end if; D := D + 2; if N mod D = 0 then return False; end if; D := D + 4; end loop; return True; end Is_Prime; function Count_Prime_Factors (N : in Natural) return Natural is NC : Natural := N; Count : Natural := 0; F : Natural := 2; begin if NC = 1 then return 0; end if; if Is_Prime (NC) then return 1; end if; loop if NC mod F = 0 then Count := Count + 1; NC := NC / F; if NC = 1 then return Count; end if; if Is_Prime (NC) then F := NC; end if; elsif F >= 3 then F := F + 2; else F := 3; end if; end loop; end Count_Prime_Factors; procedure Show_Attractive (Max : in Natural) is package Integer_IO is N : Natural; Count : Natural := 0; begin Put_Line ("The attractive numbers up to and including " & Max'Image & " are:"); for I in 1 .. Max loop N := Count_Prime_Factors (I); if Is_Prime (N) then Integer_IO.Put (I, Width => 5); Count := Count + 1; if Count mod 20 = 0 then New_Line; end if; end if; end loop; end Show_Attractive; begin Show_Attractive (Max => 120); end Attractive_Numbers; ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## ALGOL 68 ```BEGIN # find some attractive numbers - numbers whose prime factor counts are # # prime, n must be > 1 # # find the attractive numbers # INT max number = 120; []BOOL sieve = PRIMESIEVE ENTIER sqrt( max number ); print( ( "The attractve numbers up to ", whole( max number, 0 ), newline ) ); INT a count  := 0; FOR i FROM 2 TO max number DO IF INT v  := i; INT f count := 0; WHILE NOT ODD v DO f count +:= 1; v OVERAB 2 OD; FOR j FROM 3 BY 2 TO max number WHILE v > 1 DO WHILE v > 1 AND v MOD j = 0 DO f count +:= 1; v OVERAB j OD OD; f count > 0 THEN IF sieve[ f count ] THEN print( ( " ", whole( i, -3 ) ) ); IF ( a count +:= 1 ) MOD 20 = 0 THEN print( ( newline ) ) FI FI FI OD; print( ( newline, "Found ", whole( a count, 0 ), " attractive numbers", newline ) ) END``` Output: ```The attractve numbers up to 120 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 Found 74 attractive numbers ``` ## ALGOL W ```% find some attractive numbers - numbers whose prime factor count is prime  % begin % implements the sieve of Eratosthenes  % % s(i) is set to true if i is prime, false otherwise  % % algol W doesn't have a upb operator, so we pass the size of the  % % array in n  % procedure sieve( logical array s ( * ); integer value n ) ; begin for i := 1 until n do s( i ) := true; % sieve out the non-primes  % s( 1 ) := false; for i := 2 until truncate( sqrt( n ) ) do begin if s( i ) then for p := i * i step i until n do s( p ) := false end for_i ; end sieve ; % returns the count of prime factors of n, using the sieve of primes s  % % n must be greater than 0  % integer procedure countPrimeFactors ( integer value n; logical array s ( * ) ) ; if s( n ) then 1 else begin integer count, rest; rest  := n; count := 0; while rest rem 2 = 0 do begin count := count + 1; rest  := rest div 2 end while_divisible_by_2 ; for factor := 3 step 2 until n - 1 do begin if s( factor ) then begin while rest > 1 and rest rem factor = 0 do begin count := count + 1; rest  := rest div factor end while_divisible_by_factor end if_prime_factor end for_factor ; count end countPrimeFactors ; % maximum number for the task  % integer maxNumber; maxNumber := 120; % show the attractive numbers  % begin logical array s ( 1 :: maxNumber ); sieve( s, maxNumber ); i_w := 2; % set output field width  % s_w := 1; % and output separator width  % % find and display the attractive numbers  % for i := 2 until maxNumber do if s( countPrimeFactors( i, s ) ) then writeon( i ) end end.``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## AppleScript ```on isPrime(n) if (n < 4) then return (n > 1) if ((n mod 2 is 0) or (n mod 3 is 0)) then return false repeat with i from 5 to (n ^ 0.5) div 1 by 6 if ((n mod i is 0) or (n mod (i + 2) is 0)) then return false end repeat return true end isPrime on primeFactorCount(n) set x to n set counter to 0 if (n > 1) then repeat while (n mod 2 = 0) set counter to counter + 1 set n to n div 2 end repeat repeat while (n mod 3 = 0) set counter to counter + 1 set n to n div 3 end repeat set i to 5 set limit to (n ^ 0.5) div 1 repeat until (i > limit) repeat while (n mod i = 0) set counter to counter + 1 set n to n div i end repeat tell (i + 2) to repeat while (n mod it = 0) set counter to counter + 1 set n to n div it end repeat set i to i + 6 set limit to (n ^ 0.5) div 1 end repeat if (n > 1) then set counter to counter + 1 end if return counter end primeFactorCount local output, n set output to {} repeat with n from 1 to 120 if (isPrime(primeFactorCount(n))) then set end of output to n end repeat return output ``` Output: ```{4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120} ``` It's possible of course to dispense with the isPrime() handler and instead use primeFactorCount() to count the prime factors of its own output, with 1 indicating an attractive number. The loss of performance only begins to become noticeable in the unlikely event of needing 300,000 or more such numbers! ## Arturo ```attractive?: function [x] -> prime? size factors.prime x print select 1..120 => attractive? ``` Output: `4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ` ## AutoHotkey ```AttractiveNumbers(n){ c := prime_numbers(n).count() if c = 1 return return isPrime(c) } isPrime(n){ return (prime_numbers(n).count() = 1) } prime_numbers(n) { if (n <= 3) return [n] ans := [] done := false while !done { if !Mod(n,2){ ans.push(2) n /= 2 continue } if !Mod(n,3) { ans.push(3) n /= 3 continue } if (n = 1) return ans sr := sqrt(n) done := true ; try to divide the checked number by all numbers till its square root. i := 6 while (i <= sr+6){ if !Mod(n, i-1) { ; is n divisible by i-1? ans.push(i-1) n /= i-1 done := false break } if !Mod(n, i+1) { ; is n divisible by i+1? ans.push(i+1) n /= i+1 done := false break } i += 6 } } ans.push(n) return ans } ``` Examples: ```c:= 0 loop { if AttractiveNumbers(A_Index) c++, result .= SubStr(" " A_Index, -2) . (Mod(c, 20) ? " " : "`n") if A_Index = 120 break } MsgBox, 262144, ,% result return ``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## AWK ```# syntax: GAWK -f ATTRACTIVE_NUMBERS.AWK # converted from C BEGIN { limit = 120 printf("attractive numbers from 1-%d:\n",limit) for (i=1; i<=limit; i++) { n = count_prime_factors(i) if (is_prime(n)) { printf("%d ",i) } } printf("\n") exit(0) } function count_prime_factors(n, count,f) { f = 2 if (n == 1) { return(0) } if (is_prime(n)) { return(1) } while (1) { if (!(n % f)) { count++ n /= f if (n == 1) { return(count) } if (is_prime(n)) { f = n } } else if (f >= 3) { f += 2 } else { f = 3 } } } function is_prime(x, i) { if (x <= 1) { return(0) } for (i=2; i<=int(sqrt(x)); i++) { if (x % i == 0) { return(0) } } return(1) } ``` Output: ```attractive numbers from 1-120: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## BASIC ```10 DEFINT A-Z 20 M=120 30 DIM C(M): C(0)=-1: C(1)=-1 40 FOR I=2 TO SQR(M) 50 IF NOT C(I) THEN FOR J=I+I TO M STEP I: C(J)=-1: NEXT 60 NEXT 70 FOR I=2 TO M 80 N=I: C=0 90 FOR J=2 TO M 100 IF NOT C(J) THEN IF N MOD J=0 THEN N=N\J: C=C+1: GOTO 100 110 NEXT 120 IF NOT C(C) THEN PRINT I, 130 NEXT ``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## BCPL ```get "libhdr" manifest \$( MAXIMUM = 120 \$) let sieve(prime, max) be \$( for i=0 to max do i!prime := i>=2 for i=2 to max>>1 if i!prime \$( let j = i<<1 while j <= max do \$( j!prime := false j := j+i \$) \$) \$) let factors(n, prime, max) = valof \$( let count = 0 for i=2 to max if i!prime until n rem i \$( count := count + 1 n := n / i \$) resultis count \$) let start() be \$( let n = 0 and prime = vec MAXIMUM sieve(prime, MAXIMUM) for i=2 to MAXIMUM if factors(i, prime, MAXIMUM)!prime \$( writed(i, 4) n := n + 1 unless n rem 18 do wrch('*N') \$) wrch('*N') \$)``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## C Translation of: Go ```#include <stdio.h> #define TRUE 1 #define FALSE 0 #define MAX 120 typedef int bool; bool is_prime(int n) { int d = 5; if (n < 2) return FALSE; if (!(n % 2)) return n == 2; if (!(n % 3)) return n == 3; while (d *d <= n) { if (!(n % d)) return FALSE; d += 2; if (!(n % d)) return FALSE; d += 4; } return TRUE; } int count_prime_factors(int n) { int count = 0, f = 2; if (n == 1) return 0; if (is_prime(n)) return 1; while (TRUE) { if (!(n % f)) { count++; n /= f; if (n == 1) return count; if (is_prime(n)) f = n; } else if (f >= 3) f += 2; else f = 3; } } int main() { int i, n, count = 0; printf("The attractive numbers up to and including %d are:\n", MAX); for (i = 1; i <= MAX; ++i) { n = count_prime_factors(i); if (is_prime(n)) { printf("%4d", i); if (!(++count % 20)) printf("\n"); } } printf("\n"); return 0; } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## C# Translation of: D ```using System; namespace AttractiveNumbers { class Program { const int MAX = 120; static bool IsPrime(int n) { if (n < 2) return false; if (n % 2 == 0) return n == 2; if (n % 3 == 0) return n == 3; int d = 5; while (d * d <= n) { if (n % d == 0) return false; d += 2; if (n % d == 0) return false; d += 4; } return true; } static int PrimeFactorCount(int n) { if (n == 1) return 0; if (IsPrime(n)) return 1; int count = 0; int f = 2; while (true) { if (n % f == 0) { count++; n /= f; if (n == 1) return count; if (IsPrime(n)) f = n; } else if (f >= 3) { f += 2; } else { f = 3; } } } static void Main(string[] args) { Console.WriteLine("The attractive numbers up to and including {0} are:", MAX); int i = 1; int count = 0; while (i <= MAX) { int n = PrimeFactorCount(i); if (IsPrime(n)) { Console.Write("{0,4}", i); if (++count % 20 == 0) Console.WriteLine(); } ++i; } Console.WriteLine(); } } } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## C++ Translation of: C ```#include <iostream> #include <iomanip> #define MAX 120 using namespace std; bool is_prime(int n) { if (n < 2) return false; if (!(n % 2)) return n == 2; if (!(n % 3)) return n == 3; int d = 5; while (d *d <= n) { if (!(n % d)) return false; d += 2; if (!(n % d)) return false; d += 4; } return true; } int count_prime_factors(int n) { if (n == 1) return 0; if (is_prime(n)) return 1; int count = 0, f = 2; while (true) { if (!(n % f)) { count++; n /= f; if (n == 1) return count; if (is_prime(n)) f = n; } else if (f >= 3) f += 2; else f = 3; } } int main() { cout << "The attractive numbers up to and including " << MAX << " are:" << endl; for (int i = 1, count = 0; i <= MAX; ++i) { int n = count_prime_factors(i); if (is_prime(n)) { cout << setw(4) << i; if (!(++count % 20)) cout << endl; } } cout << endl; return 0; } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## CLU ```sieve = proc (max: int) returns (array[bool]) prime: array[bool] := array[bool]\$fill(1,max,true) prime[1] := false for p: int in int\$from_to(2, max/2) do if prime[p] then for c: int in int\$from_to_by(p*p, max, p) do prime[c] := false end end end return(prime) end sieve n_factors = proc (n: int, prime: array[bool]) returns (int) count: int := 0 i: int := 2 while i<=n do if prime[i] then while n//i=0 do count := count + 1 n := n/i end end i := i + 1 end return(count) end n_factors start_up = proc () MAX = 120 po: stream := stream\$primary_output() prime: array[bool] := sieve(MAX) col: int := 0 for i: int in int\$from_to(2, MAX) do if prime[n_factors(i,prime)] then stream\$putright(po, int\$unparse(i), 4) col := col + 1 if col//15 = 0 then stream\$putl(po, "") end end end end start_up``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## COBOL ``` IDENTIFICATION DIVISION. PROGRAM-ID. ATTRACTIVE-NUMBERS. DATA DIVISION. WORKING-STORAGE SECTION. 77 MAXIMUM PIC 999 VALUE 120. 01 SIEVE-DATA VALUE SPACES. 03 MARKER PIC X OCCURS 120 TIMES. 88 PRIME VALUE SPACE. 03 SIEVE-MAX PIC 999. 03 COMPOSITE PIC 999. 03 CANDIDATE PIC 999. 01 FACTORIZE-DATA. 03 FACTOR-NUM PIC 999. 03 FACTORS PIC 999. 03 FACTOR PIC 999. 03 QUOTIENT PIC 999V999. 03 FILLER REDEFINES QUOTIENT. 05 FILLER PIC 999. 05 DECIMAL PIC 999. 01 OUTPUT-FORMAT. 03 OUT-NUM PIC ZZZ9. 03 OUT-LINE PIC X(72) VALUE SPACES. 03 COL-PTR PIC 99 VALUE 1. PROCEDURE DIVISION. BEGIN. PERFORM SIEVE. PERFORM CHECK-ATTRACTIVE VARYING CANDIDATE FROM 2 BY 1 UNTIL CANDIDATE IS GREATER THAN MAXIMUM. PERFORM WRITE-LINE. STOP RUN. CHECK-ATTRACTIVE. MOVE CANDIDATE TO FACTOR-NUM. PERFORM FACTORIZE. MOVE CANDIDATE TO OUT-NUM. STRING OUT-NUM DELIMITED BY SIZE INTO OUT-LINE WITH POINTER COL-PTR. IF COL-PTR IS EQUAL TO 73, PERFORM WRITE-LINE. WRITE-LINE. DISPLAY OUT-LINE. MOVE SPACES TO OUT-LINE. MOVE 1 TO COL-PTR. FACTORIZE SECTION. BEGIN. MOVE ZERO TO FACTORS. PERFORM DIVIDE-PRIME VARYING FACTOR FROM 2 BY 1 UNTIL FACTOR IS GREATER THAN MAXIMUM. GO TO DONE. DIVIDE-PRIME. IF PRIME(FACTOR), DIVIDE FACTOR-NUM BY FACTOR GIVING QUOTIENT, IF DECIMAL IS EQUAL TO ZERO, MOVE QUOTIENT TO FACTOR-NUM, GO TO DIVIDE-PRIME. DONE. EXIT. SIEVE SECTION. BEGIN. MOVE 'X' TO MARKER(1). DIVIDE MAXIMUM BY 2 GIVING SIEVE-MAX. PERFORM SET-COMPOSITES THRU SET-COMPOSITES-LOOP VARYING CANDIDATE FROM 2 BY 1 UNTIL CANDIDATE IS GREATER THAN SIEVE-MAX. GO TO DONE. SET-COMPOSITES. MULTIPLY CANDIDATE BY 2 GIVING COMPOSITE. SET-COMPOSITES-LOOP. IF COMPOSITE IS NOT GREATER THAN MAXIMUM, MOVE 'X' TO MARKER(COMPOSITE), GO TO SET-COMPOSITES-LOOP. DONE. EXIT. ``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Comal ```0010 FUNC factors#(n#) CLOSED 0020 count#:=0 0030 WHILE n# MOD 2=0 DO n#:=n# DIV 2;count#:+1 0040 fac#:=3 0050 WHILE fac#<=n# DO 0060 WHILE n# MOD fac#=0 DO n#:=n# DIV fac#;count#:+1 0070 fac#:+2 0080 ENDWHILE 0090 RETURN count# 0100 ENDFUNC factors# 0110 // 0120 ZONE 4 0130 seen#:=0 0140 FOR i#:=2 TO 120 DO 0150 IF factors#(factors#(i#))=1 THEN 0160 PRINT i#, 0170 seen#:+1 0180 IF seen# MOD 18=0 THEN PRINT 0190 ENDIF 0200 ENDFOR i# 0210 PRINT 0220 END ``` Output: ```4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Common Lisp ```(defun attractivep (n) (primep (length (factors n))) ) ; For primality testing we can use different methods, but since we have to define factors that's what we'll use (defun primep (n) (= (length (factors n)) 1) ) (defun factors (n) "Return a list of factors of N." (when (> n 1) (loop with max-d = (isqrt n) for d = 2 then (if (evenp d) (+ d 1) (+ d 2)) do (cond ((> d max-d) (return (list n))) ; n is prime ((zerop (rem n d)) (return (cons d (factors (truncate n d))))))))) ``` Output: ```(dotimes (i 121) (when (attractivep i) (princ i) (princ " "))) 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Cowgol ```include "cowgol.coh"; const MAXIMUM := 120; typedef N is int(0, MAXIMUM + 1); var prime: uint8[MAXIMUM + 1]; sub Sieve() is MemSet(&prime[0], 1, @bytesof prime); prime[0] := 0; prime[1] := 0; var cand: N := 2; while cand <= MAXIMUM >> 1 loop if prime[cand] != 0 then var comp := cand + cand; while comp <= MAXIMUM loop prime[comp] := 0; comp := comp + cand; end loop; end if; cand := cand + 1; end loop; end sub; sub Factors(n: N): (count: N) is count := 0; var p: N := 2; while p <= MAXIMUM loop if prime[p] != 0 then while n % p == 0 loop count := count + 1; n := n / p; end loop; end if; p := p + 1; end loop; end sub; if n < 10 then print(" "); elseif n < 100 then print(" "); else print(" "); end if; end sub; var cand: N := 2; var col: uint8 := 0; Sieve(); while cand <= MAXIMUM loop if prime[Factors(cand)] != 0 then print_i32(cand as uint32); col := col + 1; if col % 18 == 0 then print_nl(); end if; end if; cand := cand + 1; end loop; print_nl();``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Craft Basic ```for x = 1 to 120 let n = x let c = 0 do if int(n mod 2) = 0 then let n = int(n / 2) let c = c + 1 endif wait loop int(n mod 2) = 0 for i = 3 to sqrt(n) step 2 do if int(n mod i) = 0 then let n = int(n / i) let c = c + 1 endif wait loop int(n mod i) = 0 next i if n > 2 then let c = c + 1 endif if prime(c) then print x, " ", endif next x ``` Output: `4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ` ## D Translation of: C++ ```import std.stdio; enum MAX = 120; bool isPrime(int n) { if (n < 2) return false; if (n % 2 == 0) return n == 2; if (n % 3 == 0) return n == 3; int d = 5; while (d * d <= n) { if (n % d == 0) return false; d += 2; if (n % d == 0) return false; d += 4; } return true; } int primeFactorCount(int n) { if (n == 1) return 0; if (isPrime(n)) return 1; int count; int f = 2; while (true) { if (n % f == 0) { count++; n /= f; if (n == 1) return count; if (isPrime(n)) f = n; } else if (f >= 3) { f += 2; } else { f = 3; } } } void main() { writeln("The attractive numbers up to and including ", MAX, " are:"); int i = 1; int count; while (i <= MAX) { int n = primeFactorCount(i); if (isPrime(n)) { writef("%4d", i); if (++count % 20 == 0) writeln; } ++i; } writeln; } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` See #Pascal. ## Draco ```/* Sieve of Eratosthenes */ proc nonrec sieve([*] bool prime) void: word p, c, max; max := (dim(prime,1)-1)>>1; prime[0] := false; prime[1] := false; for p from 2 upto max do prime[p] := true od; for p from 2 upto max>>1 do if prime[p] then for c from p*2 by p upto max do prime[c] := false od fi od corp /* Count the prime factors of a number */ proc nonrec n_factors(word n; [*] bool prime) word: word count, fac; fac := 2; count := 0; while fac <= n do if prime[fac] then while n % fac = 0 do count := count + 1; n := n / fac od fi; fac := fac + 1 od; count corp /* Find attractive numbers <= 120 */ proc nonrec main() void: word MAX = 120; [MAX+1] bool prime; unsigned MAX i; byte col; sieve(prime); col := 0; for i from 2 upto MAX do if prime[n_factors(i, prime)] then write(i:4); col := col + 1; if col % 18 = 0 then writeln() fi fi od corp``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## EasyLang ```func isprim num . if num < 2 return 0 . i = 2 while i <= sqrt num if num mod i = 0 return 0 . i += 1 . return 1 . func count n . f = 2 repeat if n mod f = 0 cnt += 1 n /= f else f += 1 . until n = 1 . return cnt . for i = 2 to 120 n = count i if isprim n = 1 write i & " " . .``` ## F# ```// attractive_numbers.fsx // taken from Primality by trial division let rec primes = let next_state s = Some(s, s + 2) Seq.cache (Seq.append (seq[ 2; 3; 5 ]) (Seq.unfold next_state 7 |> Seq.filter is_prime)) and is_prime number = let rec is_prime_core number current limit = let cprime = primes |> Seq.item current if cprime >= limit then true elif number % cprime = 0 then false else is_prime_core number (current + 1) (number/cprime) if number = 2 then true elif number < 2 then false else is_prime_core number 0 number let count_prime_divisors n = let rec loop c n count = let p = Seq.item n primes if c < (p * p) then count elif c % p = 0 then loop (c / p) n (count + 1) else loop c (n + 1) count loop n 0 1 let is_attractive = count_prime_divisors >> is_prime let print_iter i n = if i % 10 = 9 then printfn "%d" n else printf "%d\t" n [1..120] |> List.filter is_attractive |> List.iteri print_iter ``` Output: ```>dotnet fsi attractive_numbers.fsx 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120  % ``` ## Factor Works with: Factor version 0.99 ```USING: formatting grouping io math.primes math.primes.factors math.ranges sequences ; "The attractive numbers up to and including 120 are:" print 120 [1,b] [ factors length prime? ] filter 20 <groups> [ [ "%4d" printf ] each nl ] each ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Fortran Translation of: C++ ```program attractive_numbers use iso_fortran_env, only: output_unit implicit none integer, parameter :: maximum=120, line_break=20 integer :: i, counter write(output_unit,'(A,x,I0,x,A)') "The attractive numbers up to and including", maximum, "are:" counter = 0 do i = 1, maximum if (is_prime(count_prime_factors(i))) then counter = counter + 1 if (modulo(counter, line_break) == 0) write(output_unit,*) end if end do write(output_unit,*) contains pure function is_prime(n) integer, intent(in) :: n logical :: is_prime integer :: d is_prime = .false. d = 5 if (n < 2) return if (modulo(n, 2) == 0) then is_prime = n==2 return end if if (modulo(n, 3) == 0) then is_prime = n==3 return end if do if (d**2 > n) then is_prime = .true. return end if if (modulo(n, d) == 0) then is_prime = .false. return end if d = d + 2 if (modulo(n, d) == 0) then is_prime = .false. return end if d = d + 4 end do is_prime = .true. end function is_prime pure function count_prime_factors(n) integer, intent(in) :: n integer :: count_prime_factors integer :: i, f count_prime_factors = 0 if (n == 1) return if (is_prime(n)) then count_prime_factors = 1 return end if count_prime_factors = 0 f = 2 i = n do if (modulo(i, f) == 0) then count_prime_factors = count_prime_factors + 1 i = i/f if (i == 1) exit if (is_prime(i)) f = i else if (f >= 3) then f = f + 2 else f = 3 end if end do end function count_prime_factors end program attractive_numbers ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## FreeBASIC Translation of: D ```Const limite = 120 Declare Function esPrimo(n As Integer) As Boolean Declare Function ContandoFactoresPrimos(n As Integer) As Integer Function esPrimo(n As Integer) As Boolean If n < 2 Then Return false If n Mod 2 = 0 Then Return n = 2 If n Mod 3 = 0 Then Return n = 3 Dim As Integer d = 5 While d * d <= n If n Mod d = 0 Then Return false d += 2 If n Mod d = 0 Then Return false d += 4 Wend Return true End Function Function ContandoFactoresPrimos(n As Integer) As Integer If n = 1 Then Return false If esPrimo(n) Then Return true Dim As Integer f = 2, contar = 0 While true If n Mod f = 0 Then contar += 1 n = n / f If n = 1 Then Return contar If esPrimo(n) Then f = n Elseif f >= 3 Then f += 2 Else f = 3 End If Wend End Function ' Mostrar la sucencia de números atractivos hasta 120. Dim As Integer i = 1, longlinea = 0 Print "Los numeros atractivos hasta e incluyendo"; limite; " son: " While i <= limite Dim As Integer n = ContandoFactoresPrimos(i) If esPrimo(n) Then Print Using "####"; i; longlinea += 1: If longlinea Mod 20 = 0 Then Print "" End If i += 1 Wend End``` Output: ```Los numeros atractivos hasta e incluyendo 120 son: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Frink `println[select[2 to 120, {|x| !isPrime[x] and isPrime[length[factorFlat[x]]]}]]` Output: ```[4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120] ``` ## Fōrmulæ Fōrmulæ programs are not textual, visualization/edition of programs is done showing/manipulating structures but not text. Moreover, there can be multiple visual representations of the same program. Even though it is possible to have textual representation —i.e. XML, JSON— they are intended for storage and transfer purposes more than visualization and edition. Programs in Fōrmulæ are created/edited online in its website. In this page you can see and run the program(s) related to this task and their results. You can also change either the programs or the parameters they are called with, for experimentation, but remember that these programs were created with the main purpose of showing a clear solution of the task, and they generally lack any kind of validation. Solution. Let us make a function to determine whether a number is "attractive" or not. Test case. Show sequence items up to 120. ## FutureBasic ```local fn IsPrime( n as NSUInteger ) as BOOL NSUInteger i if ( n < 2 ) then exit fn = NO if ( n = 2 ) then exit fn = YES if ( n mod 2 == 0 ) then exit fn = NO for i = 3 to int(n^.5) step 2 if ( n mod i == 0 ) then exit fn = NO next end fn = YES local fn Factors( n as NSInteger ) as NSInteger NSInteger count = 0, f = 2 do if n mod f == 0 then count++ : n /= f else f++ until ( f > n ) end fn = count void local fn AttractiveNumbers( limit as NSInteger ) NSInteger c = 0, n printf @"Attractive numbers through %d are:", limit for n = 4 to limit if fn IsPrime( fn Factors( n ) ) printf @"%4d \b", n c++ if ( c mod 10 == 0 ) then print end if next end fn fn AttractiveNumbers( 120 ) HandleEvents``` Output: ```Attractive numbers through 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Go Simple functions to test for primality and to count prime factors suffice here. ```package main import "fmt" func isPrime(n int) bool { switch { case n < 2: return false case n%2 == 0: return n == 2 case n%3 == 0: return n == 3 default: d := 5 for d*d <= n { if n%d == 0 { return false } d += 2 if n%d == 0 { return false } d += 4 } return true } } func countPrimeFactors(n int) int { switch { case n == 1: return 0 case isPrime(n): return 1 default: count, f := 0, 2 for { if n%f == 0 { count++ n /= f if n == 1 { return count } if isPrime(n) { f = n } } else if f >= 3 { f += 2 } else { f = 3 } } return count } } func main() { const max = 120 fmt.Println("The attractive numbers up to and including", max, "are:") count := 0 for i := 1; i <= max; i++ { n := countPrimeFactors(i) if isPrime(n) { fmt.Printf("%4d", i) count++ if count % 20 == 0 { fmt.Println() } } } fmt.Println() } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Groovy Translation of: Java ```class AttractiveNumbers { static boolean isPrime(int n) { if (n < 2) return false if (n % 2 == 0) return n == 2 if (n % 3 == 0) return n == 3 int d = 5 while (d * d <= n) { if (n % d == 0) return false d += 2 if (n % d == 0) return false d += 4 } return true } static int countPrimeFactors(int n) { if (n == 1) return 0 if (isPrime(n)) return 1 int count = 0, f = 2 while (true) { if (n % f == 0) { count++ n /= f if (n == 1) return count if (isPrime(n)) f = n } else if (f >= 3) f += 2 else f = 3 } } static void main(String[] args) { final int max = 120 printf("The attractive numbers up to and including %d are:\n", max) int count = 0 for (int i = 1; i <= max; ++i) { int n = countPrimeFactors(i) if (isPrime(n)) { printf("%4d", i) if (++count % 20 == 0) println() } } println() } } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ```import Data.Numbers.Primes import Data.Bool (bool) attractiveNumbers :: [Integer] attractiveNumbers = [1 ..] >>= (bool [] . return) <*> (isPrime . length . primeFactors) main :: IO () main = print \$ takeWhile (<= 120) attractiveNumbers ``` Or equivalently, as a list comprehension: ```import Data.Numbers.Primes attractiveNumbers :: [Integer] attractiveNumbers = [ x | x <- [1 ..] , isPrime (length (primeFactors x)) ] main :: IO () main = print \$ takeWhile (<= 120) attractiveNumbers ``` Or simply: ```import Data.Numbers.Primes attractiveNumbers :: [Integer] attractiveNumbers = filter (isPrime . length . primeFactors) [1 ..] main :: IO () main = print \$ takeWhile (<= 120) attractiveNumbers ``` Output: `[4,6,8,9,10,12,14,15,18,20,21,22,25,26,27,28,30,32,33,34,35,38,39,42,44,45,46,48,49,50,51,52,55,57,58,62,63,65,66,68,69,70,72,74,75,76,77,78,80,82,85,86,87,91,92,93,94,95,98,99,102,105,106,108,110,111,112,114,115,116,117,118,119,120]` ## Insitux Notice that this implementation is not optimally performant, as primes is called multiple times when the output could be shared, the same is true for distinct-factor and factor. ```(function primes n (let find-range (range 2 (inc n)) check-nums (range 2 (-> n ceil sqrt inc)) skip-each-after #(skip-each % (skip %1 %2)) muls (xmap #(drop 0 (skip-each-after (dec %1) % find-range)) check-nums)) (remove (flatten muls) find-range)) (function distinct-factor n (filter @(div? n) (primes n))) (function factor n (map (fn t (find (div? n) (map @(** t) (range (round (sqrt n)) 0)))) (distinct-factor n))) (function decomposed-factors n (map (fn dist t (repeat dist (/ (logn t) (logn dist)))) (distinct-factor n) (factor n))) (var prime? @((primes %))) (var attract-num? (comp decomposed-factors flatten len prime?)) (filter attract-num? (range 121))``` ## J ```echo (#~ (1 p: ])@#@q:) >:i.120 ``` Output: ```4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## JavaScript ```(() => { 'use strict'; // attractiveNumbers :: () -> Gen [Int] const attractiveNumbers = () => // An infinite series of attractive numbers. filter( compose(isPrime, length, primeFactors) )(enumFrom(1)); // ----------------------- TEST ----------------------- // main :: IO () const main = () => showCols(10)( takeWhile(ge(120))( attractiveNumbers() ) ); // ---------------------- PRIMES ---------------------- // isPrime :: Int -> Bool const isPrime = n => { // True if n is prime. if (2 === n || 3 === n) { return true } if (2 > n || 0 === n % 2) { return false } if (9 > n) { return true } if (0 === n % 3) { return false } return !enumFromThenTo(5)(11)( 1 + Math.floor(Math.pow(n, 0.5)) ).some(x => 0 === n % x || 0 === n % (2 + x)); }; // primeFactors :: Int -> [Int] const primeFactors = n => { // A list of the prime factors of n. const go = x => { const root = Math.floor(Math.sqrt(x)), m = until( ([q, _]) => (root < q) || (0 === (x % q)) )( ([_, r]) => [step(r), 1 + r] )([ 0 === x % 2 ? ( 2 ) : 3, 1 ])[0]; return m > root ? ( [x] ) : ([m].concat(go(Math.floor(x / m)))); }, step = x => 1 + (x << 2) - ((x >> 1) << 1); return go(n); }; // ---------------- GENERIC FUNCTIONS ----------------- // chunksOf :: Int -> [a] -> [[a]] const chunksOf = n => xs => enumFromThenTo(0)(n)( xs.length - 1 ).reduce( (a, i) => a.concat([xs.slice(i, (n + i))]), [] ); // compose (<<<) :: (b -> c) -> (a -> b) -> a -> c const compose = (...fs) => fs.reduce( (f, g) => x => f(g(x)), x => x ); // enumFrom :: Enum a => a -> [a] function* enumFrom(x) { // A non-finite succession of enumerable // values, starting with the value x. let v = x; while (true) { yield v; v = 1 + v; } } // enumFromThenTo :: Int -> Int -> Int -> [Int] const enumFromThenTo = x1 => x2 => y => { const d = x2 - x1; return Array.from({ length: Math.floor(y - x2) / d + 2 }, (_, i) => x1 + (d * i)); }; // filter :: (a -> Bool) -> Gen [a] -> [a] const filter = p => xs => { function* go() { let x = xs.next(); while (!x.done) { let v = x.value; if (p(v)) { yield v } x = xs.next(); } } return go(xs); }; // ge :: Ord a => a -> a -> Bool const ge = x => // True if x >= y y => x >= y; // justifyRight :: Int -> Char -> String -> String const justifyRight = n => // The string s, preceded by enough padding (with // the character c) to reach the string length n. c => s => n > s.length ? ( ) : s; // last :: [a] -> a const last = xs => // The last item of a list. 0 < xs.length ? xs.slice(-1)[0] : undefined; // length :: [a] -> Int const length = xs => // Returns Infinity over objects without finite // length. This enables zip and zipWith to choose // the shorter argument when one is non-finite, // like cycle, repeat etc (Array.isArray(xs) || 'string' === typeof xs) ? ( xs.length ) : Infinity; // map :: (a -> b) -> [a] -> [b] const map = f => // The list obtained by applying f // to each element of xs. // (The image of xs under f). xs => ( Array.isArray(xs) ? ( xs ) : xs.split('') ).map(f); // showCols :: Int -> [a] -> String const showCols = w => xs => { const ys = xs.map(str), mx = last(ys).length; return unlines(chunksOf(w)(ys).map( row => row.map(justifyRight(mx)(' ')).join(' ') )) }; // str :: a -> String const str = x => x.toString(); // takeWhile :: (a -> Bool) -> Gen [a] -> [a] const takeWhile = p => xs => { const ys = []; let nxt = xs.next(), v = nxt.value; while (!nxt.done && p(v)) { ys.push(v); nxt = xs.next(); v = nxt.value } return ys; }; // unlines :: [String] -> String const unlines = xs => // A single string formed by the intercalation // of a list of strings with the newline character. xs.join('\n'); // until :: (a -> Bool) -> (a -> a) -> a -> a const until = p => f => x => { let v = x; while (!p(v)) v = f(v); return v; }; // MAIN --- return main(); })(); ``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Java Translation of: C ```public class Attractive { static boolean is_prime(int n) { if (n < 2) return false; if (n % 2 == 0) return n == 2; if (n % 3 == 0) return n == 3; int d = 5; while (d *d <= n) { if (n % d == 0) return false; d += 2; if (n % d == 0) return false; d += 4; } return true; } static int count_prime_factors(int n) { if (n == 1) return 0; if (is_prime(n)) return 1; int count = 0, f = 2; while (true) { if (n % f == 0) { count++; n /= f; if (n == 1) return count; if (is_prime(n)) f = n; } else if (f >= 3) f += 2; else f = 3; } } public static void main(String[] args) { final int max = 120; System.out.printf("The attractive numbers up to and including %d are:\n", max); for (int i = 1, count = 0; i <= max; ++i) { int n = count_prime_factors(i); if (is_prime(n)) { System.out.printf("%4d", i); if (++count % 20 == 0) System.out.println(); } } System.out.println(); } } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## jq Works with: jq Works with gojq, the Go implementation of jq This entry uses: ```def count(s): reduce s as \$x (null; .+1); def is_attractive: count(prime_factors) | is_prime; def printattractive(\$m; \$n): "The attractive numbers from \(\$m) to \(\$n) are:\n", [range(\$m; \$n+1) | select(is_attractive)]; printattractive(1; 120)``` Output: ```The attractive numbers from 1 to 120 are: [4,6,8,9,10,12,14,15,18,20,21,22,25,26,27,28,30,32,33,34,35,38,39,42,44,45,46,48,49,50,51,52,55,57,58,62,63,65,66,68,69,70,72,74,75,76,77,78,80,82,85,86,87,91,92,93,94,95,98,99,102,105,106,108,110,111,112,114,115,116,117,118,119,120] ``` ## Julia ```using Primes # oneliner is println("The attractive numbers from 1 to 120 are:\n", filter(x -> isprime(sum(values(factor(x)))), 1:120)) isattractive(n) = isprime(sum(values(factor(n)))) printattractive(m, n) = println("The attractive numbers from \$m to \$n are:\n", filter(isattractive, m:n)) printattractive(1, 120) ``` Output: ```The attractive numbers from 1 to 120 are: [4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120] ``` ## Kotlin Translation of: Go ```// Version 1.3.21 const val MAX = 120 fun isPrime(n: Int) : Boolean { if (n < 2) return false if (n % 2 == 0) return n == 2 if (n % 3 == 0) return n == 3 var d : Int = 5 while (d * d <= n) { if (n % d == 0) return false d += 2 if (n % d == 0) return false d += 4 } return true } fun countPrimeFactors(n: Int) = when { n == 1 -> 0 isPrime(n) -> 1 else -> { var nn = n var count = 0 var f = 2 while (true) { if (nn % f == 0) { count++ nn /= f if (nn == 1) break if (isPrime(nn)) f = nn } else if (f >= 3) { f += 2 } else { f = 3 } } count } } fun main() { println("The attractive numbers up to and including \$MAX are:") var count = 0 for (i in 1..MAX) { val n = countPrimeFactors(i) if (isPrime(n)) { System.out.printf("%4d", i) if (++count % 20 == 0) println() } } println() } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## LLVM ```; This is not strictly LLVM, as it uses the C library function "printf". ; LLVM does not provide a way to print values, so the alternative would be ; to just load the string into memory, and that would be boring. \$"ATTRACTIVE_STR" = comdat any \$"FORMAT_NUMBER" = comdat any \$"NEWLINE_STR" = comdat any @"ATTRACTIVE_STR" = linkonce_odr unnamed_addr constant [52 x i8] c"The attractive numbers up to and including %d are:\0A\00", comdat, align 1 @"FORMAT_NUMBER" = linkonce_odr unnamed_addr constant [4 x i8] c"%4d\00", comdat, align 1 @"NEWLINE_STR" = linkonce_odr unnamed_addr constant [2 x i8] c"\0A\00", comdat, align 1 ;--- The declaration for the external C printf function. declare i32 @printf(i8*, ...) ; Function Attrs: noinline nounwind optnone uwtable define zeroext i1 @is_prime(i32) #0 { %2 = alloca i1, align 1 ;-- allocate return value %3 = alloca i32, align 4 ;-- allocate n %4 = alloca i32, align 4 ;-- allocate d store i32 %0, i32* %3, align 4 ;-- store local copy of n store i32 5, i32* %4, align 4 ;-- store 5 in d %6 = icmp slt i32 %5, 2 ;-- n < 2 br i1 %6, label %nlt2, label %niseven nlt2: store i1 false, i1* %2, align 1 ;-- store false in return value br label %exit niseven: %8 = srem i32 %7, 2 ;-- n % 2 %9 = icmp ne i32 %8, 0 ;-- (n % 2) != 0 br i1 %9, label %odd, label %even even: %11 = icmp eq i32 %10, 2 ;-- n == 2 store i1 %11, i1* %2, align 1 ;-- store (n == 2) in return value br label %exit odd: %13 = srem i32 %12, 3 ;-- n % 3 %14 = icmp ne i32 %13, 0 ;-- (n % 3) != 0 br i1 %14, label %loop, label %div3 div3: %16 = icmp eq i32 %15, 3 ;-- n == 3 store i1 %16, i1* %2, align 1 ;-- store (n == 3) in return value br label %exit loop: %19 = mul nsw i32 %17, %18 ;-- d * d %21 = icmp sle i32 %19, %20 ;-- (d * d) <= n br i1 %21, label %first, label %prime first: %24 = srem i32 %22, %23 ;-- n % d %25 = icmp ne i32 %24, 0 ;-- (n % d) != 0 br i1 %25, label %second, label %notprime second: %27 = add nsw i32 %26, 2 ;-- increment d by 2 store i32 %27, i32* %4, align 4 ;-- store d %30 = srem i32 %28, %29 ;-- n % d %31 = icmp ne i32 %30, 0 ;-- (n % d) != 0 br i1 %31, label %loop_end, label %notprime loop_end: %33 = add nsw i32 %32, 4 ;-- increment d by 4 store i32 %33, i32* %4, align 4 ;-- store d br label %loop notprime: store i1 false, i1* %2, align 1 ;-- store false in return value br label %exit prime: store i1 true, i1* %2, align 1 ;-- store true in return value br label %exit exit: %34 = load i1, i1* %2, align 1 ;-- load return value ret i1 %34 } ; Function Attrs: noinline nounwind optnone uwtable define i32 @count_prime_factors(i32) #0 { %2 = alloca i32, align 4 ;-- allocate return value %3 = alloca i32, align 4 ;-- allocate n %4 = alloca i32, align 4 ;-- allocate count %5 = alloca i32, align 4 ;-- allocate f store i32 %0, i32* %3, align 4 ;-- store local copy of n store i32 0, i32* %4, align 4 ;-- store zero in count store i32 2, i32* %5, align 4 ;-- store 2 in f %7 = icmp eq i32 %6, 1 ;-- n == 1 br i1 %7, label %eq1, label %ne1 eq1: store i32 0, i32* %2, align 4 ;-- store zero in return value br label %exit ne1: %9 = call zeroext i1 @is_prime(i32 %8) ;-- is n prime? br i1 %9, label %prime, label %loop prime: store i32 1, i32* %2, align 4 ;-- store a in return value br label %exit loop: %12 = srem i32 %10, %11 ;-- n % f %13 = icmp ne i32 %12, 0 ;-- (n % f) != 0 br i1 %13, label %br2, label %br1 br1: %15 = add nsw i32 %14, 1 ;-- increment count store i32 %15, i32* %4, align 4 ;-- store count %18 = sdiv i32 %17, %16 ;-- n / f store i32 %18, i32* %3, align 4 ;-- n = n / f %20 = icmp eq i32 %19, 1 ;-- n == 1 br i1 %20, label %br1_1, label %br1_2 br1_1: store i32 %21, i32* %2, align 4 ;-- store the count in the return value br label %exit br1_2: %23 = call zeroext i1 @is_prime(i32 %22) ;-- is n prime? br i1 %23, label %br1_3, label %loop br1_3: store i32 %24, i32* %5, align 4 ;-- f = n br label %loop br2: %26 = icmp sge i32 %25, 3 ;-- f >= 3 br i1 %26, label %br2_1, label %br3 br2_1: %28 = add nsw i32 %27, 2 ;-- increment f by 2 store i32 %28, i32* %5, align 4 ;-- store f br label %loop br3: store i32 3, i32* %5, align 4 ;-- store 3 in f br label %loop exit: %29 = load i32, i32* %2, align 4 ;-- load return value ret i32 %29 } ; Function Attrs: noinline nounwind optnone uwtable define i32 @main() #0 { %1 = alloca i32, align 4 ;-- allocate i %2 = alloca i32, align 4 ;-- allocate n %3 = alloca i32, align 4 ;-- count store i32 0, i32* %3, align 4 ;-- store zero in count %4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @"ATTRACTIVE_STR", i32 0, i32 0), i32 120) store i32 1, i32* %1, align 4 ;-- store 1 in i br label %loop loop: %6 = icmp sle i32 %5, 120 ;-- i <= 120 br i1 %6, label %loop_body, label %exit loop_body: %8 = call i32 @count_prime_factors(i32 %7) ;-- count factors of i store i32 %8, i32* %2, align 4 ;-- store factors in n %9 = call zeroext i1 @is_prime(i32 %8) ;-- is n prime? br i1 %9, label %prime_branch, label %loop_inc prime_branch: %11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"FORMAT_NUMBER", i32 0, i32 0), i32 %10) %13 = add nsw i32 %12, 1 ;-- increment count store i32 %13, i32* %3, align 4 ;-- store count %14 = srem i32 %13, 20 ;-- count % 20 %15 = icmp ne i32 %14, 0 ;-- (count % 20) != 0 br i1 %15, label %loop_inc, label %row_end row_end: %16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @"NEWLINE_STR", i32 0, i32 0)) br label %loop_inc loop_inc: %18 = add nsw i32 %17, 1 ;-- increment i store i32 %18, i32* %1, align 4 ;-- store i br label %loop exit: %19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @"NEWLINE_STR", i32 0, i32 0)) ret i32 0 } attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Lua ```-- Returns true if x is prime, and false otherwise function isPrime (x) if x < 2 then return false end if x < 4 then return true end if x % 2 == 0 then return false end for d = 3, math.sqrt(x), 2 do if x % d == 0 then return false end end return true end -- Compute the prime factors of n function factors (n) local facList, divisor, count = {}, 1 if n < 2 then return facList end while not isPrime(n) do while not isPrime(divisor) do divisor = divisor + 1 end count = 0 while n % divisor == 0 do n = n / divisor table.insert(facList, divisor) end divisor = divisor + 1 if n == 1 then return facList end end table.insert(facList, n) return facList end -- Main procedure for i = 1, 120 do if isPrime(#factors(i)) then io.write(i .. "\t") end end ``` Output: ```4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Maple ```attractivenumbers := proc(n::posint) local an, i; an :=[]: for i from 1 to n do if isprime(NumberTheory:-NumberOfPrimeFactors(i)) then an := [op(an), i]: end if: end do: end proc: attractivenumbers(120);``` Output: `[4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120]` ## Mathematica / Wolfram Language ```ClearAll[AttractiveNumberQ] AttractiveNumberQ[n_Integer] := FactorInteger[n][[All, 2]] // Total // PrimeQ Reap[Do[If[AttractiveNumberQ[i], Sow[i]], {i, 120}]][[2, 1]] ``` Output: `{4,6,8,9,10,12,14,15,18,20,21,22,25,26,27,28,30,32,33,34,35,38,39,42,44,45,46,48,49,50,51,52,55,57,58,62,63,65,66,68,69,70,72,74,75,76,77,78,80,82,85,86,87,91,92,93,94,95,98,99,102,105,106,108,110,111,112,114,115,116,117,118,119,120}` ## Maxima ```AttractiveNumber(N):=block([Q:0], if not primep(N) then ( if primep(apply("+", map(lambda([Z], Z[2]), ifactors(N)))) then Q: N ), Q )\$ delete(0, makelist(AttractiveNumber(K), K, 1, 120)); ``` Using sublist ```attractivep(n):=block(ifactors(n),apply("+",map(second,%%)),if primep(%%) then true)\$ sublist(makelist(i,i,120),attractivep); ``` Output: `[4,6,8,9,10,12,14,15,18,20,21,22,25,26,27,28,30,32,33,34,35,38,39,42,44,45,46,48,49,50,51,52,55,57,58,62,63,65,66,68,69,70,72,74,75,76,77,78,80,82,85,86,87,91,92,93,94,95,98,99,102,105,106,108,110,111,112,114,115,116,117,118,119,120]` ## MiniScript ```isPrime = function(n) if n < 2 then return false if n < 4 then return true for i in range(2,floor(n ^ 0.5)) if n % i == 0 then return false end for return true end function countFactors = function(n) cnt = 0 for i in range(2, n) while n % i == 0 cnt += 1 n /= i end while end for return cnt end function isAttractive = function(n) if n < 1 then return false factorCnt = countFactors(n) return isPrime(factorCnt) end function numbers = [] for i in range(2, 120) if isAttractive(i) then numbers.push(i) end for print numbers.join(", ") ``` Output: `4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120` ## Miranda ```main :: [sys_message] main = [Stdout (show (filter attractive [1..120]))] attractive :: num->bool attractive n = #factors (#factors n) = 1 factors :: num->[num] factors = f 2 where f d n = [], if d>n = d:f d (n div d), if n mod d=0 = f (d+1) n, otherwise``` Output: `[4,6,8,9,10,12,14,15,18,20,21,22,25,26,27,28,30,32,33,34,35,38,39,42,44,45,46,48,49,50,51,52,55,57,58,62,63,65,66,68,69,70,72,74,75,76,77,78,80,82,85,86,87,91,92,93,94,95,98,99,102,105,106,108,110,111,112,114,115,116,117,118,119,120]` ## Modula-2 ```MODULE AttractiveNumbers; FROM InOut IMPORT WriteCard, WriteLn; CONST Max = 120; VAR n, col: CARDINAL; Prime: ARRAY [1..Max] OF BOOLEAN; PROCEDURE Sieve; VAR i, j: CARDINAL; BEGIN Prime[1] := FALSE; FOR i := 2 TO Max DO Prime[i] := TRUE; END; FOR i := 2 TO Max DIV 2 DO IF Prime[i] THEN j := i*2; WHILE j <= Max DO Prime[j] := FALSE; j := j + i; END; END; END; END Sieve; PROCEDURE Factors(n: CARDINAL): CARDINAL; VAR i, factors: CARDINAL; BEGIN factors := 0; FOR i := 2 TO Max DO IF i > n THEN RETURN factors; END; IF Prime[i] THEN WHILE n MOD i = 0 DO n := n DIV i; factors := factors + 1; END; END; END; RETURN factors; END Factors; BEGIN Sieve(); col := 0; FOR n := 2 TO Max DO IF Prime[Factors(n)] THEN WriteCard(n, 4); col := col + 1; IF col MOD 15 = 0 THEN WriteLn(); END; END; END; WriteLn(); END AttractiveNumbers. ``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Nanoquery Translation of: C ```MAX = 120 def is_prime(n) d = 5 if (n < 2) return false end if (n % 2) = 0 return n = 2 end if (n % 3) = 0 return n = 3 end while (d * d) <= n if n % d = 0 return false end d += 2 if n % d = 0 return false end d += 4 end return true end def count_prime_factors(n) count = 0; f = 2 if n = 1 return 0 end if is_prime(n) return 1 end while true if (n % f) = 0 count += 1 n /= f if n = 1 return count end if is_prime(n) f = n end else if f >= 3 f += 2 else f = 3 end end end i = 0; n = 0; count = 0 println format("The attractive numbers up to and including %d are:\n", MAX) for i in range(1, MAX) n = count_prime_factors(i) if is_prime(n) print format("%4d", i) count += 1 if (count % 20) = 0 println end end end println``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## NewLisp The factor function returns a list of the prime factors of an integer with repetition, e. g. (factor 12) is (2 2 3). ```(define (prime? n) (= (length (factor n)) 1)) (define (attractive? n) (prime? (length (factor n)))) ; (filter attractive? (sequence 2 120)) ``` Output: ```(4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120) ``` ## Nim Translation of: C ```import strformat const MAX = 120 proc isPrime(n: int): bool = var d = 5 if n < 2: return false if n mod 2 == 0: return n == 2 if n mod 3 == 0: return n == 3 while d * d <= n: if n mod d == 0: return false inc d, 2 if n mod d == 0: return false inc d, 4 return true proc countPrimeFactors(n_in: int): int = var count = 0 var f = 2 var n = n_in if n == 1: return 0 if isPrime(n): return 1 while true: if n mod f == 0: inc count n = n div f if n == 1: return count if isPrime(n): f = n elif (f >= 3): inc f, 2 else: f = 3 proc main() = var n, count: int = 0 echo fmt"The attractive numbers up to and including {MAX} are:" for i in 1..MAX: n = countPrimeFactors(i) if isPrime(n): write(stdout, fmt"{i:4d}") inc count if count mod 20 == 0: write(stdout, "\n") write(stdout, "\n") main() ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Objeck Translation of: Java ```class AttractiveNumber { function : Main(args : String[]) ~ Nil { max := 120; "The attractive numbers up to and including {\$max} are:"->PrintLine(); count := 0; for(i := 1; i <= max; i += 1;) { n := CountPrimeFactors(i); if(IsPrime(n)) { " {\$i}"->Print(); if(++count % 20 = 0) { ""->PrintLine(); }; }; }; ""->PrintLine(); } function : IsPrime(n : Int) ~ Bool { if(n < 2) { return false; }; if(n % 2 = 0) { return n = 2; }; if(n % 3 = 0) { return n = 3; }; d := 5; while(d *d <= n) { if(n % d = 0) { return false; }; d += 2; if(n % d = 0) { return false; }; d += 4; }; return true; } function : CountPrimeFactors(n : Int) ~ Int { if(n = 1) { return 0; }; if(IsPrime(n)) { return 1; }; count := 0; f := 2; while(true) { if(n % f = 0) { count++; n /= f; if(n = 1) { return count; }; if(IsPrime(n)) { f := n; }; } else if(f >= 3) { f += 2; } else { f := 3; }; }; return -1; } }``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Odin ```import "core:fmt" main :: proc() { const_max :: 120 fmt.println("\nAttractive numbers up to and including", const_max, "are: ") count := 0 for i in 1 ..= const_max { n := countPrimeFactors(i) if isPrime(n) { fmt.print(i, " ") count += 1 if count % 20 == 0 { fmt.println() } } } fmt.println() } /* definitions */ isPrime :: proc(n: int) -> bool { switch { case n < 2: return false case n % 2 == 0: return n == 2 case n % 3 == 0: return n == 3 case: d := 5 for d * d <= n { if n % d == 0 { return false } d += 2 if n % d == 0 { return false } d += 4 } return true } } countPrimeFactors :: proc(n: int) -> int { n := n switch { case n == 1: return 0 case isPrime(n): return 1 case: count, f := 0, 2 for { if n % f == 0 { count += 1 n /= f if n == 1 { return count } if isPrime(n) { f = n } } else if f >= 3 { f += 2 } else { f = 3 } } return count } } ``` Output: ```Attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Pascal Works with: Free Pascal ```program AttractiveNumbers; { numbers with count of factors = prime * using modified sieve of erathosthes * by adding the power of the prime to multiples * of the composite number } {\$IFDEF FPC} {\$MODE DELPHI} {\$ELSE} {\$APPTYPE CONSOLE} {\$ENDIF} uses sysutils;//timing const cTextMany = ' with many factors '; cText2 = ' with only two factors '; cText1 = ' with only one factor '; type tValue = LongWord; tpValue = ^tValue; tPower = array[0..63] of tValue;//2^64 var power : tPower; sieve : array of byte; function NextPotCnt(p: tValue):tValue; //return the first power <> 0 //power == n to base prim var i : NativeUint; begin result := 0; repeat i := power[result]; Inc(i); IF i < p then BREAK else begin i := 0; power[result] := 0; inc(result); end; until false; power[result] := i; inc(result); end; procedure InitSieveWith2; //the prime 2, because its the first one, is the one, //which can can be speed up tremendously, by moving var pSieve : pByte; CopyWidth,lmt : NativeInt; Begin pSieve := @sieve[0]; Lmt := High(sieve); sieve[1] := 0; sieve[2] := 1; // aka 2^1 -> one factor CopyWidth := 2; while CopyWidth*2 <= Lmt do Begin // copy idx 1,2 to 3,4 | 1..4 to 5..8 | 1..8 to 9..16 move(pSieve[1],pSieve[CopyWidth+1],CopyWidth); // 01 -> 0101 -> 01020102-> 0102010301020103 inc(CopyWidth,CopyWidth);//*2 //increment the factor of last element by one. inc(pSieve[CopyWidth]); //idx 12 1234 12345678 //value 01 -> 0102 -> 01020103-> 0102010301020104 end; //copy the rest move(pSieve[1],pSieve[CopyWidth+1],Lmt-CopyWidth); //mark 0,1 not prime, 255 factors are today not possible 2^255 >> Uint64 sieve[0]:= 255; sieve[1]:= 255; sieve[2]:= 0; // make prime again end; procedure OutCntTime(T:TDateTime;txt:String;cnt:NativeInt); Begin writeln(cnt:12,txt,T*86400:10:3,' s'); end; procedure sievefactors; var T0 : TDateTime; pSieve : pByte; i,j,i2,k,lmt,cnt : NativeUInt; Begin InitSieveWith2; pSieve := @sieve[0]; Lmt := High(sieve); //Divide into 3 section //first i*i*i<= lmt with time expensive NextPotCnt T0 := now; cnt := 0; //third root of limit calculate only once, no comparison ala while i*i*i<= lmt do k := trunc(exp(ln(Lmt)/3)); For i := 3 to k do if pSieve[i] = 0 then Begin inc(cnt); j := 2*i; fillChar(Power,Sizeof(Power),#0); Power[0] := 1; repeat inc(pSieve[j],NextPotCnt(i)); inc(j,i); until j > lmt; end; OutCntTime(now-T0,cTextMany,cnt); T0 := now; //second i*i <= lmt cnt := 0; i := k+1; k := trunc(sqrt(Lmt)); For i := i to k do if pSieve[i] = 0 then Begin //first increment all multiples of prime by one inc(cnt); j := 2*i; repeat inc(pSieve[j]); inc(j,i); until j>lmt; //second increment all multiples prime*prime by one i2 := i*i; j := i2; repeat inc(pSieve[j]); inc(j,i2); until j>lmt; end; OutCntTime(now-T0,cText2,cnt); T0 := now; //third i*i > lmt -> only one new factor cnt := 0; inc(k); For i := k to Lmt shr 1 do if pSieve[i] = 0 then Begin inc(cnt); j := 2*i; repeat inc(pSieve[j]); inc(j,i); until j>lmt; end; OutCntTime(now-T0,cText1,cnt); end; const smallLmt = 120; //needs 1e10 Byte = 10 Gb maybe someone got 128 Gb :-) nearly linear time BigLimit = 10*1000*1000*1000; var T0,T : TDateTime; i,cnt,lmt : NativeInt; Begin setlength(sieve,smallLmt+1); sievefactors; cnt := 0; For i := 2 to smallLmt do Begin if sieve[sieve[i]] = 0 then Begin write(i:4); inc(cnt); if cnt>19 then Begin writeln; cnt := 0; end; end; end; writeln; writeln; T0 := now; setlength(sieve,BigLimit+1); T := now; writeln('time allocating  : ',(T-T0) *86400 :8:3,' s'); sievefactors; T := now-T; writeln('time sieving : ',T*86400 :8:3,' s'); T:= now; cnt := 0; i := 0; lmt := 10; repeat repeat inc(i); {IF sieve[sieve[i]] = 0 then inc(cnt); takes double time is not relevant} inc(cnt,ORD(sieve[sieve[i]] = 0)); until i = lmt; writeln(lmt:11,cnt:12); lmt := 10*lmt; until lmt >High(sieve); T := now-T; writeln('time counting : ',T*86400 :8:3,' s'); writeln('time total  : ',(now-T0)*86400 :8:3,' s'); end. ``` Output: ``` 1 with many factors 0.000 s 2 with only two factors 0.000 s 13 with only one factor 0.000 s 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 time allocating  : 1.079 s 324 with many factors 106.155 s 9267 with only two factors 33.360 s 234944631 with only one factor 60.264 s time sieving : 200.813 s 10 5 100 60 1000 636 10000 6396 100000 63255 1000000 623232 10000000 6137248 100000000 60472636 1000000000 596403124 10000000000 5887824685 time counting : 6.130 s time total  : 208.022 s real 3m28,044s ``` ## Perl Library: ntheory ```use ntheory <is_prime factor>; is_prime +factor \$_ and print "\$_ " for 1..120; ``` Output: `4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120` ## Phix ```function attractive(integer lim) sequence s = {} for i=1 to lim do integer n = length(prime_factors(i,true)) if is_prime(n) then s &= i end if end for return s end function sequence s = attractive(120) printf(1,"There are %d attractive numbers up to and including %d:\n",{length(s),120}) pp(s,{pp_IntCh,false}) for i=3 to 6 do atom t0 = time() integer p = power(10,i), l = length(attractive(p)) string e = elapsed(time()-t0) printf(1,"There are %,d attractive numbers up to %,d (%s)\n",{l,p,e}) end for ``` Output: ```There are 74 attractive numbers up to and including 120: {4,6,8,9,10,12,14,15,18,20,21,22,25,26,27,28,30,32,33,34,35,38,39,42,44,45, 46,48,49,50,51,52,55,57,58,62,63,65,66,68,69,70,72,74,75,76,77,78,80,82,85, 86,87,91,92,93,94,95,98,99,102,105,106,108,110,111,112,114,115,116,117,118, 119,120} There are 636 attractive numbers up to 1,000 (0s) There are 6,396 attractive numbers up to 10,000 (0.0s) There are 63,255 attractive numbers up to 100,000 (0.3s) There are 617,552 attractive numbers up to 1,000,000 (4.1s) ``` ## PHP ```<?php function isPrime (\$x) { if (\$x < 2) return false; if (\$x < 4) return true; if (\$x % 2 == 0) return false; for (\$d = 3; \$d < sqrt(\$x); \$d++) { if (\$x % \$d == 0) return false; } return true; } function countFacs (\$n) { \$count = 0; \$divisor = 1; if (\$n < 2) return 0; while (!isPrime(\$n)) { while (!isPrime(\$divisor)) \$divisor++; while (\$n % \$divisor == 0) { \$n /= \$divisor; \$count++; } \$divisor++; if (\$n == 1) return \$count; } return \$count + 1; } for (\$i = 1; \$i <= 120; \$i++) { if (isPrime(countFacs(\$i))) echo \$i."&ensp;"; } ?> ``` Output: `4 6 8 10 12 14 15 18 20 21 22 26 27 28 30 32 33 34 35 36 38 39 42 44 45 46 48 50 51 52 55 57 58 62 63 65 66 68 69 70 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 100 102 105 106 108 110 111 112 114 115 116 117 118 119 120` ## PL/I ```attractive: procedure options(main); %replace MAX by 120; declare prime(1:MAX) bit(1); sieve: procedure; declare (i, j, sqm) fixed; prime(1) = 0; do i=2 to MAX; prime(i) = '1'b; end; sqm = sqrt(MAX); do i=2 to sqm; if prime(i) then do j=i*2 to MAX by i; prime(j) = '0'b; end; end; end sieve; factors: procedure(nn) returns(fixed); declare (f, i, n, nn) fixed; n = nn; f = 0; do i=2 to n; if prime(i) then do while(mod(n,i) = 0); f = f+1; n = n/i; end; end; return(f); end factors; attractive: procedure(n) returns(bit(1)); declare n fixed; return(prime(factors(n))); end attractive; declare (i, col) fixed; i = 0; col = 0; call sieve(); do i=2 to MAX; if attractive(i) then do; put edit(i) (F(4)); col = col + 1; if mod(col,18) = 0 then put skip; end; end; end attractive;``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## PL/M ```100H: BDOS: PROCEDURE (F, ARG); DECLARE F BYTE, ARG ADDRESS; GO TO 5; END BDOS; EXIT: PROCEDURE; CALL BDOS(0,0); END EXIT; PUT\$CHAR: PROCEDURE (CH); DECLARE CH BYTE; CALL BDOS(2,CH); END PUT\$CHAR; DECLARE MAXIMUM LITERALLY '120'; PRINT4: PROCEDURE (N); DECLARE (N, MAGN, Z) BYTE; CALL PUT\$CHAR(' '); MAGN = 100; Z = 0; DO WHILE MAGN > 0; IF NOT Z AND N < MAGN THEN CALL PUT\$CHAR(' '); ELSE DO; CALL PUT\$CHAR('0' + N/MAGN); N = N MOD MAGN; Z = 1; END; MAGN = MAGN/10; END; END PRINT4; NEW\$LINE: PROCEDURE; CALL PUT\$CHAR(13); CALL PUT\$CHAR(10); END NEW\$LINE; SIEVE: PROCEDURE (MAX, PRIME); DECLARE (I, J, MAX, P BASED PRIME) BYTE; P(0)=0; P(1)=0; DO I=2 TO MAX; P(I)=1; END; DO I=2 TO SHR(MAX,1); IF P(I) THEN DO J=SHL(I,1) TO MAX BY I; P(J) = 0; END; END; END SIEVE; FACTORS: PROCEDURE (N, MAX, PRIME) BYTE; DECLARE (I, J, N, MAX, F, P BASED PRIME) BYTE; F = 0; DO I=2 TO MAX; IF P(I) THEN DO WHILE N MOD I = 0; F = F + 1; N = N / I; END; END; RETURN F; END FACTORS; ATTRACTIVE: PROCEDURE(N, MAX, PRIME) BYTE; DECLARE (N, MAX, P BASED PRIME) BYTE; RETURN P(FACTORS(N, MAX, PRIME)); END ATTRACTIVE; DECLARE (I, COL) BYTE INITIAL (0, 0); CALL SIEVE(MAXIMUM, .MEMORY); DO I=2 TO MAXIMUM; IF ATTRACTIVE(I, MAXIMUM, .MEMORY) THEN DO; CALL PRINT4(I); COL = COL + 1; IF COL MOD 18 = 0 THEN CALL NEW\$LINE; END; END; CALL EXIT; EOF``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Prolog Works with: SWI Prolog ```prime_factors(N, Factors):- S is sqrt(N), prime_factors(N, Factors, S, 2). prime_factors(1, [], _, _):-!. prime_factors(N, [P|Factors], S, P):- P =< S, 0 is N mod P, !, M is N // P, prime_factors(M, Factors, S, P). prime_factors(N, Factors, S, P):- Q is P + 1, Q =< S, !, prime_factors(N, Factors, S, Q). prime_factors(N, [N], _, _). is_prime(2):-!. is_prime(N):- 0 is N mod 2, !, fail. is_prime(N):- N > 2, S is sqrt(N), \+is_composite(N, S, 3). is_composite(N, S, P):- P =< S, 0 is N mod P, !. is_composite(N, S, P):- Q is P + 2, Q =< S, is_composite(N, S, Q). attractive_number(N):- prime_factors(N, Factors), length(Factors, Len), is_prime(Len). print_attractive_numbers(From, To, _):- From > To, !. print_attractive_numbers(From, To, C):- (attractive_number(From) -> writef('%4r', [From]), (0 is C mod 20 -> nl ; true), C1 is C + 1 ; C1 = C ), Next is From + 1, print_attractive_numbers(Next, To, C1). main:- print_attractive_numbers(1, 120, 1). ``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## PureBasic ```#MAX=120 Dim prime.b(#MAX) FillMemory(@prime(),#MAX,#True,#PB_Byte) : FillMemory(@prime(),2,#False,#PB_Byte) For i=2 To Int(Sqr(#MAX)) : n=i*i : While n<#MAX : prime(n)=#False : n+i : Wend : Next Procedure.i pfCount(n.i) Shared prime() If n=1  : ProcedureReturn 0  : EndIf If prime(n)  : ProcedureReturn 1  : EndIf count=0 : f=2 Repeat If n%f=0  : count+1  : n/f If n=1  : ProcedureReturn count : EndIf If prime(n) : f=n  : EndIf ElseIf f>=3  : f+2 Else  : f=3 EndIf ForEver EndProcedure OpenConsole() PrintN("The attractive numbers up to and including "+Str(#MAX)+" are:") For i=1 To #MAX If prime(pfCount(i)) Print(RSet(Str(i),4)) : count+1 : If count%20=0 : PrintN("") : EndIf EndIf Next PrintN("") : Input()``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Python ### Procedural Works with: Python version 2.7.12 ```from sympy import sieve # library for primes def get_pfct(n): i = 2; factors = [] while i * i <= n: if n % i: i += 1 else: n //= i factors.append(i) if n > 1: factors.append(n) return len(factors) sieve.extend(110) # first 110 primes... primes=sieve._list pool=[] for each in xrange(0,121): pool.append(get_pfct(each)) for i,each in enumerate(pool): if each in primes: print i, ``` Output: `4,6,8,9,10,12,14,15,18,20,21,22,25,26,27,28,30,32,33,34,35,38,39,42,44,45,46, 48,49,50,51,52,55,57,58,62,63,65,66,68,69,70,72,74,75,76,77,78,80,82,85,86,87, 91,92,93,94,95,98,99,102,105,106,108,110,111,112,114,115,116,117,118,119,120` ### Functional Without importing a primes library – at this scale a light and visible implementation is more than enough, and provides more material for comparison. Works with: Python version 3.7 ```'''Attractive numbers''' from itertools import chain, count, takewhile from functools import reduce # attractiveNumbers :: () -> [Int] def attractiveNumbers(): '''A non-finite stream of attractive numbers. (OEIS A063989) ''' return filter( compose( isPrime, len, primeDecomposition ), count(1) ) # TEST ---------------------------------------------------- def main(): '''Attractive numbers drawn from the range [1..120]''' for row in chunksOf(15)(list( takewhile( lambda x: 120 >= x, attractiveNumbers() ) )): print(' '.join(map( compose(justifyRight(3)(' '), str), row ))) # GENERAL FUNCTIONS --------------------------------------- # chunksOf :: Int -> [a] -> [[a]] def chunksOf(n): '''A series of lists of length n, subdividing the contents of xs. Where the length of xs is not evenly divible, the final list will be shorter than n. ''' return lambda xs: reduce( lambda a, i: a + [xs[i:n + i]], range(0, len(xs), n), [] ) if 0 < n else [] # compose :: ((a -> a), ...) -> (a -> a) def compose(*fs): '''Composition, from right to left, of a series of functions. ''' return lambda x: reduce( lambda a, f: f(a), fs[::-1], x ) # We only need light implementations # of prime functions here: # primeDecomposition :: Int -> [Int] def primeDecomposition(n): '''List of integers representing the prime decomposition of n. ''' def go(n, p): return [p] + go(n // p, p) if ( 0 == n % p ) else [] return list(chain.from_iterable(map( lambda p: go(n, p) if isPrime(p) else [], range(2, 1 + n) ))) # isPrime :: Int -> Bool def isPrime(n): '''True if n is prime.''' if n in (2, 3): return True if 2 > n or 0 == n % 2: return False if 9 > n: return True if 0 == n % 3: return False return not any(map( lambda x: 0 == n % x or 0 == n % (2 + x), range(5, 1 + int(n ** 0.5), 6) )) # justifyRight :: Int -> Char -> String -> String def justifyRight(n): '''A string padded at left to length n, ''' return lambda c: lambda s: s.rjust(n, c) # MAIN --- if __name__ == '__main__': main() ``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Quackery `primefactors` is defined at Prime decomposition. ``` [ primefactors size primefactors size 1 = ] is attractive ( n --> b ) 120 times [ i^ 1+ attractive if [ i^ 1+ echo sp ] ]``` Output: `4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120` ## R ```is_prime <- function(num) { if (num < 2) return(FALSE) if (num %% 2 == 0) return(num == 2) if (num %% 3 == 0) return(num == 3) d <- 5 while (d*d <= num) { if (num %% d == 0) return(FALSE) d <- d + 2 if (num %% d == 0) return(FALSE) d <- d + 4 } TRUE } count_prime_factors <- function(num) { if (num == 1) return(0) if (is_prime(num)) return(1) count <- 0 f <- 2 while (TRUE) { if (num %% f == 0) { count <- count + 1 num <- num / f if (num == 1) return(count) if (is_prime(num)) f <- num } else if (f >= 3) f <- f + 2 else f <- 3 } } max <- 120 cat("The attractive numbers up to and including",max,"are:\n") count <- 0 for (i in 1:max) { n <- count_prime_factors(i); if (is_prime(n)) { cat(i," ", sep = "") count <- count + 1 } }``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Racket ```#lang racket (require math/number-theory) (define attractive? (compose1 prime? prime-omega)) (filter attractive? (range 1 121)) ``` Output: ```(4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120) ``` ## Raku (formerly Perl 6) Works with: Rakudo version 2019.03 This algorithm is concise but not really well suited to finding large quantities of consecutive attractive numbers. It works, but isn't especially speedy. More than a hundred thousand or so gets tedious. There are other, much faster (though more verbose) algorithms that could be used. This algorithm is well suited to finding arbitrary attractive numbers though. ```use Lingua::EN::Numbers; use ntheory:from<Perl5> <factor is_prime>; sub display (\$n,\$m) { (\$n..\$m).grep: (~*).&factor.elems.&is_prime } sub count (\$n,\$m) { +(\$n..\$m).grep: (~*).&factor.elems.&is_prime } put "Attractive numbers from 1 to 120:\n" ~ display(1, 120)».fmt("%3d").rotor(20, :partial).join: "\n"; # Robusto! for 1, 1000, 1, 10000, 1, 100000, 2**73 + 1, 2**73 + 100 -> \$a, \$b { put "\nCount of attractive numbers from {comma \$a} to {comma \$b}:\n" ~ comma count \$a, \$b } ``` Output: ```Attractive numbers from 1 to 120: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 Count of attractive numbers from 1 to 1,000: 636 Count of attractive numbers from 1 to 10,000: 6,396 Count of attractive numbers from 1 to 100,000: 63,255 Count of attractive numbers from 9,444,732,965,739,290,427,393 to 9,444,732,965,739,290,427,492: 58``` ## REXX Programming notes: The use of a table that contains some low primes is one fast method to test for primality of the various prime factors. The   cFact   (count factors)   function   is optimized way beyond what this task requires,   and it could be optimized further by expanding the     do whiles     clauses   (lines   3──►6   in the   cFact   function). If the argument for the program is negative,   only a   count   of attractive numbers up to and including   │N│   is shown. ```/*REXX program finds and shows lists (or counts) attractive numbers up to a specified N.*/ parse arg N . /*get optional argument from the C.L. */ if N=='' | N=="," then N= 120 /*Not specified? Then use the default.*/ cnt= N<0 /*semaphore used to control the output.*/ N= abs(N) /*ensure that N is a positive number.*/ call genP 100 /*gen 100 primes (high= 541); overkill.*/ sw= linesize() - 1 /*SW: is the usable screen width. */ if \cnt then say 'attractive numbers up to and including ' commas(N) " are:" #= 0 /*number of attractive #'s (so far). */ \$= /*a list of attractive numbers (so far)*/ do j=1 for N; if @.j then iterate /*Is it a low prime? Then skip number.*/ a= cFact(j) /*call cFact to count the factors in J.*/ if \@.a then iterate /*if # of factors not prime, then skip.*/ #= # + 1 /*bump number of attractive #'s found. */ if cnt then iterate /*if not displaying numbers, skip list.*/ cj= commas(j); _= \$ cj /*append a commatized number to \$ list.*/ if length(_)>sw then do; say strip(\$); \$= cj; end /*display a line of numbers.*/ else \$= _ /*append the latest number. */ end /*j*/ if \$\=='' & \cnt then say strip(\$) /*display any residual numbers in list.*/ say; say commas(#) ' attractive numbers found up to and including ' commas(N) exit /*stick a fork in it, we're all done. */ /*──────────────────────────────────────────────────────────────────────────────────────*/ cFact: procedure; parse arg z 1 oz; if z<2 then return z /*if Z too small, return Z.*/ #= 0 /*#: is the number of factors (so far)*/ do while z//2==0; #= #+1; z= z%2; end /*maybe add the factor of two. */ do while z//3==0; #= #+1; z= z%3; end /* " " " " " three.*/ do while z//5==0; #= #+1; z= z%5; end /* " " " " " five. */ do while z//7==0; #= #+1; z= z%7; end /* " " " " " seven.*/ /* [↑] reduce Z by some low primes. */ do k=11 by 6 while k<=z /*insure that K isn't divisible by 3.*/ parse var k '' -1 _ /*obtain the last decimal digit of K. */ if _\==5 then do while z//k==0; #= #+1; z= z%k; end /*maybe reduce Z.*/ if _ ==3 then iterate /*Next number ÷ by 5? Skip. ____ */ if k*k>oz then leave /*are we greater than the √ OZ  ? */ y= k + 2 /*get next divisor, hopefully a prime.*/ do while z//y==0; #= #+1; z= z%y; end /*maybe reduce Z.*/ end /*k*/ if z\==1 then return # + 1 /*if residual isn't unity, then add one*/ return # /*return the number of factors in OZ. */ /*──────────────────────────────────────────────────────────────────────────────────────*/ commas: parse arg ?; do jc=length(?)-3 to 1 by -3; ?=insert(',', ?, jc); end; return ? /*──────────────────────────────────────────────────────────────────────────────────────*/ genP: procedure expose @.; parse arg n; @.=0; @.2= 1; @.3= 1; p= 2 do j=3 by 2 until p==n; do k=3 by 2 until k*k>j; if j//k==0 then iterate j end /*k*/; @.j = 1; p= p + 1 end /*j*/; return /* [↑] generate N primes. */ ``` This REXX program makes use of   LINESIZE   REXX program (or BIF) which is used to determine the screen width (or linesize) of the terminal (console). Some REXXes don't have this BIF.   It is used here to automatically/idiomatically limit the width of the output list. The   LINESIZE.REX   REXX program is included here   ───►   LINESIZE.REX. output   when using the default input: ```attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 74 attractive numbers found up to and including 120 ``` output   when using the input of:     -10000 ```6,396 attractive numbers found up to and including 10,000 ``` output   when using the input of:     -100000 ```63,255 attractive numbers found up to and including 100,000 ``` output   when using the input of:     -1000000 ```623,232 attractive numbers found up to and including 1,000,000 ``` ## Ring ```# Project: Attractive Numbers decomp = [] nump = 0 see "Attractive Numbers up to 120:" + nl while nump < 120 decomp = [] nump = nump + 1 for i = 1 to nump if isPrime(i) and nump%i = 0 dec = nump/i while dec%i = 0 dec = dec/i end ok next if isPrime(len(decomp)) see string(nump) + " = [" for n = 1 to len(decomp) if n < len(decomp) see string(decomp[n]) + "*" else see string(decomp[n]) + "] - " + len(decomp) + " is prime" + nl ok next ok end func isPrime(num) if (num <= 1) return 0 ok if (num % 2 = 0) and num != 2 return 0 ok for i = 3 to floor(num / 2) -1 step 2 if (num % i = 0) return 0 ok next return 1``` Output: ```Attractive Numbers up to 120: 4 = [2*2] - 2 is prime 6 = [2*3] - 2 is prime 8 = [2*2*2] - 3 is prime 9 = [3*3] - 2 is prime 10 = [2*5] - 2 is prime 12 = [2*2*3] - 3 is prime 14 = [2*7] - 2 is prime 15 = [3*5] - 2 is prime 18 = [2*3*3] - 3 is prime 20 = [2*2*5] - 3 is prime ... ... ... 102 = [2*3*17] - 3 is prime 105 = [3*5*7] - 3 is prime 106 = [2*53] - 2 is prime 108 = [2*2*3*3*3] - 5 is prime 110 = [2*5*11] - 3 is prime 111 = [3*37] - 2 is prime 112 = [2*2*2*2*7] - 5 is prime 114 = [2*3*19] - 3 is prime 115 = [5*23] - 2 is prime 116 = [2*2*29] - 3 is prime 117 = [3*3*13] - 3 is prime 118 = [2*59] - 2 is prime 119 = [7*17] - 2 is prime 120 = [2*2*2*3*5] - 5 is prime ``` ## RPL Works with: HP version 49g ```≪ { } 2 120 FOR n FACTORS 0 2 3 PICK SIZE FOR j OVER j GET + 2 STEP NIP IF ISPRIME? THEN n + END NEXT ``` Output: ```{4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120} ``` ## Ruby ```require "prime" p (1..120).select{|n| n.prime_division.sum(&:last).prime? } ``` Output: ```[4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120] ``` ## Rust Uses primal ```use primal::Primes; const MAX: u64 = 120; /// Returns an Option with a tuple => Ok((smaller prime factor, num divided by that prime factor)) /// If num is a prime number itself, returns None fn extract_prime_factor(num: u64) -> Option<(u64, u64)> { let mut i = 0; if primal::is_prime(num) { None } else { loop { let prime = Primes::all().nth(i).unwrap() as u64; if num % prime == 0 { return Some((prime, num / prime)); } else { i += 1; } } } } /// Returns a vector containing all the prime factors of num fn factorize(num: u64) -> Vec<u64> { let mut factorized = Vec::new(); let mut rest = num; while let Some((prime, factorizable_rest)) = extract_prime_factor(rest) { factorized.push(prime); rest = factorizable_rest; } factorized.push(rest); factorized } fn main() { let mut output: Vec<u64> = Vec::new(); for num in 4 ..= MAX { if primal::is_prime(factorize(num).len() as u64) { output.push(num); } } println!("The attractive numbers up to and including 120 are\n{:?}", output); } ``` Output: ```The attractive numbers up to and including 120 are [4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120]``` ## Scala Output: Best seen in running your browser either by ScalaFiddle (ES aka JavaScript, non JVM) or Scastie (remote JVM). ```object AttractiveNumbers extends App { private val max = 120 private var count = 0 private def nFactors(n: Int): Int = { @scala.annotation.tailrec def factors(x: Int, f: Int, acc: Int): Int = if (f * f > x) acc + 1 else x % f match { case 0 => factors(x / f, f, acc + 1) case _ => factors(x, f + 1, acc) } factors(n, 2, 0) } private def ls: Seq[String] = for (i <- 4 to max; n = nFactors(i) if n >= 2 && nFactors(n) == 1 // isPrime(n) ) yield f"\$i%4d(\$n)" println(f"The attractive numbers up to and including \$max%d are: [number(factors)]\n") ls.zipWithIndex .groupBy { case (_, index) => index / 20 } .foreach { case (_, row) => println(row.map(_._1).mkString) } } ``` ## SETL ```program attractive_numbers; numbers := [n in [2..120] | attractive(n)]; printtab(numbers, 20, 3); proc printtab(list, cols, width); lines := [list(k..cols+k-1) : k in [1, cols+1..#list]]; loop for line in lines do print(+/[lpad(str item, width+1) : item in line]); end loop; end proc; proc attractive(n); return #factorize(#factorize(n)) = 1; end proc; proc factorize(n); factors := []; d := 2; loop until d > n do loop while n mod d = 0 do factors with:= d; n div:= d; end loop; d +:= 1; end loop; return factors; end proc; end program;``` Output: ``` 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## Sidef ```func is_attractive(n) { n.bigomega.is_prime } 1..120 -> grep(is_attractive).say ``` Output: `[4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120]` ## Swift ```import Foundation extension BinaryInteger { @inlinable public var isAttractive: Bool { return primeDecomposition().count.isPrime } @inlinable public var isPrime: Bool { if self == 0 || self == 1 { return false } else if self == 2 { return true } let max = Self(ceil((Double(self).squareRoot()))) for i in stride(from: 2, through: max, by: 1) { if self % i == 0 { return false } } return true } @inlinable public func primeDecomposition() -> [Self] { guard self > 1 else { return [] } func step(_ x: Self) -> Self { return 1 + (x << 2) - ((x >> 1) << 1) } let maxQ = Self(Double(self).squareRoot()) var d: Self = 1 var q: Self = self & 1 == 0 ? 2 : 3 while q <= maxQ && self % q != 0 { q = step(d) d += 1 } return q <= maxQ ? [q] + (self / q).primeDecomposition() : [self] } } let attractive = Array((1...).lazy.filter({ \$0.isAttractive }).prefix(while: { \$0 <= 120 })) print("Attractive numbers up to and including 120: \(attractive)") ``` Output: `Attractive numbers up to and including 120: [4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 42, 44, 45, 46, 48, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 102, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120]` ## Tcl ```proc isPrime {n} { if {\$n < 2} { return 0 } if {\$n > 3} { if {0 == (\$n % 2)} { return 0 } for {set d 3} {(\$d * \$d) <= \$n} {incr d 2} { if {0 == (\$n % \$d)} { return 0 } } } return 1 ;# no divisor found } proc cntPF {n} { set cnt 0 while {0 == (\$n % 2)} { set n [expr {\$n / 2}] incr cnt } for {set d 3} {(\$d * \$d) <= \$n} {incr d 2} { while {0 == (\$n % \$d)} { set n [expr {\$n / \$d}] incr cnt } } if {\$n > 1} { incr cnt } return \$cnt } proc showRange {lo hi} { puts "Attractive numbers in range \$lo..\$hi are:" set k 0 for {set n \$lo} {\$n <= \$hi} {incr n} { if {[isPrime [cntPF \$n]]} { puts -nonewline " [format %3s \$n]" incr k } if {\$k >= 20} { puts "" set k 0 } } if {\$k > 0} { puts "" } } showRange 1 120 ``` Output: ```Attractive numbers in range 1..120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Vala Translation of: D ```bool is_prime(int n) { var d = 5; if (n < 2) return false; if (n % 2 == 0) return n == 2; if (n % 3 == 0) return n == 3; while (d * d <= n) { if (n % d == 0) return false; d += 2; if (n % d == 0) return false; d += 4; } return true; } int count_prime_factors(int n) { var count = 0; var f = 2; if (n == 1) return 0; if (is_prime(n)) return 1; while (true) { if (n % f == 0) { count++; n /= f; if (n == 1) return count; if (is_prime(n)) f = n; } else if (f >= 3) { f += 2; } else { f = 3; } } } void main() { const int MAX = 120; var n = 0; var count = 0; stdout.printf(@"The attractive numbers up to and including \$MAX are:\n"); for (int i = 1; i <= MAX; i++) { n = count_prime_factors(i); if (is_prime(n)) { stdout.printf("%4d", i); count++; if (count % 20 == 0) stdout.printf("\n"); } } stdout.printf("\n"); } ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## VBA ```Option Explicit Public Sub AttractiveNumbers() Dim max As Integer, i As Integer, n As Integer max = 120 For i = 1 To max n = CountPrimeFactors(i) If IsPrime(n) Then Debug.Print i Next i End Sub Public Function IsPrime(ByVal n As Integer) As Boolean Dim d As Integer IsPrime = True d = 5 If n < 2 Then IsPrime = False GoTo Finish End If If n Mod 2 = 0 Then IsPrime = (n = 2) GoTo Finish End If If n Mod 3 = 0 Then IsPrime = (n = 3) GoTo Finish End If While (d * d <= n) If (n Mod d = 0) Then IsPrime = False d = d + 2 If (n Mod d = 0) Then IsPrime = False d = d + 4 Wend Finish: End Function Public Function CountPrimeFactors(ByVal n As Integer) As Integer Dim count As Integer, f As Integer If n = 1 Then CountPrimeFactors = 0 GoTo Finish2 End If If (IsPrime(n)) Then CountPrimeFactors = 1 GoTo Finish2 End If count = 0 f = 2 Do While (True) If n Mod f = 0 Then count = count + 1 n = n / f If n = 1 Then CountPrimeFactors = count Exit Do End If If IsPrime(n) Then f = n ElseIf f >= 3 Then f = f + 2 Else f = 3 End If Loop Finish2: End Function``` ## Visual Basic .NET Translation of: D ```Module Module1 Const MAX = 120 Function IsPrime(n As Integer) As Boolean If n < 2 Then Return False If n Mod 2 = 0 Then Return n = 2 If n Mod 3 = 0 Then Return n = 3 Dim d = 5 While d * d <= n If n Mod d = 0 Then Return False d += 2 If n Mod d = 0 Then Return False d += 4 End While Return True End Function Function PrimefactorCount(n As Integer) As Integer If n = 1 Then Return 0 If IsPrime(n) Then Return 1 Dim count = 0 Dim f = 2 While True If n Mod f = 0 Then count += 1 n /= f If n = 1 Then Return count If IsPrime(n) Then f = n ElseIf f >= 3 Then f += 2 Else f = 3 End If End While Throw New Exception("Unexpected") End Function Sub Main() Console.WriteLine("The attractive numbers up to and including {0} are:", MAX) Dim i = 1 Dim count = 0 While i <= MAX Dim n = PrimefactorCount(i) If IsPrime(n) Then Console.Write("{0,4}", i) count += 1 If count Mod 20 = 0 Then Console.WriteLine() End If End If i += 1 End While Console.WriteLine() End Sub End Module ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120``` ## V (Vlang) Translation of: Go ```fn is_prime(n int) bool { if n < 2 { return false } else if n%2 == 0 { return n == 2 } else if n%3 == 0 { return n == 3 } else { mut d := 5 for d*d <= n { if n%d == 0 { return false } d += 2 if n%d == 0 { return false } d += 4 } return true } } fn count_prime_factors(n int) int { mut nn := n if n == 1 { return 0 } else if is_prime(nn) { return 1 } else { mut count, mut f := 0, 2 for { if nn%f == 0 { count++ nn /= f if nn == 1{ return count } if is_prime(nn) { f = nn } } else if f >= 3{ f += 2 } else { f = 3 } } return count } } fn main() { max := 120 println('The attractive numbers up to and including \$max are:') mut count := 0 for i in 1 .. max+1 { n := count_prime_factors(i) if is_prime(n) { print('\${i:4}') count++ if count%20 == 0 { println('') } } } }``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## Wren Library: Wren-fmt Library: Wren-math ```import "./fmt" for Fmt import "./math" for Int var max = 120 System.print("The attractive numbers up to and including %(max) are:") var count = 0 for (i in 1..max) { var n = Int.primeFactors(i).count if (Int.isPrime(n)) { Fmt.write("\$4d", i) count = count + 1 if (count%20 == 0) System.print() } } System.print() ``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## XPL0 ```func IsPrime(N); \Return 'true' if N is prime int N, I; [if N <= 2 then return N = 2; if (N&1) = 0 then \even >2\ return false; for I:= 3 to sqrt(N) do [if rem(N/I) = 0 then return false; I:= I+1; ]; return true; ]; func Factors(N); \Return number of factors for N int N, Cnt, F; [Cnt:= 0; F:= 2; repeat if rem(N/F) = 0 then [Cnt:= Cnt+1; N:= N/F; ] else F:= F+1; until F > N; return Cnt; ]; int C, N; [C:= 0; for N:= 4 to 120 do if IsPrime(Factors(N)) then [IntOut(0, N); C:= C+1; if rem(C/10) then ChOut(0, 9\tab\) else CrLf(0); ]; ]``` Output: ```4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` ## zkl Using GMP (GNU Multiple Precision Arithmetic Library, probabilistic primes) because it is easy and fast to test for primeness. ```var [const] BI=Import("zklBigNum"); // libGMP fcn attractiveNumber(n){ BI(primeFactors(n).len()).probablyPrime() } println("The attractive numbers up to and including 120 are:"); [1..120].filter(attractiveNumber) ```fcn primeFactors(n){ // Return a list of factors of n acc:=fcn(n,k,acc,maxD){ // k is 2,3,5,7,9,... not optimum if(n==1 or k>maxD) acc.close(); else{ q,r:=n.divr(k); // divr-->(quotient,remainder) if(r==0) return(self.fcn(q,k,acc.write(k),q.toFloat().sqrt())); return(self.fcn(n,k+1+k.isOdd,acc,maxD)) } }(n,2,Sink(List),n.toFloat().sqrt()); m:=acc.reduce('*,1); // mulitply factors if(n!=m) acc.append(n/m); // opps, missed last factor else acc; }``` Output: ```The attractive numbers up to and including 120 are: 4 6 8 9 10 12 14 15 18 20 21 22 25 26 27 28 30 32 33 34 35 38 39 42 44 45 46 48 49 50 51 52 55 57 58 62 63 65 66 68 69 70 72 74 75 76 77 78 80 82 85 86 87 91 92 93 94 95 98 99 102 105 106 108 110 111 112 114 115 116 117 118 119 120 ``` (u64, u64)> { ``` let mut i = 0; if primal::is_prime(num) { None } else { loop { let prime = Primes::all().nth(i).unwrap() as u64; if num % prime == 0 { return Some((prime, num / prime)); } else { i += 1; } } } ``` } /// Returns a vector containing all the prime factors of num fn factorize(num: u64) -> Vec
44,413
108,946
{"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-2024-26
latest
en
0.658984
http://mathoverflow.net/questions/57613/diophantine-numbers
1,371,673,088,000,000,000
text/html
crawl-data/CC-MAIN-2013-20/segments/1368709135115/warc/CC-MAIN-20130516125855-00004-ip-10-60-113-184.ec2.internal.warc.gz
139,230,289
9,330
MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4). ## Diophantine numbers [closed] A real number $x$ is defined to be diophantine if, for every $\epsilon>0$, there exists a constant $c_{\epsilon}$ such that $$\left|x-\frac{a}{q}\right| \geq \frac{c_{\epsilon}}{|q|^{2+\epsilon}} \text{for every rational number} \frac{a}{q}$$ Show that the set $\{ x\in [0,1]: x\text{ is not diophantine}\}$ contains a thick subset of $[0,1]$. - We don't like to be ordered to do things on MO. – Gerry Myerson Mar 6 2011 at 23:14 Homework in an analytic number theory class? – Mark Sapir Mar 6 2011 at 23:56 To expand slightly on Gerry's comment: the imperative form gives the impression that the question being asked has been set as an exercise, meaning that the answer/proof is known and that the person posting on MO has been asked to find the answer/proof as an exercise. If this is the case, this is not what MO should be used for. If this is not the case, then more explanation should be added as to how the question arose, and what has already been done to try and solve it. – Yemon Choi Mar 6 2011 at 23:59 @Mark: I suspect so, especially since the terminology "thick" has not been defined. – Yemon Choi Mar 7 2011 at 0:00 @Yemon: Then I suggest we close the question unless the author includes a motivation. I voted to close. – Mark Sapir Mar 7 2011 at 0:14 show 1 more comment
426
1,476
{"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": 1, "x-ck12": 0, "texerror": 0}
2.609375
3
CC-MAIN-2013-20
latest
en
0.929496
https://www.gradesaver.com/textbooks/math/algebra/elementary-algebra/chapter-5-exponents-and-polynomials-chapter-5-review-problem-set-page-231/36
1,537,789,154,000,000,000
text/html
crawl-data/CC-MAIN-2018-39/segments/1537267160400.74/warc/CC-MAIN-20180924110050-20180924130450-00322.warc.gz
767,425,619
13,662
## Elementary Algebra $2x^3+7x^2+10x-7$ RECALL: The distributive property states that for any real numbers a, b, and c: $a(b+c) = ab+ac \\a(b-c) = ab - ac$ Use the distributive property (which is shown above) to obtain: $=2x(x^2+4x+7)-1(x^2+4x+7) \\=2x(x^2)+2x(4x)+2x(7)-1(x^2) -1(4x)-1(7) \\=2x^3+8x^2+14x-x^2-4x-7$ Combine like terms to obtain: $=2x^3+(8x^2-x^2)+(14x-4x)-7 \\=2x^3+7x^2+10x-7$
199
396
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.28125
4
CC-MAIN-2018-39
longest
en
0.505296
https://discuss.leetcode.com/topic/53754/straight-method-java
1,513,224,698,000,000,000
text/html
crawl-data/CC-MAIN-2017-51/segments/1512948539745.30/warc/CC-MAIN-20171214035620-20171214055620-00155.warc.gz
536,821,571
8,152
# Straight method.Java. • `````` //clockwise rotation is like m[i][j]->m[j][n-i]->m[n-i][n-i]->m[n-i][i]->beginging, do counterclockwise rotation need only constant space. public void rotate(int[][] a) { int n = a.length; if (n == 0 || n == 1) { return; } for (int i = 0; i < n / 2; i++) { //i+1 = layer of the square for(int j=i;j<n-(i+1);j++){ int temp = a[i][j]; a[i][j] = a[n - 1 - j][i]; a[n - 1 - j][i] = a[n - 1 - i][n - 1 - j]; a[n - 1 - i][n - 1 - j] = a[j][n - 1 - i]; a[j][n - 1 - i] = temp; } } }`````` Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.
240
615
{"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-2017-51
latest
en
0.533176
https://kirstenostherr.org/and-pdf/816-linear-statistical-inference-and-its-applications-pdf-702-134.php
1,643,260,410,000,000,000
text/html
crawl-data/CC-MAIN-2022-05/segments/1642320305141.20/warc/CC-MAIN-20220127042833-20220127072833-00095.warc.gz
390,674,380
7,208
# Linear Statistical Inference And Its Applications Pdf File Name: linear statistical inference and its applications .zip Size: 1136Kb Published: 05.05.2021 This course is designed for PhD students year 1 in applied mathematics, statistics, and engineering who are interested in learning from data. It covers advanced topics in statistical learning and inference, with emphasis on the integration of statistical models and algorithms for statistical inference. This course aims to first make connections among classical topics, and then move forward to modern topics, including statistical view of deep learning. This authoritative book draws on the latest research to explore the interplay of high-dimensional statistics with optimization. Through an accessible analysis of fundamental problems of hypothesis testing and signal recovery, Anatoli Juditsky and Arkadi Nemirovski show how convex optimization theory can be used to devise and analyze near-optimal statistical inferences. Statistical Inference via Convex Optimization is an essential resource for optimization specialists who are new to statistics and its applications, and for data scientists who want to improve their optimization methods. ## Review: C. Radhakrishna Rao; Linear statistical inference and its applications Statistical inference is the process of using data analysis to infer properties of an underlying distribution of probability. It is assumed that the observed data set is sampled from a larger population. Inferential statistics can be contrasted with descriptive statistics. Descriptive statistics is solely concerned with properties of the observed data, and it does not rest on the assumption that the data come from a larger population. In machine learning , the term inference is sometimes used instead to mean "make a prediction, by evaluating an already trained model"; [2] in this context inferring properties of the model is referred to as training or learning rather than inference , and using a model for prediction is referred to as inference instead of prediction ; see also predictive inference. ## MATH 5472. Computer-Age Statistical Inference Many of the books have web pages associated with them that have the data files for the book and web pages showing how to perform the analyses from the book using packages like SAS, Stata, SPSS, etc. Please see our Textbook Examples page. Box, William G. Hunter and J. Rick Turner and Julian F. Algebra of Vectors and Matrices (Pages: ) · Summary · PDF · References · Request permissions. ## MATH 5472. Computer-Age Statistical Inference Most users should sign in with their email address. If you originally registered with a username please use that to sign in. Oxford University Press is a department of the University of Oxford. It furthers the University's objective of excellence in research, scholarship, and education by publishing worldwide. Эти числа отлично работают при создании шифров, потому что компьютеры не могут угадать их с помощью обычного числового дерева. Соши даже подпрыгнула. - Да. Эти группы из четырех знаков… - Уберите пробелы, - повторил. Сьюзан колебалась недолго, потом кивнула Соши. Соши быстро удалила пробелы, но никакой ясности это не внесло. Мне много чего нужно, мистер Беккер, но неприятности точно не нужны. Кроме того, тот старик вроде бы обо всем позаботился. - Канадец. Фонтейн погрузился в раздумья. Джабба терпеливо ждал, наконец не выдержал и крикнул ассистентке: - Соши. Немедленно. Соши побежала к своему терминалу. - Она подняла телефонную трубку и начала набирать номер. Бринкерхофф сидел как на иголках. - Ты уверена, что мы должны его беспокоить. - Я не собираюсь его беспокоить, - сказала Мидж, протягивая ему трубку. Косые лучи утреннего солнца падали в башню сквозь прорези в стенах. Беккер посмотрел. Человек в очках в тонкой металлической оправе стоял внизу, спиной к Беккеру, и смотрел в направлении площади. Беккер прижал лицо к прорези, чтобы лучше видеть. Иди на площадь, взмолился он мысленно. Жжение в горле заставило ее собраться с мыслями.
963
4,062
{"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-2022-05
latest
en
0.924963
https://justaaa.com/accounting/461169-bauk-printing-uses-the-calendar-year-bauk
1,723,301,625,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722640808362.59/warc/CC-MAIN-20240810124327-20240810154327-00074.warc.gz
256,063,858
11,229
Question Bauk Printing uses the calendar year. Bauk purchases a digital printer for \$140,000 and places it... Bauk Printing uses the calendar year. Bauk purchases a digital printer for \$140,000 and places it in service on April 1, 2016. The Company estimates that the digital printer will have a useful life of 10 years and no salvage value. If it uses MACRS and the half-year convention to compute its depreciation deduction, how will the purchase affect its net income and its taxable income in 2016? In 2020? Depreciation rate in the first year 2016 = 10%, so Depreciation = 140000 * 10% = \$14000. The net income is reduced by \$14000. Depreciation rate in the fifth year 2020 = 9.22%, so Depreciation = 140000 * 9.22% = \$12908. The net income is reduced by \$12908. Note : MACRS and the half year convention depreciation rates: Year Depreciation Rate in % for Recovery Period 3-year 5-year 7-year 10-year 15-year 20-year 1 33.33 20.00 14.29 10.00 5.00 3.750 2 44.45 32.00 24.49 18.00 9.50 7.219 3 14.81 19.20 17.49 14.40 8.55 6.677 4 7.41 11.52 12.49 11.52 7.70 6.177 5 11.52 8.93 9.22 6.93 5.713 6 5.76 8.92 7.37 6.23 5.285 7 8.93 6.55 5.90 4.888 8 4.46 6.55 5.90 4.522 9 6.56 5.91 4.462 10 6.55 5.90 4.461 11 3.28 5.91 4.462
474
1,240
{"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-2024-33
latest
en
0.821807
https://metanumbers.com/1850921000000
1,643,368,134,000,000,000
text/html
crawl-data/CC-MAIN-2022-05/segments/1642320305494.6/warc/CC-MAIN-20220128104113-20220128134113-00367.warc.gz
432,212,733
7,846
# 1850921000000 (number) 1,850,921,000,000 (one trillion eight hundred fifty billion nine hundred twenty-one million) is an even thirteen-digits composite number following 1850920999999 and preceding 1850921000001. In scientific notation, it is written as 1.850921 × 1012. The sum of its digits is 26. It has a total of 14 prime factors and 196 positive divisors. There are 739,257,600,000 positive integers (up to 1850921000000) that are relatively prime to 1850921000000. ## Basic properties • Is Prime? No • Number parity Even • Number length 13 • Sum of Digits 26 • Digital Root 8 ## Name Short name 1 trillion 850 billion 921 million one trillion eight hundred fifty billion nine hundred twenty-one million ## Notation Scientific notation 1.850921 × 1012 1.850921 × 1012 ## Prime Factorization of 1850921000000 Prime Factorization 26 × 56 × 1109 × 1669 Composite number Distinct Factors Total Factors Radical ω(n) 4 Total number of distinct prime factors Ω(n) 14 Total number of prime factors rad(n) 18509210 Product of the distinct prime numbers λ(n) 1 Returns the parity of Ω(n), such that λ(n) = (-1)Ω(n) μ(n) 0 Returns: 1, if n has an even number of prime factors (and is square free) −1, if n has an odd number of prime factors (and is square free) 0, if n has a squared prime factor Λ(n) 0 Returns log(p) if n is a power pk of any prime p (for any k >= 1), else returns 0 The prime factorization of 1,850,921,000,000 is 26 × 56 × 1109 × 1669. Since it has a total of 14 prime factors, 1,850,921,000,000 is a composite number. ## Divisors of 1850921000000 196 divisors Even divisors 168 28 28 0 Total Divisors Sum of Divisors Aliquot Sum τ(n) 196 Total number of the positive divisors of n σ(n) 4.59799e+12 Sum of all the positive divisors of n s(n) 2.74707e+12 Sum of the proper positive divisors of n A(n) 2.34591e+10 Returns the sum of divisors (σ(n)) divided by the total number of divisors (τ(n)) G(n) 1.36049e+06 Returns the nth root of the product of n divisors H(n) 78.8999 Returns the total number of divisors (τ(n)) divided by the sum of the reciprocal of each divisors The number 1,850,921,000,000 can be divided by 196 positive divisors (out of which 168 are even, and 28 are odd). The sum of these divisors (counting 1,850,921,000,000) is 4,597,986,066,900, the average is 234,591,125,86.,224. ## Other Arithmetic Functions (n = 1850921000000) 1 φ(n) n Euler Totient Carmichael Lambda Prime Pi φ(n) 739257600000 Total number of positive integers not greater than n that are coprime to n λ(n) 11550900000 Smallest positive number such that aλ(n) ≡ 1 (mod n) for all a coprime to n π(n) ≈ 68003360156 Total number of primes less than or equal to n r2(n) 112 The number of ways n can be represented as the sum of 2 squares There are 739,257,600,000 positive integers (less than 1,850,921,000,000) that are coprime with 1,850,921,000,000. And there are approximately 68,003,360,156 prime numbers less than or equal to 1,850,921,000,000. ## Divisibility of 1850921000000 m n mod m 2 3 4 5 6 7 8 9 0 2 0 0 2 2 0 8 The number 1,850,921,000,000 is divisible by 2, 4, 5 and 8. • Abundant • Polite • Practical • Frugal ## Base conversion (1850921000000) Base System Value 2 Binary 11010111011110011011111010001110001000000 3 Ternary 20112221112212101222120122 4 Quaternary 122323303133101301000 5 Quinary 220311141234000000 6 Senary 3534145032355412 8 Octal 32736337216100 10 Decimal 1850921000000 12 Duodecimal 25a879845b68 20 Vigesimal 3c60cg5000 36 Base36 nmaukny8 ## Basic calculations (n = 1850921000000) ### Multiplication n×y n×2 3701842000000 5552763000000 7403684000000 9254605000000 ### Division n÷y n÷2 9.2546e+11 6.16974e+11 4.6273e+11 3.70184e+11 ### Exponentiation ny n2 3425908548241000000000000 6341086076018779961000000000000000000 11736849380910756224194081000000000000000000000000 21723980992964717821241532598601000000000000000000000000000000 ### Nth Root y√n 2√n 1.36049e+06 12278 1166.4 284.104 ## 1850921000000 as geometric shapes ### Circle Diameter 3.70184e+12 1.16297e+13 1.07628e+25 ### Sphere Volume 2.65615e+37 4.30512e+25 1.16297e+13 ### Square Length = n Perimeter 7.40368e+12 3.42591e+24 2.6176e+12 ### Cube Length = n Surface area 2.05555e+25 6.34109e+36 3.20589e+12 ### Equilateral Triangle Length = n Perimeter 5.55276e+12 1.48346e+24 1.60294e+12 ### Triangular Pyramid Length = n Surface area 5.93385e+24 7.47304e+35 1.51127e+12 ## Cryptographic Hash Functions md5 fa2b80b6028a6aaaa299077e5c07be90 44fc3be7349eda9ac8bb0bf7a3145eb3be726725 087e8c5394e24afec1afec5daeb80b5a6877d528e0248167a61e85fff540fe81 fae4c9c58dbcdf278e751c7cac936801d50853a8ec6b7c6726bd75eb33cb6efe43088c4976a91d7138bc778a4e2878b197893fe623dc78e576c4c1ed03ba8e38 bd45a184ce1dab6498615f8f3760d1db1a1c3115
1,734
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.3125
3
CC-MAIN-2022-05
latest
en
0.782224
https://numbas.mathcentre.ac.uk/question/44551/mark-equations.exam
1,591,466,045,000,000,000
text/plain
crawl-data/CC-MAIN-2020-24/segments/1590348517506.81/warc/CC-MAIN-20200606155701-20200606185701-00063.warc.gz
463,714,196
2,045
// Numbas version: exam_results_page_options {"name": "Mark equations", "extensions": ["eukleides", "quantities", "random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "statement": " All the answers in this question are equations. In order to mark each equation, Numbas needs to pick some values that satisfy the equation and some that don't, and check that the student's answer agrees with the expected answer. \n Any equation with the same solution set as the expected answer will be marked correct. ", "variables": {"factor": {"name": "factor", "group": "Ungrouped variables", "description": "", "definition": "random(2 .. 8#1)", "templateType": "randrange"}, "a": {"name": "a", "group": "Ungrouped variables", "description": "", "definition": "1", "templateType": "anything"}}, "extensions": ["eukleides", "quantities", "random_person"], "ungrouped_variables": ["a", "factor"], "variable_groups": [], "parts": [{"customName": "", "scripts": {}, "type": "jme", "checkingType": "absdiff", "valuegenerators": [{"name": "p", "value": ""}, {"name": "s", "value": "random(random(vRange),factor*p)"}], "marks": 1, "checkVariableNames": false, "vsetRangePoints": "10", "unitTests": [], "checkingAccuracy": 0.001, "variableReplacements": [], "showFeedbackIcon": true, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "failureRate": 1, "showCorrectAnswer": true, "prompt": " $s = \\simplify[]{{factor}p}$ \n Also try $s-\\var{factor}p=0$ and $p=s/\\var{factor}$. ", "customMarkingAlgorithm": "", "answer": "s={factor}p", "showPreview": true, "useCustomName": false}, {"mustmatchpattern": {"message": "Your answer must be in the form $s = f(p)$.", "nameToCompare": "", "pattern": "s=?", "partialCredit": 0}, "customName": "", "scripts": {}, "type": "jme", "checkingType": "absdiff", "valuegenerators": [{"name": "p", "value": ""}, {"name": "s", "value": "random(random(vRange),factor*p)"}], "marks": 1, "checkVariableNames": false, "vsetRangePoints": "10", "unitTests": [], "checkingAccuracy": 0.001, "variableReplacements": [], "showFeedbackIcon": true, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "failureRate": 1, "showCorrectAnswer": true, "prompt": " $s = \\simplify[]{{factor}p}$ \n But this time there's a pattern-match restriction that your answer must be of the form $s = \\ldots$. ", "customMarkingAlgorithm": "", "answer": "s={factor}p", "showPreview": true, "useCustomName": false}, {"customName": "", "scripts": {}, "type": "jme", "checkingType": "absdiff", "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": "random(random(vRange),sqrt(1-x^2))"}], "marks": 1, "checkVariableNames": false, "vsetRangePoints": "10", "unitTests": [], "checkingAccuracy": 0.001, "variableReplacements": [], "showFeedbackIcon": true, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "failureRate": 1, "showCorrectAnswer": true, "prompt": " $x^2+y^2=1$ \n Also try $1-x^2-y^2=0$ and $y=\\sqrt{1-x^2}$. ", "customMarkingAlgorithm": "", "answer": "x^2+y^2=1", "showPreview": true, "useCustomName": false}, {"customName": "", "scripts": {}, "type": "jme", "checkingType": "absdiff", "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}, {"name": "z", "value": "random(random(vRange),sqrt(1-x^2-y^2))"}], "marks": 1, "checkVariableNames": false, "vsetRangePoints": "10", "unitTests": [], "checkingAccuracy": 0.001, "variableReplacements": [], "showFeedbackIcon": true, "vsetRange": [0, "0.5"], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "failureRate": 1, "showCorrectAnswer": true, "prompt": " $x^2 + y^2 + z^2=1$ ", "customMarkingAlgorithm": "", "answer": "x^2+y^2+z^2=1", "showPreview": true, "useCustomName": false}, {"customName": "", "scripts": {}, "type": "jme", "checkingType": "absdiff", "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": "sqrt(1-x^2)+random(0,random(-0.001..0.001#0))"}], "marks": 1, "checkVariableNames": false, "vsetRangePoints": "10", "unitTests": [], "checkingAccuracy": 0.001, "variableReplacements": [], "showFeedbackIcon": true, "vsetRange": ["-1", 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "failureRate": 1, "showCorrectAnswer": true, "prompt": " $x^2+y^2>1$ \n Because this is an inequality, we need to randomly pick values either side of the critical curve, and some exactly on it. ", "customMarkingAlgorithm": "", "answer": "x^2+y^2>1", "showPreview": true, "useCustomName": false}], "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "", "name": "Mark equations", "preamble": {"js": "", "css": ""}, "functions": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": " All the answers in this question are equations. In order to mark each\n equation, Numbas needs to pick some values that satisfy the equation \nand some that don't, and check that the student's answer agrees with the\n expected answer. Any equation with the same solution set as the expected answer will be marked correct. "}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}]}
1,782
6,043
{"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.75
3
CC-MAIN-2020-24
latest
en
0.514812
https://irfpy.irf.se/projects/util/api/api_irfpy.util.intersection.html
1,723,746,519,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722641311225.98/warc/CC-MAIN-20240815173031-20240815203031-00730.warc.gz
253,265,431
8,151
# irfpy.util.intersection¶ Calculate intersection between LoS and sphere. Code author: Yoshifumi Futaana Line of sight and sphere Given a observation point, P, and the looking vector, V, whether it crosses a sphere with radius of R at the point C. Use los_sphere() function. To get limb position, use los_limb_sphere(). Returns the intersection of the LOS at the sphere surface. * pos view \ \ /---\ intersection * \ / \ | * | \ cent / \ / Parameters: • pos (numpy.array) – Position of observer • view (numpy.array) – Viewing direction • cent (numpy.array) – Center of the target sphere • radius (float) – Radius of the sphere • insphere – If the observer position is in sphere, how to handle? “exception” will raise RuntimeError, “none” will return None. Returns: Position of the intersection as vector3d.Vector3d instance. None will be returned if no intersection is found. Return type: vector3d.Vector3d instance or None. >>> print(los_sphere([10,0,0], [-1,0,0], [-5,0,0], 3)) Vector3d( -2, 0, 0 ) >>> print(los_sphere([10,0,0], [0,1,0], [-5,0,0], 3)) None >>> print(los_sphere([10, 0, 0], [1, 0, 0], [-5, 0, 0], 3)) None If the given pos is in the sphere, RuntimeError will be raised as default. >>> try: ... los_sphere([10,0,0], [-1,0,0], [-5,0,0], 30) ... print('RuntimeError should have been raised.') ... except RuntimeError as e: ... print('OK') ... except: ... print('Not correct exception.') OK Returnt the intersection coordinates. * pos view \ \ /----\ intersection1* \ / \ cent \ | \ * | \ \ / \ \ / intersections2 Parameters: • pos – (3,) or (N, 3) shaped array of positions • view – (3,) or (N, 3) shaped array of viweing directions (or velocity vector) • cent – The center of the reference sphere Returns: A tuple of (is1, is2, k). is1 and is2 is array with shape of (3,) or (N, 3). k is array with shape of (2,) or (N,2) Samples. Let’s consider the sphere cetnered at (1, 1, 0) with a radius of 1. >>> cent = [1, 1, 0] >>> r = 1 If one places at (-1, 1, 0), looking toward (1, 0, 0), then one sees the interesections at (0, 1, 0) and (2, 1, 0). >>> pos = [-1, 1, 0] >>> view = [1, 0, 0] >>> is1, is2, k = intersections_sphere(pos, view, cent, r) >>> print(is1) [0. 1. 0.] >>> print(is2) [2. 1. 0.] Let’s see the next sample. For the same shere as above, but let’s see from the different position, (-1, 2, 0). The view vector is assumed to be (2, 0, 0). In this geometry, the intersection is 1 point, (1, 2, 0). The k-values are 1 (remmeber again the k-values are normalized by the view vector, in this case (2, 0, 0).). >>> pos = [-1, 2, 0] >>> view = [2, 0, 0] >>> is3, is4, k = intersections_sphere(pos, view, cent, r) >>> print(is3) [1. 2. 0.] >>> print(is4) [1. 2. 0.] What if one cannot see the sphere. Set the position (3, -1, 0) and looking toward (0, 1, 0). nan will be returned, while some warning messages are shown. >>> pos = [3, -1, 0] >>> view = [0, 1, 0] >>> p = intersections_sphere(pos, view, cent, r) >>> print(p) (array([nan, nan, nan]), array([nan, nan, nan]), array([nan, nan])) The last example is if the position is inside the sphere, e.g. at (1.5, 1, 0), looking toward (0, 1, 0) with a length of square root of 3. In this case, k- becomes negative. But still you can calculate the intersection points. >>> pos = [1.5, 1, 0] >>> view = [0, np.sqrt(3), 0] >>> is5, is6, k = intersections_sphere(pos, view, cent, r) >>> print(is5) [1.5 0.1339746 0. ] >>> print(is6) [1.5 1.8660254 0. ] Vectorized sample The above example can be vectorized, which has much higher performance. >>> pos = [[-1, 1, 0], [-1, 2, 0,], [3, -1, 0], [1.5, 1, 0]] # (N=4, 3) shape >>> view = [[1, 0, 0], [2, 0, 0], [0, 1, 0], [0, np.sqrt(3), 0]] # (N=4, 3) shape >>> ism, isp, k = intersections_sphere(pos, view, cent, r) >>> print(ism.shape) # (N=4, 3) shape (4, 3) >>> print(ism) [[0. 1. 0. ] [1. 2. 0. ] [ nan nan nan] [1.5 0.1339746 0. ]] >>> print(isp) # (4, 3) shape [[2. 1. 0. ] [1. 2. 0. ] [ nan nan nan] [1.5 1.8660254 0. ]] Return the lengths to the intersections. * pos view \ \ /----\ intersection1* \ / \ cent \ | \ * | \ \ / \ \ / intersections2 Parameters: • pos – (3,) or (N, 3) shaped array of positions • view – (3,) or (N, 3) shaped array of viweing directions (or velocity vector) • cent – The center of the reference sphere Returns: An array of (2,) or (N, 2), where 2 refers to the length of intersection1 and intersection2 normalized by the view. Always small for the first, large (or equal) for the second. If no intersection, (np.nan, np.nan) is returned. The returned is two floating point. To calculate the interesection1 and 2, you may use intersections_sphere() function. Samples. Let’s consider the sphere cetnered at (1, 1, 0) with a radius of 1. >>> cent = [1, 1, 0] >>> r = 1 If one places at (-1, 1, 0), looking toward (1, 0, 0), then one sees the interesections at (0, 1, 0) and (2, 1, 0); then k- = 1 and k+ =3. Note that the k-values are normalized by the length of view vector. >>> pos = [-1, 1, 0] >>> view = [1, 0, 0] >>> km, kp = lengths_to_intersections(pos, view, cent, r) >>> print(km, kp) 1.0 3.0 Let’s see the next sample. For the same shere as above, but let’s see from the different position, (-1, 2, 0). The view vector is assumed to be (2, 0, 0). In this geometry, the intersection is 1 point, (1, 2, 0). The k-values are 1 (remmeber again the k-values are normalized by the view vector, in this case (2, 0, 0).). >>> pos = [-1, 2, 0] >>> view = [2, 0, 0] >>> km, kp = lengths_to_intersections(pos, view, cent, r) >>> print(km, kp) 1.0 1.0 What if one cannot see the sphere. Set the position (3, -1, 0) and looking toward (0, 1, 0). nan will be returned, while some warning messages are shown. >>> pos = [3, -1, 0] >>> view = [0, 1, 0] >>> km, kp = lengths_to_intersections(pos, view, cent, r) The last example is if the position is inside the sphere, e.g. at (1.5, 1, 0), looking toward (0, 1, 0) with a length of square root of 3. In this case, k- becomes negative. Still you can calculate the intersection points as above. >>> pos = [1.5, 1, 0] >>> view = [0, np.sqrt(3), 0] >>> km, kp = lengths_to_intersections(pos, view, cent, r) >>> print(km, kp) -0.5 0.5 Vectorized sample The above example can be vectorized, which has much higher performance. >>> pos = [[-1, 1, 0], [-1, 2, 0,], [3, -1, 0], [1.5, 1, 0]] >>> view = [[1, 0, 0], [2, 0, 0], [0, 1, 0], [0, np.sqrt(3), 0]] >>> k = lengths_to_intersections(pos, view, cent, r) >>> print(k[:, 0]) [ 1. 1. nan -0.5] >>> print(k[:, 1]) [3. 1. nan 0.5] Return the intersection of LOS or limb. This function returns the intersection between view and the sphere. If the configuration results in the intersection, the result is the same as los_sphere(). But if the intersection is not found (view direction is into space not sphere), this function returns the limb position of the sphere in the same plane defined by the vectors of pos and view. * pos | view /---\ | / \ | / \ | | * *----| No intersection, returning the neighboring surface \ cent / | \ / Parameters: • pos (numpy.array) – Position of observer • view (numpy.array) – Viewing direction • cent (numpy.array) – Center of the target sphere • radius (float) – Radius of the sphere Returns: Position of the intersection or limb as vector3d.Vector3d instance. Return type: vector3d.Vector3d instance or None. >>> print(los_limb_sphere([10,0,0], [-1,0,0], [-5,0,0], 3)) Vector3d( -2, 0, 0 ) >>> print(los_limb_sphere([10,0,0], [0,1,0], [-5,0,0], 3)) Vector3d( -4.4, 2.93939, 0 ) >>> print(los_limb_sphere([10,0,0], [-1,1,0], [-5,0,0], 3)) Vector3d( -4.4, 2.93939, 0 ) >>> print(los_limb_sphere([15,0,0], [-1,1,0], [0,0,0], 3)) Vector3d( 0.6, 2.93939, 0 ) Note for developer The los_sphere is developed in vector3d.Vector3d class, but los_limb_sphere is written basically using np.array class. Return if the target is visible from the observer if there is a sphere. Parameters: • observer_xyz – Numpy array of observer location. Must be (3,) shape. • target_xyz – Numpy array of target location. Must be (3,) shape. • sphere_center_xyz – Numpy array of sphere center. Must be (3,) shape. Returns: True if the target is visible. Use case It is commonly used if a spacecraft (observer) can see specific location (target) if a planetary body exist. Theory The observer can only see the specific target either when • No intersection of its view angle and the sphere • Within a virtual sphere centered at the observer with radius of the distance between the observer and the limb of the sphere • But not inside the sphere Sample Suppose a sphere at (-5, 0, 0) with radius of 3. Observer is assumed to be at (5, 0, 0) in this example. Point (-1.5, 0, 0) should be visible from the observer at (5, 0, 0). >>> print(isvisible([5, 0, 0], [-1.5, 0, 0,], [-5., 0, 0], 3)) True Point (-2.5, 0, 0) should not be visible from any observer because the point is inside the sphere >>> print(isvisible([5, 0, 0], [-2.5, 0, 0], [-5, 0, 0], 3)) False Point (10, 0, 0) should be visible, since the sphere is opposite direction for the observer. >>> print(isvisible([5, 0, 0], [10, 0, 0], [-5, 0, 0], 3)) True Point (-5, 3.001, 0) should not be visible, because it is below the horizon >>> print(isvisible([5, 0, 0], [-5, 3.001, 0], [-5, 0, 0], 3)) False Point (-10, 0, 0) should not be visible, because it is behind the sphere. >>> print(isvisible([5, 0, 0], [-10, 0, 0], [-5, 0, 0], 3)) False Return if the target is visible from the observer if there is a sphere. Parameters: • observer_xyz – Numpy array of observer location. Must be (3,) shape. • targets_xyz – Numpy array of target location. Must be (N, 3) shape. • sphere_center_xyz – Numpy array of sphere center. Must be (3,) shape. Returns: True if the target is visible. This is for evaluating multiple particles of visibility, i.e., parallelized version of isvisible(). Sample Suppose a sphere at (-5, 0, 0) with radius of 3. Observer is assumed to be at (5, 0, 0) in this example. • Point (-1.5, 0, 0) should be visible from the observer at (5, 0, 0). • Point (-2.5, 0, 0) should not be visible from any observer because the point is inside the sphere • Point (10, 0, 0) should be visible, since the sphere is opposite direction for the observer. • Point (-5, 3.001, 0) should not be visible, because it is below the horizon • Point (-10, 0, 0) should not be visible, because it is behind the sphere. >>> print(isvisible([5, 0, 0], [-1.5, 0, 0,], [-5., 0, 0], 3)) True >>> print(isvisible([5, 0, 0], [-2.5, 0, 0], [-5, 0, 0], 3)) False >>> print(isvisible([5, 0, 0], [10, 0, 0], [-5, 0, 0], 3)) True >>> print(isvisible([5, 0, 0], [-5, 3.001, 0], [-5, 0, 0], 3)) False >>> print(isvisible([5, 0, 0], [-10, 0, 0], [-5, 0, 0], 3)) False >>> xyz = np.array([[-1.5, 0, 0], [-2.5, 0, 0], [10., 0, 0, ], [-5, 3.001, 0], [-10, 0, 0]]) >>> print(arevisible([5, 0, 0], xyz, [-5, 0, 0], 3)) [ True False True False False] Return a (theta, phi) list of a sphere projected on a plane. Parameters: • sphere_location – (x, y, z) of the sphere. Returns: A pair (theta, phi). theta (and phi) is a numpy array with a size of (360,), or specified by the parameter resolution. These values are with the unit of radians. theta ranges [0, pi], and phi ranges [-pi, pi]. Raises: ValueError – if the sphere radius is larger than the distance to the sphere. (i.e., the observer at origin is inside the sphere) It is used for example, to make a all sky map for ions or ENAs, but also to plot the planet. >>> theta, phi = sphere_limb_plane_projection([300, 0, 1000], 300) >>> print(phi.shape) (360,) This gives the angles (theta and phi) of the planet at (300, 0, 1000) [km] with radius of 300 [km]. You get 360 points by default to be connected (or scatter plotted). The returned angles are in radians. The 100’th sampling point is shown as >>> print('{:.4f}'.format(phi[100])) 0.8962 >>> print('{:.4f}'.format(theta[100])) 0.3705 You can of course plot it >>> plt.plot(phi, theta, '.') Theory It is a combination of frame rotations. Sphere loated at (X, Y, Z) with radius R. Observer at the origin. Then, the projection to all sky map (theta, phi) is represented by theta = acos(z) phi = atan2(y, x) (x, y, z) = ((cos PHI, -sin PHI, 0), (sin PHI, cos PHI, 0), (0, 0, 1)) . ((cos THETA, 0, sin THETA), (0, 1, 0), (-sin THETA, 0, cos THETA)) . (sin theta0 cos alpha, sin theta0 sin alpha, cos theta0) PHI = atan2(Y, X) THETA = acos(Z / L) L = sqrt(X^2 + Y^2 + Z^2) theta0 = asin(R / L) alpha is the parameter to range from -pi to pi.
4,361
12,907
{"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.96875
3
CC-MAIN-2024-33
latest
en
0.770635
https://www.solutioninn.com/two-small-aluminum-spheres-each-having-mass-0.0250-kg-are
1,586,369,264,000,000,000
text/html
crawl-data/CC-MAIN-2020-16/segments/1585371821680.80/warc/CC-MAIN-20200408170717-20200408201217-00434.warc.gz
1,148,761,995
7,043
# Two small aluminum spheres, each having mass 0.0250 kg, are Two small aluminum spheres, each having mass 0.0250 kg, are separated by 80.0 cm. (a) How many electrons does each sphere contain? (The atomic mass of aluminum is 26.982 g/mol, and its atomic number is 13.) (b) How many electrons would have to be removed from one sphere and added to the other to cause an attractive force between the spheres of magnitude 1.00 X 104 N (roughly I ton)? Assume that the spheres may be treated as point charges. (c) What fraction of all the electrons in each sphere does this represent?
143
580
{"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-2020-16
latest
en
0.947468
http://www.notjustnumbers.co.uk/2013/10/
1,529,816,154,000,000,000
text/html
crawl-data/CC-MAIN-2018-26/segments/1529267866358.52/warc/CC-MAIN-20180624044127-20180624064127-00339.warc.gz
474,271,682
23,654
## Tuesday, 29 October 2013 ### Excel Tip: Finding the maximum or minimum value in a list Before we crack on with this week's post, just a quick little note about Mynda Treacy's Excel Dashboards course. I know that many of you have purchased the course and taken advantage of the early bird discount. As when we offered the course last time, the course has been very popular and the feedback has been excellent. If you haven't already done so, you can still get the course until 30th October and, although you have missed the discount, the course still represents excellent value and I will still throw in my Introduction to Pivot Tables course free of charge. You can get the course here. OK, on with this week's tip. We all know how to sum a list of numbers, but Excel offers a number of other functions for analysing a list, and today I want to introduce two of them that enable you to find the maximum or minimum value in a list. This could be useful for all sorts of reasons - finding the maximum sales in any particular month, or the lowest score achieved in a test, for example. Excel offers a simple way of doing this with the MAX and MIN functions. Both functions have the following syntax: =MAX(number1,number2,etc.) you can have as many numbers as you like in this list. So, for example: =MAX(23,45,12,65,21)  will return 65 and =MIN(23,45,12,65,21)  will return 12 These numbers can be cell references, or ranges of cells - and this is usually of far more practical use. So, say the cells A1 to A5 contain the numbers 23,45,12,65 and 21, then: =MAX(A1:A5)  will return 65 and =MIN(A1:A5)   will return 12 And that's really all you need to know. If you enjoyed this post, go to the top of the blog, where you can subscribe for regular updates and get two freebies "The 5 Excel features that you NEED to know" and "30 Chants for Better Charts". ## Tuesday, 22 October 2013 ### Excel Tip: Centre titles without merging Before we get into today's post, just a little reminder that the 20% discount offer on Mynda Treacy's Excel Dashboards course expires on Thursday. So if you've been thinking about it, now's the time to do something about it, if you want to save some money. Today's post is a follow-up to an earlier post, "Do you really need to merge those cells?" where I highlighted the dangers of merging cells. It became clear in some of the comments on forums that I had highlighted the problems but had been less than clear on alternatives. This post is intended to address that. Just to recap, the problems highlighted in that earlier post were: • Data containing merged cells can not be treated like a normal data table - meaning that we can't use all of the tools that we might want to use for referring to a properly formatted data table, such as pivot tables, SUMIF, etc; • Copying and pasting ranges is restricted to those with cells merged in the same way; • Fill down doesn't work if any of the cells in the range to be filled are merged; • Even if we unmerge all of the cells, this rarely solves the problem, as this action will assume that the merged cell contents should be placed in the top left cell of the unmerged range - which may not be where you want them to be. Also, having done this, it is often not clear where your data is, as the labels may now be in a completely different place. Now, by far the most common reason cells tend to be merged is when we are looking to centre titles across multiple columns. This is usually done be selecting the range of cells in the title row that we wish to centre the text across and clicking Merge & Center. Fortunately, Excel provides a very simple alternative to Merge & Center, but instead of placing a button for it prominently on the Home ribbon (Merge & Center is slap-bang in the middle of the Home ribbon), you need to go into the Alignment tab of the Format Cells dialogue box. You can access this by either clicking the little expansion arrow of the alignment section, just under Merge & Center, or by right-clicking the selected cells, selecting Format Cells and then the Alignment tab. However you get there - once you are on the Alignment tab, the first drop-down box under text alignment is labelled Horizontal. There is an option on this drop-down of Center Across Selection. Visually, this does exactly the same as Merge & Center but crucially, it does not merge the cells. It still leaves the content in the leftmost cell, but all of the other cells remain intact. One point to note, however, is that this is only possible horizontally, i.e. across the cells, unlike Merge & Center which will work vertically too. However the horizontal centring is far more common and this approach provides one less reason to merge cells. If you enjoyed this post, go to the top of the blog, where you can subscribe for regular updates and get two freebies "The 5 Excel features that you NEED to know" and "30 Chants for Better Charts". ## Tuesday, 15 October 2013 ### Excel Tip: Dashboards and Charts Mynda Treacy's excellent Excel Dashboards online course is once again open for registration and once again there is an excellent offer for those of you who don't hang about - more about that later in this post. Back in July, Mynda wrote a guest post for me on the subject of Excel Dashboards, which you can read here. This is becoming a very important skill and is often now required by employers. Mynda's post is a really good introduction and if, for whatever reason, you do not take up the offer on the training course, I would recommend that you at least read Mynda's guest post. Charts To celebrate the re-opening of Mynda's course, I have arranged to offer her eBook, 30 Chants for Better Charts, absolutely free to subscribers. Many of us use charts regularly in our work, but few of us do it well, and Mynda's eBook provides some excellent tips on how best to format charts so that they look professional and convey the information that they are supposed to, clearly. If you're not already a subscriber to Not Just Numbers, simply enter your name and email address in the box at the top right of the blog and you will receive Mynda's eBook, as well as other freebies, and updates on new posts to the blog. Excel Dashboards The Excel Dashboards course is video based and available online 24/7. It comes with comprehensive Excel workbooks and several sample dashboards to keep. There’s also an option to download the videos, plus Mynda personally provides support for the first 6 weeks of the 12 month membership. Dashboards are an incredibly valuable tool in today's market for consultants, analysts and managers, but Excel doesn't make it straightforward to build highly professional and interactive dashboards. That's why this type of training is crucial. What people are saying about the course: The previous classes have been a huge hit with many people saying how they love the cool techniques and how they've been able to impress their colleagues and clients by using them in all sorts of reports, not just dashboards. Others have said the course has prompted them to take a whole new approach to producing their monthly reports. I highly recommend the  course but don't take my word for it. You can read comments from past students and find out more here. Bonus 20% Off If you join the class by 24th October you can get it for 20% off plus I'll include my Introduction to Pivot Tables course absolutely free, just email me your receipt and I'll send you my bonus. So, do yourself a favour and check out the course . The price is incredibly fair, the course is awesome and it'll transform your Excel reports and possibly even your Excel career. Disclosure: I make a small commission for students who join Mynda's course, but as you know I don't just recommend anything and everything. It has to be of outstanding quality and value, and something I can genuinely recommend. After all, if doesn't live up to what I've promised you'll think poorly of me too and I don't want that. Oh, and just watching the course videos won't transform your career, you have to actually put it into practice, but then you know that. If you enjoyed this post, go to the top of the blog, where you can subscribe for regular updates and get your free report "The 5 Excel features that you NEED to know". ## Tuesday, 8 October 2013 Another quick tip this week. This time it is a little bugbear of mine that I often see done by people not realising the problems it can cause them later. It is really simple to get right if you know you need to! See if you can guess what it is from the image. If you can't, I would recommend that you read on. The problem is entering multi-row titles on any table of data. I am not just talking about the table feature in Excel, but any table of data, such as the one in the picture. In an earlier post I wrote about how to lay out data to make it useful. The table format above fits all of these requirements, but falls down on the headings. Simply because you have used more than one line for the heading, it won't work properly if you decide you want to use AutoFilter, or a PivotTable! This is really simple to avoid. You can type the heading on one row and then apply word wrap to the cells on that row (select "Wrap Text" from the Home ribbon). If you want specific line breaks in the text, you can use Alt+Enter to insert a line break within the cell. The data then fits all of the criteria to be used in a PivotTable, or to enable AutoFilter. That's it - I'll get off my soap box now! Don't forget that Mynda Treacy's Excel dashboards course will be available again soon for a short period of time. If you're not subscribed to the blog, do so now (at the top right of the blog) so that I can let you know when it's available - and to be notified of future Excel Tips. If you enjoyed this post, go to the top of the blog, where you can subscribe for regular updates and get your free report "The 5 Excel features that you NEED to know". ## Tuesday, 1 October 2013 ### Excel Tip: The power of NOW - Using the current time and date in Excel Just a short post today because I have a very tight deadline to meet on a publication I am writing for the ICAEW (The Institute of Chartered Accountants here in England) on Automating Management Accounts in Excel. Before we get into the post though, I have some exciting news for those of you who missed out on Mynda Treacy's Excel Dashboards course last time around. The course will be made available again for a limited time later this month. In the meantime, you can (re)read Mynda's guest post on the subject of Excel Dashboards here. If you want to make sure you don't miss out this time, ensure that you are subscribed to the blog as I will keep subscribers updated. If you are not a subscriber, you can do so by leaving your email address in the form at the top right of the blog. Today's post is a quick tip on how to use the current time and date in Excel. There are two very similar functions that Excel provides for this - NOW and TODAY. Both functions have no arguments but must still be followed by the (empty) brackets. =NOW() returns the current date and time =TODAY() returns the current date (actually it returns midnight at today's date) I covered how Excel handles dates and time in a post a couple of weeks ago. Looking at the functions in those terms - NOW returns the full serial number for the current date and time and TODAY returns that serial number rounded down to the nearest whole number, This functions can be used on their own, or as values in formulae, e.g using =TODAY()-A1 to calculate the elapsed time since the date in A1. One caution to add to using these functions is that the values only update when Excel recalculates. Assuming you have the default calculation settings in Excel, recalculation will occur when any value changes in the spreadsheet, and when the spreadsheet is opened. In most practical applications this is not a problem for the TODAY function unless the spreadsheet is open and unedited overnight. Obviously, it can be more of an issue with the NOW function. You can, however, use the F9 key to force a recalculation at any point. Right, back to Automating Management Accounts! If you enjoyed this post, go to the top of the blog, where you can subscribe for regular updates and get your free report "The 5 Excel features that you NEED to know".
2,786
12,437
{"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-2018-26
latest
en
0.936861
https://www.scribd.com/document/55205199/diseno-losa-maciza
1,537,905,720,000,000,000
text/html
crawl-data/CC-MAIN-2018-39/segments/1537267162385.83/warc/CC-MAIN-20180925182856-20180925203256-00149.warc.gz
874,326,375
20,372
DIVISION DE ESTUDIOS . DISEÑO DE LOSA MACIZA 1 0.25 m. 2 4.00 m. 0.25 m. 3 4.00 m. 0.25 m. DATOS: Fy = 4200 Kg/cm2 F’c = 210 Kg/cm2 S/C = 200 Kg/cm2 γcon = 2400 Kg/m3 P. Propio = 360 Kg/m2 a) Espesor de la Losa h= b) L 400 = = 0.15 m. 28 28 Cargas ultimas W= 1.5 CM + 1.8 CV CM= 360 + 100 = 460 Kg/m2 CV= 200 Kg/cm2 W= 1.50 (460 Kg/cm2) + 1.80 (200 Kg/m2) = 690 Kg/m2 + 360 Kg/m2 W= 1050 Kg/m2 W= 1.05 Ton/m2 MOMENTOS 70 cm 2 AS min = 0.0018 xbxh AS min = 0.98 cm 2 AS min = 2.m Momentos Positivos M+ = 1 1 WU Ln = (1.05 )( 4) 2 14 14 M + = 1.m ACERO MINIMO AS min = 0. Momentos Negativos M− = 1 1 WU Ln = (1.70 cm 2 (Temperatura) AS min = 2.20 Tn.36 cm 210 (100 )(12 .0018 x (100 ) x (15 ) AS min = 2.7 AS min = 0.98 cm 2 / m 4200 AS min = 2.36 ) = 2.53 Tn.98 cm 2 Momentos Negativos .7 f 'c b ⋅d fy d = 15 – 2 – 0.MUNICIPALIDAD PROVINCIAL DE SULLANA DIVISION DE ESTUDIOS .64 = 12.05 )( 4) 2 11 11 M − = 1. AS = 2.00 )(1. 1.20 Ton.47 cm 2 / m 2 > AS min = 2.MUNICIPALIDAD PROVINCIAL DE SULLANA DIVISION DE ESTUDIOS .05 )(1.m a= 0.10 Ton 2 .70 cm 2 / m < AS min = 2. ؽ ؽ Ø ½ @ 0.m a= 0.42 Ton 2 Vu = 2. Verificando por corte Corte en el apoyo 1 Vu = 1 ( 4.008 m. M − = 1.00 )(1.30 mt.05 m. Momentos Positivos M + = 1.K !! 1Ø ½” @ 0.006 m.05 m. AS = 3. 1.98 cm / m O.30 mt.42 Ton Corte en el apoyo 2 Vu = 1 ( 4.30 mt.98 cm 2 / m 1Ø ½” @ 0.15 ) = 2.05 ) = 2.53 Ton. !!!!!! .K.53 210 ⋅100 ⋅12 . MUNICIPALIDAD PROVINCIAL DE SULLANA DIVISION DE ESTUDIOS Vu = 2.36 ØV c = 8068 .29 ØV c = 8068 .53 f 'c ⋅b ⋅ d ØV c = Ø ⋅ 0..29 Ton .10 Ton ØV c = Ø ⋅ 0. Vu < Vc O.
822
1,575
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.09375
3
CC-MAIN-2018-39
latest
en
0.230516
https://www.holbeach.lewisham.sch.uk/blog/category/year-group-archive-2018-2018/3b-2018-2019/page/2/
1,656,527,347,000,000,000
text/html
crawl-data/CC-MAIN-2022-27/segments/1656103642979.38/warc/CC-MAIN-20220629180939-20220629210939-00443.warc.gz
876,289,918
13,784
## 3B – Horton Kirby 3B Had an exciting day at Horton Kirby, learning all about the life of an Evacuee during World War Two. We learned some information about the history of the village during the War and pretended that we were children from that period of history. We were taught a lesson in the 1940’s style, but had to leave the classroom when the air raid siren went! After visiting the air raid shelter, we went for a walk around the village, before trying out some traditional games in the playground. ## Year 3 Home Learning 25th April 2019 We practised ordering numbers. How many numbers can you make using these digits? 6     7    8 Put them in order from smallest to greatest. Our new topic is ‘Dig For Victory’. Practise these useful spellings (can you find out what the words mean?) Evacuation    Evacuee Ration         Rationing Air raid shelter   World War Two Choose a times table and write the ‘family’ for each fact e.g 6 x 2 = 12 So:  2 x 6 = 12,  12 ÷ 2 = 6 and 12 ÷ 6 =2
265
1,005
{"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.71875
4
CC-MAIN-2022-27
latest
en
0.925934
https://www.sparkcodehub.com/pandas-dataframe-sum-calculations
1,713,553,961,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296817442.65/warc/CC-MAIN-20240419172411-20240419202411-00464.warc.gz
885,121,323
17,667
# Calculating Sums in Pandas DataFrame: A Comprehensive Guide ## Introduction Pandas is a powerful data manipulation and analysis library for Python, widely used in data science and analytics. Among its many features, Pandas provides robust capabilities for calculating sums within DataFrame structures. In this guide, we'll explore various methods and techniques for performing sum calculations on Pandas DataFrames. ## Understanding Pandas DataFrames A DataFrame is a two-dimensional labeled data structure in Pandas, similar to a spreadsheet or SQL table. It consists of rows and columns, where each column can contain different data types (e.g., integers, floats, strings). DataFrame operations in Pandas are optimized for speed and efficiency, making it an excellent tool for data analysis and manipulation. ## Basic Sum Calculations Pandas provides a simple method for calculating the sum of values in a DataFrame column using the ` sum() ` function. Here's how you can use it: ``````import pandas as pd # Create a DataFrame df = pd.DataFrame({'A': [1, 2, 3, 4, 5]}) # Calculate the sum of values in column 'A' total_sum = df['A'].sum() print("Total sum:", total_sum) `````` This will output: ``Total sum: 15 `` ## Conditional Sum Calculations You can also perform sum calculations based on conditions using boolean indexing. For example, to calculate the sum of values in column 'A' where column 'B' is greater than 2: ``````conditional_sum = df[df['B'] > 2]['A'].sum() print("Conditional sum:", conditional_sum) `````` ## Group-wise Sum Calculations To calculate sums by groups in a DataFrame, you can use the ` groupby() ` function followed by the ` sum() ` function. For example, to calculate the sum of values in column 'A' grouped by values in column 'B': ``````grouped_sum = df.groupby('B')['A'].sum() print("Grouped sum:") print(grouped_sum) `````` ## Rolling Sums A rolling sum calculates the sum of a fixed window of values in a DataFrame. You can use the ` rolling() ` function followed by the ` sum() ` function to compute rolling sums. For example, to calculate a rolling sum over a window of size 3: ``````rolling_sum = df['A'].rolling(window=3).sum() print("Rolling sum:") print(rolling_sum) `````` ## Cumulative Sums Cumulative sums compute the running total of values in a DataFrame. You can use the ` cumsum() ` function to calculate cumulative sums. For example: ``````cumulative_sum = df['A'].cumsum() print("Cumulative sum:") print(cumulative_sum) `````` ## Handling Missing Values When performing sum calculations, it's essential to handle missing or NaN values appropriately. Pandas provides functions like ` fillna() ` or ` dropna() ` to handle missing values before performing sum calculations. ## Best Practices for Sum Calculations in Pandas DataFrames • Use vectorized operations whenever possible for faster calculations. • Be mindful of data types to avoid unintended results. • Handle missing values appropriately to ensure accurate calculations. • Test calculations on small subsets of data before applying them to larger datasets. • Consider the computational complexity of sum calculations when working with large datasets. ## Conclusion Calculating sums in Pandas DataFrames is a fundamental operation in data analysis and manipulation. Whether you need to compute basic sums, conditional sums, group-wise sums, or rolling/cumulative sums, Pandas provides efficient and flexible methods to meet your needs. By mastering sum calculations in Pandas, you'll be better equipped to handle a wide range of data analysis tasks with ease and efficiency.
794
3,615
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.203125
3
CC-MAIN-2024-18
latest
en
0.76085
https://brainmass.com/math/integrals/integration-standard-partition-and-integrable-over-a-range-8241
1,716,343,095,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971058525.14/warc/CC-MAIN-20240522005126-20240522035126-00689.warc.gz
118,658,954
6,875
Purchase Solution Integration: Standard Partition and Integrable over a Range Not what you're looking for? Please see the attached file for the fully formatted problems. Solution Summary Integration problems are solved. Solution Preview The endpoints of each interval in Pn, for the i-th interval are (i-1)/n on the LEFT and i/n on the RIGHT. L(f,Pn) is a sum of the areas of n rectangles, each of which has a height as large as possible without being greater than the function values over the interval--the height is the least upper bound over that interval. This means that for every rectangle (other than the last one) the height of the rectangle is determined by the LEFT side of each interval. The last rectangle for all n >= 4 will have a LEFT side of 3/4 or greater, but the RIGHT side equal to 3/4, due to the value of the function at x=0. So, the last rectangle has a height of 3/4. Also, note that the first interval, although its left side is 1/4, the rest of the interval includes function values ... Geometry - Real Life Application Problems Understanding of how geometry applies to in real-world contexts Exponential Expressions In this quiz, you will have a chance to practice basic terminology of exponential expressions and how to evaluate them. Know Your Linear Equations Each question is a choice-summary multiple choice question that will present you with a linear equation and then make 4 statements about that equation. You must determine which of the 4 statements are true (if any) in regards to the equation. Probability Quiz Some questions on probability Graphs and Functions This quiz helps you easily identify a function and test your understanding of ranges, domains , function inverses and transformations.
372
1,755
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.21875
3
CC-MAIN-2024-22
latest
en
0.906505
https://physics.stackexchange.com/questions/792145/effect-of-coaxial-cable-length-on-capacitive-discharge
1,716,054,303,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971057440.7/warc/CC-MAIN-20240518152242-20240518182242-00414.warc.gz
412,062,977
40,494
# Effect of Coaxial Cable Length on Capacitive Discharge Summary: If I have a Capacitive Discharge through a coaxial cable to some load, how does the length of the cable effect the current felt by the load? I believe that the schematic breakdown for this problem is a charged capacitor $$C_1$$ separated by a switch from a second capacitor $$C_2$$ (the capacitance of the coaxial cable), and the load $$R_1$$. All three loads are in parallel. From this, I believe the differential equation comes to: $$-C_1{dV/dt} = C_2{dV/dt} + {V/R_1}$$ which solves to $$V=\frac{Q}{C_1 + C_2}e^{-t/R(C_1+C_2)}$$ where the initial conditions would be at $$t=0$$, voltage is equal to the charge on the original capacitor. And at $$t=\infty$$, voltage goes to zero. This makes sense to me as the two 'capacitors' are added together in parallel in the circuit simplification. Then the current through the resistor as a function of time is $$V/R=\frac{Q}{R(C_1 + C_2)}e^{-t/\tau}$$ where $$\tau$$ is the time constant $$R(C_1+C_2)$$ Then assuming a linear relationship between coaxial length and capacitance, you can easily substitute $$C_2$$ for some $$LC_d$$. Here is where I am confused. It makes sense to me that the peak current is independent of the coax length. It makes sense to me that the time constant is dependent on coax length. But all the voltage, current, and charge curves are just simple exponential decays. When I shut the switch, doesn't the coaxial cable take some time to charge and then discharge? Shouldn't a plot of charge on $$C_2$$ be two competing exponentials? Theoretically, the coaxial cable should receive ALL the current initially and the resistor none, and then over time switch. I think part of the issue is in the ideal circuit. Each capacitor should have it's own associated resistance $$R_{C_1}, R_{C_2}$$ in series. But how would you even begin to solve that circuit theoretically? A coaxial cable is a transmission line. To describe the discharge process in complete detail, we need to deal with wave propagation along the transmission line, as modeled by the telegrapher's equations. In general, the process can be quite complicated, because there are signals propagating up and down the transmission line, getting partially reflected at both ends. If you are looking for a mathematical treatment of such circuits in time domain, this can be found in Chapter 3 of Foundations for Microwave Engineering, 2nd ed. by Robert E. Collin. The time it takes for the transmission line to "charge" can be described as the delay time $$T = \ell/v$$ of the transmission line, which is the time it takes for the initial voltage wave to reach the load resistance. Here, $$\ell$$ is the length of the transmission line and $$v$$ is the propagation speed, usually a little lower than the speed of light. After the switch is closed, there is a "negotiating period" during which both the capacitor and the load voltages will have oscillations due to signals bouncing back and forth, which will eventually die down. The duration of this period depends on $$T$$, the characteristic impedance $$Z_0$$ of the transmission line, and the load resistance $$R$$. During the first $$2T$$ after the switch is closed, the capacitor doesn't even "see" the load resistance: the transmission line just acts like a resistor with resistance $$Z_0$$, so the capacitor discharges with time constant $$Z_0C$$ during this time. Assuming $$R > Z_0$$, after the negotiation period, the voltage along the transmission line is roughly uniform, and the capacitor discharges as you describe. The effective capacitance of a "short" transmission line (meaning $$T \ll RC_1$$) is $$C_2 \approx \left(1 - \frac{Z_0^2}{R^2}\right)C'\ell$$ where $$C'=(vZ_0)^{-1}$$ is the capacitance per unit length of the transmission line. $$R=Z_0$$ is a special case where there is no reflection at the load, and the capacitor smoothly discharges through an effective resistance $$Z_0$$ the whole time. I would encourage you to set up the circuit in a simulator and play with the various parameters. Here is a screenshot from the free circuit simulator LTspice, showing the capacitor and load voltages (up) and currents (down) as a function of time after the switch is closed at $$t = 0.5\text{ ms}$$. • Ok this is a new subject for me, but I was able to find some resources to help me along and corroborate what you've said. How did you come about the 2T delay time though? Is that just the exponential decay/growth factor for ~75%. Or is it another physical property? Dec 14, 2023 at 22:30 • Disregard the clarification. I was confusing T for $\tau$. It takes two propagation times to go up and down the transmission line for the original capacitor to even be effected by the load resistance (i.e. current increasing/decreasing stepwise depending on the load size). Dec 14, 2023 at 22:38 • @Squatchis Yes, that's exactly right. – Puk Dec 14, 2023 at 22:46
1,217
4,931
{"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": 30, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.875
4
CC-MAIN-2024-22
latest
en
0.929379
https://jp.mathworks.com/matlabcentral/cody/problems/1502-perl-1-push/solutions/243729
1,590,797,951,000,000,000
text/html
crawl-data/CC-MAIN-2020-24/segments/1590347406785.66/warc/CC-MAIN-20200529214634-20200530004634-00558.warc.gz
408,180,939
15,536
Cody # Problem 1502. Perl 1: push Solution 243729 Submitted on 13 May 2013 by Michael C. 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 %% x = [1 2 3 4 5]; y = [6 7 8]; [x, num] = push(x, y); y_correct = [1 2 3 4 5 6 7 8]; num_correct = 8; assert(isequal(x,y_correct) & isequal(num, num_correct)); 2   Pass %% x = [1 2 3 4 5]; y = 6; [x, num] = push(x, y); y_correct = [1 2 3 4 5 6]; num_correct = 6; assert(isequal(x,y_correct) & isequal(num, num_correct)); 3   Pass %% x = [1 2 3 4 5]'; y = [6 7 8]; [x, num] = push(x, y); y_correct = [1 2 3 4 5 6 7 8]'; num_correct = 8; assert(isequal(x,y_correct) & isequal(num, num_correct)); 4   Pass %% x = []; y = [1 2 3]; [x, num] = push(x, y); y_correct = [1 2 3]; num_correct = 3; assert(isequal(x,y_correct) & isequal(num, num_correct)); 5   Pass %% x = [0.5 8.4 9.6]; y = [12.0 pi]; [x, num] = push(x, y); y_correct = [0.5 8.4 9.6 12.0 pi]; num_correct = 5; assert(isequal(x,y_correct) & isequal(num, num_correct));
443
1,090
{"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-2020-24
latest
en
0.402365
http://mail-archives.apache.org/mod_mbox/commons-issues/201110.mbox/%3C692384948.3211.1317652473928.JavaMail.tomcat@hel.zones.apache.org%3E
1,563,835,881,000,000,000
text/html
crawl-data/CC-MAIN-2019-30/segments/1563195528290.72/warc/CC-MAIN-20190722221756-20190723003756-00202.warc.gz
96,654,560
2,296
# commons-issues mailing list archives ##### Site index · List index Message view Top From "Gilles (Commented) (JIRA)" <j...@apache.org> Subject [jira] [Commented] (MATH-683) Create a method shift in the PolynomialFunction class Date Mon, 03 Oct 2011 14:34:33 GMT ``` [ https://issues.apache.org/jira/browse/MATH-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119334#comment-13119334 ] Gilles commented on MATH-683: ----------------------------- Yes, please attach everything that could be useful to figure out what is the required functionality. So, if I understand correctly, what you really request is the function that would compute the new coefficients ("bi"): {noformat} Ps(k) = Sum bi * k^i = Sum ai * (k + a)^i = P(k + a) {noformat} This functionality should probably go in the "PolynomialsUtils" class: {code} public static double[] shiftedPolynomialCoefficients(double[] c, double shift) { // ... } {code} > Create a method shift in the PolynomialFunction class > ----------------------------------------------------- > > Key: MATH-683 > URL: https://issues.apache.org/jira/browse/MATH-683 > Project: Commons Math > Issue Type: New Feature > Affects Versions: 3.0 > Environment: All > Reporter: DI COSTANZO > Priority: Trivial > > Create a method shift to transform a polynomial P(k) in P(k + a) where a is any double value. > The polynomial sum(ai * k^i) turns into sum(ai * (k+a)^i) -- This message is automatically generated by JIRA.
407
1,585
{"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-30
latest
en
0.640483
https://encyclopedia2.thefreedictionary.com/trivial+solution
1,571,734,000,000,000,000
text/html
crawl-data/CC-MAIN-2019-43/segments/1570987813307.73/warc/CC-MAIN-20191022081307-20191022104807-00080.warc.gz
473,231,908
11,949
# trivial solution ## trivial solution [¦triv·ē·əl sə′lü·shən] (mathematics) A solution of a set of homogeneous linear equations in which all the variables have the value zero. Mentioned in ? References in periodicals archive ? The uniqueness follows from the fact, that the corresponding homogeneous problem has only the trivial solution. Hence the proof. As our problem is linear, this question could be reformulated equivalently as follows: When the corresponding homogeneous problem has only trivial solution, i.e., when Since 0 < [alpha] < 2k + 1, we observe from Lemma 1 that (17) has only a trivial solution when t = 0. It follows that (22) has only trivial solution u [equivalent to] 0. In this section, based on Tian's work [20], we give a sufficient condition for the trivial solution of Problem (1) to be asymptotically stable. To prove the uniqueness, it is sufficient to show that the homogenous boundary value problem (1.2a)-(1.2b) has only trivial solution. Assume on the contrary that y(t) [not equivalent to] 0 is a solution of the homogenous boundary value problem (1.2a)-(1.2b). Note that the global stability of the trivial solution u = 0 of (20) is equivalent to the global stability of the infection-free equilibrium [P.sub.0] = ([S.sup.*], 0, 0). Next, we shall discuss the stability of the trivial solution of the stochastic differential equation (8). In the same way, one can calculate the same series solution around a = [infinity], which results in the trivial solution; all the coefficients are identically zero in this limit. The trivial solution of system (1) is said to be mean-square exponentially input-to-state stable if for every [mathematical expression not reproducible] and u(t) [member of] [l.sub.[infinity]] there exist scalars [[alpha].sub.0] > 0, [[beta].sub.0] > 0, and [[gamma].sub.0] > 0 such that the following inequality holds: Specifically, first the method involves yielding the large amplitude stable limit cycle, then decreasing speed with small stepsize to find smaller amplitude stable limit cycle, and decreasing speed stepwise until converging to the trivial solution (the trivial solution here is zero solution (as shown in Figure 3), which is different from periodical solution (as shown in Figure 11)). In order to obtain no trivial solution, it is necessary to propose that the determinant of (16) is zero, so Site: Follow: Share: Open / Close
568
2,405
{"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-2019-43
longest
en
0.885733
http://www.tpub.com/neets/book1/chapter3/1-28.htm
1,500,800,076,000,000,000
text/html
crawl-data/CC-MAIN-2017-30/segments/1500549424296.90/warc/CC-MAIN-20170723082652-20170723102652-00394.warc.gz
571,226,024
4,646
voltage source and a single resistor representing total resistance. This process is called reduction to an EQUIVALENT CIRCUIT. Figure 3-49 shows a parallel circuit with three resistors of equal value and the redrawn equivalent circuit."> Equivalent Circuits Custom Search Equivalent CircuitsIn the study of electricity, it is often necessary to reduce a complex circuit into a simpler form. Any complex circuit consisting of resistances can be redrawn (reduced) to a basic equivalent circuit containing the voltage source and a single resistor representing total resistance. This process is called reduction to an EQUIVALENT CIRCUIT.Figure 3-49 shows a parallel circuit with three resistors of equal value and the redrawn equivalent circuit. The parallel circuit shown in part A shows the original circuit. To create the equivalent circuit, you must first calculate the equivalent resistance.Figure 3-49. - Parallel circuit with equivalent circuit. Given:Solution:Once the equivalent resistance is known, a new circuit is drawn consisting of a single resistor (to represent the equivalent resistance) and the voltage source, as shown in part B.
231
1,146
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.9375
3
CC-MAIN-2017-30
longest
en
0.878571
https://gmatclub.com/forum/if-144-x-is-an-integer-and-108-x-is-an-integer-which-of-the-128415.html?kudos=1
1,508,352,419,000,000,000
text/html
crawl-data/CC-MAIN-2017-43/segments/1508187823067.51/warc/CC-MAIN-20171018180631-20171018200631-00350.warc.gz
701,350,837
58,689
It is currently 18 Oct 2017, 11:46 ### GMAT Club Daily Prep #### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email. Customized for You we will pick new questions that match your level based on your Timer History Track every week, we’ll send you an estimated GMAT score based on your performance Practice Pays we will pick new questions that match your level based on your Timer History # Events & Promotions ###### Events & Promotions in June Open Detailed Calendar # If 144/x is an integer and 108/x is an integer, which of the Author Message TAGS: ### Hide Tags Manager Joined: 12 Oct 2011 Posts: 131 Kudos [?]: 251 [1], given: 23 GMAT 1: 700 Q48 V37 GMAT 2: 720 Q48 V40 If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 01 Mar 2012, 10:08 1 KUDOS 7 This post was BOOKMARKED 00:00 Difficulty: 65% (hard) Question Stats: 53% (01:19) correct 47% (01:11) wrong based on 313 sessions ### HideShow timer Statistics If 144/x is an integer and 108/x is an integer, which of the following must be true? I. 9/x is an integer II. 12/x is an integer III. 36/x is an integer A. I only B. III only C. I and II only D. II and III only E. I, II and III [Reveal] Spoiler: OA Last edited by Bunuel on 15 Mar 2012, 03:39, edited 1 time in total. Edited the question Kudos [?]: 251 [1], given: 23 Director Status: Can't wait for August! Joined: 13 Sep 2011 Posts: 988 Kudos [?]: 351 [2], given: 109 Location: United States (MA) Concentration: Marketing, Strategy GMAT 1: 660 Q44 V37 GMAT 2: 680 Q45 V38 GMAT 3: 710 Q45 V42 GPA: 3.32 WE: Information Technology (Retail) Re: If 144/x is an integer and 108/x is an integer, which... [#permalink] ### Show Tags 01 Mar 2012, 10:36 2 KUDOS 36 is the greatest common factor for 144 and 108, so the greatest possible value of X = 36 so, only III is true for all values X Kudos [?]: 351 [2], given: 109 Math Expert Joined: 02 Sep 2009 Posts: 41888 Kudos [?]: 128752 [1], given: 12182 Re: If 144/x is an integer and 108/x is an integer, which... [#permalink] ### Show Tags 15 Mar 2012, 03:38 1 KUDOS Expert's post 2 This post was BOOKMARKED priyalr wrote: Hi, I didnt get this one. The q askes for which one of the following is an integer. So i plugged in nos. to see, and found that each option is has divisors. On what basis is the answer 36 as d qustn askes for "is an integer" and not greatest factor? Pls explain, Thnx If 144/x is an integer and 108/x is an integer, which of the following must be true? I. 9/x is an integer II. 12/x is an integer III. 36/x is an integer A. I only B. III only C. I and II only D. II and III only E. I, II and III The question asks which of the following MUST be true, not COULD be true. The largest possible value of x is 36, GCD of 144 and 108, and if x=36 then ONLY III is true. Check more Must or Could be True Questions to practice: search.php?search_id=tag&tag_id=193 Hope it helps. _________________ Kudos [?]: 128752 [1], given: 12182 Intern Joined: 03 Dec 2010 Posts: 22 Kudos [?]: 9 [0], given: 0 Re: If 144/x is an integer and 108/x is an integer, which... [#permalink] ### Show Tags 15 Mar 2012, 03:28 Hi, I didnt get this one. The q askes for which one of the following is an integer. So i plugged in nos. to see, and found that each option is has divisors. On what basis is the answer 36 as d qustn askes for "is an integer" and not greatest factor? Pls explain, Thnx Kudos [?]: 9 [0], given: 0 Manager Joined: 28 May 2009 Posts: 155 Kudos [?]: 264 [0], given: 91 Location: United States Concentration: Strategy, General Management GMAT Date: 03-22-2013 GPA: 3.57 WE: Information Technology (Consulting) If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 03 Feb 2013, 12:24 If $$\frac{144}{x}$$ is an integer, and $$\frac{108}{x}$$ is an integer, which of the following must be true? I. $$\frac{9}{x}$$ is an integer II. $$\frac{12}{x}$$ is an integer III. $$\frac{36}{x}$$ is an integer (A) I only (B) III only (C) I and II only (D) II and III only (E) I, II, and III Source: Gmat Hacks 1800 set. This is a repost, but the previous postings are still confusing. So the way I read this is "If $$\frac{144}{2}$$ is an integer and $$\frac{108}{2}$$ is an integer .." but that reasoning seems to be wrong, can someone explain why? Edit - I get it now. It's the "MUST BE TRUE" part that I forgot to factor into. Anyway, if you get that part, this is pretty easy question. _________________ Kudos [?]: 264 [0], given: 91 Intern Joined: 11 Jul 2013 Posts: 35 Kudos [?]: 2 [0], given: 35 Re: If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 26 May 2014, 04:32 the way i see is x can be 1 or 2 or 3 how do we decide whether 9/x , 12/x or 36/x is an integer if i chose x as 1 still {144}/{x} is an integer, and {108}/{x} is also an integer...same happens when i chose 2 but x as 1 and x as 2 given me differnt answer choices Kudos [?]: 2 [0], given: 35 Math Expert Joined: 02 Sep 2009 Posts: 41888 Kudos [?]: 128752 [0], given: 12182 Re: If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 26 May 2014, 06:32 tyagigar wrote: the way i see is x can be 1 or 2 or 3 how do we decide whether 9/x , 12/x or 36/x is an integer if i chose x as 1 still {144}/{x} is an integer, and {108}/{x} is also an integer...same happens when i chose 2 but x as 1 and x as 2 given me differnt answer choices x could be 1, 2, 3, 4, 6, 9, 12, 18 or 36 (these are common factors of 144 and 108). The question asks which of the options MUST be an integer. Now, only 36/x is an integer for all possible values of x. Does this make sense? Similar questions to practice: if-n-is-a-positive-integer-and-n-2-is-divisible-by-96-then-127364.html if-n-is-a-positive-integer-and-n-2-is-divisible-by-72-then-90523.html a-certain-clock-marks-every-hour-by-striking-a-number-of-tim-91750.html if-m-and-n-are-positive-integer-and-1800m-n3-what-is-108985.html if-x-and-y-are-positive-integers-and-180x-y-100413.html n-is-a-positive-integer-and-k-is-the-product-of-all-integer-104272.html if-x-is-a-positive-integer-and-x-2-is-divisible-by-32-then-88388.html if-n-and-y-are-positive-integers-and-450y-n-92562.html if-5400mn-k-4-where-m-n-and-k-are-positive-integers-109284.html Hope this helps. _________________ Kudos [?]: 128752 [0], given: 12182 GMAT Club Legend Joined: 09 Sep 2013 Posts: 16711 Kudos [?]: 273 [0], given: 0 Re: If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 13 Aug 2015, 05:27 Hello from the GMAT Club BumpBot! Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos). Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email. _________________ Kudos [?]: 273 [0], given: 0 CEO Joined: 17 Jul 2014 Posts: 2604 Kudos [?]: 394 [0], given: 182 Location: United States (IL) Concentration: Finance, Economics GMAT 1: 650 Q49 V30 GPA: 3.92 WE: General Management (Transportation) Re: If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 04 Nov 2015, 15:09 I attacked this question in a different way: prime factorization of 144 = 2*2*2*2*3*3 = so we have four 4's and two of 3's prime factorization of 108 = 2*2*3*3*3 = we have two of 2's and three of 3's. I 9/x is an integer. well, if x is 3*3 = then yes, 9/x is an integer. but if x is 2*2*3*3 = then 9/x is not divisible. since our question asks for must be true -> we know for sure that I is not true. Eliminate (A) I only, (C) I and II only, and (E) I, II, and III II 12/x is an integer well, if x is 2*2*3 = or 2*2 or 2*3 = then yes, 12/x is an integer, but x can be 3*3*2. since it is a must be true, we can eliminate E, and thus B is the answer. Kudos [?]: 394 [0], given: 182 Manager Joined: 09 Jun 2015 Posts: 100 Kudos [?]: 7 [0], given: 0 Re: If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 16 Mar 2016, 02:16 BN1989 wrote: If 144/x is an integer and 108/x is an integer, which of the following must be true? I. 9/x is an integer II. 12/x is an integer III. 36/x is an integer A. I only B. III only C. I and II only D. II and III only E. I, II and III highest common factor of 144 and 108 is 36. x can be any of the factors of 36. So if x is 36 then I and II are wrong. Kudos [?]: 7 [0], given: 0 Intern Joined: 12 Dec 2015 Posts: 19 Kudos [?]: 4 [0], given: 28 Re: If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 18 Mar 2016, 15:44 Hi guys, I still can't understand in which case I should use LCM and when GCF... Can you please rephrase the question the way that to solve it I would need to use LCM technique? Thanks! Kudos [?]: 4 [0], given: 28 GMAT Club Legend Joined: 09 Sep 2013 Posts: 16711 Kudos [?]: 273 [0], given: 0 Re: If 144/x is an integer and 108/x is an integer, which of the [#permalink] ### Show Tags 07 Jul 2017, 23:52 Hello from the GMAT Club BumpBot! Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos). Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email. _________________ Kudos [?]: 273 [0], given: 0 Re: If 144/x is an integer and 108/x is an integer, which of the   [#permalink] 07 Jul 2017, 23:52 Display posts from previous: Sort by
3,280
10,002
{"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}
3.921875
4
CC-MAIN-2017-43
latest
en
0.827382
http://mathpoint.blogspot.com/2006/08/5-problems.html
1,532,042,071,000,000,000
text/html
crawl-data/CC-MAIN-2018-30/segments/1531676591332.73/warc/CC-MAIN-20180719222958-20180720002958-00560.warc.gz
225,455,082
6,694
## Friday, August 25, 2006 ### 5 problems These problems were selected from the book "In Polya's Footsteps, Miscellaneous problems and Essays" by Ross Honsberger. Each problem requires different problem solving skills. It will be good to note down what was the thinking process behind each solution. 1) 4 consecutive even numbers are removed from the set A={1,2,...n} If the average of the remaining numbers is 51.5625, which 4 numbers are removed? 2) Suppose u and v are real numbers such that u+u^2+...+u^8+10u+^9=v+v^2+...+v^(10)+10v^(11)=8 Which is bigger? u or v? 3) Suppose a quadilateral ABCD has a circumcircle with centre O and incircle with centre I. Let E be the intersection of the diagonals AC and BD. Show that O, I and E are collinear. 4) Consider an acute triangle ABC. Suppose the median, angle bisector and altitude from A to BC cuts the angle BAC into 4 equal angles. What is the angle BAC? 5) Show that for any positive integer, there exists n consecutive integers such that none of which is an integral power of a prime.
275
1,050
{"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-2018-30
latest
en
0.939456
https://www.intechopen.com/chapters/67468
1,716,457,540,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971058614.40/warc/CC-MAIN-20240523080929-20240523110929-00296.warc.gz
725,233,607
157,443
Open access peer-reviewed chapter # A Pilot Fortran Software Library for the Solution of Laplace’s Equation by the Boundary Element Method Written By Submitted: 15 November 2018 Reviewed: 24 April 2019 Published: 06 May 2020 DOI: 10.5772/intechopen.86507 From the Edited Volume ## Numerical Modeling and Computer Simulation Edited by Dragan M. Cvetković and Gunvant A. Birajdar Chapter metrics overview View Full Metrics ## Abstract The boundary element method (BEM) is developed from the standpoint of software design. The Fortran language is used to produce a structured library for solving Laplace’s equation in various domain topologies and dimensions with generalised boundary conditions. Subroutines that compute the discrete Laplace operators, which are the core components for populating the matrices in the BEM, are developed. The main subroutines for solving Laplace’s equation in 2D, 3D and axisymmetric cases for open and closed boundaries are introduced. The methods are demonstrated on test problems. ### Keywords • boundary element method • Laplace’s equation • Fortran ## 1. Introduction The boundary element method (BEM) has established itself as an important numerical technique for solving partial differential equations (PDEs) over the last half century [1, 2]. It distinguishes itself from competing methods, such as the finite element method (FEM) [3] in that the latter method requires a mesh of the domain, whereas the BEM only requires a mesh of the boundary (of the domain). The BEM is not as widely applicable as the FEM, particularly in that it is much more of a struggle to apply the BEM to non-linear problems. However, for problems to which the boundary element method is viable, the advantage of only requiring a boundary mesh is a significant one; the BEM is likely to be more efficient but also the relative simplicity of meshing, and the method is easier to use and is more accessible. This advantage is more notable for exterior problems; the domain is infinite, and ‘domain methods’ such as the FEM require special treatment, but for the BEM, only a (finite) boundary mesh is required. Computational methods may be combined or coupled [2]. The boundary element method is derived through the discretisation of an integral equation that is mathematically equivalent to the original partial differential equation. The essential reformulation of the PDE that underlies the BEM consists of an integral equation that is defined on the boundary of the domain and an integral that relates the boundary solution to the solution at points in the domain. The former is termed a boundary integral equation (BIE), and the BEM is often referred to as the boundary integral equation method or boundary integral method. There are two classes of boundary element method, termed the direct and indirect method. The direct method is based on Green’s second theorem, whereas the indirect method is based on describing the solution in terms of layer potentials. In this work the direct boundary element method is developed. The simplest partial differential equation that is amenable to the BEM is Laplace’s equation: i=1N2φpxi2=0E1 where N is the dimension of the space or, more concisely, 2φ=0.E2 Laplace’s equation therefore acts as a model problem for developing the BEM. Laplace’s equation also has a number of applications; steady-state heat conduction, steady-state electric potential, gravitation and groundwater flow [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]. Initially, in this paper, the derivation of the direct boundary element method is introduced for the interior two-dimensional Laplace problem. The boundary element method is developed in Fortran for the 2D Laplace problem; then this is extended to axisymmetric three-dimensional problems and to both interior and exterior problems. The boundary element method can be extended to problems where the body being modelled is ‘thin’, like a screen or discontinuity, and these are also included. Test problems are applied to the codes, and the results are given for all problem classes. There are a number of studies on numerical error in the boundary element method [14, 15, 16]. There have been a number of works on coding the boundary element method [17, 18, 19]. The focus of this work is the algorithms and the software for solving Laplace problems by the BEM. As with the earlier works by the first author on Laplace and Helmholtz (acoustic) problems [20, 21, 22, 23, 24], this is about continuing with the development of a base library of methods and corresponding software. The codes and guides can be found on the first author’s website [25]. The codes have been developed in Fortran 77, but the language is just used to provide a simple template for exploring the methods and the organisation of coding. The algorithms and coding for Laplace’s equation considered in this work also provide a useful basis for the development of the BEM for other problems and add to the library of numerical software [26]. ## 2. The BEM and the 2D interior Laplace problem The Laplace equation provides a useful model problem for the boundary element method. The two-dimensional case is the simplest of these and is the best place to start to learn about the method. In this section the solution of Laplace’s equation in an interior domain by the direct BEM is outlined, and this also provides the foundation for the 3D BEM development in later sections. ### 2.1 Boundary integral equation formulation of the interior Laplace problem Laplace’s equation (2) governs the interior domain D enclosed by a boundary S. The solution must also satisfy a boundary condition, and it is important in terms of maintaining the generality of the method that this is in a general (Robin) form: αpφp+βpφnpp=fppS.E3 In the direct BEM, Laplace’s equation is replaced by an equivalent integral equation of the form: SGpqnqφqdSq+12φq=SGpqφqnqdSqpS,E4 SGpqnqφqdSq+φq=SGpqφqnqdSqpD.E5 The terminology nq represents the partial derivative of the function* with respect to the unit outward normal at point q on the boundary. The function G is known as Green’s function. Physically, G(p, q) represents the effect observed at point p of a unit source at point q. For the Laplace equation, Green’s function is denoted by G and is defined as Gpq=12πlnrE6 for two-dimensional Laplace problems, where r=qp. Integral Eqs. (4) and (5) can be derived from the Laplace equation by applying Green’s second theorem. The power of the formulation lies in the fact that Eq. (4) relates the potential φ and its derivative on the boundary alone; no reference is made to φ at points in the domain in this particular boundary integral equation. In a typical boundary value problem, we may be given φ(q), φqnq or a combination of such data on S. The boundary integral equation is a means of determining the unknown boundary function(s), followed by the domain solution from the given boundary data. ### 2.2 Operator notation Operator notation is a useful shorthand in writing integral equations. Moreover, it will be shown that it is a very powerful notation in that it clearly demonstrates the connection between the integral equation and the linear system of equations that results from its discretisation. Integral equations can always be written in terms of integral operators. For example, if ζ is a function defined on a (closed or open) boundary Г, then applying the following operation to ζ for all points p on Г ГGpqζqdSq=μppSE7 gives a function μ. This may be viewed as the application of an operator to the function ζ to return the function μ. More simply we may write Гp=μp.E8 In Eq. (8)L represents the integral operator, and the subscript (Г) refers to the domain of integration. Г is used as a variable, representing either a whole boundary or a part of the boundary. The other three important Laplace integral operators are defined as follows: Гp=ГGpqnqζqdSq,E9 MtζГpvp=vpГGpqζqdSq,E10 Гpvp=vpГGpqnqζqdSq,E11 where vp is any unit vector. In operator notation of the previous subsection, the integral equation formulation (3) can be written in the following form: M+12IφSp=LvSppS,E12 φp=LvSSpD,E13 where vq=φqnq. ### 2.3 Direct boundary element method For the direct boundary element method solution of the interior Laplace problem, that is, developed in this section, the initial stage involves solving boundary integral Eq. (4), returning (approximations to) both φ and ∂φ/∂n on S. The second stage of the BEM involved finding the solution at any chosen points in the domain D. The most straightforward method for solving integral equations like Eq. (4) is that of collocation. Collocation may be applied in a remarkably elementary form, which is termed C−1 collocation in this text since it is derived by approximating the boundary functions by a constant on each panel. In this subsection the C−1 collocation method is briefly outlined. To begin with, the boundary S is assumed to be expressed as a set of panels: SS=j=1nSj.E14 Usually the panels have a characteristic form and cannot represent a given boundary exactly. For example, a two-dimensional boundary can be approximated by a set of straight lines. In order to complete the discretisation of the integral equations, the boundary functions also need to be approximated on each panel. In this work, it is the characteristics of the panel and the representation of the boundary function on the panel that together define the element in the boundary element method. By representing the boundary functions by a characteristic form on each panel, the boundary integral equations can be written as a linear system of equations of the form introduced earlier. The term element refers not only to the form of ΔSj but also to the method of representing the boundary functions on ΔSj. The C−1 collocation method involves representing the boundary function by a constant on each panel: φpφj,vpvjpΔSj.E15 The substitution of representations of this form for the boundary functions in the integral equation reduces it to discrete form. The simplifications allow us to rewrite Eq. (11) as the approximation: j=1nM+12IeΔSj˜pφjj=1nLeΔSj˜pvjpS,E16 where e is the unit function (e 1). LeΔSj˜p, for example, for a specific point p, are the numerical values of definite integrals that together can be interpreted as the discrete form of the L integral operator. The constant approximation is taken to be the value of the boundary functions at the representative central point (the collocation point) on each panel. By finding the discrete forms of the relevant integral operators for all the collocation points, a system of the form j=1nM+12IeΔSj˜pSiφjj=1nLeΔSj˜pSivjpSiS,E17 for i = 1, 2 and n is obtained by putting p=pSi in the previous approximation. Note that because of the approximation of the boundary functions (and also the boundary approximation, if applicable), the discrete equivalent of Eq. (12) is an approximation relating the exact values of the boundary functions at the collocation points. This system of approximations can now be written in the matrix-vector form: MSS+12Iφ̂¯S=LSSv̂¯S,E18 with the matrix components defined by LSSij=LeΔSj˜pSi,MSSij=MeΔSj˜pSi. The vectors φ̂¯S and v̂¯S are representative or approximate values of φ and v at the collocation points. In the first stage of the boundary element, the system (18) is solved alongside the discrete form of the boundary condition (3): αiφi+βivi=fifori=1,2,n.E19 The discrete forms are definite integrals that need to be computed usually by numerical integration. For the solution of Eqs. (18) and (19), the (approximation to) boundary data is known at the collocation points. Once the (approximations to) functions on the boundary are known, after completing the initial stage of the boundary element method, the domain solution can be found. In the case of the interior Laplace problem, Eq. (13) will yield the domain solution. Similarly, the discrete equivalent of Eq. (11) may be derived: φpDi=j=1nLeΔSj˜pDiv̂jj=1nMeΔSj˜pDiφ̂jpDiD,E20 for each point pDi in the domain D. Let the solution be sought at m domain points pDi for i=1,2,m, and then the equation above, for all the domain points, is written as φ̂¯D=LDSv̂¯SMDSφ̂¯S,E21 where LDSij=LeΔSj˜pDi,MDSij=MeΔSj˜pDi. ### 2.4 LIBEM2 and L2LC modules, test problem and results This section includes an outline of the Laplace interior BEM 2D (LIBEM2) and Laplace 2D linear boundary approximation constant element (L2LC) modules, and they are demonstrated by means of a test problem. The LIBEM2 module solves Laplace’s equation in an interior two-dimensional domain. L2LC is the most important component module. L2LC. The L2LC module computes the discrete Laplace operators for two-dimensional problems. In the notation of this article, the routine computes LeΔSj˜p, MeΔSj˜p,MteΔSj˜p and NeΔSj˜p, where ΔSj is the panel that is the domain of integration and p is any point. The call to the subroutine has the following form: SUBROUTINE L2LC(P,VECP,QA,QB,LPONEL, LVALID,EGEOM,LFAIL, * NEEDL,NEEDM,NEEDMT,NEEDN,L0,M0,M0T,N0), where P is point p; VECP is a unit directional vector that passes through p; QA and QB are the points, either side of the panel and hence defining the panel; LPONEL is a logical switch that declares whether p is on the panel; and NEEDL is a logical switch that states whether the discrete L operator is required and similar to the other operators. The computed values for the integrals are output in L0, M0, M0T and N0. For the straightforward direct BEM, developed in the previous section, only Land M operators are required. In general L2LC simply implements a Gaussian quadrature rule in order to determine the integral, using a higher-order rule when point p is close to the panel ΔSj. However, when point p is on the panel, then an exact integration is used [21, 22]. LIBEM2. The LIBEM2 module solves the interior Laplace problem and has the following form: LIBEM2(MAXNODES,NNODE,NODES,MAXPANELS,NPANEL,PANELS, * MAXPOINTS,NPOINT,POINTS, * SALPHA,SBETA,SF,SINPHI,PINPHI, * LSOL,LVALID,TOLGEOM, * SPHI,SVEL,PPHI, * L_SS,M_SSPMHALFI,L_PS,M_PS, * PERM,XORY,C,workspace) The boundary is set up through listing a set of nodal coordinates, and each panel is determined through the two nodal indices for the endpoints of the panel. The nodal coordinates are input through NODES and the panel information through PANELS. The nodes are oriented clockwise on each panel for an outer boundary and anticlockwise for any inner boundary. Usually, a solution in the domain is sought, and for this a set of (interior) domain points are set in POINTS. The boundary condition is set with the parameters SALPHA, SBETA and SF, setting αi, βi and fi values in Eq. (19) for each panel. Test problem. The test problem is that of solving Laplace’s equation on a unit square with the boundary conditions defined as shown in Figure 1. The solution is sought at the five interior points (0.25, 0.25), (0.75, 0.25), (0.25, 0.75), (0.75, 0.75) and (0.5, 0.5), and these are also illustrated in the figure. The test problem is set up in the file LIBEM2_T.FOR. The boundary is defined by 32 nodes and panels. The nodes are indexed, starting with 1: (0.0, 0.0), 2: (0.0, 0.125), 3: (0.0, 0.25) and continue clockwise around the boundary until the final node 32: (0.125, 0.0). The panels are similarly set up in the clockwise sense with panel 1:1–2 (panel 1 links node 1 with node 2) and 2:2–3 until the final panel 32:32–1, linking the final node with the first node to complete the boundary. The boundary conditions shown in Figure 1 are then applied. The exact solution is φp=10+10x; this is clearly a solution of Laplace’s equation and satisfies the boundary conditions. The exact solution at the interior points is therefore φ=12.5 at the two points on the left, φ=17.5 at the two points on the right and φ=15.0 at the central point. The exact and computed results are shown in Table 1. IndexPointExactComputed (5 d.p.) 1(0.25, 0.25)12.512.49568 2(0.75, 0.25)17.517.50432 3(0.25, 0.75)12.512.49568 4(0.75, 0.75)17.517.50432 5(0.5, 0.5)15.015.00000 ### Table 1. The results from the two-dimensional interior problem. A set of nodal coordinates and each panel is determined through the two nodal indices for the endpoints of the panel. The results from this test problem are also intuitively correct. With the left and right sides of the square at different potentials, it is common sense to expect the potential in the middle to be halfway between etc. The potentials can—most simply—be interpreted as temperatures in a steady-state heat conduction problem. ## 3. The BEM and 3D Laplace problems In this section, the boundary element method—introduced for two-dimensional problems in the previous section—is extended to include three-dimensional problems in this section. In this section, the three-dimensional boundary may be general, but the special case of axisymmetric problems is also developed in the modules LBEM3 and LBEMA. The modules can solve interior and exterior Laplace problems. For interior three-dimensional problems, the basic integral formulation is the same as for 2D problems (12) and (13), except that Green’s function for three-dimensional Laplace problems is Gpq=14πr,E22 where r is the distance between points p and q and the integrals are over surfaces rather than lines. The equations for the exterior problem are the same as for the interior problem, but for some changes of sign M12IφSp=LvSppS,E23 φp=SLvSpE.E24 For general three-dimensional problems, the simplest elements are triangular panels, and for axisymmetric problems, they are lateral sections of a cone, with surface functions approximated by a constant on each panel. ### 3.1 LBEMA and L3ALC modules, test problems and results Let us start on the introduction of three-dimensional problems with the axisymmetric codes. These codes are used in a very similar manner. As with the two-dimensional problem, the component module L3ALC computes the integrals over the panels and is called as follows: SUBROUTINE L3ALC(P,VECP,QA,QB,LPONEL,LVALID,EGEOM,LFAIL, * NEEDL,NEEDM,NEEDMT,NEEDN,DISL,DISM,DISMT,DISN). For axisymmetric problems, the surface is defined by conical panels, which are defined by piecewise straight lines along the generator. The parameters follow a similar pattern as L2LC, except the points and vectors are in cylindrical rz coordinates. QA and QB are the two points either side of the panel on the generator. The LBEMA subroutine computes the solution of the Laplace equation by the direct boundary element method and has the following form: LBEMA(MAXNODES,NNODE,NODES,MAXPANELS,NPANEL,PANELS, * LINTERIOR,MAXPOINTS,NPOINT,POINTS, * SALPHA,SBETA,SF,SINPHI,PINPHI, * LSOL,LVALID,TOLGEOM, * SPHI,SVEL,PPHI, * L_SS,M_SSPMHALFI,L_PS,M_PS, * PERM,XORY,C,workspace) In LBEMA, NODES lists the rz coordinates of the nodes on the generator of the surface, and PANELS states the two nodes that together define each panel. LINTERIOR is a logical input, which is set to TRUE if an interior problem is to be solved and FALSE for an interior problem. The interior test problem is in file LBEMA_IT. The test problem is the unit sphere with the exact solution: φ=r22z2,E25 which is easily shown to be a solution of Laplace’s equation by writing r2=x2+y2. A Dirichlet boundary condition is applied; the solution is sought at four interior points, and the results for 18 elements are given in Table 2. IndexPointExactComputed (4 d.p.) 1(0.0, 0.0)0.0−0.0013 2(0.0, 0.5)−0.5−0.4995 3(0.0, −0.5)−0.5−0.4995 4(0.5, 0.0)0.250.2477 ### Table 2. The results from the axisymmetric interior problem. The exterior test problem is in file LBEMA_ET. The test problem is the unit sphere (approximated by 18 elements) with the exact solution: φ=1r,E26 where r is the distance from the origin. φ is a solution of Laplace’s equation as it is a simple multiplication of Green’s function (22). A Dirichlet boundary condition is applied to the upper hemisphere, and a Neumann boundary condition is applied on the lower hemisphere. The solution is sought at four interior points, and the results are given in Table 3. IndexPointExact (4 d.p.)Computed (4 d.p.) 1(0.0, 2.0)0.50.4986 2(1.0, 1.0)0.70710.7051 3(0.0, 100.0)0.01000.0100 ### Table 3. The results from the axisymmetric exterior problem. ### 3.2 LBEM3 and L3LC modules, test problems and results The LBEM3 and L3LC subroutines implement the boundary element method for general three-dimensional problems. As with the two-dimensional and axisymmetric codes, the component module L3LC computes the integrals over the panels. The L3LC subroutine is called as follows: SUBROUTINE L3LC(P,VECP,QA,QB,QC,LPONEL,LVALID,EGEOM,LFAIL, * NEEDL,NEEDM,NEEDMT,NEEDN,DISL,DISM,DISMT,DISN) The parameters follow a similar purpose as did in the L2LC, except that the points and vectors have three values. QA, QB and QC are the coordinates of the vertices of the triangular panel. The LBEM3 module solves Laplace’s equation in a general interior or exterior three-dimensional domain and is called as follows: LBEM3(MAXNODES,NNODE,NODES,MAXPANELS,NPANEL,PANELS, * LINTERIOR,MAXPOINTS,NPOINT,POINTS, * SALPHA,SBETA,SF,SINPHI,PINPHI, * LSOL,LVALID,TOLGEOM, * SPHI,SVEL,PPHI, * L_SS,M_SSPMHALFI,L_PS,M_PS, * PERM,XORY,C,WKSPC1,WKSPC2,WKSPC3) As with LIBEM2 and LBEMA, NODES and PANELS define the boundary. However, in this case, NODES lists the three coordinates of each surface node, and PANELS lists the three nodal indices that make up each triangular panel. The interior test problem is that of a unit sphere approximated by 36 triangular panels. The exact solution that is applied as a Dirichlet boundary condition is φ=x+y+z.E27 The results at four interior points are given in Table 4. IndexPointExactComputed (4 d.p.) 1(0.5, 0.0, 0.0)0.50.4772 2(0.0, 0.5, 0.0)0.50.4836 3(0.0, 0.0, 0.5)0.50.4817 4(0.1, 0.2, 0.3)0.60.5802 ### Table 4. The results from the three-dimensional interior problem. The exterior test problem is that of a unit sphere approximated by 36 triangular panels, as in the previous test. The exact solution that is applied as a Dirichlet boundary condition is φ=1r,E28 where ris the distance from 000.5. The results at four exterior points are given in Table 5. IndexPointExact (4 d.p.)Computed (4 d.p.) 1(2.0, 0.0, 0.0)0.48510.4969 2(0.0, 4.0, 0.0)0.24810.2536 3(0.0, 0.0, 8.0)0.13330.1360 4(2.0, 2.0, 2.0)0.31230.3189 ### Table 5. The results from the three-dimensional exterior problem. ## 4. The solution of the 3D Laplace equation around a thin shell Let us now consider the integral equation formulation for thin shells. An illustration of a typical problem of a hollow hemispherical cap is illustrated in Figure 2. In the traditional boundary element method, the boundaries are closed. This analysis and software design extends the boundary element method to open boundaries or discontinuities in the potential field. In this section, the integral equations that are a reformulation of Laplace’s equation surrounding a thin shell are stated. Fortran codes that implement the boundary element method for axisymmetric and general three-dimensional problems are outlined in this section and demonstrated on simple test problems, similar to the modelling of the steady-state electric field in a capacitor in Kirkup [9]. ### 4.1 Integral equations and boundary element equations for thin shells Following the work of Warham [27], the first step is to designate an ‘upper’ and ‘lower’ surface of a shell Γ and denote them by ‘+’ and ‘−’. We then introduce the quantities of difference and average of the potential and its normal derivative across the surface: δp=φp+φp+pΓ,E29 Φp=12φp++φp+pΓ,E30 νp=vp++vp+pΓ,E31 Vp=12vp+vp+pΓ.E32 The integral equation formulations for the Laplace equation in the exterior domain can now be written using the operator notation introduced earlier: φp=ΓpΓppE,E33 Φp=ΓpΓppΓ,E34 Vp=ΓpMtνΓppΓ.E35 The boundary condition may be expressed in the following form: αpδp+βpνp=fppΓ,E36 ApΦp+βpVp=FppΓ.E37 The discrete equivalents of Eq. (21) are as follows: φ̂¯E=Mδ̂¯ΓLν̂¯Γ,E38 Φ̂¯Γ=MΓΓδ̂¯ΓLΓΓν̂¯Γ,E39 V̂¯Γ=NΓΓδ̂¯ΓMΓΓtν̂¯Γ.E40 ### 4.2 LSEMA module, test problem and results The LSEMA subroutine computes the solution of Laplace’s equation surrounding thin shells or discontinuities. As with the LBEMA, the subroutine relies on L3ALC to compute the matrix components in the systems (38)–(40). In this subsection, the LSEMA routine is demonstrated through solving a test problem. The module LSEMA has the form: LSEMA(MAXNODES,NNODE,NODES,MAXPANELS,NPANEL,PANELS, * MAXPOINTS,NPOINT,POINTS, * HA,HB,HF,HAA,HBB,HFF, * HIPHI,HIVEL,PINPHI, * LSOL,LVALID,TOLGEOM, * PHIDIF,PHIAV,VELDIF,VELAV,PPHI, * AMAT,BMAT,L_EH, M_EH, * PERM,XORY,C,WKSPC1,WKSPC2,WKSPC3). The LSEMA parameters are similar to the LBEMA ones. However the expressions of the boundary condition and the boundary function are different. HA stores the values of α on the shell panels, similarly HB, β; HAA, A; and HBB, B. The main output from the subroutine is PHIDIF that corresponds to δ̂¯Γ; PHIAV, Φ̂¯Γ; VELDIF, ν̂¯Γ; VELAV, V̂¯Γ; and PPHI, φ̂¯E. The test problem is in file LSEMA_T. It consists of two circular coaxial parallel plates in the r,θplane, of radius 1.0 and a distance of 0.1 apart in the planes where z=0.0 and z=0.1. A Dirichlet boundary condition is applied to both plates. On the plate at z=0.0, the potential of 0.0 is applied, and a potential (δ = 0, Φ=0) of 1.0 is applied on the other plate (δ = 0, Φ=1). A complete analytic solution is not available. However in the central region between the plates, a simple gradient of potential is intuitive, as discussed. The results from the test problem are listed in Table 6. IndexPointExpected (4 d.p.)Computed (4 d.p.) 1(0.0, 0.025)0.250.2495 2(0.0, 0.05)0.50.5000 3(0.0, 0.075)0.750.7506 ### Table 6. The results from the axisymmetric shell problem. ### 4.3 LSEM3 module, test problem and results The LSEM3 module solves Laplace’s equation exterior to a thin shell in three dimensions. The subroutine call has the following form: LSEM3(MAXNODES,NNODE,NODES,MAXPANELS,NPANEL,PANELS, * MAXPOINTS,NPOINT,POINTS, * HA,HB,HF,HAA,HBB,HFF, * HINPHI,HINVEL,PINPHI, * LSOL,LVALID,TOLGEOM, * PHIDIF,PHIAV,VELDIF,VELAV,PPHI, * AMAT,BMAT,L_EH,M_EH, * PERM,XORY,C,WKSPC1,WKSPC2,WKSPC3) The definition of the important parameters can be found from the previous notes on LBEM3 and LSEMA. The test problem is in the file LSEM3_T, and it is similar to the test problem for LSEMA. This time, the open boundaries are two unit square plates of in xy planes. The two squares are 0.1 apart: one is at a potential of zero and the other is at a potential of one. The squares are each divided into 32 panels. The results at points between the squares, along a central axis, are shown in Table 7. IndexPointExpected (4 d.p.)Computed (4 d.p.) 1(0.5, 0.5, 0.1)0.10.0962 2(0.5, 0.5, 0.3)0.30.02994 3(0.5, 0.5, 0.5)0.50.5000 4(0.5, 0.5, 0.7)0.70.7006 5(0.5, 0.5, 0.9)0.90.9041 ### Table 7. The results from the three-dimensional shell problem. ## 5. Conclusions In this paper a design of a software library has been set out and implemented in Fortran. In taking a ‘library’ approach, components can be developed that can be shared. There is, therefore, an overall reduction in coding, in line with good software engineering practice. For the three-dimensional problems, it is shown how exterior problems can be solved with the same code as interior problems. It is also shown how the core discrete operator components can be reused for codes solving problems in the same dimensional space. The method for solving the linear system of equations can also often be shared, as with LU factorisation, applied in these codes. A test problem has been developed in order to demonstrate each code. The library of codes and the way they are linked are set out in Appendix. There are several areas for further development. It is good for software engineering also to widen participation to provide strong validation in the BEM, so that errors, for example, in the boundary mesh are noted before executing the BEM. In this work the validation is developed through the VGEOM* modules. In this paper, the BEM codes have been applied to a set of simple test problems. It would be useful if a standard library of test problems emerged, so that all existing and future codes can be benchmarked against the same tests, with information such as error and processing time. More complex geometries—such as multiple surfaces in exterior problems or cavities in the domain for interior problems—would benefit from standard test problems. The codes are also adaptable to problems in which there is an existing field that the boundary and boundary conditions modify (via the *INPHI and *INVEL parameters), but these have not been tested. Central to the efficiency of the method, as the number of elements increases, is the method for solving the linear system of equations and the method of storing the matrices. Computing the matrices in the BEM takes On2 time and memory. Solving the linear system by a direct method, like LU factorisation used in this work, takes On3 time. Hence, in order to scale up the method, LU factorisation needs to be replaced by an interative method, and methods of storing and computing the matrices may also become an issue. In the software engineering approach in this work, a generalised form of the boundary condition is also operational, and interior and exterior problems in 3D are dealt with in the same code. Further generality may be achieved by forming a hybrid of the method that allows both open and closed surfaces [28, 29, 30]. The main codes for solving Laplace problems by the boundary element method in this work are LIBEM2 for the two-dimensional problem interior to a closed boundary, LBEM3 for the general three-dimensional problem interior or exterior to a closed boundary, LBEMA for the axisymmetric three-dimensional problem interior or exterior to a closed boundary, LSEM3 for the general three-dimensional problem exterior to an open boundary and LSEMA for the axisymmetric three-dimensional problem exterior to an open boundary. The linkage between these and the supporting codes in the library is shown in Table 8. File/codePurpose of moduleLIBEM2LBEMALBEM3LSEMALSEM3 L2LCComputes the discrete Laplace operators (2D)X L3ALCComputes the discrete Laplace operators (axisym)XX L3LCComputes the discrete Laplace operators (3D)XX GLS2Solves a generalised linear system of equationsXXXXX LUFACCarries out LU factorisation of the matrixXXXXX LUFBSUBCarries out forward and back substitutionXXXXX GEOM2DGeometrical operations (2D)XXX GEOM3DGeometrical operations (3D)XXXX GLT77-point Gaussian quadrature rule for triangleXX GLT2525-point Gaussian quadrature rule for triangleXX VGEOM2Verifies the geometry (2D)X VGEOMAVerifies the geometry (axisym)XX VGEOM3Verifies the geometry (3D)XX VG2LCVerifies the use of the L2LC moduleX L3ALCCCopy of L3ALC (to fake recursion)XX ### Table 8. The main codes and supporting library. The main subroutines have the control parameters LSOL, LVALID and TOLGEOM. LSOL is set to TRUE if the full solution is sought and FALSE if the linear system is the output. LVALID is set to TRUE if validation is required and FALSE if it is not. TOLGEOM sets the geometrical tolerance. The GLS algorithm in file GLS2 carries out a column-swapping method [31] in order to prepare the linear system for solution by a standard method. The standard method in this work is LU factorization and back substitution in files LUFAC and LUFBSUBS. ## References 1. 1. Wrobel LC, Aliabadi MH. The Boundary Element Method, Applications in Thermo-Fluids and Acoustics. Chichester, UK: John Wiley & Sons; 2002 2. 2. Li ZC. Combined Methods for Elliptic Equations with Singularities, Interfaces and Infinities. Vol. 444. Boston, London: Kluwer Academic Publishers; 1998 3. 3. Lindgren LE. From Weighted Residual Methods to Finite Element Methods. Available from: https://www.ltu.se/cms_fs/1.47275!/mwr_galerkin_fem.pdf [Accessed: 10 April 2019] 4. 4. Gato C. Detonation-driven fracture in thin shell structures: Numerical studies. Applied Mathematical Modelling. 2010;34:3741-3753 5. 5. Semwogerere T. Application analysis of the curved elements to a two-dimensional Laplace problem using the boundary element method. International Journal of Applied Physics and Mathematics. 2015;5:167-176 6. 6. Seydou F, Seppanen T, Ramahi O. Numerical solution of 3D laplace and helmholtz equations for parallel scatterers. In: Proceedings of the Antennas and Propagation Society International Symposium; Washington, DC, USA: IEEE; 2005. pp. 6-9 7. 7. Shahbazi M, Mansourzadeh S, Pishevar AR. Hydrodynamic analysis of autonomous underwater vehicle (AUV) flow through boundary element method and computing added-mass coefficients. International Journal of Artificial Intelligence and Mechatronics. 2015;3:212-217 8. 8. Weber C. Electron Energy Loss Spectroscopy with Plasmonic Nanoparticles. Graz, Austria: Karl-Franzens-Universität Graz; 2011 9. 9. Kirkup SM. DC capacitor simulation by the boundary element method. Communications in Numerical Methods in Engineering. 2007;23:855-869 10. 10. Cunderlik R, Mikula K, Mikula K. A comparison of the variational solution to the Neumann geodetic boundary value problem with the geopotential model. Contributions to Geophysics and Geodesy. 2004;34:209-225 11. 11. Sklyar O, Kueng A, Kranz C, Mizaikoff B, Lugstein A, Bertagnolli E, et al. Numerical simulation of scanning electrochemical microscopy experiments with frame-shaped integrated atomic force microscopy: SECM probes using the boundary element method. Analytical Chemistry. 2005;77:764-771 12. 12. Nkurunziza D, Kakuba G, Mango JM, Rugeihyamu SE, Muyinda N. Boundary element method of modelling steady state groundwater flow. Applied Mathematical Sciences. 2014;8:8051-8078 13. 13. Hashemi AR, Pishevar AR, Valipouri A, Pǎrǎu EI. Numerical and experimental study on the steady cone-jet mode of electro-centrifugal spinning. Physics of Fluids. 2018;30:114108 14. 14. Kirkup SM, Henwood DJ. An empirical error analysis of the boundary element method applied to Laplace’s equation. Applied Mathematical Modelling. 1994;18:32-38 15. 15. Hu H. An analysis of double Laplace equations on a concave domain. An Anal Double Laplace Equations a Concave Domain. 2018;6:304-314 16. 16. Menin OH, Rolnik V. Relation between accuracy and computational time for boundary element method applied to Laplace equation. Journal of Computational Interdisciplinary Sciences. 2013;4:1-6 17. 17. Fiala P, Rucz P. NiHu: An open source C++ BEM library. Advances in Engineering Software. 2014;75:101-112 18. 18. Wieleba P, Sikora J. Open source BEM library. Advances in Engineering Software. 2009;40:564-569 19. 19. Kumara PK. A MATLAB code for three dimensional linear elastostatics using constant boundary elements. International Journal of Advanced Engineering. 2012;2:9-20 20. 20. Kirkup SM, Yazdani J. A gentle introduction to the boundary element method in Matlab/freemat. In: Proceedings of the WSEAS MAMECTIS; Corfu, Greece; 2008 21. 21. Kirkup SM. Fortran codes for computing the discrete Helmholtz integral operators. Advances in Computational Mathematics. 1998;9:391-404 22. 22. Kirkup SM. The Boundary Element Method in Acoustics. Hebden Bridge: Integrated Sound Software; 1998 23. 23. Kirkup SM. The boundary element method in excel for teaching vector calculus and simulation. World Academy of Science, Engineering and Technology, International Science Index 144, International Journal of Social, Behavioral, Educational, Economic, Business and Industrial Engineering. 2019;12:1605-1613 24. 24. Kirkup SM. The boundary element method in acoustics: A survey. Applied Sciences. 2019;9:1642-1690 25. 25. Kirkup SM. Boundary Element Method. Available from: www.boundary-element-method.com [Accessed: 11 January 2018] 26. 26. Shaukat K, Tahir F, Iqbal U, Amjad S. A comparative study of numerical analysis packages. International Journal of Computer Theory and Engineering. 2019;10:67-72 27. 27. Warham AGP. The Helmholtz Integral Equation for a Thin Shell. London, UK: National Physical Laboratory; 1988 28. 28. Kirkup SM. The boundary and shell element method. Applied Mathematical Modelling. 1994;18:418-422 29. 29. Kirkup SM. The computational modelling of acoustic shields by the boundary and shell element method. Computers and Structures. 1991;40:1177-1183 30. 30. Kirkup SM. Solution of discontinuous interior Helmholtz problems by the boundary and shell element method. Computer Methods in Applied Mechanics and Engineering. 1997;140:393-404 31. 31. Kirkup SM. Solving the linear systems of equations in the generalized direct boundary element method. In: Proceedings of the 1st International Conference on Numerical Modelling in Engineering; Ghent, Belgium; 2018 Written By
9,743
37,046
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.671875
3
CC-MAIN-2024-22
latest
en
0.931315
https://www.hackmath.net/en/math-problem/54611
1,726,211,982,000,000,000
text/html
crawl-data/CC-MAIN-2024-38/segments/1725700651510.65/warc/CC-MAIN-20240913070112-20240913100112-00760.warc.gz
729,461,687
8,057
# Dimensions 3 A perimeter of a rectangular field is 96 meters. The length is four meters less than three times the width. Find the length and width (its dimensions). a =  35 m b =  13 m ## Step-by-step explanation: Did you find an error or inaccuracy? Feel free to write us. Thank you! Tips for related online calculators Do you have a system of equations and are looking for calculator system of linear equations? Do you want to convert length units? ### Grade of the word problem: We encourage you to watch this tutorial video on this math problem:
128
558
{"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-2024-38
latest
en
0.864859
http://compsci.ca/v3/printview.php?t=1715&start=0
1,600,510,510,000,000,000
text/html
crawl-data/CC-MAIN-2020-40/segments/1600400191160.14/warc/CC-MAIN-20200919075646-20200919105646-00603.warc.gz
32,078,044
3,086
Computer Science Canada Math Question...Bits Rewarded Author: Archi [ Mon Jul 28, 2003 11:43 pm ] Post subject: Math Question...Bits Rewarded 45 bits to the one who gets this question correct. The problem is as follows: ax+by/m=d Where, when a=40 & b=35 d=52 a=46, b=40, d=63 a=54, b=43, d=75 a=62, b=48, d=88 a=70, b=55, d=105 a=78, b=64, d=125 a=86, b=75, d=144 a=94, b=88, d=171 a=102, b=103, d=201 Find x,y,m. Note: x,y,m must be constant throughout the entire solution. Author: bugzpodder [ Tue Jul 29, 2003 4:11 pm ] Post subject: no solution Author: Archi [ Tue Jul 29, 2003 4:19 pm ] Post subject: hmm... Okey...well try this: I have 9 weapons...I have designated a certian % chance to hit for each weapon. What I need though, is a formula which will work for each weapon and will take into account the players accuracy, and also the hit chance of the weapon. Here are the number with the acc being that at the lowest lvl possible to equip the weapon. Weap 1: a=40 & b=35 d=74% Weap 3: a=46, b=40, d=77% Weap 3: a=54, b=43, d=80% Weap 4: a=62, b=48, d=83% Weap 5: a=70, b=55, d=86% Weap 6: a=78, b=64, d=89% Weap 7: a=86, b=75, d=92% Weap 8: a=94, b=88, d=95% Weap 9: a=102, b=103, d=98% This is for my hit/miss system where I will randomly pick a number between either 1-(a+b) or 1-100 depending on which has a valid solution. The d value is what percent I want the player to hit. So for weapon 1, I want him to hit roughly 74% of the time. So the answer has to be greater than 74% of the numbers. Author: bugzpodder [ Thu Jul 31, 2003 12:22 pm ] Post subject: take your ideal hit percentage of the weapon, multiply by the player's accuracy and some constant. so you need some kind of table that contains the information you gave me Author: Anonymous [ Wed Apr 21, 2004 5:45 pm ] Post subject: i dun get it....confused Author: Anonymous [ Wed Apr 21, 2004 5:45 pm ] Post subject: can ya teach? Author: beard0 [ Fri May 28, 2004 9:21 am ] Post subject: bugzpodder is right, no solution. Evidence: since y and m remain constant, make constant z=y/m equation is now ax+bz=d the first two equations read 1) 40x+35z=53 2) 46x+40z=63 mult 1) by 1.15 46x+40.25z=59.8 Subtract new equation from 2) to get 0x-0.25z=3.2 -0.25z=3.2 z=-12.8 Substituting this into 1) 40x+35(-12.8)=52 40x-448=52 40x=500 x=12.5 These value in the third equation d=54(12.5)+43(-12.8)=675-550.4=124.6 d is supposed to be 75. Therefore, no solution. :
872
2,443
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.859375
4
CC-MAIN-2020-40
latest
en
0.902911
https://www.physicsforums.com/threads/displacement-of-deflected-puck-on-ice.797105/
1,508,414,358,000,000,000
text/html
crawl-data/CC-MAIN-2017-43/segments/1508187823282.42/warc/CC-MAIN-20171019103222-20171019123222-00430.warc.gz
984,797,021
17,573
# Displacement of deflected puck on ice 1. Feb 10, 2015 ### hafsa786786786 1. The problem statement, all variables and given/known data a puck on the ice travels 20.0 m [5.0 degrees E of N], gets deflected, and travels 30.0 m [35.0° N of W]. Determine where the puck will end up with respect to its starting point, e.g., the puck's total displacement 2. Relevant equations c^2=a^2+b^2-2abcosC 3. The attempt at a solution I made one going north east and labeled it 5 degrees, and one going north west but i dont know what direction the arrowhead should go in... Last edited by a moderator: Feb 10, 2015 2. Feb 10, 2015 ### Brian T I'm not sure I understand what you're confused about in your solution. Could you attach an image of your drawing of the situation? You could use the law of cos but I personally would do it in a simpler way. 3. Feb 10, 2015 ### hafsa786786786 I cannot unfortunately, can you attach what you would think is the diagram for this? 4. Feb 10, 2015 ### Staff: Mentor You should be able to scan a sketch and upload it. Have you tried? 5. Feb 10, 2015 ### Staff: Mentor Moderator note: Please note that the thread title has been changed in order to make it more descriptive of the problem statement - gneill 6. Feb 10, 2015 ### hafsa786786786 #### Attached Files: • ###### image.jpg File size: 86.6 KB Views: 44 7. Feb 10, 2015 ### Staff: Mentor Well other than being sideways, that helps. The 2nd displacement should start at the end of the first displacement. So using arrows to represent the displacement vectors, keep the first one you've drawn from the origin with the arrow pointing up and right. Then put the start of the 2nd arrow at the upper tip of the first arrow, and draw it up and left. Basically you just have to redraw your 2nd displacement vector...
490
1,813
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.515625
4
CC-MAIN-2017-43
longest
en
0.920993
https://www.kalkulatorku.com/konversi-satuan/berat-massa.php?k1=gigagrams
1,586,303,391,000,000,000
text/html
crawl-data/CC-MAIN-2020-16/segments/1585371806302.78/warc/CC-MAIN-20200407214925-20200408005425-00074.warc.gz
994,461,709
20,449
# Gigagrams Gigagrams Simbol: Gg Satuan dari: BERAT MASSA BERAT-MASSA's base unit: kilograms (SI Unit) In relation to the base unit (kilograms), 1 Gigagrams = 1000000 kilograms. ## Conversion table 1 Gigagrams (Gg) ke semua satuan berat-massa units 1 Gg= 6.0221366553018E+32 atomic mass unit (u) 1 Gg= 1.0E+27 attograms (ag) 1 Gg= 5710.1743887258 blobs (blob) 1 Gg= 1000 british tonnes (t [British]) 1 Gg= 5000000000 carats (ct) 1 Gg= 4873365595.0136 carats troy (ct [troy]) 1 Gg= 100000000000 centigrams (cg) 1 Gg= 314946.08883554 cloves UK (clove) 1 Gg= 6.0221736433548E+32 daltons (Da) 1 Gg= 100000000 decagrams (da g) 1 Gg= 10000000000 decigrams (dg) 1 Gg= 100000000 dekagrams (dag) 1 Gg= 2.9908008955029E+32 deuteron mass (D) 1 Gg= 564383391.19329 drams (dr) 1 Gg= 257205972.54902 drams apothecaries (dr [apothecaries]) 1 Gg= 564383391.19329 drams avoirdupois (dr [avoirdupois]) 1 Gg= 257205972.54902 drams troy (dr [troy]) 1 Gg= 1.673360107095E-19 earth mass (M∅) 1 Gg= 1.0977683830013E+36 electron mass (me) 1 Gg= 1.0E-9 exagrams (Eg) 1 Gg= 1.0E+24 femtograms (fg) 1 Gg= 1 gigagrams (Gg) 1 Gg= 15432360734.519 grains (gr) 1 Gg= 1000000000 grams (g) 1 Gg= 10000000 hectograms (hg) 1 Gg= 19684.130552221 hundredweight UK (cwt UK) 1 Gg= 22046.226218488 hundredweight US (cwt US) 1 Gg= 101971.62129779 hyl (hyl) 1 Gg= 984.20353329068 imperial tons (t [Imperial]) 1 Gg= 5.2631578947368E-22 jupiter mass (Jup) 1 Gg= 1000000 kilograms (kg) 1 Gg= 2204.6226218488 kilopounds (kip) 1 Gg= 984.20353329068 long tons UK (t [UK]) 1 Gg= 1000 megagrams (Mg) 1 Gg= 1000 metric tons (t [Metric]) 1 Gg= 1.0E+15 micrograms (μg) 1 Gg= 1000000000000 milligrams (mg) 1 Gg= 5.3091724927313E+33 muon mass (mu) 1 Gg= 1.0E+17 nanograms (ng) 1 Gg= 5.9704037533301E+32 neutron mass (n0) 1 Gg= 9806650 newtons[Earth gravity] (N) 1 Gg= 35273990.72294 ounces (oz) 1 Gg= 643014947.91129 pennyweights (pwt) 1 Gg= 1.0E-6 petagrams (Pg) 1 Gg= 1.0E+21 picograms (pg) 1 Gg= 45940892468882 planck mass (mp) 1 Gg= 2204624.4201838 pounds (lbs) 1 Gg= 5.9786332055193E+32 proton mass (p+) 1 Gg= 78736.522208885 quarters UK (1/4[UK]) 1 Gg= 88184.904873951 quarters US (1/4[US]) 1 Gg= 10000 quintals (q) 1 Gg= 6056.6555545296 sacks (sack) 1 Gg= 771617917.64707 scruples (℈) 1 Gg= 1102.3113109244 short tons US (t) 1 Gg= 5710.1471548134 slinches (sln) 1 Gg= 68521.765857761 slugs (slug) 1 Gg= 5.0000000025E-25 solar mass (Mo) 1 Gg= 157473.12327469 stones (st) 1 Gg= 157473.04441777 stones UK (st [UK]) 1 Gg= 176369.8097479 stones US (st [US]) 1 Gg= 5.0000000025E-25 sun mass (M☉) 1 Gg= 0.001 teragrams (Tg) 1 Gg= 78736.522208885 tods (tod) 1 Gg= 1000 tonnes UK (t [tonnes-UK]) 1 Gg= 984.20353329068 tons IMPERIAL (t [IMPERIAL]) 1 Gg= 984.20353329068 tons LONG UK (t [LONG UK]) 1 Gg= 1000 tons METRIC (t [METRIC]) 1 Gg= 1102.3113109244 tons SHORT US (t [SHORT-US])
1,265
2,827
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3
3
CC-MAIN-2020-16
latest
en
0.305813
https://www.quantumstudy.com/a-cylindrical-wire-of-radius-1-mm-length-1-m-youngs-modulus-y-2-x-1011-n-m2-poissons-ratio-%CE%BC-%CF%80-10-is-stretched-by-a-force-of-100-n-its-radius-will-become/
1,660,018,356,000,000,000
text/html
crawl-data/CC-MAIN-2022-33/segments/1659882570901.18/warc/CC-MAIN-20220809033952-20220809063952-00035.warc.gz
861,603,808
12,502
# A cylindrical wire of radius 1 mm , length 1 m , Young’s modulus Y = 2 × 10^11  N/m2 , Poisson’s ratio μ = π/10 is stretched by a force of 100 N . Its radius will become Q: A cylindrical wire of radius 1 mm , length 1 m , Young’s modulus Y = 2 × 1011  N/m2 , Poisson’s ratio μ = π/10 is stretched by a force of 100 N . Its radius will become (a) 0.99998 mm (b) 0.99999 mm (c) 0.99997 mm (d) 0.99995 mm Ans: (d) Sol: $\displaystyle Stress = \frac{F}{A} = \frac{100}{\pi r^2}$ $\displaystyle Stress = \frac{100}{\pi (10^{-3})^2}= \frac{10^8}{\pi}$ $\displaystyle Strain , \frac{\Delta l}{l}= \frac{Stress}{Y}$ $\displaystyle \frac{\Delta l}{l}= \frac{10^8 / \pi}{2 \times 10^{11}} = \frac{5}{\pi} \times 10^{-4}$ $\displaystyle \mu = – \frac{\Delta r /r}{\Delta l/l}$ $\displaystyle \frac{\pi}{10} = – \frac{\Delta r /r}{\frac{5}{\pi} \times 10^{-4}}$ $\displaystyle \Delta r = -0.00005 mm$ $\displaystyle r_f = 1 – 0.00005 mm$ = 0.99995 mm
375
955
{"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.90625
4
CC-MAIN-2022-33
latest
en
0.537585
https://or.stackexchange.com/questions/3966/out-of-the-box-mixed-integer-programming-heuristics/3988
1,632,881,629,000,000,000
text/html
crawl-data/CC-MAIN-2021-39/segments/1631780061350.42/warc/CC-MAIN-20210929004757-20210929034757-00013.warc.gz
487,367,585
31,146
# "Out of the box" Mixed Integer Programming Heuristics I currently have a complex Mixed Integer Program (a sort of vehicle routing problem variant, with multiple vehicle types and without assigned pickup -> delivery routes, among other complications) implemented in PuLP, which is taking far too long for CBC too solve. However, 1. Getting a feasible solution is trivial. 2. I don't need the optimal solution -- something within 10 % of optimality is just fine. Are there any easy to implement, open-source heuristic tools to give me solutions? It looks like Gurobi has such tools, but it's quite pricey. • Disclaimer: I work for Gurobi. ------- If you are an academic, then Gurobi provides academic licenses at no cost, see here. Otherwise you can always request a trial license here, and we'll work with you to find a licensing scheme that fits your needs. Feel free to reach out and we'll do our best so that you can use our product. Apr 24 '20 at 10:21 • Short answer is no, that's why GUROBI is pricey ;) Apr 25 '20 at 2:54 • I suggest you read the answers to this question: or.stackexchange.com/questions/2630/… Since you have a feasible solution, i would suggest to try a fix-and-optimize heuristic which is really simple to implement. Apr 27 '20 at 18:00 You can solve your model via the NEOS server which provides Gurobi, Cplex, and other solvers for free if it is the matter of not having a solver. I am not familiar with PuLP but I know it is easy to implement the solvers in NEOS if you model the problem in Pyomo. May it helps you to find PuLP syntax for it, I provide lines of code written for Pyomo using NEOS: solver_manager = SolverManagerFactory('neos') solution = solver_manager.solve(model, solver='gurobi', tee = True). Also you may have a look on this Github link. For example, a tabu search metaheuristic for Vehicle Routing Problems with Cross-Docking written in Python is given here. I have some experience in solving large-scale airline crew pairing combinatorial optimization problems (an NP-hard problem) with difficulty similar to vehicle routing problems. Yes, solving such problems using standard open-source IP solvers is extremely time-consuming. You could customize/parallelize heuristics (such as Simulated Annealing, Variable Neighbourhood Search) and meta-heuristics (such as Genetic Algorithms) to solve your problem (if the problem-scale is not huge). If the problem-scale is huge (search space of million/billion-plus variables), then I would suggest you solving it using mathematical programming, particularly the Column Generation technique in which only the variables/columns promising objective gain are generated during the optimization in the continuous-domain (a relaxed form of the original IP). Useful articles- Lübbecke, M. E., & Desrosiers, J. (2005). Selected topics in column generation. Operations research, 53(6), 1007-1023. Lübbecke, M. E. (2010). Column generation. Wiley encyclopedia of operations research and management science.
676
3,000
{"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-39
latest
en
0.933967
https://arbitrarilyclose.com/2020/04/20/mathartchallenge-day-35-probabilistic-plants/
1,679,936,734,000,000,000
text/html
crawl-data/CC-MAIN-2023-14/segments/1679296948673.1/warc/CC-MAIN-20230327154814-20230327184814-00314.warc.gz
127,926,389
26,885
#MathArtChallenge Day 35: Probabilistic Plants The Challenge: Today from @ayliean on twitter. Materials Needed: Paper, pencil, something to randomize (die, coin, whatever) Math concepts you could explore with this challenge: probability, randomness, expected value I rolled a 6 sided die to determine how many branchings and an 8 sided die (octahedron) to determine the kind of plants on each branch. It was a little loosey-goosey, and my plant is a bit more fantastical than hers, but it was fun! #mathartchallenge Depending on how you use this activity, you may engage with different mathematical standards. I’ve listed possible connected math content above. Here are a few suggestions for how you might integrate the 8 mathematical practices. Feel free to add your own suggestions in the comments! 1.) Make sense of problems and persevere in solving them. What is the expected length of each plant…arm? (Branch, they’re called branches, I remember now) 8.) Look for and express regularity in repeated reasoning. Under what circumstances is the plant going to continue forever? What conditions make for small plants? What conditions make for huge ones? Author: Ms. P Math Teacher in Minneapolis, MN.
269
1,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}
3.140625
3
CC-MAIN-2023-14
latest
en
0.909733
https://diy.stackexchange.com/questions/85770/effect-of-changing-the-size-of-a-pipe/85891
1,722,724,143,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722640380725.7/warc/CC-MAIN-20240803214957-20240804004957-00561.warc.gz
182,906,298
43,850
# Effect of changing the size of a pipe I've had a couple questions above the sizing of a pipe, but I'm still a little confused and can't find an easy answer. I'll use this image to get a representation of what I'm looking to have answered. Sizes shouldn't matter, but if they were; we'll assume the small pipes are both 1/2" and the big pipe is just 3/4". What effect does it have on the water flow to increase the pipe size (into the center larger pipe)? And then what effect does it have on the flow to decrease the size? The shape doesn't have to be a U like this; I just figured it'd knock out two birds with one stone. It simply represents an increase and then a decrease. You can treat them separately in the answers or as a whole if it does matter. My general thoughts, from what I have been able to read through online, is that the pressure might slightly increase when going into the larger pipe or decrease when going down. Simply because of friction though - smaller pipe has more friction towards the water than the larger pipe. If this were one piece of plumbing, would the pressure out at the right be relatively the same as the pressure in at the left? The other thing I see if the speed of the water. Increasing the pipe size slows down the water flow and decreasing the pipe size speeds it up? Again though, if it were one piece, would this balance out and the speed out would be like the speed in? • You should start with a straight pipe, as it will make it a bit simpler. Also, this might be a better fit for Physics.SE Commented Mar 4, 2016 at 17:23 • @Tester101 I would guess that they'd know the answer more readily, yes, but I also figured it's something worth knowing for diy plumbing. – TFK Commented Mar 4, 2016 at 17:37 • I don't see it making a noticeable difference expect with hot water. You notice a longer time for hot water to reach faucet. Commented Mar 5, 2016 at 2:49 • @justinj I agree. The larger volume of the pipe in the middle is likely to have roughly the same effect as making a smaller pipe longer. Either way, you have to push more water volume to get water to the far end, so if you're pushing hot water, you're going to have to push more cold water out of the way to get the hot water to the other end. Commented Mar 5, 2016 at 18:23 • I am about 4 years late to this party. First of all, assuming we are talking about the pipe once it is full of water, the volumetric flow rate in is the same as the flow rate out. That means that the same amount of water is moving through any cross section of the pipe (large or small) at any given time. The velocity is greater in the smaller pipes (since water needs to move faster through the smaller cross sectional area to constantly deliver the same amount of water). The pressure is greater at the beginning of the pipe, and it decreases as you move along the pipe. This makes it flow. Commented Feb 29, 2020 at 2:56 You should see the same water pressure on both sides of the bigger section of pipe. I wouldn't expect the bigger pipe to really make any pertinent difference. The water will flow more slowly in the bigger pipe, but the pressure will increase (Bernoulli's law, the same thing that makes an airplane wing fly, but applied to fluid dynamics). The water will fill and pressurize the bigger pipe, and the greater pressure in the section of big pipe will force the water into the small pipe on the far side at the same velocity that the water entered on the near side. Again due to the phenomenon described by Bernoulli's law, faster-moving water in the smaller pipe will exert less pressure on the pipe. That isn't to say that there is less energy in the smaller section of pipe. Part of that energy is accounted for in the greater momentum of the fluid. So the water coming out the end of that pipe will be moving with as much force as the water that went into the other end. • Nice explanation. Now if the larger pipes were much much larger and had some length to them. Might get a hell of a burst. Commented Mar 5, 2016 at 18:32 • The extra fittings etc. will add to the pressure drop as well Commented Feb 1, 2019 at 11:19 The velocity, flow rate, and pressure will be nearly identical at the inlet and outlet of that assembly. The only difference will be energy lost while moving through the pipe, e.g. pressure drop due to resistance. • The pressure loss will be greater with greater flow rate... so it could depend on the application how much of a concern that is. But I'd think just the addition of two size changes & two elbows wouldn't be a concern in most residential plumbing! Commented Feb 1, 2019 at 11:19 A larger pipe, and lower velocity, has less pressure loss. The fittings in a larger pipe also have less pressure loss. So, all things considered, if you want to lose less pressure through a series of pipes and fittings, you increase the size. The trade-off is that bigger pipes and fittings cost more, and, as noted in a comment here, bigger pipes would take longer to deliver hot water. In the example you drew, the larger pipe, and the elbows on that larger pipe would mean that you would get more of the original pressure to the fitting, rather than losing it to friction in the pipe, compared to if you went with small pipe the whole way. The difference would depend on the flow rate, which is why many different sizes of pipe exist. There is actually an additional pressure loss introduced just by changing the pipe size (and will depend on what kind of fitting you use to do that), because the water has to change directions (flowing out or in rather than straight down the pipe), so that also has to be accounted for when you decide if it's worth it to increase pipe size. At the end, for a real world system, the losses have to be calculated to determine what is the best trade-off between cost and pressure loss. I'd expect the pressure to Decrease as it entered the larger pipe since it can then expand into the larger volume. However, real world application would need to determine any actual effect. Since, water in motion will buffer itself when it encounters an obstacle. Like a rock in a river, water actually makes a buffer bubble behind the rock. So, actually flowing in from 1/2" & exiting out back into 1/2" would likely show no difference than a full 1/2" bend from a 3/4" bend. But, 1" might be the limit of that buffering as the water's cavitation may actually start to fight back the flow. Your example is commonly done daily with compression fittings being larger diameter & conversely with SharkBite fittings being smaller diameter & there's no difference felt, sure maybe there's a measureable deminimis difference but nothing noticed by a faucet user. • The water is moving faster in the smaller pipe, so pressure will be lower in the smaller pipe. Bernoulli's law applied to fluid dynamics. That isn't to say there is less force overall. The water has momentum, but there is less pressure on the walls of the pipe. In the bigger section of pipe, I'd expect higher pressure, lower velocity. I expect the water will fill the bigger section of pipe, where the greater pressure will force the water to move faster into the small pipe on the other side again. Overall, no change to the system aside from losses to cavitation and friction. Commented Mar 5, 2016 at 2:38 • Oh, I didn't know this was suddenly the physics forum. Thus, why I gave real world examples. There is no effect upon the end result, therefore what happens between point A & B have zero value. Your higher pressure ONLY comes from the cavitation buffering due to momentum & that there's a constricted outlet, period. I suggest looking at a waterfall, the velocity & pressure die instantly upon breaching their constraints. – Iggy Commented Mar 5, 2016 at 4:09 • ...because physics doesn't work in the real world. On the other hand, engineers get to hang their engineering certificate on the wall specifically because they understand things like physics well enough to design the things that builders are expected to build, in such a way that they are both safe and meet performance and cost specifications, and every aspect of that deals with physics. So... physics wins. ;-) Commented Mar 5, 2016 at 18:15 • Bernoulli's principle is just the conservation of energy in a fluid, regardless of its compressibility. It just says that as the fluid speeds up it has more kinetic energy, to conserve energy, the static pressure must drop. This is true for all fluid. However, the change in static pressure from a small pipe to a big pipe means nothing unless you are opening that pipe and using the water there, if you just reduce it back to a small pipe, you'll never know the pressure changed in the big pipe. The losses (friction), on the other hand, matter, that's why we change pipe sizes. Commented Mar 5, 2016 at 21:11 • Don't matter? No, that's not what I said. Of course compressibility is relevant if you're trying to compute the actual pressure in the system, since density of the fluid is part of the equation. With water, the density is just a constant, but it's the same equation. Thus compressibility is irrelevant to this discussion. You said that if you feed a large pipe from a small pipe, the pressure will drop, and that simply isn't true. You also blanket-lambasted at least three old, respectable professions which require education, certification and licensing for good reasons, and that ruffles me a bit. Commented Mar 5, 2016 at 21:11
2,144
9,490
{"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-2024-33
latest
en
0.971067
https://linuxnasm.be/source-code/projects/82-project-bubblesort
1,585,538,530,000,000,000
text/html
crawl-data/CC-MAIN-2020-16/segments/1585370496523.5/warc/CC-MAIN-20200330023050-20200330053050-00075.warc.gz
430,914,198
9,812
```; Name: optimizingstep1.asm;; 1st optimization step : n = Array length ; ; The bubble sort algorithm can be easily optimized by observing that ; the n-th pass finds the n-th largest element and puts it into its ; final place. So, the inner loop can avoid looking at the last n-1 ; items when running for the n-th time. ; ; source: http://en.wikipedia.org/wiki/Bubble_sort#Optimizing_bubble_sort BubbleSort: xor r8,r8 ; number of iterations xor r9,r9 ; number of swaps (informative) mov r10, array.length ; *** ADDED *** .repeat: mov rdx, FALSE ; isSwapped = false mov rcx,1 ; i = 1 mov rsi,array ; point to start of the array .for: lodsq ; RBX = array[i] mov rbx, rax lodsq ; RAX = array[i+1] cmp rax, rbx ; if array[i+1] >= array[i] jge .next xor rax, rbx ; then swap both values xor rbx, rax xor rax, rbx mov qword [rsi-datasize*2], rbx ; and store swapped values in array mov qword [rsi-datasize], rax mov rdx,TRUE ; isSwapped = true inc r9 ; increment number of swaps .next: inc r8 ; increment number of iterations sub rsi,datasize ; adjust pointer in array inc rcx ; i++ cmp rcx,r10 ; if i <= arrayLength-1 *** MODIFIED *** jle .for ; next comparison .until: dec r10 ; *** ADDED *** cmp rdx,TRUE ; if isSwapped == true je .repeat ; then repeat sort algorithm``` Here below the results of this optimization ```Bubblesort Algorithm - Agguro 2012 Optimization step: n-th pass finds the n-th largest elements The UNSORTED array: ------------------- 9223372036854775807 15421441199845202 75 15 0 -854 -7854 -48545825 -9223372036854775808 The SORTED array: ----------------- -9223372036854775808 -48545825 -7854 -854 0 15 75 15421441199845202 8030874076713219394 Number of iterations: 45 Number of swaps : 37``` ```; Name: optimizingstep2.asm;; 2nd optimization step : no check after last swap ; ; it can happen that more than one element is placed in their final position ; on a single pass. In particular, after every pass, all elements after the ; last swap are sorted, and do not need to be checked again. This allows us to ; skip over a lot of the elements, resulting in about a worst case 50% improvement ; in comparison count (though no improvement in swap counts), and adds very little ; complexity because the new code subsumes the "swapped" variable. ; ; source: http://en.wikipedia.org/wiki/Bubble_sort#Optimizing_bubble_sort BubbleSort: xor r8,r8 ; number of iterations xor r9,r9 ; number of swaps (informative) mov r10, array.length ; r10 = n = arrayLength .repeat: mov r11, 0 ; r11 = newn = 0 ADDED mov rcx,1 ; i = 1 mov rsi,array ; point to start of the array .for: lodsq ; RBX = array[i] mov rbx, rax lodsq ; RAX = array[i+1] cmp rax, rbx ; if array[i+1] >= array[i] jge .next xor rax, rbx ; then swap both values xor rbx, rax xor rax, rbx mov r11, rcx ; newn = i ADDED mov qword [rsi-datasize*2], rbx ; and store swapped values in array mov qword [rsi-datasize], rax inc r9 ; increment number of swaps .next: inc r8 ; increment number of iterations sub rsi,datasize ; adjust pointer in array inc rcx ; i++ cmp rcx, r10 ; if i <= arrayLength-1 jle .for mov r10, r11 ; n = newn ADDED .until: dec r10 cmp r10, 0 ; if r10 > 0 jg .repeat ; then repeat sort algorithm``` And finally the results with this optimization ```Bubblesort Algorithm - Agguro 2012 Optimization step: no check after last swap The UNSORTED array: ------------------- 9223372036854775807 15421441199845202 75 15 0 -854 -7854 -48545825 -9223372036854775808 The SORTED array: ----------------- -9223372036854775808 -48545825 -7854 -854 0 15 75 15421441199845202 8030874076713219394 Number of iterations: 38 Number of swaps : 37``` ```; Name: optimizingstep0.asm;; The non-optimized bubblesort algorithm ; ; source: http://en.wikipedia.org/wiki/Bubble_sort BubbleSort: xor r8,r8 ; number of iterations xor r9,r9 ; number of swaps .repeat: mov rdx, FALSE ; isSwapped = false mov rcx,1 ; i = 1 mov rsi,array ; point to start of the array .for: lodsq ; RBX = array[i] mov rbx, rax lodsq ; RAX = array[i+1] cmp rax, rbx ; if array[i+1] >= array[i] jge .next xor rax, rbx ; if less then swap both values xor rbx, rax xor rax, rbx mov qword [rsi-datasize*2], rbx ; and store swapped values in array mov qword [rsi-datasize], rax mov rdx,TRUE ; isSwapped = true inc r9 ; increment number of swaps .next: inc r8 ; increment number of iterations sub rsi,datasize ; adjust pointer in array inc rcx ; i++ cmp rcx,array.length-1 ; if i <= arrayLength-1 jle .for ; next comparison .until: cmp rdx,TRUE ; if isSwapped == true je .repeat ; then repeat sort algorithm``` Her below the results of this optimization ```Bubblesort Algorithm - Agguro 2012 The UNSORTED array: ------------------- 9223372036854775807 15421441199845202 75 15 0 -854 -7854 -48545825 -9223372036854775808 The SORTED array: ----------------- -9223372036854775808 -48545825 -7854 -854 0 15 75 15421441199845202 9223372036854775807 Number of iterations: 72 Number of swaps : 36``` ```; Name: bubblesort.asm ; ; Build: nasm "-felf64" bubblesort.asm -l bubblesort.lst -o bubblesort.o ; ld -s -melf_x86_64 -o bubblesort bubblesort.o ; ; Description: Demonstration of the BubbleSort Algorithm, with or without optimzing steps. ; The program needs to be re-assembled and linked when changing to an ; optimization step. ; Source : https://en.wikipedia.org/wiki/Bubble_sort bits 64 [list -] %include "unistd.inc" [list +] ; here you can choose between the 3 different steps of optimization ; O : [default] no optimization ; 1 : n-th pass finds the n-th largest elements ; 2 : no check after last swap %define OPTIMIZE_STEP 2 ; select 0, 1 or 2 %define TRUE 1 %define FALSE 0 %macro STRING 1 .start: db %1 .length: equ \$-.start %endmacro``` ```%macro ARRAY 1-* %rep %0 dq %1 %rotate 1 %endrep %endmacro section .bss ; 64 bit integers have a range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 ; both included, so we need a buffer of 20 bytes at least to store them Buffer: sign resb 1 ; ascii sign decimal resb 19 ; 20 bytes to store a 64 bits number + sign section .data ; The list is intentionally sorted in descending order to demonstrate the wurst case scenario ; and determine the swaps and iterations. datasize: equ 8 array: ARRAY 9223372036854775807, 15421441199845202, 75, 15, 0, -854, -7854, -48545825, -9223372036854775808 .length equ (\$-array)/datasize title: STRING {"Bubblesort Algorithm - Agguro 2012",10} %if OPTIMIZE_STEP == 1 opt1: STRING {"Optimization step: n-th pass finds the n-th largest elements",10} %elif OPTIMIZE_STEP == 2 opt2: STRING {"Optimization step: no check after last swap",10} %endif unsorted: STRING {"The UNSORTED array:",10,"-------------------",10} sorted: STRING {10,"The SORTED array:",10,"-----------------",10} iterations: STRING {10,"Number of iterations: "} swaps: STRING {"Number of swaps : "} lf: STRING {10} section .text global _start _start: pushfq push rax push rbx push rcx push rdx push rsi push r9 push r8 ; clear the screen and print title ; if the terminal you use don't support this, modify the bytes in .data mov rsi, title mov rdx, title.length call Print.string %if OPTIMIZE_STEP == 1 mov rsi, opt1 mov rdx, opt1.length call Print.string %elif OPTIMIZE_STEP == 2 mov rsi, opt2 mov rdx, opt2.length call Print.string %endif ; display the unsorted Array on screen mov rsi, unsorted mov rdx, unsorted.length call Print.string ; print the Array elements call ShowArray ; Here the Bubblesort algorithm starts. Depending the value of OPTIMIZE_STEP an optimized or ; non-optimized version is included. On error the default (0) is used. %if OPTIMIZE_STEP == 1 %include "optimizingstep1.asm" %elif OPTIMIZE_STEP == 2 %include "optimizingstep2.asm" %elif %warning "no OPTIMIZE_STEP defined, defaulting to 0" %include "optimizingstep0.asm" %endif ; End of the BubbleSort algorithm. ; all we need to do is to display the sorted Array and restore the used registers mov rsi, sorted mov rdx, sorted.length call Print.string call ShowArray ; show number of iterations mov rsi, iterations mov rdx, iterations.length call Print.string mov rax, r8 ; iterations in RAX call Convert ; RAX contains the number to convert call Print.integer call ClearBuffer ; clear buffer for next use ; show number of swaps mov rax, r9 ; number of swaps in RAX mov rsi, swaps mov rdx, swaps.length call Print.string call Convert ; RAX contains the number to convert call Print.integer call Print.linefeed ; restore used registers pop r8 pop r9 pop rsi pop rdx pop rcx pop rbx pop rax popfq Exit: syscall exit, 0 ShowArray: push rcx push rsi mov rcx, array.length ; show all integers mov rsi, array ; start of the array .nextInteger: lodsq ; get integer call Convert ; RAX contains the number to convert call Print.integer call ClearBuffer ; clear buffer for next use loop .nextInteger pop rsi pop rcx ret Convert: push rax push rbx push rdx push rdi push rcx mov rdi,sign mov byte[rdi]," " ; default no sign cmp rax, 0 jge .noSign mov byte[rdi],"-" ; number is zero neg rax ; make positive .noSign: mov rdi, decimal ; address of buffer in RDI add rdi, 18 ; 0..18 = 19 bytes of storage ; start conversion of absolute value of RAX .repeat: xor rdx, rdx ; remainder will be in RDX mov rbx, 10 div rbx ; RDX = remainder of division or dl,"0" ; make remainder decimal ASCII mov byte[rdi],dl ; and store dec rdi ; go to previous position cmp rax, 0 ; RAX = quotient of division, if zero stop ; we can stop when AL < 10 however this will add more code to store AL jnz .repeat ; align integers to the right mov dl ,byte[sign] ; copy sign character in [RDI] just before the number mov byte[rdi], dl dec rdi ; point to position before the sign character mov rcx, rdi ; calculate remaining bytes sub rcx, sign cmp rcx, 0 jle .end inc rcx mov al," " ; fill remaining bytes with spaces std .fill: stosb loop .fill .end: pop rcx pop rdi pop rdx pop rbx pop rax ret ; **** Clear the integer buffer ClearBuffer: push rax push rcx push rdi mov rdi, Buffer mov rcx, 20 ; 20 bytes to clear (1 added to clear last too) xor rax, rax cld ; begin at lowest address .repeat: stosb ; erase [RDI] and increment RSI pointer loop .repeat pop rdi pop rcx pop rax ret ; *** Print routines Print: .integer: push rdx push rsi mov rsi,Buffer mov rdx, 20 ; 20 bytes to display call Print.string call Print.linefeed pop rsi pop rdx ret .linefeed: mov rsi, lf mov rdx, lf.length .string: push rax push rdi push rcx ; even not used, RCX is changed after syscall syscall write, stdout pop rcx pop rdi pop rax ret```
3,648
14,005
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3
3
CC-MAIN-2020-16
latest
en
0.496738
http://www.ck12.org/arithmetic/Fraction-and-Mixed-Number-Comparison/lesson/Fraction-and-Mixed-Number-Comparison-MSM7/
1,493,185,364,000,000,000
text/html
crawl-data/CC-MAIN-2017-17/segments/1492917121153.91/warc/CC-MAIN-20170423031201-00615-ip-10-145-167-34.ec2.internal.warc.gz
477,181,159
45,269
# Fraction and Mixed Number Comparison ## Use <, > and/or = to compare fractions and mixed numbers. Estimated6 minsto complete % Progress Practice Fraction and Mixed Number Comparison MEMORY METER This indicates how strong in your memory this concept is Progress Estimated6 minsto complete % Fraction and Mixed Number Comparison License: CC BY-NC 3.0 Margaret’s dad is trying to cut back on the salt in his diet. He learned that many packaged foods contain a lot of salt, so he is trying to make some of his favorite foods himself. One of his favorite snacks is salsa, so he is making his own salsa. He found two different recipes. One calls for 112\begin{align*}1 \frac{1}{2}\end{align*} teaspoons of salt and another calls for 158\begin{align*}1 \frac{5}{8}\end{align*} teaspoons of salt. How can Margaret help her dad to determine which recipe to use if he wants to use the least amount of salt possible? In this concept, you will learn how to compare and order fractions and mixed numbers. ### Comparing Fractions and Mixed Numbers When two fractions have the same denominator, the fraction with the larger numerator will be the bigger fraction. When two fractions do not have the same denominator, comparison is not as easy. One way to compare fractions is by using approximation and benchmarks. Approximate each fraction with one of the three benchmarks: 0,12\begin{align*}0, \frac{1}{2}\end{align*}, and 1\begin{align*}1\end{align*}. Then, compare the approximations. Here is an example. Use approximation to order 78,25,358,129\begin{align*}\frac{7}{8}, \frac{2}{5}, 3 \frac{5}{8}, \frac{1}{29}\end{align*}, and 2930\begin{align*}\frac{29}{30}\end{align*} greatest to least. First, approximate each fraction using the fraction benchmarks. • 78:7\begin{align*}\frac{7}{8}:7\end{align*} out of 8 is almost 8 out of 8 which would be a whole, so 78\begin{align*}\frac{7}{8}\end{align*} is approximately 1. • 25:2\begin{align*}\frac{2}{5} : 2\end{align*} is a little less than half of 5, so 25\begin{align*}\frac{2}{5}\end{align*} is approximately 12\begin{align*}\frac{1}{2}\end{align*}. • 358\begin{align*}3 \frac{5}{8}\end{align*} is a mixed number greater than 1, so it will automatically be the greatest number in our list. • 129\begin{align*}\frac{1}{29}\end{align*} the denominator of 29 is much larger than the numerator of 1, so 129\begin{align*}\frac{1}{29}\end{align*} is approximately 0. • 2930:29\begin{align*}\frac{29}{30} : 29\end{align*} out of 30 is almost 30 out of 30 which would be a whole, so 2930\begin{align*}\frac{29}{30}\end{align*} is approximately 1. Now, write the fractions in a preliminary greatest to least order with the benchmarks in parentheses: \begin{align*}3 \frac{5}{8},\ \frac{7}{8} (1), \ \frac{29}{30} (1), \ \frac{2}{5} \left( \frac{1}{2} \right), \ \frac{1}{29} (0)\end{align*} Notice that the approximation method helped to order most of the numbers, but there are two fractions that are close to 1. You will have to use another method to decide how \begin{align*}\frac{7}{8}\end{align*} compares to \begin{align*}\frac{29}{30}\end{align*}. One way to determine which fraction is closest to 1 is to draw two number lines between 0 and 1, arranged so that one number line is above the other. Divide the top number line into eighths and find \begin{align*}\frac{7}{8}\end{align*}. Divide the bottom number line into thirtieths and find \begin{align*}\frac{29}{30}\end{align*}. Look to see which value is closest to 1. License: CC BY-NC 3.0 Now you can see that \begin{align*}\frac{29}{30}\end{align*} is closer to 1, so it is the greater number. The answer is that the numbers ordered from greatest to least are \begin{align*}3 \frac{5}{8}, \frac{29}{30}, \frac{7}{8}, \frac{2}{5}, \frac{1}{29}\end{align*}. Another way to compare two fractions with different denominators is by rewriting one or both fractions so that they have the same denominator. To rewrite a fraction, find an equivalent fraction by multiplying both the numerator and the denominator by the same number. Your goal is to choose numbers to multiply by so that the denominators of the equivalent fractions will be the same. Here is an example. Compare \begin{align*}\frac{2}{3}\end{align*} and \begin{align*}\frac{5}{7}\end{align*}. First, notice that the denominators of 3 and 7 are different. You will need to find an equivalent fraction for each given fraction so that their denominators are the same. Next, find a common denominator. You are looking for a number that is a multiple of both 3 and 7. The product of 3 and 7 is 21 and in this case that is the least common multiple of 3 and 7. Now, rewrite each fraction as an equivalent fraction with a denominator of 21. Remember to always multiply the numerator and denominator of the fraction by the same number. \begin{align*}\begin{matrix} \frac{2}{3} & = & \frac{2 \times 7}{3 \times 7} & = & \frac{14}{21} \\ \frac{5}{7} & = & \frac{5 \times 3}{7 \times 3}& = & \frac{15}{21} \end{matrix}\end{align*} Next, compare the rewritten fractions. Now that they have the same denominator, you can see that \begin{align*}\frac{14}{21}\end{align*} is less than \begin{align*}\frac{15}{21}\end{align*}, so \begin{align*}\frac{2}{3}\end{align*} is less than \begin{align*}\frac{5}{7}\end{align*}. The answer is \begin{align*}\frac{2}{3} < \frac{5}{7}\end{align*}. ### Examples #### Example 1 Earlier, you were given a problem about Margaret's dad, who is making salsa. He found two recipes. One calls for \begin{align*}1 \frac{1}{2}\end{align*} teaspoons of salt and the other calls for \begin{align*}1 \frac{5}{8}\end{align*} teaspoons of salt. He wants to use the least amount of salt possible. First, Margaret should notice that because both numbers are between 1 and 2, she can compare the fractional parts of the mixed numbers, \begin{align*}\frac{1}{2}\end{align*} and \begin{align*}\frac{5}{8}\end{align*}, in order to determine which mixed number is greater. Because the denominators are different, she will need to find an equivalent fraction for each given fraction so that their denominators are the same. Next, she can find a common denominator. She is looking for a number that is a multiple of both 2 and 8. 8 is the least common multiple of 2 and 8. Now, she can rewrite each fraction as an equivalent fraction with a denominator of 8. Note that because \begin{align*}\frac{5}{8}\end{align*} already has a denominator of 8, she will not need to rewrite that fraction! \begin{align*}\begin{array}{rcl} \frac{1}{2} & = & \frac{1 \times 4}{2 \times 4} = \frac{4}{8}\\ \frac{5}{8} & = & \frac{5}{8} \end{array}\end{align*} Finally, Margaret can compare the rewritten fractions. Now that they have the same denominator, she can see that \begin{align*}\frac{4}{8}\end{align*} is less than \begin{align*}\frac{5}{8}\end{align*}. This means \begin{align*}1 \frac{1}{2}\end{align*} teaspoons is less than \begin{align*}1 \frac{5}{8}\end{align*} teaspoons. The answer is that Margaret’s dad should use the recipe that calls for \begin{align*}1 \frac{1}{2}\end{align*} teaspoons of salt. #### Example 2 In the long jump contest, Peter jumped \begin{align*}5 \frac{3}{8}\end{align*} feet, Sharon jumped \begin{align*}6 \frac{3}{5}\end{align*} feet, and Juan jumped \begin{align*}6 \frac{2}{7}\end{align*} feet. Order their jump distances from greatest to least. First, notice that \begin{align*}5 \frac{3}{8}\end{align*} is less than 6 while \begin{align*}6 \frac{3}{5}\end{align*} and \begin{align*}6 \frac{2}{7}\end{align*} are both greater than 6. That means \begin{align*}5 \frac{3}{8}\end{align*} is the smallest number. Next, compare \begin{align*}6 \frac{3}{5}\end{align*} and \begin{align*}6 \frac{2}{7}\end{align*}. Because both numbers are between 6 and 7, you can compare the fractional parts of the mixed numbers, \begin{align*}\frac{3}{5}\end{align*} and \begin{align*}\frac{2}{7}\end{align*}, in order to determine which mixed number is greater. Because the denominators are different, you will need to find an equivalent fraction for each given fraction so that their denominators are the same. Now, find a common denominator. You are looking for a number that is a multiple of both 5 and 7. 35 is the least common multiple of 5 and 7. Next, rewrite each fraction as an equivalent fraction with a denominator of 35. \begin{align*}\begin{matrix} \frac{3}{5} & = & \frac{3 \times 7}{5 \times 7} & = & \frac{21}{35} \\ \frac{2}{7} & = & \frac{2 \times 5}{7 \times 5} & = & \frac{10}{35} \end{matrix}\end{align*} Finally, compare the rewritten fractions. Now that they have the same denominator, you can see that \begin{align*}\frac{21}{35}\end{align*} is greater than \begin{align*}\frac{10}{35}\end{align*}. This means \begin{align*}6 \frac{3}{5}\end{align*} is greater than \begin{align*}6 \frac{2}{7}\end{align*}. The answer is that the distances ordered from greatest to least are \begin{align*}6 \frac{3}{5}, 6 \frac{2}{7}, 5 \frac{3}{8}\end{align*}. #### Example 3 Compare \begin{align*}\frac{1}{8}\end{align*} and \begin{align*}\frac{5}{6}\end{align*}. First, try the approximation method and approximate each fraction with a fraction benchmark. • \begin{align*}\frac{1}{8}:\end{align*} The numerator of 1 is much less than the denominator of 8, so \begin{align*}\frac{1}{8}\end{align*} is approximately 0. • \begin{align*}\frac{5}{6} : 5\end{align*} out of 6 is almost 6 out of 6 which would be a whole, so \begin{align*}\frac{5}{6}\end{align*} is approximately 1. Next, compare the two numbers. \begin{align*}\frac{1}{8}\end{align*} is approximately 0 and \begin{align*}\frac{5}{6}\end{align*} is approximately 1. That means \begin{align*}\frac{1}{8}\end{align*} is definitely less than \begin{align*}\frac{5}{6}\end{align*}. The answer is \begin{align*}\frac{1}{8} < \frac{5}{6}\end{align*}. #### Example 4 Compare \begin{align*}\frac{4}{9}\end{align*} and \begin{align*}\frac{7}{15}\end{align*}. First, notice each fraction is approximately \begin{align*}\frac{1}{2}\end{align*}, so the approximation method for comparison won’t work this time. Because the denominators are different, you will need to find an equivalent fraction for each given fraction so that their denominators are the same. Next, find a common denominator. You are looking for a number that is a multiple of both 9 and 15. 45 is the least common multiple of 9 and 15, though any common multiple of 9 and 15 would work. Now, rewrite each fraction as an equivalent fraction with a denominator of 45. \begin{align*}\begin{matrix} \frac{4}{9} & = & \frac{4 \times 5}{9 \times 5} & = & \frac{20}{45} \\ \frac{7}{15} & = & \frac{7 \times 3}{15 \times 3} & = & \frac{21}{45} \end{matrix}\end{align*} Next, compare the rewritten fractions. Now that they have the same denominator, you can see that \begin{align*}\frac{20}{45}\end{align*} is less than \begin{align*}\frac{21}{45}\end{align*}, so \begin{align*}\frac{4}{9}\end{align*} is less than \begin{align*}\frac{7}{15}\end{align*}. The answer is \begin{align*}\frac{4}{9} < \frac{7}{15}\end{align*}. #### Example 5 Compare \begin{align*}\frac{8}{9}\end{align*} and \begin{align*}\frac{3}{4}\end{align*}. First, notice each fraction is approximately 1, so the approximation method for comparison won’t work this time. Because the denominators are different, you will need to find an equivalent fraction for each given fraction so that their denominators are the same. Next, find a common denominator. You are looking for a number that is a multiple of both 9 and 4. 36 is the least common multiple of 9 and 4. Now, rewrite each fraction as an equivalent fraction with a denominator of 36. \begin{align*}\begin{matrix} \frac{8}{9} & = & \frac{8 \times 4}{9 \times 4} & = & \frac{32}{36} \\ \frac{3}{4} & = & \frac{3 \times 9}{4 \times 9} & = & \frac{27}{36} \end{matrix}\end{align*} Next, compare the rewritten fractions. Now that they have the same denominator, you can see that \begin{align*}\frac{32}{36}\end{align*} is greater than \begin{align*}\frac{27}{36}\end{align*}, so \begin{align*}\frac{8}{9}\end{align*} is greater than \begin{align*}\frac{3}{4}\end{align*}. The answer is \begin{align*}\frac{8}{9} > \frac{3}{4}\end{align*}. ### Review Compare each pair of fractions or mixed numbers using an inequality symbol or equals sign. 1. \begin{align*}\frac{2}{5} \text{ and } \frac{3}{5}\end{align*} 2. \begin{align*}\frac{2}{6} \text{ and } \frac{1}{6}\end{align*} 3. \begin{align*}\frac{4}{5} \text{ and } \frac{3}{5}\end{align*} 4. \begin{align*}\frac{2}{15} \text{ and } \frac{13}{15}\end{align*} 5. \begin{align*}\frac{2}{5} \text{ and } \frac{3}{7}\end{align*} 6. \begin{align*}\frac{1}{5} \text{ and } \frac{1}{7}\end{align*} 7. \begin{align*}\frac{12}{15} \text{ and } \frac{13}{30}\end{align*} 8. \begin{align*}\frac{4}{5} \text{ and } \frac{7}{9}\end{align*} 9. \begin{align*}\frac{3}{8} \text{ and } \frac{4}{7}\end{align*} 10. \begin{align*}\frac{1}{2} \text{ and } \frac{3}{6}\end{align*} Write each set in order from least to greatest. 1. \begin{align*}\frac{5}{6}, \frac{1}{3}, \frac{4}{9}\end{align*} 2. \begin{align*}\frac{6}{7}, \frac{1}{4}, \frac{2}{3}\end{align*} 3. \begin{align*}\frac{6}{6}, \frac{4}{5}, \frac{2}{3}\end{align*} 4. \begin{align*}\frac{1}{2}, \frac{3}{5}, \frac{2}{3}\end{align*} 5. \begin{align*}\frac{2}{7}, \frac{1}{4}, \frac{3}{6}\end{align*} 6. \begin{align*}\frac{1}{6}, \frac{2}{9}, \frac{2}{5}\end{align*} 7. Brantley is making an asparagus soufflé which calls for \begin{align*}3 \frac{3}{7}\end{align*} cups of cheese, \begin{align*}3 \frac{2}{3}\end{align*} cups of asparagus, and \begin{align*}2 \frac{2}{5}\end{align*} cups of parsley. Using approximation, order the ingredients from largest amount used to least amount used. 8. Geraldine is putting in a pool table in her living room. She wants to put it against the longest wall of the room. Wall A is \begin{align*}12 \frac{4}{9}\end{align*} feet and wall B is \begin{align*}12 \frac{2}{5}\end{align*} feet. Against which wall will Geraldine put her pool table? ### Review (Answers) To see the Review answers, open this PDF file and look for section 3.3. ### Notes/Highlights Having trouble? Report an issue. Color Highlighted Text Notes Show More ### Vocabulary Language: English TermDefinition Denominator The denominator of a fraction (rational number) is the number on the bottom and indicates the total number of equal parts in the whole or the group. $\frac{5}{8}$ has denominator $8$. fraction A fraction is a part of a whole. A fraction is written mathematically as one value on top of another, separated by a fraction bar. It is also called a rational number. improper fraction An improper fraction is a fraction in which the absolute value of the numerator is greater than the absolute value of the denominator. Mixed Number A mixed number is a number made up of a whole number and a fraction, such as $4\frac{3}{5}$. Numerator The numerator is the number above the fraction bar in a fraction. ### Image Attributions 1. [1]^ License: CC BY-NC 3.0 2. [2]^ License: CC BY-NC 3.0 ### Explore More Sign in to explore more, including practice questions and solutions for Fraction and Mixed Number Comparison. Please wait... Please wait...
4,815
15,241
{"found_math": true, "script_math_tex": 108, "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": 3, "texerror": 0}
4.9375
5
CC-MAIN-2017-17
latest
en
0.838587
https://stat.ethz.ch/pipermail/r-sig-geo/2017-August/025890.html
1,579,668,465,000,000,000
text/html
crawl-data/CC-MAIN-2020-05/segments/1579250606696.26/warc/CC-MAIN-20200122042145-20200122071145-00186.warc.gz
678,482,647
2,827
[R-sig-Geo] Computational problems with errorsarlm Javier García javier.garcia at ehu.eus Thu Aug 3 02:19:31 CEST 2017 ```Hello everybody: I am trying to estimate a spatial error model, but I am facing to several problems 1) Running errorsarlm function the following message appears: Warning messages: 1: In errorsarlm(y ~ z1 + z2 + z3 + z4 + z5 + z6 + z7 + z8 + : inversion of asymptotic covariance matrix failed for tol.solve = 1e-10 número de condición recíproco = 3.80991e-16 - using numerical Hessian. 2: In sqrt(fdHess[1, 1]) : Se han producido NaNs Getting the following results: Approximate (numerical Hessian) standard error: NaN z-value: NaN, p-value: NA Wald statistic: NaN, p-value: NA This can be easily “solved” changing tol.solve from 1.0e-10 to, for example, 1.0e-20. Doing this I get the following results Asymptotic standard error: 14.053 z-value: -44.177, p-value: < 2.22e-16 Wald statistic: 1951.6, p-value: < 2.22e-16 2) However, I have a more serious problema: the estimate of lambda does not make any sense Lambda: -620.82, LR test value: 333.5, p-value: < 2.22e-16 Any idea about what it is happening? I am using a big dataset with 2800 observations (houses), 14 variables, and the spatial weight matrix has been constructed “by hand” with the inverse of the inter-areas distances . Moreover, several observations belong to the same area (in total we have only 10 areas). As the intra-area distance is unknown but cannot be considered zero, I calculate it as 1/(0.1*dist_min), being dist_min the distance between the corresponding area and the nearest one (idea borrowed from Pattanayak and Butry (2005) “Spatial complementarity of forest and farms: accounting for ecosystem services”, American Journal of Agricultural Economics). Could be due to my particular spatial weight matrix? Any alternative? Cheers Javi JAVIER GARCÍA Facultad de Economía y Empresa (Sección Sarriko) Avda. Lehendakari Aguirre 83 48015 BILBAO T.: +34 601 7126 F.: +34 601 3754 <http://www.ehu.es/> www.ehu.es http://www.unibertsitate-hedakuntza.ehu.es/p268-content/es/contenidos/inform acion/manual_id_corp/es_manual/images/firma_email_upv_euskampus_bilingue.gif -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20170803/8ce7f640/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 6359 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20170803/8ce7f640/attachment.gif> ```
773
2,608
{"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.796875
3
CC-MAIN-2020-05
latest
en
0.681412
http://auscblacks.com/maths-worksheet-for-kindergarten/
1,531,840,063,000,000,000
text/html
crawl-data/CC-MAIN-2018-30/segments/1531676589752.56/warc/CC-MAIN-20180717144908-20180717164908-00241.warc.gz
33,403,778
9,315
Categories Recent Files # Maths Worksheet For Kindergarten By Brenda J. Church on June 24 2018 07:25:52 Children may also get started with money, time, and measuring, though it is not absolutely necessary to master any of that. The teacher should keep it playful, supply measuring cups, scales, clocks, and coins to have around, and answer questions. During 1st grade, children will then learn addition and subtraction facts, two-digit numbers, some adding and subtracting with two-digit numbers, and some basics of measuring, time and money. If you make your own, you can just draw three circles on a page and then 2-5 triangles on a page, and ask the child to match each circle with a triangle by drawing a line from shape to shape. Vary the shapes and the amounts. Sometimes the amounts should be equal, sometimes not. Another variation is to ask the child to draw. First make some sticks, circles, squares, or other shapes on a page, and encircle them. Make for the child a big "bubble" to draw in, and ask the child to draw either the same amount, one more, or one less. Also have your child practice writing numbers on paper.
257
1,137
{"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-30
latest
en
0.948987
https://gmatclub.com/forum/http-www-london-edu-assets-documents-programmes-mba-2011-employment-report-2-pdf-125039.html
1,495,527,346,000,000,000
text/html
crawl-data/CC-MAIN-2017-22/segments/1495463607591.53/warc/CC-MAIN-20170523064440-20170523084440-00002.warc.gz
791,998,964
49,196
Check GMAT Club Decision Tracker for the Latest School Decision Releases https://gmatclub.com/AppTrack It is currently 23 May 2017, 01:15 ### GMAT Club Daily Prep #### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email. Customized for You we will pick new questions that match your level based on your Timer History Track every week, we’ll send you an estimated GMAT score based on your performance Practice Pays we will pick new questions that match your level based on your Timer History # Events & Promotions ###### Events & Promotions in June Open Detailed Calendar # LBS 2011 Employment report Author Message TAGS: ### Hide Tags CEO Joined: 17 May 2007 Posts: 2959 Followers: 60 Kudos [?]: 601 [1] , given: 210 ### Show Tags 23 Dec 2011, 17:18 1 KUDOS Manager Status: Taking heavily leveraged but calculated risks at all times Joined: 04 Apr 2010 Posts: 183 Concentration: Entrepreneurship, Finance Schools: HBS '15, Stanford '15 GMAT Date: 01-31-2012 Followers: 1 Kudos [?]: 72 [0], given: 12 Re: LBS 2011 Employment report [#permalink] ### Show Tags 23 Dec 2011, 20:35 Interesting! How have career changing international placed into IB roles so far ( Summer/ Full time) , from your personal perspective/opinion? ( I am asking since you have this new immigration rules of recruting before graduation etc. for internationals in UK. Is it working to persuade the Bulge brackets to scoop up the internationals before graduation.) CEO Joined: 17 May 2007 Posts: 2959 Followers: 60 Kudos [?]: 601 [0], given: 210 Re: LBS 2011 Employment report [#permalink] ### Show Tags 24 Dec 2011, 05:20 I no longer have an insider's view on this year (i.e. class of 2012 and 2013) but my year was fairly successful. The roles were fewer but the ones with focus did succeed. Frankly the whole immigration issue is overblown especially for big firms due to numerous loopholes. I raised some examples in an earlier post here : uk-work-visa-abolished-for-internationals-108300-60.html#p995866 Anasthaesium wrote: Interesting! How have career changing international placed into IB roles so far ( Summer/ Full time) , from your personal perspective/opinion? ( I am asking since you have this new immigration rules of recruting before graduation etc. for internationals in UK. Is it working to persuade the Bulge brackets to scoop up the internationals before graduation.) _________________ Manager Joined: 28 Sep 2011 Posts: 52 Followers: 0 Kudos [?]: 14 [0], given: 9 Re: LBS 2011 Employment report [#permalink] ### Show Tags 25 Dec 2011, 10:49 bsd_lover wrote: Care to elaborate specifically what was interesting to you? Thx Re: LBS 2011 Employment report   [#permalink] 25 Dec 2011, 10:49 Similar topics Replies Last post Similar Topics: To what extent are b-school employment reports verified? 1 01 Mar 2012, 17:58 Darden vs Ross - Employment Reports 8 13 Jan 2011, 11:30 1 The blatant manipulation of B-school employment reports. 10 15 Mar 2011, 02:28 1 Employment Reports 2 21 Nov 2009, 11:40 1 Employment Reports from 2001-2003 16 17 Jul 2008, 06:16 Display posts from previous: Sort by
893
3,235
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.9375
3
CC-MAIN-2017-22
latest
en
0.901741
https://www.cracksat.net/sat2/math/test905.html
1,642,741,278,000,000,000
text/html
crawl-data/CC-MAIN-2022-05/segments/1642320302723.60/warc/CC-MAIN-20220121040956-20220121070956-00078.warc.gz
717,996,420
3,501
# SAT Subject Test Math Level 2 Practice Test: Functions Definitions ### Test Information 3 questions 4 minutes Take more free SAT math 1&2 subject practice tests available from cracksat.net. 1. If {(3,2),(4,2),(3,1),(7,1),(2,3)} is to be a function, which one of the following must be removed from the set? A. (3,2) B. (4,2) C. (2,3) D. (7,1) E. none of the above 2. For f(x) = 3x2 + 4, g(x) = 2, and h = {(1,1), (2,1), (3,2)}, A. f is the only function B. h is the only function C. f and g are the only functions D. g and h are the only functions E. f, g, and h are all functions 3. What value(s) must be excluded from the domain of ? A. -2 B. 0 C. 2 D. 2 and -2 E. no value 
252
689
{"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-2022-05
latest
en
0.793791
http://www.chegg.com/homework-help/questions-and-answers/suppose-x-andy-following-joint-probability-distribution-f-x-y-x-2-4-1-010-015-y-3-020-030--q2362697
1,469,711,095,000,000,000
text/html
crawl-data/CC-MAIN-2016-30/segments/1469257828282.32/warc/CC-MAIN-20160723071028-00156-ip-10-185-27-174.ec2.internal.warc.gz
356,743,534
13,247
Suppose that X andY have the following joint probability distribution: f (x,y)          x 2            4 1   0.10       0.15 y        3   0.20       0.30 5   0.10       0.15 Find the prob(x=4, given y=3)?
85
205
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.71875
3
CC-MAIN-2016-30
latest
en
0.325106
http://www.universalmathsolver.com/2015/04/analysis-of-a-function-with-derivatives-using-ums/
1,582,669,652,000,000,000
text/html
crawl-data/CC-MAIN-2020-10/segments/1581875146160.21/warc/CC-MAIN-20200225202625-20200225232625-00029.warc.gz
240,100,775
12,799
# Analysis of a Function with Derivatives using UMS Maxima and minima, Fermat’s theorem, critical points, first derivative test. In mathematics, the maximum and minimum (plural: maxima and minima) of a function, known collectively as extrema (singular: extremum), are the largest and smallest value that the function takes at a point either within a given neighborhood (local or relative extremum) or on the function domain in its entirety (global or absolute extremum) A real-valued function f defined on a domain X  has a global (or absolutemaximum point at x* if f (x* ) ≥ f(x) for all  in . Similarly, the function has a global (or absoluteminimum point at x* if f (x* ) ≤ f(x) for all  x in X. The value of the function at a maximum point is called the maximum value of the function and the value of the function at a minimum point is called the minimum value of the function. Finding functional maxima and minima Finding global maxima and minima is the goal of mathematical optimization. If a function is continuous on a closed interval, then by the extreme alue theorem global maxima and minima exist. Furthermore, a global maximum (or minimum) either must be a local maximum (or minimum) in the interior of the domain, or must lie on the boundary of the domain. So a method of finding a global maximum (or minimum) is to look at all the local maxima (or minima) in the interior, and also look at the maxima (or minima) of the points on the boundary, and take the largest (or smallest) one.Local extrema of differentiable functions can be found by Fermat’s theorem, which states that they must occur at critical points. One can distinguish whether a critical point is a local maximum or local minimum by using the first derivative test, second derivative test, or higher-order derivative test, given sufficient differentiability.For any function that is defined piecewise, one finds a maximum (or minimum) by finding the maximum (or minimum) of each piece separately, and then seeing which one is largest (or smallest). Fermat’s theorem ( interior extremum theorem ) In mathematics, Fermat’s theorem (also known as Interior extremum theorem) is a method to find local maxima and minima of differentiable functions on open sets by showing that every local extremum of the function is a stationary point (the function derivative is zero in that point). Fermat’s theorem is a theorem in real analysis, named after Pierre de Fermat.By using Fermat’s theorem, the potential extrema of a function f with derivative  f , are found by solving an equation in  f ‘. Fermat’s theorem gives only a necessary condition for extreme function values, and some stationary points are inflection points (not a maximum or minimum). The function’s second derivative, if it exists, can determine if any stationary point is a maximum, minimum, or inflection point. Fermat’s theorem One way to state Fermat’s theorem is that whenever you compute the derivative of a function’s local extrema, the result will always be zero. In precise mathematical language: Let f:(a,b) →R be a function and suppose that x0 in (a,b)  is a local extremum of f . If f is differentiable at x0  then f ‘(x0)=0 . Another way to understand the theorem is via the contrapositive statement. If the derivative of a function at any point is not zero, that point is not an extrema. Formally: If f is differentiable at x0 in (a,b) , and f ‘(x0)≠0 , then  x0 is not a local extremum of f  . Corollary The global extrema of a function f on a domain  A  occur only at boundaries, non-differentiable points, and stationary points. If x0 is a global extremum of  f, then one of the following is true: boundary x0 is in the boundary of A non-differentiable f is not differentiable at  x0 stationary point : x0  is a stationary point of  f Critical points In mathematics, a critical point or stationary point of a differentiable function of a real orcomplex variable is any value in its domain where its derivative is 0 or undefined. A critical point or stationary point of a differentiable function of a single real variable,  f (x), is a value x0 in the domain of f where its derivative is 0: f ‘(x0)=0 . A critical value is the image under f of a critical point. These concepts may be visualized through the graph of  f : at a critical point, the graph has a horizontal tangent and the derivative of the function is zero. First derivative test First derivative test depends on the “increasing-decreasing test”, which is itself ultimately a consequence of the mean value theorem. Suppose  f is a real-valued function of a real variable defined on some interval containing the critical point a. Further suppose that f is continuous at  a and differentiable on some open interval containing a, except possibly at a  itself. 1) If there exists a positive number r such that for every x  in ( a-r,a] we have f ‘(x )≥0 , and for every x in [a,a+r) we have f ‘(x )≤ 0, then f has a local maximum at a 2) If there exists a positive number r such that for every x in ( a-r,a) we have f ‘(x )≤ 0, and for every x in ( a,a+r) we have  f ‘(x )≥0 , then f has a local minimum at a. 3) If there exists a positive number r  such that for every x in ( a-r, a) U ( a, a+r) we have f ‘(x ) >0 , or if there exists a positive number  r such that for every x in ( a-r, a) U ( a, a+r) we have f ‘(x ) < 0 , then f has neither a local maximum nor a local minimum at a . If none of the above conditions hold, then the test fails. (Such a condition is not vacuous; there are functions that satisfy none of the first three conditions.) Questions 1) How to find local max and local min of the function y(x)=x²/(x-1) using Universal Math Solver? To determine the local maximum (max) and local minimum (min) of any rational function y(x)=f(x) enter this function y(x)=x²/(x-1) and perform the analysis of the function (select the option “Maximum and minimum”) UMS Solution: Let us study the function given by: y(x)=x²/(x-1) The domain of the function is the following set: x<1; x>1 First derivative: :  y'(x)=x(x-2)/(x-1)² Vertical asymptotes: x=1 Critical numbers: x=0; x=2. In order to determine critical numbers we set the first derivative equal to zero. x(x-2)/(x-1)²=0 A fraction is equal to zero if and only if the numerator is equal to zero. Case 1 x=0 Here is the answer to this particular case: x=0 Case 2 x-2=0 Let’s move the constants to the right−hand side of the equality with the reverse sign. x=2 Here is the answer to this particular case: x=2 Test intervals: The analysis of the function graph is shown in the Table The final answer is: relative minimum x=2; relative maximum x=0 2) How to find global max and global min of the function y(x)=2x³-3x²-12x-2 defined over the closed interval (segment) [-2;1] using UMS ? To determine global max and global min of any rational function y(x)=f(x) defined over the closed interval (segment) enter this function y(x)=2x³-3x²-12x-2 ; -2≤x≤1 and perform the analysis of the function (select the option “Maximum and minimum”) UMS Solution: Let us study the function given by: y(x)=2x³-3x²-12x-2 The domain of the function is the following set: -2≤x≤1 First derivative: y'(x)=6x²-6x-12 (2x³-3x²-12x-2)’ = The derivative of a sum equals the sum of the derivatives. (2x³)’ -(3x²)’-(12x)’-(2)’ The derivative of any constant equals zero. (2x³)’ -(3x²)’-(12x)’-0= (2x³)’ -(3x²)’-(12x)’= The derivative of a constant times a function is equal to the constant times the derivative of the function. 2(x³)’ -3(x²)’-12(x)’= Use the Power Rule . 2(3x²) -3(2x)-12•1= 6x² -6x-12 Vertical asymptotes: none Critical numbers: x=-1 In order to determine critical numbers we set the first derivative equal to zero. 6x² -6x-12=0 The next equation is equivalent to the previous one x² -x-2=0 Let us find the discriminant. D=b² -4ac=(-1)²-4∙1∙(-2)=9 The discriminant is positive, hence the equation has two distinct real roots. Now we use the formula for the roots of a quadratic equation x1,2=(-b± D)/(2a) x1=(1-3)/2=-1 ; x2=(1+3)/2=2 2 does not belong to the domain of the function.
2,310
8,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}
4.09375
4
CC-MAIN-2020-10
latest
en
0.76792
https://ocodea.com/qa/question-can-an-ace-be-used-in-a-straight.html
1,603,735,850,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107891624.95/warc/CC-MAIN-20201026175019-20201026205019-00111.warc.gz
444,944,181
9,059
# Question: Can An Ace Be Used In A Straight? ## Does ace count for straight? An ace is the highest card, but it can also function as the lowest in completing a straight. A-2-3-4-5 is considered a five-high straight, and it is called a wheel or bicycle; this is the only time an ace plays as a low card. An ace-high straight flush is called a royal flush and it cannot be beaten.. ## Is Ace through 5 a straight? A straight is five consecutive card ranks. Aces can be high or low so the lowest straight is ace through five while the highest is ten through ace. There are no kickers with straights since all five cards are needed to make the hand. Flush: A flush beats a straight. ## Can anything beat 4 aces? Because twos (deuces) are rated the lowest and aces the highest in poker, four aces ​is the highest four of a kind. … So, four deuces can’t beat any other four of a kind, and four aces can’t be beaten by any other four of a kind. ## Is a2345 a straight? A2345 is a 5 high straight, the lowest possible straight, because you are essentially using the Ace as a 1. A straight is ranked by its highest card: So in the case of A-2-3-4-5, you are using the ace as a LOW, so you would have a 5 high straight. ## Is 2 Ace King Queen Jack a straight? An ace can be the lowest card of a straight (ace, 2, 3, 4, 5) or the highest card of a straight (ten, jack, queen, king, ace), but a straight can’t “wrap around”; a hand with queen, king, ace, 2, 3 would be worthless (unless it’s a flush). ## Does a straight beat 2 pairs? Each poker hand is ranked in a set order. The higher the rank, the less chance statistically you have of getting it. The higher the rank of your hand the better, because two pairs always beats one pair, and a flush always beats a straight. ## Which flush is higher? A straight flush is five consecutive cards of the same suit. If two players have a straight flush then the highest card wins. The highest possible straight flush, and the best hand in poker, is an ace high straight flush, also known as a… ## When can an ace be used in a straight? As in a regular straight, you can have an ace either high (A-K-Q-J-T) or low (5-4-3-2-1). However, a straight may not ‘wraparound’. (Such as K-A-2-3-4, which is not a straight). An Ace high straight-flush is called a Royal Flush and is the highest natural hand. ## What is an ace high straight? “Ace high” is simply a type of “high card hand”. It is the strongest high card hand, followed by King-high, Queen-high etc etc. The term can also be used to indicate that a flush or straight has an Ace has its highest contributing card: the Ace high flush, the Ace high straight. ## Is Ace high or low in poker straight? Individual cards are ranked, from highest to lowest: A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3 and 2. However, aces have the lowest rank under ace-to-five low or ace-to-six low rules, or under high rules as part of a five-high straight or straight flush. ## Which card suit is highest in poker? When suit ranking is applied, the two most common conventions are:Alphabetical order: clubs (lowest), followed by diamonds, hearts, and spades (highest). … Alternating colors: diamonds (lowest), followed by clubs, hearts, and spades (highest). … Some Russian card games like Preference, 1000 etc.More items… ## What is the rarest hand in poker? Royal Flush poker handRoyal Flush poker hand is made up of Ace, King, Queen, Jack and Ten of the same suit, a Royal Flush is an unbeatable poker hand. This poker hand is considered as the rarest hand in the poker game and the chances of winning a royal flush is, one in 2,598,960 possible hands. ## Does 3 of a kind beat a straight? Straight: A straight beats three of a kind. A straight is five consecutive card ranks. Aces can be high or low so the lowest straight is ace through five while the highest is ten through ace. There are no kickers with straights since all five cards are needed to make the hand. ## What happens if there is a straight on the table? lower straight. A player that has a higher straight will win the hand. It doesn’t matter if both players have a straight, it only matters who has the highest straight. Of course, if someone has a flush or full house or better hand, they will still beat all the opponents who have a straight. ## Which straight is higher? The highest possible Straight is A-K-Q-J-10 (also called “Broadway”). Straight combinations go all the way down to A-2-3-4-5, which is known as the “Wheel” or “Bicycle”, in poker lingo. When it comes to Straights, the suits aren’t important. However, not every straight is ranked equally. ## Which royal flush is the highest? The Royal Flush Hand in Poker This is the strongest possible hand in poker and can never be beaten. It is made when we have the Ace-high straight while holding cards all of the same suit. ## Who wins a flush tie? A flush is any hand with five cards of the same suit. If two or more players hold a flush, the flush with the highest card wins. If more than one player has the same strength high card, then the strength of the second highest card held wins. ## Is Ace high or low in Cribbage? In Cribbage, cards are ranked with Kings high and Aces low. Cards are worth their own value with face cards worth 10 and Aces worth 1. Unlike other card games, Cribbage is scored on a wooden board with pegs.
1,324
5,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}
2.890625
3
CC-MAIN-2020-45
latest
en
0.944705
http://www.wyzant.com/resources/answers/14757/how_would_i_solve_this_equation_by_factoring
1,405,089,573,000,000,000
text/html
crawl-data/CC-MAIN-2014-23/segments/1404776427481.71/warc/CC-MAIN-20140707234027-00058-ip-10-180-212-248.ec2.internal.warc.gz
574,174,607
12,921
Search 75,695 tutors 0 0 ## How would i solve this equation by factoring ? 5x^2 + 9x - 72 =0 The solution would be what x =? (ax+b)(cx+d)=0 is the format of a factored quadratic. After "FOIL"ing that expression, you have (a•c)x^2+(a•d+b•c)x+(b•d)=0 5     x^2 +     9       x    -72 =0 a•c=5, so  a=1 and c=5, or a=5 and c=1 b•d=-72, so b={1,2,3,4,6,8,9,12,18,24,36,72} and d=negative{72,36,24,18,12,9,8,6,4,3,2,1} a•d+b•c=9, so you search for the right combination of those numbers. The positive value of a•d or b•c will be greater, as 9 is positive. So I look for a 5•d +(1•c) when d is positive.  I could not find any: 5•8 +1•-9=40+-9=31 5•6+1•-12=30+-12=18. 5•4 +1•-18=20+-18=2 Then I look for 5•d +(1•c) when d is negative.  5•-3=-15, 1•24= 9 (5x+24)(x-3)=5x^2 -15x +24x -72 =0 So now, use both binomials to solve what values of x would give you a 0 in that equation. X A fun way to remember the quadratic formula is to sing it to the tune of pop goes the weasel: x equals negative b Plus or minus the square root (of) b squared minus four a c All divided by two a The "all" is where you would sing "pop" in the song.  It's saved me a lot of times, hope it helps you. Hi Harry, To solve this equation we will need to use the following Quadratic formula: For ax2 + bx + c = 0, the value of x is given by x = -b ± √(b² - 4ac) 2a Therefore for the equation 5x2 + 9x -72 = 0, if a=5, b=9 and c=-72, our quadratic equation will be: x = -9 ± √(9² - 4(5)(-72)) 2(5) = -9 ± √(81 - 4(-360)) 10 = -9 ± √(81 + 1440) 10 = -9 ± √1521   => x = -9 + 39  OR x = -9 - 39 10                           10                    10 ==> x = 3 OR x = -4.8 Hope this helps and let me know if you have any other questions! The easiest way to factor is to see right away that x=3 is a solution. 5*32+9*3-72=0 ⇔ 45+27-72=0 ⇔0=0 --identity. Then you need to search for another solution by considering that 5x2+9x-72=(x-3)(5x-a) and figure which x2 would work. You can immediately see that 3a=-72 or a=-24; So 5x2+9x-72=(x-3)(5x+24), so x1=3 x2=-24/5; For factoring start out with (  ) (  ) double brackets factor the first term 5x^2 (which is 5x & 1x place them as indicated below) (5x     )(x    ) Now think of factor of -72  For example (8 & 9 , 12 & 6, 1 & 72, 18 & 4 36 & 2, 3 & 24, etc each with opposite sign since we need -72) but now you also have 5 to take account to get the middle term  9x (5x +9)(x-8) Double check your work by FOIL method: 5x^2 -40x+9x-72 = 5x^2 -31x-72, does not work so place each factor and keep trying until you have 9x as the middle term. After trying most of the above (5x+24) (x-3)  Double check: 5x^2 -15x+24x-72 = 5x^2 + 9x - 72. It works so now solve for x (5x+24) (x-3) = 0 5x+24 = 0      &    x-3 = 0 5x = -24         &    x= 3 x= -24/5        &      x= 3   answer
1,152
2,816
{"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.125
4
CC-MAIN-2014-23
longest
en
0.843979
http://mathhelpforum.com/pre-calculus/179962-position-vectors.html
1,529,598,748,000,000,000
text/html
crawl-data/CC-MAIN-2018-26/segments/1529267864191.74/warc/CC-MAIN-20180621153153-20180621173153-00072.warc.gz
194,478,397
9,403
1. ## Position vectors PQRS is a parraellelogram. The postion vectors of P,Q,R and S are , respectively: p=-3k, q=i+yj, r=5i+2xj+k and s=yi-2k. The values of x and y are? 2. Originally Posted by johnsy123 PQRS is a parraellelogram. The postion vectors of P,Q,R and S are , respectively: p=-3k, q=i+yj, r=5i+2xj+k and s=yi-2k. The values of x and y are? Draw a diagram. Get an expression for the vectors PQ and SR. Equate them and hence get two equations in x and y. Solve simultaneously. If you need more help, please show all your work and say where you get stuck.
182
568
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.203125
3
CC-MAIN-2018-26
latest
en
0.844715
https://web2.0calc.com/questions/help_34731
1,597,174,580,000,000,000
text/html
crawl-data/CC-MAIN-2020-34/segments/1596439738819.78/warc/CC-MAIN-20200811180239-20200811210239-00439.warc.gz
555,549,944
6,675
+0 # help 0 134 1 The sum of digits in a two-digit number is 14. If you double the reversed number and add the result to the original number, the sum would be 222. Find the original number. Feb 9, 2020 #1 +21955 0 Let the ten's digit of the original be x and the one'e digit be y. The value of the original number is:    10x + y The value of the reversed number is:  10y + x If you double the reversed number and add the result to the original number, you get 222: This equation is:  2(10y + x) + (10x + y)  =  222 20y + 2x + 10x + y  =  222 12x + 21y  =  222 4x + 7y  =  74 Since the sum of the digits of the number is 14:     x + y =  14 Combining these two equations:     4x + 7y  =  74                      --->      4x + 7y  =  74 x  +  y  =  14     --->   x -4   --->     -4x - 4y  =  -56 Adding down the columns;                                                                              3y  =  18 y  =  6 Since  x + y  =  14:     x  =  8 Feb 9, 2020
362
979
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.3125
4
CC-MAIN-2020-34
latest
en
0.20566
https://iq.opengenus.org/minimum-cut-problem/
1,720,879,238,000,000,000
text/html
crawl-data/CC-MAIN-2024-30/segments/1720763514494.35/warc/CC-MAIN-20240713114822-20240713144822-00769.warc.gz
266,745,001
22,342
× Search anything: # Minimum Cut Problem [Overview] #### Algorithms Graph Algorithms Open-Source Internship opportunity by OpenGenus for programmers. Apply now. In this article, we have covered the basics of Minimum Cut Problem, its applications like Network Reliability, algorithms like Ford-Fulkerson Algorithm to solve it and much more. # Problem Definition In order to understand the Minimum Cut Problem (often abbreviated to Min-Cut Problem), we first need to define a "Cut". ### Cut A Cut in a graph G is defined as the partition of the vertices in a graph into two disjoint proper subsets. More formally, consider a graph $G=(V, E)$: A cut $C = (S, T)$ partitions $V$ into two proper disjoint subsets $S,T$ such that $\{(u,v) \in E | u \in S, v \in T\}$ and $C \neq \emptyset, V$ (i.e $C \subset V$). Cut Size = 2 In an unweighted undirected graph, the size of a cut is the number of edges crossing the cut between $S$ and $V \setminus S$, whereas in a weighted graph it is the sum of the weights that cross the cut. ## Minimum Cut A minimum cut is defined as a cut that is minimal in either the number of edges that cross the cut (unweighted) or the weights of the edges that cross the cut (weighted). More formally, it is defined as $\{min(|C|) : \emptyset \neq C \subset V\}$ ## Minimum Cut Problem In order to define the Min-Cut problem, it is important to note that there are essentially two different variations of the problem. The first variation is know as the "Minimum s-t Cut Problem" and is defined as follows: Input: Undirected graph $G= (V, E)$, with vertices $s$ and $t$ Output: A partition of graph G into two proper disjoint subsets $V$ and $S$ such that $s \in S$ and $t \in V$ and the number of edges crossing the cut is minimized. The second variation can be thought of as a "global" version of the first, where no terminal nodes are given, and we are simply looking for the minimum cut across all pairs of vertices $s$ and $t$. The Minimum Cut Problem is defined as follows: Input: An undirected graph $G=(U,V)$ Output: A minimal set M of edges that cross a cut ## Applications It is often useful to first explore the applications of such a problem in order to motivate the need for finding an efficient and useful solution. ### Network Reliability We can use an efficient solution to the minimum cut problem in order to estimate the probability of a network failure. Note that a network failure will occur if our network becomes disconnected. Our definition of a cut as stated above indicates that if the set of edges that compose the cut were to be removed, or in the case of a network, fail, the graph (network) would become disconnected. Assuming all edges have an equal probability of failing, it is clear to see that the cut with the least amount of edges is most likely to become disconnected, and therefore most likely to cause network failure. ### Image Segmentation Image segmentation is the partitioning of images into disjoint sets of pixels such that pixels with similar characteristics are grouped together, often with the goal of simplifying an image. Consider a graph $G$ where the vertices $V$ represent pixels, and the edges $E$ represent relationships between similar pixels. In this case, the solution to the Min-Cut problem provides use with the partition of pixels where the two sets are the most dissimilar. ## Algorithms Now that we understand the importance of the Min-Cut problem, it is time we consider some potential solutions. We will first consider solutions to the "Minimum s-t Cut Problem". Despite the multiple potential algorithms to this specific problem, they all utilize a fundamental theorem known as the Max-Flow Min-Cut theorem. In the following definition, flow refers to the weight of an edge (in the case of an unweighted graph we can assume the weight to be 1). ## Max-Flow Min-Cut theorem: The Minimum s-t Cut is equal to the Maximum Flow for any graph $G$. The above theorem tell us that a solution to one of the problems will provide us a solution to the other. Keeping this in mind, we can breifly analyze the following Maximum Flow Algorithm. ## Ford-Fulkerson Algorithm The Ford-Fulkerson is a greedy algorithm that computes the maximum flow of a network (which as shown above provides use with a solution to the Min s-t Cut Problem). The main idea of the algorithm is as follows: Let F denote the flow and C denote the capacity of an arbitrary but particular edge $(u,v) \in G$ 1. Let F(u,v) = 0 for all edges (u,v) in E 2. While there is an augmented path from s to t: F(u,v) = F(u,v) + (C(path) - F(path)) F(v,u) = F(v,u) - (C(path) - F(path)) 3. Return F(s,t) Where the path in step 2 can be found using BFS or DFS, and $F(s,t) =$ Min-Cut s-t by the Max-Flow Min-Cut theorem. Complexity: Assuming the flow values of each of the edges is an integer, the runtime is given by $O(EF)$ where E is the number of edges and F is the maximum flow. It is worth noting that if the flow values of any of the edges are irrational, the algorithm is not guaranteed to terminate. That being said the Edmonds-Karp algorithm, a variation of the above algorithm that enforces the use of BFS, can be used to find an answer if there exists irrational numbers in $O(VE^2)$ time. We will now analyze a potential solution for finding the global Min-Cut (i.e when no terminal vertices are given). ## Brute Force The naive approach would be to fix a node $s$, and for each remaining vertex $t$, use the above algorithm to find the Max Flow (Min-Cut) between these pairs, and return this minimum of all iterations. The returned pair would be the minimum global cut since we iterate through all pairs $s,t$ and the global minimum cut must exist for some nodes s and t. This would result in the above algorithm running for $|V| - 1$ times, which is not suitable for larger graphs. ## Kargers Algorithm Kargers Algorithm is specific type of randomized algorithm known as a "Monte Carlo" algorithm (not to be confused with "Las Vegas" algorithm). Essentially, the algorithms runtime is bounded by a function in the size of the input, however the algorithm may return an incorrect answer with small probability. The algorithm defines "supernodes" and "superedges". A supernode is a group of nodes. A superedge is an edge connecting two supernodes that consists of all edges between a pair of nodes in separate super nodes. Kargers randomly chooses edges and performs edge contractions. The procedure for an edge contraction is as follows: 2. For each edge x,u or u,x add the edge x,S 3. Every edge with endpoint u or v is removed 4. u and v are safely deleted from the graph We can then define Kargers with the following procedure: 1. While there are at least 2 vertices: Choose edge u,v uniformly at random from E Contract into super vertex S using above procedure 2. Return the cut between the two remaining supernodes Example: A graph G Contracting edge C,E and E,C Contracting edge A,B Contracting edge CE,D and D,CE Contracting edge ABCE,D and D,ABCE Therefore Min-Cut = 1 Complexity: Assuming the graph $G$ is implemented using an adjacency list or matrix, the total running time is $O(|V|^2)$ Recall that Kargers is a Monte Carlo algorithm, therefore the probability that Kargers returns a min cut is at least $\frac{1}{n \choose 2}$ ## Summary 1. A Cut in a graph $G$ is defined as the partition of the vertices in a graph into two disjoint subsets. 2. A minimum cut is defined as a cut that is minimal in either the number of edges that cross the cut (unweighted) or the weights of the edges that cross the cut (weighted). 3. The first variation is known as the "Minimum s-t Cut Problem". The second variation is known as the "Global Minimum Cut Problem". 4. Min-Cut Max-Flow theorem allows us to use the answer from one as the answer to the other. 5. Can use Ford-Fulkerson Algorithm for s-t problem, and Krugals for global problem. 6. Solutions to the minimum cut problem are useful in predicting network failure, image segmentation, and many other applications. ## Understanding Question 1 #### A cut is defined as the partition of the vertices in a graph into two disjoint proper subsets the partition of the vertices in a graph into two disjoint subsets the partition of the edges in a graph into two disjoint proper subsets the partition of the vertices in a graph into three subsets Recall that a cut must not only be a partition of vertices into two disjoint subsets, but those subsets must also be proper! (i.e $C \neq \emptyset, V$) ## Understanding Question 2 #### Kargers Algorithm is known as a Monte Carlo algorithm Las Vegas algorithm Roulette algorithm Casino algorithm Krugals is a Monte Carlo algorithm since its runtime is bounded in the size of input, but terminates with a small probability of having an incorrect answer. Minimum Cut Problem [Overview]
2,074
8,898
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.375
4
CC-MAIN-2024-30
latest
en
0.919938
https://discuss.python.org/t/interpret-for-i-in-n-as-for-i-in-range-n-if-n-is-an-int/43457
1,708,477,660,000,000,000
text/html
crawl-data/CC-MAIN-2024-10/segments/1707947473360.9/warc/CC-MAIN-20240221002544-20240221032544-00752.warc.gz
225,588,127
12,317
# Interpret "for i in n" as "for i in range(n)" if n is an int I expect that this idea will be shot down but I’m curious to hear why. As a pure convenience / syntactic sugar thing, I’d love not having to write “for i in range(n)” ever again and instead be able to say “for i in n” with no ambiguity (at least when n is an integer at runtime). Is there any chance that this could be proposed for discussion or is it, for some reason, totally out of the question? 1 Like Well, it’s not one that’s completely new to us There are a few things that go with the concept of “being a collection”. A collection contains things, and when you iterate over it, you get handed each of those things in turn; you can also take an existing thing and ask “is this in the collection?”. Example: ``````numbers = range(10, 50, 3) for n in numbers: print(n, n in numbers) `````` This will print “True” for each value. Now, you can’t do this trick with everything (some objects destroy themselves as you iterate over them, so you can EITHER ask if something’s in the collection OR iterate, but not both), but for most common sequences, it’s the case. So if `for i in 10:` should yield the series of integers from 0 to 9 inclusive, then `3 in 10` should be True. That doesn’t really make sense. There are a few logical ways that one integer could be “contained in” another (treating the containing integer as a set of prime factors, or powers of two, or maybe non-consecutive Fibonacci numbers), but I don’t think many people would agree that “is non-negative and smaller than it” is one of those ways. That’s really the problem here: it’s kinda neat to be able to iterate N times conveniently, but to do so, you would have to forfeit tidiness somewhere else. 2 Likes Those (very common in Mathematics) who see natural numbers as von Neumann ordinals will see `3 in 10` as `True`. Not saying that I think that Python should do this, though. 6 Likes That sounds like `for _ in` instead of their `for i in` and wouldn’t even need a `range`. I’ve sometimes desired that, like an `n times: ...` syntax similar to Ruby’s `n.times { ... }`. Would be faster since unlike the `range` iterator, it wouldn’t have to produce `int` objects. 2 Likes That’s true, and if ALL you need is “do this N times”, without any kind of loop counter, then sure! A very narrow use-case, but I know a few languages that have dedicated syntax for this. To have an iteration counter though, you would need to yield consecutive integers in some way. I would say that interfaces should be as small as possible while remaining as useful as possible. Integers don’t implement iterable because they are extremely useful without that interface. Yes, you could add the iterable interface, but doing that would obscure bugs that would otherwise be caught in exchange for the minor convenience you propose. Also, your proposal isn’t that much of a convenience since, in my opinion, a language should be optimized for reading rather than writing. 7 Likes Furthermore, it’s not entirely clear what should be iterated over. You could iterate over the bits (or digits in any base really), the 30-bit units ints are made of, or the range 0-n. None is obvious so it’s probably for the best that you have to have to choose one explicitly. 2 Likes Appreciate everyone’s thoughts here. Perhaps I do an above average amount of “for i in range(n)” for some reason, and thus would disproportionately benefit from the convenience Maybe the cleanest solution (though unlikely to exceed the bar requied to introduce a new “primitive”) would then be an upto keyword to be used like: “for i upto n” which would behave as “for i in range(n)” if n is an integer, and raise an error otherwise. What do you do that requires so much `for i in range(n)`? I use it sparingly because there’s almost always a better alternative: Iterating over a container/sequence/iterator? Just iterate over it directly: ``````container = ["a", "b", "c"] for item in container: print(item) # a # b # c `````` Need the index as well as the objects? Use the `enumerate` builtin: ``````for i, item in enumerate(container): print(f"{i}, {item}") # 0, a # 1, b # 2, c `````` Need to iterate over two (or more) things at the same time? Use `zip`: ``````other_container = [3.14, 2.71, 42.0] for item, other_item in zip(container, other_container): print(f"{item}, {other_item}") # a, 3.14 # b, 2.71 # c, 42.0 `````` Need to iterate over a thing in reverse? Use `reversed`: ``````for item in reversed(container): print(item) # c # b # a `````` Think you have a special use case that isn’t covered by builtins? Look at the `itertools` module (It’s one of the most useful ones in the stdlib). Typically, you only need to iterate using indices when you mutate the underlying container, otherwise you should avoid it. 4 Likes Just for fun: we already have syntax for that! It’s spelled `for[]in[[]]*`. No `int` objects produced, and no dummy variable names needed. Example usage: ``````>>> for[]in[[]]* 5: print("Hello") ... Hello Hello Hello Hello Hello `````` The variant syntax `for()in((),)*` is one character longer, but likely more efficient (especially for a constant number of repetitions): ``````>>> dis.dis("for()in((),)* 3: print('Hello')") 0 0 RESUME 0 1 2 LOAD_CONST 0 (((), (), ())) 4 GET_ITER >> 6 FOR_ITER 11 (to 32) 10 UNPACK_SEQUENCE 0 14 PUSH_NULL 20 CALL 1 28 POP_TOP 30 JUMP_BACKWARD 13 (to 6) >> 32 END_FOR 34 RETURN_CONST 2 (None) `````` 19 Likes It’s quite possible that I use it in cases where there exist better alternatives. However, I just searched for cases where this pattern is used in the standard lib of a Python 3.12 env I had handy. It’s not a million hits, but it’s still reasonably frequent. Seeing a bunch of “for i in range(len(x))” which I find even more jarring and also use quite a bit. ``````\$ grep -r --include="*.py" "for .* in range([^,]*):" /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/ | wc -l 1377 \$ grep -r --include="*.py" "for .* in range([^,]*):" /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/ | head -n 40 /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/sunau.py: for i in range(4): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/sunau.py: for i in range(4): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/warnings.py: for x in range(stacklevel-1): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/gzip.py: for i in range(count // self._buffer_size): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for i in range(self.bufsize): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: >>> for _ in range(36): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: >>> for i in range(200): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for i in range(steps): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: >>> for i in range(200): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: >>> for i in range(8): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for _ in range(steps): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: >>> for i in range(4): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: >>> for i in range(8): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for i in range(3): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for _ in range(4): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for i in range(5): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for i in range(5): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for _ in range(18): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for _ in range(3): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/turtle.py: for _ in range(4): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/pyshell.py: for i in range(3): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/pyshell.py: for i in range(len(sys.path)): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/idle_test/test_configdialog.py: for _ in range(2): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/idle_test/test_sidebar.py: for i in range(steps): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/idle_test/test_undo.py: for i in range(max_undo + 10): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/pyparse.py: for tries in range(5): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/zzdummy.py: for pos in range(len(lines) - 1): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/run.py: for i in range(3): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/run.py: for i in range(len(tb)): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/scrolledlist.py: for i in range(30): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/editor.py: for insertpt in range(len(line)): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/editor.py: for i in range(20): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/debugger.py: for i in range(len(stack)): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/format.py: for pos in range(len(lines)): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/format.py: for pos in range(len(lines)): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/format.py: for pos in range(len(lines) - 1): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/format.py: for pos in range(len(lines)): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/format.py: for pos in range(len(lines)): /home/andrei/.pyenv/versions/3.12.1/lib/python3.12/idlelib/format.py: for pos in range(len(lines)): `````` Oh yeah you said `for i in range(n)` and not `for i in range(len(x))`. I think I agree that the first case is useful at times. But not so useful and common that it needs special syntax, beyond that it’s kinda (if you squint really hard) syntactic sugar for ``````i = 0 while i < n: print(i) i += 1 `````` If I saw someone write `for[]in[[]]*` I would call the police 11 Likes Hey, it could be worse. Have you seen the “wide addition” operator? ``````x = 5 x -=- 3 print(x) # 8 `````` 16 Likes We really do a need a FAITHBR (Frequently Asked Ideas that Have Been Rejected) somewhere … But anyway, I’m not supportive of this idea, but I don’t think this logic holds: Back in the day, Python was all about `Sequence`s – or maybe `Collection`s. But modern Python is more about Iterables. `for _ in` is a way to iterate, that requires an iterable. `in` by itself invokes `__contains__` – and is about inclusion in a collection. They use the same word, and there is often a parallel, but that doesn’t mean that there has to be – there are any number of iterables that are not containers. There is nothing surprising about that. In fact, I wonder if the `range` object would be a container if it hadn’t evolved from the original `range()` that created a realized list. Does it get used that way often? (not in my code). I still don’t think it’s a good idea for the other reasons posted in this thread, but the idea that anything iterable should be container is not compelling to me. NOTE: If an object is both an iterable and a container, then yes, there should be symmetry – e.g. what dicts do: using the keys for iteration and contains. 4 Likes But the current Python spec disagrees. The `in` operator falls back to iteration if no `__contains__` method is implemented, I would think that is what @Rosuav was talking about: ``````class TestIter: def __iter__(self): yield 1 yield 2 yield 3 print(2 in TestIter()) `````` prints `True` 2 Likes Ouch! I had forgotten about that – that’s got to be a legacy of the old Sequence-forcused model – but it’s not a great idea today. It’s likely to be highly inefficient, and perhaps destructive if a user inadvertently exhausts an iterator [*]. In fact, I’m pretty sure that there have been discussions about deprecatiing that behavior. In any case, I would likely define a `__contains__ ` that raises for iterables that are not containers. [*] or even worse, a endless loop if the iterable never terminates – e.g.: ``````'fred' in itertools.count() `````` locks my interpreter – CTRL+C doesn’t even work, presumably, becasue `count()` is written in C? Note to self – propose a PR where `__contains__` is defined, and raises, for `itertools.count()` 3 Likes Well don’t use it for bad stuff, only for good stuff. 1 Like Yes, but it’s not JUST a fallback/default, it’s also an excellent elegance of design. If you go through a collection and look at everything in that collection, each of those things is in the collection. It stands to reason. 1 Like Not sure tbh. I don’t think it should be changed now, but I don’t think it would have been added in a world post-generators. You can have lots of objects that have `__iter__` but which don’t really represent a collection of things, and people might not expect it to suddenly exhaust a generator. I personally never have been bitten by this, but I also don’t think I ever benefited from it. IIRC, the `collections.abc.Collection` interface implements `__contains__` by explicitly iterating instead of relying on the implicit nature, so in a world where those ABCs exists, I don’t see much a point in this behavior. But this is pretty off-topic now. If anyone wants to actually suggest removing this behavior or overwriting `__contains__` for a few builtin iters, they can suggest that in a different thread. Either of these option should probably be done before the OP proposal can be implemented [1] so that there is an established way to make sure that `1 in 3` raises a clear exception. 1. not that I am in favor of it. IMO saving the effort to type `range()` is not worth it ↩︎ 1 Like
3,958
14,217
{"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-2024-10
latest
en
0.942266
https://www.physicsforums.com/threads/damped-oscillator-problem-very-hard.270446/
1,571,352,087,000,000,000
text/html
crawl-data/CC-MAIN-2019-43/segments/1570986677230.18/warc/CC-MAIN-20191017222820-20191018010320-00059.warc.gz
1,057,207,514
17,238
# Damped Oscillator Problem - Very Hard #### Dillio 1. Homework Statement I have read the chapter twice and I have read through the notes several times to help me with the homework assignment. It deals with damped Harmonic Oscillations. Problem: You have a mass submerged horizontally in oil and a spring with a k of 85 N/m pulls on a mass of 250g in oil with a b = 0.07 Kg/s 1. What is the period of oscillation? I found the angular frequency of the system and then used the 2(pi) / omega to find the period. I found this to be around 0.3407 seconds. Is this correct? 2. How long does it take for the amplitude to die down to 0.5 amplitude of the max? There seems to be nothing in the book or the notes that helps with solving this unless I am missing something. I do not know a distance (or position), Amplitude, or phase angle to use the equation found in the book. I found an answer of 4.95 seconds but I am not sure if that is correct since no equation in the book solves something like this. I took the Amplitude term of the damped harmonic oscillator equation and set it equal to 0.5A and solved for t. 3. How long until the total energy is 0.5 the initial value? The book just gives the rate of energy loss in terms of a velocity value and a b value, which was not given. Absolutely no clue here.... I appreciate ANY help! Thanks. Related Introductory Physics Homework Help News on Phys.org #### alphysicist Homework Helper Hi Dillio, 1. Homework Statement I have read the chapter twice and I have read through the notes several times to help me with the homework assignment. It deals with damped Harmonic Oscillations. Problem: You have a mass submerged horizontally in oil and a spring with a k of 85 N/m pulls on a mass of 250g in oil with a b = 0.07 Kg/s 1. What is the period of oscillation? I found the angular frequency of the system and then used the 2(pi) / omega to find the period. I found this to be around 0.3407 seconds. Is this correct? That looks right to me. 2. How long does it take for the amplitude to die down to 0.5 amplitude of the max? There seems to be nothing in the book or the notes that helps with solving this unless I am missing something. I do not know a distance (or position), Amplitude, or phase angle to use the equation found in the book. I found an answer of 4.95 seconds but I am not sure if that is correct since no equation in the book solves something like this. I took the Amplitude term of the damped harmonic oscillator equation and set it equal to 0.5A and solved for t. That looks right to me. 3. How long until the total energy is 0.5 the initial value? The book just gives the rate of energy loss in terms of a velocity value and a b value, which was not given. In #2 you found the time for the amplitude to reach half of its starting value. For #3, when the energy is half of its value, what is the amplitude (compared to the original amplitude)? Once you answer that you can follow the same procedure you used in #2. #### Dillio For #3, when the energy is half of its value, what is the amplitude (compared to the original amplitude)? Once you answer that you can follow the same procedure you used in #2. I used E = 0.5kA^2 and found A to be equal to sqrt([2E]/k). To solve for the energy when it is one half of its original value. I made the second energy equation: 05E = 0.5kA^2. I solved for this amplitude and found sqrt(E/k). That means the second amplitude is related to the initial energy by: E/sqrt(2) I solved this for t in the amplitude equation and actually found 2.4 seconds, which is about half the time value I found in part 2. Does this make sense? ### Physics Forums Values We Value Quality • Topics based on mainstream science • Proper English grammar and spelling We Value Civility • Positive and compassionate attitudes • Patience while debating We Value Productivity • Disciplined to remain on-topic • Recognition of own weaknesses • Solo and co-op problem solving
968
3,970
{"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-2019-43
latest
en
0.949043
https://www.brainkart.com/article/Choropleth-Method_41158/
1,679,474,682,000,000,000
text/html
crawl-data/CC-MAIN-2023-14/segments/1679296943809.22/warc/CC-MAIN-20230322082826-20230322112826-00301.warc.gz
770,538,041
7,263
Home | | Geography 12th Std | Choropleth Method # Choropleth Method The choropleth map uses shades or tints to show intensity or distribution of a particular element. Choropleth Method The choropleth map uses shades or tints to show intensity or distribution of a particular element. It takes into account administrative units which form the basis of spatial distribution of data. That is why shading conforms to administrative units. The density patterns are highlighted by light shading (low density) and dark shading (high density). ## Uses of choropleth map Choropleth maps are drawn to represent densities per unit area within political divisions. Thus, these maps show population per square kilometre or yield per hectare. The choropleth maps are also drawn to depict the data characteristics as they are related to the administrative units. These maps are used to represent the density of population, literacy, growth rates, sex ratio, etc. These maps also show percentages, for example, percentage of area under wheat cultivation to the total cropped area. ### How to interpret a choropleth 1. Identify the geographic feature or phenomena being mapped. 2. Verify the value of each shade used on the map. This can be done by reading the map’s legend. 3. Identify the scale of the administrative regions shown on the map. 4. Using the key as a guide, identify the areas of the map that share the same colour shading and the same quantity volume of the feature being mapped. 5. Describe the density or concentration of the feature within and between different areas of the map. ### Requirement for drawing Choropleth Map a. A map of the area depicting different administrative units. b. Appropriate statistical data according to administrative units. ### Steps to be followed a. Arrange the data in ascending or descending order. b. Group the data into 5 categories to represent very high, high, medium, low and very low concentrations. c. The interval between the categories may be identified on the following formulae i.e., Range/5 (Range = maximum value – minimum value). d. Patterns, shades or colour to be used to depict the chosen categories should be marked in an increasing or decreasing order. Example Construct a Choropleth map to represent the literacy rates in Tamil Nadu as given in Table 11.2. Table 11.2 Original Data Literacy rate of Tamilnadu – 2011 Table 11.3 Table arranged in descending order ### Construction a. Arrange the data in descending order as shown above. b. Identify the range within the data. In the present case, the districts with record of the highest and lowest literacy rates are Kanyakumari (91.75%) and Dharmapuri (68.54%) respectively. Hence, the range would be 91.75 – 68.54 =23.21. c. Divide the range in to 5 to get categories from very low to very high. d. Determine the number of the categories along with the range of each category. ### We will finally get following categories e. Assign shades/pattern to each category ranging from lower to higher values. f. Prepare the map as shown in Figure. Tags : Thematic Map , 12th Geography : Chapter 11 : Thematic Mapping Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail 12th Geography : Chapter 11 : Thematic Mapping : Choropleth Method | Thematic Map
723
3,333
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.09375
3
CC-MAIN-2023-14
longest
en
0.847048
http://statalist.blogspot.com/2006/01/st-re-cloglog-loglog-etc_03.html
1,503,322,737,000,000,000
text/html
crawl-data/CC-MAIN-2017-34/segments/1502886108709.89/warc/CC-MAIN-20170821133645-20170821153645-00237.warc.gz
384,108,742
7,888
## st: RE: cloglog, loglog, etc PLUM does -- in part -- what SAS does. It reverses the response 0/1 relationship. Stata and many other software packages parameterize the binary response of 1 as a success. SAS and PLUM do the reverse. Moreover, PLUM's nloglog reverses the sign of the standard loglog output, hence the -n- in nloglog. SAS, following other packages, uses the loglog link. With respect to priority, I tend to follow GLIM, the software developed by the founders of GLM methodology. They used the same parameterization for cloglog as did Fisher when he initially derived it in 1922. use lbw gen low0 = 1 if low ==0 replace low0 = 0 if low==1 SUMMARY glm low *, cloglog = gologit2b low *, nloglog (loglog with reversed sign) glm low0 *, cloglog = gologit2b low0 *, nloglog (loglog with reversed sign) glm low *, loglog = gologit2b low *, cloglog glm low0 *, loglog = gologit2b low0 *, cloglog Joe Hilbe . glm low age smoke ptl, nolog fam(bin) link(cloglog) Generalized linear models No. of obs = 189 Optimization : ML Residual df = 185 Scale parameter = 1 Deviance = 222.6159083 (1/df) Deviance = 1.203329 Pearson = 185.6292037 (1/df) Pearson = 1.003401 Variance function: V(u) = u*(1-u) [Bernoulli] Link function : g(u) = ln(-ln(1-u)) [Complementary log-log] AIC = 1.22019 Log likelihood = -111.3079541 BIC = -747.1073 ------------------------------------------------------------------------------ | OIM low | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | -.047111 .0274916 -1.71 0.087 -.1009935 .0067715 smoke | .4509498 .2700837 1.67 0.095 -.0784045 .9803041 ptl | .4689538 .191363 2.45 0.014 .0938892 .8440184 _cons | -.2137965 .6398918 -0.33 0.738 -1.467961 1.040368 ------------------------------------------------------------------------------ . glm low0 age smoke ptl, nolog fam(bin) link(cloglog) Generalized linear models No. of obs = 189 Optimization : ML Residual df = 185 Scale parameter = 1 Deviance = 220.0134175 (1/df) Deviance = 1.189262 Pearson = 188.1663766 (1/df) Pearson = 1.017116 Variance function: V(u) = u*(1-u) [Bernoulli] Link function : g(u) = ln(-ln(1-u)) [Complementary log-log] AIC = 1.20642 Log likelihood = -110.0067088 BIC = -749.7098 ------------------------------------------------------------------------------ | OIM low0 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .0373414 .0190252 1.96 0.050 .0000526 .0746302 smoke | -.3452314 .1994667 -1.73 0.083 -.736179 .0457162 ptl | -.5769123 .2454426 -2.35 0.019 -1.057971 -.0958536 _cons | -.4593313 .453224 -1.01 0.311 -1.347634 .4289715 ------------------------------------------------------------------------------ . glm low age smoke ptl, nolog fam(bin) link(loglog) Generalized linear models No. of obs = 189 Optimization : ML Residual df = 185 Scale parameter = 1 Deviance = 220.0134175 (1/df) Deviance = 1.189262 Pearson = 188.1663766 (1/df) Pearson = 1.017116 Variance function: V(u) = u*(1-u) [Bernoulli] Link function : g(u) = -ln(-ln(u)) [Log-log] AIC = 1.20642 Log likelihood = -110.0067088 BIC = -749.7098 ------------------------------------------------------------------------------ | OIM low | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | -.0373414 .0190252 -1.96 0.050 -.0746302 -.0000526 smoke | .3452314 .1994667 1.73 0.083 -.0457162 .736179 ptl | .5769123 .2454426 2.35 0.019 .0958536 1.057971 _cons | .4593313 .453224 1.01 0.311 -.4289715 1.347634 ------------------------------------------------------------------------------ glm low0 age smoke ptl, nolog fam(bin) link(loglog) Generalized linear models No. of obs = 189 Optimization : ML Residual df = 185 Scale parameter = 1 Deviance = 222.6159083 (1/df) Deviance = 1.203329 Pearson = 185.6292037 (1/df) Pearson = 1.003401 Variance function: V(u) = u*(1-u) [Bernoulli] Link function : g(u) = -ln(-ln(u)) [Log-log] AIC = 1.22019 Log likelihood = -111.3079541 BIC = -747.1073 ------------------------------------------------------------------------------ | OIM low0 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .047111 .0274916 1.71 0.087 -.0067715 .1009935 smoke | -.4509498 .2700837 -1.67 0.095 -.9803041 .0784045 ptl | -.4689538 .191363 -2.45 0.014 -.8440184 -.0938892 _cons | .2137965 .6398918 0.33 0.738 -1.040368 1.467961 ------------------------------------------------------------------------------ . gologit2b low age smoke ptl, nolog link(cloglog) Generalized Ordered Cloglog Estimates Number of obs = 189 LR chi2(3) = 14.66 Prob > chi2 = 0.0021 Log likelihood = -110.00671 Pseudo R2 = 0.0625 ------------------------------------------------------------------------------ low | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | -.0373414 .0190252 -1.96 0.050 -.0746302 -.0000526 smoke | .3452314 .1994667 1.73 0.083 -.0457162 .736179 ptl | .5769123 .2454426 2.35 0.019 .0958536 1.057971 _cons | .4593313 .453224 1.01 0.311 -.4289715 1.347634 ------------------------------------------------------------------------------ . gologit2b low age smoke ptl, nolog link(nloglog) Generalized Ordered Nloglog Estimates Number of obs = 189 LR chi2(3) = 12.06 Prob > chi2 = 0.0072 Log likelihood = -111.30795 Pseudo R2 = 0.0514 ------------------------------------------------------------------------------ low | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | -.047111 .0274916 -1.71 0.087 -.1009935 .0067716 smoke | .4509498 .2700837 1.67 0.095 -.0784045 .9803041 ptl | .4689538 .191363 2.45 0.014 .0938892 .8440184 _cons | -.2137968 .6398918 -0.33 0.738 -1.467962 1.040368 ------------------------------------------------------------------------------ . . gologit2b low0 age smoke ptl, nolog link(cloglog) Generalized Ordered Cloglog Estimates Number of obs = 189 LR chi2(3) = 12.06 Prob > chi2 = 0.0072 Log likelihood = -111.30795 Pseudo R2 = 0.0514 ------------------------------------------------------------------------------ low0 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .047111 .0274916 1.71 0.087 -.0067716 .1009935 smoke | -.4509498 .2700837 -1.67 0.095 -.9803041 .0784045 ptl | -.4689538 .191363 -2.45 0.014 -.8440183 -.0938892 _cons | .2137967 .6398917 0.33 0.738 -1.040368 1.467961 ------------------------------------------------------------------------------ . gologit2b low0 age smoke ptl, nolog link(nloglog) Generalized Ordered Nloglog Estimates Number of obs = 189 LR chi2(3) = 14.66 Prob > chi2 = 0.0021 Log likelihood = -110.00671 Pseudo R2 = 0.0625 ------------------------------------------------------------------------------ low0 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .0373414 .0190252 1.96 0.050 .0000526 .0746302 smoke | -.3452314 .1994667 -1.73 0.083 -.736179 .0457162 ptl | -.5769123 .2454426 -2.35 0.019 -1.057971 -.0958536 _cons | -.4593313 .453224 -1.01 0.311 -1.347634 .4289715 ------------------------------------------------------------------------------ . One last thing - here are examples of how to clone what spss does in PLUM, including its test of parallel lines. i.e. this gives you ordered logit, ordered probit, etc. I can send you the corresponding SPSS output if you want. webuse nhanes2f, clear * Logit link (default) gologit2c health female black age, pl lrf link(l) store(logit_pl) quietly gologit2c health female black age, npl lrf link(l) store(logit_npl) * Clone SPSS's test of parallel lines lrtest logit_pl logit_npl * Probit link gologit2c health female black age, pl lrf link(p) store(probit_pl) quietly gologit2c health female black age, npl lrf link(p) store(probit_npl) * Clone SPSS's test of parallel lines lrtest probit_pl probit_npl * SPSS's cloglog, which Stata calls loglog gologit2c health female black age, pl lrf link(c) store(cloglog_pl) quietly gologit2c health female black age, npl lrf link(c) store(cloglog_npl) lrtest cloglog_pl cloglog_npl * SPSS's nloglog, which Stata calls cloglog gologit2c health female black age, pl lrf link(n) store(nloglog_pl) quietly gologit2c health female black age, npl lrf link(n) store(nloglog_npl) lrtest nloglog_pl nloglog_npl ------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 FAX: (574)288-4373 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW (personal): http://www.nd.edu/~rwilliam WWW (department): http://www.nd.edu/~soc * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ Tag: << Home
2,727
9,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}
2.546875
3
CC-MAIN-2017-34
longest
en
0.641611
https://www.tutorialspoint.com/double-hashing-in-data-structure
1,716,331,799,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971058522.2/warc/CC-MAIN-20240521214515-20240522004515-00845.warc.gz
910,601,694
24,722
# Double Hashing in Data Structure In this section we will see what is Double Hashing technique in open addressing scheme. There is an ordinary hash function h´(x) : U → {0, 1, . . ., m – 1}. In open addressing scheme, the actual hash function h(x) is taking the ordinary hash function h’(x) when the space is not empty, then perform another hash function to get some space to insert. $$h_{1}(x)=x\:mod\:m$$ $$h_{2}(x)=x\:mod\:m^{\prime}$$ $$h(x,i)=(h^{1}(x)+ih^{2})\:mod\:m$$ The value of i = 0, 1, . . ., m – 1. So we start from i = 0, and increase this until we get one free space. So initially when i = 0, then the h(x, i) is same as h´(x). ## Example Suppose we have a list of size 20 (m = 20). We want to put some elements in linear probing fashion. The elements are {96, 48, 63, 29, 87, 77, 48, 65, 69, 94, 61} $$h_{1}(x)=x\:mod\:20$$ $$h_{2}(x)=x\:mod\:13$$ x h(x, i) = (h1 (x) + ih2(x)) mod 20 Hash Table Updated on: 10-Aug-2020 3K+ Views ##### Kickstart Your Career Get certified by completing the course
356
1,029
{"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}
3.3125
3
CC-MAIN-2024-22
latest
en
0.745465
https://www.traditionaloven.com/building/beach-sand/convert-beach-sand-cup-jp-to-tonne-si-beach-sand.html
1,547,870,067,000,000,000
text/html
crawl-data/CC-MAIN-2019-04/segments/1547583662124.0/warc/CC-MAIN-20190119034320-20190119060320-00484.warc.gz
977,810,098
11,950
 Beach Sand 1 cup Japanese volume to Metric tonnes converter # beach sand conversion ## Amount: 1 cup Japanese (cup) of volume Equals: 0.00031 Metric tonnes (t) in weight Converting cup Japanese to Metric tonnes value in the beach sand units scale. TOGGLE :   from Metric tonnes into cups Japanese in the other way around. ## beach sand from cup Japanese to tonne (Metric) Conversion Results: ### Enter a New cup Japanese Amount of beach sand to Convert From * Whole numbers, decimals or fractions (ie: 6, 5.33, 17 3/8) * Precision is how many numbers after decimal point (1 - 9) Enter Amount : Decimal Precision : CONVERT :   between other beach sand measuring units - complete list. Conversion calculator for webmasters. ## Beach sand weight vs. volume units Beach sand has quite high density, it's heavy and it easily leaks into even tiny gaps or other opened spaces. No wonder it absorbs and conducts heat energy from the sun so well. However, this sand does not have the heat conductivity as high as glass does, or fireclay and firebricks, or dense concrete. A fine beach sand in dry form was used for taking these measurements. Convert beach sand measuring units between cup Japanese (cup) and Metric tonnes (t) but in the other reverse direction from Metric tonnes into cups Japanese. conversion result for beach sand: From Symbol Equals Result To Symbol 1 cup Japanese cup = 0.00031 Metric tonnes t # Converter type: beach sand measurements This online beach sand from cup into t converter is a handy tool not just for certified or experienced professionals. First unit: cup Japanese (cup) is used for measuring volume. Second: tonne (Metric) (t) is unit of weight. ## beach sand per 0.00031 t is equivalent to 1 what? The Metric tonnes amount 0.00031 t converts into 1 cup, one cup Japanese. It is the EQUAL beach sand volume value of 1 cup Japanese but in the Metric tonnes weight unit alternative. How to convert 2 cups Japanese (cup) of beach sand into Metric tonnes (t)? Is there a calculation formula? First divide the two units variables. Then multiply the result by 2 - for example: 0.00030584 * 2 (or divide it by / 0.5) QUESTION: 1 cup of beach sand = ? t 1 cup = 0.00031 t of beach sand ## Other applications for beach sand units calculator ... With the above mentioned two-units calculating service it provides, this beach sand converter proved to be useful also as an online tool for: 1. practicing cups Japanese and Metric tonnes of beach sand ( cup vs. t ) measuring values exchange. 2. beach sand amounts conversion factors - between numerous unit pairs variations. 3. working with mass density - how heavy is a volume of beach sand - values and properties. International unit symbols for these two beach sand measurements are: Abbreviation or prefix ( abbr. short brevis ), unit symbol, for cup Japanese is: cup Abbreviation or prefix ( abbr. ) brevis - short unit symbol for tonne (Metric) is: t ### One cup Japanese of beach sand converted to tonne (Metric) equals to 0.00031 t How many Metric tonnes of beach sand are in 1 cup Japanese? The answer is: The change of 1 cup ( cup Japanese ) volume unit of beach sand measure equals = to weight 0.00031 t ( tonne (Metric) ) as the equivalent measure within the same beach sand substance type. In principle with any measuring task, switched on professional people always ensure, and their success depends on, they get the most precise conversion results everywhere and every-time. Not only whenever possible, it's always so. Often having only a good idea ( or more ideas ) might not be perfect nor good enough solution. If there is an exact known measure in cup - cups Japanese for beach sand amount, the rule is that the cup Japanese number gets converted into t - Metric tonnes or any other beach sand unit absolutely exactly. Conversion for how many Metric tonnes ( t ) of beach sand are contained in a cup Japanese ( 1 cup ). Or, how much in Metric tonnes of beach sand is in 1 cup Japanese? To link to this beach sand cup Japanese to Metric tonnes online converter simply cut and paste the following. The link to this tool will appear as: beach sand from cup Japanese (cup) to Metric tonnes (t) conversion. I've done my best to build this site for you- Please send feedback to let me know how you enjoyed visiting.
971
4,327
{"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-04
longest
en
0.885115
https://tutorme.com/tutors/198382/interview/
1,590,452,876,000,000,000
text/html
crawl-data/CC-MAIN-2020-24/segments/1590347390437.8/warc/CC-MAIN-20200525223929-20200526013929-00404.warc.gz
594,701,218
53,673
Enable contrast version # Tutor profile: John-paul M. Inactive John-paul M. Experienced Math and English Tutor Tutor Satisfaction Guarantee ## Questions ### Subject:Geometry TutorMe Question: Darryl is wrapping a giant teddy bear for his toddler brother in a gift box for Christmas. The box is 12 feet tall, six feet wide, and eight feet long. How much wrapping paper will he need to completely cover the box? Inactive John-paul M. 1. Set up a surface area equation: SA = 2(lw + wh + hl). SA represents the surface area of the box; l, the length; w, the width; and h, the height. 2. Substitute the variables with the numbers mentioned in the word problem: SA = 2[8(6) + 6(12) + 12(8)]. 3. Using the order of operations, multiply the terms in the inner parentheses. 8 x 6 = 48, 6 x 12 = 72, and 12 x 8 = 96. 4. Add the terms in parentheses. 48 + 72 + 96 = 216. 5. Multiply the above sum by two. 216 x 2 = 432. 6. Attach the units. Multiplying feet by feet results in square feet, so 432 becomes 432 square feet. Answer: Darryl needs 432 square feet of wrapping paper to completely cover the gift box. ### Subject:Pre-Algebra TutorMe Question: Kyle wants to buy a \$500 laptop computer, but he only has \$200 in his bank account. He works as a tutor on weekends, earning \$30 per session. Write a formula representing this situation and calculate the number of weeks it will take for Kyle to buy the laptop. Let t represent the time in weeks. Inactive John-paul M. 1. Write a formula representing the situation: 200 + 30t = 500. 2. Subtract 200 on both sides. 500 - 200 = 300, and 200 - 200 = 0. So 30t = 300. 3. Divide by 30 on both sides. 30t ÷ 30 = t, and 300 ÷ 30 = 10. So t = 10. Answer: It will take 10 weeks for Kyle to buy the laptop. ### Subject:Basic Math TutorMe Question: Brenda has saved \$100 to spend on birthday gifts for her daughter Brianna. Brianna enjoys reading, and her birthday wish is to own as many books as possible. Brenda decides to visit a bookstore a children’s book cost \$7. How many books can Brenda buy with the \$100 she has? Inactive John-paul M. 1. Set up a long division problem: 100 ÷ 7 = ? 2. Since 7 can go into 10 once (and 7 x 1 = 7), subtract 7 from 10 to get 3, drag down the second 0 in 100, and place a 1 on top of the first 0. 3. Since 7 can go into 30 four times (and 7 x 4 = 28), subtract 28 from 30 to get the remainder, 2, and place a 4 on top of the second 0. 4. The quotient is 14, remainder 2. Answer: Brenda can buy 14 books with the \$100 she has. ## Contact tutor Send a message explaining your needs and John-Paul will reply soon. Contact John-Paul
770
2,625
{"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.53125
5
CC-MAIN-2020-24
longest
en
0.895039
https://www.hotrod.com/articles/ctrp-0404-weight-transfer-distribution/
1,575,957,219,000,000,000
text/html
crawl-data/CC-MAIN-2019-51/segments/1575540525821.56/warc/CC-MAIN-20191210041836-20191210065836-00352.warc.gz
739,885,294
39,800
# Setup Crutches: Weight Transfer And Distribution ## The Weight Distributed In The Race Car Can Tell A Lot About Setup There is a lot to know about weight distribution in a stock car. In the past few years, we have learned why weight distribution affects the setup and how we can improve our setups to take advantage of different weight distribution ranges related to specific types of race cars and various racetracks. Weight distribution can be defined in several ways. It can mean the placement of the physical weight throughout the car and can be read in percents such as left-to-right-side percent, front-to-rear percent, and sprung and unsprung weight. It can also be read as center of gravity height. These numbers are fixed for a particular race car until we move weight around in the car. This should be dynamic weight, which consists of the driver and all fluids, just like when you are racing the car. The other measure is the total weight of the car, in percentages, that each tire supports. Depending on how we mount or adjust our spring heights, the amount of weight supported by each tire can change. Weight jacking bolts on big spring cars and the adjuster rings on coilover shock/spring-type cars are the tools used to change this distribution of weight. This changeable distribution of weight is what we often use to tune the handling balance of our race cars. Weight distribution in our cars affects the handling balance. It is an adjustment tool for finding the best handling balance and for tuning the setup to a driver’s preference. Some drivers like a car that is somewhat freer, while some cannot drive a loose car. The reading of the distribution of the total vehicle weight on the four tires is best known as the pavement racers’ term-crossweight percentage, or wedge-or as the dirt racers’ term-left-rear weight. Both refer to basically the same thing. We can tell a lot about how a race car is set up and its balance by analyzing the crossweight percentage that will work with the setup to make the car neutral in the turns. We must remember that a neutral handling car is not necessarily a well balanced car from the perspective of the front and rear working together. For simplicity, we will use crossweight percentage, a universal term, to represent the distribution of weight among the four tires. We find the crossweight percentage by adding the weight on the right-front (RF) and left-rear (LR) tires and dividing that number by the total vehicle weight. The most important thing to know about crossweight is that we cannot build the setup around a particular number, rather tune the crossweight to a balanced setup. If the setup is truly balanced, the neutral handling will be consistent and stay that way for many laps. If the car is unbalanced in the setup, the neutral handling will go away in a short time. Unbalanced setups go away because one tire in an unbalanced setup is doing too much work. It is usually the RF tire, but with the super-soft setups we’ve seen in the past year or so, the right-rear (RR) could be the one that is being abused. If the setup is unbalanced to a great degree with the RF tire working too hard, we may end up with a “tight/loose” condition. This is when, as we have discussed in previous issues, the rear suspension wants to roll more than the front suspension. This condition causes excess weight to transfer to the RF tire, making the front pair of tires less equally loaded. Less equal loading causes less overall traction from a pair of tires, resulting in a push. To compensate for the push, we turn the steering wheel more to the left, and the front tires gain more of an angle of attack. Also in previous issues, we learned that a tire with a greater angle of attack has more traction to a point. The bottom line is that the RF tire is working very hard to turn the car, and it will heat up and wear excessively. In a short time, it will lose much of its ability to grip the racetrack, and the car will start to push. As the car begins to push, the driver turns the steering wheel more until the front has developed more traction than the rear, and the car starts to go loose. This usually happens just as we are applying the throttle to get off the corner. The tight condition has led to a loose off-condition that may heat up the RR tire and cause it to wear excessively and lose grip. We are now abusing two tires because the car has a tight setup. This car started out neutral, but went to proverbial hell. That is why unbalanced setups do not win most races. To be perfectly honest, a short race of 25 or 30 laps can be won by an unbalanced setup. These short runs do not provide enough time for the car to abuse the tires. That said, the balanced setup will still be as fast or faster than one that is unbalanced. Another point of interest is that for every race car and setup, there are several ranges of crossweight that will cause the handling to be neutral. This is not universally known, but through hundreds of cases, it has been proven that one car may have as much as three ranges of crossweight that will make the car neutral. For most short-track cars, given a particular vehicle weight distribution, there is a low and a high range of crossweight that will make the car neutral. With the same springs, moment (roll) center locations front and rear, etc., the car will be neutral at, say, 51.2 percent and 58.6 percent. The area in between is “no man’s land.” The truth is that we can find a certain percentage of crossweight in each range that will make the car neutral in handling. If there are at least two ranges from which to choose, how do we know which to use? We have found the lower crossweight range works best on the higher-banked tracks of 12 degrees or more. For the lower-banked tracks, the high range works better to provide better traction off the corners under acceleration by increasing the loading on the LR tire. On the high-banked tracks, the banking usually creates enough mechanical downforce to provide sufficient traction so the tires will not lose grip under acceleration. The very best dynamic (while in the turns) weight distribution is when we have two sets of equally loaded tires at mid-turn. In the low range, the outside tires will be equally loaded in the turns, and the inside tires will be equally loaded as well. In the high range, the RF and LR tires will be equally loaded, and the left-front (LF) and RR tires will be equal. With this weight distribution, we have more equally loaded pairs of tires at the front and rear at either range to provide the most traction available, allowing us to go through the turns as fast as the car is capable of going. We seek a balanced setup because we need a setup that will provide the best weight distribution at mid-turn. The balanced setup causes the weights to transfer correctly and predictably at each end of the car. Unbalanced setups are highly unpredictable due to weight transfer caused by tire wear or the driver changing lines up and down the racetrack where the track banking is different or the track surface changes its grip characteristics. Handling balance may also change from afternoon (warm) to night (cooler) with an unbalanced setup, whereas a balanced setup stays more consistent. We can predict the best crossweight for a car based on its weight layout, or where the weight is placed in the car. The front-to-rear distribution of weight dictates the crossweight percentage to use. The greater the rear percentage, the more crossweight necessary to run in order to be neutral for each range. If a car needs 52.2 percent crossweight to be neutral based on the front-to-rear percent, and if the team is running 49 or 50 percent and the car is neutral, the setup must be unbalanced. The setup must be a tight one in which the RF tire is working too hard and the car is tight. Reducing the crossweight will make the car more neutral but won’t solve the problem with the unbalanced setup, and the RF tire will continue to do too much work. Even worse, the car will probably be loose off the corner, prompting the crew to make changes that will tighten it, thus intensifying the original problem. Another interesting phenomenon is that as the applied g-forces change, so does the crossweight requirement for a particular car. The higher the g-forces generated by a car, the more crossweight percentage we need. If our car tends to fall off a lot on lap times over a fairly short run, the g-forces drop off also (less turn speed means less g-force). To stay neutral in handling, the required crossweight also needs to come down. Since it cannot change, the car will become tighter by having too much crossweight percentage as the lap times continue to fall off. One advantage of a balanced setup is that lap times stay more consistent, hence less change in the g-forces, as well as the required crossweight, and the more neutral the car remains. * Lap times fall off considerably after 20 or so laps, while the leaders stay consistent. * The RF tire shows excessive heat and wear compared to the other tires. * The LF tire shows considerably less heat and wear than the other tires. * The RR tire shows extreme heat and wear from spinning off the turns. * The driver uses excess steering input at mid-turn compared to faster cars. * The car “snaps” loose just when you get into the throttle. As you make changes to make the car more balanced, the crossweight percentage will need to increase to keep up. If you raise the rear Panhard bar or stiffen the RR spring to reduce the rear roll angle to match the front, the car will become loose if you do not also increase the crossweight. The process of balancing the car involves making the LF tire work harder. As that happens, the car will turn better with more traction available up front, meaning that we must also tighten the car with crossweight. Too many teams make adjustments that make the car more balanced, only to back off because the car gets too loose. * Do weigh your car with the driver to know your exact weight distribution. * Do level your scales, roll the car to take out all binding in the control arms, air up the tires to race pressures, and add all fluids, etc. before you measure the weights. * Do make changes to the crossweight in the shop to know how much difference a turn of the screw or ring makes in the crossweight percentage. * Do change all four corners when making changes to the crossweight percentage to maintain the correct ride heights. To put cross in, put turns into RF and LR springs and take turns out of the LF and RR springs. The opposite takes cross out. * Do make records of your weights. Use the weights taken on racetrack scales for reference only. Do not ever change your crossweight to match the track scales. * Don’t build your setup around a particular crossweight percentage just because you have always run that number. Be open minded in order to find a better combination if that is what you need. * Don’t guess at the crossweight percentage in your car. The old way of jacking up the rear end with a large socket between the jack and the rear differential pumpkin and seeing how far off the ground the RR tire is when the LR tire is just touching is way out of date. * Don’t run the high crossweight range on high-banked tracks unless the banking falls off abruptly and there is a problem getting traction off the corners. And don’t try to run the low range on the flatter tracks with bite-off problems, like I did at one time. That is how I learned about the different ranges. * Don’t move weight around in the car to effect changes to the crossweight percentage. Move the weight jacking devices or shim the springs in a stocker. * Don’t try to match your crossweight to a competitor that is running well. His overall weight distribution and setup may be different than yours, especially the front-to-rear percentage of weight. These setup components all work in combination, and each car’s combination is necessarily different. It has been said that knowledge is power, and as we all know, it can also mean speed. Knowing your weights is a part of that bundle of information you will need about your car in order to be competitive. Don’t be shy about experimenting with items such as weight distribution, and by all means, think outside the box. Once you find that perfect combination, you won’t share it, just as no one shared with you. Then you’ll know why it takes so long to be competitive. You must reach the point where you quit listening to your competitors and start thinking for yourself, no matter how long you’ve been racing.
2,650
12,661
{"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.046875
3
CC-MAIN-2019-51
latest
en
0.957264
https://www.shakuhachi.net/what-are-the-applications-of-integral-equations/
1,708,480,459,000,000,000
text/html
crawl-data/CC-MAIN-2024-10/segments/1707947473360.9/warc/CC-MAIN-20240221002544-20240221032544-00063.warc.gz
1,035,835,736
12,100
Shakuhachi.net Best place for relax your brain What are the applications of integral equations? What are the applications of integral equations? Integral equations are important in many applications. Problems in which integral equations are encountered include radiative transfer, and the oscillation of a string, membrane, or axle. Oscillation problems may also be solved as differential equations. where F is a known function. What is real life application of integral equation? Application in Physics In Physics, Integration is very much needed. For example, to calculate the Centre of Mass, Centre of Gravity and Mass Moment of Inertia of a sports utility vehicle. To calculate the velocity and trajectory of an object, predict the position of planets, and understand electromagnetism. What are integrals used for in computer science? So yes, integrals are used as the base mathematical concept we use to process data from the real world. Many people get by never looking under the hood of that abstraction, but if you want to really be “full stack” it’s part of the bedrock that your foundation is laid on. How many types of integral equations are there? There are four basic types of integral equations. There are many other integral equations, but if you are familiar with these four, you have a good overview of the classical theory. All four involve the unknown function φ(x) in an integral with a kernel K(x, y) and all have an input function f(x). Why do we study integral equations? Integral equations plays a crucial part of studying an overall effect of several dynamic factors on a process. Take for instance growth with time. What do you mean by integral equation? integral equation, in mathematics, equation in which the unknown function to be found lies within an integral sign. An example of an integral equation is. in which f(x) is known; if f(x) = f(-x) for all x, one solution is. How is integration used in engineering? Several physical applications of the definite integral are common in engineering and physics. Definite integrals can be used to determine the mass of an object if its density function is known. Definite integrals can also be used to calculate the force exerted on an object submerged in a liquid. Are integrals used in programming? So yes, integrals are used as the base mathematical concept we use to process data from the real world. What is integral equation theory? Liquid state integral equation theory was originally developed for atomic and small molecule fluids, but has in the last decades found widespread applications in colloids science. The theory provides a (inter-particle) pair correlation function when the inter-particle potential is specified. What are the types of integrated application software? Application software’s can also be distinguished on the basis of usage into the following: Utility programs. Generic programs. Integrated programs….Types of Application Software. Application Software Type Examples Database software Oracle, MS Access etc Spreadsheet software Apple Numbers, Microsoft Excel What are the applications of integral equations in engineering? FOREWORD Integral equations are encountered in various fields of science and numerous applications (in elasticity, plasticity, heat and mass transfer, oscillation theory, fluid dynamics, filtration theory, electrostatics, electrodynamics, biomechanics, game theory, control, queuing theory, electrical en- gineering, economics, medicine, etc.). What is the application of integral calculus in physics? Application of Integral Calculus. The important application of integral calculus are as follows. Integration is applied to find: The area between two curves; Centre of mass; Kinetic energy; Surface area; Work; Distance, velocity and acceleration; The average value of a function; Volume; Probability; Integral Calculus Examples How many integral equations are there in the book? More than 2100 integral equations and their solutions are given in the first part of the book (Chapters 1–6). A lot of new exact solutions to linear and nonlinear equations are included. Special attention is paid to equations of general form, which depend on arbitrary functions. Does the handbook cover two-dimensional integral equations? The book does not cover two-, three- and multidimensional integral equations. The handbook consists of chapters, sections and subsections. Equations and formulas are numbered separately in each section. The equations within a section are arranged in increasing order of complexity.
886
4,561
{"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.953125
4
CC-MAIN-2024-10
latest
en
0.946555
https://www.allaboutcircuits.com/technical-articles/arithmetic-operations-on-images-image-addition-averaging-and-subtraction/
1,619,047,031,000,000,000
text/html
crawl-data/CC-MAIN-2021-17/segments/1618039554437.90/warc/CC-MAIN-20210421222632-20210422012632-00187.warc.gz
636,468,635
20,239
Technical Article # Image Arithmetic in DSP: Image Averaging and Image Subtraction March 03, 2020 by Steve Arar ## Learn how to employ arithmetic operations on images as a way to enhance image quality, detect changes, and reduce noise. In digital image processing, we can use arithmetic operations to enhance a given image or extract some useful information. While image averaging is usually utilized for noise reduction, image subtraction can be employed to mitigate the effect of uneven illuminance. Moreover, we’ll see that image subtraction allows us to compare images and detect changes. This makes image subtraction a fundamental operation in many motion detection algorithms. ### Digital Image Processing Using Point Operations In a previous article, we discussed point operations in digital image processing. There, we discussed the fact that a digital image can be described by a two-dimensional array of small elements called pixels. A grayscale image can be represented by a two-dimensional function I[x, y] where the arguments x and y are the plane coordinates that specify a particular pixel of the image. The value of the function determines the intensity or gray level of the image at that point. The addition operation between two images I1[x, y] and I2[x, y] is represented by: S[x, y] = I1[x, y] + I2[x, y] Note that the corresponding pixels of the two images are added together to create the output pixel value at the same pixel location. Now, let's discuss how we can use the addition operation to add two different images together and create nice effects in photographs. ### Image Averaging for Noise Reduction One of the more interesting applications of the image averaging (or image addition) operation is suppressing the noise component of images. In this case, the addition operation is used to take the average of several noisy images that are obtained from a given input image. Assume that our desired input image is I[x, y]. The imaging process and the quantization operation of the utilized A/D converter lead to a noisy image Inoisy[x, y]. Assume that the noise effect can be modeled as a noise image, n[x, y], that is added to the noise-free input I[x, y]. This gives us Inoisy[x, y]= I[x, y] + n[x, y] If we capture the same input image several times, the noise-free image I[x, y] will remain the same while the noise component will vary from one capture to the other. If we assume that the noise components are not correlated with each other and the mean value of the noise is zero, then averaging several noisy images should suppress the noise. This is due to the fact that I[x, y] is the same from one capture to the other and is not suppressed by averaging. However, the noise image has random variations and approaches its mean value (zero) by taking the average. Figure 1 shows a noisy image of the NGC 3749 galaxy. ##### Figure 1. Image adapted from Astronomy.com. The noise has created bright spots that make it difficult to recognize the individual stars. If we capture this image many times and apply the averaging technique, the bright regions of noise will fade away and we’ll be able to more easily recognize the individual stars. The result of averaging 500 images is shown in Figure 2. ##### Figure 2. Image adapted from Astronomy.com. It can be shown that averaging M noisy images reduces the noise variance by a factor of M. In other words, it increases the signal-to-noise ratio (SNR) by a factor of M. It is worthwhile to mention that signal averaging is a general technique and finds use in other fields of electronics. For a detailed discussion of this technique, please refer to my article Use Signal Averaging to Increase the Accuracy of Your Measurements. Using this technique, we can measure a signal that is orders of magnitude smaller than the noise component, provided that the noise is not correlated with our desired signal and has a zero mean. ### Image Subtraction Subtraction of I2[x, y] from I1[x, y] is represented by: D[x, y] = I1[x, y] - I2[x, y] Note that the subtraction operation is performed on a point by point basis as well. This operation has several interesting applications, including correcting uneven illuminance and comparing images. ### Image Subtraction for Correcting Uneven Illuminance First, let's look at the application of the subtraction operation in mitigating the effect of uneven illuminance. As an example, consider the light microscope image of collenchyma cells shown in Figure 3. ##### Figure 3. Image adapted from Siyavula. As you can see, the top left corner of the image is much brighter than the rest of it. To correct this undesired effect, we can create a reference image that has the same illumination variation. This can be achieved by capturing the image of a uniform scene (e.g. a white sheet of paper). Such a reference image for the example of Figure 3 is shown in Figure 4. ##### Figure 4. A reference image with a corresponding level of illumination variation as seen in Figure 3 If we subtract this reference from the image in Figure 3, a relatively larger value will be subtracted from those regions that are strongly illuminated. This means that the pixel values of the brighter regions, such as the top left corner, will decrease much more than the pixel values in the weakly illuminated areas. The subtraction operation can lead to negative pixel values in the difference image. If the negative values are not supported by our image format, we have to add a sufficiently large constant to the minuend image (the image in Figure 3) to avoid negative values in the difference image. However, adding this constant to the input image can lead to overflow because, in practice, we are using a limited number of bits to represent each pixel value. Because of this, before adding the constant, we might need to change our data type to a larger type so as to avoid overflow. For example, while we usually use eight-bit data types to represent the pixel values of a grayscale image, we might need to use a 16-bit data type to successfully perform the calculations. In this example, we add a constant of 109 to the minuend image and perform the subtraction (Figure 4 is subtracted from Figure 3 plus 109). The result is shown in Figure 5. ##### Figure 5 As you can see, this image has a much more uniform illumination. ### Image Subtraction for Comparing Images Another important application of the subtraction operation is finding differences between two images. If the input images are the same at a given pixel location, they have the same value and the grayscale value of the difference image will be zero (black) at that location. However, the differences will lead to a non-zero output value and can be easily recognized. Consider the example images shown in Figure 6. ##### Figure 6 The two images are the same except that the image on the right side includes a hatched rectangular area. The difference image is shown in Figure 7. ##### Figure 7 As you can see, the non-zero pixels can be used to determine the differences between the inputs. #### Applications in Motion Detection Algorithms This simple observation is the basis for several motion detection algorithms. These algorithms capture a sequence of images from the same scene at different times and use the subtraction operator to detect changes. It is worthwhile to mention that motion detection is a challenging problem and a wide variety of algorithms for different applications are discussed in the literature. If you're interested in this concept, you may consider referring to this article on advances in vision-based human motion capture and analysis. In practice, the similar regions of the images that are compared by the subtraction operation may not have exactly the same grayscale value. For example, the illumination variation from one capture to the other can lead to slightly different pixel values even in similar regions. Therefore, we might need to find an appropriate threshold value in order to determine whether or not a given output pixel value represents a difference between the input images. ### Conclusion In this article, we looked at two important arithmetic operations: image addition and image subtraction. The addition operation can be used to suppress the noise component and increase the SNR. Two important applications of the subtraction operation are mitigating the effect of uneven illuminance and finding differences between images. The change detection feature of the subtraction operation makes it very useful in many motion detection algorithms.
1,751
8,615
{"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-2021-17
longest
en
0.888754
https://philosophy-question.com/library/lecture/read/44380-why-is-every-tree-bipartite
1,702,055,206,000,000,000
text/html
crawl-data/CC-MAIN-2023-50/segments/1700679100762.64/warc/CC-MAIN-20231208144732-20231208174732-00389.warc.gz
506,524,750
7,976
# Why is every tree bipartite? ## Why is every tree bipartite? Obviously two vertices from the same set aren't connected, as in a tree there's only one path from one vertex to another (Note that all neigbours from one vertex are of different parity, compared to it). ... A tree contains no cycles at all, hence it's bipartite. ## Is any tree bipartite? Every tree is bipartite. Cycle graphs with an even number of vertices are bipartite. Every planar graph whose faces all have even length is bipartite. ## Can a tree have an Euler circuit? A tree must have at least two vertices of degree 1; and if it has exactly two then it is a path graph. ... Thus there are two, the graph is a path, and hence has an Eulerian path. If the tree has an Eulerian path, there can be at most two vertices of odd degree. ## What makes a graph a Euler circuit? A graph has an Euler circuit if and only if the degree of every vertex is even. A graph has an Euler path if and only if there are at most two vertices with odd degree. ## Is it possible for a graph with a degree 1 vertex to have an Euler circuit? This Euler path travels every edge once and only once and starts and ends at the same vertex. ... 1: If a graph has any vertices of odd degree, then it cannot have an Euler circuit. If a graph is connected and every vertex has an even degree, then it has at least one Euler circuit (usually more). ## How do you prove a graph is Eulerian? Definition: A graph is considered Eulerian if the graph is both connected and has a closed trail (a walk with no repeated edges) containing all edges of the graph. Definition: An Eulerian Trail is a closed walk with no repeated edges but contains all edges of a graph and return to the start vertex. ## How do you prove a graph has no Hamiltonian cycle? Proving a graph has no Hamiltonian cycle [closed] 1. A graph with a vertex of degree one cannot have a Hamilton circuit. 2. Moreover, if a vertex in the graph has degree two, then both edges that are incident with this vertex must be part of any Hamilton circuit. 3. A Hamilton circuit cannot contain a smaller circuit within it. ## What is Dirac's Theorem? A simple graph with graph vertices in which each graph vertex has vertex degree. has a Hamiltonian cycle. ## What makes a Hamilton circuit? A Hamilton circuit is one that passes through each point exactly once but does not, in general, cover all the edges; actually, it covers only two of the three edges that intersect at each vertex. ## How do you find the Hamiltonian cycle? A simple graph with n vertices in which the sum of the degrees of any two non-adjacent vertices is greater than or equal to n has a Hamiltonian cycle. ## Is tree a graph? In graph theory, a tree is an undirected graph in which any two vertices are connected by exactly one path, or equivalently a connected acyclic undirected graph. ## How do you prove a graph is Hamiltonian? A graph is hamiltonian if its closure, cl(G), is hamiltonian. Consider the effects of subtracting an edge from Kn. Each subtracted edge reduces the degree of two vertices by one. You can proceed by induction on δ(G). ## What is Hamiltonian Theorem? A Hamiltonian path or traceable path is a path that visits each vertex of the graph exactly once. A graph that contains a Hamiltonian path is called a traceable graph. A graph is Hamiltonian-connected if for every pair of vertices there is a Hamiltonian path between the two vertices. ## What is Euler and Hamiltonian graph? Hamiltonian Circuit: A Hamiltonian circuit in a graph is a closed path that visits every vertex in the graph exactly once. ... Important: An Eulerian circuit traverses every edge in a graph exactly once, but may repeat vertices, while a Hamiltonian circuit visits each vertex in a graph exactly once but may repeat edges. ## What is a semi Hamiltonian graph? A semi-Hamiltonian graph is a graph that contains a Hamiltonian path, but not a Hamilton cycle. ## What is a Rudrata path? Rudrata Path/Cycle. Input: A graph G. The undirected and directed variants refer to the type of graph. Property: There is a path/cycle in G that uses each vertex exactly once. ## Is the Petersen graph Hamiltonian? The Petersen graph has a Hamiltonian path but no Hamiltonian cycle. It is the smallest bridgeless cubic graph with no Hamiltonian cycle. It is hypohamiltonian, meaning that although it has no Hamiltonian cycle, deleting any vertex makes it Hamiltonian, and is the smallest hypohamiltonian graph. ## Is K2 a planar graph? The graphs K2,2,2,2,1 and K2,2,2,2,2 are not 1-planar because they contain K5,4 as a subgraph. ## Is K7 planar? By Kuratowski's theorem, K7 is not planar. Thus, K7 is toroidal. ## How do you prove a graph is not planar? Theorem: [Kuratowski's Theorem] A graph is non-planar if and only if it contains a subgraph homeomorphic to K_{3,3} or K_5. A graph is non-planar iff we can turn it into K_{3,3} or K_5 by: Removing edges and vertices. ## How do you tell if a graph is planar or not? 30. When a connected graph can be drawn without any edges crossing, it is called planar . When a planar graph is drawn in this way, it divides the plane into regions called faces . Draw, if possible, two different planar graphs with the same number of vertices, edges, and faces. ## Is K3 bipartite? EXAMPLE 2 K3 is not bipartite. ... If the graph were bipartite, these two vertices could not be connected by an edge, but in K3 each vertex is connected to every other vertex by an edge.
1,303
5,505
{"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.1875
4
CC-MAIN-2023-50
latest
en
0.957817
https://www.engineersedge.com/material_science/material_science2.htm
1,670,333,513,000,000,000
text/html
crawl-data/CC-MAIN-2022-49/segments/1669446711108.34/warc/CC-MAIN-20221206124909-20221206154909-00616.warc.gz
780,355,046
5,550
#### Engineering Design Data: Menu - material science Engineering, design and manufacturing resources related to Material Science Prev Page | Next Page Pages: 1 [2] 3 4 5 Cylindrical Shear Spring Design Equation and Calculator Cylindrical shear spring with axial load applied design equations and calculator, load P Two Block Shear Spring Design Equations and Calculator Springs of rubber bonded to metal are made in a wide variety of configurations. The rubber is usually in shear and, because of the high internal damping, such springs are used for limiting vibrations. Rankine Gordon Equation The Rankine Gordon equation which is a semi-empirical formula, and takes into account the crushing strength of the material, its Young's modulus and its slenderness ratio. Tension Compression Machine Feature Equation and Calculator Design calculators and equations for tension and compression of a machine feature with reduces section area.. Area-Moment Method Calculate Deflections in Beams Area-Moment Method To Calculate Deflections in Beams. Calculation of deflections and redundant reactions for beams on two supports can be made by the use of the area–moment method. Rectangular Plate Circular Load Equation and Calculator Rectangular plate, circular concentrated load at center, clamped edges (empirical) equation and calculator. The load is assumed to act over a small area of radius e. Rectangular Plate Concentrated Load at Center Equation and Calculator Rectangular plate, concentrated load at center, simply supported (empirical) equation and calculator. The load is assumed to act over a small area of radius e. Uniform Load Rectangular Plate Clamped (Empirical) Equations and Calculator Rectangular plate, uniform load, clamped (Empirical) equations and calculator. Rectangular Plate Uniform Load Simply Supported Equations and Calculator Rectangular plate, uniform load, simply supported (Empirical) equations and calculator. Since comers tend to rise off the supports, vertical movement must be prevented without restricting rotation. Circular Plate Concentrated Load Floating Equation and Calculator Circular plate, concentrated load, edges floating equation and calculator. The equations are only valid if the deflection is small compared to the plate thickness. Prev Page | Next Page Pages: 1 [2] 3 4 5
454
2,333
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.21875
3
CC-MAIN-2022-49
latest
en
0.852492
https://zims-en.kiwix.campusafrica.gos.orange.com/wikipedia_en_all_nopic/A/Zero-Coupon_Inflation-Indexed_Swap
1,642,823,502,000,000,000
text/html
crawl-data/CC-MAIN-2022-05/segments/1642320303729.69/warc/CC-MAIN-20220122012907-20220122042907-00463.warc.gz
1,050,042,642
7,816
# Zero-Coupon Inflation-Indexed Swap The Zero-Coupon Inflation Swap (ZCIS) is a standard derivative product which payoff depends on the Inflation rate realized over a given period of time. The underlying asset is a single Consumer price index (CPI). It is called Zero-Coupon because there is only one cash flow at the maturity of the swap, without any intermediate coupon. It is called Swap because at maturity date, one counterparty pays a fixed amount to the other in exchange for a floating amount (in this case linked to inflation). The final cash flow will therefore consist of the difference between the fixed amount and the value of the floating amount at expiry of the swap. ## Detailed Flows • At time ${\displaystyle T_{M}}$ = M years • Party B pays Party A the fixed amount ${\displaystyle N[(1+K)^{M}-1]}$ • Party A pays Party B the floating amount ${\displaystyle N[{\frac {I(T_{M})}{I(T_{0})}}-1]}$ where: • K is the contract fixed rate • N the contract nominal value • M the number of years • ${\displaystyle T_{0}}$ is the start date • ${\displaystyle T_{M}}$ is the maturity date (end of the swap) • ${\displaystyle I(T_{0})}$ is the inflation at start date (time ${\displaystyle T_{0}}$) • ${\displaystyle I(T_{M})}$ is the inflation at maturity date (time ${\displaystyle T_{M}}$)
339
1,306
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 9, "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-2022-05
latest
en
0.845446