URL
stringlengths
15
1.68k
text_list
sequencelengths
1
199
image_list
sequencelengths
1
199
metadata
stringlengths
1.19k
3.08k
https://answers.yahoo.com/question/index?qid=20091117092411AAK7piw
[ "# Calculus/economics? Find maximum profit, average cost per unit?\n\nA given commodity has a demand function given by p = 100 - 0.5x^2 and a total cost function of C = 4x + 375. a. What price gives the maximum profit? b. What is the average cost per unit if production is set to give maximum profit? I did part a, stuck on part b. my work for a: P = -0.5x^3 + 96x -... show more A given commodity has a demand function given by p = 100 - 0.5x^2 and a total cost function of C = 4x + 375.\n\na. What price gives the maximum profit?\nb. What is the average cost per unit if production is set to give maximum profit?\n\nI did part a, stuck on part b.\n\nmy work for a:\n\nP = -0.5x^3 + 96x - 375\nP' = -3/2x^2 + 96 = 0\nx = 8\np = 100 - 0.5(8)^2 = 68\nAnswer for a: \\$68 will give maximum profit\nThe answer in the back verifies this as answer, answer to part b is \\$50.88, could someone help guide me in the right direction or set it up so I could solve it?\nUpdate: Aah I feel so silly, thank you so much guys, it was just a matter of plugging back in value, I overthought it and thought it to be more complicated, haha thanks so much.\nUpdate 2: Aah I feel so silly, thank you so much guys, it was just a matter of plugging back in value, I overthought it and thought it to be more complicated, haha thanks so much." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.90503615,"math_prob":0.97944045,"size":1800,"snap":"2019-26-2019-30","text_gpt3_token_len":549,"char_repetition_ratio":0.1252784,"word_repetition_ratio":0.8871391,"special_character_ratio":0.32722223,"punctuation_ratio":0.1353211,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9944945,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-07-23T04:58:22Z\",\"WARC-Record-ID\":\"<urn:uuid:933485ea-bbdc-49ad-a415-6ac6b803a1ed>\",\"Content-Length\":\"98204\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f9f29e55-d6d9-474b-a62a-bbbc98d15aec>\",\"WARC-Concurrent-To\":\"<urn:uuid:f5ebd66a-e0ad-4d32-b243-fc2b7a80e11c>\",\"WARC-IP-Address\":\"69.147.92.12\",\"WARC-Target-URI\":\"https://answers.yahoo.com/question/index?qid=20091117092411AAK7piw\",\"WARC-Payload-Digest\":\"sha1:VEDKARZ5KOCY2B3GO6ULOHXABLJYFAWJ\",\"WARC-Block-Digest\":\"sha1:56MGPDZLGQ2ZHSPOCGYU4GINBND5H7EL\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-30/CC-MAIN-2019-30_segments_1563195528869.90_warc_CC-MAIN-20190723043719-20190723065719-00136.warc.gz\"}"}
https://answers.yahoo.com/question/index?qid=20070608003331AAkDRRi
[ "# Complex number!!?\n\nThe book states to \"solve the equaction in the complex number\":\n\nx^2+x+1=0\n\nRelevance\n\nImaginery number i is as follows:\n\ni^2 = -1 <-----> i = sqrt(-1)\n\nx = [-1 ± √(1-4*1*1)]/2\n\n= [-1 ± √(-3)]/2\n\n= -1/2 ± √(3)*√(-1)/2\n\n= -1/2 ± √(3) /2 * i\n\n• This equation can't be solved using direct factorization\n\nSo we use the mathematical formula\n\nx = [-b±√{(b^2) - 4ac}] / 2a\n\nWhere a = b = c = 1\n\nThen substitute the values of a, b & c in the formula\n\nYou will have 2 answers ( 2 roots for the equations ) which are -1/2 ± (√-3)/2 = -1/2 ± {(√3)/2} i\n\n• Anonymous\n\nComplex number is a fancy name for a number in which sqrt(-1) and its multiples occur.\n\nTo solve the above you will have to use the general formula.\n\n=>x1=[(-1) + sqrt(1 - 4)]/2\n\n=>x1=[-1 + sqrt(3)i]/2\n\n=>x2=[(-1) - sqrt(1-4)]/2\n\n=>x2=[-1 -sqrt(3)i]/2\n\n=>x= [-1 + sqrt(3)i]/2 , [-1 -sqrt(3)i]/2\n\nwhere i=sqrt(-1)\n\n• a = 1 , b = 1 and c = 1\n\nx = [ -b +/- √ ( b^2 - 4ac )]/ 2a\n\n= [ -1 +/- √ ( 1 - 4 )] / 2\n\n= [ -1 +/- √ ( -3 ) ] / 2\n\n= [ -1 +/- √ (3) i ] / 2\n\nx = -1/2 + 1/ 2 √3 i and x = x = -1/2 - 1 / 2 √3 i\n\n• Hmmmm........ And your teacher hasn't said a word about complex numbers, has she (or he)? The words 'imaginary unit' and 'imaginary number' have never been explained to you? They just throw it at you and expect you to figure it all out yourself?\n\nA couple of people here have given very good answers, but are they gonna take your next exam?\n\nDoug\n\n• If you use the quadratic formula, you will find that the two roots are complex numbers. If you graph the equation, you will find that it doesn't cross the X-axis - therefore no real roots.\n\n• x = [- 1 ± √(-3 ) ] / 2\n\nx = [- 1 ± (√3) i ] / 2 is exact answer.\n\nValue of √3 = 1.732 could be used to give an approximate answer.\n\n• x^2 + x + 1 = 0\n\nWe apply the quadratic formula, since this cannot be factored:\n\nx = [-1 +/- sqrt (1 - 4)]/2\n\nx = (-1 +/- sqrt -3)/2\n\nx = [-1 +/- (i * sqrt 3)]/2\n\nwhere i = sqrt -1\n\n• complex step. browse onto google and yahoo. just that could help!\n\n• Anonymous" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.82937175,"math_prob":0.9997178,"size":2272,"snap":"2019-43-2019-47","text_gpt3_token_len":829,"char_repetition_ratio":0.12786596,"word_repetition_ratio":0.023012552,"special_character_ratio":0.42737675,"punctuation_ratio":0.08649789,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99986744,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-15T18:53:34Z\",\"WARC-Record-ID\":\"<urn:uuid:536f45c1-2360-441e-963c-9967af462bbb>\",\"Content-Length\":\"140658\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:76ed5f24-3c89-4c55-95ce-e365445e6a82>\",\"WARC-Concurrent-To\":\"<urn:uuid:fca1018c-2c7d-4e5b-8a45-155cba97c7b9>\",\"WARC-IP-Address\":\"69.147.92.11\",\"WARC-Target-URI\":\"https://answers.yahoo.com/question/index?qid=20070608003331AAkDRRi\",\"WARC-Payload-Digest\":\"sha1:J4GUNMX6OS2WYAEMRFRSVHIIMRDDM5Y6\",\"WARC-Block-Digest\":\"sha1:4SBIRVVSS3TAJTE7ODUBQRI6SWFME2MO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496668699.77_warc_CC-MAIN-20191115171915-20191115195915-00093.warc.gz\"}"}
https://mathoverflow.net/questions/9309/in-model-theory-does-compactness-easily-imply-completeness?noredirect=1
[ "# In model theory, does compactness easily imply completeness?\n\nRecall the two following fundamental theorems of mathematical logic:\n\nCompleteness Theorem: A theory T is syntactically consistent -- i.e., for no statement P can the statement \"P and (not P)\" be formally deduced from T -- if and only if it is semantically consistent: i.e., there exists a model of T.\n\nCompactness Theorem: A theory T is semantically consistent iff every finite subset of T is semantically consistent.\n\nIt is well-known that the Compactness Theorem is an almost immediate consequence of the Completeness Theorem: assuming completeness, if T is inconsistent, then one can deduce \"P and (not P)\" in a finite number of steps, hence using only finitely many sentences of T.\n\nThe traditional proof of the completeness theorem is rather long and tedious: for instance, the book Models and Ultraproducts by Bell and Slomson takes two chapters to establish it, and Marker's Model Theory: An Introduction omits the proof entirely. There is a quicker proof due to Henkin (it appears e.g. on Terry Tao's blog), but it is still relatively involved.\n\nOn the other hand, there is a short and elegant proof of the compactness theorem using ultraproducts (again given in Bell and Slomson).\n\nSo I wonder: can one deduce completeness from compactness by some argument which is easier than Henkin's proof of completeness?\n\nAs a remark, I believe that these two theorems are equivalent in a formal sense: i.e., they are each equivalent in ZF to the Boolean Prime Ideal Theorem. I am asking about a more informal notion of equivalence.\n\nUPDATE: I accepted Joel David Hamkins' answer because it was interesting and informative. Nevertheless, I remain open to the possibility that (some reasonable particular version of) the completeness theorem can be easily deduced from compactness.\n\n• I think of the completeness theorem as being mainly the conjunction of two quite separate facts. One is compactness. The other is the recursive enumerability of the set of valid formulas (in a recursive vocabulary). Both of these follow from completeness. Conversely, if you have these two consequences, you can get completeness by defining a deduction of $A$ from hypotheses $H$ to be a finite subset $X_1,\\dots,X_n$ of $H$ plus a record of the computation showing that $(X_1\\land\\dots,\\land X_n)\\to A$ is in the r.e. set of valid formulas. – Andreas Blass Jul 18 '17 at 23:19\n\nThere are indeed many proofs of the Compactness theorem. Leo Harrington once told me that he used a different method of proof every time he taught the introductory graduate logic course at UC Berkeley. There is, of course, the proof via the Completeness Theorem, as well as proofs using ultrapowers, reduced products, Boolean-valued models and so on. (In my day, he used Boolean valued models, but that was some time ago, and I'm not sure if he was able to keep this up since then!)\n\nMost model theorists today appear to regard the Compactness theorem as the significant theorem, since the focus is on the models---on what is true---rather than on what is provable in some syntactic system. (Proof-theorists, in contast, may focus on the Completeness theorem.) So it is not because Completness is too hard that Marker omits it, but rather just that Compactness is the important fact. Surely it is the Compactness theorem that has deep applications (or at least pervasive applications) in model theory. I don't think formal deductions appear in Marker's book at all.\n\nBut let's get to your question. Since the exact statement of the Completeness theorem depends on which syntactic proof system you set up---and there are a huge variety of such systems---any proof of the Completeness theorem will have to depend on those details. For example, you must specify which logical axioms are formally allowed, which deduction rules, and so on. The truth of the Completness Theorem depends very much on the details of how you set up your proof system, since if you omit an important rule or axiom, then your formal system will not be complete. But the Compactness theorem has nothing to do with these formal details. Thus, there cannot be hands-off proof of Completeness using Compactness, that does not engage in the details of the formal syntactic proof system. Any proof must establish some formal properties of the formal system, and once you are doing this, then the Henkin proof is not difficult (surely it fits on one or two pages). When I prove Completeness in my logic courses, I often remark to my students that the fact of the theorem is a foregone conclusion, because at any step of the proof, if we need our formal system to be able to make a certain kind of deduction or have a certain axiom, then we will simply add it if it isn't there already, in order to make the proof go through.\n\nNevertheless, Compactness can be viewed as an abstract Completness theorem. Namely, Compactness is precisely the assertion that if a theory is not satisfiable, then it is because of a finite obstacle in the theory that is not satisfiable. If we were to regard these finite obstacles as abstract formal \"proofs of contradiction\", then it would be true that if a theory has no proofs of contradiction, then it is satisfiable.\n\nThe difference between this abstract understanding and the actual Completness theorem, is that all the usual deduction systems are highly effective in the sense of being computable. That is, we can computably enumerate all the finite inconsistent theories by searching for formal syntactic proofs of contradiction. This is the new part of Completness that the abstract version from Compactness does not provide. But it is important, for example, in the subject of Computable Model Theory, where they prove computable analogues of the Completeness Theorem. For example, any consistent decidable theory (in a computable language) has a decidable model, since the usual Henkin proof of Completeness is effective when the theory is decidable.\n\nEdit: I found in Arnold Miller's lecture notes an entertaining account of an easy proof of (a fake version of) Completeness from Compactenss (see page 58). His system amounts to the abstract formal system I describe above. Namely, he introduces the MM proof system (for Mickey Mouse), where the axioms are all logical validities, and the only rule of inference is Modus Ponens. In this system, one can prove Completeness from Compactness easily as follows: We want to show that T proves φ if and only if every model of T is a model of φ. The forward direction is Soundness, which is easy. Conversely, suppose that every model of T is a model of φ. Thus, T+¬φ has no models. By Compactness, there are finitely many axioms φ0, ..., φn in T such that there is no model of them plus ¬φ. Thus, (φ0∧...∧φn implies φ) is a logical validity. And from this, one can easily make a proof of φ from T in MM. QED!\n\nBut of course, it is a joke proof system, since the collection of validities is not computable, and Miller uses this example to illustrate the point as follows:\n\nThe poor MM system went to the Wizard of OZ and said, “I want to be more like all the other proof systems.” And the Wizard replied, “You’ve got just about everything any other proof system has and more. The completeness theorem is easy to prove in your system. You have very few logical rules and logical axioms. You lack only one thing. It is too hard for mere mortals to gaze at a proof in your system and tell whether it really is a proof. The difficulty comes from taking all logical validities as your logical axioms.” The Wizard went on to give MM a subset Val of logical validities that is recursive and has the property that every logical validity can be proved using only Modus Ponens from Val.\n\nAnd he then goes on to describe how one might construct Val, and give what amounts to a traditional proof of Completeness.\n\n• Also, for whatever it's worth, I don't understand your remark about completeness being a foregone conclusion. It is certainly not clear that incompleteness can be remedied by adding further axioms on the fly (c.f. the Incompleteness Theorem!). – Pete L. Clark Dec 18 '09 at 22:13\n• Come to think of it, I guess you can take F a nonprincipal ultrafilter on the set of primes, define for each prime number p an algebraically closed field of characteristic p, and let K be the ultraproduct of the K_p's with respect to F. Then Los' theorem asserts that any first order sentence that is true in every algebraically closed field of positive characteristic is true in every algebraically closed field of characteristic zero. – Pete L. Clark Dec 18 '09 at 23:03\n• Yes, that proof was merely about the finite obstacle, which Compactness provides. The situations where one seems to need Completeness over Compactness, as I mentioned in my answer, have to do with the effectivity of the finite obstacle, for example, when if the question concerns the computability of a theory or model, or whether there is a computable procedure for eliminating quantifiers, and so on. – Joel David Hamkins Dec 18 '09 at 23:38\n• What I meant about Completeness being a foregone conclusion, is that when you start proving Completeness, you periodically need to know various things about the formal system you defined. So, if you are not so interested in having the optimal proof system, then you can simply add them to the system on the fly as the proof proceeds. Of course, this method only works because the theorem is true! But it does mean that you don't have to remember the exact proof system in advance, as long as you remember the essential proof outline. – Joel David Hamkins Dec 18 '09 at 23:42\n• I added a description of A. Miller's entertaining MM system at the end. – Joel David Hamkins Jan 25 '10 at 3:41\n\nI think you're looking for the Fraïssé School of Model Theory, which is based strictly on structures and types as primitives and avoids all syntax. I don't know of a good source for the \"extremist Fraïssean approach,\" but Bruno Poizat's \"A Course in Model Theory\" is a good bridge (if you can tolerate Poizat's eccentic, and sometimes polemic, style).\n\nPoizat starts off defining types (via back & forth) in Chapter 1, then he (apologetically) introduces formulas in Chapter 2. In Chapter 4, he proves the Compactness Theorem using ultrapowers and then presents the Henkin method as an afterthought. (He does more formal deduction later in Chapter 7, but only in order to prove the Incompleteness Theorems.) In the notes at the end of Chapter 4, Poizat writes:\n\nThe compactness theorem, in the forms of Theorems 4.5 and 4.6, is due to Gödel; in fact, as explained in the beginning of Section 4.3 [Henkin's Method], the theorem was for Gödel a simple corollary (we could even say an unexpected corollary, a rather strange remark!) of his \"completeness theorem\" of logic, in which he showed that a finite system of rules of inference is sufficient to express the notion of consequence (see Chapter 7). It could also have been taken from [Herbrand 1928] or [Gentzen 1934], in which results of the same sort were proven.\n\nThis unfortunate compactness theorem was brought in by the back door, and we might say that its original modesty still does it wrong in logic textbooks. In my opinion it is a much more essential and primordial (and thus also less sophisticated) than Gödel's completeness theorem, which states that we can formalize deduction in a certain arithmetic way; it is an error in method to deduce it from the latter.\n\nIf we do it this way, it is by a very blind fidelity to the historic conditions that witnessed its birth. The weight of this tradition is apparent even in a work like [Chang-Keisler 1973], which was considered a bible of model theory in the 1970s; it begins with syntactic developments that have nothing to do with anything in the succeeding chapters. This approach---deducing Compactness from the possibility of axiomatizing the notion of deduction---once applied to the propositional calculus gives the strangest proof on record of the compactness of $$2^\\omega$$!\n\nIt is undoubtedly more \"logical,\" but it is inconvenient, to require the student to absorb a system of formal deduction, ultimately quite arbitrary, which can be justified only much later when we can show that it indeed represents the notion of semantic consequence. We should not lose sight of the fact that the formalisms have no raison d'être except insofar as they are adequate for representing notions of substance.\n\nThere are two key points in there. The first, which comes through rather clearly, is that Model Theory could ultimately be done without any formal syntax and deduction rules. The second, much more subtle point, is present only in the parenthetical remark \"and thus also less sophisticated\" in the second paragraph. It sounds like Poizat is saying that the Completeness Theorem does not follow from the Compactness Theorem. But it does follow, at least in some abstract sense. The Compactness Theorem does imply that there is some system of finitary rules for deduction which are complete for semantic consequence. The only \"sophisticated\" part missing is that this set of rules has a simple description. In particular, the Incompleteness Theorems are not consequences of the Compactness Theorem.\n\nAbout the equivalence of the compactness, completeness, prime ideal theorems over ZF: what really matters here is the case when the language $L$ over which the theory $T$ is defined is not well-ordered. Otherwise, the Henkin proof gives a model of $T$ without using any form of axiom of choice. In particular, it is OK when the considered language is countable.\n\nNow, the implication compactness $\\Rightarrow$ completeness in the general case goes as follows (although it still uses completeness for well-ordered theories, which is a theorem of ZF).\n\nFix a first-order language $L$. Let $T$ be a syntactically consistent theory. Then any finite $F\\subseteq T$ is syntactically consistent. Define $L_F$ to be the language whose operational and relational symbols are the ones occurring in $F$. Since $F$ is finite, $L_F$ is finite. Then $F$ is a syntactically consistent theory in the language $L_F$. We have completeness for countable languages, so we have a model $M_F$ of $F$ treated as a theory over $L_F$. The model $M_F$ can easily be extended to a model $M_F'$ of $F$ treated as a theory over $L$ (just give the unused symbols trivial interpretations: empty relations and constant operations). By compactness we now have a model of $T$.\n\n• Very Nice. This shows that Compactness provides a clean reduction of Completeness for uncountable languages to finite languages. So if we have Compactness, we can avoid the transfinite issues in Completeness that arise for uncountable languages (which are sometimes difficult issues for students). – Joel David Hamkins Jan 25 '10 at 15:00" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9421882,"math_prob":0.9440692,"size":5440,"snap":"2020-24-2020-29","text_gpt3_token_len":1213,"char_repetition_ratio":0.14808683,"word_repetition_ratio":0.010649627,"special_character_ratio":0.20275736,"punctuation_ratio":0.10357816,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98994535,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-02T12:57:16Z\",\"WARC-Record-ID\":\"<urn:uuid:f0990aad-1215-4581-86f7-7a8707c50755>\",\"Content-Length\":\"163260\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:04b0fe8f-c616-451b-977e-1b38ad44b662>\",\"WARC-Concurrent-To\":\"<urn:uuid:27f9cb3d-5455-4c7d-bcaf-6f446213734c>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://mathoverflow.net/questions/9309/in-model-theory-does-compactness-easily-imply-completeness?noredirect=1\",\"WARC-Payload-Digest\":\"sha1:E7QS3P47VCAD4RQPG73VFB5ZEHOHWSPO\",\"WARC-Block-Digest\":\"sha1:SW3N7T6O3VQWPAVJADEG7WPUXJP4TMKO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593655878753.12_warc_CC-MAIN-20200702111512-20200702141512-00253.warc.gz\"}"}
https://www.inventoryadvice.com/lead-time-analysis-part-2/
[ "Making better use of the data in your inventory system\n\nThis article contains information concerning the mathematics involved in the spreadsheets which are described in Part 1. That article was revised on 5 March 2017 and the spreadsheets were revised on 19 February 2017. It is assumed that the readers of this article have some knowledge of statistical mathematics.\n\nAny row which is concerned with only partial fulfilment of a purchase order is weighted accordingly.\n\nFor each row, for the purpose of testing the null hypothesis that the dates are correct, I assumed a lognormal distribution of supplier lead times, an example of which is shown in the following graph:", null, "The estimation of the natural logarithms of the mean and standard deviation of the lead times was done separately for each row using all rows except the one concerned. That was necessary in order to prevent outliers or multi-modal lead time distributions from severely adversely affecting the hypothesis testing. Another thing which I did for the same reasons was to base the estimate of the standard deviation of the logarithms of the lead times on mean absolute deviation (MAD) because of its robustness.\n\nCells L4 and Q5 were calculated using the fact that the variance of the sum of independently and identically distributed random variables is equal to the sum of the variances of the individual variables. For manually set mean supplier lead times, it is assumed that the amount of historical data used in setting them is the same as in the spreadsheet.\n\nThe testing which I have done appears to show that the techniques which I have used are effective at ensuring that suspect lead times are flagged, either immediately or after the initially flagged rows are checked and corrected." ]
[ null, "http://www.inventoryadvice.com/wp-content/uploads/2017/03/lognormal.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.965355,"math_prob":0.8168075,"size":1717,"snap":"2023-40-2023-50","text_gpt3_token_len":322,"char_repetition_ratio":0.13193229,"word_repetition_ratio":0.0,"special_character_ratio":0.18404193,"punctuation_ratio":0.053156145,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98029965,"pos_list":[0,1,2],"im_url_duplicate_count":[null,5,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-06T00:35:32Z\",\"WARC-Record-ID\":\"<urn:uuid:b6847ad0-463d-49a0-8f2d-872ac131a2d4>\",\"Content-Length\":\"173924\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:af02a89c-9aa3-4d60-be26-3478f2f10b76>\",\"WARC-Concurrent-To\":\"<urn:uuid:b95776b0-a839-452e-b078-7f20f88a4c36>\",\"WARC-IP-Address\":\"65.60.53.37\",\"WARC-Target-URI\":\"https://www.inventoryadvice.com/lead-time-analysis-part-2/\",\"WARC-Payload-Digest\":\"sha1:3KDGJJW5USCUDBVUPCUSJTCFSLMPIK3D\",\"WARC-Block-Digest\":\"sha1:R3CVYWXTW4G5ZEXQAIE2RLSAL7ADYBUY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100575.30_warc_CC-MAIN-20231206000253-20231206030253-00324.warc.gz\"}"}
https://www.math-forums.com/threads/probability-question.20390/
[ "# Probability Question\n\nDiscussion in 'Probability' started by mukesh tiwari, Aug 11, 2010.\n\n1.", null, "### mukesh tiwariGuest\n\nHello all ,\nI am just trying to solve a problem and stuck on\nhttp://projecteuler.net/index.php?section=problems&id=121. To solve\nthis problem, i am generating the whole tree but it grows quite fast\n[factorial ] with level and till level 15 its almost impossible\nenumerate. Here is sketch of solution which i figured out. First turn\nthere are two balls [B,R] , second level [B,R,R] and number of\nbranches are 6, for third level [B,R,R,R] and branches are 24 and for\nfourth level [B,R,R,R,R] and branch are 120. Now to win in four turn ,\nthe number of blue ball chose must be more than red so winning\ncondition is in all four turn i chose all the 4 blue or 3 blue and\n1 red. I counted and got there are 11 turn in which number of blue\nballs are more than red but this method is not applicable to 15 level\nsince 15! is too large to bruteforce. Kindly give me some hint in\nright direction as i am trying to learn probability.\nThank you\n\nmukesh tiwari, Aug 11, 2010\n\n2.", null, "### Pavel314Guest\n\nUse the binomial distribution.\n\nPavel314, Aug 17, 2010\n\n3.", null, "### HenryGuest\n\n\"A bag contains one red disc and one blue disc. In a game of chance a\nplayer takes a disc at random and its colour is noted. After each turn\nthe disc is returned to the bag, an extra red disc is added, and\nanother disc is taken at random. The player ... wins if they have\ntaken more blue discs than red discs at the end of the game. If the\ngame is played for four turns, the probability of a player winning is\nexactly 11/120, ... a single game in which fifteen turns are played.\"\n\nThe total number of ordered cases of 15 red or blue discs is not 15! =\n1,307,674,368,000 but 2^15 = 32,768 which is certainly possible, for\nexample on a spreadsheet. But even that is more than you need and not\nthe best approach, and you should be able to get the number down to\n120 or less.\n\nFor example, the probability of reaching 3 blue and 1 red in any order\nis 4/5 of the probability of reaching 3 blue and 0 red plus 1/5 of the\nprobability of reaching 2 blue and 1 red, i.e.\n(4/5)*(1/24)+(1/5)*(1/4) = 1/12.\n\nHenry, Sep 13, 2010" ]
[ null, "https://www.math-forums.com/threads/probability-question.20390/styles/default/custom/avatars/avatar_m.png", null, "https://www.math-forums.com/threads/probability-question.20390/styles/default/custom/avatars/avatar_m.png", null, "https://www.math-forums.com/threads/probability-question.20390/styles/default/custom/avatars/avatar_m.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8934996,"math_prob":0.8811602,"size":257,"snap":"2022-27-2022-33","text_gpt3_token_len":70,"char_repetition_ratio":0.14229248,"word_repetition_ratio":0.3243243,"special_character_ratio":0.26459143,"punctuation_ratio":0.20408164,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98228526,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-07-07T00:50:32Z\",\"WARC-Record-ID\":\"<urn:uuid:2c730f64-2800-442d-af45-8606ffdeee56>\",\"Content-Length\":\"44022\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:288d8107-4a18-446f-9b9c-354032f05f26>\",\"WARC-Concurrent-To\":\"<urn:uuid:36eb88e6-6306-4831-9327-b91d08572f7f>\",\"WARC-IP-Address\":\"104.21.58.83\",\"WARC-Target-URI\":\"https://www.math-forums.com/threads/probability-question.20390/\",\"WARC-Payload-Digest\":\"sha1:EJ3OW46FNVAZ2V6CF4ZEZTRHGMBGXZRC\",\"WARC-Block-Digest\":\"sha1:VNRIYCAYQH2RMIDG4VLPJMK5LOBQGVS4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656104683020.92_warc_CC-MAIN-20220707002618-20220707032618-00641.warc.gz\"}"}
https://aghaynes.wordpress.com/2012/06/21/normalising-data-within-groups/
[ "Occasionally it proves useful to normalise data. By this I mean to scale it between zero and one. Admittedly, most people frown of this but there are papers out there with this method in use*.\n\n`y'[i] = y[i]/sqrt(sum(y^2))`\n\nSo we square all of the ys, add them up and take the square root (call in the denominator). Then we divide each individual y value by the denominator.\n\nIn R this is simple – for instance decostand in the vegan package does exactly this (plus a whole heap of other standardisations).\n\nBut what I couldnt find was a function to take it a step further, a function that normalised within groups:\n\n`y'[ij] = y[ij]/sqrt(sum(y^2[j]))`\n\nThe difference here are the js of course. Or to go a step further still:\n\n`y'[ijk] = y[ijk]/sqrt(sum(y^2[jk]))`\n\nwhere the ks represent subgroups of j.\n\nI needed to do just this, so I wrote a function to do it!\n\nYou can get hold of it by running\n\n`source(\"http://db.tt/22hmSliJ\")`\n\nin R. This provides you with a function called normalise with the following arguments\n\ndataframe – self explanatory\n\ncolumns – a quoted variable name (e.g. “weight”) actually only works on a single column currently so this is a bit of a misnomer. But its easy enough to loop it**\n\nby – one or two grouping factors, again quoted and enclosed in c() if there are two\n\nna.rm – logical, remove any NAs? Defaults to TRUE\n\n`data <- normalise(data, \"weight\", by=\"sex\")`\n\nto normalise weight according to sex, or\n\n`data <- normalise(data, \"weight\", by=c(\"age\", \"sex\"))`\n\nto normalise weight by age and sex.\n\nThe function adds a column to the original dataframe with the original name preceded by “norm.”, so in this case it would be “norm.weight”.\n\nCurrently it only works if the by argument is a factor, but I shall change that at some point and update this post. It might also change the order of the dataframe, but thats not so much of a big deal I dont think.\n\nHope it helps!\n\n* e.g. Risch AC, Jurgensen MF, Frank DA (2007) Effects of grazing and soil micro-climate on decomposition rates in a spatio-temporally heterogeneous grassland. Plant and Soil 298:191-201\n\n**\n\n```for(i in c(\"height\", \"weight\", \"eye_colour\")){\ndata <- normalise(data, i, by=\"weight\")\n}```\n\nFrom → R\n\n1.", null, "That’s very nice. In data.table v1.8.1 you can add a column by group, like this :\n\nDT[, newcol:=y/sqrt(sum(y^2)), by=colA] # group by one column\nor\nDT[, newcol:=y/sqrt(sum(y^2)), by=list(colA,colB)] # group by two columns\nor\nDT[, newcol:=y/sqrt(sum(y^2)), by=list(colA,anyRfunction(colB))] # group by expressions\n\nYou can group by factors, integers, numeric (double) or character, and as many of them as you like, inside the by=list(…). If you do the last for() loop over a lot of columns (or the objects are reasonable in size) then it might be slow due to copying the entire object for each new column addition. So there are ways to write that generic normalise() using data.table if you like, which adds each new column by reference with no copies. But if speed or memory isn’t an issue then theres no need to look at data.table.\n\n•", null, "Thanks for the heads up! This was an initial attempt so I’m sure theres plenty that can be improved in the code.\nI just had a quick look on CRAN and see that data.table is still at version 1.8.0. Is 1.8.1 the R-Forge version?\nHaving read through most of the introduction to data.table, it looks like a handy little package. As you say, it could speed normalise() up considerably by cutting out the vector scans for subsetting (although on the data.frames im using it on currently, the for loop executes in less than a second for 4 or 5 columns anyway, but for others that might use it…)." ]
[ null, "https://0.gravatar.com/avatar/359ff988905f21fd667c9a616f3a54a5", null, "https://1.gravatar.com/avatar/dcf3a47a306b911fda44f4705a753a68", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.88597715,"math_prob":0.8653135,"size":3666,"snap":"2022-27-2022-33","text_gpt3_token_len":939,"char_repetition_ratio":0.10595303,"word_repetition_ratio":0.0,"special_character_ratio":0.25668302,"punctuation_ratio":0.12342569,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9908266,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-15T15:53:35Z\",\"WARC-Record-ID\":\"<urn:uuid:11f85524-2c98-4442-b3ea-c0a43bbc7a3b>\",\"Content-Length\":\"79085\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bbd29a12-650c-491b-ac11-c4817b9a2a0d>\",\"WARC-Concurrent-To\":\"<urn:uuid:3901ff12-7751-474c-8881-4340fdb3fb7a>\",\"WARC-IP-Address\":\"192.0.78.13\",\"WARC-Target-URI\":\"https://aghaynes.wordpress.com/2012/06/21/normalising-data-within-groups/\",\"WARC-Payload-Digest\":\"sha1:BK2PRMG6OIT2XI7ATPVTPYGATH3AZGUL\",\"WARC-Block-Digest\":\"sha1:JZS2CIYXNXTZ53GIX3C7G2ZDYLG42CZG\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882572192.79_warc_CC-MAIN-20220815145459-20220815175459-00072.warc.gz\"}"}
http://oeis.org/A258366
[ "This site is supported by donations to The OEIS Foundation.", null, "Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)\n A258366 Numbers n representable as x*y + x + y, where x >= y > 1, such that all x's and y's in all representation(s) of n are perfect squares. 0\n 24, 49, 84, 184, 288, 504, 628, 984, 1284, 1368, 1716, 2004, 2884, 3348, 3384, 3736, 4368, 6484, 6816, 7288, 8004, 9508, 9808, 10200, 11508, 14584, 14836, 15684, 19896, 21348, 21784, 22048, 25048, 25956, 27216, 27384, 35284, 38808, 40500, 40504, 44184, 47988, 49588, 50628 (list; graph; refs; listen; history; text; internal format)\n OFFSET 1,1 COMMENTS A subsequence of A254671. Is 49 the only odd term? LINKS EXAMPLE 24 = 4*4 + 4 + 4. 49 = 9*4 + 9 + 4, and because this is the only representation, 49 is in the sequence. 129 = 4*25+25+4 = 12*9 + 12 + 9, and because 12 is not a square, 129 is not a term. PROG (Python) def isqrt(a):     sr = 1L << (long.bit_length(long(a)) >> 1)     while a < sr*sr:  sr>>=1     b = sr>>1     while b:       s = sr+b       if a >= s*s:  sr = s       b>>=1     return sr def isSquare(a):     sr = isqrt(a)     return (a==sr*sr) TOP = 100000 a = *TOP no= *TOP for y in xrange(2, TOP/2):   for x in xrange(y, TOP/2):     k = x*y + x + y     if k>=TOP: break     if no[k]==0:         a[k]=1         if not (isSquare(x) and isSquare(y)):             no[k]=1 print [n for n in xrange(TOP) if a[n]>0 and no[n]==0] CROSSREFS Cf. A254671, A256073, A000290. Sequence in context: A044101 A044482 A045294 * A195158 A045279 A042142 Adjacent sequences:  A258363 A258364 A258365 * A258367 A258368 A258369 KEYWORD nonn AUTHOR Alex Ratushnyak, May 27 2015 STATUS approved\n\nLookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam\nContribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent\nThe OEIS Community | Maintained by The OEIS Foundation Inc.\n\nLast modified September 22 17:11 EDT 2019. Contains 327311 sequences. (Running on oeis4.)" ]
[ null, "http://oeis.org/banner2021.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.5116592,"math_prob":0.9718696,"size":1561,"snap":"2019-35-2019-39","text_gpt3_token_len":682,"char_repetition_ratio":0.091843285,"word_repetition_ratio":0.0,"special_character_ratio":0.59064704,"punctuation_ratio":0.2287234,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9816591,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-22T21:12:55Z\",\"WARC-Record-ID\":\"<urn:uuid:62c51a6c-838e-4c32-9482-59f8f57e335e>\",\"Content-Length\":\"20047\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b4b6e4bd-c87f-4a0a-963d-f5f5c7e1c8e2>\",\"WARC-Concurrent-To\":\"<urn:uuid:3b7e8d8e-8ab0-44fc-9122-bec8a2e06d82>\",\"WARC-IP-Address\":\"104.239.138.29\",\"WARC-Target-URI\":\"http://oeis.org/A258366\",\"WARC-Payload-Digest\":\"sha1:EAMKFEJZCBVRWDRJR6GI4NP3FV3KKHXR\",\"WARC-Block-Digest\":\"sha1:SVQXRDWPICUQXXCDO5ZSAIPJQ7A3LNSW\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514575674.3_warc_CC-MAIN-20190922201055-20190922223055-00535.warc.gz\"}"}
https://code.orgmode.org/bzg/org-mode/commit/366254217ac6faea20a5d43fae065bd028806eab
[ "### New feature: allow some commands to loop over siblings.\n\n```This commit introduce `org-loop-over-siblings-within-active-region-p'\nas a new defcustom that you can turn on (`non-nil') to allow commands\nto loop over siblings in the active region.\n\nThe list of commands is this:\n\n- org-archive-subtree\n- org-archive-to-archive-sibling\n- org-toggle-archive-tag\n- org-schedule\n\nWhen `org-loop-over-siblings-within-active-region-p' is `non-nil' and\nyou run one of the command above on a region containing several headlines,\nthen Org will apply the command to each headline.\n\nThis can be particularily useful for archiving several headlines, or to\n\n* org.el (org-loop-over-siblings-within-active-region-p): New\ndefcustom so that `org-loop-over-siblings-in-active-region'\ncan be turned on and off.\n(org-deadline, org-schedule): Use the new macro.\n\n* org-macs.el (org-loop-over-siblings-in-active-region): New\nmacro to let some commands act upon several siblings in the\nactive region.\n\n* org-archive.el (org-archive-subtree)\n(org-archive-to-archive-sibling, org-toggle-archive-tag): Use\n`org-loop-over-siblings-in-active-region'.```", null, "Bastien Guerry 8 years ago\nparent\ncommit\n366254217a\n3 changed files with 311 additions and 277 deletions\n1. 211 209\nlisp/org-archive.el\n2. 20 0\nlisp/org-macs.el\n3. 80 68\nlisp/org.el\n\n#### + 211 - 209 lisp/org-archive.el View File\n\n ``@@ -190,157 +190,157 @@ If the cursor is not at a headline when this command is called, try all level`` `` 1 trees. If the cursor is on a headline, only try the direct children of`` `` this heading.\"`` `` (interactive \"P\")`` ``- (if find-done`` ``- (org-archive-all-done)`` ``- ;; Save all relevant TODO keyword-relatex variables`` ``-`` ``- (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler`` ``- (tr-org-todo-keywords-1 org-todo-keywords-1)`` ``- (tr-org-todo-kwd-alist org-todo-kwd-alist)`` ``- (tr-org-done-keywords org-done-keywords)`` ``- (tr-org-todo-regexp org-todo-regexp)`` ``- (tr-org-todo-line-regexp org-todo-line-regexp)`` ``- (tr-org-odd-levels-only org-odd-levels-only)`` ``- (this-buffer (current-buffer))`` ``- ;; start of variables that will be used for saving context`` ``- ;; The compiler complains about them - keep them anyway!`` ``- (file (abbreviate-file-name (buffer-file-name)))`` ``- (olpath (mapconcat 'identity (org-get-outline-path) \"/\"))`` ``- (time (format-time-string`` ``- (substring (cdr org-time-stamp-formats) 1 -1)`` ``- (current-time)))`` ``- category todo priority ltags itags atags`` ``- ;; end of variables that will be used for saving context`` ``- location afile heading buffer level newfile-p infile-p visiting)`` ``-`` ``- ;; Find the local archive location`` ``- (setq location (org-get-local-archive-location)`` ``- afile (org-extract-archive-file location)`` ``- heading (org-extract-archive-heading location)`` ``- infile-p (equal file (abbreviate-file-name afile)))`` ``- (unless afile`` ``- (error \"Invalid `org-archive-location'\"))`` ``-`` ``- (if (> (length afile) 0)`` ``- (setq newfile-p (not (file-exists-p afile))`` ``- visiting (find-buffer-visiting afile)`` ``- buffer (or visiting (find-file-noselect afile)))`` ``- (setq buffer (current-buffer)))`` ``- (unless buffer`` ``- (error \"Cannot access file \\\"%s\\\"\" afile))`` ``- (if (and (> (length heading) 0)`` ``- (string-match \"^\\\\*+\" heading))`` ``- (setq level (match-end 0))`` ``- (setq heading nil level 0))`` ``- (save-excursion`` ``- (org-back-to-heading t)`` ``- ;; Get context information that will be lost by moving the tree`` ``- (setq category (org-get-category nil 'force-refresh)`` ``- todo (and (looking-at org-todo-line-regexp)`` ``- (match-string 2))`` ``- priority (org-get-priority`` ``- (if (match-end 3) (match-string 3) \"\"))`` ``- ltags (org-get-tags)`` ``- itags (org-delete-all ltags (org-get-tags-at))`` ``- atags (org-get-tags-at))`` ``- (setq ltags (mapconcat 'identity ltags \" \")`` ``- itags (mapconcat 'identity itags \" \"))`` ``- ;; We first only copy, in case something goes wrong`` ``- ;; we need to protect `this-command', to avoid kill-region sets it,`` ``- ;; which would lead to duplication of subtrees`` ``- (let (this-command) (org-copy-subtree 1 nil t))`` ``- (set-buffer buffer)`` ``- ;; Enforce org-mode for the archive buffer`` ``- (if (not (org-mode-p))`` ``- ;; Force the mode for future visits.`` ``- (let ((org-insert-mode-line-in-empty-file t)`` ``- (org-inhibit-startup t))`` ``- (call-interactively 'org-mode)))`` ``- (when newfile-p`` ``- (goto-char (point-max))`` ``- (insert (format \"\\nArchived entries from file %s\\n\\n\"`` ``- (buffer-file-name this-buffer))))`` ``- ;; Force the TODO keywords of the original buffer`` ``- (let ((org-todo-line-regexp tr-org-todo-line-regexp)`` ``- (org-todo-keywords-1 tr-org-todo-keywords-1)`` ``- (org-todo-kwd-alist tr-org-todo-kwd-alist)`` ``- (org-done-keywords tr-org-done-keywords)`` ``- (org-todo-regexp tr-org-todo-regexp)`` ``- (org-todo-line-regexp tr-org-todo-line-regexp)`` ``- (org-odd-levels-only`` ``- (if (local-variable-p 'org-odd-levels-only (current-buffer))`` ``- org-odd-levels-only`` ``- tr-org-odd-levels-only)))`` ``- (goto-char (point-min))`` ``- (show-all)`` ``- (if heading`` ``- (progn`` ``- (if (re-search-forward`` ``- (concat \"^\" (regexp-quote heading)`` ``- (org-re \"[ \\t]*\\\\(:[[:alnum:]_@#%:]+:\\\\)?[ \\t]*\\\\(\\$\\\\|\\r\\\\)\"))`` ``- nil t)`` ``- (goto-char (match-end 0))`` ``- ;; Heading not found, just insert it at the end`` ``- (goto-char (point-max))`` ``- (or (bolp) (insert \"\\n\"))`` ``- (insert \"\\n\" heading \"\\n\")`` ``- (end-of-line 0))`` ``- ;; Make the subtree visible`` ``- (show-subtree)`` ``- (if org-archive-reversed-order`` ``- (progn`` ``- (org-back-to-heading t)`` ``- (outline-next-heading))`` ``- (org-end-of-subtree t))`` ``- (skip-chars-backward \" \\t\\r\\n\")`` ``- (and (looking-at \"[ \\t\\r\\n]*\")`` ``- (replace-match \"\\n\\n\")))`` ``- ;; No specific heading, just go to end of file.`` ``- (goto-char (point-max)) (insert \"\\n\"))`` ``- ;; Paste`` ``- (org-paste-subtree (org-get-valid-level level (and heading 1)))`` ``- ;; Shall we append inherited tags?`` ``- (and itags`` ``- (or (and (eq org-archive-subtree-add-inherited-tags 'infile) `` ``- infile-p)`` ``- (eq org-archive-subtree-add-inherited-tags t))`` ``- (org-set-tags-to atags))`` ``- ;; Mark the entry as done`` ``- (when (and org-archive-mark-done`` ``- (looking-at org-todo-line-regexp)`` ``- (or (not (match-end 2))`` ``- (not (member (match-string 2) org-done-keywords))))`` ``- (let (org-log-done org-todo-log-states)`` ``- (org-todo`` ``- (car (or (member org-archive-mark-done org-done-keywords)`` ``- org-done-keywords)))))`` ``-`` ``- ;; Add the context info`` ``- (when org-archive-save-context-info`` ``- (let ((l org-archive-save-context-info) e n v)`` ``- (while (setq e (pop l))`` ``- (when (and (setq v (symbol-value e))`` ``- (stringp v) (string-match \"\\\\S-\" v))`` ``- (setq n (concat \"ARCHIVE_\" (upcase (symbol-name e))))`` ``- (org-entry-put (point) n v)))))`` ``-`` ``- ;; Save and kill the buffer, if it is not the same buffer.`` ``- (when (not (eq this-buffer buffer))`` ``- (save-buffer))`` ``- ))`` ``- ;; Here we are back in the original buffer. Everything seems to have`` ``- ;; worked. So now cut the tree and finish up.`` ``- (let (this-command) (org-cut-subtree))`` ``- (when (featurep 'org-inlinetask)`` ``- (org-inlinetask-remove-END-maybe))`` ``- (setq org-markers-to-move nil)`` ``- (message \"Subtree archived %s\"`` ``- (if (eq this-buffer buffer)`` ``- (concat \"under heading: \" heading)`` ``- (concat \"in file: \" (abbreviate-file-name afile))))))`` ``- (org-reveal)`` ``- (if (looking-at \"^[ \\t]*\\$\")`` ``- (outline-next-visible-heading 1)))`` ``+ (org-loop-over-siblings-in-active-region`` ``+ (if find-done`` ``+ (org-archive-all-done)`` ``+ ;; Save all relevant TODO keyword-relatex variables`` ``+ `` ``+ (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler`` ``+ (tr-org-todo-keywords-1 org-todo-keywords-1)`` ``+ (tr-org-todo-kwd-alist org-todo-kwd-alist)`` ``+ (tr-org-done-keywords org-done-keywords)`` ``+ (tr-org-todo-regexp org-todo-regexp)`` ``+ (tr-org-todo-line-regexp org-todo-line-regexp)`` ``+ (tr-org-odd-levels-only org-odd-levels-only)`` ``+ (this-buffer (current-buffer))`` ``+ ;; start of variables that will be used for saving context`` ``+ ;; The compiler complains about them - keep them anyway!`` ``+ (file (abbreviate-file-name (buffer-file-name)))`` ``+ (olpath (mapconcat 'identity (org-get-outline-path) \"/\"))`` ``+ (time (format-time-string`` ``+ (substring (cdr org-time-stamp-formats) 1 -1)`` ``+ (current-time)))`` ``+ category todo priority ltags itags atags`` ``+ ;; end of variables that will be used for saving context`` ``+ location afile heading buffer level newfile-p infile-p visiting)`` ``+ `` ``+ ;; Find the local archive location`` ``+ (setq location (org-get-local-archive-location)`` ``+ afile (org-extract-archive-file location)`` ``+ heading (org-extract-archive-heading location)`` ``+ infile-p (equal file (abbreviate-file-name afile)))`` ``+ (unless afile`` ``+ (error \"Invalid `org-archive-location'\"))`` ``+ `` ``+ (if (> (length afile) 0)`` ``+ (setq newfile-p (not (file-exists-p afile))`` ``+ visiting (find-buffer-visiting afile)`` ``+ buffer (or visiting (find-file-noselect afile)))`` ``+ (setq buffer (current-buffer)))`` ``+ (unless buffer`` ``+ (error \"Cannot access file \\\"%s\\\"\" afile))`` ``+ (if (and (> (length heading) 0)`` ``+ (string-match \"^\\\\*+\" heading))`` ``+ (setq level (match-end 0))`` ``+ (setq heading nil level 0))`` ``+ (save-excursion`` ``+ (org-back-to-heading t)`` ``+ ;; Get context information that will be lost by moving the tree`` ``+ (setq category (org-get-category nil 'force-refresh)`` ``+ todo (and (looking-at org-todo-line-regexp)`` ``+ (match-string 2))`` ``+ priority (org-get-priority`` ``+ (if (match-end 3) (match-string 3) \"\"))`` ``+ ltags (org-get-tags)`` ``+ itags (org-delete-all ltags (org-get-tags-at))`` ``+ atags (org-get-tags-at))`` ``+ (setq ltags (mapconcat 'identity ltags \" \")`` ``+ itags (mapconcat 'identity itags \" \"))`` ``+ ;; We first only copy, in case something goes wrong`` ``+ ;; we need to protect `this-command', to avoid kill-region sets it,`` ``+ ;; which would lead to duplication of subtrees`` ``+ (let (this-command) (org-copy-subtree 1 nil t))`` ``+ (set-buffer buffer)`` ``+ ;; Enforce org-mode for the archive buffer`` ``+ (if (not (org-mode-p))`` ``+ ;; Force the mode for future visits.`` ``+ (let ((org-insert-mode-line-in-empty-file t)`` ``+ (org-inhibit-startup t))`` ``+ (call-interactively 'org-mode)))`` ``+ (when newfile-p`` ``+ (goto-char (point-max))`` ``+ (insert (format \"\\nArchived entries from file %s\\n\\n\"`` ``+ (buffer-file-name this-buffer))))`` ``+ ;; Force the TODO keywords of the original buffer`` ``+ (let ((org-todo-line-regexp tr-org-todo-line-regexp)`` ``+ (org-todo-keywords-1 tr-org-todo-keywords-1)`` ``+ (org-todo-kwd-alist tr-org-todo-kwd-alist)`` ``+ (org-done-keywords tr-org-done-keywords)`` ``+ (org-todo-regexp tr-org-todo-regexp)`` ``+ (org-todo-line-regexp tr-org-todo-line-regexp)`` ``+ (org-odd-levels-only`` ``+ (if (local-variable-p 'org-odd-levels-only (current-buffer))`` ``+ org-odd-levels-only`` ``+ tr-org-odd-levels-only)))`` ``+ (goto-char (point-min))`` ``+ (show-all)`` ``+ (if heading`` ``+ (progn`` ``+ (if (re-search-forward`` ``+ (concat \"^\" (regexp-quote heading)`` ``+ (org-re \"[ \\t]*\\\\(:[[:alnum:]_@#%:]+:\\\\)?[ \\t]*\\\\(\\$\\\\|\\r\\\\)\"))`` ``+ nil t)`` ``+ (goto-char (match-end 0))`` ``+ ;; Heading not found, just insert it at the end`` ``+ (goto-char (point-max))`` ``+ (or (bolp) (insert \"\\n\"))`` ``+ (insert \"\\n\" heading \"\\n\")`` ``+ (end-of-line 0))`` ``+ ;; Make the subtree visible`` ``+ (show-subtree)`` ``+ (if org-archive-reversed-order`` ``+ (progn`` ``+ (org-back-to-heading t)`` ``+ (outline-next-heading))`` ``+ (org-end-of-subtree t))`` ``+ (skip-chars-backward \" \\t\\r\\n\")`` ``+ (and (looking-at \"[ \\t\\r\\n]*\")`` ``+ (replace-match \"\\n\\n\")))`` ``+ ;; No specific heading, just go to end of file.`` ``+ (goto-char (point-max)) (insert \"\\n\"))`` ``+ ;; Paste`` ``+ (org-paste-subtree (org-get-valid-level level (and heading 1)))`` ``+ ;; Shall we append inherited tags?`` ``+ (and itags`` ``+ (or (and (eq org-archive-subtree-add-inherited-tags 'infile) `` ``+ infile-p)`` ``+ (eq org-archive-subtree-add-inherited-tags t))`` ``+ (org-set-tags-to atags))`` ``+ ;; Mark the entry as done`` ``+ (when (and org-archive-mark-done`` ``+ (looking-at org-todo-line-regexp)`` ``+ (or (not (match-end 2))`` ``+ (not (member (match-string 2) org-done-keywords))))`` ``+ (let (org-log-done org-todo-log-states)`` ``+ (org-todo`` ``+ (car (or (member org-archive-mark-done org-done-keywords)`` ``+ org-done-keywords)))))`` ``+ `` ``+ ;; Add the context info`` ``+ (when org-archive-save-context-info`` ``+ (let ((l org-archive-save-context-info) e n v)`` ``+ (while (setq e (pop l))`` ``+ (when (and (setq v (symbol-value e))`` ``+ (stringp v) (string-match \"\\\\S-\" v))`` ``+ (setq n (concat \"ARCHIVE_\" (upcase (symbol-name e))))`` ``+ (org-entry-put (point) n v)))))`` ``+ `` ``+ ;; Save and kill the buffer, if it is not the same buffer.`` ``+ (when (not (eq this-buffer buffer))`` ``+ (save-buffer))))`` ``+ ;; Here we are back in the original buffer. Everything seems to have`` ``+ ;; worked. So now cut the tree and finish up.`` ``+ (let (this-command) (org-cut-subtree))`` ``+ (when (featurep 'org-inlinetask)`` ``+ (org-inlinetask-remove-END-maybe))`` ``+ (setq org-markers-to-move nil)`` ``+ (message \"Subtree archived %s\"`` ``+ (if (eq this-buffer buffer)`` ``+ (concat \"under heading: \" heading)`` ``+ (concat \"in file: \" (abbreviate-file-name afile))))))`` ``+ (org-reveal)`` ``+ (if (looking-at \"^[ \\t]*\\$\")`` ``+ (outline-next-visible-heading 1))))`` `` `` `` (defun org-archive-to-archive-sibling ()`` `` \"Archive the current heading by moving it under the archive sibling.`` ``@@ -348,55 +348,56 @@ The archive sibling is a sibling of the heading with the heading name`` `` `org-archive-sibling-heading' and an `org-archive-tag' tag. If this`` `` sibling does not exist, it will be created at the end of the subtree.\"`` `` (interactive)`` ``- (save-restriction`` ``- (widen)`` ``- (let (b e pos leader level)`` ``- (org-back-to-heading t)`` ``- (looking-at org-outline-regexp)`` ``- (setq leader (match-string 0)`` ``- level (funcall outline-level))`` ``- (setq pos (point))`` ``- (condition-case nil`` ``- (outline-up-heading 1 t)`` ``- (error (setq e (point-max)) (goto-char (point-min))))`` ``- (setq b (point))`` ``- (unless e`` ``- (condition-case nil`` ``- (org-end-of-subtree t t)`` ``- (error (goto-char (point-max))))`` ``- (setq e (point)))`` ``- (goto-char b)`` ``- (unless (re-search-forward`` ``- (concat \"^\" (regexp-quote leader)`` ``- \"[ \\t]*\"`` ``- org-archive-sibling-heading`` ``- \"[ \\t]*:\"`` ``- org-archive-tag \":\") e t)`` ``- (goto-char e)`` ``- (or (bolp) (newline))`` ``- (insert leader org-archive-sibling-heading \"\\n\")`` ``- (beginning-of-line 0)`` ``- (org-toggle-tag org-archive-tag 'on))`` ``- (beginning-of-line 1)`` ``- (if org-archive-reversed-order`` ``- (outline-next-heading)`` ``- (org-end-of-subtree t t))`` ``- (save-excursion`` ``- (goto-char pos)`` ``- (let ((this-command this-command)) (org-cut-subtree)))`` ``- (org-paste-subtree (org-get-valid-level level 1))`` ``- (org-set-property`` ``- \"ARCHIVE_TIME\"`` ``- (format-time-string`` ``- (substring (cdr org-time-stamp-formats) 1 -1)`` ``- (current-time)))`` ``- (outline-up-heading 1 t)`` ``- (hide-subtree)`` ``- (org-cycle-show-empty-lines 'folded)`` ``- (goto-char pos)))`` ``- (org-reveal)`` ``- (if (looking-at \"^[ \\t]*\\$\")`` ``- (outline-next-visible-heading 1)))`` ``+ (org-loop-over-siblings-in-active-region`` ``+ (save-restriction`` ``+ (widen)`` ``+ (let (b e pos leader level)`` ``+ (org-back-to-heading t)`` ``+ (looking-at outline-regexp)`` ``+ (setq leader (match-string 0)`` ``+ level (funcall outline-level))`` ``+ (setq pos (point))`` ``+ (condition-case nil`` ``+ (outline-up-heading 1 t)`` ``+ (error (setq e (point-max)) (goto-char (point-min))))`` ``+ (setq b (point))`` ``+ (unless e`` ``+ (condition-case nil`` ``+ (org-end-of-subtree t t)`` ``+ (error (goto-char (point-max))))`` ``+ (setq e (point)))`` ``+ (goto-char b)`` ``+ (unless (re-search-forward`` ``+ (concat \"^\" (regexp-quote leader)`` ``+ \"[ \\t]*\"`` ``+ org-archive-sibling-heading`` ``+ \"[ \\t]*:\"`` ``+ org-archive-tag \":\") e t)`` ``+ (goto-char e)`` ``+ (or (bolp) (newline))`` ``+ (insert leader org-archive-sibling-heading \"\\n\")`` ``+ (beginning-of-line 0)`` ``+ (org-toggle-tag org-archive-tag 'on))`` ``+ (beginning-of-line 1)`` ``+ (if org-archive-reversed-order`` ``+ (outline-next-heading)`` ``+ (org-end-of-subtree t t))`` ``+ (save-excursion`` ``+ (goto-char pos)`` ``+ (let ((this-command this-command)) (org-cut-subtree)))`` ``+ (org-paste-subtree (org-get-valid-level level 1))`` ``+ (org-set-property`` ``+ \"ARCHIVE_TIME\"`` ``+ (format-time-string`` ``+ (substring (cdr org-time-stamp-formats) 1 -1)`` ``+ (current-time)))`` ``+ (outline-up-heading 1 t)`` ``+ (hide-subtree)`` ``+ (org-cycle-show-empty-lines 'folded)`` ``+ (goto-char pos)))`` ``+ (org-reveal)`` ``+ (if (looking-at \"^[ \\t]*\\$\")`` ``+ (outline-next-visible-heading 1))))`` `` `` `` (defun org-archive-all-done (&optional tag)`` `` \"Archive sublevels of the current tree without open TODO items.`` ``@@ -447,15 +448,16 @@ When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag.\"`` `` With prefix ARG, check all children of current headline and offer tagging`` `` the children that do not contain any open TODO items.\"`` `` (interactive \"P\")`` ``- (if find-done`` ``- (org-archive-all-done 'tag)`` ``- (let (set)`` ``- (save-excursion`` ``- (org-back-to-heading t)`` ``- (setq set (org-toggle-tag org-archive-tag))`` ``- (when set (hide-subtree)))`` ``- (and set (beginning-of-line 1))`` ``- (message \"Subtree %s\" (if set \"archived\" \"unarchived\")))))`` ``+ (org-loop-over-siblings-in-active-region`` ``+ (if find-done`` ``+ (org-archive-all-done 'tag)`` ``+ (let (set)`` ``+ (save-excursion`` ``+ (org-back-to-heading t)`` ``+ (setq set (org-toggle-tag org-archive-tag))`` ``+ (when set (hide-subtree)))`` ``+ (and set (beginning-of-line 1))`` ``+ (message \"Subtree %s\" (if set \"archived\" \"unarchived\"))))))`` `` `` `` (defun org-archive-set-tag ()`` `` \"Set the ARCHIVE tag.\"``\n\n#### + 20 - 0 lisp/org-macs.el View File\n\n ``@@ -367,6 +367,26 @@ The number of levels is controlled by `org-inlinetask-min-level'\"`` `` (format-seconds string seconds)`` `` (format-time-string string (seconds-to-time seconds))))`` `` `` ``+(defmacro org-loop-over-siblings-in-active-region (&rest body)`` ``+ \"Execute BODY on possibly several headlines.\"`` ``+ `(if (or (not (org-region-active-p))`` ``+ (not org-loop-over-siblings-within-active-region-p))`` ``+ ,@body`` ``+ (save-excursion`` ``+ (let ((beg (region-beginning))`` ``+ (end (region-end))`` ``+ mrkrs mrkr nxt)`` ``+ (goto-char beg)`` ``+ (or (org-at-heading-p) (outline-next-heading))`` ``+ (setq mrkrs (list (set-marker (make-marker) (point))))`` ``+ (while (and (setq nxt (org-get-next-sibling)) (< nxt end))`` ``+ (setq mrkrs `` ``+ (append mrkrs (list (set-marker `` ``+ (make-marker) (point))))))`` ``+ (while (setq mrkr (pop mrkrs))`` ``+ (goto-char mrkr)`` ``+ ,@body)))))`` ``+`` `` (provide 'org-macs)`` `` `` `` ;; arch-tag: 7e6a73ce-aac9-4fc0-9b30-ce6f89dc6668``\n\n#### + 80 - 68 lisp/org.el View File\n\n ``@@ -1971,12 +1971,22 @@ heading.\"`` `` :group 'org-time)`` `` `` `` (defvar org-todo-interpretation-widgets`` ``- '(`` ``- (:tag \"Sequence (cycling hits every state)\" sequence)`` ``+ '((:tag \"Sequence (cycling hits every state)\" sequence)`` `` (:tag \"Type (cycling directly to DONE)\" type))`` `` \"The available interpretation symbols for customizing `org-todo-keywords'.`` `` Interested libraries should add to this list.\")`` `` `` ``+(defcustom org-loop-over-siblings-within-active-region-p nil`` ``+ \"Shall some commands act upon siblings in the active region?`` ``+The list of commands is: `` ``+- `org-schedule'`` ``+- `org-deadline'`` ``+- `org-archive-subtree'`` ``+- `org-archive-to-archive-sibling'`` ``+- `org-archive-set-tag'\"`` ``+ :group 'org-todo`` ``+ :group 'org-archive)`` ``+`` `` (defcustom org-todo-keywords '((sequence \"TODO\" \"DONE\"))`` `` \"List of TODO entry keyword sequences and their interpretation.`` `` \\\\This is a list of sequences.`` ``@@ -11664,39 +11674,40 @@ With argument REMOVE, remove any deadline from the item.`` `` When TIME is set, it should be an internal time specification, and the`` `` scheduling will use the corresponding date.\"`` `` (interactive \"P\")`` ``- (let* ((old-date (org-entry-get nil \"DEADLINE\"))`` ``- (repeater (and old-date`` ``- (string-match`` ``- \"\\\\([.+-]+[0-9]+[dwmy]\\\\(?:[/ ][-+]?[0-9]+[dwmy]\\\\)?\\\\) ?\"`` ``- old-date)`` ``- (match-string 1 old-date))))`` ``- (if remove`` ``- (progn`` ``- (when (and old-date org-log-redeadline)`` ``- (org-add-log-setup 'deldeadline nil old-date 'findpos`` ``- org-log-redeadline))`` ``- (org-remove-timestamp-with-keyword org-deadline-string)`` ``- (message \"Item no longer has a deadline.\"))`` ``- (org-add-planning-info 'deadline time 'closed)`` ``- (when (and old-date org-log-redeadline`` ``- (not (equal old-date`` ``- (substring org-last-inserted-timestamp 1 -1))))`` ``- (org-add-log-setup 'redeadline nil old-date 'findpos`` ``- org-log-redeadline))`` ``- (when repeater`` ``- (save-excursion`` ``- (org-back-to-heading t)`` ``- (when (re-search-forward (concat org-deadline-string \" \"`` ``- org-last-inserted-timestamp)`` ``- (save-excursion`` ``- (outline-next-heading) (point)) t)`` ``- (goto-char (1- (match-end 0)))`` ``- (insert \" \" repeater)`` ``- (setq org-last-inserted-timestamp`` ``- (concat (substring org-last-inserted-timestamp 0 -1)`` ``- \" \" repeater`` ``- (substring org-last-inserted-timestamp -1))))))`` ``- (message \"Deadline on %s\" org-last-inserted-timestamp))))`` ``+ (org-loop-over-siblings-in-active-region`` ``+ (let* ((old-date (org-entry-get nil \"DEADLINE\"))`` ``+ (repeater (and old-date`` ``+ (string-match`` ``+ \"\\\\([.+-]+[0-9]+[dwmy]\\\\(?:[/ ][-+]?[0-9]+[dwmy]\\\\)?\\\\) ?\"`` ``+ old-date)`` ``+ (match-string 1 old-date))))`` ``+ (if remove`` ``+ (progn`` ``+ (when (and old-date org-log-redeadline)`` ``+ (org-add-log-setup 'deldeadline nil old-date 'findpos`` ``+ org-log-redeadline))`` ``+ (org-remove-timestamp-with-keyword org-deadline-string)`` ``+ (message \"Item no longer has a deadline.\"))`` ``+ (org-add-planning-info 'deadline time 'closed)`` ``+ (when (and old-date org-log-redeadline`` ``+ (not (equal old-date`` ``+ (substring org-last-inserted-timestamp 1 -1))))`` ``+ (org-add-log-setup 'redeadline nil old-date 'findpos`` ``+ org-log-redeadline))`` ``+ (when repeater`` ``+ (save-excursion`` ``+ (org-back-to-heading t)`` ``+ (when (re-search-forward (concat org-deadline-string \" \"`` ``+ org-last-inserted-timestamp)`` ``+ (save-excursion`` ``+ (outline-next-heading) (point)) t)`` ``+ (goto-char (1- (match-end 0)))`` ``+ (insert \" \" repeater)`` ``+ (setq org-last-inserted-timestamp`` ``+ (concat (substring org-last-inserted-timestamp 0 -1)`` ``+ \" \" repeater`` ``+ (substring org-last-inserted-timestamp -1))))))`` ``+ (message \"Deadline on %s\" org-last-inserted-timestamp)))))`` `` `` `` (defun org-schedule (&optional remove time)`` `` \"Insert the SCHEDULED: string with a timestamp to schedule a TODO item.`` ``@@ -11704,39 +11715,40 @@ With argument REMOVE, remove any scheduling date from the item.`` `` When TIME is set, it should be an internal time specification, and the`` `` scheduling will use the corresponding date.\"`` `` (interactive \"P\")`` ``- (let* ((old-date (org-entry-get nil \"SCHEDULED\"))`` ``- (repeater (and old-date`` ``- (string-match`` ``- \"\\\\([.+-]+[0-9]+[dwmy]\\\\(?:[/ ][-+]?[0-9]+[dwmy]\\\\)?\\\\) ?\"`` ``- old-date)`` ``- (match-string 1 old-date))))`` ``- (if remove`` ``- (progn`` ``- (when (and old-date org-log-reschedule)`` ``- (org-add-log-setup 'delschedule nil old-date 'findpos`` ``- org-log-reschedule))`` ``- (org-remove-timestamp-with-keyword org-scheduled-string)`` ``- (message \"Item is no longer scheduled.\"))`` ``- (org-add-planning-info 'scheduled time 'closed)`` ``- (when (and old-date org-log-reschedule`` ``- (not (equal old-date`` ``- (substring org-last-inserted-timestamp 1 -1))))`` ``- (org-add-log-setup 'reschedule nil old-date 'findpos`` ``- org-log-reschedule))`` ``- (when repeater`` ``- (save-excursion`` ``- (org-back-to-heading t)`` ``- (when (re-search-forward (concat org-scheduled-string \" \"`` ``- org-last-inserted-timestamp)`` ``- (save-excursion`` ``- (outline-next-heading) (point)) t)`` ``- (goto-char (1- (match-end 0)))`` ``- (insert \" \" repeater)`` ``- (setq org-last-inserted-timestamp`` ``- (concat (substring org-last-inserted-timestamp 0 -1)`` ``- \" \" repeater`` ``- (substring org-last-inserted-timestamp -1))))))`` ``- (message \"Scheduled to %s\" org-last-inserted-timestamp))))`` ``+ (org-loop-over-siblings-in-active-region`` ``+ (let* ((old-date (org-entry-get nil \"SCHEDULED\"))`` ``+ (repeater (and old-date`` ``+ (string-match`` ``+ \"\\\\([.+-]+[0-9]+[dwmy]\\\\(?:[/ ][-+]?[0-9]+[dwmy]\\\\)?\\\\) ?\"`` ``+ old-date)`` ``+ (match-string 1 old-date))))`` ``+ (if remove`` ``+ (progn`` ``+ (when (and old-date org-log-reschedule)`` ``+ (org-add-log-setup 'delschedule nil old-date 'findpos`` ``+ org-log-reschedule))`` ``+ (org-remove-timestamp-with-keyword org-scheduled-string)`` ``+ (message \"Item is no longer scheduled.\"))`` ``+ (org-add-planning-info 'scheduled time 'closed)`` ``+ (when (and old-date org-log-reschedule`` ``+ (not (equal old-date`` ``+ (substring org-last-inserted-timestamp 1 -1))))`` ``+ (org-add-log-setup 'reschedule nil old-date 'findpos`` ``+ org-log-reschedule))`` ``+ (when repeater`` ``+ (save-excursion`` ``+ (org-back-to-heading t)`` ``+ (when (re-search-forward (concat org-scheduled-string \" \"`` ``+ org-last-inserted-timestamp)`` ``+ (save-excursion`` ``+ (outline-next-heading) (point)) t)`` ``+ (goto-char (1- (match-end 0)))`` ``+ (insert \" \" repeater)`` ``+ (setq org-last-inserted-timestamp`` ``+ (concat (substring org-last-inserted-timestamp 0 -1)`` ``+ \" \" repeater`` ``+ (substring org-last-inserted-timestamp -1))))))`` ``+ (message \"Scheduled to %s\" org-last-inserted-timestamp)))))`` `` `` `` (defun org-get-scheduled-time (pom &optional inherit)`` `` \"Get the scheduled time as a time tuple, of a format suitable``" ]
[ null, "https://secure.gravatar.com/avatar/beca86d6416e66d0b9d5b25699995b98", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.50104296,"math_prob":0.4131927,"size":17883,"snap":"2020-10-2020-16","text_gpt3_token_len":5835,"char_repetition_ratio":0.28111193,"word_repetition_ratio":0.5308863,"special_character_ratio":0.4311357,"punctuation_ratio":0.06264775,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99529344,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-18T05:15:35Z\",\"WARC-Record-ID\":\"<urn:uuid:5307e389-4442-41f2-8ef7-13cf1c0ea168>\",\"Content-Length\":\"256233\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:7c5cb649-f0b3-4f5c-a96a-71b0a8fe14fb>\",\"WARC-Concurrent-To\":\"<urn:uuid:dd4b0ab9-b7ad-40f5-b829-aea6b9ded2d8>\",\"WARC-IP-Address\":\"45.77.159.66\",\"WARC-Target-URI\":\"https://code.orgmode.org/bzg/org-mode/commit/366254217ac6faea20a5d43fae065bd028806eab\",\"WARC-Payload-Digest\":\"sha1:5XB3UWTT4NJDOMBQJWZUJ6SI7MPFUCNO\",\"WARC-Block-Digest\":\"sha1:VUCTYVSFIACKLTK5PZURAQRVCPZV6JR4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875143505.60_warc_CC-MAIN-20200218025323-20200218055323-00255.warc.gz\"}"}
https://hbhs.ecboe.org/cms/One.aspx?portalId=25704&pageId=417967
[ "AP Calculus Syllabus\n\n# Course Overview\n\nThis is an Advanced Placement Course and every student is expected to take the AP Exam.  Students are also preparing for their next mathematics course.  Expectations are clearly explained on the first day of school.  Students are informed that this course is a college level course that is both demanding and rigorous.  The students are told that we will work together to discover and develop an appreciation of calculus.\n\n## Course Assessments\n\nStudents are regularly assessed on a cumulative basis through math labs, homework, and past Free-Response questions.  Students are evaluated and expected to understand calculus:  Numerically, Algebraically, Graphically, and Verbally (Rule of Four).  All tests consist of general problems, multiple-choice questions, and past Free-Response items.  All assessments contain questions in which students are required to justify their solutions in well-written sentences.  Students are allowed to use their graphing calculator on the last part of each test.\n\n# Calculus Journals\n\nStudents are required to keep journals that are divided into three sections.  The first section is labeled “In Your Own Words” and is to be completed at the end of every week. In this section, students are required to explain previously taught concepts in their own words.  Students may also discuss real world applications of concepts learned in class in this section.  The next section is labeled “Cooperative Homework Assignment”.   Students are divided into to groups to collaboratively complete one homework assignment each week.  Students must record how long the group met, who was in attendance, and what difficulties or notable successes the group may have had during the session.  Students must report if they were any disagreements regarding any solutions and explain alternative solutions.  The last section is labeled “Error Analysis”.  Students are required to explain and correct their errors on previous test/quizzes in well-written sentences.\n\n# Technology and Computer Software\n\nGraphing calculators are utilized in both teaching and learning.  Both TI-84 Plus and TI-89 Titanium graphing calculators are used throughout the course to help students interpret results and verify conclusions.  Students who are not able to purchase their own graphing calculator are allowed to check out a calculator from their teacher.  Additionally, PowerPoint presentations downloaded from the Internet are used to aid students’ comprehension of key calculus concepts, such as Reimann Sums.\n\n# Primary Textbook\n\nOur primary textbook is Calculus of a Single Variable 2002, seventh edition, Larson, Hostetler, and Edwards, published by Houghton Mifflin:  Boston, New York, ISBN 0-618-14916-3.\n\n## Course Planner:This course is planned by six weeks units.  We have six units per year.\n\n#### FIRST SIX WEEKS\n\n1\n\nLocal Linearity – we explore various functions and discover that by zooming in, the function may appear to be a straight line.  We can find the slope of a line with these two points that are very close together.  Students work in pairs to find the slope of the segment connecting the two points.  Each pair is responsible for finding the slope at several points on a given function.  We explore the various functions as each pair reports on their finding.  We refer back to this activity often in our later studies.  We use this activity to review concepts needed for calculus.  Our students use the TI-89 and some also use the TI-83/84.  Calculators are used often to explore and discover.  We emphasize the four capabilities that students are allowed to use on the exam – plot the graph of a function within an arbitrary viewing window, find the zeros of functions, numerically calculate the derivative of a function, and numerically calculate the value of a definite integral.\n\n2\n\nLimits – an intuitive understanding, using algebra, and estimating limits from graphs and tables of values.  We use the graphing calculator to find limits on the graph screen and from the table.(TEST 1)\n\n3\n\nContinuity – definition of continuity, one-sided limits, Intermediate Value Theorem.\n\n4\n\nInfinite Limits – Vertical Asymptotes, finding vertical asymptotes and determining infinite limits.  (TEST 2)\n\n5\n\nThe Derivative and the Tangent Line Problem – students are reminded about the opening activity, local linearity.  We define the derivative of a function and find some derivatives using this method.  We want students to recognize the definition of the derivative (limit of the difference quotient) and the alternate form.  This exploration allows us to discover some of the rules for differentiation that we will study.  We compare this work to the slopes we found when we used local linearity.\n\n6\n\nDifferentiability and Continuity – vertical tangent lines and points that have no tangent line, Instantaneous rate of change, Graphical, Numerical, and Analytical Differentiation.   (TEST 3)\n\n7\n\nRules for Basic Differentiation:  The Constant Rule, The Power Rule, The Constant Multiple Rule, The Sum and Difference Rules, Sine and Cosine, and Rates of Change.  (SIX WEEKS TEST, AP style questions, both multiple choice and free response)\n\n### The First Derivative Test, Increasing and Decreasing Functions  (SIX WEEKS TEST)\n\n#### Third Six Weeks\n\n1\n\nConcavity, Points of Inflection, The Second Derivative Test.  This lesson concludes with a matching game.  Students match graphs of functions with their derivatives.  Also descriptions of the function and derivative are matched with the graphs.  Students verbalize what they are looking for and how they know they have a match.  This is a very rich conversation filled with talk such as “The first derivative is positive, so the function must be increasing over this interval.”\n\n2\n\nDerivative as a rate of change – position, velocity, acceleration, and the question of speed.\n\n3\n\nConnecting", null, "in tables and graphs.\n\n4\n\nLimit as x approaches infinity, Horizontal Asymptotes\n\n5\n\nCurve Sketching without the graphing calculator.  Many of our students will attend universities that do not allow the graphing calculator in the next course they take.  We work on increasing our power to sketch the functions without the calculator.  We use the first and second derivative to make accurate sketches.  We emphasize the rational functions and improve our ability to make a sketch so that we identify intervals of increasing/decreasing and concave up/concave down quickly.  (TEST 1)\n\n6\n\nOptimization\n\n7\n\nLinear Approximations  (TEST 2)\n\n8\n\nAntiderivatives and Indefinite Integration – general solutions and particular solutions.   (SIX WEEKS TEST)\n\nThe Semester Exam is given at the end of the Third Six Weeks.  It is a shorter version of an AP EXAM.  Students have two hours for this exam.\n\n Fourth Six weeks 1 Slope fields – students explore several differential equations and draw the slope fields by hand.  They learn characteristics of various differential equations.  Students identify the slope field by the differential equation that created it and by the function that it could represent.  We combine the graphical approach with the algebraic approach, when possible, and compare our results. 2 Area and Definite Integrals – Riemann Sums, left, right, and mid-point 3 The Mean Value Theorem for Integrals and the Average Value of a Function  (TEST 1) 4 The Fundamental Theorem of Calculus, I and II. 5 Integration by Substitution – Pattern Recognition, Change of Variables for Definite Integrals, Integration of Odd and Even Functions.   (TEST 2) 6 Trapezoid Approach for finding Area 7 Total Distance Traveled  (TEST 3) 8 Inverse Functions – Derivative of an Inverse Function. 9 Integration of Natural Log and Exponential Functions  (SIX WEEKS TEST)\n\n#### Fifth Six Weeks\n\n1\n\nDifferential Equations:  Growth and Decay Models  (TEST 1)\n\n2\n\nInverse Trigonometric Functions - Derivatives of Inverse Trigonometric Functions\n\n3\n\nIntegrals Involving Inverse Trigonometric Functions.  (TEST 2)\n\n4\n\nArea between curves.\n\n5\n\nVolumes of solids – Disc, Washer, and Known Cross Sections – The first day of this section is known as Candy Day.  We anticipate it for days.  As we revolve the various functions around the x-axis, we see known candy shapes.  When we see a shape, everyone in the class gets a piece of candy – kisses, peanut butter cups, eggs.  This helps us visualize the 3 dimensions and the circular cross sections we need for problem solving.  We also use play-doh as a base on poster board and we place shapes of the known-cross sections in the play-doh so that they stand up perpendicular to the appropriate axis.   We also use Calculus in Motion to help students find the volumes and powerpoints by Greg Kelley.   (SIX WEEKS TEST)" ]
[ null, "file:///C:/DOCUME%7E1/AMYLEM%7E1/LOCALS%7E1/Temp/msohtml1/01/clip_image003.gif", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.89721704,"math_prob":0.9220272,"size":9379,"snap":"2020-45-2020-50","text_gpt3_token_len":2130,"char_repetition_ratio":0.12896,"word_repetition_ratio":0.009096816,"special_character_ratio":0.20855102,"punctuation_ratio":0.10006139,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98635274,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-20T06:04:35Z\",\"WARC-Record-ID\":\"<urn:uuid:b1d91800-0162-4cf4-9fde-49238d4d6478>\",\"Content-Length\":\"146954\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ef61c5a1-1f04-4d97-a3a0-9b383d5545c1>\",\"WARC-Concurrent-To\":\"<urn:uuid:f0ea054c-f2a1-42bf-b574-db9889c86608>\",\"WARC-IP-Address\":\"155.254.144.103\",\"WARC-Target-URI\":\"https://hbhs.ecboe.org/cms/One.aspx?portalId=25704&pageId=417967\",\"WARC-Payload-Digest\":\"sha1:5DFHNYCMK3QIFET5YEOTO5VN6P3TJDW7\",\"WARC-Block-Digest\":\"sha1:JJHOD6UBYAOZRXC76UC43RQHHCJY3AKM\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107869933.16_warc_CC-MAIN-20201020050920-20201020080920-00590.warc.gz\"}"}
https://www.signalintegrityjournal.com/articles/1918-how-to-stop-your-differential-vias-from-leaking
[ "For signal traces, a via is a structure in a PCB or package substrate that allows for the transfer of signals in a vertical manner from one layer to another. A typical via structure used for differential signals is depicted in Figure 1. The structure consists of two signal vias and two return path vias that are connected in the following order: Return via – Signal P – Signal N – Return via – where the return vias are usually connected to GND planes.\n\nWe mark this via structure as G-S-S-G. However, can this common via structure transfer any data rate or is it limited and have a defined bandwidth? If so, what limits its bandwidth? And what can be done when the bandwidth of the signal is greater than the bandwidth of the G-S-S-G structure?", null, "Figure 1: G-S-S-G via structure: (a) with all planes in the stackup (b) display only with the external planes (c) 16 layers stackup\n\nThe signal vias depicted in Figure 1 pass from layer 1 (top) to layer 16 (bottom) in a stackup structure with 16 layers: see Figure 1(c). The differential impedance of the input and output traces are 90 ohms and the traces' length is 50 mil. The dimensions of the via structure (drills, anti-pad size and shape) have been designed for a via impedance of approximately 90 Ohms for a 40 mil signal vias pitch. The differential port impedance for the S parameters is also 90 Ohms.\n\nWe will examine the via described in Figure 1 in two different cases: (1) a PCB with high loss materials that has copper surface roughness Rz= 0.4 mil (10 μm) and a dissipation factor Df = 0.025 (2) a PCB with low loss materials that has Rz=0.08 mil (2 μm) and Df = 0.002. First, we will write the power balance equation for a differential signal entering port 1 whose power is |VD1|2 / 2ZD:", null, "Where VD1, ZD and ZC are the differential signal amplitude, the differential impedance and the common impedance, respectively. |SDD11|2 and |SDD21|2 are the percentage of the power that reflects back to port 1 or transfers to port 2, respectively. |SCD11|2 and |SCD21|2 are the percentage of the power that is converted to a common signal and reflects back to port 1 or transfers to port 2, respectively. nloss is the percentage of the power that is dissipated by losses. Due to the high symmetry in the simulation between the P line and N line, the mode conversion (SCD) is very low, so we will write (1) as an approximation:", null, "", null, "The total losses in the system consist of: (1) conductor loss (including surface roughness) (2) dielectric loss (3) radiation loss into the cavity. When the signal passes in the via and current flows in it, according to Maxwell’s equations, the via will radiate an electromagnetic wave that will propagate radially between the planes in the layers in which the via passes. We will write the components of the total losses in equation (4):", null, "where nC, nD and nrad describe the percentage of the input power that is lost as a result of conductor loss, dielectric loss and radiation loss into the cavity, respectively.\n\nThe task now is to isolate the radiation loss nrad and investigate the frequency from which the via structure G-S-S-G starts to radiate significantly into the PCB. In order to do this, we will examine the via structure described in Figure 1 in a model with lossless materials too. To do this, we change all the metals from copper to a perfect electric conductor (PEC) and eliminate the surface roughness in order to zero out the conductor loss (nC = 0 ). Then, we set Df=0  in order to zero out the dielectric loss (nD = 0). Next, we define the simulation model’s boundaries to be of absorbing boundaries type.\n\nIn this case, the electromagnetic fields that the vias radiate into the PCB and reach the model’s boundaries will be absorbed by the model’s boundaries and will not be reflected to propagate in the PCB. In this case, we will get from (4) that in a model with lossless materials nloss = nrad  and (3) becomes:", null, "This means that from (5) in a model with lossless materials, one may calculate radiation loss given the S parameters. The calculations of  nloss from the simulations’ S parameter results in a model with high loss materials and in a model with low loss materials, and of nrad  in a model with lossless materials appear in Figure 2.", null, "Figure 2: nloss : Red – high loss materials, Green – low loss materials (calculated with (3))\n\nPurple: nrad - lossless materials (calculated with (5))\n\nIn Figure 2, the purple line describes the radiation loss by frequency in the model with lossless materials. It may be seen that up to a frequency of 30 GHz, the radiation losses in the G-S-S-G via structure are quite low (<5%).\n\nAbove 30 GHz, the radiation losses begin to increase substantially. Radiation of vias into the cavity cause a number of very significant signal and power integrity (SIPI) problems: (1) a significant increase in differential insertion loss of the signal, with all resulting implications (2) an increase of cross talk between signals (3) increase of the ISI because in a real PCB, the radiation is reflected from the PCB boundaries (4) increased ground and power supplies noise (5) increase in jitter of signals transmitted from components that are connected to these supplies.\n\nBecause the radiation from vias has such an extensive, significant effect on SIPI, we will not want to work with vias at frequencies at which their radiation is high. To this end we will define the radiation cutoff frequency fC.R of a via structure as “a frequency at which the radiation losses of the vias begin to increase significantly.”\n\nIn Figure 2, in the example of the G-S-S-G via structure, we see that fC.R is approximately 30 GHz. At a frequency of 50 GHz, for example, more than half (55%) of the power of the differential signal is lost as a result of radiation of the vias to the PCB. The green line depicts the percentage of the power that is dissipated as a result of the losses by frequency, using the model with low loss materials (as detailed above).\n\nOne cannot know from the graph how the losses are divided between conductor loss, dielectric loss and radiation loss, but one may clearly see that most losses are radiation losses. This result makes sense because the lengths of the traces and the vias in the model are very short, so the conductor loss is low, and because the dissipation factor is very small, the dielectric loss is low, meaning that most loss is radiation loss.\n\nThis is the place to state that when we completely zero out the losses in the model, the model is very sensitive to resonances that might be developed in it because there is nothing to damp the resonances. This will manifest in non-smooth S parameter results with sharp peaks and dips. Therefore, in practical terms, it is still worth adding some losses to the model even when we are examining radiation losses.\n\nThe red line in Figure 2 describes the percentage of the power that dissipates as a result of the losses by frequency when the model is with high loss materials. Here too, one cannot know from the graph exactly what percentage is wasted for each loss. One may see that up to a frequency of 30 GHz, the losses increase at a fixed rate of 0.667 %/GHz, and had significant radiation from the vias not started, this rate would have been kept constant. Because the vias start to radiate significantly from 30 GHz, the loss rate increases substantially.\n\nAfter showing a method for simulation and calculation of radiation losses from a via structure and the extensive, significant effect that this radiation has on SIPI, we will now examine the two main factors affecting radiation from a via structure: (1) coupling between the signal vias (2) the quantity and location of the return vias.\n\nIn order to examine the effect of the coupling between the signal vias, we will use the via structure in Figure 1, but this time without return vias. We examine five different distances between the signal vias (center to center): 26, 32, 40, 50 and 60 mil (see Figure 3). For practical purposes, the minimum distance between the signal vias depends on the diameter of the external pads and the minimum possible distance between them. 32 mil (0.8 mm) and 40 mil (1 mm) are typical pitch sizes for BGA. 50 mil (1.25 mil) and 60 mil (1.5 mm) are typical pitch sizes for high-speed press-fit type connectors.", null, "Figure 3: via structures with different signal vias pitch: (a) 26 mil (b) 32 mil (c) 40 mil (d) 50 mil (e) 60 mil\n\nNote: for the sake of convenience of viewing, only the external planes of the stackup are shown\n\nThe calculations of nrad from the simulations’ S parameter results of the five via structures from Figure 3 (with lossless materials) are shown in Figure 4.", null, "Figure 4: nrad of 5 different signal vias pitch: 26, 32, 40, 50 and 60 mil\n\nWhen a differential signal passes through the signal vias, the currents in the vias flow in opposite directions, so according to the right-hand rule, one via will radiate radially clockwise and the other will radiate radially counterclockwise.\n\nWhen the signal is purely differential, the magnitude of the currents in the two vias is identical and the same applies to the magnitude of the electromagnetic fields that each via radiates. In this state, the electromagnetic fields that the vias radiate interfere destructively to a certain extent.\n\nTherefore, as we can see in Figure 4: (1) the greater the physical distance between the signal vias, the less good the destructive interference is and the greater the radiation losses are (2) the greater the frequency, the greater the electrical length between the vias, the less good the destructive interference is, and again, the greater the radiation losses become.\n\nAs we know, pure differential signals do not exist, and any practical “differential signal” also contains a certain part of a common signal. When a common signal passes in the signal vias, the currents flow in the vias in the same direction and have an identical amplitude. In this state, the electromagnetic fields that the vias radiate interfere constructively and the radiation losses might be greater than in the case of a pure differential signal. Therefore, to restrict the propagation of the fields in the PCB and reduce the radiation losses of the differential vias, return vias are added.\n\nTo examine the effect of the quantity of return vias on the radiation losses, we use the via structure in Figure 1, with the signal vias pitch fixed at 40 mil. We next examine four structures with a different number of return vias: 0, 2, 6, and 8 as depicted in Figure 5.", null, "Figure 5: Differential via structures with: (a) 0 (b) 2 (c) 6 and (d) 8 return vias\n\nNote: for the sake of convenience of viewing, only the external planes of the stackup are shown\n\nThe calculations of nrad from the simulations’ S parameter results of the four via structures from Figure 5 (with lossless materials) are shown in Figure 6.", null, "Figure 6: nrad of differential via structures with:  0, 2, 6 and 8 return vias\n\nThe addition of return vias around the signal vias is a kind of addition of shielding to the structure and contributes to reducing of radiation into the PCB. It should be noted that to reduce the radiation losses, we will have to take care to position the return vias around the signal vias in order to form effective shielding. Of course, should we wish to maintain low radiation losses at high frequencies (shorter wavelengths), we will have to add more return vias and maintain a smaller distance between them of not more than 1/10 of the wavelength.\n\nIf we use the definition for a radiation cutoff frequency fC.R of a differential via structure, it may be seen in Figure 6 that in a structure without any return vias, the radiation losses begin to increase significantly starting from 3 GHz, so this is the radiation cutoff frequency of this via structure. Addition of 2 and 6 return vias is able to maintain low radiation losses and increase the radiation cutoff frequency of the structures to 30 GHz and 45 GHz, respectively. Addition of 8 return vias is already able to maintain low radiation losses up to a frequency of at least 50 GHz.\n\nIn conclusion, the use of a differential via structure beyond its radiation cutoff frequency fC.R will result in significant radiation into the cavity and many SIPI problems. The radiation losses will result in a decrease in SDD21, but this will not necessarily happen at fC.R frequency because SDD21 is also affected by the amount of reflections, mode conversion, and the other losses. Therefore, it is not always possible to find fC.R directly from SDD21.\n\nOf course, at the end, the overall geometry of the via structure will determine the via impedance, the return loss, insertion loss, and the radiation into the cavity, but one may still see here, albeit roughly, the connection between the number of return vias and the radiation cutoff frequency of the differential via. As we know, the first role of return vias in a differential via structure is to apply a return path with low AC impedance for the return current of the common signal that exists in a practical differential signal. We now also see their second role, which is to reduce the radiation into the cavity of differential signal passes the vias and minimize the resulting SIPI problems, thus allowing the use of differential vias at higher frequencies." ]
[ null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/F1-abc.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/e1.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/e2.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/e3.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/e4.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/e5.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/F2.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/F3-abcde.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/F4.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/F5.jpg", null, "https://www.signalintegrityjournal.com/ext/resources/article-images-2020/How-to-Stop-Your-Differential-Vias-from-Leaking/F6.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9264624,"math_prob":0.9792172,"size":13300,"snap":"2021-43-2021-49","text_gpt3_token_len":2987,"char_repetition_ratio":0.18569495,"word_repetition_ratio":0.08624407,"special_character_ratio":0.22090225,"punctuation_ratio":0.08851952,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96639305,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],"im_url_duplicate_count":[null,4,null,4,null,4,null,4,null,4,null,4,null,4,null,4,null,4,null,4,null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-20T12:24:44Z\",\"WARC-Record-ID\":\"<urn:uuid:8cc6f01c-4ec5-4f07-bc96-be65235177f4>\",\"Content-Length\":\"67084\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:69b8c2b7-a571-481a-a157-89c42e93c13e>\",\"WARC-Concurrent-To\":\"<urn:uuid:48031517-6167-4e8d-8058-b7b502690175>\",\"WARC-IP-Address\":\"208.91.60.177\",\"WARC-Target-URI\":\"https://www.signalintegrityjournal.com/articles/1918-how-to-stop-your-differential-vias-from-leaking\",\"WARC-Payload-Digest\":\"sha1:EM37GOYSDFFSTODXANBRIVICZNX76GVF\",\"WARC-Block-Digest\":\"sha1:6JKMSHD2VUACR4EXBYS2KNP4OO2XWCZ4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585321.65_warc_CC-MAIN-20211020121220-20211020151220-00567.warc.gz\"}"}
https://www.npsm-kps.org/journal/view.html?uid=7006&vmd=Full
[ "", null, "Title Author Keyword ::: Volume ::: Vol. 70Vol. 69Vol. 68Vol. 67Vol. 66Vol. 65Vol. 64Vol. 63Vol. 62Vol. 61Vol. 60Vol. 59Vol. 58Vol. 57Vol. 56Vol. 55Vol. 54Vol. 53Vol. 52Vol. 51Vol. 50Vol. 49Vol. 48Vol. 47Vol. 46Vol. 45Vol. 44Vol. 43Vol. 42Vol. 41Vol. 40Vol. 39Vol. 38Vol. 37Vol. 36Vol. 35Vol. 34Vol. 33Vol. 32Vol. 31Vol. 30Vol. 29Vol. 28Vol. 27Vol. 26Vol. 25Vol. 24Vol. 23Vol. 22Vol. 21Vol. 20Vol. 19Vol. 18Vol. 17Vol. 16Vol. 15Vol. 14Vol. 13Vol. 12Vol. 11Vol. 10Vol. 9Vol. 8Vol. 7Vol. 6Vol. 5Vol. 4Vol. 3Vol. 2Vol. 1 ::: Issue ::: No. 12No. 11No. 10No. 9No. 8No. 7No. 6No. 5No. 4No. 3No. 2No. 1", null, "https://doi.org/10.3938/NPSM.69.794\nPhotoluminescence Study of Type-II Submonolayer Quantum Dots\n\ninseak KIN1, Hyun-Jun JO1, Mo Geun SO1, Jong Su KIM1*, Yeongho KIM2, Sang Jun LEE2, Seung Hyun LEE3, Christiana B. HONSBERG4, Heedae KIM5\n\n1Department of Physics, Yeungnam University, Gyeongsan 38541, Korea\n2Division of Convergence Technology, Korea Research Institute of Standards and Science, Daejeon 34113, Korea\n3Department of Electrical and Computer Engineering, Ohio State University, Columbus, USA\n4School of Electrical, Computer and Energy Engineering, Arizona State University, Tempe, USA\n5School of Physics, Northeast Normal University, Changchun 130024, China\nCorrespondence to: [email protected]\nReceived December 12, 2018; Revised April 22, 2019; Accepted April 22, 2019.", null, "This is an open-access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/3.0/) which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.\nAbstract\nWe have studied the optical properties of InAs/GaAsSb submonolayer quantum dots (SML-QDs) through excitation intensity ($I_{\\text{ex}}$) and temperature dependent photoluminescence (PL) experiments. The SML-QDs with type-I (T-1) and type-II (T-2) band structures were grown using a GaAsSb spacer with a Sb composition of 0\\% and 15.8\\%. At 13~K, the PL signals from the T-1 and the T-2 samples were observed at 1.42~eV and 1.37~eV, respectively, when the $I_{\\text{ex}}$ was 8.7~mW/cm$^{2}$. The PL signal of the T-1 sample is due to the recombination of electrons and holes in the InAs SML-QDs. The PL signal of the T-2 sample is due to the recombination of electrons (in the GaAs electron band) and holes (in the GaAsSb spacer hole band) by type-II band alignment formed between GaAs and GaAsSb. The full widths at half maxima (FWHMs) of the T-1 and the T-2 samples were 7.09~meV and 24.6~meV, respectively, because the T-2 sample has a lower uniformity than the T-1 sample. As the excitation intensity was increased, the PL signals of the T-1 and the T-2 samples shifted to lower energy because of the quantum-confined Stark effect. As a result of these temperature-dependent PL experiments, the activation energy of the T-1 sample was found to be 30~meV.\nPACS numbers: 73.21.La, 78.55.-m, 71.55.Eq\nKeywords: Submonolayer, Quasimonolayer, III-V semiconductor, Quantum dot, Photoluminescence", null, "", null, "January 2020, 70 (1)", null, "", null, "Full Text(PDF) Free", null, "Export Citation for this Article\n\nSocial Network Service\nServices" ]
[ null, "https://www.npsm-kps.org/img/main/searchbar_img.gif", null, "https://crossmark-cdn.crossref.org/widget/v2.0/logos/CROSSMARK_Color_horizontal.svg", null, "https://www.inforang.com/icon/cc_16.png", null, "https://www.npsm-kps.org/img/main/sub_rig01_ti.gif", null, "https://www.npsm-kps.org/submission/Journal/070/NP070-01-COVER.png", null, "https://www.npsm-kps.org/img/main/sub_rig02_ti.gif", null, "https://www.npsm-kps.org/icon/pdf_icon.gif", null, "https://www.npsm-kps.org/icon/dot_2.gif", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.80204844,"math_prob":0.62658,"size":431,"snap":"2020-10-2020-16","text_gpt3_token_len":97,"char_repetition_ratio":0.13583139,"word_repetition_ratio":0.0,"special_character_ratio":0.2088167,"punctuation_ratio":0.22857143,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9697692,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,10,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-16T22:23:57Z\",\"WARC-Record-ID\":\"<urn:uuid:f8aa2d0e-44fc-45dd-8d09-3f088ca48c77>\",\"Content-Length\":\"33440\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:6aa1b5c2-205a-49b3-bdd2-80748f240a21>\",\"WARC-Concurrent-To\":\"<urn:uuid:8f97f954-707f-4229-b2d9-c5801225e522>\",\"WARC-IP-Address\":\"114.108.163.132\",\"WARC-Target-URI\":\"https://www.npsm-kps.org/journal/view.html?uid=7006&vmd=Full\",\"WARC-Payload-Digest\":\"sha1:QPELAP5GYXUSCPJEBFNNT34J4PCFONSC\",\"WARC-Block-Digest\":\"sha1:NLJ6Y472NQ6O6URKXCCQ54PYI2Z2HNV7\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875141430.58_warc_CC-MAIN-20200216211424-20200217001424-00225.warc.gz\"}"}
https://atarax25.com/do-math-241
[ "# Average velocity calculator calculus\n\nWe'll provide some tips to help you choose the best Average velocity calculator calculus for your needs.", null, "## Testimonials", null, "", null, "## Average Velocity Calculator\n\nTo calculate the average velocity, we need to divide the total displacement by the total time elapsed as follows: v ¯ = Δ x Δ t = x f − x 0 t f − t 0 Where ΔV is the average velocity, Δx is the displacement, Δt is the total time, x f and x 0 are the\n\n## Average Velocity Calculator\n\nAverage velocity formula - weighted average of velocities: average velocity = velocity₁ * time₁ + velocity₂ * time₂ + You should use the average velocity formula if you can\n\n795+ Math Consultants\n83% Recurring customers\n52150 Orders Deliver" ]
[ null, "https://atarax25.com/images/8b4064a157d9dabd/fajblegkniqhpdmoc-phone.webp", null, "data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27500%27%20height=%27400%27/%3e", null, "https://atarax25.com/images/8b4064a157d9dabd/mpkcqodbfhinaglej-snap.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9654087,"math_prob":0.99625456,"size":939,"snap":"2022-40-2023-06","text_gpt3_token_len":204,"char_repetition_ratio":0.114438504,"word_repetition_ratio":0.0,"special_character_ratio":0.21618743,"punctuation_ratio":0.11764706,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99977404,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,1,null,null,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-27T14:45:12Z\",\"WARC-Record-ID\":\"<urn:uuid:fd29b0c2-6e56-4e24-87a4-b35082ea65be>\",\"Content-Length\":\"15310\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d844f021-27de-47e7-b5df-18eb78240820>\",\"WARC-Concurrent-To\":\"<urn:uuid:e1c69433-ea2f-4ba0-a618-258e7bbc62eb>\",\"WARC-IP-Address\":\"170.178.164.178\",\"WARC-Target-URI\":\"https://atarax25.com/do-math-241\",\"WARC-Payload-Digest\":\"sha1:NFDF6SFLMA24E2TDTRSQQQY3MSX7FDX4\",\"WARC-Block-Digest\":\"sha1:BCFCL5R4LCRU27X2P5R4Y3NTE54QFJUT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764494986.94_warc_CC-MAIN-20230127132641-20230127162641-00510.warc.gz\"}"}
https://hwiegman.home.xs4all.nl/vb3-man/html/edn1575.html
[ "DSum Function (SQL Only)\n\nDescription\n\nReturns the sum of a set of values in a specified set of records (domain).\n\nSyntax\n\nDSum( expr, domain [, criteria] )\n\nRemarks\n\nThe DSum function uses the following arguments.\n\nArgument        Description\n\nexpr                 String expression identifying the field that contains the numeric data you want to add, or an expression that performs calculations using the data in that field.  Operands in expr can include the name of a table field, or a Visual Basic function (which can be intrinsic but not a user-defined function or one of the other domain aggregate or SQL aggregate functions).\n\ndomain             String expression identifying the records that constitute the domain.  It can be a table name, a query name, or an SQL expression that returns data.\n\ncriteria              Optional string expression used to restrict the range of data on which DSum is performed.  For example, criteria could be the WHERE clause in an SQL expression (without the word WHERE).  If criteria is omitted, DSum evaluates expr against the entire domain.\n\nUnlike DCount, which returns the number of records, DSum totals the values in a field.  For example, you could use DSum to determine the total cost of freight charges.\n\nIf the criteria argument contains non-numeric text other than field names, you must enclose the text in single quotation marks.  In the following example from an Orders table, Ship Country is the name of a field, and UK is a string literal.\n\nX = DSum(\"[Freight]\", \"Orders\", \"[Ship Country] = 'UK'\")\n\nY = DSum(\"[Freight]\", \"Orders\", \"[Ship Via] = 1\")" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7530593,"math_prob":0.89871746,"size":1550,"snap":"2021-43-2021-49","text_gpt3_token_len":332,"char_repetition_ratio":0.122897804,"word_repetition_ratio":0.0,"special_character_ratio":0.21419355,"punctuation_ratio":0.10452962,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9749031,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-24T13:33:45Z\",\"WARC-Record-ID\":\"<urn:uuid:42c2d431-aa4f-4556-bc0b-f255a57299e6>\",\"Content-Length\":\"10092\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d75eb22e-8e5b-42f7-9a4e-145c56069562>\",\"WARC-Concurrent-To\":\"<urn:uuid:0e3a944d-d074-4686-97ed-c9e0ec584ddf>\",\"WARC-IP-Address\":\"194.109.6.91\",\"WARC-Target-URI\":\"https://hwiegman.home.xs4all.nl/vb3-man/html/edn1575.html\",\"WARC-Payload-Digest\":\"sha1:I4DZT5524BFI62HWMRSROIGD3GLSJLZK\",\"WARC-Block-Digest\":\"sha1:GHSMERLGAWAWOGPIGRDZ7MY4MMY4RQOK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585997.77_warc_CC-MAIN-20211024111905-20211024141905-00455.warc.gz\"}"}
https://grouppuzzles.com/html/Sudoku-8up-directions.html
[ "#### Printable version\n\nDetailed instructions for working a group puzzle of type 'Sudoku-8up'\n\nThe 8 elements in each group of this type of puzzle are: 1, 2, 3, 4, 5, 6, 7, and 8.\n\nEvery group in the puzzle must contain exactly this set of elements.\n\n####", null, "In a Sudoku-8up puzzle, each row is a group numbered as shown in the figure above.\n\n####", null, "In a Sudoku-8up puzzle, each column is a group numbered as shown in the figure above.\n\n####", null, "In a Sudoku-8up puzzle, each 2x4 rectangle is a group numbered as shown in the figure above." ]
[ null, "https://grouppuzzles.com/html/help-Sudoku-8up-1.png", null, "https://grouppuzzles.com/html/help-Sudoku-8up-2.png", null, "https://grouppuzzles.com/html/help-Sudoku-8up-3.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9056059,"math_prob":0.8177029,"size":485,"snap":"2023-40-2023-50","text_gpt3_token_len":135,"char_repetition_ratio":0.15800416,"word_repetition_ratio":0.32954547,"special_character_ratio":0.26391754,"punctuation_ratio":0.14285715,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95653343,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,3,null,3,null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-22T18:47:20Z\",\"WARC-Record-ID\":\"<urn:uuid:24bc3cf9-6651-42dd-8a3e-29bb33db91e6>\",\"Content-Length\":\"2288\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:26fcf0e8-bab5-4907-b260-18bd14486ac2>\",\"WARC-Concurrent-To\":\"<urn:uuid:8a39742c-094a-46e5-952e-32e1ee205916>\",\"WARC-IP-Address\":\"208.94.117.86\",\"WARC-Target-URI\":\"https://grouppuzzles.com/html/Sudoku-8up-directions.html\",\"WARC-Payload-Digest\":\"sha1:QKB5YRPVHIW5X7BZT7H53OIX4BCR677Q\",\"WARC-Block-Digest\":\"sha1:TLF4T7DKLPE4T2U5XWQSOJ3ROMZASFVK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233506421.14_warc_CC-MAIN-20230922170343-20230922200343-00711.warc.gz\"}"}
https://astronomy.stackexchange.com/questions/54475/public-data-for-calculating-equilibrium-temperature-of-exoplanets
[ "# Public data for calculating equilibrium temperature of exoplanets\n\nI am a high school student beginning a simple independent project to calculate the equilibrium temperature of exoplanets. I'm curious to see how many exoplanets have a similar equilibrium temperature to Earth's 255K and was looking for some guidance. I found this formula on a few online resources:\n\n$$T_p = T_\\odot(1-a)^{1/4}\\sqrt{\\frac{R_\\odot}{2D}}$$\n\nI was hoping someone could tell me where I can find the relevant public data on known exoplanets to calculate their equilibrium temperature. I looked through NASA Exoplanet Archive Kepler Database and found some data that listed planets' \"Stellar Radius\" (unit is solar radii), \"Stellar Effective Temperature\" (unit is Kelvin) and \"Planet Star Distance over Star Radius\" (not sure what the unit is). Are these data points what I use for the formula? Additionally, I am not sure where I can locate the albedo for the specific planets, is there another database I should use?\n\nI realize there is a column in the database that lists the \"Equilibrium Temperature\" for the planets, but I was hoping to attempt the calculations on my own to learn to use it and see if I am able to get the same results. Any info would be very much appreciated, I am not sure I am taking the right approach, I would love some input.", null, "$$R_\\odot$$ and $$T_\\odot$$ should be replaced with the stellar radius and stellar effective temperature respectively. $$D$$ is the planet-star distance, which you can get from multiplying the appropriate column by the stellar radius.\n\nNote that the radii are given in solar radii, so need to be multiplied by the solar radius in SI units.\n\nThe albedo $$a$$ is unknown for most exoplanets. You can probably work out what value of $$a$$ has been assumed in this table (somewhere between zero and one).\n\nI've actually been writing a python app to look for exoplanets in stars' light curves and simulate their atmospheric temperature.\n\nAs others have pointed out, we struggle to even estimate albedo or other factors that influence temperature for exoplanets, so we're mostly stuck with guessing and simulating for now. ProfRob has already given the answer you were looking for, but if you'd like to play around with my python app to learn more about exoplanets, you can install the script [here].\n\nThis is how I calculate the temperature in there:\n\n$$I = \\sigma T^4 \\frac{R_p^2}{D^2}$$\n\n2. Scale down the irradiance based on possible atmospheric factors of various weights:\n\n$$T_1 = \\frac{I(1 - Co2 - CH4)}{4R_p^2\\sigma}^{1/4}$$\n\n$$T = T_1 \\frac{(1 + (Co2 + CH4) P)}{\\rho Q}$$\n\nWhere Co2 and CH4 are carbon dioxide and methane in part per million, $$P$$ is pressure, $$\\rho$$ is density and $$Q$$ is the specific heat.\n\nThis might be more confusing than you were hoping for, but in the app you can play around with different atmospheric conditions and get some sort of estimate for the temperature, albeit rough.\n\nI would also love some feedback on the app in general if you end up giving it a try, I'm not a programmer and it's the first time I mess around with GUIs and stuff like this. It's just a personal project, nothing to sell here. : https://github.com/Britishterron/exoplanet_finder" ]
[ null, "https://i.stack.imgur.com/oQGX6.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9368693,"math_prob":0.95082444,"size":1261,"snap":"2023-40-2023-50","text_gpt3_token_len":285,"char_repetition_ratio":0.11694511,"word_repetition_ratio":0.0,"special_character_ratio":0.2188739,"punctuation_ratio":0.06355932,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99622035,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-11-29T13:17:58Z\",\"WARC-Record-ID\":\"<urn:uuid:548d1c64-aeba-45e5-bdd1-7fabf4d80fae>\",\"Content-Length\":\"153947\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fbe141f2-df5c-4b6c-b3e8-578375202640>\",\"WARC-Concurrent-To\":\"<urn:uuid:af3c775d-2757-4a8f-a9c6-7053dd4b0b5f>\",\"WARC-IP-Address\":\"104.18.43.226\",\"WARC-Target-URI\":\"https://astronomy.stackexchange.com/questions/54475/public-data-for-calculating-equilibrium-temperature-of-exoplanets\",\"WARC-Payload-Digest\":\"sha1:XJXFFLE7K5L5GGAUGGQEQ7NQDCI374EW\",\"WARC-Block-Digest\":\"sha1:5E45JBU2ODFXZJGNNKHQ6J67VD656HZL\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100081.47_warc_CC-MAIN-20231129105306-20231129135306-00289.warc.gz\"}"}
http://num.bubble.ro/s/3000/40/
[ "# Substraction table for N = 3000 - 39÷40\n\n3000 - 39 = 2961 [+]\n3000 - 39.01 = 2960.99 [+]\n3000 - 39.02 = 2960.98 [+]\n3000 - 39.03 = 2960.97 [+]\n3000 - 39.04 = 2960.96 [+]\n3000 - 39.05 = 2960.95 [+]\n3000 - 39.06 = 2960.94 [+]\n3000 - 39.07 = 2960.93 [+]\n3000 - 39.08 = 2960.92 [+]\n3000 - 39.09 = 2960.91 [+]\n3000 - 39.1 = 2960.9 [+]\n3000 - 39.11 = 2960.89 [+]\n3000 - 39.12 = 2960.88 [+]\n3000 - 39.13 = 2960.87 [+]\n3000 - 39.14 = 2960.86 [+]\n3000 - 39.15 = 2960.85 [+]\n3000 - 39.16 = 2960.84 [+]\n3000 - 39.17 = 2960.83 [+]\n3000 - 39.18 = 2960.82 [+]\n3000 - 39.19 = 2960.81 [+]\n3000 - 39.2 = 2960.8 [+]\n3000 - 39.21 = 2960.79 [+]\n3000 - 39.22 = 2960.78 [+]\n3000 - 39.23 = 2960.77 [+]\n3000 - 39.24 = 2960.76 [+]\n3000 - 39.25 = 2960.75 [+]\n3000 - 39.26 = 2960.74 [+]\n3000 - 39.27 = 2960.73 [+]\n3000 - 39.28 = 2960.72 [+]\n3000 - 39.29 = 2960.71 [+]\n3000 - 39.3 = 2960.7 [+]\n3000 - 39.31 = 2960.69 [+]\n3000 - 39.32 = 2960.68 [+]\n3000 - 39.33 = 2960.67 [+]\n3000 - 39.34 = 2960.66 [+]\n3000 - 39.35 = 2960.65 [+]\n3000 - 39.36 = 2960.64 [+]\n3000 - 39.37 = 2960.63 [+]\n3000 - 39.38 = 2960.62 [+]\n3000 - 39.39 = 2960.61 [+]\n3000 - 39.4 = 2960.6 [+]\n3000 - 39.41 = 2960.59 [+]\n3000 - 39.42 = 2960.58 [+]\n3000 - 39.43 = 2960.57 [+]\n3000 - 39.44 = 2960.56 [+]\n3000 - 39.45 = 2960.55 [+]\n3000 - 39.46 = 2960.54 [+]\n3000 - 39.47 = 2960.53 [+]\n3000 - 39.48 = 2960.52 [+]\n3000 - 39.49 = 2960.51 [+]\n3000 - 39.5 = 2960.5 [+]\n3000 - 39.51 = 2960.49 [+]\n3000 - 39.52 = 2960.48 [+]\n3000 - 39.53 = 2960.47 [+]\n3000 - 39.54 = 2960.46 [+]\n3000 - 39.55 = 2960.45 [+]\n3000 - 39.56 = 2960.44 [+]\n3000 - 39.57 = 2960.43 [+]\n3000 - 39.58 = 2960.42 [+]\n3000 - 39.59 = 2960.41 [+]\n3000 - 39.6 = 2960.4 [+]\n3000 - 39.61 = 2960.39 [+]\n3000 - 39.62 = 2960.38 [+]\n3000 - 39.63 = 2960.37 [+]\n3000 - 39.64 = 2960.36 [+]\n3000 - 39.65 = 2960.35 [+]\n3000 - 39.66 = 2960.34 [+]\n3000 - 39.67 = 2960.33 [+]\n3000 - 39.68 = 2960.32 [+]\n3000 - 39.69 = 2960.31 [+]\n3000 - 39.7 = 2960.3 [+]\n3000 - 39.71 = 2960.29 [+]\n3000 - 39.72 = 2960.28 [+]\n3000 - 39.73 = 2960.27 [+]\n3000 - 39.74 = 2960.26 [+]\n3000 - 39.75 = 2960.25 [+]\n3000 - 39.76 = 2960.24 [+]\n3000 - 39.77 = 2960.23 [+]\n3000 - 39.78 = 2960.22 [+]\n3000 - 39.79 = 2960.21 [+]\n3000 - 39.8 = 2960.2 [+]\n3000 - 39.81 = 2960.19 [+]\n3000 - 39.82 = 2960.18 [+]\n3000 - 39.83 = 2960.17 [+]\n3000 - 39.84 = 2960.16 [+]\n3000 - 39.85 = 2960.15 [+]\n3000 - 39.86 = 2960.14 [+]\n3000 - 39.87 = 2960.13 [+]\n3000 - 39.88 = 2960.12 [+]\n3000 - 39.89 = 2960.11 [+]\n3000 - 39.9 = 2960.1 [+]\n3000 - 39.91 = 2960.09 [+]\n3000 - 39.92 = 2960.08 [+]\n3000 - 39.93 = 2960.07 [+]\n3000 - 39.94 = 2960.06 [+]\n3000 - 39.95 = 2960.05 [+]\n3000 - 39.96 = 2960.04 [+]\n3000 - 39.97 = 2960.03 [+]\n3000 - 39.98 = 2960.02 [+]\n3000 - 39.99 = 2960.01 [+]\nNavigation: Home | Addition | Substraction | Multiplication | Division       Tables for 3000: Addition | Substraction | Multiplication | Division\n\nOperand: 1 2 3 4 5 6 7 8 9 10 20 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 60 70 80 90 100 200 300 400 500 600 700 800 900 1000 2000 3000 4000 5000 6000 7000 8000 9000\n\nSubstraction for: 1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 70 80 90 100 200 300 400 500 600 700 800 900 1000 2000 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 4000 5000 6000 7000 8000 9000" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8519001,"math_prob":0.99999845,"size":13431,"snap":"2019-51-2020-05","text_gpt3_token_len":3498,"char_repetition_ratio":0.33313474,"word_repetition_ratio":0.4225285,"special_character_ratio":0.30511504,"punctuation_ratio":0.07534533,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99823374,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-12-16T12:45:24Z\",\"WARC-Record-ID\":\"<urn:uuid:aa29636c-2fa6-4b04-a468-49e9c786a34d>\",\"Content-Length\":\"46819\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:597abd82-8fb7-4f3f-9bc1-826e7f6e162a>\",\"WARC-Concurrent-To\":\"<urn:uuid:589eeddd-d787-48a3-adf4-2f968865a237>\",\"WARC-IP-Address\":\"104.24.96.16\",\"WARC-Target-URI\":\"http://num.bubble.ro/s/3000/40/\",\"WARC-Payload-Digest\":\"sha1:YSRBK5TFFSXYOKL7OMEITQX54RDOS7F6\",\"WARC-Block-Digest\":\"sha1:H2C456HIZ3LRT6LTQVFJ7GACETKFI3X7\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-51/CC-MAIN-2019-51_segments_1575540565544.86_warc_CC-MAIN-20191216121204-20191216145204-00326.warc.gz\"}"}
https://sohcahtoa.org.uk/maths/pages/maths_sohcahtoa.html
[ "[ home ]\n\n# SOHCAHTOA - GCSE Maths Trigonometry summary", null, "Download a one side summary of the trigonometric ratios for the right angled triangle (PDF) suitable for GCSE Higher Tier Maths. There is also a version in gaudy colours (PDF).\n\nWe spent about 20 minutes searching for one the other evening, and I decided it might be quicker to just write one. Most of the summaries and 'cheat sheets' we found were far too advanced. This outline has\n\n• The definition of each ratio\n• How to find the angle given two sides with an example including rounding\n• How to find the length of one side by multiplying the length of another by the value of the appropriate trig ratio again with examples\n• How to find the length of one side by dividing the length of another side by the value of the appropriate trig ratio, with an example of each ratio\n\nI think I'll put some stuff about 'special' values of the Sine, Cosine and Tangent on the back along with a Pythagoras' Result summary so you have all of right-angled triangles on two sides of A4.\n\nI give this sheet out after the students have hacked their way through some suitable problems. I tend to go through the transposition of the basic formulas as we go along. This sheet is then the summary of the lesson and a revision note.\n\nKeith Burnett, Last update: Sun Apr 06 2014" ]
[ null, "https://sohcahtoa.org.uk/maths/pages/images/maths_sohcahtoa-banner.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.93604463,"math_prob":0.873473,"size":870,"snap":"2021-31-2021-39","text_gpt3_token_len":200,"char_repetition_ratio":0.102771364,"word_repetition_ratio":0.0,"special_character_ratio":0.22068965,"punctuation_ratio":0.07058824,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9924533,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-20T23:25:09Z\",\"WARC-Record-ID\":\"<urn:uuid:08ba5735-42bd-4cd5-8f8a-c064a1818cb4>\",\"Content-Length\":\"2658\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:770dde2f-7d63-46e2-8126-8eb4f51f00c9>\",\"WARC-Concurrent-To\":\"<urn:uuid:efc1c011-022c-4ebf-8329-2f603725ed55>\",\"WARC-IP-Address\":\"93.93.130.166\",\"WARC-Target-URI\":\"https://sohcahtoa.org.uk/maths/pages/maths_sohcahtoa.html\",\"WARC-Payload-Digest\":\"sha1:2EMGV53BFC5UILEX2R47VHHTGR2NRYJ4\",\"WARC-Block-Digest\":\"sha1:XTQZOLEHHVB5XBRUCZKHZS3YJTNW7P65\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057119.85_warc_CC-MAIN-20210920221430-20210921011430-00365.warc.gz\"}"}
https://r3d-int.com/sql/what-does-sum-distinct-do-in-sql.html
[ "# What does sum distinct do in SQL?\n\nContents\n\n## Can we use distinct and sum together in SQL?\n\n4 Answers. Distinct is used to select distinct elements, nothing more, while you want to aggregate and for that you need GROUP BY and aggregation functions ( SUM ).\n\n## What does distinct do in SQL?\n\nThe SELECT DISTINCT statement is used to return only distinct (different) values. Inside a table, a column often contains many duplicate values; and sometimes you only want to list the different (distinct) values.\n\n## How do you sum distinct values?\n\nSum only unique values in Excel with formulas\n\n1. Type this formula: =SUMPRODUCT(1/COUNTIF(A2:A15,A2:A15&””),A2:A15) into a blank cell, see screenshot:\n2. Then press Enter key, and the numbers which appear only one time have been added up.\n3. Click Kutools > Select Tools > Select Duplicate & Unique Cells, see screenshot:\n\n## Is distinct aggregate function?\n\nALL applies the aggregate function to all values, and DISTINCT specifies that each unique value is considered. ALL is the default and rarely is seen in practice. With SUM(), AVG(), and COUNT(expr), DISTINCT eliminates duplicate values before the sum, average, or count is calculated.\n\nIT IS INTERESTING:  What is mean by Anagram in Java?\n\n## What will the SQL Server return when distinct aggregate?\n\nDISTINCT can be used to return unique rows from a result set and it can be used to force unique column values within an aggregate function.\n\n## Does SQL distinct apply to all columns?\n\nYes, DISTINCT works on all combinations of column values for all columns in the SELECT clause.\n\n## What is difference between unique and distinct in SQL?\n\nUnique and Distinct are two SQL constraints. The main difference between Unique and Distinct in SQL is that Unique helps to ensure that all the values in a column are different while Distinct helps to remove all the duplicate records when retrieving the records from a table.\n\n## Is GROUP BY better than distinct?\n\nWhile DISTINCT better explains intent, and GROUP BY is only required when aggregations are present, they are interchangeable in many cases.\n\n## What is sum distinct?\n\nDISTINCT instructs the SUM() function to calculate the sum of the only distinct values. … expression is any valid expression that returns an exact or approximate numeric value. Note that aggregate functions or subqueries are not accepted in the expression.\n\n## How does sum product work?\n\nThe SUMPRODUCT function returns the sum of the products of corresponding ranges or arrays. The default operation is multiplication, but addition, subtraction, and division are also possible. SUMPRODUCT matches all instances of Item Y/Size M and sums them, so for this example 21 plus 41 equals 62.\n\n## How do you use Sumif formula?\n\nIf you want, you can apply the criteria to one range and sum the corresponding values in a different range. For example, the formula =SUMIF(B2:B5, “John”, C2:C5) sums only the values in the range C2:C5, where the corresponding cells in the range B2:B5 equal “John.”\n\n## How do you use distinct aggregate?\n\n2 Answers. If you use SELECT DISTINCT , then the result set will have no duplicate rows. If you use SELECT COUNT(DISTINCT) , then the count will only count distinct values. If you are thinking of using SUM(DISTINCT) (or DISTINCT with any other aggregation function) be warned.\n\n## How do you use distinct aggregate function?\n\nFirst simple example of the a DISTINCT() function;\n\n1. SELECT SUM (DISTINCT (ID)) AS ‘Sum of distinct values’, SUM (ID) AS ‘Sum of all values’, …\n2. SELECT SUM (ID) AS ‘Sum of distinct values’ FROM (SELECT * …\n3. SELECT AVG (DISTINCT (ID)) AS ‘AVG of distinct values’, …\n4. SELECT COUNT (DISTINCT (ID)) AS ‘COUNT of distinct values’,\n\n## How do I count distinct values in SQL?\n\nSQL to find the number of distinct values in a column\n\n1. SELECT DISTINCT column_name FROM table_name;\n2. SELECT column_name FROM table_name GROUP BY column_name;\nCategories SQL" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.79740626,"math_prob":0.93313867,"size":3741,"snap":"2022-40-2023-06","text_gpt3_token_len":807,"char_repetition_ratio":0.16724646,"word_repetition_ratio":0.006472492,"special_character_ratio":0.21919273,"punctuation_ratio":0.120910384,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9846244,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-30T16:23:47Z\",\"WARC-Record-ID\":\"<urn:uuid:395bced5-f999-4d9d-87bf-0aac4a67d364>\",\"Content-Length\":\"90597\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a07a6ba2-e88b-4be6-b425-36a7abfd073b>\",\"WARC-Concurrent-To\":\"<urn:uuid:f1e20363-f296-4025-aa2f-c44a3d085f7a>\",\"WARC-IP-Address\":\"209.145.52.137\",\"WARC-Target-URI\":\"https://r3d-int.com/sql/what-does-sum-distinct-do-in-sql.html\",\"WARC-Payload-Digest\":\"sha1:UMG2DAOB3IC225MWHEKWCHOURFAKP6KX\",\"WARC-Block-Digest\":\"sha1:E4A52WSCXJMM7SM2YU4M24CZTRGHRRHU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335491.4_warc_CC-MAIN-20220930145518-20220930175518-00141.warc.gz\"}"}
https://www.kaysonseducation.co.in/questions/p-span-sty_5598
[ "## Question\n\n### Solution\n\nCorrect option is\n\n4\n\nZinc blende (ZnS) has fcc structure and is an ionic crystal having 4: 4 coordination number.\n\n#### SIMILAR QUESTIONS\n\nQ1\n\nA metal has bcc structure and the edge length of its unit cell is 3.04", null, ". The volume of the unit cell in cm3 will be\n\nQ2\n\nFor an ionic crystal of the general formula AX and coordination number 6, the value of radius ratio will be\n\nQ3\n\nIn A+ B- ionic compound, radii of A+ and B- ions are 180 pm and 187 pm respectively. The crystal structure of this compound will be\n\nQ4\n\nSodium metal crystallizes as a body centred cubic lattice with the cell edge 4.29", null, ". What is the radius of sodium atom?\n\nQ5\n\nAn fcc lattice has a lattice parameter a = 400 pm. Calculate the molar volume of the lattice including all the empty space.\n\nQ6\n\nThe structure of Na2O crystal is\n\nQ7\n\nStructure similar to zinc blende is found in\n\nQ8\n\nThe number of equidistance oppositely charged ions in a sodium chloride crystal is\n\nQ9\n\nWhat is the coordination number of sodium in Na2O?\n\nQ10\n\nIn the calcium fluoride structure, the coordination number of the cation and anion are respectively" ]
[ null, "http://kaysonseducation.co.in/Question/IIT/chemistry/Physical%20Chemistry%20Part%201/Solid%20States/Solid%20States_files/image110.png", null, "http://kaysonseducation.co.in/Question/IIT/chemistry/Physical%20Chemistry%20Part%201/Solid%20States/Solid%20States_files/image110.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.79122025,"math_prob":0.98195916,"size":1106,"snap":"2021-43-2021-49","text_gpt3_token_len":274,"char_repetition_ratio":0.14972776,"word_repetition_ratio":0.010204081,"special_character_ratio":0.221519,"punctuation_ratio":0.07009346,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98574597,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-11-27T05:47:23Z\",\"WARC-Record-ID\":\"<urn:uuid:10be7a66-61e9-4142-adcf-5f3f90c79eab>\",\"Content-Length\":\"39437\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:59a70200-cca4-4f22-a06e-ad69ce1da89a>\",\"WARC-Concurrent-To\":\"<urn:uuid:9f644a9c-0117-488f-9991-3df5863052cd>\",\"WARC-IP-Address\":\"104.21.31.79\",\"WARC-Target-URI\":\"https://www.kaysonseducation.co.in/questions/p-span-sty_5598\",\"WARC-Payload-Digest\":\"sha1:AAJZ2MLVSNZE2YRIPY7XEYQEVOLLFN36\",\"WARC-Block-Digest\":\"sha1:MQNOOYL6MQRH5AT3ZTOQ5LG37LJ6DLS2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964358118.13_warc_CC-MAIN-20211127043716-20211127073716-00639.warc.gz\"}"}
https://www.greenacres.org/about/news/news-detail/~board/news/post/demystifying-math
[ "# Demystifying Math\n\nDemystifying Math\n\nAlison Stern, 4th Grade Teacher\n\n“Mathematics is not about numbers, equations, computations, or algorithms: it is about understanding.” William Paul Thurston\n\nWhen I think about teaching math I get very excited. There are so many patterns, numbers, shapes, equations, and so much more to contemplate that I can’t wait to get to grips with it. But that is not the case for every student. Finding ways to help students understand and enjoy math is an important goal for any teacher.\n\nIn the Lower School, we carefully focus time and attention on mastering basics in math. This may seem laborious, but it is extremely important when you consider how each basic skill or process becomes an important building block in the larger arena of math. After all, if your house doesn’t have a secure foundation, it won’t be strong and stable; therefore, building strong foundations in our math knowledge and skills will allow us to make connections between them and build onwards and upwards into more complex work.\n\nA phrase I often use with 4th graders is that I aim for them to “think like a mathematician, talk like a mathematician, and write like a mathematician.” Multi-sensory approaches have been proven time and time again to be successful methods of teaching in so many subjects and skills. This thinking, then, is applied in our math classes. As the children “think like a mathematician,” they are encouraged to ask and answer questions, sketch out diagrams, try out equations, and experiment with calculations. As they “talk like a mathematician,” they practice using important mathematical terms to describe their processes and understanding. As they “write like a mathematician,” they learn to communicate clearly on paper how they have chosen to solve a problem and why.\n\nBeing able to manipulate math problems in this way allows children to seek deeper meaning and understanding in their work. If, like me, you learned algorithms at school with little or no explanation behind them, you might begin to appreciate the value of this approach when you consider the student who was excited to learn about how to calculate the area of a parallelogram. “I know how to do that!” he announced, and promptly showed me the equation that he would use to complete the calculation. My response was to ask him why that was the equation he needed to use, and he shook his head. We then proceeded to draw a rectangle and cut it out. We cut a right-angle triangle off one end, flipped it over, and placed it at the opposite end of the rectangle, creating a parallelogram that had two diagonal sides. From this, the same student was able to see that the same equation, area =​ base x height, would allow him to calculate the area of a regular rectangle or a parallelogram with diagonal sides. His face lit up with delight as he realized he now understood why he had to use this equation.\n\nOur goal is for our work in math classes to bring your children joy and curiosity, along with a deeper understanding and a stronger foundation for their future work.\n\nLet's Connect!\n\nNina Chibber, Director of Admission, Pre-K–1\nSara Huneke, Associate Director of Admission, Grades 2–8\n\nP: 301.881.4100 x189 | F: 301.881.3319\[email protected]" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.974396,"math_prob":0.86686057,"size":3033,"snap":"2021-04-2021-17","text_gpt3_token_len":618,"char_repetition_ratio":0.110267416,"word_repetition_ratio":0.007751938,"special_character_ratio":0.19815364,"punctuation_ratio":0.104273506,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9635543,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-04-15T01:11:30Z\",\"WARC-Record-ID\":\"<urn:uuid:81a9469d-e6fb-49dc-ae87-4066a23ead75>\",\"Content-Length\":\"55227\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:af312b88-aee6-439e-b5d3-ddb84268e621>\",\"WARC-Concurrent-To\":\"<urn:uuid:6791833b-ac1f-4438-978e-7f61a3190cdf>\",\"WARC-IP-Address\":\"104.17.67.73\",\"WARC-Target-URI\":\"https://www.greenacres.org/about/news/news-detail/~board/news/post/demystifying-math\",\"WARC-Payload-Digest\":\"sha1:66Z2VNDR7OI43MDEYGWVIPFDPEOHRX4J\",\"WARC-Block-Digest\":\"sha1:J3737SNWSCVQAIPKU55QJ3B6LLM2N6LG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-17/CC-MAIN-2021-17_segments_1618038082988.39_warc_CC-MAIN-20210415005811-20210415035811-00494.warc.gz\"}"}
https://mathematica.stackexchange.com/questions/122031/fitting-multiple-datasets-to-the-same-nonlinear-model
[ "# Fitting multiple datasets to the same nonlinear model\n\nPerhaps a rather simple question, but the suggested questions seem to all be covering something slightly different. What I have can be described as follows.\n\nOne takes a dataset, call it Data; it has dimensions 10 by 1000 by 2 lets say, which is to say it is 10 arrays of {x,y} data of length 1000.\n\nNow I know the following about it: it behaves according to a model Model[x,a,b,c]. Moreover, all 10 arrays have the same a,bbut not the same cparameter. What I am interested in is how one does a NonLinearModelFit over such a dataset, fitting a,b,c1...c10 in a single go. I should note that I have an initial value array cinit of dimensions 10 as well.\n\nOne way I thought of that should in principle work is with KroneckerDelta; I could prepend each dataset with some coordinate that I could use in addition to x and then make a model with the deltafunctions, but this feels very sloppy. There should be an easy way, should there not?\n\nI would post the full model and the data I am working with, but not only is it a big dataset, the parameters and the model are still very much undetermined. I think it would make the question rather offtopic as it is my job to figure out the parameters, not you. So I thought it would make sense to just stick to the concept.\n\n• mathematica.stackexchange.com/a/119044/41016 – Young Aug 2 '16 at 21:53\n• @Young Indeed, that was the idea I had in mind, which a friend of mine suggested. I can only assume that he had already seen that answer at some point. This seems to work, but it is incredibly slow and somehow I feel there should be a prettier way to do it; it seems rather forced. But it does work, and if there is no alternative I will stick with that – user129412 Aug 2 '16 at 22:00\n\n## 1 Answer\n\nHere is a crude way to do it. First the dataset id is appended to the 1000 x 10 x 2 data array. Then the function you have is modified to create a dummy variable vector and the dot product is used to select the parameter of interest: c1, c2, c3,...., or c10.\n\n(* Number of different values of c *)\nnc = 10;\n(* Number of observations per dataset *)\nn = 1000;\n\n(* Create some data for a 1000 x 10 x 2 array *)\nxx = Table[i/n, {i, n}];\ndata = Table[\nTranspose[{xx,\n5 + 2 xx + xx^2 + RandomVariate[NormalDistribution[0, 1], n]}], {i, nc}];\n\n(* Add in dataset number: 1 through nc *)\ndata2 = Flatten[\nTable[{i, data[[i, j, 1]], data[[i, j, 2]]}, {i, nc}, {j, n}], 1];\n\nmodel[x_, a_, b_, i_, c_] := Module[{d, j},\n(* Create dummy variables *)\nd = Table[If[j == i, 1, 0], {j, Length[c]}];\n(* Determine function value *)\na + b x + (c.d) x^2];\n\nnlm = NonlinearModelFit[data2,\nmodel[x, a, b, z, nc, {c1, c2, c3, c4, c5, c6, c7, c8, c9, c10}],\n{a, b, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10}, {z, x}];\nnlm[\"BestFitParameters\"]\n(* {a -> 4.99484, b -> 1.93603, c1 -> 1.18239, c2 -> 1.0829,\nc3 -> 1.21282, c4 -> 1.06046, c5 -> 1.13936, c6 -> 1.07549,\nc7 -> 1.01086, c8 -> 0.960816, c9 -> 0.979848, c10 -> 1.03909} *)\n\n\nBut note that I get a warning:\n\nExperimental`NumericalFunction::dimsl: {x} given in {z,x} should be a list of dimensions for a particular argument.\n\nAlso, besides assuming common values for a and b , you are also assuming a common error variance. Residuals should be checked to see if there are any departures from that assumption or if a more complex error structure is warranted." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9675412,"math_prob":0.97642696,"size":1261,"snap":"2021-21-2021-25","text_gpt3_token_len":304,"char_repetition_ratio":0.099443115,"word_repetition_ratio":0.0,"special_character_ratio":0.23632038,"punctuation_ratio":0.12455516,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97678137,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-06-14T07:02:01Z\",\"WARC-Record-ID\":\"<urn:uuid:84b1f795-191d-498f-af7c-e9362b6c267a>\",\"Content-Length\":\"165834\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1c7b5c5e-3763-407b-a6c1-1291664ecba4>\",\"WARC-Concurrent-To\":\"<urn:uuid:3a20f22a-4024-47c0-b8d1-f0b0a031d200>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://mathematica.stackexchange.com/questions/122031/fitting-multiple-datasets-to-the-same-nonlinear-model\",\"WARC-Payload-Digest\":\"sha1:3WOSY3BDLJXVULFVBLUQ5RLFLI4GRVAS\",\"WARC-Block-Digest\":\"sha1:54GC57HFYWCE3HTTTYDNTW6KPJM57FLE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-25/CC-MAIN-2021-25_segments_1623487611445.13_warc_CC-MAIN-20210614043833-20210614073833-00173.warc.gz\"}"}
https://artofproblemsolving.com/wiki/index.php?title=2011_AMC_12A_Problems/Problem_21&oldid=178713
[ "# 2011 AMC 12A Problems/Problem 21\n\n(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)\n\n## Problem\n\nLet", null, "$f_{1}(x)=\\sqrt{1-x}$, and for integers", null, "$n \\geq 2$, let", null, "$f_{n}(x)=f_{n-1}(\\sqrt{n^2 - x})$. If", null, "$N$ is the largest value of", null, "$n$ for which the domain of", null, "$f_{n}$ is nonempty, the domain of", null, "$f_{N}$ is", null, "$[c]$. What is", null, "$N+c$?", null, "$\\textbf{(A)}\\ -226 \\qquad \\textbf{(B)}\\ -144 \\qquad \\textbf{(C)}\\ -20 \\qquad \\textbf{(D)}\\ 20 \\qquad \\textbf{(E)}\\ 144$\n\n## Solution\n\nThe domain of", null, "$f_{1}(x)=\\sqrt{1-x}$ is defined when", null, "$x\\leq1$.", null, "$$f_{2}(x)=f_{1}\\left(\\sqrt{4-x}\\right)=\\sqrt{1-\\sqrt{4-x}}$$\n\nApplying the domain of", null, "$f_{1}(x)$ and the fact that square roots must be positive, we get", null, "$0\\leq\\sqrt{4-x}\\leq1$. Simplifying, the domain of", null, "$f_{2}(x)$ becomes", null, "$3\\leq x\\leq4$.\n\nRepeat this process for", null, "$f_{3}(x)=\\sqrt{1-\\sqrt{4-\\sqrt{9-x}}}$ to get a domain of", null, "$-7\\leq x\\leq0$.\n\nFor", null, "$f_{4}(x)$, since square roots must be nonnegative, we can see that the negative values of the previous domain will not work, so", null, "$\\sqrt{16-x}=0$. Thus we now arrive at", null, "$16$ being the only number in the of domain of", null, "$f_4 x$ that defines", null, "$x$. However, since we are looking for the largest value for", null, "$n$ for which the domain of", null, "$f_{n}$ is nonempty, we must continue checking until we arrive at a domain that is empty.\n\nWe continue with", null, "$f_{5}(x)$ to get a domain of", null, "$\\sqrt{25-x}=16 \\implies x=-231$. Since square roots cannot be negative, this is the last nonempty domain. We add to get", null, "$5-231=\\boxed{\\textbf{(A)}\\ -226}$.\n\nThe problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.", null, "" ]
[ null, "https://latex.artofproblemsolving.com/5/d/6/5d613511e25cafc7f98eb5e1feccc94affd5bbff.png ", null, "https://latex.artofproblemsolving.com/7/2/2/72287b09043ed45b372a517d764e12d07aff8071.png ", null, "https://latex.artofproblemsolving.com/7/e/3/7e31555587da25661bc77c8be737f130b54ef54e.png ", null, "https://latex.artofproblemsolving.com/f/c/9/fc97ef67268cd4e91bacdf12b8901d7036c9a056.png ", null, "https://latex.artofproblemsolving.com/1/7/4/174fadd07fd54c9afe288e96558c92e0c1da733a.png ", null, "https://latex.artofproblemsolving.com/3/4/0/340d9d103363a5ec9fe13554fdcf0ee7a0bec229.png ", null, "https://latex.artofproblemsolving.com/6/4/a/64a6524f3ee6103c559888db97a9d041689fadae.png ", null, "https://latex.artofproblemsolving.com/5/2/b/52bae999d8320de9922bb4da965c7d6eb93f7ed1.png ", null, "https://latex.artofproblemsolving.com/6/5/9/659ddd16bf2d477bd439f02e928dbdae9702becf.png ", null, "https://latex.artofproblemsolving.com/6/b/9/6b9de5ad1832d1c845686be1a2500988e3f3e6be.png ", null, "https://latex.artofproblemsolving.com/5/d/6/5d613511e25cafc7f98eb5e1feccc94affd5bbff.png ", null, "https://latex.artofproblemsolving.com/6/5/2/652beb4a0edefea57900b60ed2ae963e3a18d5f7.png ", null, "https://latex.artofproblemsolving.com/4/5/3/4533f0f767c7fd6b4ecb2745c2749e1b019fd1f6.png ", null, "https://latex.artofproblemsolving.com/1/1/e/11ef5766b0426af45297faae19e02b472a57a59b.png ", null, "https://latex.artofproblemsolving.com/0/5/2/052626cf901fe29f62812ac54856eac6f59de47c.png ", null, "https://latex.artofproblemsolving.com/7/2/3/723d8c0f4846a293f09776078bbbdb232ba27087.png ", null, "https://latex.artofproblemsolving.com/e/e/c/eecd531e67f2b4013c432ed2df7bf49ef37180ea.png ", null, "https://latex.artofproblemsolving.com/d/e/b/deb367968b6b5ec6902c5984b6adc6f4f3f88091.png ", null, "https://latex.artofproblemsolving.com/f/7/9/f7975175dfae086cbeed0a61b9ae3a2fa34690a8.png ", null, "https://latex.artofproblemsolving.com/2/2/b/22b1ae5a0af1c60e326e5bb463e1b4efa48a1271.png ", null, "https://latex.artofproblemsolving.com/a/6/0/a60ea2c68278f789621218d6bdd138c53f954868.png ", null, "https://latex.artofproblemsolving.com/9/a/5/9a5b4928c8fe50ce3c2428da3bee3505e891b788.png ", null, "https://latex.artofproblemsolving.com/8/0/d/80d6c17847d4361966abbb0b8cf48b01a8ac7b8d.png ", null, "https://latex.artofproblemsolving.com/2/6/e/26eeb5258ca5099acf8fe96b2a1049c48c89a5e6.png ", null, "https://latex.artofproblemsolving.com/1/7/4/174fadd07fd54c9afe288e96558c92e0c1da733a.png ", null, "https://latex.artofproblemsolving.com/3/4/0/340d9d103363a5ec9fe13554fdcf0ee7a0bec229.png ", null, "https://latex.artofproblemsolving.com/f/2/e/f2eb9cd4b60277b9a794e8801d1e34daa9c4070f.png ", null, "https://latex.artofproblemsolving.com/0/c/5/0c5f7c52f936a98c82bf25a2c31a2ba6076bcb69.png ", null, "https://latex.artofproblemsolving.com/1/5/e/15eb623e362b5a094db84cdb70547e6cce92fbcb.png ", null, "https://wiki-images.artofproblemsolving.com//8/8b/AMC_logo.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8299735,"math_prob":0.9999709,"size":1240,"snap":"2022-40-2023-06","text_gpt3_token_len":338,"char_repetition_ratio":0.15048544,"word_repetition_ratio":0.03875969,"special_character_ratio":0.30806452,"punctuation_ratio":0.10080645,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99999595,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60],"im_url_duplicate_count":[null,6,null,null,null,3,null,null,null,null,null,6,null,3,null,3,null,3,null,3,null,6,null,7,null,3,null,null,null,3,null,3,null,3,null,3,null,3,null,4,null,3,null,null,null,2,null,null,null,null,null,6,null,3,null,2,null,3,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-03T16:41:16Z\",\"WARC-Record-ID\":\"<urn:uuid:eb86b7c2-f5fe-47a4-a4af-333f6f3d850f>\",\"Content-Length\":\"43257\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e04c86b4-d8b1-4132-abd3-3aff3187d649>\",\"WARC-Concurrent-To\":\"<urn:uuid:adb8407e-7593-4944-99e5-434018d9c198>\",\"WARC-IP-Address\":\"172.67.69.208\",\"WARC-Target-URI\":\"https://artofproblemsolving.com/wiki/index.php?title=2011_AMC_12A_Problems/Problem_21&oldid=178713\",\"WARC-Payload-Digest\":\"sha1:4HNS73Q3VZAU7E2D4MBP7NRP4N2Y4DUO\",\"WARC-Block-Digest\":\"sha1:IRLZNUENS5CYPORWWRS7GDK72RM4T7SR\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500058.1_warc_CC-MAIN-20230203154140-20230203184140-00660.warc.gz\"}"}
https://www.jiskha.com/questions/1748446/given-RST-NPQ-RT-7x-5-NQ-5x-11-find-the-length-of-RT-and-NQ-a-8-b-51-c-40
[ "# geometry\n\ngiven RST=NPQ, RT= 7x-5, NQ=5x+11, find the length of RT and NQ\na. 8\nb. 51\nc. 40\nd. 56\n\n1. 👍 0\n2. 👎 0\n3. 👁 642\n1. I THINK ITS C\n\n1. 👍 0\n2. 👎 0\nposted by HEY\n2. 7x-5= 5x+11\n2x = 16\nx = 8\n\n1. 👍 0\n2. 👎 0\nposted by Hudson\n3. Ok with x = 8\nBUT, it asked for the length of RT and NQ\nif x = 8, RT = 7x-5 = 56 - 5 = 51\n\nnotice that NQ = 5x+11 = 40+11 = 51, the same as required\n\nSo your choice would be b)\n\n1. 👍 1\n2. 👎 0\nposted by Reiny\n\n## Similar Questions\n\nGeometry ***(PLEASE CHECK MY ANSWER)*** 1. If triangle RST = triangle NPQ, which of the following is true? A.) ÚR = ÚP B.) ÚR = ÚQ C.) ÚT = ÚP D.) ÚT = ÚQ\n\n2. ### math\n\nthe verticies of triangle R(0,12), S(-6,6), and T(4,8). write in slope-intercept form the equations of the lines that contain the segments described. it says, find the medians of triangle RST. find the altitudes of triangle RST.\n\nasked by chris on February 18, 2009\n3. ### Geometry\n\n1. If RST=NPQ, which of the following is true? A) R=P B) R=Q C) T=P D) T=Q\n\nasked by anonymous on December 20, 2017\n4. ### geometry\n\nTriangles Rst and wxy are similar . the side lengths of rst are 10 inches. 14 inches and 20 inches and the length of an altitude is 6.5 inches. The shortest side of wxy. Find the lengths of the other two sides of wxy. Find the\n\nasked by Lindsay on January 12, 2012\n5. ### Math\n\nThe football team is on the 30-yd line and has 4 plays to make a rst down. To make a rst down, the team must advance the ball 10 yd. On the rst play, they lost 4 yd. On the second play, they gained 8 yd. On the third play, they\n\nasked by Carey on May 30, 2016\n6. ### geometry\n\n^ RST m\n\nasked by Sarah Atchley on December 20, 2012\n7. ### geometry\n\nIn ∆RST, RS = 10, RT = 15, and m∠R = 32. In ∆UVW, UV = 12, UW = 18, and m∠U = 32. Which of the following statements is correct? 1. ∆RST ∼ ∆WUV and the similarity ratio is 56. 2. ∆RST ∼ ∆UVW and the similarity\n\nasked by chris on November 3, 2011\n8. ### Geometry\n\nSP bisects\n\nasked by Amy on September 10, 2014\n9. ### Geometry\n\nSP bisects\n\nasked by Amy on September 10, 2014\n10. ### Geometry\n\nComplete the 2 column proof. Given m\n\nasked by Steve on December 9, 2015\n\nMore Similar Questions" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9192504,"math_prob":0.9870097,"size":1752,"snap":"2019-26-2019-30","text_gpt3_token_len":638,"char_repetition_ratio":0.14416476,"word_repetition_ratio":0.08563536,"special_character_ratio":0.34189498,"punctuation_ratio":0.145,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99742746,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-07-19T00:37:55Z\",\"WARC-Record-ID\":\"<urn:uuid:b762bbf0-4485-4c72-a338-fa8830bd2589>\",\"Content-Length\":\"22251\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:7eb3d257-f8c8-403b-8089-77fe3d398ed2>\",\"WARC-Concurrent-To\":\"<urn:uuid:ded33615-a01e-4b5d-874d-89e52e513198>\",\"WARC-IP-Address\":\"66.228.55.50\",\"WARC-Target-URI\":\"https://www.jiskha.com/questions/1748446/given-RST-NPQ-RT-7x-5-NQ-5x-11-find-the-length-of-RT-and-NQ-a-8-b-51-c-40\",\"WARC-Payload-Digest\":\"sha1:TPHQ4IMI4KJELX4A2IIGXL5E7JR4RUWL\",\"WARC-Block-Digest\":\"sha1:32DQBUUHC6HMYBBTFBMBU35KKUUVIUNW\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-30/CC-MAIN-2019-30_segments_1563195525863.49_warc_CC-MAIN-20190718231656-20190719013656-00213.warc.gz\"}"}
https://codegolf.stackexchange.com/questions/951/print-triangle-wave-of-numbers/214778
[ "# Print Triangle Wave of Numbers\n\nGiven the amplitude and period for a wave, print the wave. See sample output for more details. The total number of wave forms equals the period, and the height of each wave equals the amplitude. Amplitude and Period are less than 10. You can ignore the trailing spaces but not the leading spaces.\n\nSample Input\n3 2\n\nSample Output\n3 3\n232 232\n12321 12321 12321 12321\n232 232\n3 3\n\n• This looks more like triangles than sines. – J B Feb 15 '11 at 16:25\n• I'm thinking this falls under the ascii-art tag. But the art part is not quite present, maybe there should be another tag for ascii graphics? – Juan Feb 15 '11 at 16:30\n• I guess, you mean \"number of periods\" and not frequency. Frequency is (number of periods)/time, like RPM in cars. – Dr. belisarius Feb 15 '11 at 17:10\n• @Juan, I think people searching for ascii-art questions probably wouldn't mind seeing this one included in the results – gnibbler Feb 15 '11 at 20:08\n• Am I allowed to have leading whitespace in each line? Would save me three chars. – FUZxxl Feb 15 '11 at 21:26\n\n# Dyalog APL, 43 40 bytes\n\n{⍉⊃⍪/⍺⍴⊂(⌽⍪⊢)(n,1-n←2×⍵)↑↑b⍴¨⍕¨b←a,1↓⌽a←⍳⍵}\n\nThis is a dyadic function with the amplitude as the right argument (⍵) and the period as the left argument (⍺). A program that reads user input would take the same number of characters.\n\nDrawing some inspiration from Martin Büttner's CJam answer:\n\n{⍉⊃⍪/⍺⍴⊂(⌽⍪⊢)n(1-n←2×⍵)↑↑⍴∘⍕¨⍨a,1↓⌽a←⍳⍵}\na←⍳⍵ ⍝ numbers 1 2 3, call them \"a\"\n⌽ ⍝ reverse them: 3 2 1\n1↓ ⍝ drop one: 2 1\na, ⍝ prepend \"a\": 1 2 3 2 1\n⍴∘⍕¨⍨ ⍝ format a[i] and repeat it a[i] times:\n⍝ (,'1') '22' '333' '22' (,'1')\n↑ ⍝ mix, i.e. obtain a character matrix:\n⍝ ┌───┐\n⍝ │1 │\n⍝ │22 │\n⍝ │333│\n⍝ │22 │\n⍝ │1 │\n⍝ └───┘\nn(1-n←2×⍵)↑ ⍝ take a 2×⍵ by 1-2×⍵ matrix\n⍝ (negative length extends backwards):\n⍝ ┌─────┐\n⍝ │ 1 │\n⍝ │ 22 │\n⍝ │ 333│\n⍝ │ 22 │\n⍝ │ 1 │\n⍝ │ │\n⍝ └─────┘\n(⌽⍪⊢) ⍝ the reverse of it, vertically joined with it\n⍝ ┌─────┐\n⍝ │ 1 │\n⍝ │ 22 │\n⍝ │333 │\n⍝ │ 22 │\n⍝ │ 1 │\n⍝ │ │\n⍝ │ 1 │\n⍝ │ 22 │\n⍝ │ 333│\n⍝ │ 22 │\n⍝ │ 1 │\n⍝ │ │\n⍝ └─────┘\n⍺⍴⊂ ⍝ take ⍺ copies\n⊃⍪/ ⍝ join them vertically\n⍉ ⍝ transpose\n\n• Haha, and I was so happy to have beaten APL by a considerable margin for once. :D – Martin Ender Jan 29 '15 at 22:27\n• I wouldn't have tried if you hadn't :) By the way, it looks like your answer as well as the other APL answer are producing wrong output. According to the sample, triangles should meet at the central line. – ngn Jan 29 '15 at 22:40\n• Oh, good catch, fixed! – Martin Ender Jan 29 '15 at 23:03\n• You can golf it by 2 more: b⍴¨⍕¨b← can be rewritten as ⍴∘⍕¨⍨ I think. Great answer btw, I like it a lot! – Moris Zucca Jan 30 '15 at 10:59\n• That's very kind of you! I've just realised I can also shorten (n,1-n←2×⍵) to n(1-n←2×⍵). – ngn Jan 30 '15 at 20:17\n\n## Python - 135 chars\n\nA,F=map(int,raw_input().split());R=range\nfor y in R(-A+1,A):print\"\".join((\" %s\"%x)[-x<s*y<1]for s in(1,-1)for x in R(1,A)+R(A,-1,-1))*F\n\n\nThis version with a leading space is 132 chars\n\nA,F=map(int,raw_input().split());R=range\nfor y in R(-A+1,A):print\"\".join((\" %s\"%x)[-x<s*y<1]for s in(1,-1)for x in R(A)+R(A,0,-1))*F\n\n\nIt also can be considerably shorter if not required to read from stdin or even if the input is comma separated\n\nFor comma separated input, the first line becomes\n\nA,F=input();R=range\n\n\n## APL (77)\n\n,/{×⍎⍵:⍵⋄' '}¨¨⊃∘↑∘⍕¨¨K⍴⊂(⊖M),⍨M←(2⍴N+N-1)↑(0 1↓M),⍨⌽M←(⌽⊖/¨M)×≥/¨M←⍳2⍴⊃N K←⎕\n\n\n## J, 87 characters\n\nAs a program:\n\nb=:]\\@(]#~' '~:])(\":@:>:@i.@-)\n,.~^:(<:Y)(,.|.)@(' ',.~((<:({.\"1|.\"1)b),.b),' '$~2<:])X Y X runs like this: ,.~^:(<:2)(,.|.)@(' ',.~((<:({.\"1|.\"1)b),.b),' '$~2#<:) 3\n3 3\n232 232\n12321 12321 12321 12321\n232 232\n3 3\n,.~^:(<:4)(,.|.)@(' ',.~((<:({.\"1|.\"1)b),.b),' '$~2#<:) 2 2 2 2 2 2 2 2 2 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 2 2 2 2 2 2 2 2 It's 5 more characters if we need it as a function F: 3 F 2 3 3 232 232 12321 12321 12321 12321 232 232 3 3 • I'm doubtful as to whether that counts as taking arguments. – user475 Feb 16 '11 at 11:44 ## Haskell (226225222220 214) My try in Haskell: import List n!k|n>k=p:n!(k+1)++[p]|0<1=[p]where p=(n-1)?\" \"++k?show k++(n-k)?\" \">>=id f[n,k]=k?(n!1++(2*n-1)?' ':map reverse(n!1)++[(2*n-1)?' '])>>=id main=interact$unlines.transpose.f.map read.words\n(?)=replicate\n\n\nSorry guys, (€) is optimized away, it takes three bytes for one € as opposed to ! which only takes one byte each.\nHere is a \"beta Version\", that doesn't satisfies the spec:\n\nimport List\n\n-- Creates a single wave of numbers. k should be equal to 1\n-- and is used for internal stuff,\nwave n k|n==k=[peek]\n|otherwise = peek:wave n(k+1)++[peek] where\npeek=replicate(n-1)\" \"++replicate k(show k)++replicate(n-k)\" \">>=id\n\n-- Creates a full wave\n-- k: number of waves, n: size of waves\nfullWave[n,k]=unlines.transpose.concat.replicate k$wave n 1++map reverse(wave n 1) main=interact$fullWave.map read.words\n\n• The EUR operator! First time I encounter it :) – J B Feb 15 '11 at 20:07\n• I thought that € is discriminated way too much in programming languages. And because I was looking for an unused op, this came in very handy. – FUZxxl Feb 15 '11 at 20:11\n• What does it do? Is it 1.35 * the US operator? :) – gnibbler Feb 15 '11 at 20:12\n• ideone.com/zBq0U – FUZxxl Mar 6 '11 at 21:06\n\n# CJam, 45 bytes\n\nCJam is a lot younger than this challenge, so this answer is not eligible for the green checkmark (which should btw be updated to marinus's APL answer). This was still a fun little exercise though.\n\nr~:I2*,{)IS*I@I\\-z-_a*+I~)>I(S*+}%_Wf%+r~*zN*\n\n\nTest it here.\n\nThe idea is to generate half a period vertically, like so:\n\n 1\n22\n333\n22\n1\n\n\n(Plus the next empty row which SE swallows). This then duplicated, each row is reversed, and the second half of the period is appended. Then the entire thing is repeated by the number of periods, and ultimately the grid is transposed to orientate the wave along the horizontal.\n\n# Canvas, 24 bytes\n\nH(¹)*!∔}─L╷ ×;+ ∔:↔∔⤢╶×↔\n\n\nTry it here!" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7657666,"math_prob":0.94846123,"size":524,"snap":"2021-04-2021-17","text_gpt3_token_len":141,"char_repetition_ratio":0.12692308,"word_repetition_ratio":0.0,"special_character_ratio":0.3129771,"punctuation_ratio":0.1,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9794435,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-16T03:02:28Z\",\"WARC-Record-ID\":\"<urn:uuid:c14ee407-b290-4530-b878-166feff3f270>\",\"Content-Length\":\"225481\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:165e1af7-89c6-41a9-939a-3c7da82e6a70>\",\"WARC-Concurrent-To\":\"<urn:uuid:4f41eef8-e3e1-48e1-a566-05a2d63a8708>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://codegolf.stackexchange.com/questions/951/print-triangle-wave-of-numbers/214778\",\"WARC-Payload-Digest\":\"sha1:4JHKRQARIFRVZ6F42WFBEYTUQTMTHCBQ\",\"WARC-Block-Digest\":\"sha1:Q3N6PGDQNFIMQDCC5BMM5MLLHZJXRLM5\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610703499999.6_warc_CC-MAIN-20210116014637-20210116044637-00243.warc.gz\"}"}
https://eslint.org/docs/rules/no-arrow-condition
[ "# no-arrow-condition: disallow arrow functions where test conditions are expected\n\nThis rule was removed in ESLint v2.0 and replaced by a combination of the no-confusing-arrow and no-constant-condition rules.\n\nArrow functions (`=>`) are similar in syntax to some comparison operators (`>`, `<`, `<=`, and `>=`). This rule warns against using the arrow function syntax in places where a condition is expected. Even if the arguments of the arrow function are wrapped with parens, this rule still warns about it.\n\nHere's an example where the usage of `=>` is most likely a typo:\n\n``````// This is probably a typo\nif (a => 1) {}\nif (a >= 1) {}\n``````\n\nThere are also cases where the usage of `=>` can be ambiguous and should be rewritten to more clearly show the author's intent:\n\n``````// The intent is not clear\nvar x = a => 1 ? 2 : 3\n// Did the author mean this\nvar x = function (a) { return a >= 1 ? 2 : 3 }\n// Or this\nvar x = a <= 1 ? 2 : 3\n``````\n\n## Rule Details\n\nExamples of incorrect code for this rule:\n\n``````/*eslint no-arrow-condition: \"error\"*/\n/*eslint-env es6*/\n\nif (a => 1) {}\nwhile (a => 1) {}\nfor (var a = 1; a => 10; a++) {}\na => 1 ? 2 : 3\n(a => 1) ? 2 : 3\nvar x = a => 1 ? 2 : 3\nvar x = (a) => 1 ? 2 : 3\n``````\n\n## Version\n\nThis rule was introduced in ESLint 1.8.0 and removed in 2.0.0-beta.3." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8330765,"math_prob":0.96196663,"size":1281,"snap":"2021-31-2021-39","text_gpt3_token_len":384,"char_repetition_ratio":0.13625686,"word_repetition_ratio":0.10861423,"special_character_ratio":0.35284933,"punctuation_ratio":0.13483146,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97641915,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-24T03:47:39Z\",\"WARC-Record-ID\":\"<urn:uuid:8596bcf7-305e-4ee1-b688-d36f7e147447>\",\"Content-Length\":\"13414\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:90efb78c-7cce-4371-99ea-7a6ad4d7403c>\",\"WARC-Concurrent-To\":\"<urn:uuid:3cfda45a-dce9-4e72-a992-d4329e1321fe>\",\"WARC-IP-Address\":\"67.207.81.229\",\"WARC-Target-URI\":\"https://eslint.org/docs/rules/no-arrow-condition\",\"WARC-Payload-Digest\":\"sha1:SQD7XW7IJZOSNV3KXMWR5XJGWBPRO7EJ\",\"WARC-Block-Digest\":\"sha1:OMMXSXHQPSY6YTKAIAAFCHX4WIGK7L4F\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057496.18_warc_CC-MAIN-20210924020020-20210924050020-00495.warc.gz\"}"}
http://allergyoffices.info/page/2/
[ "## Math Counting Worksheets For Kindergarten", null, "first grade counting backwards worksheet printable worksheets math counting worksheets for kindergarten free math counting worksheets for kindergarten 7.\n\n## Comprehension Worksheets For Grade 2 Pdf", null, "year 4 reading comprehension worksheets grade 2 comprehension worksheets for grade 2 pdf urdu comprehension worksheets for grade 2 pdf.\n\n## Free Printable Coin Worksheets", null, "counting money worksheets grade free printable coin worksheets coins worksheets 2nd grade coins worksheets grade worksheet free printable money for counting at.\n\n## Free Perplexors Worksheets", null, "safety signs and symbols worksheets health free worksheet activities free perplexors worksheets maths worksheets ideas logic puzzles free printable with grid worksheets for preschool numbers.\n\n## Saxon Phonics And Spelling K Worksheets", null, "phonics spelling k student worksheets box 1 only saxon phonics and spelling k worksheets saxon phonics and spelling 1 worksheet 96 phonics spelling 1 letter tile set sheets student pack new.\n\n## Grade 6 Math Worksheets Pdf", null, "math worksheets grades 1 6 standard 6 maths grade math grade 6 math worksheets pdf grade 6 maths worksheets pdf south africa math worksheets grades 1 6 maths grade math worksheets math.\n\n## Simple Machines Printable Worksheets", null, "screws and simple machines worksheets can you find all the screws in simple machines printable worksheets christmas worksheets ideas prep class worksheets fresh printable.\n\n## Grade 3 Social Studies Worksheets Printable", null, "grade social studies worksheets for learning a free grade 3 social studies worksheets printable grade 3 canadian social studies worksheets printable download free printable worksheets.\n\n## Long Vowel Pattern Worksheets", null, "long e workshts ea e the cutest products from long vowel pattern worksheets long vowel patterns worksheet for grade 1 8 workshts practicing common long vowel patterns ea and e.\n\n## Algebra 1 Lessons And Worksheets", null, "algebra 1 lessons algebra 1 lessons and worksheets algebra 1 lessons and worksheets handout 2 unit 1 number theory lesson." ]
[ null, "http://allergyoffices.info/wp-content/uploads/2019/05/first-grade-counting-backwards-worksheet-printable-worksheets-math-counting-worksheets-for-kindergarten-free-math-counting-worksheets-for-kindergarten-7.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/year-4-reading-comprehension-worksheets-grade-2-comprehension-worksheets-for-grade-2-pdf-urdu-comprehension-worksheets-for-grade-2-pdf.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/counting-money-worksheets-grade-free-printable-coin-worksheets-coins-worksheets-2nd-grade-coins-worksheets-grade-worksheet-free-printable-money-for-counting-at.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/safety-signs-and-symbols-worksheets-health-free-worksheet-activities-free-perplexors-worksheets-maths-worksheets-ideas-logic-puzzles-free-printable-with-grid-worksheets-for-preschool-numbers.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/phonics-spelling-k-student-worksheets-box-1-only-saxon-phonics-and-spelling-k-worksheets-saxon-phonics-and-spelling-1-worksheet-96-phonics-spelling-1-letter-tile-set-sheets-student-pack-new.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/math-worksheets-grades-1-6-standard-6-maths-grade-math-grade-6-math-worksheets-pdf-grade-6-maths-worksheets-pdf-south-africa-math-worksheets-grades-1-6-maths-grade-math-worksheets-math.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/screws-and-simple-machines-worksheets-can-you-find-all-the-screws-in-simple-machines-printable-worksheets-christmas-worksheets-ideas-prep-class-worksheets-fresh-printable.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/grade-social-studies-worksheets-for-learning-a-free-grade-3-social-studies-worksheets-printable-grade-3-canadian-social-studies-worksheets-printable-download-free-printable-worksheets.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/long-e-workshts-ea-e-the-cutest-products-from-long-vowel-pattern-worksheets-long-vowel-patterns-worksheet-for-grade-1-8-workshts-practicing-common-long-vowel-patterns-ea-and-e.jpg", null, "http://allergyoffices.info/wp-content/uploads/2019/05/algebra-1-lessons-algebra-1-lessons-and-worksheets-algebra-1-lessons-and-worksheets-handout-2-unit-1-number-theory-lesson.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.70522666,"math_prob":0.6043744,"size":1676,"snap":"2019-13-2019-22","text_gpt3_token_len":304,"char_repetition_ratio":0.29126793,"word_repetition_ratio":0.032786883,"special_character_ratio":0.16945107,"punctuation_ratio":0.03875969,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95520204,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"im_url_duplicate_count":[null,3,null,1,null,1,null,1,null,1,null,3,null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-05-20T02:32:52Z\",\"WARC-Record-ID\":\"<urn:uuid:2e03565b-8343-4bf7-a96e-815df2041f89>\",\"Content-Length\":\"168496\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3389438f-817a-4702-95b2-64a004112847>\",\"WARC-Concurrent-To\":\"<urn:uuid:af41e4c0-0a9f-4d1c-9432-abda17d67d30>\",\"WARC-IP-Address\":\"104.27.135.188\",\"WARC-Target-URI\":\"http://allergyoffices.info/page/2/\",\"WARC-Payload-Digest\":\"sha1:HLCSXU6GCE73JJBT5JM7DU2ZRNQGIEUI\",\"WARC-Block-Digest\":\"sha1:I7RMOYU4VCW7T44ATRW7N6IL5ZLGEFRX\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-22/CC-MAIN-2019-22_segments_1558232255536.6_warc_CC-MAIN-20190520021654-20190520043654-00178.warc.gz\"}"}
https://www.intlpress.com/site/pub/pages/journals/items/cag/content/vols/0024/0004/a007/index.php
[ "# Communications in Analysis and Geometry\n\n## Volume 24 (2016)\n\n### Finite time singularities for the locally constrained Willmore flow of surfaces\n\nPages: 843 – 886\n\nDOI: https://dx.doi.org/10.4310/CAG.2016.v24.n4.a7\n\n#### Authors\n\nJames McCoy (Institute for Mathematics and Applied Statistics, University of Wollongong, NSW, Australia)\n\nGlen Wheeler (Institut für Analysis und Numerik, Otto-von-Guericke-Universität, Magdeburg, Germany; and Institute for Mathematics and Applied Statistics, University of Wollongong, NSW, Australia)\n\n#### Abstract\n\nIn this paper we study the steepest descent $L^2$-gradient flow of the functional $W_{\\lambda_1, \\lambda_2}$, which is the the sum of the Willmore energy, $\\lambda_1$-weighted surface area, and $\\lambda_2$-weighted enclosed volume, for surfaces immersed in $\\mathbb{R}^3$. This coincides with the Helfrich functional with zero ‘spontaneous curvature’. Our first results are a concentration-compactness alternative and interior estimates for the flow. For initial data with small energy, we prove preservation of embeddedness, and by directly estimating the Euler-Lagrange operator from below in $L^2$ we obtain that the maximal time of existence is finite. Combining this result with the analysis of a suitable blowup allows us to show that for such initial data the flow contracts to a round point in finite time.\n\n#### Keywords\n\nglobal differential geometry, fourth order, geometric analysis, parabolic partial differential equations\n\nPublished 3 November 2016" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8051491,"math_prob":0.8125565,"size":1201,"snap":"2023-40-2023-50","text_gpt3_token_len":286,"char_repetition_ratio":0.09189641,"word_repetition_ratio":0.0,"special_character_ratio":0.22731057,"punctuation_ratio":0.11848341,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9774025,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-10T00:54:56Z\",\"WARC-Record-ID\":\"<urn:uuid:ae3bc95e-89cc-40c4-8f58-b5a775b87947>\",\"Content-Length\":\"9104\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d1a65697-ad66-4137-bbae-b38a3061c8e2>\",\"WARC-Concurrent-To\":\"<urn:uuid:8abe8ca0-df44-4346-8308-419f21d2d01f>\",\"WARC-IP-Address\":\"107.180.41.239\",\"WARC-Target-URI\":\"https://www.intlpress.com/site/pub/pages/journals/items/cag/content/vols/0024/0004/a007/index.php\",\"WARC-Payload-Digest\":\"sha1:O7R6QFSILFW22O4K43GNS2G3YPO7D7RF\",\"WARC-Block-Digest\":\"sha1:5D5MLECBUHSWR72VPRARF5JJRRTFC7DI\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100989.75_warc_CC-MAIN-20231209233632-20231210023632-00738.warc.gz\"}"}
https://link.springer.com/chapter/10.1007/978-3-030-39647-3_45
[ "# A Spectral Element Reduced Basis Method for Navier–Stokes Equations with Geometric Variations\n\n• 2336 Accesses\n\nPart of the Lecture Notes in Computational Science and Engineering book series (LNCSE,volume 134)\n\n## Abstract\n\nWe consider the Navier-Stokes equations in a channel with a narrowing of varying height. The model is discretized with high-order spectral element ansatz functions, resulting in 6372 degrees of freedom. The steady-state snapshot solutions define a reduced order space through a standard POD procedure. The reduced order space allows to accurately and efficiently evaluate the steady-state solutions for different geometries. In particular, we detail different aspects of implementing the reduced order model in combination with a spectral element discretization. It is shown that an expansion in element-wise local degrees of freedom can be combined with a reduced order modelling approach to enhance computational times in parametric many-query scenarios.\n\n## 1 Introduction and Motivation\n\nSpectral element methods (SEM) use high-order polynomial ansatz functions to solve partial differential equations (PDEs) in all fields of science and engineering, see, e.g., [4,5,6,7, 12, 16] and references therein for an overview. Typically, an exponential error decay under p-refinement is observed, which can provide an enhanced accuracy over standard finite element methods at the same computational cost. In the following, we assume that the discretization error is much smaller than the model reduction error, small enough not to interfere with our results. In general, this needs to be established with the use of suitable error estimation and adaptivity techniques.\n\nWe consider the flow through a channel with a narrowing of variable height. A reduced order model (ROM) is computed from a few high-order SEM solves, which accurately approximates the high-order solutions for the parameter range of interest, i.e., the different narrowing heights under consideration. Since the parametric variations are affine, a mapping to a reference domain is applied without further interpolation techniques. The focus of this work is to show how to use simulations arising from the SEM solver Nektar++ in a ROM context. In particular, the multilevel static condensation of the high-order solver is not applied, but the ROM projection works with the system matrices in local coordinates. See for further details. This is in contrast to our previous work , since numerical experiments have shown that the multilevel static condensation is inefficient in a ROM context. Additionally, we consider affine geometry variations. With SEM as discretization method, we use global approximation functions for the high-order as well as reduced-order methods. The ROM techniques described in this paper are implemented in open-source project ITHACA-SEM.Footnote 1\n\nThe outline of the paper is as follows. In Sect. 2, the model problem is defined and the geometric variations are introduced. Section 3 provides details on the spectral element discretization, while Sect. 4 describes the model reduction approach and shows the affine mapping to the reference domain. Numerical results are given in Sect. 5, while Sect. 6 summarizes the work and points out future perspectives.\n\n## 2 Problem Formulation\n\nLet $$\\Omega \\in \\mathbb {R}^2$$ be the computational domain. Incompressible, viscous fluid motion in spatial domain Ω over a time interval (0, T) is governed by the incompressible Navier-Stokes equations with vector-valued velocity u, scalar-valued pressure p, kinematic viscosity ν and a body forcing f:\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\frac{\\partial \\mathbf{u}}{\\partial t} + \\mathbf{u} \\cdot \\nabla \\mathbf{u} &\\displaystyle =&\\displaystyle - \\nabla p + \\nu \\Delta \\mathbf{u} + \\mathbf{f}, {} \\end{array} \\end{aligned}\n(1)\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\nabla \\cdot \\mathbf{u} &\\displaystyle =&\\displaystyle 0. {} \\end{array} \\end{aligned}\n(2)\n\nBoundary and initial conditions are prescribed as\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\mathbf{u} &\\displaystyle =&\\displaystyle \\mathbf{d} \\quad \\text{ on } \\Gamma_D \\times (0, T), \\end{array} \\end{aligned}\n(3)\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\nabla \\mathbf{u} \\cdot \\mathbf{n} &\\displaystyle =&\\displaystyle \\mathbf{g} \\quad \\text{ on } \\Gamma_N \\times (0, T), \\end{array} \\end{aligned}\n(4)\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\mathbf{u} &\\displaystyle =&\\displaystyle {\\mathbf{u}}_0 \\quad \\text{ in } \\Omega \\times 0, {} \\end{array} \\end{aligned}\n(5)\n\nwith d, g and u 0 given and  Ω = ΓD ∪ ΓN, ΓD ∩ ΓN = ∅. The Reynolds number Re, which characterizes the flow , depends on ν, a characteristic velocity U, and a characteristic length L:\n\n\\displaystyle \\begin{aligned} Re = \\frac{UL}{\\nu}. \\end{aligned}\n(6)\n\nWe are interested in computing the steady states, i.e., solutions where $$\\frac {\\partial \\mathbf {u}}{\\partial t}$$ vanishes. The high-order simulations are obtained through time-advancement, while the ROM solutions are obtained with a fixed-point iteration.\n\n### 2.1 Oseen-Iteration\n\nThe Oseen-iteration is a secant modulus fixed-point iteration, which in general exhibits a linear rate of convergence . Given a current iterate (or initial condition) u k, the next iterate u k+1 is found by solving linear system:\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} -\\nu \\Delta {\\mathbf{u}}^{k+1} + ({\\mathbf{u}}^k \\cdot \\nabla) {\\mathbf{u}}^{k+1} + \\nabla p &\\displaystyle =&\\displaystyle \\mathbf{f} \\text{ in } \\Omega, {} \\\\ \\nabla \\cdot {\\mathbf{u}}^{k+1} &\\displaystyle =&\\displaystyle 0 \\text{ in } \\Omega, \\\\ {\\mathbf{u}}^{k+1} &\\displaystyle =&\\displaystyle \\mathbf{d} \\quad \\text{ on } \\Gamma_D, \\\\ \\nabla {\\mathbf{u}}^{k+1} \\cdot \\mathbf{n} &\\displaystyle =&\\displaystyle \\mathbf{g} \\quad \\text{ on } \\Gamma_N. \\end{array} \\end{aligned}\n\nIterations are typical stopped when the relative difference between iterates falls below a predefined tolerance in a suitable norm, like the L 2( Ω) or $$H^1_0(\\Omega )$$ norm.\n\n### 2.2 Model Description\n\nWe consider the reference computational domain shown in Fig. 1, which is decomposed into 36 triangular spectral elements. The spectral element expansion uses modal Legendre polynomials of the Koornwinder-Dubiner type of order p = 11 for the velocity. Details on the discretization method can be found in chapter 3.2 of . The pressure ansatz space is chosen of order p − 2 to fulfill the inf-sup stability condition [1, 20]. A parabolic inflow profile is prescribed at the inlet (i.e., x = 0) with horizontal velocity component u x(0, y) = y(3 − y) for y ∈ [0, 3]. At the outlet (i.e., x = 8) we impose a stress-free boundary condition, everywhere else we prescribe a no-slip condition.\n\nThe height of the narrowing in the reference configuration is μ = 1, from y = 1 to y = 2. See Fig. 1. Parameter μ is considered variable in the interval μ ∈ [0.1, 2.9]. The narrowing is shrunken or expanded as to maintain the geometry symmetric about line y = 1.5. Figures 2, 3, and 4 show the velocity components close to the steady state for μ = 1, 0.1, 2.9, respectively.\n\nThe viscosity is kept constant to ν = 1. For these simulations, the Reynolds number (6) is between 5 and 10, with maximum velocity in the narrowing as characteristic velocity U and the height of the narrowing characteristic length L. For larger Reynolds numbers (about 30), a supercritical pitchfork bifurcation occurs giving rise to the so-called Coanda effect [8, 9, 22], which is not subject of the current study. Our model is similar to the model considered in , i.e. an expansion channel with an inflow profile of varying height. However, in the computational domain itself does not change.\n\n## 3 Spectral Element Full Order Discretization\n\nThe Navier-Stokes problem is discretized with the spectral element method. The spectral/hp element software framework used is Nektar++ in version 4.4.0.Footnote 2 The discretized system of size N δ to solve at each step of the Oseen-iteration for fixed μ can be written as\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\begin{bmatrix} \\begin{array}{ccc} A & -D^T_{bnd} & B \\\\ -D_{bnd} & 0 & -D_{int} \\\\ \\tilde{B}^T & -D^T_{int} & C \\end{array} \\end{bmatrix} \\begin{bmatrix} \\begin{array}{ccc} {\\mathbf{v}}_{bnd} \\\\ \\mathbf{p} \\\\ {\\mathbf{v}}_{int} \\end{array} \\end{bmatrix} &= \\begin{bmatrix} \\begin{array}{ccc} {\\mathbf{f}}_{bnd} \\\\ \\mathbf{0} \\\\ {\\mathbf{f}}_{int} \\end{array} \\end{bmatrix}, {} \\end{array} \\end{aligned}\n(7)\n\nwhere v bnd and v int denote velocity degrees of freedom on the boundary and in the interior of the domain, respectively, while p denotes the pressure degrees of freedom. The forcing terms on the boundary and interior are denoted by f bnd and f int, respectively. The matrix A assembles the boundary-boundary coupling, B the boundary-interior coupling, $$\\tilde {B}$$ the interior-boundary coupling, and C assembles the interior-interior coupling of elemental velocity ansatz functions. In the case of a Stokes system, it holds that $$B = \\tilde {B}^T$$, but this is not the case for the Oseen equation because of the linearized convective term. The matrices D bnd and D int assemble the pressure-velocity boundary and pressure-velocity interior contributions, respectively.\n\nThe linear system (7) is assembled in local degrees of freedom, resulting in block matrices $$A, B, \\tilde {B}, C, D_{bnd}$$ and D int, each block corresponding to a spectral element. This allows for an efficient matrix assembly since each spectral element is independent from the others, but makes the system singular. In order to solve the system, the local degrees of freedom need to be gathered into the global degrees of freedom .\n\nThe high-order element solver Nektar++ uses a multilevel static condensation for the solution of linear systems like (7). Since static condensation introduces intermediate parameter-dependent matrix inversions (such as C −1 in this case) several intermediate projection spaces need to be introduced to use model order reduction . This can be avoided by instead projecting the expanded system (7) directly. The internal degrees of freedom do not need to be gathered, since they are the same in local and global coordinates. Only ansatz functions extending over multiple spectral elements need to be gathered.\n\nNext, we will take the boundary-boundary coupling across element interfaces into account. Let M denote the rectangular matrix which gathers the local boundary degrees of freedom into global boundary degrees of freedom. Multiplication of the first row of (7) by M T M will then set the boundary-boundary coupling in local degrees of freedom:\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\begin{bmatrix} \\begin{array}{ccc} M^T M A & -M^T M D^T_{bnd} & M^T M B \\\\ -D_{bnd} & 0 & -D_{int} \\\\ \\tilde{B}^T & -D^T_{int} & C \\end{array} \\end{bmatrix} \\begin{bmatrix} \\begin{array}{ccc} {\\mathbf{v}}_{bnd} \\\\ \\mathbf{p} \\\\ {\\mathbf{v}}_{int} \\end{array} \\end{bmatrix} &= \\begin{bmatrix} \\begin{array}{ccc} M^T M {\\mathbf{f}}_{bnd} \\\\ \\mathbf{0} \\\\ {\\mathbf{f}}_{int} \\end{array} \\end{bmatrix} . {} \\end{array} \\end{aligned}\n(8)\n\nThe action of the matrix in (8) on the degrees of freedom on the Dirichlet boundary is computed and added to the right hand side. Such degrees of freedom are then removed from (8). The resulting system can then be used in a projection-based ROM context , of high-order dimension N δ × N δ and depending on the parameter μ:\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\mathcal{A}(\\mu) \\mathbf{x}(\\mu) = \\mathbf{f}. {} \\end{array} \\end{aligned}\n(9)\n\n## 4 Reduced Order Model\n\nThe reduced order model (ROM) computes accurate approximations to the high-order solutions in the parameter range of interest, while greatly reducing the overall computational time. This is achieved by two ingredients. First, a few high-order solutions are computed and the most significant proper orthogonal decomposition (POD) modes are obtained . These POD modes define the reduced order ansatz space of dimension N, in which the system is solved. Second, to reduce the computational time, an offline-online computational procedure is used. See Sect. 4.1.\n\nThe POD computes a singular value decomposition of the snapshot solutions to 99.99% of the most dominant modes , which define the projection matrix $$U \\in \\mathbb {R}^{N_\\delta \\times N}$$ used to project system (9):\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} U^T \\mathcal{A}(\\mu) U {\\mathbf{x}}_N(\\mu) = U^T \\mathbf{f} . {} \\end{array} \\end{aligned}\n(10)\n\nThe low order solution x N(μ) then approximates the high order solution as x(μ) ≈ U x N(μ).\n\n### 4.1 Offline-Online Decomposition\n\nThe offline-online decomposition enables the computational speed-up of the ROM approach in many-query scenarios. It relies on an affine parameter dependency, such that all computations depending on the high-order model size can be moved into a parameter-independent offline phase, while having a fast input-output evaluation online.\n\nIn the example under consideration here, the parameter dependency is already affine and a mapping to the reference domain can be established without using an approximation technique such as the empirical interpolation method. Thus, there exists an affine expansion of the system matrix $$\\mathcal {A}(\\mu )$$ in the parameter μ as\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\mathcal{A}(\\mu) = \\sum_{i=1}^Q \\Theta_i(\\mu) \\mathcal{A}_i. {} \\end{array} \\end{aligned}\n(11)\n\nThe coefficients Θi(μ) are computed from the mapping $$\\mathbf {x} = T_k(\\mu ) \\hat {\\mathbf {x}} + {\\mathbf {g}}_k$$, $$T_k \\in \\mathbb {R}^{2 \\times 2}$$, $${\\mathbf {g}}_k \\in \\mathbb {R}^{2}$$, which maps the deformed subdomain $$\\hat {\\Omega }_k$$ to the reference subdomain Ωk. See also [19, 21]. Figure 5 shows the reference subdomains Ωk for the problem under consideration.\n\nFor each subdomain $$\\hat {\\Omega }_k$$ the elemental basis function evaluations are transformed to the reference domain. For each velocity basis function u = (u 1, u 2), v = (v 1, v 2), w = (w 1, w 2) and each (scalar) pressure basis function ψ, we can write the transformation with summation convention as:\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\int_{\\hat{\\Omega}_k} \\frac{\\partial \\hat{\\mathbf{u}}}{\\partial \\hat{x}_i} \\hat{\\nu}_{ij} \\frac{\\partial \\hat{\\mathbf{v}}}{\\partial \\hat{x}_j} d \\hat{\\Omega}_k &\\displaystyle =&\\displaystyle \\int_{\\Omega_k} \\frac{\\partial \\mathbf{u}}{\\partial x_i} \\nu_{ij} \\frac{\\partial \\mathbf{v}}{\\partial x_j} d \\Omega_k, \\\\ \\int_{\\hat{\\Omega}_k} \\hat{\\psi} \\nabla \\cdot \\hat{\\mathbf{u}} d \\hat{\\Omega}_k &\\displaystyle =&\\displaystyle \\int_{\\Omega_k} \\psi \\chi_{ij} \\frac{\\partial u_j}{\\partial x_i} d \\Omega_k, \\\\ \\int_{\\hat{\\Omega}_k} (\\hat{\\mathbf{u}} \\cdot \\nabla) \\hat{\\mathbf{v}} \\cdot \\hat{\\mathbf{w}} d \\hat{\\Omega}_k &\\displaystyle =&\\displaystyle \\int_{\\Omega_k} u_i \\pi_{ij} \\frac{\\partial v_j}{\\partial x_i} \\mathbf{w} d \\Omega_k, {} \\end{array} \\end{aligned}\n\nwith\n\n\\displaystyle \\begin{aligned} \\begin{array}{rcl} \\nu_{ij} &\\displaystyle =&\\displaystyle T_{ii'} \\hat{\\nu}_{i'j'} T_{jj'} \\det(T)^{-1}, \\\\ \\chi_{ij} &\\displaystyle =&\\displaystyle \\pi_{ij} = T_{ij} \\det(T)^{-1}. \\end{array} \\end{aligned}\n\nThe subdomain Ω5 (see Fig. 5) is kept constant, so that no interpolation of the inflow profile is necessary. To achieve fast reduced order solves, the offline-online decomposition expands the system matrix as in (11) and computes the parameter independent projections offline, which are stored as small-sized matrices of the order N × N. Since in an Oseen-iteration each matrix is dependent on the previous iterate, the submatrices corresponding to each basis function are assembled and then formed online using the reduced basis coordinate representation of the current iterate. This is the same procedure used for the assembly of the nonlinear term in the Navier-Stokes case .\n\n## 5 Numerical Results\n\nThe accuracy of the ROM is assessed using 40 snapshots sampled uniformly over the parameter domain [0.1, 2.9] for the POD and 40 randomly chosen parameter locations to test the accuracy. Figure 6 (left) shows the decay of the energy of the POD modes. To reach the typical threshold of 99.99% on the POD energy, it takes 9 POD modes as RB ansatz functions. Figure 6 (right) shows the relative L 2( Ω) approximation error of the reduced order model with respect to the full order model up to 6 digits of accuracy, evaluated at the 40 randomly chosen verification parameter locations. With 9 POD modes the maximum approximation error is less than 0.7% and the mean approximation error is less than 0.5%.\n\nWhile the full-order solves were computed with Nektar++, the reduced-order computations were done in ITHACA-SEM with a separate python code. To assess the computational gain, the time for a fixed point iteration step using the full-order system is compared to the time for a fixed point iteration step of the ROM with dimension 20, both done in python. The ROM online phase reduces the computational time by a factor of over 100. The offline time is dominated by computing the snapshots and the trilinear forms used to project the advection terms. See for detailed explanations.\n\n## 6 Conclusion and Outlook\n\nWe showed that the POD reduced basis technique generates accurate reduced order models for SEM discretized models under parametric variation of the geometry. The potential of a high-order spectral element method with a reduced basis ROM is the subject of current investigations. See also . Since each spectral element comprises a block in the system matrix in local coordinates, a variant of the reduced basis element method (RBEM) [14, 15] can be successfully applied in the future.\n\n## References\n\n1. Boffi, D., Brezzi F., Fortin, M.: Mixed Finite Element Methods and Applications. Springer Series in Computational Mathematics. Springer, Berlin (2013)\n\n2. Burger, M.: Numerical Methods for Incompressible Flow. Lecture Notes. UCLA, Los Angeles (2010)\n\n3. Cantwell, C.D., Moxey, D., Comerford, A., Bolis, A., Rocco, G., Mengaldo, G., de Grazia, D., Yakovlev, S., Lombard, J.-E., Ekelschot, D., Jordi, B., Xu, H., Mohamied, Y., Eskilsson, C., Nelson, B., Vos, P., Biotto, C., Kirby, R.M., Sherwin, S.J.: Nektar++: an open-source spectral/hp element framework. Comput. Phys. Commun. 192, 205–219 (2015)\n\n4. Canuto, C., Hussaini, M.Y., Quarteroni, A., Zhang, Th.A.: Spectral Methods Fundamentals in Single Domains. Scientific Computation. Springer, Berlin (2006)\n\n5. Canuto, C., Hussaini, M.Y., Quarteroni, A., Zhang, Th.A.: Spectral Methods Evolution to Complex Geometries and Applications to Fluid Dynamics. Scientific Computation. Springer, Berlin (2007)\n\n6. Fick, L., Maday, Y., Patera A., Taddei T.: A stabilized POD model for turbulent flows over a range of Reynolds numbers: optimal parameter sampling and constrained projection. J. Comput. Phys. 371, 214–243 (2018)\n\n7. Herrero, H., Maday, Y., Pla, F.: RB (Reduced Basis) for RB (Rayleigh–Bénard). Comput. Meth. Appl. Mech. Eng. 261–262, 132–141 (2013)\n\n8. Hess, M.W., Rozza, G.: A spectral element reduced basis method in parametric CFD. In: Numerical Mathematics and Advanced Applications ENUMATH 2017. Springer, Berlin (2018, in press). E-print arXiv:1712.06432\n\n9. Hess, M.W., Alla, A., Quaini, A., Rozza, G., Gunzburger, M.: A localized reduced-order modeling approach for PDEs with bifurcating solutions. In: Computer Methods in Applied Mechanics and Engineering (CMAME) (2019, accepted for publication). E-print. arXiv:1807.08851\n\n10. Hesthaven, J.S., Rozza, G., Stamm, B.: Certified Reduced Basis Methods for Parametrized Partial Differential Equations. SpringerBriefs in Mathematics. Springer, Berlin (2016)\n\n11. Holmes, P., Lumley, J., Berkooz, G.: Turbulence, Coherent Structures, Dynamical Systems and Symmetry. Cambridge University Press, Cambridge (1996)\n\n12. Karniadakis, G., Sherwin, S.: Spectral/hp Element Methods for Computational Fluid Dynamics, 2nd edn. Oxford University Press, Oxford (2005)\n\n13. Lassila, T., Manzoni, A., Quarteroni, A., Rozza, G.: Model order reduction in fluid dynamics: Challenges and perspectives. In: Quarteroni, A., Rozza, G. (eds.) Reduced Order Methods for Modelling and Computational Reduction. MS&A Modeling, Simulation and Applications, vol. 9, pp. 235–273. Springer International Publishing, Cham (2014)\n\n14. Lovgren, A.E., Maday, Y, Ronquist, E.M.: A reduced basis element method for the steady Stokes problem. ESAIM: Math. Model. Numer. Anal. 40(3), 529–552 (2006)\n\n15. Maday, Y., Ronquist, E.M.: A reduced-basis element method. Comptes Rendus Math. 335(2), 195–200 (2002)\n\n16. Patera, A.T.: A spectral element method for fluid dynamics; laminar flow in a channel expansion. J. Comput. Phys. 54(3), 468–488 (1984)\n\n17. Pitton, G., Rozza, G.: On the application of reduced basis methods to bifurcation problems in incompressible fluid dynamics. J. Sci. Comput. 73, 157–177 (2017)\n\n18. Pitton, G., Quaini, A., Rozza, G.: Computational reduction strategies for the detection of steady bifurcations in incompressible fluid-dynamics: applications to Coanda effect in cardiology. J. Comput. Phys. 344, 534–557 (2017)\n\n19. Quarteroni, A., Rozza, G.: Numerical solution of parametrized Navier-Stokes equations by reduced basis methods. Num. Meth. Part. Diff. Eq. 23(4), 923–948 (2007)\n\n20. Quarteroni, A., Valli, A.: Numerical Approximation of Partial Differential Equations. Springer, Berlin (1994)\n\n21. Rozza, G.: Real-time reduced basis solutions for Navier-Stokes equations: optimization of parametrized bypass configurations. In: ECCOMAS CFD 2006 Proceedings on CD, vol. 676, pp. 1–16 (2006)\n\n22. Wille, R., Fernholz, H.: Report on the first European mechanics colloquium, on the Coanda effect. J. Fluid Mech. 23(4), 801–819 (1965)\n\n## Acknowledgements\n\nThis work was supported by European Union Funding for Research and Innovation through the European Research Council (project H2020 ERC CoG 2015 AROMA-CFD project 681447, P.I. Prof. G. Rozza). This work was also partially supported by NSF through grant DMS-1620384 (Prof. A. Quaini).\n\n## Author information\n\nAuthors\n\n### Corresponding author\n\nCorrespondence to Martin W. Hess ." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.74854016,"math_prob":0.9841144,"size":4483,"snap":"2022-27-2022-33","text_gpt3_token_len":1361,"char_repetition_ratio":0.17749497,"word_repetition_ratio":0.036697246,"special_character_ratio":0.29422262,"punctuation_ratio":0.115384616,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99806863,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-25T00:20:47Z\",\"WARC-Record-ID\":\"<urn:uuid:c3620890-91e2-4275-9c2c-976d85025230>\",\"Content-Length\":\"172714\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0a8c47b1-dfc0-4f16-83d3-6a67ab3272bd>\",\"WARC-Concurrent-To\":\"<urn:uuid:b088e7e6-f9f6-401f-85fb-543a10e14718>\",\"WARC-IP-Address\":\"146.75.32.95\",\"WARC-Target-URI\":\"https://link.springer.com/chapter/10.1007/978-3-030-39647-3_45\",\"WARC-Payload-Digest\":\"sha1:7AI2ME4XL2IFYXKWMYUGZHUBS3WXCPLY\",\"WARC-Block-Digest\":\"sha1:URUJN45HNHRFLF44DFZG46BFUJ2QQOYS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103033816.0_warc_CC-MAIN-20220624213908-20220625003908-00718.warc.gz\"}"}
https://stats.stackexchange.com/questions/186203/effect-of-covariates-distribution-on-linear-regression/186325
[ "# Effect of covariates distribution on linear regression\n\nIf the covariates $X_1,X_2$ are distributed as follows, what effect does it have on the linear model $y = \\beta_0 + \\beta_1 X_1 + \\beta_2 X_2$\n\n$X_1,X_2$ do not seem to exhibit a strong correlation, so collinearity can be ruled out.", null, "• think about outliers – Christoph Hanck Dec 11 '15 at 9:05\n• It would be illuminating to remove the outliers, fit a regression, put them back, fit another. – Matthew Drury Dec 11 '15 at 18:49\n\nNot to be overly pedantic, but those 'outliers' visible in the graph of $X_1, X_2$ scatterplot are not what we normally refer to as outliers in the context of regression. For regression, outliers are observations with large (absolute value) residuals. When you have combinations of explanatory variables ($X_1, X_2$) that fall outside the pattern of most observations, these are INFLUENTIAL points. They have an abnormally high influence on estimation of the slopes in your model (and on the predictions given by your model when you extrapolate).\n\nThese are also called high-leverage observations. For instance consider the data:\n\nx1 = c(15, 15, 22, 17, 10, 15, 23, 9, 18, 19, 60, 15)\nx2 = c(27, 21, 35, 16, 17, 20, 19, 30, 17, 27, 30, 80)\ny = c(11.9, 15.7, 18.4, 9.6, 7.4, 11, 16.9, 12.8, 11, 12.7, 24.5,\n22.5)\n\n\nHere, there are extreme (explanatory) values at (60, 30) and (15, 80), so these are high influence observations. A slight change in the y value at these locations will have a big influence on the fitted value.\n\n> summary(lm(y~x1+x2))\n\nCoefficients:\nEstimate Std. Error t value Pr(>|t|)\n(Intercept) 4.06440 1.60958 2.525 0.032494 *\nx1 0.25994 0.05067 5.130 0.000619 ***\nx2 0.18809 0.03868 4.863 0.000892 ***\n---\nSignif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\n\nResidual standard error: 2.236 on 9 degrees of freedom\nMultiple R-squared: 0.8491, Adjusted R-squared: 0.8156\nF-statistic: 25.32 on 2 and 9 DF, p-value: 0.0002013\n\n> y\n 24.5\n> y = 10\n> summary(lm(y~x1+x2))\n\nCoefficients:\nEstimate Std. Error t value Pr(>|t|)\n(Intercept) 8.91261 2.23551 3.987 0.00317 **\nx1 -0.03901 0.07037 -0.554 0.59283\nx2 0.18358 0.05372 3.417 0.00766 **\n---\nSignif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\n\nResidual standard error: 3.105 on 9 degrees of freedom\nMultiple R-squared: 0.5701, Adjusted R-squared: 0.4746\nF-statistic: 5.968 on 2 and 9 DF, p-value: 0.02239\n\n> y\n 22.5\n> y = 10\n> summary(lm(y~x1+x2))\n\nCoefficients:\nEstimate Std. Error t value Pr(>|t|)\n(Intercept) 12.665278 2.577255 4.914 0.000831 ***\nx1 -0.004558 0.081130 -0.056 0.956426\nx2 -0.010320 0.061933 -0.167 0.871340\n---\nSignif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\n\nResidual standard error: 3.58 on 9 degrees of freedom\nMultiple R-squared: 0.003453, Adjusted R-squared: -0.218\nF-statistic: 0.01559 on 2 and 9 DF, p-value: 0.9846\n\n\nIf I changed the y value at another location (low leverage) I'll get little change in the model:\n\n > summary(lm(y~x1+x2))\n\nCoefficients:\nEstimate Std. Error t value Pr(>|t|)\n(Intercept) 12.665278 2.577255 4.914 0.000831 ***\nx1 -0.004558 0.081130 -0.056 0.956426\nx2 -0.010320 0.061933 -0.167 0.871340\n---\nSignif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\n\nResidual standard error: 3.58 on 9 degrees of freedom\nMultiple R-squared: 0.003453, Adjusted R-squared: -0.218\nF-statistic: 0.01559 on 2 and 9 DF, p-value: 0.9846\n\n> y\n 7.4\n> y = -3\n> summary(lm(y~x1+x2))\n\nCoefficients:\nEstimate Std. Error t value Pr(>|t|)\n(Intercept) 9.79553 4.22547 2.318 0.0456 *\nx1 0.04734 0.13302 0.356 0.7301\nx2 0.02415 0.10154 0.238 0.8173\n---\nSignif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\n\nResidual standard error: 5.87 on 9 degrees of freedom\nMultiple R-squared: 0.0202, Adjusted R-squared: -0.1975\nF-statistic: 0.09277 on 2 and 9 DF, p-value: 0.9123\n\n\nThere are two outliers one on the top right and one on the bottom left. They are outliers considering $(X_1,X_2)$ together but not individually.\n\nSince determining the coefficients requires minimizing the squared error, presence of outliers will affect the magnitude of the coefficients." ]
[ null, "https://i.stack.imgur.com/1h8qp.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.74268097,"math_prob":0.98448074,"size":4062,"snap":"2019-43-2019-47","text_gpt3_token_len":1614,"char_repetition_ratio":0.097585015,"word_repetition_ratio":0.41238672,"special_character_ratio":0.48104382,"punctuation_ratio":0.23874755,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9915913,"pos_list":[0,1,2],"im_url_duplicate_count":[null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-22T08:34:43Z\",\"WARC-Record-ID\":\"<urn:uuid:a3a1be49-7d16-408c-be76-e0b3192c0b4e>\",\"Content-Length\":\"143343\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0abaf3ef-0166-4aac-82ca-a33f9d5f3fbd>\",\"WARC-Concurrent-To\":\"<urn:uuid:a6db62e4-b417-486a-8bf7-fcf31e46c896>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/186203/effect-of-covariates-distribution-on-linear-regression/186325\",\"WARC-Payload-Digest\":\"sha1:6D7AQNXY7WY6BRLRXKXBSFW25RJLNXNI\",\"WARC-Block-Digest\":\"sha1:ZFU2AVFBP4ZKFCNGQ54UFIQIWRCJR6I6\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496671245.92_warc_CC-MAIN-20191122065327-20191122093327-00495.warc.gz\"}"}
https://blog.flyingcoloursmaths.co.uk/converting-radians-to-degrees-precisely/
[ "Some while ago, I covered how to convert degrees into radians (and vice versa) in your head. I missed a trick, though: I didn’t tell you about the exact values, which would probably have been a bit more useful.\n\nBy definition, a circle – 360º – is 2π radians, which (hopefully obviously) means that a semicircle – 180º, keep up – is π radians. That’s a handy thing to know.\n\n## Getting into degrees\n\nThis is the wrong way! As I’ve said before, degrees are far inferior to radians in every possible application. But still, I imagine you might want to go back to baby-angles once in a while.\n\nYou’ll quite often see an angle given in radians as some fraction of π – π/6 or 3π/2 or similar. It’s pretty easy to turn those into degrees: if you’re good with fractions, just replace the π with 180 and work it out: π/6 becomes 180/6 = 30º. 3π/2 becomes 3 × 180 / 2 = 3 × 90 = 270º ((If you prefer, you can do that as 540 / 2 = 270, but I prefer dividing first. Small numbers are easier to work with.)).\n\nIf you don’t like fractions, I’ll sit here and roll my eyes a bit, then tell you that if there’s a number on top of the fraction, you times by it; and then you divide by the number on the bottom. Meanwhile, I’ll line up a Teletubbies DVD for you or something. You’re an A-level student, you need to be able to work with fractions.\n\nAh, that’s better. Turning things into radians is, of course, the way forward. It’s a simple three-step process:\n\n1. Put 180 under your degree angle, making it a fraction – 300º becomes 300/180\n2. Cancel down your fraction (here, there’s a factor of 60): 5/3\n3. Put a π either on top or next to the fraction – you can write $\\frac{5\\pi}3$ or $\\frac53 \\pi$. ((Avoid, please, 5/6π. That’s technically correct, but can easily be misread as 5/(6π). If you have to fall back on ‘it’s technically correct’, you’re doing it wrong.))\n\nAnd that’s it. Of course, it’s worth knowing the more common ones off the top of your head:\n\n• π/6 is 30º\n• π/4 is 45º\n• π/3 is 60º\n• π/2 is 90º\n\nThanks to @C_J_Smith for pointing out a mistake in the original version." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.900799,"math_prob":0.90537125,"size":2202,"snap":"2022-27-2022-33","text_gpt3_token_len":612,"char_repetition_ratio":0.102365784,"word_repetition_ratio":0.0,"special_character_ratio":0.30154404,"punctuation_ratio":0.11608961,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9566305,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-07-06T22:27:28Z\",\"WARC-Record-ID\":\"<urn:uuid:380f8931-3699-41cb-9c45-27ce08be87c9>\",\"Content-Length\":\"10068\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a3703e55-8033-497d-a34a-dd28444e50dc>\",\"WARC-Concurrent-To\":\"<urn:uuid:f5f2ad0b-ca87-4ad7-8f60-c5b5feb57ff2>\",\"WARC-IP-Address\":\"23.83.135.74\",\"WARC-Target-URI\":\"https://blog.flyingcoloursmaths.co.uk/converting-radians-to-degrees-precisely/\",\"WARC-Payload-Digest\":\"sha1:ZJL3WJFE5K52RGWAHVYBIIGZL7RPC46E\",\"WARC-Block-Digest\":\"sha1:CDLJHRVYGLBAF2FWREBPFVPS7N6H3JKI\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656104678225.97_warc_CC-MAIN-20220706212428-20220707002428-00380.warc.gz\"}"}
https://www.renesas.com/sg/en/support/technical-resources/engineer-school/electronic-circuits-01-passive-elements.html
[ "Everything\nSingapore/South & Southeast Asia/Oceania", null, "# Passive Elements\n\nIntroduction to Electronic Circuits: 1 of 3\n\nThe electronic devices we encounter all around us are driven and controlled by the flow of electrical current through electronic circuits. Each circuit is an arrangement of electrical elements designed to perform specific functions. Circuits can be engineered to carry out a wide variety of operations, from simple actions to complex tasks, according to the job(s) the system must perform.\n\nLet's begin by looking at how the key passive elements found in most electronic circuits work.\n\nA passive element is an electrical component that does not generate power, but instead dissipates, stores, and/or releases it. Passive elements include resistances, capacitors, and coils (also called inductors). These components are labeled in circuit diagrams as Rs, Cs and Ls, respectively. In most circuits, they are connected to active elements, typically semiconductor devices such as amplifiers and digital logic chips.\n\n## Resistors\n\nA resistor is a primary type of physical component that is used in electronic circuits. It has two (interchangeable) leads. The material placed internally between the two leads of a resistor opposes (restricts) the flow of current. The amount of that opposition is called its resistance, which is measured in ohms (Ω). Resistors are used to control the various currents in areas of a circuit and to manage voltage levels at different points therein by producing voltage drops. When a voltage is applied across a resistor, current flows through it. Ohm's law for resistors is E = IR, where E is the voltage across the resistor, R is the resistance of the resistor, and I is the current flowing through the resistor. That current is proportional to the applied voltage, and inversely proportional to the resistance. Thus, as resistance goes up, the current through the element comes down, so that at high resistances the current is very small.\n\nOhm's law makes it possible to calculate any one of three circuit values (current, voltage, or resistance) from the other two.\n\n## Capacitors\n\nA capacitor is another primary type of physical component used in electronic circuits. It has two leads and is used to store and release electric charge. A capacitor's ability to store charge is referred to as its capacitance, measured in farads (F).\n\nA typical capacitor takes the form of two conductive plates separated by an insulator (dielectric). This type of circuit element cannot pass direct current (DC) because electrons cannot flow through the dielectric. However, a capacitor does pass alternating current (AC) because an alternating voltage causes the capacitor to repeatedly charge and discharge, storing and releasing energy. Indeed, one of the major uses of capacitors is to pass alternating current while blocking direct current, a function called 'AC coupling'.\n\nWhen a direct current flows into a capacitor, a positive charge rapidly builds up on the positive plate and a corresponding negative charge fills the negative plate (see Figure 1). The buildup continues until the capacitor is fully charged—i.e., when the plates have accumulated as much charge (Q) as they can hold. This amount is determined by the capacitance value (C) and the voltage applied across the component: (Q = CV). At that point, current stops flowing (see Figure 2).", null, "Figure 1: The capacitor is charging / Figure 2: The capacitor is charged (and stable)\n\nWhen an alternating current flows through the circuit, the result is quite different, though.\n\nBecause the AC current is continuously changing, the capacitor is repeatedly charging and discharging (see Figure 3). Despite the fact that the dielectric in the capacitor does not pass any electrons, a current—which in this case is called a displacement current—effectively moves through the capacitor. The capacitor's opposition to alternating current is called its capacitive reactance, which, like resistance, is measured in ohms (Ω).", null, "Figure 3: Repeatedly charging and discharging\n\n## Coils\n\nA coil, also called an inductor, is yet another primary type of physical component that is used in electronic circuits. It has two leads and is typically implemented as one or more windings (loops) of conductive wire. That wire is often but not necessarily formed around a core of iron or steel or some other magnetic material. Current through the coil induces a magnetic field that serves as a store of energy. Inductance is measured in henries (H).\n\nMore specifically, a current flowing through a wire generates a magnetic field, the direction of which is to the right relative to the flow of the current, as described by the 'right-hand rule' (see Figure 4). If the wire is coiled, the fluxes are in alignment. According to Lenz's law, changes in the coil's magnetic field generate a counter-electromotive force (and an induced current) that opposes those changes. Thus, coils can be used in electronic circuits to restrict the flow of alternating current while allowing direct current to pass.", null, "Figure 4: Current and magnetic field\n\nRight-Hand Rule:\n\nCurrent (I) flowing through a conductor produces a magnetic field (B) that circles to the right around the conductor.", null, "Figure 5: Lenz's Law: The induced current in a coil flows in a manner that opposes changes in the number of lines of magnetic force through the coil.\n\n## Filter Circuits (HPFs and LPFs)\n\nA filter circuit is an electrical function made from connected elements that is used to eliminate unwanted electrical signals while allowing wanted signals of specific frequencies to pass. A common type of filter circuit, for example, is an RC-series circuit, in which a resistance and capacitance are connected in series.\n\nRC filters can implement either a high-pass filter (HPF) or a low-pass filter (LPF). An RC filter in which the voltage drop across the resistor (Vr) is taken as the output will pass the high-frequency voltage signals from the input, while filtering out (attenuating) the input's low frequencies (see Figure 6.) By contrast, an RC filter in which the voltage drop across the capacitor (Vc) is taken as the output will allow the low- frequency components of the input signal to get through, but reduce or eliminate the high frequencies (see Figure 7).", null, "Figure 6: High-pass filter (HPF) / Figure 7: Low-pass filter (LPF)\n\n## Module List\n\n1. Passive Elements\n2. Diodes, Transistors, and FETs\n3. Op-Amps, Comparator Circuit" ]
[ null, "https://www.renesas.com/etc/designs/www/common/img/btn_close.png", null, "https://www.renesas.com/img/misc/engineer-school/capacitor-charge-direct-en.jpg", null, "https://www.renesas.com/img/misc/engineer-school/capacitor-charge-alternating-en.jpg", null, "https://www.renesas.com/img/misc/engineer-school/coil-magnetic-en.jpg", null, "https://www.renesas.com/img/misc/engineer-school/coil-lenz-en.jpg", null, "https://www.renesas.com/img/misc/engineer-school/filter-circuit-en.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9480667,"math_prob":0.9472937,"size":5852,"snap":"2019-51-2020-05","text_gpt3_token_len":1182,"char_repetition_ratio":0.14380985,"word_repetition_ratio":0.051557466,"special_character_ratio":0.19326726,"punctuation_ratio":0.09818875,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98003775,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12],"im_url_duplicate_count":[null,null,null,5,null,5,null,5,null,5,null,5,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-12-08T19:56:05Z\",\"WARC-Record-ID\":\"<urn:uuid:08ee3967-f7b9-4fb8-bb5c-b47c13c23721>\",\"Content-Length\":\"87330\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b9ac3c43-77b3-4469-a591-b15fc601ad83>\",\"WARC-Concurrent-To\":\"<urn:uuid:ee585431-fad6-4e8b-8c2f-5591d524fb7a>\",\"WARC-IP-Address\":\"104.108.97.80\",\"WARC-Target-URI\":\"https://www.renesas.com/sg/en/support/technical-resources/engineer-school/electronic-circuits-01-passive-elements.html\",\"WARC-Payload-Digest\":\"sha1:ABBIJICKYDPRUWMCCOQ2ULHLDRNCWDHS\",\"WARC-Block-Digest\":\"sha1:EAIMIHRGVP7R4E7EWEGX7WPHIYDPMTG2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-51/CC-MAIN-2019-51_segments_1575540514475.44_warc_CC-MAIN-20191208174645-20191208202645-00156.warc.gz\"}"}
https://support.onscale.com/hc/en-us/articles/360005563918-Calculating-Energy-Dissipation-with-CALC-LOSS
[ "# Calculating Energy Dissipation with CALC LOSS\n\n## How to use Calc loss?\n\nThe calc loss command computes accumulated energy dissipation per unit volume.\n\nCommand can be issued before the PRCS step or at any time during the calculation.\n\nNote: This command is currently implemented only for VDMP, SDMP, MDMP, RDMP and NWTN damping models. Implemented for small deformation 2D axisymmetric, 2D plane strain and 3D processors.\n\n```c Calculations\ncalc\n/* Request required arrays\nstrs\nstrn\nloss inc\npres\n\n/* Dissipated energy: Use avrg command to sum loss in array\navrg avloss loss volume regn \\$i1 \\$i2 \\$j1 \\$j2\n\n/* Lateral energy: Energy lost through side\nbwork brig \\$i2 \\$i2 \\$j1 \\$j2\n\nend\n```\n\nOptions: The calc loss command can be followed by any of ON, OFF or INC options:\n\n• ON = compute energy loss during following time execution commands\n• OFF = do not compute energy loss during following time execution commands\n• INC = store the strain components needed for computing loss due to stiffness damping\n\nDefault = ON.\n\nThis command integrates the power dissipation per unit volume from the time an ON command is issued until an OFF command is encountered. When an ON command is encountered, the accumulated value is reset to zero.\n\nThe dissipated energy per unit volume values are stored in the LOSS (i,j,k) array. Where the ijk-indices are elemental indicies.\n\nThe strain components needed for computing loss due to stiffness damping are stored in arrays LSSHR(i,j,k) - shear damping coefficient, LSBLK(i,j,k) - bulk damping coefficient, LSD11(i,j,k), LSD22(i,j,k), LSD33(i,j,k), LSD12(i,j,k), LSD13(i,j,k), LSD23(i,j,k) - strain increments, LSTS(i,j,k) - timestep. Outputting in this format is useful for computing loss in the frequency domain. This is currently stored only for loss due to stiffness damping (SDMP).\n\n## Example Model", null, "The following ultrasonic sensor example model calculates:\n\n• Input electrical power via integration of Voltage * Current\n• Dissipated energy via CALC LOSS\n• Lateral leakage via CALC BWORK", null, "We can verify that the total input energy is equal to the calculated energies and losses.\n\nResult:\n\n************************************************************************\n\nTotal sum of energies calculated 0.2900360E-08 Joules\n\nEnergy lost through heat 0.5148639E-09 Joules\n\nEnergy lost through sides 0.1718449E-08 Joules\n\nPercentage lost as heat 17.75172 %\n\nPercentage lost to sides 59.24951 %\n\n************************************************************************\n\nPost-process review script:\n\n```/* Read history file\n\n/* Time Histories Saved into the flxhst file\n/* Loss through model boundaries\nc f1 3:'bwright'\nc f1 4:'bwleft'\nc f1 5:'bwbottom'\nc f1 6:'bwtop'\n\n/* Loss through model boundaries\nc f1 7:'voltage'\nc f1 8:'charge'\nc f1 9:'current'\n\n/* Calculation of 4 types of Energies\nc f1 13:'kinenrg'\nc f1 14:'elasenrg'\nc f1 15:'dielenrg'\nc f1 16:'coupenrg'\n\n/* Average loss on all the model\nc 20:'aloss'\n\n/* Area scaling\nsymb ascal = 1.0\n\nc Calculate total energy delivered\nmake\nfile f2\ncurv { f1 7 } * { f1 9 }\ncurv intg { f2 1 } /* Integration of UI to obtain input power\nend\n\nmake\n\nfile f3\n/* Calculate total energy from energies, loss and boundary losses\ncurv \\$ascal * ( { f1 14 } + { f1 15 } + { f1 16 } + { f1 13 } + { f1 20 } + { f1 3 } + { f1 4 } + { f1 5 } + { f1 6 } )\n/* Calculate Loss through sides only\ncurv \\$ascal * ( { f1 3 } + { f1 4 } + { f1 5 } + { f1 6 } )\n/* Calculate sum of 4 energies (kinenrg, elasenrg, dielenrg, coupenrg)\ncurv \\$ascal * ( { f1 14 } + { f1 15 } + { f1 16 } + { f1 13 } )\n\nend\n\ngrph\nnvew 1\npset clab 1 'Input Power'\npset clab 2 'Total Sum of Energies and Losses'\nplot f2 2 f3 1\nend\n\n/* Calculate efficiency\nsymb #get { * entot } curvmax f3 1\nsymb #get { * enside } curvmax f3 2\nsymb #get { * enloss } curvmax f1 20\n\nsymb ensum = \\$entot - \\$enside - \\$enloss\n\nsymb pcloss = 100. * \\$enloss / \\$entot\nsymb pcside = 100. * \\$enside / \\$entot\nsymb econ = 100. * \\$ensum / \\$entot\n\n/* Display results\nsymb #msg 10\n************************************************************************\nTotal sum of energies calculated \\$entot Joules\nEnergy lost through heat \\$enloss Joules\nEnergy lost through sides \\$enside Joules\n\nPercentage lost as heat \\$pcloss %\nPercentage lost to sides \\$pcside %\n************************************************************************\n\nterm\n```" ]
[ null, "https://support.onscale.com/hc/article_attachments/360006886337/2020-03-11_18-26-56.png", null, "https://support.onscale.com/hc/article_attachments/360006970538/2020-03-11_18-33-09.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.5700494,"math_prob":0.8492222,"size":4349,"snap":"2020-45-2020-50","text_gpt3_token_len":1181,"char_repetition_ratio":0.18457998,"word_repetition_ratio":0.159618,"special_character_ratio":0.34881583,"punctuation_ratio":0.11640212,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9829584,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,4,null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-24T12:20:35Z\",\"WARC-Record-ID\":\"<urn:uuid:2f5dbb2d-1169-4ee0-bc6c-3aeeb3d36c8e>\",\"Content-Length\":\"43962\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:36afe916-593c-4340-a9dd-b3fc58c2e305>\",\"WARC-Concurrent-To\":\"<urn:uuid:f9362b6c-f6e9-426d-b0b3-4e5fe6b35724>\",\"WARC-IP-Address\":\"104.16.51.111\",\"WARC-Target-URI\":\"https://support.onscale.com/hc/en-us/articles/360005563918-Calculating-Energy-Dissipation-with-CALC-LOSS\",\"WARC-Payload-Digest\":\"sha1:FZLDHCWGZEP2THL7ZCK32JAIVHASWJR2\",\"WARC-Block-Digest\":\"sha1:7P4L3NLXT2KRRVS2LK7LTBJNNQJURR5I\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141176256.21_warc_CC-MAIN-20201124111924-20201124141924-00029.warc.gz\"}"}
https://calcforme.com/percentage-calculator/what-is-74-percent-of-464
[ "# What is 74% of 464?\n\n## 74 percent of 464 is equal to 343.36\n\n%\n\n74% of 464 equal to 343.36\n\nCalculation steps:\n\n( 74 ÷ 100 ) x 464 = 343.36\n\n### Calculate 74 Percent of 464?\n\n• F\n\nFormula\n\n(74 ÷ 100) x 464 = 343.36\n\n• 1\n\nPercent to decimal\n\n74% to decimal is 74 ÷ 100 = 0.74\n\n• 2\n\nMultiply decimal with the other number\n\n0.74 x 464 = 343.36\n\nExample" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.69663566,"math_prob":0.99988914,"size":227,"snap":"2022-27-2022-33","text_gpt3_token_len":92,"char_repetition_ratio":0.19730942,"word_repetition_ratio":0.0,"special_character_ratio":0.5506608,"punctuation_ratio":0.13207547,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99968743,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-25T01:30:19Z\",\"WARC-Record-ID\":\"<urn:uuid:11b87b15-69de-4050-9ed4-f973c66545ee>\",\"Content-Length\":\"14834\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:435addba-f235-41a0-89ec-3b0491d2010d>\",\"WARC-Concurrent-To\":\"<urn:uuid:ab61d1fe-2e78-4dea-8bcd-d30a58176978>\",\"WARC-IP-Address\":\"76.76.21.123\",\"WARC-Target-URI\":\"https://calcforme.com/percentage-calculator/what-is-74-percent-of-464\",\"WARC-Payload-Digest\":\"sha1:6CJALTZCXKHUEMZRPCAJR7OVLXAUWLNC\",\"WARC-Block-Digest\":\"sha1:LT5UG7XJT5QLWS74BAN3MMPFQQC266KN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103033925.2_warc_CC-MAIN-20220625004242-20220625034242-00544.warc.gz\"}"}
https://www.meritnation.com/cbse-class-12-humanities/math/cbse-class-12-math-board-paper-2017-delhi-set-2-solutions/board-papers/starttest/qB6kcSEetvng0HSGYyJKgg!!
[ "Select Board & Class\n\n# Board Paper of Class 12-Humanities 2017 Maths (SET 2) - Solutions\n\nGeneral Instructions:\n(i) All questions are compulsory.\n(ii) This question paper contains 29 questions.\n(iii) Questions 1- 4 in Section A are very short-answer type questions carrying 1 mark each.\n(iv) Questions 5-12 in Section B are short-answer type questions carrying 2 marks each.\n(v) Questions 13-23 in Section C are long-answer I type questions carrying 4 marks each.\n(vi) Questions 24-29 in Section D are long-answer II type questions carrying 6 marks each.\n• Question 1\nIf a line makes angles 90° and 60° respectively with the positive directions of x and y axes, find the angle which it makes with the positive direction of z-axis. VIEW SOLUTION\n• Question 3\nIf A is a 3 × 3 invertible matrix, then what will be the value of k if det(A–1) = (det A)k. VIEW SOLUTION\n• Question 4\nDetermine the value of the constant 'k' so that function  is continuous at x = 0. VIEW SOLUTION\n• Question 5\nProve that if E and F are independent events, then the events E and F' are also independent. VIEW SOLUTION\n• Question 6\nA small firm manufactures necklaces and bracelets. The total number of necklaces and bracelets that it can handle per day is at most 24. It takes one hour to make a bracelet and half an hour to make a necklace. The maximum number of hours available per day is 16. If the profit on a necklace is Rs 100 and that on a bracelet is Rs 300. Formulate on L.P.P. for finding how many of each should be produced daily to maximize the profit?\nIt is being given that at least one of each must be produced. VIEW SOLUTION\n• Question 7\nFind $\\int \\frac{\\mathrm{d}x}{{x}^{2}+4x+8}$ VIEW SOLUTION\n• Question 8\nShow that all the diagonal elements of a skew symmetric matrix are zero. VIEW SOLUTION\n• Question 10\nShow that the function $f\\left(x\\right)=4{x}^{3}-18{x}^{2}+27x-7$ is always increasing on $\\mathrm{ℝ}$. VIEW SOLUTION\n• Question 11\nFind the vector equation of the line passing through the point A(1, 2, –1) and parallel to the line 5x – 25 = 14 – 7y = 35z. VIEW SOLUTION\n• Question 12\nFor the curve y = 5x – 2x3, if x increases at the rate of 2 units/sec, then fine the rate of change of the slope of the curve when x = 3. VIEW SOLUTION\n• Question 14\nProve that x2 – y2 = c(x2 + y2)2 is the general solution of the differential equation (x3 – 3xy2)dx = (y3 – 3x2y)dy, where C is parameter. VIEW SOLUTION\n• Question 15\nLet $\\stackrel{\\to }{\\mathrm{a}}=\\stackrel{^}{\\mathrm{i}}+\\stackrel{^}{\\mathrm{j}}+\\stackrel{^}{\\mathrm{k}},\\text{\\hspace{0.17em}}\\stackrel{\\to }{\\mathrm{b}}=\\stackrel{^}{\\mathrm{i}}$ and $\\stackrel{\\to }{\\mathrm{c}}={\\mathrm{c}}_{1}\\stackrel{^}{\\mathrm{i}}+{\\mathrm{c}}_{2}\\stackrel{^}{\\mathrm{j}}+{\\mathrm{c}}_{3}\\stackrel{^}{\\mathrm{k}},$ then\n\n(a) Let c1 = 1 and c2 = 2, find c3 which makes $\\stackrel{\\to }{\\mathrm{a}},\\text{\\hspace{0.17em}}\\stackrel{\\to }{\\mathrm{b}}$ and $\\stackrel{\\to }{\\mathrm{c}}$ coplanar.\n\n(b) If c2 = –1 and c3 = 1, show that no value of c1 can make $\\stackrel{\\to }{\\mathrm{a}},\\text{\\hspace{0.17em}}\\stackrel{\\to }{\\mathrm{b}}$ and $\\stackrel{\\to }{\\mathrm{c}}$ coplanar. VIEW SOLUTION\n• Question 16\nOften it is taken that a truthful person commands, more respect in the society. A man is known to speak the truth 4 out of 5 times. He throws a die and reports that it is a six. Find the probability that it is actually a six.\nDo you also agree that the value of truthfulness leads to more respect in the society? VIEW SOLUTION\n• Question 18\nUsing properties of determinants, prove that $\\left|\\begin{array}{ccc}x& x+y& x+2y\\\\ x+2y& x& x+y\\\\ x+y& x+2y& x\\end{array}\\right|=9{y}^{2}\\left(x+y\\right).$\n\nOR\n\nLet , find a matrix D such that CD − AB = O. VIEW SOLUTION\n• Question 19\nDifferentiate the function with respect to x.\n\nOR\n\nIf ${x}^{m}{y}^{n}={\\left(x+y\\right)}^{m+n}$, prove that $\\frac{{d}^{2}y}{d{x}^{2}}=0$. VIEW SOLUTION\n• Question 20\nThe random variable X can take only the values 0, 1, 2, 3. Given that P(2) = P(3) = p and P(0) = 2P(1). If $\\mathrm{\\Sigma }{p}_{\\mathit{i}}{x}_{i}^{2}=2\\mathrm{\\Sigma }{p}_{\\mathit{i}}{x}_{\\mathit{i}}$, find the value of p. VIEW SOLUTION\n• Question 21\nUsing vectors find the area of triangle ABC with vertices A(1, 2, 3), B(2, −1, 4) and C(4, 5, −1). VIEW SOLUTION\n• Question 22\nSolve the following L.P.P. graphically\n Maximise Z = 4x + y Subject to following constraints x + y ≤ 50, 3x + y ≤ 90, x ≥ 10 x, y ≥ 0\nVIEW SOLUTION\n• Question 24\nUsing integration, find the area of region bounded by the triangle whose vertices are (–2, 1), (0, 4) and (2, 3).\n\nOR\n\nFind the area bounded by the circle x2 + y2 = 16 and the line $\\sqrt{3}\\mathrm{y}=x$ in the first quadrant, using integration. VIEW SOLUTION\n• Question 25\nSolve the differential equation given that y = 1 when $x=\\frac{\\mathrm{\\pi }}{2}$ VIEW SOLUTION\n• Question 26\nFind the equation of the plane through the line of intersection of $\\underset{r}{\\to }·\\left(2\\stackrel{\\mathit{^}}{i}-3\\stackrel{\\mathit{^}}{j}+4\\stackrel{\\mathit{^}}{k}\\right)=1$ and $\\underset{r}{\\to }·\\left(\\stackrel{^}{i}-\\stackrel{^}{j}\\right)+4=0$ and perpendicular to the plane $\\underset{r}{\\to }·\\left(2\\stackrel{^}{i}-\\stackrel{^}{j}+\\stackrel{^}{k}\\right)+8=0$. Hence find whether the plane thus obtained contains the line x − 1 = 2y − 4 = 3z − 12.\n\nOR\n\nFind the vector and Cartesian equations of a line passing through (1, 2, –4) and perpendicular to the two lines $\\frac{x-8}{3}=\\frac{\\mathrm{y}+19}{-16}=\\frac{\\mathrm{z}-10}{7}$ and $\\frac{x-15}{3}=\\frac{\\mathrm{y}-29}{8}=\\frac{\\mathrm{z}-5}{-5}$. VIEW SOLUTION\n• Question 27\nConsider f : R+ → [−5, ∞), given by f(x) = 9x2 + 6x − 5. Show that f is invertible with ${\\mathrm{f}}^{-1}\\left(y\\right)\\left(\\frac{\\sqrt{y+6}-1}{3}\\right)$.\n\nHence Find\n(i) f−1(10)\n(ii) y if ${\\mathrm{f}}^{-1}\\left(y\\right)=\\frac{4}{3},$\n\nwhere R+ is the set of all non-negative real numbers.\n\nOR\n\nDiscuss the commutativity and associativity of binary operation '*' defined on A = Q − {1} by the rule a * b = ab + ab for all, a, b ∊ A. Also find the identity element of * in A and hence find the invertible elements of A. VIEW SOLUTION\n• Question 28\nA metal box with a square base and vertical sides is to contain 1024 cm3. The material for the top and bottom costs Rs 5 per cm2 and the material for the sides costs Rs 2.50 per cm2. Find the least cost of the box. VIEW SOLUTION\n• Question 29\nIf $\\mathrm{A}=\\left(\\begin{array}{crr}2& 3& 10\\\\ 4& -6& 5\\\\ 6& 9& -20\\end{array}\\right)$, find A–1. Using A–1 solve the system of equations VIEW SOLUTION\nMore Board Paper Solutions for Class 12 Humanities Math\n\n• ### Board Paper of Class 12-Humanities 2004 Maths (SET 1) - Solutions\n\nBoard Paper Solutions for Other Subjects\n\n### Board Paper Solutions for Class 12 Humanities Economics\n\nWhat are you looking for?\n\nSyllabus" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8037489,"math_prob":0.99942636,"size":8950,"snap":"2019-51-2020-05","text_gpt3_token_len":2635,"char_repetition_ratio":0.3213727,"word_repetition_ratio":0.3998808,"special_character_ratio":0.31240225,"punctuation_ratio":0.06544811,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9997969,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-12-15T07:26:43Z\",\"WARC-Record-ID\":\"<urn:uuid:e022bc34-e218-4890-a750-273b94cee69c>\",\"Content-Length\":\"112602\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bce4374a-24e1-4d8f-945e-1e8d27051c70>\",\"WARC-Concurrent-To\":\"<urn:uuid:3386463c-8489-48dc-a2fa-d2fbf5b7f7a9>\",\"WARC-IP-Address\":\"23.217.116.169\",\"WARC-Target-URI\":\"https://www.meritnation.com/cbse-class-12-humanities/math/cbse-class-12-math-board-paper-2017-delhi-set-2-solutions/board-papers/starttest/qB6kcSEetvng0HSGYyJKgg!!\",\"WARC-Payload-Digest\":\"sha1:HFZM2FXGTIIKZGBXMBZHWE2U5HDSJGZA\",\"WARC-Block-Digest\":\"sha1:RBFLLPN7JBB3NOK42DGW44SAXXS44ZDY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-51/CC-MAIN-2019-51_segments_1575541307797.77_warc_CC-MAIN-20191215070636-20191215094636-00270.warc.gz\"}"}
https://au.mathworks.com/matlabcentral/answers/116793-how-to-classify-shapes-of-this-image-as-square-rectangle-triangle-and-circle
[ "# How to classify shapes of this image as square, rectangle, triangle and circle?\n\n156 views (last 30 days)\nROMIL on 19 Feb 2014\nCommented: Image Analyst on 6 Oct 2021", null, "Please provide me the matlab code to identify shapes on this image and classify them as square, rectangle, circle and triangle.\nImage Analyst on 12 Dec 2015\nNot sure whose code you're talking about, but glad you finally got it working. If you have any questions in the future, post your image and code in a new question.\n\nMatt Kindig on 21 Feb 2014\nEdited: Matt Kindig on 21 Feb 2014\nAnother approach is to calculate the best-fit bounding rectangle of each object, such that the bounding rectangle can be oriented at an arbitrary angle. I took the following approach:\n1) Identify the boundary (i.e. perimeter) of each object, using bwboundaries()\n2) Calculate the smallest rectangular bounding box that contains this perimeter. To do this, I used the minboundrect function available at http://www.mathworks.com/matlabcentral/fileexchange/34767-a-suite-of-minimal-bounding-objects/content/MinBoundSuite/minboundrect.m.\n3) I calculated the width, height, and area of each bounding rectangle. The aspect ratio (ratio between the width and height) can be used to determine whether it is a square (aspect ratio ~= 1.0) or rectangle.\n4) For a rectangle or square, the filled area of the object (from regionprops()) should be almost the same as the area of its bounding rectangle, whereas for a triangle it should be substantially less.\n5) For the circularity condition, I used the ratio between perimeter and area like Image Analyst suggested.\nEnjoy!\n%convert to 2D black and white with colors inverted\nBW = im(:,:,1) < 10;\n%get outlines of each object\n[B,L,N] = bwboundaries(BW);\n%get stats\nstats= regionprops(L, 'Centroid', 'Area', 'Perimeter');\nCentroid = cat(1, stats.Centroid);\nPerimeter = cat(1,stats.Perimeter);\nArea = cat(1,stats.Area);\nCircleMetric = (Perimeter.^2)./(4*pi*Area); %circularity metric\nSquareMetric = NaN(N,1);\nTriangleMetric = NaN(N,1);\n%for each boundary, fit to bounding box, and calculate some parameters\nfor k=1:N,\nboundary = B{k};\n[rx,ry,boxArea] = minboundrect( boundary(:,2), boundary(:,1)); %x and y are flipped in images\n%get width and height of bounding box\nwidth = sqrt( sum( (rx(2)-rx(1)).^2 + (ry(2)-ry(1)).^2));\nheight = sqrt( sum( (rx(2)-rx(3)).^2+ (ry(2)-ry(3)).^2));\naspectRatio = width/height;\nif aspectRatio > 1,\naspectRatio = height/width; %make aspect ratio less than unity\nend\nSquareMetric(k) = aspectRatio; %aspect ratio of box sides\nTriangleMetric(k) = Area(k)/boxArea; %filled area vs box area\nend\n%define some thresholds for each metric\n%do in order of circle, triangle, square, rectangle to avoid assigning the\n%same shape to multiple objects\nisCircle = (CircleMetric < 1.1);\nisTriangle = ~isCircle & (TriangleMetric < 0.6);\nisSquare = ~isCircle & ~isTriangle & (SquareMetric > 0.9);\nisRectangle= ~isCircle & ~isTriangle & ~isSquare; %rectangle isn't any of these\n%assign shape to each object\nwhichShape = cell(N,1);\nwhichShape(isCircle) = {'Circle'};\nwhichShape(isTriangle) = {'Triangle'};\nwhichShape(isSquare) = {'Square'};\nwhichShape(isRectangle)= {'Rectangle'};\n%now label with results\nRGB = label2rgb(L);\nimshow(RGB); hold on;\nCombined = [CircleMetric, SquareMetric, TriangleMetric];\nfor k=1:N,\n%display metric values and which shape next to object\nTxt = sprintf('C=%0.3f S=%0.3f T=%0.3f', Combined(k,:));\ntext( Centroid(k,1)-20, Centroid(k,2), Txt);\ntext( Centroid(k,1)-20, Centroid(k,2)+20, whichShape{k});\nend\nImage Analyst on 5 Aug 2021\n\n### More Answers (10)\n\nImage Analyst on 19 Feb 2014\nEdited: Image Analyst on 19 Mar 2016\nLook at the perimeter squared to area ratio. Use regionprops as shown in my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862\n[EDIT]\nSee attached demo.\nImage Analyst on 6 Oct 2021\n@aliya I just downloaded it and it works fine. You modified it somehow but didn't attach your code so I can't fix it.\nI'm attaching the lastest version I have of the demo (not sure if it's changed over the last 7 years, but probably).\n\nphaneendra ch on 22 Nov 2015\nWhile executing the above code I am getting an error in the code I.e.,(undefined function or variable 'minbounderect'). As I am new to MATLAB plz solve this prblm.tq in advance sir\n##### 2 CommentsShowHide 1 older comment\nkaz on 25 Apr 2016\ni am so noob with matlab. sir how to add this function to the codes at the top. which i am getting the same error minboundrect. ty\n\nVenkatesh A on 12 Dec 2015\nMr.matt kindig, I am working with your \"various shapes detecting\" code which is in this page. The code u have written is working very well for the above black and white image(the image which you chosen to write code). But I am using some other images( 'shapes.jpg' which is now I am submitting) which might have some holes in the inside of the image and I am getting error( error is the matrix cannot be generated). How to fill the small holes in that image. Can I draw subplots for your code for various shapes that are present in the image?\n##### 1 CommentShowHide None\nImage Analyst on 12 Dec 2015\nVenkatesh A, you forgot to give the link to your question where you attached your code and image.\nIf you do that, we can go to your question and tell you how to use imfill(binaryImage, 'holes') to fill holes in your image.\n\nVenkatesh A on 14 Dec 2015\nSorry sir. here is the image\n##### 2 CommentsShowHide 1 older comment\nB.k Sumedha on 19 Mar 2016\nThere is no image attached.\n\nAKHIL RAJAGOPAL on 23 Apr 2016\nI am getting an error at isTriangle = ~isCircle & (TriangleMetric < 0.6); as: Error using & Matrix dimensions must agree.\nkaz on 25 Apr 2016\nthank you so much\n\nnoor jahan m on 8 Dec 2016\ni am a beginner in matlab. I tried the code for rectangle detection. I cud also find the function minboundrect . but i got error in convex hull of this function. Can u please help further? thank u\n\nRahul Chauhan on 23 Oct 2017\nTy very much sir for the code but I'm getting error as \"undefined function or variable 'minboundract'\" So plz help me sir getting this error correct asap.... Again Ty in advance sir\nRahul Chauhan on 25 Oct 2017\nagain sir i corrected the function but the code is not working here i am attaching the code and image file know help me.... here is the code :(1)file attached as test.m", null, "(2)minboundrect.m\nhere is the image: abc.jpg\nty in advance sir for helping me.....\n\nPavel Vilbik on 11 Dec 2017\nHow to find the qr code( this plastic card) in this photo, as it has a begining job, I need a coordinate and axis, and that I would be marked with a ractangle.\n##### 1 CommentShowHide None\nImage Analyst on 11 Dec 2017\nYou should start your own question on this. In that question I'll tell you how to find the blobs, perhaps based on color saturation, and then to take the histogram of each blob looking for a fairly bimodal histogram. The standard deviation of the histogram of the all black and all white objects will be much less than a checkerboard object. If you still can't figure it out, I might post code over in that new question you're going to post.\n\nMichelle de Bock on 28 Dec 2018\nHi Sir,\nIs it also possible to classify the direction of the triangle. e.g. left pointing triangle or right pointing triangle? Also classifying the thrid/fourth object in the picture? This is not really a rectangle, but how to separate this from a real rectangle?\nKind regards,\nMichelle\n##### 1 CommentShowHide None\nImage Analyst on 28 Dec 2018\nYes, I'm sure you could. Just modify my attached shape recognition demo. Once you have the blob, find its bounding box and centroid with regionprops. Then if the centroid is to the left of the centerline of the bounding box, it's pointing to the left. If it's below, it's pointing up.\nFor the other object, you'll also have to look for how many vertices it has and then perhaps scale a template to its size and see if enough pixels match to be considered that object. You could also do the template matching method with the triangles if you want. No, I don't have code for that but, being smart engineer, I'm sure you will find it easy to do.\n\nAhaana Khurana on 4 Feb 2020\nROMIL can you pls provide the code for SHAPE DETECTION on [email protected].\nDina Abd El-twab on 24 Feb 2020\nI applied this code to draw a rectangle on the region of interest that i want after taining using faster RCNN .I want to convert the drawn rectangle to be circle in the next step , could you help me please ?\n@Image Analyst\nImage Analyst" ]
[ null, "https://www.mathworks.com/matlabcentral/answers/uploaded_files/157014/image.jpeg", null, "https://www.mathworks.com/matlabcentral/answers/uploaded_files/186320/image.jpeg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8652096,"math_prob":0.81171477,"size":8563,"snap":"2022-40-2023-06","text_gpt3_token_len":2229,"char_repetition_ratio":0.11520037,"word_repetition_ratio":0.012857143,"special_character_ratio":0.25715286,"punctuation_ratio":0.13767281,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98529977,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,10,null,10,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-28T00:22:52Z\",\"WARC-Record-ID\":\"<urn:uuid:35265d62-c270-4ab1-8825-6c71f56024f1>\",\"Content-Length\":\"636485\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:83facd49-183f-4490-8a57-1add1ff403e2>\",\"WARC-Concurrent-To\":\"<urn:uuid:6071b94f-a80e-4e5c-925a-307acac952a5>\",\"WARC-IP-Address\":\"104.82.78.58\",\"WARC-Target-URI\":\"https://au.mathworks.com/matlabcentral/answers/116793-how-to-classify-shapes-of-this-image-as-square-rectangle-triangle-and-circle\",\"WARC-Payload-Digest\":\"sha1:P53SUIV7J72NVSXHIEVVRBRDBB7RTALN\",\"WARC-Block-Digest\":\"sha1:RXCYNTQXDHRNO2VCYX3ZVHHE7JSQRJ44\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335059.31_warc_CC-MAIN-20220927225413-20220928015413-00171.warc.gz\"}"}
https://www.cs.utexas.edu/users/flame/laff/alaff/chapter05-lu-iterative-refinement.html
[ "When solving $A x = b$ on a computer, error is inherently incurred. Instead of the exact solution $x \\text{,}$ an approximate solution $\\widehat x$ is computed, which instead solves $A \\widehat x = \\widehat b \\text{.}$ The difference between $x$ and $\\widehat x$ satisfies\nWe can compute $\\widehat b = A \\widehat x$ and hence we can compute $\\delta\\!b = b - \\widehat b \\text{.}$ We can then solve $A \\delta\\!x = \\delta\\!b \\text{.}$ If this computation is completed without error, then $x = \\widehat x + \\delta\\!x$ and we are left with the exact solution. Obviously, there is error in $\\delta\\!x$ as well, and hence we have merely computed an improved approximate solution to $A x = b \\text{.}$ This process can be repeated. As long as solving with $A$ yields at least one digit of accuracy, this process can be used to improve the computed result, limited by the accuracy in the right-hand side $b$ and the condition number of $A \\text{.}$" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9141218,"math_prob":0.9998951,"size":1086,"snap":"2022-27-2022-33","text_gpt3_token_len":299,"char_repetition_ratio":0.1469501,"word_repetition_ratio":0.0,"special_character_ratio":0.29373848,"punctuation_ratio":0.11881188,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999857,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-11T00:25:51Z\",\"WARC-Record-ID\":\"<urn:uuid:a1260d6d-d53f-469a-90b6-979fbda1588b>\",\"Content-Length\":\"27786\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:28d31515-1647-40f5-915a-9485a0fd6265>\",\"WARC-Concurrent-To\":\"<urn:uuid:0fa2de99-ac71-411d-b381-b9ddabda0148>\",\"WARC-IP-Address\":\"128.83.120.48\",\"WARC-Target-URI\":\"https://www.cs.utexas.edu/users/flame/laff/alaff/chapter05-lu-iterative-refinement.html\",\"WARC-Payload-Digest\":\"sha1:T2YJR3YWG7U22XNSOBV64K4Z666GF3UM\",\"WARC-Block-Digest\":\"sha1:P4SQMJWHMV3DNDS4PQGR4AETFTMUKQVG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882571222.74_warc_CC-MAIN-20220810222056-20220811012056-00201.warc.gz\"}"}
https://dsp.stackexchange.com/questions/47933/mle-parameter-estimation-confusion-regarding-some-terms-in-the-pdf-of-complex?noredirect=1
[ "# MLE parameter estimation — confusion regarding some terms in the pdf of complex normal r.v (Part 2)\n\nThis question is based on the application of the pdf which was an earlier question of mine asked here Confusion regarding pdf of circularly symmetric complex gaussian rv\n\nIf $v \\sim CN(0,2\\sigma^2_v)$ is a circularly complex Gaussian random variable which acts as the measurement noise in this model $$y_n = A + v_n \\tag{1}$$ where $y$ is the observation and $A$ is a scalar unknown value which needs to be estimated. I am having a slight confusion whether there will be a 2 in the denominator of Eq(3) and Eq(4) with the $\\exp(.)$ term. Based on the answer in the link, there should be no sqrt term with $\\pi$ in the denominator, if $v \\sim CN(0,2\\sigma^2_v)$. If $v \\sim N(0,\\sigma^2_v)$ then there is a sqrt term.\n\nCan somebody please check if I have correctly written out the log-likelihood? I think I am missing a 2 in the denominator of $\\exp[.]$ term in Eq(3) but I am not quite sure.\n\nThank you for your time and help.\n\n$$P_y(y_1,y_2,...,y_N) = \\prod_{n=1}^N\\frac{1}{2\\pi \\sigma^2_v} \\exp \\bigg(\\frac{-{({y_n-A})}^H ({y_n-A})}{2\\sigma^2_v} \\bigg) \\tag{2}$$\n\ntaking log $$\\ell = -N\\ln(2\\pi\\sigma^2_v) - \\frac{1}{\\sigma^2_v} {\\bigg[{[\\sum_{n=1}^{N} {(y_n - A)}{(y_n - A)}^{\\mathsf{H}} ]}\\bigg]}. \\tag{3}$$ $$= -N\\ln(2\\pi\\sigma^2_v)- \\frac{1}{2 \\sigma^2_v}{\\bigg[ \\sum_{n=1}^{N}y_n y_n^\\mathsf{H} - 2 \\sum_{n=1}^N y_n A\\bigg]} - \\frac{1}{2 \\sigma^2_v}{\\bigg[ \\sum_{n=1}^N {AA}^\\mathsf{H} ] \\bigg]} \\tag{4}$$\n\n• Going from (2) to (3), why did $(y-A)^H(y-A)$ turn into $(y-A)(y-A)^H$? – Atul Ingle Mar 19 '18 at 1:54\n• @AtulIngle: I used the commutative law in multiplication: A.B = B.A – Ria George Mar 19 '18 at 2:04\n• Ah, so $(\\cdot)^H$ really means complex conjugate here because these are complex scalars. In general, this is not true for vectors/matrices. – Atul Ingle Mar 19 '18 at 2:05\n\n## 2 Answers\n\nI looked this up on Wikipedia: A complex Gaussian random variable $V = \\mathfrak{Re}(V)+j\\mathfrak{Im}(V)$ is said to be zero mean circularly symmetric $\\mathcal{CN}(0,\\Gamma)$ if the random vector $[\\mathfrak{Re}(V),\\mathfrak{Im}(V)]$ is a Gaussian random vector with mean $[0,0]$ and covariance matrix $\\frac{1}{2}\\begin{bmatrix} \\mathfrak{Re}(\\Gamma) & -\\mathfrak{Im}(\\Gamma) \\\\ \\mathfrak{Im}(\\Gamma) & \\mathfrak{Re}(\\Gamma) \\end{bmatrix} = \\frac{1}{2}\\begin{bmatrix} 2\\sigma_v^2 & 0 \\\\ 0 & 2\\sigma_v^2 \\end{bmatrix} = \\begin{bmatrix} \\sigma_v^2 & 0 \\\\ 0 & \\sigma_v^2 \\end{bmatrix}.$\n\nFor your question, you need to know how to write the density function of each of the $Y_i$'s. Since $Y_i = A + V_i$, the random vector $[\\mathfrak{Re}(Y_i),\\mathfrak{Im}(Y_i)]$ is a 2D Gaussian vector distributed according to $\\mathcal{N}\\left(\\begin{bmatrix} \\mathfrak{Re}(A) \\\\ \\mathfrak{Im}(A) \\end{bmatrix},\\begin{bmatrix} \\sigma_v^2 & 0 \\\\ 0 & \\sigma_v^2 \\end{bmatrix}\\right)$ i.e. the density function can be written as \\begin{eqnarray} \\frac{1}{\\sigma_v\\sqrt{2\\pi}}\\exp\\left(-{\\frac{(w-\\mathfrak{Re}(A))^2}{2\\sigma_v^2}}\\right) &\\cdot& \\frac{1}{\\sigma_v\\sqrt{2\\pi}}\\exp\\left(-{\\frac{(x-\\mathfrak{Im}(A))^2}{2\\sigma_v^2}}\\right)\\\\& = & \\frac{1}{2\\pi\\sigma_v^2}\\exp\\left(-\\frac{(w-\\mathfrak{Re}(A))^2+(x-\\mathfrak{Im}(A))^2}{2\\sigma_v^2}\\right) \\\\ &=& \\frac{1}{2\\pi\\sigma_v^2} \\exp\\left(-\\frac{(y_i-A)\\overline{(y_i-A)}}{2\\sigma_v^2}\\right) \\end{eqnarray} where $y_i=w+jx$ is a \"placeholder\" for the complex random variable $Y_i$ and the \"overbar\" denotes complex conjugate i.e. $\\bar y=w-jx.$\n\nFinally, we are ready to write the density function of the complex random vector $[Y_1,\\ldots, Y_N]$. We note that due to the circular symmetry of each of the components, it is same as the density of the real valued Gaussian random vector $[\\mathfrak{Re}(Y_1),\\mathfrak{Im}(Y_1),\\ldots, \\mathfrak{Re}(Y_N),\\mathfrak{Im}(Y_N)].$\n\nThe likelihood function can now be written as $$p(Y_1,\\ldots,Y_N)=\\prod_{i=1}^N \\frac{1}{2\\pi\\sigma_v^2} \\exp\\left(-\\frac{(y_i-A)\\overline{(y_i-A)}}{2\\sigma_v^2}\\right)$$ and the negative-log-likelihood becomes \\begin{eqnarray} -\\log p(Y_1,\\ldots,Y_N)&=& N\\log(2\\pi\\sigma_v^2) + \\frac{1}{2\\sigma_v^2} \\sum_{i=1}^N (y_i-A)\\overline{(y_i-A)} \\\\ &=& N\\log(2\\pi\\sigma_v^2) + \\frac{1}{2\\sigma_v^2} \\sum_{i=1}^N (y_i-A)\\overline{(y_i-A)} \\end{eqnarray}\n\nHi: It's worded more clearly now in that you're estimating A and there's only one RV which makes more sense. Consider the first link I sent in the other message and go to where it says the \"likelihood is\". Your likelihood is quite similar except, since your variance is multiplied by 2, this causes 2 things to happen in terms of how would you change the likelihood in that document accordingly for your problem.\n\nA) The $2 \\pi \\sigma^2$ that is getting raised to the $-\\frac{n}{2}$ instead becomes $4 \\pi \\sigma^2_{v}$\n\nB) The denominator of the exp instead of being $2 \\sigma^2$ becomes $4 \\sigma^2_{v}$.\n\nMake those 2 changes to that likelihood and you will have your expression. I get confused looking at your 2) because my memory of 1/2's and the squares ( in your case H's ) is blurry and it can be confusing. So better to rely on document where likelihood is correct so you can't go wrong. Keep in mind that this is under the assumption that complex RV's don't change much compared to real ones.\n\n• Thank you for your reply. But I don't quite understand why in point A) there should be a 4 since there will not be any sqrt term (please refer the answer to an earlier question dsp.stackexchange.com/questions/40320/…) where if $v \\sim CN(0,2\\sigma^2)$ then there is no sqrt term.So either it should be only $2\\sigma^2$ in the denominator in Eq(3). What do you think? – Ria George Mar 18 '18 at 20:12\n• the first term in the pdf of the normal is $\\frac{1}{2 \\pi \\times ~ variance}$. The variance is $2 \\sigma^2_{v}$. So, you get $2 \\times 2$. – mark leeds Mar 19 '18 at 5:58\n• what I said is the density for a single observation. Note that you still have to take the log and turn the product into the sum and all that other fun stuff. but the thing is to have the initial likelihood correct. There have to be tons of examples of computing the log likelihood of the normal on the net, assuming one has the initial likelihood correct and you will have that if you follow what I'm doing. – mark leeds Mar 19 '18 at 6:01\n• Also, I'm not dealing with square roots etc. I'm just telling that the first term you need which corresponds to the first term in the likelihood in the document I sent you in the part 1 has to be $\\frac{1}{4 \\pi \\sigma^2_{v}}$. After that, there may be square roots that need to be taken etc.. – mark leeds Mar 19 '18 at 6:04" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.76607054,"math_prob":0.9995531,"size":1409,"snap":"2021-21-2021-25","text_gpt3_token_len":520,"char_repetition_ratio":0.13238434,"word_repetition_ratio":0.019323671,"special_character_ratio":0.37828246,"punctuation_ratio":0.07,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99997616,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-06-23T04:29:31Z\",\"WARC-Record-ID\":\"<urn:uuid:604aaa13-4cfe-4da1-9f9b-0dadc9a23412>\",\"Content-Length\":\"190702\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d200c63d-f5ec-4004-b4fa-8f5564743b45>\",\"WARC-Concurrent-To\":\"<urn:uuid:a39b98cb-3838-4ffd-8e8d-764c1b45f021>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://dsp.stackexchange.com/questions/47933/mle-parameter-estimation-confusion-regarding-some-terms-in-the-pdf-of-complex?noredirect=1\",\"WARC-Payload-Digest\":\"sha1:K46JKDIGJJEWSBJTJIZYX2JQ64OSUTN6\",\"WARC-Block-Digest\":\"sha1:4AYYHUSVXUHCWWJNXV7UPY2YCVS556ER\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-25/CC-MAIN-2021-25_segments_1623488534413.81_warc_CC-MAIN-20210623042426-20210623072426-00311.warc.gz\"}"}
http://www.sgscript.org/docs/sgscript.docs/code-samples-sgscript
[ "## Code samples - SGScript\n\n#### Statements\n\n```print \"Text\";\nprintln( \"!\" );\nb = rand();```\n\n```// this is a comment that ends with the line\n\n/* this type of comment\ncan be more than\none line long\n*/```\n\n#### Basic calculations\n\n```a = 1, b = 2, c = 5;\nd = a + b * c - b / a;\na += 3.14;\nc = \"eye\" \\$ \"sight\" // stitch (concatenate) strings together!\nd = \"Ocean's \" \\$ 11;```\n\n#### Comparison\n\n```if( c > 5 )\nprint \"as expected\";\ny = x <= 8.8; // result of comparison can be assigned!```\n\n#### Useful shortcuts\n\n```a += 1; // short for a = a + 1\na++; // short for a += 1\na--;\na = if( b > 5, 10, 20 ); // short for if( b > 5 ){ a = 10; } else { a = 20; }```\n\n#### Control flow\n\n```if( a > b )\n{\nprint \"something happens only if a is greater than b\";\n}\nelse\nprint \"...and here the opposite is true\";\n\nwhile( a > b )\n{\nprint \"something happens as long as a is greater than b\";\na--; // but not for too long, as we see\n}\n// or maybe ...\ndo\n{ // first we do\nprint a;\n}\nwhile( a++ < 10 ); // then we check```\n\n#### More useful shortcuts\n\n```for( i = 0; i < 10; i++ )\nprint i;\n// .. is the short form for ..\ni = 0;\nwhile( i < 10 )\n{\nprint i;\ni++;\n}\nfor(;;) // this is not going to stop...\nprint \"x\";```\n\n#### More control flow\n\n```x = 5;\nfor(;;)\n{\nprint x;\nx--;\nif( x < 0 )\nbreak; // this says that we don't want to continue staying in the loop\n}\n// << this is where \"break\" leads us, right after the loop\n\n// this goes through a list\nforeach( fruit : [ \"apple\", \"orange\", \"banana\" ] )\nprintln( fruit );\n\n// .. of 2 items ..\nlist = { \"1\" = \"apple\", \"2\" = \"orange\", \"3\" = \"banana\" };\nforeach( number, fruit : list )\nprintln( number \\$ \". \" \\$ fruit );```\n\n#### Functions\n\n```// cornerstore of reusable code\nfunction square( x )\n{\nreturn x * x;\n}\nprint square( 5 );\n\nfunction print_quoted( text )\n{\nprint '\"' \\$ text \\$ '\"';\n}\nprint_quoted( \"It works!\" );```\n\n#### Objects\n\n```a = [ 1, 2, \"three\" ];\na = 3;\na++;\n\nd = {\nname = \"test\",\ntext = \"hello\",\n};\nd.name = \"test, edited\";\nd.text \\$= \", world!\";\nprintln( d.text ); // hello, world!```\n\n#### Interesting stuff\n\n```printvar( x ); // tells you all you want to know about \"x\"\n\n// emits an error with the given message if the first argument is false\nassert( x > 5, \"x must be greater than 5\" );\n\n// returns the type name\ntypeof( x );" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.6226095,"math_prob":0.9923294,"size":2209,"snap":"2021-04-2021-17","text_gpt3_token_len":710,"char_repetition_ratio":0.102947846,"word_repetition_ratio":0.020491803,"special_character_ratio":0.41783613,"punctuation_ratio":0.22553192,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99727845,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-25T23:48:08Z\",\"WARC-Record-ID\":\"<urn:uuid:5bc2e263-4ee2-421f-8fc0-e4e7203dc567>\",\"Content-Length\":\"84159\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:00015c33-4b72-475b-9599-2b94b7255a30>\",\"WARC-Concurrent-To\":\"<urn:uuid:f21a049f-cfd4-4d6a-83d9-9636b8177e9d>\",\"WARC-IP-Address\":\"46.101.231.182\",\"WARC-Target-URI\":\"http://www.sgscript.org/docs/sgscript.docs/code-samples-sgscript\",\"WARC-Payload-Digest\":\"sha1:WLNPFDOD7E3454NS4OHEFCGB3U33AOT2\",\"WARC-Block-Digest\":\"sha1:I7U7NBF5TH66D3A52XZOOF63VHXAL6NZ\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610704792131.69_warc_CC-MAIN-20210125220722-20210126010722-00124.warc.gz\"}"}
https://quals.dzackgarza.com/10_Algebra/500_Exercises/9960%20UGA%20Problems.html
[ "# UGA Fall 2019 Problem Sets\n\n## Problem Set One\n\n### Exercises\n\nIf $$\\sigma = (i_1 i_2 \\cdots i_r) \\in S_n$$ and $$\\tau \\in S_n$$, then show that $$\\tau\\sigma\\tau^{-1} = (\\tau(i_1) \\tau(i_2) \\cdots \\tau(i_r))$$.\n\nShow that $$S_n \\cong \\left\\langle (12), (123\\cdots n)\\right\\rangle$$ and also that $$S_n \\cong \\left\\langle (12), (23\\cdots n)\\right\\rangle$$\n\nLet $$G$$ be a finite abelian group that is not cyclic. Show that $$G$$ contains a subgroup isomorphic to $$\\mathbb{Z}_p \\oplus \\mathbb{Z}_p$$ for some prime $$p$$.\n\nDetermine (up to isomorphism) all abelian groups of order 64; do the same for order 96.\n\nLet $$G$$ be a group and $$A \\trianglelefteq G$$ be a normal abelian subgroup. Show that $$G/A$$ acts on $$A$$ by conjugation and construct a homomorphism $$\\varphi: G/A \\to \\mathrm{Aut}(A)$$.\n\nLet $$Z(G)$$ be the center of $$G$$. Show that if $$G/Z(G)$$ is cyclic, then $$G$$ is abelian.\n\nNote that Hungerford uses the notation $$C(G)$$ for the center.\n\nLet $$G$$ be a finite group and$$H \\trianglelefteq G$$ a normal subgroup of order $$p^k$$. Show that $$H$$ is contained in every Sylow $$p$$-subgroup of $$G$$.\n\nLet $$\\left| G \\right| = p^n q$$ for some primes $$p > q$$. Show that $$G$$ contains a unique normal subgroup of index $$q$$.\n\n### Qual Problems\n\nLet $$G$$ be a finite group and $$p$$ a prime number. Let $$X_p$$ be the set of Sylow-$$p$$ subgroups of $$G$$ and $$n_p$$ be the cardinality of $$X_p$$. Let $$\\mathrm{Sym}(X)$$ be the permutation group on the set $$X_p$$.\n\n• Construct a homomorphism $$\\rho: G \\to \\mathrm{Sym}(X_p)$$ with image a transitive subgroup (i.e. with a single orbit).\n\n• Deduce that if $$G$$ is simple then the order of $$G$$ divides $$n_p!$$.\n\n• Show that for any $$1\\leq a \\leq 4$$ and any prime power $$p^k$$, no group of order $$ap^k$$ is simple.\n\n• Define the required group action by \\begin{align*}\\begin{aligned} \\rho: G \\to \\mathrm{Sym}(X_p) \\\\ g \\mapsto (\\gamma_g: P \\mapsto gPg^{-1}). \\end{aligned}\\end{align*} The claim is that this action is transitive on $$X_p$$. This can be equivalently stated as \\begin{align*}\\forall P \\in X_p, \\exists g \\in G, P' \\in X_p \\mathrel{\\Big|}gP'g^{-1} = P.\\end{align*}\n\nHowever, by Sylow 2, all Sylow $$p-$$subgroups are conjugate to each other, and thus this condition is satisfied.\n\n• Suppose that $$G$$ is simple, so that we have \\begin{align*}H \\trianglelefteq G \\implies H = \\{ e \\} \\text{ or } H = G.\\end{align*}\n\nNote that $$\\mathrm{Sym}(X_p) = (n_p)!$$, and if we have an injective homomorphism $$G \\xrightarrow{\\phi} \\mathrm{Sym}(X_p)$$, then $$|G| = |\\phi(G)|$$, since $$\\phi(G) \\leq \\mathrm{Sym}(X_p)$$ will be a subgroup and thus have order dividing $$(n_p)!$$, which proves the statement.\n\nUsing the $$\\phi$$ defined in (1), we can apply the first isomorphism theorem \\begin{align*}G / \\ker \\phi \\cong \\mathrm{im} \\phi \\leq \\mathrm{Sym}(X_p),\\end{align*} and so it suffices to show that $$\\ker \\phi = \\{e\\}$$.\n\nNote that since $$\\ker \\phi \\trianglelefteq G$$ and $$G$$ is simple, we can only have $$\\ker \\phi = \\{e\\}$$ or $$\\ker \\phi = G$$.\n\nTowards a contradiction, suppose $$\\ker \\phi = G$$.\n\nBy definition, we have \\begin{align*}\\begin{aligned} \\ker \\phi &= \\{ g\\in G \\mathrel{\\Big|}\\gamma_g = \\mathrm{id}_{X_p} \\} \\\\ &= \\{ g\\in G \\mathrel{\\Big|}\\forall P \\in X_p,~ gPg^{-1} = P \\} \\\\ &= \\bigcap_{P \\in X_p} N_G(P), \\end{aligned}\\end{align*}\n\nand so the kernel of $$\\varphi$$ is the intersection of all of the normalizers of the Sylow $$p-$$subgroups.\n\nBut this means that $$N_G(P) = G$$ for every Sylow $$p-$$subgroup, which means that $$n_p = 1$$ and there is a unique $$P$$ which must be normal in $$G$$. Since $$G$$ is simple, this forces $$P$$ to be trivial or the whole group.\n\nTowards a contradiction, suppose $$P = G$$. Then $$G$$ is a $$p-$$group and thus has order $$p^n$$. But then $$G$$ has normal subgroups of order $$p^k$$ for all $$0 < k < n$$, contradicting the simplicity of $$G$$.\n\nBut the only other option is that $$P$$ is trivial, whereas we know nontrivial Sylow $$p-$$subgroups exist by Sylow 1.\n\nThus we can not have $$\\ker \\phi = G$$, and so $$\\ker \\phi$$ is trivial as desired.\n\n• Suppose $$\\left| G \\right| = ap^k$$, where $$1 \\leq a \\leq 4$$. Then by Sylow 3, we have $$n_p = 1 \\operatorname{mod}p$$ and $$n_p$$ divides $$a$$. If $$a=1$$, then $$n_p = 1$$, and so $$G$$ can not be simple. Moreover, if $$p \\geq a$$, then $$n_p \\leq a$$ and $$n_p = 1\\operatorname{mod}p$$ forces $$n_p = 1$$ again.\n\nSo we can restrict our attention to $$2 \\leq a \\leq 4$$ and $$p = 2, 3$$, which reduces to checking the cases $$ap^k = 2 (3^k), 4 (3^k)$$, or $$3 (2^k)$$ for $$k\\geq 1$$.\n\nIf $$ap^k = 2(3^k)$$, we have $$n_3 = 1 \\operatorname{mod}3$$ and $$n_3 \\divides 2$$, which forces $$n_3 = 1$$, so this can not be a simple group.\n\nSimilarly, if $$ap^k = 4(3^k)$$, then $$n_3 = 1 \\operatorname{mod}3$$ and $$n_3$$ divides 4, which forces $$n_3 = 1$$ and thus $$G$$ can’t be simple.\n\nIf $$ap^k = 3(2^k)$$, then $$n_2 = 1 \\operatorname{mod}2$$ and $$n_2$$ divides 3, so $$n_2 = 1, 3$$. But then $$n_3! = 6$$, and if $$k > 1$$, we have $$3(2^k) > 6 = n_3!$$, so $$G$$ can not be simple by the result in (2).\n\nIf $$k = 1$$, then $$G$$ is order 6, so $$G$$ is isomorphic to either $${\\mathbb{Z}}_6$$ or $$S_3$$. The group $$S_3$$ is not simple, since $$A_3 \\trianglelefteq S_3$$, and the only simple cyclic groups are of prime order, so $${\\mathbb{Z}}_6$$ is not simple. This exhausts all of the possible cases.\n\nLet $$G$$ be a finite group and let $$N \\trianglelefteq G$$, and let $$p$$ be a prime number and $$Q$$ a subgroup of $$G$$ such that $$N \\subset Q$$ and $$Q/N$$ is a Sylow $$p-$$subgroup of $$G/N$$.\n\n• Prove that $$Q$$ contains a Sylow $$p-$$subgroup of $$G$$.\n\n• Prove that every Sylow $$p-$$subgroup of $$G/N$$ is the image of a Sylow $$p-$$subgroup of $$G$$.\n\nProof.\n\n• Since $$Q/N$$ is a Sylow $$p-$$subgroup of $$G/N$$, we can write $$|G/N| = p^k l$$ where $$\\gcd(p, l) = 1$$, and $$|Q/N| = p^k$$.\n\nWe can then write $$|G| = p^n m$$ where $$n\\geq l$$ and $$l\\mathrel{\\Big|}m$$.\n\nBy the third isomorphism theorem, we have \\begin{align*}\\frac{G/N}{Q/N} \\cong G/Q\\end{align*} and so \\begin{align*}\\left| \\frac{G/N}{Q/N} \\right| = \\frac{|G/N|}{|Q/N|} = \\frac{p^k l}{p^k} = l\\end{align*}\n\nand so $$|G/Q| = l$$ where $$(p, l) = 1$$, and thus \\begin{align*}|G/Q| = |G| / |Q| = l \\implies |G| = |Q|~l.\\end{align*}\n\nWe then have \\begin{align*}p^n m = |Q|~l,\\end{align*}\n\nand since $$(p, l) = 1$$, it must be the case that $$p^n$$ divides $$|Q|$$. But since $$Q \\leq G$$, this means that $$Q$$ itself must be a Sylow $$p-$$ subgroup of $$G$$.\n\n• Let $$P_N \\in \\mathrm{Syl}(p, G/N)$$. By the subgroup correspondence theorem, $$P_n = H/N$$ for some $$H\\leq G$$ such that $$N \\subseteq H$$.\n\nSo choose $$P_H \\in \\mathrm{Syl}(p, H)$$; the claim is that $$P_H \\in \\mathrm{Syl}(p, G)$$ and that $$\\frac{P_HN}{N} \\cong P_N$$, which exhibits $$P_N$$ as the image of a Sylow $$p-$$subgroup of $$G$$.\n\nWe first have $$P_H \\in \\mathrm{Syl}(p, G)$$, which follows because we have $$[G/N, H/N] = [G: P_H]$$ from the fourth isomorphism theorem, and thus $$[G/N, P_N] = [G : P_H]$$. In particular, since $$P_N$$ is a Sylow $$p-$$subgroup, $$p$$ does not divide $$[G/N, P_N]$$ and thus $$p$$ doesn’t divide $$[G: P_H]$$, which makes $$P_H$$ a maximal $$p-$$subgroup in $$G$$ and thus a Sylow $$p-$$subgroup.\n\nWe then have $$P_HN/N = P_N$$, which follows because $$P_H \\leq H \\implies P_HN/N \\leq H/N = P_N \\leq G/N$$.\n\nHowever, it is also the case that $$P_HN/N \\in \\mathrm{Syl}(p, G/N)$$. This follows because\n\n• $$P_HN/N = P_H/P_H \\cap N$$ by the 2nd isomorphism theorem, so it is a $$p-$$group.\n\n• $$P_H \\subseteq P_HN \\subseteq G \\implies p$$ doesn’t divide $$[G: P_HN]$$, since $$P_H$$ is also a Sylow $$p-$$group of $$G$$ and thus has maximal prime power dividing $$\\left| G \\right|$$.\n\n• $$N \\subseteq P_H N \\subseteq G \\implies [G/N : P_H N/ N] = [G: P_H N]$$\n\nTaken together, this says that $$P_H N/ N$$ is a $$p$$-group and $$p$$ doesn’t divide $$[G/N, P_HN / N]$$, so it is a maximal $$p-$$subgroup and $$P_HN/N \\in \\mathrm{Syl}(p, G/N)$$.\n\nBut since $$P_HN/N \\leq P_N$$ and $$\\left|P_HN/N\\right| = \\left|P_N\\right|$$, we must have $$P_HN/N = P_N$$ as desired.\n\n◻\n\nLet $$G$$ be a finite group and $$H<G$$ a subgroup. Let $$n_H$$ be the number of subgroups of $$G$$ that are conjugate to $$H$$. Show that $$n_H$$ divides the order of $$G$$.\n\n.* Let \\begin{align*}C_H = \\{ gHg^{-1} \\mathrel{\\Big|}g\\in G \\}\\end{align*} be the conjugacy class of $$H$$, so $$|C_H| = n_H$$.\n\nWe wish to show that $$n_{H}$$ divides $$|G|$$.\n\nClaim 1: \\begin{align*}n_{H} = [G: N_G(H)],\\end{align*} where $$N_G(H) \\leq G$$ is the normalizer of $$H$$ in $$G$$.\n\nNote that if this claim is true, then we can apply Lagrange’s theorem, which states \\begin{align*}A \\leq G \\implies |G| = [A: G]~|A|,\\end{align*}\n\nwhich in this case translates to \\begin{align*}|G| = [N_G(H) : G]~|N_G(H)| = n_H~|N_G(H)|.\\end{align*}\n\nSince $$n_H$$ divides the right-hand side, it must divide the left-hand side as well, which is precisely what we would like to show.\n\nProof of Claim 1:\n\nThe normalizer of $$H$$ in $$G$$, written $$N_G(H)$$, is the largest subgroup of $$G$$ containing $$H$$ such that $$H \\trianglelefteq N_G(H)$$, i.e. \\begin{align*}N_G(H) = \\{g \\in G ~\\mathrel{\\Big|}~ gHg^{-1} = H \\} \\leq G.\\end{align*}\n\nNow consider $$S$$, the set of left cosets of $$N_G(H)$$. Suppose there are $$k$$ of them, so \\begin{align*}[G: N_G(H)] = |S| \\coloneqq k.\\end{align*}\n\nThen $$S$$ can be written as \\begin{align*}S = \\{ g_1 N_G(H), ~g_2 N_G(H), ~\\cdots, ~g_k N_G(H) \\}.\\end{align*}\n\nwhere each $$g_i$$ is a distinct element of $$G$$ yielding a distinct coset $$g_i N_G(H)$$. In particular, if $$i\\neq j$$, then $$g_i \\neq g_j$$, and $$g_i N_G(H) \\not \\in g_j N_G(H)$$.\n\nIn particular, $$S$$ acts on $$C_H$$, \\begin{align*}\\begin{aligned} S &\\curvearrowright C_H \\\\ g_i N_G(H) &\\curvearrowright H = g_i H g_i^{-1},\\end{aligned}\\end{align*}\n\ntaking $$H$$ to one of its conjugate subgroups.\n\nSo define \\begin{align*}K \\coloneqq \\{ g_i H g_i^{-1} \\mathrel{\\Big|}1 \\leq i \\leq k \\}.\\end{align*}\n\nNote that $$K \\subseteq C_H$$, and has at most $$k$$ elements.\n\nWe claim that $$K$$ has $$k$$ distinct elements, i.e. that each $$g_{i}$$ takes $$H$$ to a distinct conjugate subgroup. We have \\begin{align*}\\begin{aligned} g_{i} H g^{-1}_{i} &= g_{j} H g^{-1}_{j} &\\implies \\\\ g_j^{-1} g_{i} H g^{-1}_{i} g_j &= H &\\implies \\\\ (g_j^{-1} g_{i}) H (g_j^{-1} g_{i})^{-1} &= H &\\implies \\\\ g_j^{-1} g_{i} &\\in N_G(H) &\\implies \\\\ g_i &\\in g_j N_G(H) &\\implies \\\\ g_i &= g_j,\\end{aligned}\\end{align*}\n\nwhere the last line follows because we assumed that each coset contains at most one $$g_i$$.\n\nThus $$K$$ has $$k$$ distinct elements, and so \\begin{align*}= k = |K| \\leq |C_H| = n_H.\\end{align*}\n\nWe now claim that $$k \\geq n_H$$ as well.\n\nLet $$H' \\in C_H$$ be any subgroup conjugate to $$H$$, so $$H' = gHg^{-1}$$ for some $$g\\in G$$. Then $$g = g_i$$ for some $$i$$, so $$g \\in g_{i} N_G(H)$$.\n\nThus $$g = g_{i} n$$ for some $$n\\in N_G(H)$$, but $$n\\in N_G(H) \\iff nHn^{-1} = H$$ by definition, and so we have \\begin{align*}\\begin{aligned} H' &= gHg^{-1} \\\\ &= (g_i n) H (g_i n)^{-1} \\\\ &= g_i (n H n^{-1}) g_i^{-1} \\\\ &= g_i H g_i^{-1} \\in K.\\end{aligned}\\end{align*}\n\nSince $$H' \\in C_H$$ was an arbitrary subgroup conjugate to $$H$$, this says that $$C_H \\subseteq K$$ and thus \\begin{align*}n_H = |C_H| \\leq |K| = k\\end{align*}\n\nThus \\begin{align*}[G: N_G(H)] = k = |M| = |K| = n_H,\\end{align*} which is what we wanted to show. ◻\n\nLet $$G=S_5$$, the symmetric group on 5 elements. Identify all conjugacy classes of elements in $$G$$, provide a representative from each class, and prove that this list is complete.\n\nConjugacy classes in $$S_n$$ are completely determined by cycle type.\n\nThis follows because of the result on homework 1, which says that for any two cycles $$\\tau,\\sigma\\in S_n$$, we have \\begin{align*}\\tau(s_1~s_2~\\cdots~s_k)\\tau^{-1} = (\\tau(s^1)~\\tau(s^2)~\\cdots~\\tau(s_k)).\\end{align*}\n\nIn particular, this shows that the cycle type of a single cycle is invariant under conjugation. If an element $$\\sigma \\in S_n$$ is comprised of multiple cycles, say $$\\sigma = \\sigma_1 \\cdots \\sigma_\\ell$$, then \\begin{align*}\\tau(\\sigma)\\tau^{-1} = \\tau(\\sigma_1 \\cdots \\sigma_\\ell)\\tau^{-1} = (\\tau\\sigma_1\\tau^{-1})\\cdots(\\tau\\sigma_\\ell\\tau^{-1}),\\end{align*}\n\nwhich shows that the entire cycle type is preserved under conjugation. So each conjugacy class has exactly one cycle type, and distinct classes have distinct cycle types, so this completely determines the conjugacy classes.\n\nClaim 2: Cycle types in $$S_n$$ are in bijective correspondence with integer partitions of $$n$$.\n\nThis follows because any integer partition of $$n$$ can be used to obtain a canonical representative of a conjugacy class of $$S_n$$: if $$n = a_1 + a_2 + \\cdots a_n$$, we simply take a cycle of length $$a_1$$ the first $$a_1$$ integers in order, a cycle of length $$a_2$$ containing the integers $$a_1 + 1$$ to $$a_2$$ in order, and so on.\n\nConversely, any permutation can be written as a product of disjoint cycles, and when the cycles for fixed points are added in, every integer between 1 and $$n$$ will appear, and the sum of the lengths of all cycles must sum to $$n$$. Thus taking the cycle lengths yields an integer partition of $$n$$.\n\nAll integer partitions of 5 are given below, along with a canonical representative of the associated conjugacy class. \\begin{align*}\\begin{aligned} 5 && (1~2~3~4~5) \\\\ 4 + 1 && (1~2~3~4)(5) \\\\ 3 + 2 && (1~2~3)(4~5) \\\\ 3 + 1 + 1 && (1~2~3)(4)(5) \\\\ 2 + 2 + 1 && (1~2)(3~4)(5) \\\\ 2 + 1 + 1 + 1 && (1~2)(3)(4)(5) \\\\ 1 + 1 + 1 + 1 + 1 && (1)(2)(3)(4)(5) \\\\\\end{aligned}\\end{align*}  ◻\n\n## Problem Set Two\n\n### Exercises\n\nLet $$G$$ be a finitely generated abelian group in which no element (except 0) has finite order. Show that $$G$$ is a free abelian group.\n\n• Show that the additive group of rationals $$\\mathbb Q$$ is not finitely generated.\n\n• Show that $$\\mathbb Q$$ is not free.\n\n• Conclude that Exercise 9 is false if the hypothesis “finitely generated” is omitted.\n\nShow that if every Sylow $$p-$$subgroup of a finite group $$G$$ is normal for every prime $$p$$, then $$G$$ is the direct product of its Sylow subgroups.\n\nWhat is the center of the quaternion group $$Q_8$$? Show that $$Q_8/Z(Q_8)$$ is abelian.\n\nClassify up to isomorphism all groups of order 18. Do the same for orders 20 and 30.\n\nShow that every non-identity element in a free group $$F$$ has infinite order.\n\nLet $$F$$ be a free group and for a fixed integer $$n$$, let $$H_n$$ be the subgroup generated by the set $$\\{ x^n \\mathrel{\\Big|}x \\in F \\}$$. Show that $$H_n \\trianglelefteq F$$.\n\n### Qual Problems\n\nList all groups of order 14 up to isomorphism.\n\nLet $$G$$ be a group of order $$p^3$$ for some prime $$p$$. Show that either $$G$$ is abelian, or $$\\left| Z(G) \\right| = p$$.\n\nLet $$p,q$$ be distinct primes, and let $$k$$ denote the smallest positive integer such that $$p$$ divides $$q^k - 1$$. Show that no group of order $$pq^k$$ is simple.\n\nShow that $$S_4$$ is a solvable, nonabelian group.\n\n## Problem Set Three\n\n### Exercises\n\nShow that $$S_n$$ is solvable for$$n\\leq 4$$ but $$S_3$$ and $$S_4$$ are not nilpotent.\n\nShow that if $$N$$ is a simple normal subgroup of a group $$G$$ and $$G/N$$ has a composition series, then $$G$$ has a composition series.\n\nShow that any group of order $$p^2 q$$(for primes $$p,q$$) is solvable.\n\nLet $$F/K$$ be a field extension. Show that\n\n• $$[F: K] = 1$$ iff $$F = K$$.\n\n• If $$[F: K]$$ is prime, then there are no intermediate fields between $$F$$ and $$K$$.\n\n• If $$u\\in F$$ has degree $$n$$ over $$K$$, then $$n$$ divides $$[F: K]$$.\n\nShow that if $$u\\in F$$ is algebraic of odd degree over $$K$$, then so is $$u^2$$, and moreover $$K(u) = K(u^2)$$.\n\n• If $$F = \\mathbb{Q}(\\sqrt 2, \\sqrt 3)$$, compute $$[F: \\mathbb{Q}]$$ and find a basis of $$F/\\mathbb{Q}$$.\n\n• Do the same for $$\\mathbb{Q}(i, \\sqrt 3, \\zeta_3)$$ where $$\\zeta_3$$ is a complex third root of 1.\n\nShow that in $$\\mathbb{C}$$, the fields $$\\mathbb{Q}(i) \\cong \\mathbb{Q}(\\sqrt 2)$$ as vector spaces, but not as fields.\n\n### Qual Problems\n\nLet $$R$$ and $$S$$ be commutative rings with multiplicative identity.\n\n• Prove that when $$R$$ is a field, every non-zero ring homomorphism $$\\phi: R\\to S$$ is injective.\n\n• Does (a) still hold if we only assume that $$R$$ is a domain? If so, prove it, and if not provide a counterexample.\n\nDetermine for which integers the ring $$\\mathbb{Z}/n\\mathbb{Z}$$ is a direct sum of fields. Carefully prove your answer.\n\nSuppose that $$R$$ is a commutative ring. Show that an element $$r\\in R$$ is not invertible iff it is contained in a maximal ideal.\n\n• Give the definition that a group $$G$$ must satisfy the be solvable.\n\n• Show that every group $$G$$ of order 36 is solvable.\n\nHint: You may assume that $$S^4$$ is solvable.\n\n## Problem Set Four\n\n### Exercises\n\nIf $$F$$ is algebraically closed and$$E$$ is the set of all elements in $$F$$ that are algebraic over a field $$K$$, then $$E$$ is an algebraic closure of $$K$$.\n\nShow that no finite field is algebraically closed.\n\nHint: if $$K = \\{a_i\\}_{i=0}^n$$, consider \\begin{align*} f(x) = a_1 + \\prod_{i=0}^n (x - a_i) \\in K[x] \\end{align*} where $$a_1 \\neq 0$$.\n\nShow that if $$p\\in\\mathbb Z$$ is prime, then $$a^p = a$$ for all $$a\\in\\mathbb Z_p$$, or equivalently $$c^p \\equiv c \\operatorname{mod}p$$ for all $$c\\in\\mathbb Z$$.\n\nShow that if $$|K| = p^n$$, then every element of $$K$$ has a unique $$p$$th root in $$K$$.\n\nShow that every element in a finite field can be written as the sum of two squares.\n\nLet $$F/K$$ be a field extension. Let $$\\mathrm{char} K = p \\neq 0$$ and let $$n\\geq 1$$ be an integer such that $$(p, n) = 1$$. If $$v\\in F$$ and $$nv \\in K$$, then $$v\\in K$$.\n\nIf $$\\mathrm{char} K = p \\neq 0$$ and $$[F: K]$$ is finite and not divisible by $$p$$, then $$F$$ is separable over $$K$$.\n\n### Qual Problems\n\nSuppose that $$\\alpha$$ is a root in $$\\mathbb C$$ of $$P(x) = x^{17} - 2$$. How many field homomorphisms are there from $$\\mathbb Q (\\alpha)$$ to:\n\n• $$\\mathbb C$$,\n\n• $$\\mathbb R$$,\n\n• $$\\overline{\\mathbb Q}$$, the algebraic closure of $$\\mathbb Q$$?\n\nLet $$C/F$$ be an algebraic field extension. Prove that the following are equivalent:\n\n• Every non-constant polynomial $$f\\in F[x]$$ factors into linear factors over $$C[x]$$.\n\n• For every (not necessarily finite) algebraic extension $$E/F$$, there is a ring homomorphism $$\\alpha: E \\to C$$ such that $$\\alpha \\mathrel{\\Big|}_F$$ is the identity on $$F$$.\n\nHint: use Zorn’s Lemma.\n\nLet $$R$$ be a commutative ring containing a field $$k$$, and suppose that $$\\dim_k R < \\infty$$. Let $$\\alpha \\in R$$.\n\n• Show that there exist $$n\\in \\mathbb N$$ and $$\\{ c_0, c_1, \\cdots c_{n-1}\\} \\subseteq k$$ such that \\begin{align*}a^n + c_{n-1}a^{n-1} + \\cdots + c_1 a + c_0 = 0.\\end{align*}\n\n• Suppose that (a) holds and show that if $$c_0 \\neq 0$$ then $$a$$ is a unit in $$R$$.\n\n• Suppose that (a) holds and show that if $$a$$ is not a zero divisor in $$R$$, then $$a$$ is invertible.\n\n## Problem Set Five\n\n### Exercises\n\nShow that if $$f\\in K[x]$$ has degree $$n$$ and $$F$$ is a splitting field of $$f$$ over $$K$$, the $$[F: K]$$ divides $$n!$$.\n\nLet $$E$$ be an intermediate field extension in $$K \\leq E \\leq F$$.\n\n• Show that if $$u\\in F$$ is separable over over $$K$$, then $$u$$ is separable over $$E$$.\n\n• Show that if $$F$$ is separable over $$K$$, then $$F$$ is separable over $$E$$ and $$E$$ is separable over $$K$$.\n\nShow that if $$[F: K] < \\infty$$, then the following conditions are equivalent:\n\n• $$F$$ is Galois over $$K$$\n\n• $$F$$ is separable over $$K$$ and $$F$$ is a splitting field of some polynomial $$f\\in K[x]$$.\n\n• $$F$$ is a splitting field over $$K$$ of some polynomial $$f\\in K[x]$$ whose irreducible factors are separable.\n\nSuppose that $$f\\in K[x]$$ splits in$$F$$ as \\begin{align*}f = \\prod_{i=1}^k (x-u_i)^{n_i}\\end{align*} with the $$u_i$$ distinct and each $$n_i \\geq 1$$. Let \\begin{align*}g(x) = \\prod_{i=1}^k (x-u_i) = \\sum_{i=1}^k v_i x^i\\end{align*}\n\nand let $$E = K(\\{v_i\\}_{i=1}^k)$$. Then show that the following hold:\n\n• $$F$$ is a splitting field of $$g$$ over $$E$$.\n\n• $$F$$ is Galois over $$E$$.\n\n• $$\\mathrm{Aut}_E(F) = \\mathrm{Aut}_K(F)$$.\n\nDetermine the Galois groups of the following polynomials over the corresponding fields:\n\n• $$x^4- 5$$ over $$\\mathbb Q, \\mathbb Q(\\sqrt 5), \\mathbb Q(i\\sqrt 5)$$.\n\n• $$x^3 - 2$$ over $$\\mathbb Q$$.\n\n• $$(x^3-2)(x^2-5)$$ over $$\\mathbb Q$$.\n\nIf $$f \\in K[x]$$ is irreducible of degree $$m > 0$$ and $$\\mathrm{char}(K)$$ does not divide $$m$$, then $$f$$ is separable.\n\n### Qual Problems\n\nLet $$E/F$$ be a Galois field extension, and let $$K/F$$ be an intermediate field of $$E/F$$. Show that $$K$$ is normal over $$F$$ iff $$\\mathrm{Gal}(E/K) \\trianglelefteq \\mathrm{Gal}(E/F)$$.\n\nLet $$F \\subset L$$ be fields such that $$L/F$$ is a Galois field extension with Galois group equal to $$D_8 = \\left< \\sigma,\\tau \\mathrel{\\Big|}\\sigma^4 = \\tau^2 = 1,~ \\sigma\\tau = \\tau \\sigma^3 \\right>$$. Show that there are fields $$F \\subset E \\subset K \\subset L$$ such that $$E/F$$ and $$K/E$$ are Galois field extensions, but $$K/F$$ is not Galois.\n\nLet $$f(x) = x^3 - 7$$.\n\n• Let $$K$$ be the splitting field for $$f$$ over $$\\mathbb Q$$. Describe the Galois group of $$K / \\mathbb Q$$ and the intermediate fields between $$\\mathbb Q$$ and $$K$$. Which intermediate fields are not Galois over $$\\mathbb Q$$?\n\n• Let $$L$$ be the splitting field for $$f$$ over $$\\mathbb R$$. What is the Galois group $$L/ \\mathbb R$$?\n\n• Let $$M$$ be the splitting field for $$f$$ over $$\\mathbb F_{13}$$, the field with 13 elements. What is the Galois group of $$M / \\mathbb F_{13}$$?\n\n## Problem Set Six\n\n### Exercises\n\nDetermine all subgroups of the Galois group and all intermediate fields of the splitting (over $$\\mathbb{Q}$$) of the polynomial $$(x^{3}-2)(x^{2}-3)\\in \\mathbb{Q}[x]$$.\n\nLet $$K$$ be a subfield of$$\\mathbb{R}$$ and let $$f \\in K[x]$$ be an irreducible quartic. If $$f$$ has exactly 2 real roots, the Galois group of $$f$$ is either $$S_{4}$$ or $$D_{4}$$.\n\nLet $$\\phi$$ be the Euler function.\n\n• $$\\phi(n)$$ is even for $$n>2$$.\n\n• find all $$n>0$$ such that $$\\phi(n)=2$$.\n\nIf $$n>2$$ and $$\\zeta$$ is a primitive $$n$$th root of unity over $$\\mathbb{Q}$$, then $$[\\mathbb{Q}(\\zeta + \\zeta^{-1}): \\mathbb{Q}]=\\phi(n)/2.$$\n\nIf $$F$$ is a radical extension field of $$K$$ and $$E$$ is an intermediate field, then $$F$$ is a radical extension of $$E$$.\n\nLet $$K$$ be a field, $$f\\in K[x]$$ an irreducible polynomial of degree $$n\\geq 5$$ and $$F$$ a splitting field of $$f$$ over $$K$$. Assume that $$Aut_{k}(F)\\simeq S_{n}$$. Let $$u$$ be a root of $$f$$ in $$F$$. Then,\n\n• $$K(u)$$ is not Galois over $$K$$; $$[K(u):K]=n$$ and $$Aut_{K}(K(u))=1$$ (and hence solvable).\n\n• Every normal closure over $$K$$ that contains $$u$$ also contains an isomorphic copy of $$F$$.\n\n• There is no radical extension field $$E$$ of $$K$$ such that $$K\\subset K(u)\\subset E$$.\n\n### Qual Problems\n\n• Let $$K$$ be a field. State the main theorem of Galois theory for a finite field extension L/K\n\n• Let $$\\zeta_{43} := e^{2\\pi i /43}$$. Describe the group of all field automorphisms $$\\sigma : \\mathbb{Q} (\\zeta_{43})\\rightarrow \\mathbb{Q} (\\zeta_{43})$$.\n\n• How many proper subfields are there in the field $$\\mathbb{Q} (\\zeta_{43})$$?\n\nLet $$F$$ be a field and let $$f(x)\\in F[x]$$.\n\n• Define what is a splitting field of $$f(x)$$ over $$F$$.\n\n• Let $$F$$ be a finite field with $$q$$ elements. Let $$E/F$$ be a finite extension of degree $$n>0$$. Exhibit an explicit polynomial $$g(x)\\in F[x]$$ such that $$E/F$$ is a splitting of $$g(x)$$ over $$F$$. Fully justify your answer.\n\n• Show that the extension $$E/F$$ in (2) is a Galois extension.\n\nLet $$K \\subset L \\subset M$$ be a tower of finite degree field extensions. In each of the following parts, either prove the assertion or give a counterexample (with justification).\n\n• If $$M/K$$ is Galois, then $$L/K$$ is Galois\n\n• If $$M/K$$ is Galois, then $$M/L$$ is Galois.\n\n## Problem Set Seven\n\n### Exercises\n\nLet $$I$$ be a left ideal of a ring$$R$$, and let $$A$$ be an $$R-$$module.\n\n• Show that if $$S$$ is a nonempty subset of $$A$$, then \\begin{align*} IS \\coloneqq \\left\\{ \\sum_{i=1}^n r_i a_i \\mathrel{\\Big|}n\\in \\mathbb{N}^*; r_i \\in I; a_i \\in S \\right\\} \\end{align*} is a submodule of $$A$$.\n\nNote that if $$S = \\{a\\}$$, then $$IS = Ia = \\{ra \\mathrel{\\Big|}r\\in I\\}$$.\n\n• If $$I$$ is a two-sided ideal, then $$A/IA$$ is an $$R/I$$ module with the action of $$R/I$$ given by \\begin{align*}(r+I)(a+IA) = ra + IA.\\end{align*}\n\nIf $$R$$ has an identity, then a nonzero unitary $$R{\\hbox{-}}$$module is simple if its only submodules are $$0$$ and $$A$$.\n\n• Show that every simple $$R-$$module is cyclic.\n\n• If $$A$$ is simple, every $$R-$$module endomorphism is either the zero map or an isomorphism.\n\n• Show that if $$A,B$$ are $$R$$-modules, then the set $$\\mathrm{Hom}_R(A, B)$$ is all $$R$$-module homomorphisms $$A \\to B$$ is an abelian group with $$f+g$$ given on $$a\\in A$$ by \\begin{align*}(f+g)(a) \\coloneqq f(a) + g(a) \\in B.\\end{align*}\n\nAlso show that the identity element is the zero map.\n\n• Show that $$\\mathrm{Hom}_R(A, A)$$ is a ring with identity, where multiplication is given by composition of functions.\n\nNote that $$\\mathrm{Hom}_R(A, A)$$ is called the endomorphism ring of A.\n\n• Show that $$A$$ is a left $$\\mathrm{Hom}_R(A, A)$$-module with an action defined by \\begin{align*}a\\in A, f\\in \\mathrm{Hom}_R(A, A) \\implies f \\curvearrowright a \\coloneqq f(a).\\end{align*}\n\nLet the following be a commutative diagram of $$R$$-modules and $$R$$-module homomorphisms with exact rows:\n\nProve the following:\n\n• If $$\\alpha_1$$ is an epimorphisms and $$\\alpha_2, \\alpha_4$$ are monomorphisms then $$\\alpha_3$$ is a monomorphism.\n\n• If $$\\alpha_5$$ is a monomorphism and $$\\alpha_2, \\alpha_4$$ are epimorphisms then $$\\alpha_3$$ is an epimorphism.\n\nLet $$R$$ be a principal ideal domain,$$A$$ a unitary left $$R$$-module, and $$p\\in R$$ a prime (and thus irreducible) element. Define \\begin{align*}\\begin{aligned} pA &\\coloneqq \\{ pa \\mathrel{\\Big|}a\\in A\\} \\\\ A[p] &\\coloneqq \\{ a\\in A \\mathrel{\\Big|}pa = 0\\}.\\end{aligned}\\end{align*}\n\nShow the following:\n\n• $$R/(p)$$ is a field.\n\n• $$pA$$ and $$A[p]$$ are submodules of $$A$$.\n\n• $$A/pA$$ is a vector space over $$R/(p)$$, with \\begin{align*}(r + (p))(a + pA) = ra + pA.\\end{align*}\n\n• $$A[p]$$ is a vector space over $$R/(p)$$ with \\begin{align*}(r + (p))a = ra.\\end{align*}\n\nIf $$V$$ is a finite dimensional vector space and \\begin{align*}V^m \\coloneqq V \\oplus V \\oplus \\cdots \\oplus V \\quad \\text{($m$ summands)},\\end{align*} then for each $$m\\geq 1$$, $$V^m$$ is finite dimensional and $$\\dim V^m = m(\\dim V)$$.\n\nIf $$F_1, F_2$$ are free modules of a ring with the invariant dimension property, then \\begin{align*}\\mathrm{rank}(F_1 \\oplus F_2) = \\mathrm{rank} F_1 + \\mathrm{rank} F_2.\\end{align*}\n\n### Qual Problems\n\nLet $$F$$ be a field and let $$f(x) \\in F[x]$$.\n\n• State the definition of a splitting field of $$f(x)$$ over $$F$$.\n\n• Let $$F$$ be a finite field with $$q$$ elements. Let $$E/F$$ be a finite extension of degree $$n>0$$. Exhibit an explicit polynomial $$g(x) \\in F[x]$$ such that $$E/F$$ is a splitting field of $$g$$ over $$F$$. Fully justify your answer.\n\n• Show that the extension in $$(b)$$ is a Galois extension.\n\nLet $$R$$ be a commutative ring and let $$M$$ be an $$R$$-module. Recall that for $$\\mu \\in M$$, the annihilator of $$\\mu$$ is the set \\begin{align*}\\mathrm{Ann}(\\mu) = \\{ r\\in R \\mathrel{\\Big|}r\\mu = 0\\}.\\end{align*}\n\nSuppose that $$I$$ is an ideal in $$R$$ which is maximal with respect to the property there exists a nonzero element $$\\mu \\in M$$ such that $$I = \\mathrm{Ann}(\\mu)$$.\n\nProve that $$I$$ is a prime ideal in $$R$$.\n\nSuppose that $$R$$ is a principal ideal domain and $$I \\trianglelefteq R$$ is an ideal. If $$a\\in I$$ is an irreducible element, show that $$I = Ra$$.\n\n## Problem Set Eight\n\n### Exercises\n\nShow the following:\n\n• For any abelian group $$A$$ and any positive integer $$m$$, \\begin{align*} \\mathrm{Hom}(\\mathbb{Z}_m, A) \\cong A[m] \\coloneqq \\{ a\\in A \\mathrel{\\Big|}ma = 0\\} .\\end{align*}\n\n• $$\\mathrm{Hom}(\\mathbb{Z}_m, \\mathbb{Z}_n) \\cong \\mathbb{Z}_{\\mathrm{gcd}(m,n)}$$.\n\n• As a $$\\mathbb{Z}-$$module, $$\\mathbb{Z}_m^* = 0$$.\n\n• For each $$k\\geq 1$$, $$\\mathbb{Z}_m$$ is a $$\\mathbb{Z}_{mk}-$$module, and as a $$\\mathbb{Z}_{mk}$$ module, $$\\mathbb{Z}_m^* \\cong \\mathbb{Z}_m$$.\n\nLet$$\\pi: \\mathbb{Z} \\to \\mathbb{Z}_2$$ be the canonical epimorphism. Show that the induced map $$\\overline{\\pi}: \\mathrm{Hom}(\\mathbb Z_2, \\mathbb Z) \\to \\mathrm{Hom}(\\mathbb Z_2, \\mathbb Z_2)$$ is the zero map. Conclude that $$\\overline{\\pi}$$ is not an epimorphism.\n\nLet $$R$$ be a unital ring, show that there is a ring homomorphism $$\\mathrm{Hom}_R(R, R) \\to R^{op}$$ where $$\\mathrm{Hom}_R$$ denotes left $$R-$$module homomorphisms. Conclude that if $$R$$ is commutative, then there is a ring isomorphism $$\\mathrm{Hom}_R(R, R) \\cong R$$.\n\nShow that for any homomorphism$$f: A \\to B$$ of left $$R-$$modules the following diagram is commutative:\n\nwhere $$\\theta_A, \\theta_B$$ are as in Theorem 4.12 and $$f^*$$ is the map induced on $$A^{**} \\coloneqq \\mathrm{Hom}_R(\\mathrm{Hom}(A, R), R)$$ by the map \\begin{align*}\\overline f: \\mathrm{Hom}(B, R) \\to \\mathrm{Hom}_R(A, R).\\end{align*}\n\nShow that every free module over a unital integral domain is torsion-free. Show that the converse is false.\n\nLet $$A$$ be a cyclic $$R-$$module of order $$r \\in R$$.\n\n• Show that if $$s$$ is relatively prime to $$r$$, then $$sA = A$$ and $$A[s] = 0$$.\n\n• If $$s$$ divides $$r$$, so $$sk = r$$, then $$sA \\cong R/(k)$$ and $$A[s] \\cong R/(s)$$.\n\nLet $$A, B$$ be cyclic modules over $$R$$of nonzero orders $$r,s$$ respectively, where $$r$$ is not relatively prime to $$s$$. Show that the invariant factors of $$A \\oplus B$$ are $$\\mathrm{gcd}(r, s)$$ and $$\\mathrm{lcm}(r, s)$$.\n\n### Qual Problems\n\nLet $$R$$ be a PID. Let $$n > 0$$ and $$A \\in M_n(R)$$ be a square $$n\\times n$$ matrix with coefficients in $$R$$.\n\nConsider the $$R$$-module $$M \\coloneqq R^n / \\mathrm{im}(A)$$.\n\n• Give a necessary and sufficient condition for $$M$$ to be a torsion module (i.e. every nonzero element is torsion). Justify your answer.\n\n• Let $$F$$ be a field and now let $$R \\coloneqq F[x]$$. Give an example of an integer $$n>0$$ and an $$n \\times n$$ square matrix $$A \\in M_n(R)$$ such that $$M \\coloneqq R^n/\\mathrm{im}(A)$$ is isomorphic as an $$R-$$module to $$R \\times F$$.\n\n• State the structure theorem for finitely generated modules over a PID.\n\n• Find the decomposition of the $$\\mathbb{Z}-$$module $$M$$ generated by $$w,x,y,z$$ satisfying the relations \\begin{align*}\\begin{aligned} 3w + 12y + 3x + 6z &=0 \\\\ 6y &= 0 \\\\ -3w -3x + 6y &= 0. \\end{aligned}\\end{align*}\n\nLet $$R$$ be a commutative ring and $$M$$ an $$R-$$module.\n\n• Define what a torsion element of $$M$$ is .\n\n• Given an example of a ring $$R$$ and a cyclic $$R-$$module $$M$$ such that $$M$$ is infinite and $$M$$ contains a nontrivial torsion element $$m$$. Justify why $$m$$ is torsion.\n\n• Show that if $$R$$ is a domain, then the subset of elements of $$M$$ that are torsion is an $$R-$$submodule of $$M$$. Clearly show where the hypothesis that $$R$$ is a domain is used.\n\n## Problem Set Nine\n\n### Exercises\n\n• Show that the center of the ring $$M_n(R)$$ consists of matrices of the form $$rI_n$$ where $$r$$ is in the center of $$R$$.\n\nHint: Every such matrix must commute with $$\\epsilon_{ij}$$, the matrix with $$1_R$$ in the $$i,j$$ position and zeros elsewhere.\n\n• Show that $$Z(M_n(R)) \\cong Z(R)$$.\n\n• Show that if $$A, B$$ are (skew)-symmetric then $$A+B$$ is (skew)-symmetric.\n\n• Let $$R$$ be commutative. Show that if $$A,B$$ are symmetric, then $$AB$$ is symmetric $$\\iff AB=BA$$. Also show that for any matrix $$B \\in M_n(R)$$, both $$BB^t$$ and $$B+B^t$$ are always symmetric, and $$B-B^t$$ is always skew-symmetric.\n\nShow that similarity is an equivalence relation on $$M_n(R)$$, and *equivalence* is an equivalence relation on $$M_{m\\times n}(R)$$.\n\nShow that an $$n\\times m$$ matrix $$A$$over a division ring $$D$$ has an $$m\\times n$$ left inverse $$B$$ (so $$BA = I_m$$) $$\\iff \\mathrm{rank} A = m$$. Similarly, show $$A$$ has a right $$m\\times n$$ inverse $$\\iff \\mathrm{rank} A = n$$.\n\n• Show that a system of linear equations \\begin{align*} a_{11} x_{1}+a_{12} x_{2} + &\\cdots + a_{1 m} x_{m}=b_{1} \\\\ & \\vdots \\\\ a_{n 1} x_{1}+a_{n 2} x_{2}+&\\cdots+a_{n m} x_{m}=b_{n} \\end{align*} has a simultaneous solution $$\\iff$$ the corresponding matrix equation $$AX = B$$ has a solution, where $$A = (a_{ij}), X = [x_1, \\cdots, x_m]^t$$, and $$B = [b_1, \\cdots , b_n]^t$$.\n\n• If $$A_1, B_1$$ are matrices obtained from $$A, B$$ respectively by performing the same sequence of elementary row operations, then $$X$$ is a solution of $$AX=B$$ $$\\iff$$ $$X$$ is a solution of $$A_1 X = B_1$$.\n\n• Let $$C$$ be the $$n \\times (m+1)$$ matrix given by \\begin{align*} C = \\left(\\begin{array}{llll}{a_{11}} & {\\cdots} & {a_{1 m}} & {b_{1}} \\\\ {} & {} & {} \\\\ {\\cdot} & {} & {} \\\\ {a_{n 1}} & {\\cdots} & {a_{n m}} & {b_{n}}\\end{array}\\right) .\\end{align*} Then $$AX = B$$ has a solution $$\\iff$$ $$\\mathrm{rank} A = \\mathrm{rank} C$$ and the solution is unique $$\\iff \\mathrm{rank}(A) = m$$.\n\nHint: use part 2.\n\n• If $$B=0$$, so the system $$AX=B$$ is homogeneous, then it has a nontrivial solution $$\\iff \\mathrm{rank} A < m$$ and in particular $$n<m$$.\n\nLet $$R$$ be a PID. For each positive integer $$r$$ and sequence of nonzero ideals $$I_1 \\supset I_2 \\supset \\cdots \\supset I_r$$, choose a sequence $$d_i \\in R$$ such that $$(d_i) = I_i$$ and $$d_i \\mathrel{\\Big|}d_{i+1}$$.\n\nFor a given pair of positive integers $$n, m$$, let $$S$$ be the set of all $$n\\times m$$ matrices of the form $$\\left(\\begin{array}{ll}{L_{r}} & {0} \\\\ {0} & {0}\\end{array}\\right)$$ where $$r=1,2,\\cdots,\\min(m,n)$$ and $$L_r$$ is a diagonal $$r\\times r$$ matrix with main diagonal $$d_i$$.\n\nShow that $$S$$ is a set of canonical forms under equivalence for the set of all $$n\\times m$$ matrices over $$R$$.\n\n### Qual Problems\n\nLet $$R$$ be a commutative ring.\n\n• Say what it means for $$R$$ to be a unique factorization domain (UFD).\n\n• Say what it means for $$R$$ to be a principal ideal domain (PID)\n\n• Give an example of a UFD that is not a PID. Prove that it is not a PID.\n\nLet $$A$$ be an $$n\\times n$$ matrix over a field $$F$$ such that $$A$$ is diagonalizable. Prove that the following are equivalent:\n\n• There is a vector $$v\\in F^n$$ such that $$v, Av, \\cdots A^{n-1}v$$ is a basis for $$F^n$$.\n\n• The eigenvalues of $$A$$ are distinct.\n\nLet $$x,y \\in \\mathbb{C}$$ and consider the matrix\n\n\\begin{align*}M = \\left[\\begin{array}{ccc} 1 & 0 & x \\\\ 0 & 1 & 0 \\\\ y & 0 & 1 \\end{array}\\right]\\end{align*}\n\n• Show that $$[0, 1, 0]^t$$ is an eigenvector of $$M$$.\n\n• Compute the rank of $$M$$ as a function of $$x$$ and $$y$$.\n\n• Find all values of $$x$$ and $$y$$ for which $$M$$ is diagonalizable.\n\n## Problem Set Ten\n\n### Exercises\n\nLet $$B$$ be an $$R$$-module. Show that if $$r+r\\neq 0$$ for all $$r\\neq 0 \\in R$$, then an $$n$$-linear form $$B^n\\to R$$ is alternating $$\\iff$$ it is skew-symmetric.\n\nIf $$R$$ is a field and $$A, B \\in M_n(R)$$ are invertible then the matrix $$A + rB$$ is invertible for all but a finite number of $$r\\in R$$.\n\nShow that if $$q$$ is the minimal polynomial of a linear transformation $$\\phi: E\\to E$$ with $$\\dim_k E = n$$ then $$\\deg q \\leq n$$.\n\nShow that $$A\\in M_n(K)$$ is similar to a diagonal matrix $$\\iff$$ the elementary divisors of $$A$$ are all linear.\n\nFind all possible rational canonical forms for a matrix $$A\\in M_n(\\Bbb Q)$$ such that\n\n• $$A$$ is $$6\\times 6$$ with minimal polynomial $$q(x) = (x-2)^2(x+3)$$.\n\n• $$A$$ is $$7\\times 7$$ with $$q(x) = (x^2+1)(x-7)$$.\n\nAlso find all such forms when $$A \\in M_n(\\Bbb C)$$ instead, and find all possible Jordan Canonical Forms over $$\\Bbb C$$.\n\nShow that if $$\\phi$$ is an endomorphism of a free $$k$$-module $$E$$ of finite rank, then $$p_\\phi(\\phi) = 0$$.\n\nHint: If $$A$$ is the matrix of $$\\phi$$ and $$B = x I_n - A$$ then \\begin{align*} B^a B = |B| I_n = p_\\phi I_n \\in M_n(k[x]) .\\end{align*} If $$E$$ is a $$k[x]$$-module with structure induced by $$\\phi$$, and $$\\psi$$ is the $$k[x]$$-module endomorphism $$E\\to E$$ with matrix given by $$B$$, then \\begin{align*} \\psi(u) = x u -\\phi(u) = \\phi(u) - \\phi(u) = 0 && \\forall u\\in E .\\end{align*}\n\n• Let $$\\phi,\\psi$$ be endomorphisms of a finite-dimensional vector space $$E$$ such that $$\\phi\\psi = \\psi \\phi$$. Show that if $$E$$ has a basis of eigenvectors of $$\\psi$$, then it has a basis of eigenvectors for both $$\\psi$$ and $$\\phi$$ simultaneously.\n\n• Interpret the previous part as a statement about matrices similar to a diagonal matrix.\n\n### Qual Problems\n\nLet $$M \\in M_5(R)$$ be a $$5\\times 5$$ square matrix with real coefficients defining a linear map $$L: \\Bbb{R}^5 \\to \\Bbb R^5$$. Assume that when considered as an element of $$M_5(\\Bbb C)$$, then the scalars $$0, 1+i, 1+2i$$ are eigenvalues of $$M$$.\n\n• Show that the associated linear map $$L$$ is neither injective nor surjective.\n\n• Compute the characteristic polynomial and minimal polynomial of $$M$$.\n\n• How many fixed points can $$L$$ have?\n\n(That is, how many solutions are there to the equation $$L(v) = v$$ with $$v\\in \\Bbb R^5$$?)\n\nLet $$n$$ be a positive integer and let $$B$$ denote the $$n\\times n$$ matrix over $$\\Bbb C$$ such that every entry is 1. Find the Jordan normal form of $$B$$.\n\nSuppose that $$V$$ is a 6-dimensional vector space and that $$T$$ is a linear transformation on $$V$$ such that $$T^6 = 0$$ and $$T^5\\neq 0$$.\n\n• Find a matrix for $$T$$ in Jordan Canonical form.\n\n• Show that if $$S, T$$ are linear transformations on a 6-dimensional vector space $$V$$ which both satisfy $$T^6=S^6=0$$ and $$T^5,S^5\\neq 0$$, then there exists a linear transformation $$A$$ from $$V$$ to itself such that $$ATA^{-1} = S$$." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7829958,"math_prob":1.0000099,"size":37619,"snap":"2022-40-2023-06","text_gpt3_token_len":13185,"char_repetition_ratio":0.17338827,"word_repetition_ratio":0.04254628,"special_character_ratio":0.3857891,"punctuation_ratio":0.09489434,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.00001,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-01T08:36:21Z\",\"WARC-Record-ID\":\"<urn:uuid:b86a711f-b57b-4541-8d54-d1bfef0561af>\",\"Content-Length\":\"141220\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5973ef21-20bc-4b39-a3e4-752c53b403bd>\",\"WARC-Concurrent-To\":\"<urn:uuid:e7d1b5de-4c27-4cca-a7c9-4b22c8ba3a76>\",\"WARC-IP-Address\":\"159.223.102.204\",\"WARC-Target-URI\":\"https://quals.dzackgarza.com/10_Algebra/500_Exercises/9960%20UGA%20Problems.html\",\"WARC-Payload-Digest\":\"sha1:QPT52AHMZUKQ7FC26G2Z63GGCN2MC7YW\",\"WARC-Block-Digest\":\"sha1:EDFO3UVOJYBVKU4BY7XWW6AVRC76GSPV\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335573.50_warc_CC-MAIN-20221001070422-20221001100422-00791.warc.gz\"}"}
https://chemistry.stackexchange.com/questions/tagged/inorganic-chemistry?tab=newest&page=5
[ "The Stack Overflow podcast is back! Listen to an interview with our new CEO.\n\nQuestions tagged [inorganic-chemistry]\n\nInorganic compounds generally do not have C-H bonds, while organic compounds do have such bonds. The distinction between inorganic and organic chemistry, however, is far from absolute.\n\n3,277 questions\nFilter by\nSorted by\nTagged with\n158 views\n\nHow pure gold is obtained back from dissolved state in Aqua regia?\n\nI know Aqua regia is used for purifying gold by dissolving gold in it, but how that dissolved gold is obtained back in the pure state? I searched everywhere, but I didn't get the answer. So, I am ...\n34 views\n\nIs sodium acrylate soluble in ethanol?\n\nI am trying to make sodium acrylate by neutralizing acrylic acid with sodium hydroxide. I further want to photo-pattern it, which requires the addition of photoinitiator to sodium acrylate. The ...\n55 views\n\nMolar conductivity of transition metal complexes solutions [closed]\n\nWhich of the following has the highest molar conductivity? (A) Diaminedichloroplatinum(I) (B) Tetraamminedichlorocobalt(III) chloride (C) Potassium hexacyanoferrate(II) (D) Hexaaquochromium(...\n74 views\n\nOxidation state of carbon\n\nHow do we find the oxidation state of individual carbon in Mg₃C₂. Explain with the help of structure if possible. For the average oxidation number, we can exploit the fact that the molecule will be ...\n37 views\n\nWhy is the order of reflection simplified to n = 1?\n\nMy professor told us that for the sake of simplicity, we will assume that the order of reflection for Braggs' Law is always equal to 1 but failed to explain why. Is it because d(h,k,l) for materials ...\n33 views\n\nDetermining geometry of coordination compund without experimental data [closed]\n\nHow can I determine if a coordination compound has a tetrahedral or square planar geometry without any experimental data (such as magnetic spin) by just looking at its formula? For example, what is ...\n47 views\n\nWhy are atomic radii calculations all over the map? [closed]\n\nIf you look up an element on Wikipedia, it will list covalent, ionic, Van Der Waals, high-and-low -spin, and finally 'empirical atomic radius'. Then, on the page for atomic radius, the chart of '...\n223 views\n\nWill silicon dioxide react with hydrochloric acid?\n\nI have the following equation, based on the reaction of $\\ce{SiO2}$ with $\\ce{HF}:$ $$\\ce{SiO2 + HCl -> SiCl4 + 2 H2O}$$ I want to know if this reaction is indeed feasible, what conditions may be ...\n66 views\n\nTitration of barium(II) hydroxide by hydrochloric acid\n\n$\\pu{25 ml}$ of $\\pu{0.024 M}$ $\\ce{HCl}$ is titrated into a volumetric flask which initially contains $\\pu{45 ml}$ of $\\pu{0.034 M}$ $\\ce{Ba(OH)2}$. Calculate the $\\mathrm{pH}$. This is how I ...\n37 views\n\nWhy is the ionization energy of thallium less than that of lead?\n\nDoes lanthanoid contraction not affect the ionization energy trend of thallium, lead, and bismuth? My book says the trend for ionization energy is Tl< Pb< Bi.\n28 views\n\nOccurence of double displacement reaction [duplicate]\n\n$\\ce{AgNO3 + NaCl}$ gives $\\ce{NaNO3 + AgCl}$ but why it's vice versa is not possible. My question is how to predict if a double displacement reaction will occur naturally or not.\n83 views\n\nWhy is Polonium the only metal to crystallize forming Simple Cubic Cell?\n\nI have read that Polonium is the only metal that crystallizes forming SCC. I searched for a concrete explanation but all they were saying is the stability of Polonium at STP. I can't really comprehend ...\n25 views\n\nOxidation of Hexaaquachrom (II) with air\n\nI had the reaction: $$\\ce{Cr(H2O)6^3+ -> Cr(H2O)6^2+}$$ using $\\ce{Zn}$ as a reducing agent. the colour turning from green to blue and I know that with contact with air the solution becomes ...\n57 views\n\nHow to oxidize tantalum? [closed]\n\nI am interested in learning how to oxidize tantalum. I have seen some tantalum rings that the sellers say is a permanent smokey blackish color. But I've spoken to some people that say tantalum cannot ...\n47 views\n\nHow do I do stoichiometry for 2 limiting reactants\n\nThe Drano reaction produces sodium aluminate along with hydrogen gas. If a typical container of Drano weighs 500 g which is 35% by weight by weight sodium (l) hydroxide and 2.5% by weight aluminum, ...\n57 views\n\nWhen H2NCH2CH2PH2 acts a monodentate ligand, it is the phosphine end that chelates. Why is that?\n\nIn some occasions, if the ligand acts on Pd it do so as a monodentate ligand. I am attempting to explain this phenomenon but came into a block.\n71 views\n\n104 views\n\n25 views\n\nHow do you remove lumps in reagents without contaminating them?\n\nI think desiccating the powdered reagent would help remove lumps (at least in preventing lump neoformation) but would desiccation alone collapse all lumps in a powder (say KCl as it lumps easily), or ...\n1k views\n\nWhat is \"dot\" sign in •NO? I know that it is radical nitric oxide, but I don't know if it is necessary to put the \"dot\". Is there any difference between •NO and NO?\n583 views\n\nTesting thermite for chemical properties\n\nI'm writing a movie in which a bunch of military explosive ordnance experts destroy a turbine with thermite and the local fire chief has to work out whether it is plain $\\ce{Fe2O3}$ and aluminium ...\n68 views\n\nMixing cobalt(III) hydroxide and thallium(III) hydroxide\n\nA simple question on solutions is driving me crazy. At this point, I think the textbook's wrong. Here's the question: A saturated solution of cobalt(III) hydroxide $(K_\\mathrm{sp} = \\pu{1.6e-44})$ ...\n59 views\n\nHow can I neutralise H2 gas without burning it? [closed]\n\nI was thinking of maybe making it bubble into a solution containing something that would react with H2 yielding either a dissolved substance or a precipitate from the reaction. Maybe a solution with ...\n25 views\n\nDosing leaves with Zinc Nitrate for pollution experiment - Need specific concentration\n\nI am trying to assess the pollution tolerance of an insect using Zn as a proxy. I have a supply of Zinc Nitrate Hexahydrate that I want to use to contaminate dried leaves (the insect's food). The LD50 ...\n48 views\n\nIs this balanced redox equation correct? [closed]\n\nI'm trying to balance an equation using oxidation numbers $\\ce{MnO4^- + H+ + Cl- -> Mn^2+ + Cl2 + H2O}$ my suggestion: $\\ce{MnO4- + 8H+ + 5Cl- → Mn^2+ + 2.5Cl2 + 4H2O}$ the 2.5 $\\ce{Cl2}$ is ...\n23 views\n\nHow do I calculate the proportion of respective conjugates of one base mixed with several acids (and/or conversely) at different temperatures? [closed]\n\nHow do I calculate the proportion of respective conjugates of one base mixed with several acids (and/or conversely) at different temperatures, and is there a free software tool that would allow me to ...\n34 views\n\n“Hairy” corrosion on anodized alu-part in water\n\nI got a water tank with a mechanical assembly in. The assembly consist of parts of anodized aluminium mounted on stainless steel plates (AISI 304). This is submerged down in fresh water. The tank is ...\n22 views\n\nBook Recommendations for Inorganic Chemistry Mechanisms [duplicate]\n\nI am looking for a book which has details or basics to reaction mechanisms for inorganic chemistry for highschool level(preferably) or maybe undergrad level. Basically I am looking for a book which ...\n44 views\n\nRedox titration or iron(II)\n\nThe concentration of $\\ce{Fe^2+(aq)}$ can be determined by a redox titration using A. $\\ce{KBr}$ B. $\\ce{SnCl2}$ C. $\\ce{KMnO4}$ (basic) D. $\\ce{KBrO3}$ (acidic) Can anyone please ...\nEDIT I am forced to reword my question about a chemical mixing ratio. I have seen in Wikipedia that peroxide ($\\ce{H2O2}$) and Acetic Acid can be mixed to Peracetic acid - this is an equilibrium. I ...\nI know $\\ce{HCl}$ and $\\ce{H2SO4}$ acid of concentration 17 M is dangerous and corrosive, but I wonder can we dilute these acids to the extent that they become safe to touch? If yes, then what should ..." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.91442096,"math_prob":0.8983242,"size":14256,"snap":"2019-43-2019-47","text_gpt3_token_len":3811,"char_repetition_ratio":0.12868369,"word_repetition_ratio":0.03505843,"special_character_ratio":0.24894781,"punctuation_ratio":0.10697506,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95316017,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-21T20:32:42Z\",\"WARC-Record-ID\":\"<urn:uuid:95fc92dd-21c0-4dd0-bc93-470dd3aac3fd>\",\"Content-Length\":\"254495\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e560aced-79e2-4f3b-bcf6-d0f5b608a2d4>\",\"WARC-Concurrent-To\":\"<urn:uuid:be8dc88a-0362-4256-824e-2092146af10c>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://chemistry.stackexchange.com/questions/tagged/inorganic-chemistry?tab=newest&page=5\",\"WARC-Payload-Digest\":\"sha1:G3UHNPJOOYTT7F7DA6NH3QJNZPTST7YF\",\"WARC-Block-Digest\":\"sha1:GDW5URRGOAZQLZGR3FUIHKGEMAPY2IPA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570987787444.85_warc_CC-MAIN-20191021194506-20191021222006-00119.warc.gz\"}"}
https://csharp.2000things.com/2011/09/06/
[ "## #405 – Equals Method for Equivalence, == Operator for Identity\n\nYou can check for equality between two objects by calling the Equals method or by using the == operator.  There are some differences between how the methods work, but both Equals and == can be overloaded in a user-defined type.\n\nYou can therefore change the behavior of one of these methods, or both.  The question is–how should these two behaviors work for a custom class?\n\nRoughly speaking, the desired behavior, from a client’s point of view is:\n\n• Use Equals method to determine value equality, or equivalence–do the two objects represent the same thing?\n• Use == operator to determine reference equality, or identity–do the two references point to exactly the same object?\n\n``` Dog d1 = new Dog(\"Lassie\", 7);" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.83828443,"math_prob":0.97234285,"size":1067,"snap":"2020-10-2020-16","text_gpt3_token_len":244,"char_repetition_ratio":0.11853246,"word_repetition_ratio":0.0,"special_character_ratio":0.24179944,"punctuation_ratio":0.12626262,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9808762,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-22T04:18:42Z\",\"WARC-Record-ID\":\"<urn:uuid:ec8d6141-b345-4040-b419-881f101da5f2>\",\"Content-Length\":\"62369\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8d60acd0-3671-483f-8453-62eabeac55d4>\",\"WARC-Concurrent-To\":\"<urn:uuid:7c8b8d72-a92a-48e9-8d1e-2f81f70976e5>\",\"WARC-IP-Address\":\"192.0.78.25\",\"WARC-Target-URI\":\"https://csharp.2000things.com/2011/09/06/\",\"WARC-Payload-Digest\":\"sha1:ZIBU47SEXVFZNIQU2ABJDO4NNKGKDQW2\",\"WARC-Block-Digest\":\"sha1:6QS2EBXX5GRVU5F2SFJ3JICTVQDL5Z3N\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875145648.56_warc_CC-MAIN-20200222023815-20200222053815-00546.warc.gz\"}"}
https://hellothinkster.com/curriculum-us/algebra-1/algebra-foundations/real-numbers/
[ "Thinkster is proud to announce the acquisition of AI EdTech company SelectQ.io as part of our family post acquisition.\nSee Press Release for Details\n\n# Real Numbers\n\nIdentifying and evaluating situations in which opposite quantities combine to make zero. Expressing rational numbers in the standard form. Identifying equivalent rational numbers of given numbers. Understanding and determining the absolute value of numbers. Solving real-world problems that involve understanding the absolute value of a number. Applying the commutative, associative, and distributive properties. Understanding the impact of the negative sign in multiplication of rational numbers and applying the same to real-world mathematical problems.\n\n#### Mapped to CCSS Section# 6.EE.A.2b, 7.NS.A.1a, 7.NS.A.1b, 7.NS.A.1d, 7.NS.A.2a, 7.NS.A.2b, 7.NS.A.2c, 7.NS.A.2d, 7.NS.A.3\n\nDescribe situations in which opposite quantities combine to make 0. For example, a hydrogen atom has 0 charge because its two constituents are oppositely charged. Understand p + q as the number located a distance |q| from p, in the positive or negative direction depending on whether q is positive or negative. Show that a number and its opposite have a sum of 0 (are additive inverses). Interpret sums of rational numbers by describing real-world contexts. Apply properties of operations as strategies to add and subtract rational numbers. Understand that multiplication is extended from fractions to rational numbers by requiring that operations continue to satisfy the properties of operations, particularly the distributive property, leading to products such as (-1)(-1) = 1 and the rules for multiplying signed numbers. Interpret products of rational numbers by describing real-world contexts. Understand that integers can be divided, provided that the divisor is not zero, and every quotient of integers (with non-zero divisor) is a rational number. If p and q are integers, then -(p/q) = (-p)/q = p/(-q). Interpret quotients of rational numbers by describing real-world contexts. Apply properties of operations as strategies to multiply and divide rational numbers. Convert a rational number to a decimal using long division; know that the decimal form of a rational number terminates in 0s or eventually repeats. Solve real-world and mathematical problems involving the four operations with rational numbers. Identify parts of an expression using mathematical terms (sum, term, product, factor, quotient, coefficient); view one or more parts of an expression as a single entity. For example, describe the expression 2 (8 + 7) as a product of two factors; view (8 + 7) as both a single entity and a sum of two terms." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9138146,"math_prob":0.98398244,"size":2533,"snap":"2022-27-2022-33","text_gpt3_token_len":546,"char_repetition_ratio":0.15539739,"word_repetition_ratio":0.082666665,"special_character_ratio":0.20844848,"punctuation_ratio":0.15605749,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.997475,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-30T22:29:04Z\",\"WARC-Record-ID\":\"<urn:uuid:3a66fed5-a176-473b-8db5-0aaefde71484>\",\"Content-Length\":\"328310\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1a33dfdc-c23e-4d2d-a1a6-e07e9be1ab85>\",\"WARC-Concurrent-To\":\"<urn:uuid:f02c0914-06f6-4df3-81f2-14a393737d06>\",\"WARC-IP-Address\":\"151.101.194.132\",\"WARC-Target-URI\":\"https://hellothinkster.com/curriculum-us/algebra-1/algebra-foundations/real-numbers/\",\"WARC-Payload-Digest\":\"sha1:W6O2ZT3GKEOCJHFX7NAHKKTQ6MFMOZ6E\",\"WARC-Block-Digest\":\"sha1:TRAHZLEKFQOPQH5IPHCGIVSMNAHJI7XJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103915196.47_warc_CC-MAIN-20220630213820-20220701003820-00032.warc.gz\"}"}
https://math.stackexchange.com/questions/3132243/bezier-curve-constrained-shortest-path-and-minimum-time-is-the-optimal-curve-a
[ "# Bezier curve, constrained shortest path and minimum time: is the optimal curve always of minimal degree?\n\nIn the unconstrained case, the shortest path between two points in arbitrary dimension is given by a straight line, which is also a Bezier curve of degree one, with two control points corresponding to the desired start and end positions.\n\nIf additional constraints apply (initial / end velocities and acceleration), the constraints are expressed using additional control points, one per constraint.\n\nFor instance, if the initial velocity is constrained, a Bezier curve of degree at least 2 is required to satisfy the constraints (3 control points).\n\nI. Is the Bezier curve of minimum length satisfying the constraints given by the Bezier curve of minimum degree? This means, adding additional control points will not allow to find a shortest curve.\n\nWhen the initial / end velocities are either unconstrained or constrained to be 0, this intuition is trivially verified.\n\nOne argument, not a proof, in favor of this theory is that the length of a Bezier curve is bounded by the perimeter of its control points: additional control points can only increase this bound.\n\nEDIT: For this question, the answer has been proven to be no. However I think my second question stands. The minimum time seems to be a compromise between the shortest path and the minimum curvature of a curve\n\nII. Considering linear bounds on the admissible velocities and acceleration, is the curve connecting two states in the minimum amount of time a curve of minimal degree?\n\nEDIT 2: For this question, we'll consider a change of variable to integrate unnormalized time. If s, 0 <= s <= 1 is the parametric variable, we can introduce a total time T for the curve $$\\mathbf{B}(s)$$ and use a change of variable to obtain a curve $$\\mathbf{C}(t) = \\mathbf{B}(\\frac{t}{T})$$, which means $$s = \\frac{t}{T}$$.\n\nThe derivatives of $$\\mathbf{C}(t)$$ are obtained similarly to those of $$\\mathbf{B}(s)$$, but each derivative is then premultiplied by $$\\frac{1}{T}$$:\n\n$$\\mathbf{C}'(t) = \\frac{1}{T} B'(\\frac{t}{T})$$\n\nWe are then interested in finding the minimum value of $$T$$ such that the velocity / acceleration bounds are satisfied.\n\nIf for instance, the start velocity is constrained but not the end velocity, with a minimal number of control points (3), T is uniquely defined. If more control points are added, there are multiple options for both the end velocity and the minimal value of T.\n\nMy question is whether the minimum T in the minimal case T is the minimum over all possible curves of any degree that match the constraints.\n\nIf by velocity you mean $$\\mathbf{B}'(t)$$, then the diagram below shows that the answer to your first question is no. The red curve is the quadratic Bézier $$(ACB)$$, the green curve is the quintic Bézier $$APDEQB$$. Control points $$P$$ and $$Q$$ satisfy $$AP/AC=BQ/BC=2/5$$, so that initial and final velocities are the same for both curves. But green curve is shorter.\n\nEDIT.\n\nInitial velocity is $$\\mathbf{B}'(0)=2(C-A)$$ for the quadratic Bézier and $$\\mathbf{B}'(0)=5(P-A)$$ for the quintic Bézier. But $$PA/CA=2/5$$, hence those two results are equal, both in direction and magnitude. The same holds for $$\\mathbf{B}'(1)$$.\n\nEDIT 2.\n\nWith your definition of velocity, every Bézier curve is covered in unit time: $$t=\\int_0^L{ds\\over v}=\\int_0^1{|\\mathbf{B}'(t)|dt\\over|\\mathbf{B}'(t)|}= \\int_0^1dt=1.$$\n\nWhich, after all, is obvious: a point on any Bézier joining $$A$$ and $$B$$ \"starts\" from $$A$$ at $$t=0$$ and \"arrives\" at $$B$$ at $$t=1$$.\n\n• Hi, thanks. Similarly to the below answer however, I am not just interested in the direction, but also in the norm of the derivatives. In these examples C is necessarily the second and the one before last control point, otherwise this constraint is not satisfied – Steve T. Mar 2 at 13:10\n• The derivatives also have the same length, with that choice of $P$ and $Q$. – Aretino Mar 2 at 14:21\n• I added an explanation to my answer. – Aretino Mar 2 at 14:47\n• I forgot that the degree of the curve matters in the computation of the velocity, I see thanks. – Steve T. Mar 2 at 22:20\n• I think my second question still stands though. It seems the green curve has a curvature that prevents following it at the same velocity than the red one, and so I wonder whether, in spite of being longer, the red curve can't be traveled faster ? – Steve T. Mar 3 at 8:59\n\nThis picture shows two curves:", null, "The blue one is cubic (degree 3). The red one is quartic (degree 4). The two curves have the same starting and ending first derivatives (i.e. the same starting and ending \"velocities\" in your terminology). More specifically, the start/end derivatives have the same directions and the same lengths.\n\nThe red curve is obviously shorter.\n\nTake the case where we constrain starting/ending locations and starting/ending directions. Suppose the start point is $$A$$, the end point is $$C$$, and the start and end tangents intersect at $$B$$. Clearly a quadratic Bezier curve with control points $$A, B, C$$ satisfies the constraints.\nHowever, consider the cubic curve with control points $$A$$, $$(1-k)A + kB$$, $$kB + (1-k)C$$, $$C$$. If $$k$$ is small (say $$k = 0.1$$, for example), then the cubic curve is shorter than the quadratic one. In fact, as $$k \\to 0$$, the cubic curve becomes the straight line between $$A$$ and $$C$$." ]
[ null, "https://i.stack.imgur.com/w2G1N.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9074796,"math_prob":0.99950254,"size":2478,"snap":"2019-26-2019-30","text_gpt3_token_len":553,"char_repetition_ratio":0.14955537,"word_repetition_ratio":0.014851485,"special_character_ratio":0.22276029,"punctuation_ratio":0.094017096,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999616,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-07-21T21:40:03Z\",\"WARC-Record-ID\":\"<urn:uuid:2f3ff400-a60e-4b68-bc57-3733e3367259>\",\"Content-Length\":\"161094\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3f0306d4-e901-414f-bee7-619ba39cfef4>\",\"WARC-Concurrent-To\":\"<urn:uuid:51fabf49-96cc-427d-b944-fd17989e29f8>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/3132243/bezier-curve-constrained-shortest-path-and-minimum-time-is-the-optimal-curve-a\",\"WARC-Payload-Digest\":\"sha1:GBFYRPQJSFO7KLDLNXUPGHXSRHQTL2KN\",\"WARC-Block-Digest\":\"sha1:2MW4UGG6IDKQW7CNLOAN3IITP5Z4X762\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-30/CC-MAIN-2019-30_segments_1563195527204.71_warc_CC-MAIN-20190721205413-20190721231413-00368.warc.gz\"}"}
https://www.dreamwings.cn/hdu6059/4901.html
[ "# HDU 6059 Kanade’s trio (字典树)\n\nGive you an array $A[1..n]$ ,you need to calculate how many tuples $(i,j,k)$ satisfy that $(i ## Input There is only one integer T on first line. For each test case , the first line consists of one integer n ,and the second line consists of n integers which means the array$A[1..n]$## Output For each test case , output an integer , which means the answer. ## Sample Input 1 5 1 2 3 4 5 ## Sample Output 6 ## 题意 给定一个序列,寻找有多少个组合$(i,j,k)$,满足$i思路\n\nnode.next 为字典树中节点的后继, node.cnt 为当前节点被访问的次数。\n\n• 当 $k_p=1,i_p=0$ 时, $j_p$ 必须为 $0$ 才能使得 $(A_i \\oplus A_j)<(A_j \\oplus A_k)$ ,对于 $j$ 来说其他位随意。\n• 当 $k_p=0,i_p=1$ 时, 同理 $j_p$ 必须为 $1$ ,其他位随意。\n\n(设 $A_k[p]$ 对应节点为 child ,与其同父亲的另一个节点为 xchild\n\n• 高位相同,低位随意,即 $i_{high}=j_{high},j_{high}=k_{high}$ ,因为前 $k-1$ 个数字已经被插入到了字典树,因此我们当前判断到第 $p$ 位时,需要在 trie[xchild].cnt 个数字中挑出两个作为 $i,j$ ,其结果为 $C_{trie[xchild].cnt}^{2}$ 。\n• 高位不同,低位随意,即 $k_{high}!=j_{high},k_{high}=i_{high}$ ,此时 $A_i$ 共有 trie[xchild].cnt 种选择, $A_j$ 共有 cnt[i][1-num[i]]-trie[xchild].cnt 种选择,根据乘法原理,总贡献为 $(cnt[i][1-num[i]]-trie[xchild].cnt)×trie[xchild].cnt$ ,不过这部分会计算出一些不合法的结果,我们需要减掉它。(比如 $i>j,((A[i]\\ xor\\ A[j])<(A[j]\\ xor\\ A[k]))$ 的情况) 统计 node.ext 的方式为在将第 $k$ 个数的贡献统计后,将其视作 $i$ ,则前 $k-1$ 个数有多少能与之在对应 $p$ 位相同,就能构成多少 $i>j$ 的方案。\n\n## AC 代码\n\n#include <iostream>\n#include <cstdio>\n#include <cstring>\n#include <algorithm>\nusing namespace std;\ntypedef __int64 LL;\nconst int maxm = 32;\nconst int maxn = 5e5+10;\n\nint n,num[maxm],a[maxn],cnt[maxm],tot;\nLL ext,ans;\n\nstruct node\n{\nint next;\nint cnt,ext;\n} trie[maxn*maxm];\n\nvoid call(int tmp,int i)\n{\nans+=trie[tmp].cnt*1LL*(trie[tmp].cnt-1)/2; // 前面有 trie[tmp].cnt 个,从中挑选两个分别代表 i,j\next+=(cnt[i][1-num[i]]-trie[tmp].cnt)*1LL*trie[tmp].cnt-trie[tmp].ext;\n}\n\nvoid tree_insert(int index)\n{\nint tmp=0;\nfor(int i=0; i<30; i++)\n{\nif(!trie[tmp].next[num[i]])\ntrie[tmp].next[num[i]]=++tot;\nif(trie[tmp].next[1-num[i]])\ncall(trie[tmp].next[1-num[i]],i);\ntmp=trie[tmp].next[num[i]];\ntrie[tmp].cnt++;\ntrie[tmp].ext+=cnt[i][num[i]]-trie[tmp].cnt;\n}\n}\n\nint main()\n{\nios::sync_with_stdio(false);\nint T;\ncin>>T;\nwhile(T--)\n{\nmemset(trie,0,sizeof(trie));\nmemset(cnt,0,sizeof(cnt));\ntot=ans=ext=0;\nint n;\ncin>>n;\nfor(int i=1; i<=n; i++)\n{\ncin>>a[i];\nint tmp=a[i];\nfor(int j=30-1; j>=0; j--)\n{\nnum[j]=tmp%2;\ncnt[j][tmp%2]++;\ntmp>>=1;\n}\ntree_insert(i);\n}\ncout<<ans+ext<<endl;\n}\nreturn 0;\n}" ]
[ null ]
{"ft_lang_label":"__label__zh","ft_lang_prob":0.6442971,"math_prob":0.9995881,"size":2615,"snap":"2019-51-2020-05","text_gpt3_token_len":1402,"char_repetition_ratio":0.12217541,"word_repetition_ratio":0.1952862,"special_character_ratio":0.3617591,"punctuation_ratio":0.1641541,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99987614,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-18T02:38:56Z\",\"WARC-Record-ID\":\"<urn:uuid:8db399ff-0265-4ed9-9b34-680c83fbf787>\",\"Content-Length\":\"45746\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:dc5c8882-cd07-4537-9096-7e25ef197ba9>\",\"WARC-Concurrent-To\":\"<urn:uuid:cd7a656c-998e-449b-af4a-f43923ad40a5>\",\"WARC-IP-Address\":\"47.103.31.248\",\"WARC-Target-URI\":\"https://www.dreamwings.cn/hdu6059/4901.html\",\"WARC-Payload-Digest\":\"sha1:PURY64FPCETHN6K2E4YMK73GB5VTPNAB\",\"WARC-Block-Digest\":\"sha1:FRPNQYCA37QJ2RNFGDHSI7DLW3HTAVN7\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250591763.20_warc_CC-MAIN-20200118023429-20200118051429-00393.warc.gz\"}"}
https://www.nocread.com/how-to-write-exponential-equations-from-a-graph.html
[ "Submit Book\n\n# How To Write Exponential Equations From A Graph\n\nThe best free book collections for how to write exponential equations from a graph. Bellow are showing the best book associates with how to write exponential equations from a graph!" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7314549,"math_prob":0.98054415,"size":5300,"snap":"2019-13-2019-22","text_gpt3_token_len":1206,"char_repetition_ratio":0.22469789,"word_repetition_ratio":0.14379947,"special_character_ratio":0.24660377,"punctuation_ratio":0.052443385,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9594288,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-03-23T22:47:34Z\",\"WARC-Record-ID\":\"<urn:uuid:e8ddc1cb-bb07-4847-9be0-0747a13d297c>\",\"Content-Length\":\"28263\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ad1a7993-07c3-4b73-b4c9-712998854ac2>\",\"WARC-Concurrent-To\":\"<urn:uuid:71128d44-4fda-439b-8dc4-bd9fb21e21c1>\",\"WARC-IP-Address\":\"104.27.180.248\",\"WARC-Target-URI\":\"https://www.nocread.com/how-to-write-exponential-equations-from-a-graph.html\",\"WARC-Payload-Digest\":\"sha1:42QEHFPENU7OHODP43VYTG4LGQEKPTT5\",\"WARC-Block-Digest\":\"sha1:NXLXEMH4XKNMDHYZLOYXWGCSO24XP3CH\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-13/CC-MAIN-2019-13_segments_1552912203093.63_warc_CC-MAIN-20190323221914-20190324003914-00036.warc.gz\"}"}
https://www.elsevier.com/books/concise-vector-analysis/eliezer/978-0-08-009951-4
[ "# Concise Vector Analysis\n\n## 1st Edition\n\n### The Commonwealth and International Library of Science, Technology, Engineering and Liberal Studies: Mathematics Division\n\n0.0 star rating Write a review\nAuthors:\nEditors:\neBook ISBN: 9781483141930\nImprint: Pergamon\nPublished Date: 1st January 1963\nPage Count: 164\nSales tax will be calculated at check-out Price includes VAT/GST\n31.95\n27.16\n19.99\n16.99\n24.95\n21.21\nUnavailable\nPrice includes VAT/GST\n\n## Description\n\nConcise Vector Analysis is a five-chapter introductory account of the methods and techniques of vector analysis. These methods are indispensable tools in mathematics, physics, and engineering. The book is based on lectures given by the author in the University of Ceylon.\n\nThe first two chapters deal with vector algebra. These chapters particularly present the addition, representation, and resolution of vectors. The next two chapters examine the various aspects and specificities of vector calculus. The last chapter looks into some standard applications of vector algebra and calculus.\n\nThis book will prove useful to applied mathematicians, students, and researchers.\n\nPreface\n\nChapter 1. Vectors and Vector Addition\n\n1.1 Vectors\n\n1.2 Representation of Vectors\n\n1.4 -a, O, λa\n\n1.5 Resolution of a Vector\n\n1.6 Point Dividing AB in the Ratio m:n\n\n1.7 Centroid or Mean Centre of n Points\n\nExercises\n\nChapter 2. Products of Vectors\n\n2.1 Scalar Product\n\n2.2 Vector Product\n\n2.3 Triple Products\n\n2.4 Mutual Moment of Two Lines\n\nExercises\n\nChapter 3. Vector Calculus\n\n3.1 Vector Function of a Scalar\n\n3.2 Unit Tangent Vector Τ\n\n3.3 Functions of a Vector\n\n3.4 Map of a Field\n\n3.5 Directional Derivative\n\nExercises\n\nChapter 4. Vector Calculus\n\n4.1 Line Integrals\n\n4.2 Line Integral of Grad φ\n\n4.3 Surface Integrals\n\n4.4 Volume Integrals\n\n4.5 Divergence\n\n4.6 Gauss's Transformation\n\n4.7 Curl A\n\n4.8 Stokes' Theorem\n\n4.9 The Operator ▽\n\n4.10 The Laplacian Operator\n\n4.11 Orthogonal Curvilinear Coordinates\n\nExercises\n\nChapter 5. Some Applications\n\n5.1 Equivalence of Force Systems\n\n5.2 Poinsot's Central Axis\n\n5.3 Space-Curve\n\n5.4 Infinitesimal Rotations. Angular Velocity\n\n5.5 Angular Velocity of a Rigid Body\n\n5.6 Gauss's Theorem\n\n5.7 Gravitational Potential\n\n5.8 Equipotential Surfaces\n\n5.9 Green's Theorems\n\nExercises\n\nIndex\n\nNo. of pages:\n164\nLanguage:\nEnglish\nPublished:\n1st January 1963\nImprint:\nPergamon\neBook ISBN:\n9781483141930" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7385195,"math_prob":0.45742524,"size":2730,"snap":"2019-51-2020-05","text_gpt3_token_len":752,"char_repetition_ratio":0.10491563,"word_repetition_ratio":0.023923445,"special_character_ratio":0.24505495,"punctuation_ratio":0.1773309,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.982554,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-25T23:00:52Z\",\"WARC-Record-ID\":\"<urn:uuid:1d91e029-1ea2-48dc-8423-5584aaa1ce2f>\",\"Content-Length\":\"221721\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:aa217a0e-fdef-41fe-9057-623c79afdd63>\",\"WARC-Concurrent-To\":\"<urn:uuid:90991192-e8e5-488c-9585-ec6eea1e3a5a>\",\"WARC-IP-Address\":\"203.82.26.7\",\"WARC-Target-URI\":\"https://www.elsevier.com/books/concise-vector-analysis/eliezer/978-0-08-009951-4\",\"WARC-Payload-Digest\":\"sha1:MAFM4Y4DBA4ZJKI3U6HJ2WVWOR44LVWY\",\"WARC-Block-Digest\":\"sha1:CB2LUO6V7VMHI3EOFKLWVI7MGLO6L55V\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251681625.83_warc_CC-MAIN-20200125222506-20200126012506-00496.warc.gz\"}"}
https://thesaurus.altervista.org/dict/en/hyperbolic+sine
[ "English", null, "hyperbolic sine\nNoun\n\nhyperbolic sine (plural hyperbolic sines)\n\n1. (mathematics) A hyperbolic function that is the analogue of the sine function for hyperbolic spaces, taking in a hyperbolic angle as an argument and returning the y-coordinate for the corresponding point on the unit hyperbola. It is written in symbol sinh and can be represented as: \\sinh(x) = \\tfrac 1 2 (e^x - e^{-x})\nTranslations\n• French: sinus hyperbolique\n• German: Sinus hyperbolicus\n• Russian: гиперболи́ческий си́нус\n\nThis text is extracted from the Wiktionary and it is available under the CC BY-SA 3.0 license | Terms and conditions | Privacy policy 0.003", null, "" ]
[ null, "https://thesaurus.altervista.org/qr_code.php", null, "https://thesaurus.altervista.org/images/banner_en_dictionary.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7792181,"math_prob":0.8203216,"size":762,"snap":"2022-27-2022-33","text_gpt3_token_len":214,"char_repetition_ratio":0.15171504,"word_repetition_ratio":0.3442623,"special_character_ratio":0.23228346,"punctuation_ratio":0.072463766,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95454323,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-07-01T07:28:09Z\",\"WARC-Record-ID\":\"<urn:uuid:07d97f09-3079-45a8-aa86-708cb42f0461>\",\"Content-Length\":\"8498\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4713e8e6-754e-4b11-897d-ac33a4480a8e>\",\"WARC-Concurrent-To\":\"<urn:uuid:0ee382b3-f67b-405b-8c4e-ed87ebea15fd>\",\"WARC-IP-Address\":\"104.21.57.126\",\"WARC-Target-URI\":\"https://thesaurus.altervista.org/dict/en/hyperbolic+sine\",\"WARC-Payload-Digest\":\"sha1:JM5FZ6TSXCRXBE4KLYVP3JCBVQ3K7LDW\",\"WARC-Block-Digest\":\"sha1:BCAGIW5PQ4GJOCJMOW3JFQWJ5E2GESKD\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103922377.50_warc_CC-MAIN-20220701064920-20220701094920-00096.warc.gz\"}"}
https://math.libretexts.org/Courses/Mission_College/Mat_1_College_Algebra_(Carr)/01%3A_Equations_and_Inequalities/1.07%3A_Other_Types_of_Equations
[ "$$\\newcommand{\\id}{\\mathrm{id}}$$ $$\\newcommand{\\Span}{\\mathrm{span}}$$ $$\\newcommand{\\kernel}{\\mathrm{null}\\,}$$ $$\\newcommand{\\range}{\\mathrm{range}\\,}$$ $$\\newcommand{\\RealPart}{\\mathrm{Re}}$$ $$\\newcommand{\\ImaginaryPart}{\\mathrm{Im}}$$ $$\\newcommand{\\Argument}{\\mathrm{Arg}}$$ $$\\newcommand{\\norm}{\\| #1 \\|}$$ $$\\newcommand{\\inner}{\\langle #1, #2 \\rangle}$$ $$\\newcommand{\\Span}{\\mathrm{span}}$$\n\n# 1.7: Other Types of Equations\n\n•", null, "• OpenStax\n• OpenStax\n$$\\newcommand{\\vecs}{\\overset { \\rightharpoonup} {\\mathbf{#1}} }$$ $$\\newcommand{\\vecd}{\\overset{-\\!-\\!\\rightharpoonup}{\\vphantom{a}\\smash {#1}}}$$$$\\newcommand{\\id}{\\mathrm{id}}$$ $$\\newcommand{\\Span}{\\mathrm{span}}$$ $$\\newcommand{\\kernel}{\\mathrm{null}\\,}$$ $$\\newcommand{\\range}{\\mathrm{range}\\,}$$ $$\\newcommand{\\RealPart}{\\mathrm{Re}}$$ $$\\newcommand{\\ImaginaryPart}{\\mathrm{Im}}$$ $$\\newcommand{\\Argument}{\\mathrm{Arg}}$$ $$\\newcommand{\\norm}{\\| #1 \\|}$$ $$\\newcommand{\\inner}{\\langle #1, #2 \\rangle}$$ $$\\newcommand{\\Span}{\\mathrm{span}}$$ $$\\newcommand{\\id}{\\mathrm{id}}$$ $$\\newcommand{\\Span}{\\mathrm{span}}$$ $$\\newcommand{\\kernel}{\\mathrm{null}\\,}$$ $$\\newcommand{\\range}{\\mathrm{range}\\,}$$ $$\\newcommand{\\RealPart}{\\mathrm{Re}}$$ $$\\newcommand{\\ImaginaryPart}{\\mathrm{Im}}$$ $$\\newcommand{\\Argument}{\\mathrm{Arg}}$$ $$\\newcommand{\\norm}{\\| #1 \\|}$$ $$\\newcommand{\\inner}{\\langle #1, #2 \\rangle}$$ $$\\newcommand{\\Span}{\\mathrm{span}}$$\n\n##### Learning Objectives\n• Solve equations involving rational exponents.\n• Solve equations using factoring.\n• Solve absolute value equations.\n• Solve other types of equations.\n\nWe have solved linear equations, rational equations, and quadratic equations using several methods. However, there are many other types of equations, and we will investigate a few more types in this section. We will look at equations involving rational exponents, polynomial equations, radical equations, absolute value equations, equations in quadratic form, and some rational equations that can be transformed into quadratics. Solving any equation, however, employs the same basic algebraic rules. We will learn some new techniques as they apply to certain equations, but the algebra never changes.\n\n## Solving Equations Involving Rational Exponents\n\nRational exponents are exponents that are fractions, where the numerator is a power and the denominator is a root. For example, $${16}^{\\tfrac{1}{2}}$$ is another way of writing $$\\sqrt{16}$$; $$8^{\\tfrac{1}{3}}$$ is another way of writing $$\\sqrt{8}$$. The ability to work with rational exponents is a useful skill, as it is highly applicable in calculus.\n\nWe can solve equations in which a variable is raised to a rational exponent by raising both sides of the equation to the reciprocal of the exponent. The reason we raise the equation to the reciprocal of the exponent is because we want to eliminate the exponent on the variable term, and a number multiplied by its reciprocal equals $$1$$. For example,\n\n$\\dfrac{2}{3}\\left (\\dfrac{3}{2} \\right )=1 \\nonumber$\n\n$3\\left (\\dfrac{1}{3} \\right )=1, \\nonumber$\n\nand so on.\n\n##### RATIONAL EXPONENTS\n\nA rational exponent indicates a power in the numerator and a root in the denominator. There are multiple ways of writing an expression, a variable, or a number with a rational exponent:\n\n$a^{\\tfrac{m}{n}}={\\left (a^{\\tfrac{1}{n}} \\right )}^m={a^m}^{\\tfrac{1}{n}}=\\sqrt[n]{a^m}={(\\sqrt[n]{a})}^m$\n\n##### Example $$\\PageIndex{1}$$: Evaluating a Number Raised to a Rational Exponent\n\nEvaluate $$8^{\\tfrac{2}{3}}$$\n\nSolution\n\nWhether we take the root first or the power first depends on the number. It is easy to find the cube root of $$8$$, so rewrite $$8^{\\tfrac{2}{3}}$$ as $${\\left (8^{\\tfrac{1}{3}} \\right )}^2$$.\n\n\\begin{align*} {\\left (8^{\\tfrac{1}{3}} \\right )}^2&= {(2)}^2\\\\ &= 4 \\end{align*}\n\n##### Exercise $$\\PageIndex{1}$$\n\nEvaluate $${64}^{-\\tfrac{1}{3}}$$\n\n$$\\dfrac{1}{4}$$\n\n##### Example $$\\PageIndex{2}$$: Solve the Equation Including a Variable Raised to a Rational Exponent\n\nSolve the equation in which a variable is raised to a rational exponent: $$x^{\\tfrac{5}{4}} = 32$$.\n\nSolution\n\nThe way to remove the exponent on $$x$$ is by raising both sides of the equation to a power that is the reciprocal of $$\\dfrac{5}{4}$$, which is $$\\dfrac{4}{5}$$.\n\n\\begin{align*} x^{\\tfrac{5}{4}}&= 32\\\\ {\\left(x^{\\tfrac{5}{4}}\\right)}^{\\tfrac{4}{5}}&= {\\left(32\\right)}^{\\tfrac{4}{5}}\\\\ x&= (2)^4\\\\ &= 16 \\end{align*}\n\n##### Exercise $$\\PageIndex{2}$$\n\nSolve the equation $$x^{\\tfrac{3}{2}} = 125$$.\n\n$$25$$\n\n##### Example $$\\PageIndex{3}$$: Solving an Equation Involving Rational Exponents and Factoring\n\nSolve $$3x^{\\tfrac{3}{4}} = x^{\\tfrac{1}{2}}$$.\n\nSolution\n\nThis equation involves rational exponents as well as factoring rational exponents. Let us take this one step at a time. First, put the variable terms on one side of the equal sign and set the equation equal to zero.\n\n\\begin{align*} 3x^{\\tfrac{3}{4}}-\\left(x^{\\tfrac{1}{2}}\\right)&= x^{\\tfrac{1}{2}}-\\left(x^{\\tfrac{1}{2}}\\right)\\\\ 3x^{\\tfrac{3}{4}}-x^{\\tfrac{1}{2}}&= 0 \\end{align*}\n\nNow, it looks like we should factor the left side, but what do we factor out? We can always factor the term with the lowest exponent. Rewrite $$x^{\\tfrac{1}{2}}$$ as $$x^{\\tfrac{2}{4}}$$. Then, factor out $$x^{\\tfrac{2}{4}}$$ from both terms on the left.\n\n\\begin{align*} 3x^{\\tfrac{3}{4}}-x^{\\tfrac{1}{2}}&= 0\\\\ x^{\\tfrac{2}{4}}\\left (3x^{\\tfrac{1}{4}}-1 \\right )&= 0 \\end{align*}\n\nWhere did $$x^{\\tfrac{1}{4}}$$ come from? Remember, when we multiply two numbers with the same base, we add the exponents. Therefore, if we multiply $$x^{\\tfrac{2}{4}}$$ back in using the distributive property, we get the expression we had before the factoring, which is what should happen. We need an exponent such that when added to $$\\dfrac{2}{4}$$ equals $$\\dfrac{3}{4}$$. Thus, the exponent on $$x$$ in the parentheses is $$\\dfrac{1}{4}$$.\n\nLet us continue. Now we have two factors and can use the zero factor theorem.\n\n\\begin{align*} x^{\\tfrac{2}{4}}\\left (3x^{\\tfrac{1}{4}}-1 \\right )&= 0\\\\ x^{\\tfrac{2}{4}}&= 0\\\\ x&= 0\\\\ 3x^{\\tfrac{1}{4}}-1&= 0\\\\ 3x^{\\tfrac{1}{4}}&= 1\\\\ x^{\\tfrac{1}{4}}&= \\dfrac{1}{3},\\qquad \\text{Divide both sides by 3.}\\\\ {\\left (x^{\\tfrac{1}{4}} \\right )}^4&= {\\left (\\dfrac{1}{3} \\right )}^4, \\qquad \\text{Raise both sides to the reciprocal of } \\dfrac{1}{4}\\\\ x&= \\dfrac{1}{81} \\end{align*}\n\nThe two solutions are $$0$$ and $$\\dfrac{1}{81}$$.\n\n##### Exercise $$\\PageIndex{3}$$\n\nSolve: $${\\left(x+5\\right)}^{\\tfrac{3}{2}}=8$$.\n\n$$-1$$\n\n## Solving Equations Using Factoring\n\nWe have used factoring to solve quadratic equations, but it is a technique that we can use with many types of polynomial equations, which are equations that contain a string of terms including numerical coefficients and variables. When we are faced with an equation containing polynomials of degree higher than $$2$$, we can often solve them by factoring.\n\n##### POLYNOMIAL EQUATIONS\n\nA polynomial of degree $$n$$ is an expression of the type\n\n$a_nx^n+a_{n−1}x^{n−1}+⋅⋅⋅+a_2x^2+a_1x+a_0$\n\nwhere $$n$$ is a positive integer and $$a_n ,…, a_0$$ are real numbers and $$a_n≠0$$.\n\nSetting the polynomial equal to zero gives a polynomial equation. The total number of solutions (real and complex) to a polynomial equation is equal to the highest exponent $$n$$.\n\n##### Example $$\\PageIndex{4}$$: Solving a Polynomial by Factoring\n\nSolve the polynomial by factoring: $$5x^4 = 80x^2$$.\n\nSolution\n\nFirst, set the equation equal to zero. Then factor out what is common to both terms, the GCF.\n\n\\begin{align*} 5x^4-80x^2&= 0\\\\ 5x^2(x^2-16)&= 0 \\end{align*}\n\nNotice that we have the difference of squares in the factor $$x^2−16$$, which we will continue to factor and obtain two solutions. The first term, $$5x^2$$, generates, technically, two solutions as the exponent is $$2$$, but they are the same solution.\n\n\\begin{align*} 5x^2&= 0\\\\ x&=0\\\\ x^2-16&= 0\\\\ (x+4)(x-4)&= 0\\\\ x&= 4\\\\ x&= -4 \\end{align*}\n\nThe solutions are $$0$$ (double solution), $$4$$, and $$−4$$.\n\nAnalysis\n\nWe can see the solutions on the graph in Figure $$\\PageIndex{1}$$. The x-coordinates of the points where the graph crosses the $$x$$-axis are the solutions—the $$x$$-intercepts. Notice on the graph that at the solution $$0$$, the graph touches the $$x$$-axis and bounces back. It does not cross the $$x$$-axis. This is typical of double solutions.", null, "Figure $$\\PageIndex{1}$$\n##### Exercise $$\\PageIndex{4}$$\n\nSolve by factoring: $$12x^4 = 3x^2$$.\n\n$$x=0, x=12, x=−12$$\n\n##### Example $$\\PageIndex{5}$$: Solve a Polynomial by Grouping\n\nSolve a polynomial by grouping: $$x^3+x^2−9x−9=0$$.\n\nSolution\n\nThis polynomial consists of $$4$$ terms, which we can solve by grouping. Grouping procedures require factoring the first two terms and then factoring the last two terms. If the factors in the parentheses are identical, we can continue the process and solve, unless more factoring is suggested.\n\n\\begin{align*} x^3+x^2-9x-9&= 0\\\\ x^2(x+1)-9(x+1)&= 0\\\\ (x^2-9)(x+1)&= 0 \\end{align*}\n\nThe grouping process ends here, as we can factor $$x^2−9$$ using the difference of squares formula.\n\n\\begin{align*} (x^2-9)(x+1)&= 0\\\\ (x-3)(x+3)(x+1)&= 0\\\\ x&= 3\\\\ x&= -3\\\\ x&= -1 \\end{align*}\n\nThe solutions are $$3$$, $$−3$$, and $$−1$$. Note that the highest exponent is $$3$$ and we obtained $$3$$ solutions. We can see the solutions, the x-intercepts, on the graph in Figure $$\\PageIndex{2}$$.", null, "Figure $$\\PageIndex{2}$$\n\nAnalysis\n\nWe looked at solving quadratic equations by factoring when the leading coefficient is $$1$$. When the leading coefficient is not $$1$$, we solved by grouping. Grouping requires four terms, which we obtained by splitting the linear term of quadratic equations. We can also use grouping for some polynomials of degree higher than $$2$$, as we saw here, since there were already four terms.\n\nRadical equations are equations that contain variables in the radicand (the expression under a radical symbol), such as\n\n$\\sqrt{3x+18}=x \\nonumber$\n\n$\\sqrt{x+3}=x-3 \\nonumber$\n\n$\\sqrt{x+5}-\\sqrt{x-3}=2 \\nonumber$\n\nRadical equations may have one or more radical terms, and are solved by eliminating each radical, one at a time. We have to be careful when solving radical equations, as it is not unusual to find extraneous solutions, roots that are not, in fact, solutions to the equation. These solutions are not due to a mistake in the solving method, but result from the process of raising both sides of an equation to a power. However, checking each answer in the original equation will confirm the true solutions.\n\nAn equation containing terms with a variable in the radicand is called a radical equation.\n\n##### Howto: Given a radical equation, solve it\n1. Isolate the radical expression on one side of the equal sign. Put all remaining terms on the other side.\n2. If the radical is a square root, then square both sides of the equation. If it is a cube root, then raise both sides of the equation to the third power. In other words, for an $$n^{th}$$ root radical, raise both sides to the $$n^{th}$$ power. Doing so eliminates the radical symbol.\n3. Solve the remaining equation.\n4. If a radical term still remains, repeat steps 1–2.\n5. Confirm solutions by substituting them into the original equation.\n##### Example $$\\PageIndex{6}$$: Solving an Equation with One Radical\n\nSolve $$\\sqrt{15−2x}=x$$.\n\nSolution\n\nThe radical is already isolated on the left side of the equal side, so proceed to square both sides.\n\n\\begin{align*} \\sqrt{15-2x}&= x\\\\ {\\left (\\sqrt{15-2x} \\right )}^2&= {(x)}^2\\\\ 15-2x&= x^2 \\end{align*}\n\nWe see that the remaining equation is a quadratic. Set it equal to zero and solve.\n\n\\begin{align*} 0&= x^2+2x-15\\\\ 0&= (x+5)(x-3)\\\\ x&= -5\\\\ x&= 3 \\end{align*}\n\nThe proposed solutions are $$−5$$ and $$3$$. Let us check each solution back in the original equation. First, check $$x=−5$$.\n\n\\begin{align*} \\sqrt{15-2x}&= x\\\\ \\sqrt{15-2(-5)}&=-5\\\\ \\sqrt{25}&= -5\\\\ 5&\\neq -5 \\end{align*}\n\nThis is an extraneous solution. While no mistake was made solving the equation, we found a solution that does not satisfy the original equation.\n\nCheck $$x=3$$.\n\n\\begin{align*} \\sqrt{15-2x}&= x\\\\ \\sqrt{15-2(3)}&= 3\\\\ \\sqrt{9}&= 3\\\\ 3&= 3 \\end{align*}\n\nThe solution is $$3$$.\n\n##### Exercise $$\\PageIndex{5}$$\n\nSolve the radical equation: $$\\sqrt{x+3}=3x-1$$\n\n$$x=1$$, extraneous solution $$x=−\\dfrac{2}{9}$$\n\n##### Example $$\\PageIndex{7}$$: Solving a Radical Equation Containing Two Radicals\n\nSolve $$\\sqrt{2x+3}+\\sqrt{x-2}=4$$\n\nSolution\n\nAs this equation contains two radicals, we isolate one radical, eliminate it, and then isolate the second radical.\n\n$\\sqrt{2x+3}+\\sqrt{x-2}=4 \\nonumber$\n\n\\begin{align*} \\sqrt{2x+3}&= 4-\\sqrt{x-2} \\qquad \\text{Subtract } \\sqrt{x-2} \\text{ from both sides}\\\\ {\\left (\\sqrt{2x+3} \\right )}^2&= {\\left (4-\\sqrt{x-2} \\right )}^2\\qquad \\text{Square both sides} \\end{align*}\n\nUse the perfect square formula to expand the right side: $${(a−b)}^2=a^2−2ab+b^2$$.\n\n\\begin{align*} 2x+3&= {(4)}^2-2(4)\\sqrt{x-2}+{(\\sqrt{x-2})}^2\\\\ 2x+3&= 16-8\\sqrt{x-2}+(x-2)\\\\ 2x+3&= 14+x-8\\sqrt{x-2} \\qquad \\text{Combine like terms}\\\\ x-11&= -8\\sqrt{x-2} \\qquad \\text{Isolate the second radical}\\\\ {(x-11)}^2&= {(-8\\sqrt{x-2})}^2 \\qquad \\text{Square both sides}\\\\ x^2-22x+121&= 64(x-2) \\end{align*}\n\nNow that both radicals have been eliminated, set the quadratic equal to zero and solve.\n\n\\begin{align*} x^2-22x+121&= 64x-128\\\\ x^2-86x+249&= 0\\\\ (x-3)(x-83)&= 0\\\\ x&= 3\\\\ x&= 83 \\end{align*}\n\nThe proposed solutions are $$3$$ and $$83$$. Check each solution in the original equation.\n\n\\begin{align*} \\sqrt{2x+3}+\\sqrt{x-2}&= 4\\\\ \\sqrt{2x+3}&= 4-\\sqrt{x-2}\\\\ \\sqrt{2(3)+3}&= 4-\\sqrt{(3)-2}\\\\ \\sqrt{9}&= 4-\\sqrt{1}\\\\ 3&= 3 \\end{align*}\n\nOne solution is $$3$$.\n\nCheck $$x=83$$.\n\n\\begin{align*} \\sqrt{2x+3}+\\sqrt{x-2}&= 4\\\\ \\sqrt{2x+3}&= 4-\\sqrt{x-2}\\\\ \\sqrt{2(83)+3}&= 4-\\sqrt{(83)-2}\\\\ \\sqrt{169}&= 4-\\sqrt{81}\\\\ 13&\\neq -5 \\end{align*}\n\nThe only solution is $$3$$. We see that $$x=83$$ is an extraneous solution.\n\n##### Exercise $$\\PageIndex{6}$$\n\nSolve the equation with two radicals: $$\\sqrt{3x+7}+\\sqrt{x+2}=1$$\n\n$$x=−2$$, extraneous solution $$x=−1$$\n\n## Solving an Absolute Value Equation\n\nNext, we will learn how to solve an absolute value equation. To solve an equation such as $$|2x−6|=8$$, we notice that the absolute value will be equal to $$8$$ if the quantity inside the absolute value bars is $$8$$ or $$−8$$. This leads to two different equations we can solve independently.\n\n\\begin{align*} 2x-6&= 8\\\\ 2x&= 14\\\\ x&= 7 \\end{align*}\n\nOR\n\n\\begin{align*} 2x-6&= -8\\\\ 2x&= -2\\\\ x&= -1 \\end{align*}\n\nKnowing how to solve problems involving absolute value functions is useful. For example, we may need to identify numbers or points on a line that are at a specified distance from a given reference point.\n\n##### ABSOLUTE VALUE EQUATIONS\n\nThe absolute value of $$x$$ is written as $$|x|$$. It has the following properties:\n\nIf $$x≥0$$, then $$|x|=x$$.If $$x<0$$, then $$x=−x$$.\n\nFor real numbers $$A$$ and $$B$$, an equation of the form $$|A|=B$$, with $$B≥0$$, will have solutions when $$A=B$$ or $$A=−B$$. If $$B<0$$, the equation $$|A|=B$$ has no solution.\n\nAn absolute value equation in the form $$|ax+b|=c$$ has the following properties:\n\n• If $$c<0$$,$$|ax+b|=c$$ has no solution.\n• If $$c=0$$,$$|ax+b|=c$$has one solution.\n• If $$c>0$$,$$|ax+b|=c$$ has two solutions.\n##### How to\n\nGiven an absolute value equation, solve it.\n\n1. Isolate the absolute value expression on one side of the equal sign.\n2. If $$c>0$$, write and solve two equations: $$ax+b=c$$ and $$ax+b=−c$$.\n##### Example $$\\PageIndex{8}$$: Solving Absolute Value Equations\n\nSolve the following absolute value equations:\n\n1. $$|6x+4|=8$$\n2. $$|3x+4|=−9$$\n3. $$|3x−5|−4=6$$\n4. $$|−5x+10|=0$$\n\nSolution\n\n1. $$|6x+4|=8$$\n\nWrite two equations and solve each:\n\n\\begin{align*} 6x+4&= 8\\\\ 6x&= 4\\\\ x&= \\dfrac{2}{3} \\end{align*}\n\nOR\n\n\\begin{align*} 6x+4&= -8\\\\ 6x&= -12\\\\ x&= -2 \\end{align*}\n\nThe two solutions are $$\\dfrac{2}{3}$$ and $$−2$$.\n\n1. $$|3x+4|=−9$$\n\nThere is no solution as an absolute value cannot be negative.\n\n1. $$|3x−5|−4=6$$\n\nIsolate the absolute value expression and then write two equations.\n\n\\begin{align*} |3x-5|-4&= 6\\\\ |3x-5|&= 10\\\\ 3x-5&= 10\\\\ 3x&= 15\\\\ x&= 5 \\end{align*}\n\nOR\n\n\\begin{align*} 3x-5&= -10\\\\ 3x=-5\\\\ x=\\dfrac{5}{3} \\end{align*}\n\nThere are two solutions: $$5$$, and $$-\\dfrac{5}{3}$$.\n\n1. $$|−5x+10|=0$$\n\nThe equation is set equal to zero, so we have to write only one equation.\n\n\\begin{align*} -5x+10&= 0\\\\ -5x&= -10\\\\ x&= 2 \\end{align*}\n\nThere is one solution: $$2$$.\n\n##### Exercise $$\\PageIndex{7}$$\n\nSolve the absolute value equation: $$|1−4x|+8=13$$.\n\n$$x=−1, x=\\dfrac{3}{2}$$\n\n## Solving Other Types of Equations\n\nThere are many other types of equations in addition to the ones we have discussed so far. We will see more of them throughout the text. Here, we will discuss equations that are in quadratic form, and rational equations that result in a quadratic.\n\n### Solving Equations in Quadratic Form\n\nEquations in quadratic form are equations with three terms. The first term has a power other than $$2$$. The middle term has an exponent that is one-half the exponent of the leading term. The third term is a constant. We can solve equations in this form as if they were quadratic. A few examples of these equations include $$x^4−5x^2+4=0$$,$$x^6+7x^3−8=0$$, and $$x^{\\tfrac{2}{3}} +4x^{\\tfrac{1}{3}}+2=0$$. In each one, doubling the exponent of the middle term equals the exponent on the leading term. We can solve these equations by substituting a variable for the middle term.\n\nIf the exponent on the middle term is one-half of the exponent on the leading term, we have an equation in quadratic form, which we can solve as if it were a quadratic. We substitute a variable for the middle term to solve equations in quadratic form.\n\n##### Howto: Given an equation quadratic in form, solve it\n1. Identify the exponent on the leading term and determine whether it is double the exponent on the middle term.\n2. If it is, substitute a variable, such as $$u$$, for the variable portion of the middle term.\n3. Rewrite the equation so that it takes on the standard form of a quadratic.\n4. Solve using one of the usual methods for solving a quadratic.\n5. Replace the substitution variable with the original term.\n6. Solve the remaining equation.\n##### Example $$\\PageIndex{9}$$: Solving a Fourth-degree Equation in Quadratic Form\n\nSolve this fourth-degree equation: $$3x^4−2x^2−1=0$$.\n\nSolution\n\nThis equation fits the main criteria, that the power on the leading term is double the power on the middle term. Next, we will make a substitution for the variable term in the middle. Let $$u =x^2$$. Rewrite the equation in $$u$$.\n\n$3u^2−2u−1=0 \\nonumber$\n\n\\begin{align*} 3u^2-2u-1&= 0\\\\ (3u+1)(u-1)&= 0 \\end{align*}\n\nSolve each factor and replace the original term for $$u$$.\n\n\\begin{align*} 3u+1&= 0\\\\ 3u&= -1\\\\ u&= -\\dfrac{1}{3}\\\\ x^2&= -\\dfrac{1}{3}\\\\ x&= \\pm i\\sqrt{\\dfrac{1}{3}}\\\\ u-1&= 0\\\\ u&= 1\\\\ x^2&= 1\\\\ x&= \\pm 1 \\end{align*}\n\nThe solutions are $$x=±i\\sqrt{\\dfrac{1}{3}}$$ and $$x=±1$$\n\n##### Exercise $$\\PageIndex{8}$$\n\nSolve using substitution: $$x^4−8x^2−9=0$$.\n\n$$x=−3,3,−i,i$$\n\n##### Example $$\\PageIndex{10}$$: Solving an Equation in Quadratic Form Containing a Binomial\n\nSolve the equation in quadratic form: $${(x+2)}^2+11(x+2)−12=0$$.\n\nSolution\n\nThis equation contains a binomial in place of the single variable. The tendency is to expand what is presented. However, recognizing that it fits the criteria for being in quadratic form makes all the difference in the solving process. First, make a substitution, letting $$u =x+2$$. Then rewrite the equation in $$u$$.\n\n\\begin{align*} u^2+11u-12&= 0\\\\ (u+12)(u-1)&= 0 \\end{align*}\n\nSolve using the zero-factor property and then replace $$u$$ with the original expression.\n\n\\begin{align*} u+12&= 0\\\\ u&= -12\\\\ x+2&= -12\\\\ x&= -14 \\end{align*}\n\nThe second factor results in\n\n\\begin{align*} u-1&= 0\\\\ u&= 1\\\\ x+2&= 1\\\\ x&= -1 \\end{align*}\n\nWe have two solutions: $$−14$$, and $$−1$$.\n\n##### Exercise $$\\PageIndex{9}$$\n\nSolve: $${(x−5)}^2−4(x−5)−21=0$$.\n\n$$x=2,x=12$$\n\n## Solving Rational Equations Resulting in a Quadratic\n\nEarlier, we solved rational equations. Sometimes, solving a rational equation results in a quadratic. When this happens, we continue the solution by simplifying the quadratic equation by one of the methods we have seen. It may turn out that there is no solution.\n\n##### Example $$\\PageIndex{11}$$: Solving a Rational Equation Leading to a Quadratic\n\nSolve the following rational equation: $$\\dfrac{-4x}{x-1}+\\dfrac{4}{x+1}=\\dfrac{-8}{x^2-1}$$\n\nSolution\n\nWe want all denominators in factored form to find the LCD. Two of the denominators cannot be factored further. However, $$x^2−1=(x+1)(x−1)$$. Then, the LCD is $$(x+1)(x−1)$$. Next, we multiply the whole equation by the LCD.\n\n\\begin{align*} (x+1)(x-1)\\left (\\dfrac{-4x}{x-1}+\\dfrac{4}{x+1} \\right )&= \\left (\\dfrac{-8}{x^2-1} \\right )(x+1)(x-1)\\\\ -4x(x+1)+4(x-1)&= -8\\\\ -4x^2-4x+4x-4&= -8\\\\ -4x^2+4&= 0\\\\ -4(x^2-1)&= 0\\\\ -4(x+1)(x-1)&= 0\\\\ x&= -1\\\\ x&= 1 \\end{align*}\n\nIn this case, either solution produces a zero in the denominator in the original equation. Thus, there is no solution.\n\n##### Exercise $$\\PageIndex{10}$$\n\nSolve $$\\dfrac{3x+2}{x-2}+\\dfrac{1}{x}=\\dfrac{-2}{x^2-2x}$$\n\n$$x=−1, x= 0$$ is not a solution.\n\n##### Media\n\nAccess these online resources for additional instruction and practice with different types of equations.\n\n1. Rational Equation with no Solution\n2. Solving equations with rational exponents using reciprocal powers\n3. Solving radical equations part 1 of 2\n4. Solving radical equations part 2 of 2\n\n## Key Concepts\n\n• Rational exponents can be rewritten several ways depending on what is most convenient for the problem. To solve, both sides of the equation are raised to a power that will render the exponent on the variable equal to $$1$$. See Example, Example, and Example.\n• Factoring extends to higher-order polynomials when it involves factoring out the GCF or factoring by grouping. See Example and Example.\n• We can solve radical equations by isolating the radical and raising both sides of the equation to a power that matches the index. See Example and Example.\n• To solve absolute value equations, we need to write two equations, one for the positive value and one for the negative value. See Example.\n• Equations in quadratic form are easy to spot, as the exponent on the first term is double the exponent on the second term and the third term is a constant. We may also see a binomial in place of the single variable. We use substitution to solve. See Example and Example.\n• Solving a rational equation may also lead to a quadratic equation or an equation in quadratic form. See Example.\n\n1.7: Other Types of Equations is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to conform to the style and standards of the LibreTexts platform; a detailed edit history is available upon request." ]
[ null, "https://biz.libretexts.org/@api/deki/files/5084/girl-160172__340.png", null, "https://math.libretexts.org/@api/deki/files/12008/fig_2.7.1.jpg", null, "https://math.libretexts.org/@api/deki/files/12009/fig_2.7.2.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8240367,"math_prob":1.0000032,"size":19908,"snap":"2022-27-2022-33","text_gpt3_token_len":6567,"char_repetition_ratio":0.18785168,"word_repetition_ratio":0.038687393,"special_character_ratio":0.35438016,"punctuation_ratio":0.089941725,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99999964,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-25T17:35:11Z\",\"WARC-Record-ID\":\"<urn:uuid:aadd82b6-a78d-43c9-96e6-e8057e99c0f3>\",\"Content-Length\":\"153765\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:6ee7ba14-2dc9-4149-9db8-b49ce9e8890d>\",\"WARC-Concurrent-To\":\"<urn:uuid:ad7fa2e6-d8ee-4685-aa5e-dc5ee6b74c80>\",\"WARC-IP-Address\":\"99.86.224.77\",\"WARC-Target-URI\":\"https://math.libretexts.org/Courses/Mission_College/Mat_1_College_Algebra_(Carr)/01%3A_Equations_and_Inequalities/1.07%3A_Other_Types_of_Equations\",\"WARC-Payload-Digest\":\"sha1:E3EDJCXJ7LIIE6YMT4G436JV7GZNRH46\",\"WARC-Block-Digest\":\"sha1:FPYRLCR4GZBK5MQGP5OGGV6MLJO4KRKU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103036077.8_warc_CC-MAIN-20220625160220-20220625190220-00064.warc.gz\"}"}
https://it.mathworks.com/matlabcentral/cody/problems/42923-given-the-variable-x-as-your-input-multiply-it-by-four-then-divide-it-by-two-then-put-the-result/solutions/1023654
[ "Cody\n\n# Problem 42923. Given the variable x as your input, multiply it by four, then divide it by two. Then put the result in y.\n\nSolution 1023654\n\nSubmitted on 19 Oct 2016 by Marco Tullio\n• Size: 8\n• This is the leading solution.\nThis solution is locked. To view this solution, you need to provide a solution of the same size or smaller.\n\n### Test Suite\n\nTest Status Code Input and Output\n1   Pass\nx = 5; y_correct = 10; assert(isequal(your_fcn_name(x),y_correct))\n\nans = 10" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.51013243,"math_prob":0.9215983,"size":275,"snap":"2020-24-2020-29","text_gpt3_token_len":87,"char_repetition_ratio":0.1402214,"word_repetition_ratio":0.0,"special_character_ratio":0.33454546,"punctuation_ratio":0.07692308,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98093873,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-12T10:37:23Z\",\"WARC-Record-ID\":\"<urn:uuid:4a1ab451-8fe8-40f0-a5e5-f3af8f54961d>\",\"Content-Length\":\"72571\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:90da18b4-4eb5-4faf-8cbb-a14ab7f7a144>\",\"WARC-Concurrent-To\":\"<urn:uuid:56c56062-0d25-418b-bb17-6089ea28d5e2>\",\"WARC-IP-Address\":\"23.218.50.160\",\"WARC-Target-URI\":\"https://it.mathworks.com/matlabcentral/cody/problems/42923-given-the-variable-x-as-your-input-multiply-it-by-four-then-divide-it-by-two-then-put-the-result/solutions/1023654\",\"WARC-Payload-Digest\":\"sha1:HWM3QWIISPQZZSQ6LWWJSY2VRJ7QF3X7\",\"WARC-Block-Digest\":\"sha1:BYH7SZOQE54JEFT5HB6BIE4V7T6JH2KU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593657134758.80_warc_CC-MAIN-20200712082512-20200712112512-00059.warc.gz\"}"}
https://www.tibiagoals.com/2022/12/tibiagoals-riddles-e25r04.html
[ "## Wednesday, December 21, 2022\n\n1.", null, "2.", null, "Tamarizz - Solidera\n\nThe arrow from the plus sign (+) to the other side of the equation turning it into a subtraction (-), and the II from the left turning it into a III\n\nX - VII = III\n\n3.", null, "X-Vlll=lll\nAjmeh - Solidera\n\n4.", null, "X-VII=III\n\nHefrus\n\n5.", null, "6.", null, "X + VII = II\nX - VII = III\n10 - 7 = 3\n\nNick: The Heringer\n\n7.", null, "X-VII=III\n\n8.", null, "9.", null, "10.", null, "IX-VII=II\n\nEXLIPHERX - HAVERA\n\n11.", null, "12.", null, "IX - VII = II\n\nInkkz\n\n13.", null, "Meregirl\nX - VIII = II\n\n14.", null, "15.", null, "Presckot\nX-VII=III\n\n16.", null, "Lyh\n\nX-VII=III\n\n17.", null, "X - VII = III\nSHIZURIE\n\n18.", null, "X-VII=III\nXavlar\n\n19.", null, "20.", null, "21.", null, "X-VII=III\n\nsir coor\n\n22.", null, "Name Char: Hinata Hyuga Byakugan\n\nRespuesta: X - VIII = II\n\n23.", null, "Mover la flecha vertical del signo de ( + ) del lado derecho para formar el numero tres; entonces seria x(10) - (v(5)II(2)) = 3 ::::::::::::::::::::::::::::::::::::::::::::::::::::::\nMove the vertical arrow that makes the ( + ) sign to the right side to make the numer III (3); then it will be x(10) - (v(5)II(2)) = 3\n\n24.", null, "Move the vertical arrow from the plus to make it minus and then we add it to VII to make it VIII so it ends as:\nX - VIII = II\n\n25.", null, "X-VII=III\n\nRigho\n\n26.", null, "Pan Ceta\n\nX-Vll=lll\n\n27.", null, "x - vii = iii\n\n10-7= 10\n\nLervan\n\n28.", null, "Psykeeh\n\nX - VII = III\n\n29.", null, "10 - 7 = 3\nChar: Duli Leos\n\n30.", null, "X - VII = III\nBea Charlover Aca\n\n31.", null, "I think it should be:\nX - VIII = II so just move an arrow from + to make it - and add it to VII to make it VIII\n-Sapo Dungeon\n\n32.", null, "X - VIII = II so just move an arrow from + to make it - and add it to VII to make it VIII\n-Bara de pan\n\n33.", null, "Respuesta: IX - VII = II\n\n34.", null, "X - VII = III\n\nBabygirrl\n\n35.", null, "X - VII = III\nGreen Khepri\n\n36.", null, "X - VII = III\n\nSoma deux\n\n37.", null, "Name Char: Kathryna\n\nRespuesta: X - VIII = II\n\n38.", null, "x - viii = ii\n(x - 8 = 2 )\n\nRamona Toledo\n\n39.", null, "R= IX - VII = II\nX - VIII = II\nSamuray de carro :)\n\n40.", null, "R= IX - VII = II\nX - VIII = II\nSamuray de carro :)\n\n41.", null, "The equation is X+VII=II (10+7=2)\nto make the equation correct it should be:\nIX-VII=II (9-7=2)\n\nCharacter Name: Dyaniixz\n\n42.", null, "The equation is X+VII=II (10+7=2)\nto make the equation correct it should be:\nIX-VII=II (9-7=2)\n\nCharacter Name: Dyaniixz\n\n43.", null, "correct equation: ix - vii = ii\ncharacter name: pablo reformed\n\n44.", null, "correct equation: ix - vii = ii\ncharacter name: pablo reformed\n\n45.", null, "Hi\nI moved an arrow to make this figure IX - VII = II\nCinderella Sea\n\n46.", null, "47.", null, "Kriizs\nR: X - VII = III\n\n48.", null, "Character name:Glexzs\nWorld: Havera\n\nA/ X - VII = III\n\n49.", null, "X-VIII=II\n\n50.", null, "X - VIII = II\nX - VII = III\n\nAmy Meow\n\n51.", null, "Vertical arrow of the + moves to the end with II so it becomes - and III. X - VII = III.\n\n-Essiee\n\n52.", null, "X - VIII = II\n\nCharacter: Mia Moonshine\n\n53.", null, "I will go with X - VII = III\n\n// Rand Silverfang" ]
[ null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://2.bp.blogspot.com/-GiL3YLMqJH4/YQ5Qdi3zwzI/AAAAAAAAA9Q/uaEtoT8s3mo1Zj2DTBJ5x-g8e0jXGXM-ACK4BGAYYCw/s35/tttt.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://1.bp.blogspot.com/-xMvgN-xunl0/YrnfP9SiLVI/AAAAAAAAAz8/s185G0qQczc42fHD5k3Lo_bu3kOjOXtPQCK4BGAYYCw/s35/IMG_20210813_020245_143.jpg", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://www.blogger.com/img/blogger_logo_round_35.png", null, "https://resources.blogblog.com/img/blank.gif", null, "https://resources.blogblog.com/img/blank.gif", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.6439466,"math_prob":0.92145264,"size":5190,"snap":"2022-40-2023-06","text_gpt3_token_len":1794,"char_repetition_ratio":0.27670652,"word_repetition_ratio":0.5452632,"special_character_ratio":0.29845858,"punctuation_ratio":0.15275142,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9926472,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-30T15:33:21Z\",\"WARC-Record-ID\":\"<urn:uuid:d337e688-0dd7-42b0-a310-a33a263f587c>\",\"Content-Length\":\"171120\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2dcc7d9b-ba6b-4843-970c-7bf0097a18a0>\",\"WARC-Concurrent-To\":\"<urn:uuid:fa777b3d-e1f1-4200-bfb5-366c60f4846c>\",\"WARC-IP-Address\":\"142.251.163.121\",\"WARC-Target-URI\":\"https://www.tibiagoals.com/2022/12/tibiagoals-riddles-e25r04.html\",\"WARC-Payload-Digest\":\"sha1:IK342JWYFJHBLWDVMXYEANKKWFKXPPQT\",\"WARC-Block-Digest\":\"sha1:B7HS572PTICX5HONENRGMIGUGYGJRHUK\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499819.32_warc_CC-MAIN-20230130133622-20230130163622-00630.warc.gz\"}"}
https://www.triangle-calculator.com/?a=9.2&b=15.1&c=17.4
[ "# 9.2 15.1 17.4 triangle\n\n### Acute scalene triangle.\n\nSides: a = 9.2   b = 15.1   c = 17.4\n\nArea: T = 69.41659804638\nPerimeter: p = 41.7\nSemiperimeter: s = 20.85\n\nAngle ∠ A = α = 31.89774501112° = 31°53'51″ = 0.55767155274 rad\nAngle ∠ B = β = 60.1422482921° = 60°8'33″ = 1.05496843473 rad\nAngle ∠ C = γ = 87.96600669679° = 87°57'36″ = 1.53551927789 rad\n\nHeight: ha = 15.09904305356\nHeight: hb = 9.19441695979\nHeight: hc = 7.97988483292\n\nMedian: ma = 15.62876997668\nMedian: mb = 11.69217706101\nMedian: mc = 8.98796993268\n\nInradius: r = 3.32993036194\nCircumradius: R = 8.70655170288\n\nVertex coordinates: A[17.4; 0] B[0; 0] C[4.58801724138; 7.97988483292]\nCentroid: CG[7.32767241379; 2.66596161097]\nCoordinates of the circumscribed circle: U[8.7; 0.31098818148]\nCoordinates of the inscribed circle: I[5.75; 3.32993036194]\n\nExterior(or external, outer) angles of the triangle:\n∠ A' = α' = 148.1032549889° = 148°6'9″ = 0.55767155274 rad\n∠ B' = β' = 119.8587517079° = 119°51'27″ = 1.05496843473 rad\n∠ C' = γ' = 92.04399330321° = 92°2'24″ = 1.53551927789 rad\n\n# How did we calculate this triangle?\n\nNow we know the lengths of all three sides of the triangle and the triangle is uniquely determined. Next we calculate another its characteristics - same procedure as calculation of the triangle from the known three sides SSS.", null, "### 1. The triangle circumference is the sum of the lengths of its three sides", null, "### 2. Semiperimeter of the triangle", null, "### 3. The triangle area using Heron's formula", null, "### 4. Calculate the heights of the triangle from its area.", null, "### 5. Calculation of the inner angles of the triangle using a Law of Cosines", null, "### 6. Inradius", null, "### 7. Circumradius", null, "### 8. Calculation of medians", null, "#### Look also our friend's collection of math examples and problems:\n\nSee more informations about triangles or more information about solving triangles." ]
[ null, "https://www.triangle-calculator.com/tex/dd7/dd7c11fdf8cd4.svg", null, "https://www.triangle-calculator.com/tex/87e/87e6dc6b5716e.svg", null, "https://www.triangle-calculator.com/tex/08e/08e57f24676e1.svg", null, "https://www.triangle-calculator.com/tex/6c8/6c82b5d0a9f49.svg", null, "https://www.triangle-calculator.com/tex/602/602ba42ca08ce.svg", null, "https://www.triangle-calculator.com/tex/bbb/bbb03e43166c0.svg", null, "https://www.triangle-calculator.com/tex/054/054240e0e431c.svg", null, "https://www.triangle-calculator.com/tex/133/1332ee987bc0b.svg", null, "https://www.triangle-calculator.com/tex/243/24367b8eecd2b.svg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7381616,"math_prob":0.9965601,"size":1682,"snap":"2019-35-2019-39","text_gpt3_token_len":623,"char_repetition_ratio":0.15196663,"word_repetition_ratio":0.0,"special_character_ratio":0.4964328,"punctuation_ratio":0.21428572,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9996667,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],"im_url_duplicate_count":[null,2,null,2,null,2,null,2,null,2,null,2,null,2,null,2,null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-08-23T13:35:50Z\",\"WARC-Record-ID\":\"<urn:uuid:80b2ea10-009d-4132-a569-f7d7db7ff2a0>\",\"Content-Length\":\"14728\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3731cc95-95ad-475f-8d73-761f79110a7f>\",\"WARC-Concurrent-To\":\"<urn:uuid:55f0ea3b-cea0-480a-94c9-a4ddf433dae2>\",\"WARC-IP-Address\":\"104.28.12.22\",\"WARC-Target-URI\":\"https://www.triangle-calculator.com/?a=9.2&b=15.1&c=17.4\",\"WARC-Payload-Digest\":\"sha1:JT27QBJRE7XY25O6FRZWV7BAAS3AOH7Z\",\"WARC-Block-Digest\":\"sha1:JWGSLFO67RVMJ4FVALHVXK56P6UA2JPS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-35/CC-MAIN-2019-35_segments_1566027318421.65_warc_CC-MAIN-20190823130046-20190823152046-00466.warc.gz\"}"}
https://essaywritingbuy.net/2020/09/30/solve-money-problems_dz/
[ "# Solve money problems\n\nIs money the answer to all problems?\nsolve simple measure and money problems involving fractions and decimals example rhetorical analysis essay visual arts essay to two decimal places teaching resources for 2014 national curriculum resources. solve money problems example: if you’re behind a outliers essay web filter, please solving word problems with systems of equations make sure that the solve money problems domains where does the thesis go in a paper *.kastatic.org and *.kasandbox.org are unblocked oct 14, 2016 · the problem is, the hallway turns and you have causes of ww1 essay to fit your sofa around a corner. oct 08, 2018 · sometimes the problem with money is that there really isn’t enough to go trigonometry problem solving around. if you don’t know where you’re going, how do you know when you get there? . divide both sides by : finding 100% of a number: acts 4:34-37 esv / 33 helpful strong essay closers votes helpful not helpful. learning and using the proper." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8880551,"math_prob":0.8495895,"size":1039,"snap":"2020-45-2020-50","text_gpt3_token_len":225,"char_repetition_ratio":0.14396136,"word_repetition_ratio":0.03508772,"special_character_ratio":0.22521655,"punctuation_ratio":0.11,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9576013,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-21T07:05:25Z\",\"WARC-Record-ID\":\"<urn:uuid:40bff1a9-1240-4ebe-ae0f-e7513b5a91ee>\",\"Content-Length\":\"18335\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:cc12e408-3122-4431-8244-44d1d04b3ae3>\",\"WARC-Concurrent-To\":\"<urn:uuid:a996b6aa-25b0-4914-a277-2ac78eea10bf>\",\"WARC-IP-Address\":\"188.126.77.167\",\"WARC-Target-URI\":\"https://essaywritingbuy.net/2020/09/30/solve-money-problems_dz/\",\"WARC-Payload-Digest\":\"sha1:JZZQSEB6Z55SVB4PAUK63SRSK5YCLVTV\",\"WARC-Block-Digest\":\"sha1:VJH6R4WE63DHAYHNOKLONFRPQQXRKS5L\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107876136.24_warc_CC-MAIN-20201021064154-20201021094154-00591.warc.gz\"}"}
https://tex.stackexchange.com/questions/276451/shorter-line-for-math-mode?noredirect=1
[ "# Shorter line for math-mode?\n\nI have\n\n$A-V$\n\n\nbut the line \"-\" is shown too long:", null, "I would like to have shorter line.\n\nHow can you have a shorter line there in the math-mode?\n\n• Is it not a minus sign? Load amsmath and use $A\\text{ - }V$ – user11232 Nov 3 '15 at 23:07\n• $A{-}V$ will reduce the spacing, while $A\\mbox{-}V$ will change the font and therefore not set - as a minus. – Werner Nov 3 '15 at 23:10\n• Do you want \\textit{A-V}? – Sigur Nov 3 '15 at 23:13\n• $A$\\nobreakdash-$V$ (requires amsmath). Or $A\\text{-}V$, but it's wrong to begin with. – egreg Nov 3 '15 at 23:14\n• Related: Hyphens in mathmode – Ari Brodsky Nov 11 '15 at 2:50\n\nA hyphen in math mode is interpreted as a minus sign. If you mean to have a variable named A-V in math mode, with a hyphen in between, you need to define a “math hyphen” or resort to $A\\text{-}V$.\n\nFor defining a math hyphen you can do\n\n\\DeclareMathSymbol{\\mh}{\\mathord}{operators}{\\-}\n\n\nFull example:\n\n\\documentclass{article}\n\\usepackage{amsmath}\n\n\\DeclareMathSymbol{\\mh}{\\mathord}{operators}{\\-}\n\n\\begin{document}\n\n$A\\mh V$\n\n$A\\text{-}V$\n\n\\end{document}", null, "The first option, with \\mh (or the name you prefer), is better.\n\nOf course, if this is not a variable, but you're referring to two variables in some text, the correct input would be\n\n$A$\\nobreakdash-$V$" ]
[ null, "https://i.stack.imgur.com/x14Tb.png", null, "https://i.stack.imgur.com/H24Vd.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.83341587,"math_prob":0.9513997,"size":1278,"snap":"2019-51-2020-05","text_gpt3_token_len":408,"char_repetition_ratio":0.10361067,"word_repetition_ratio":0.24038461,"special_character_ratio":0.3114241,"punctuation_ratio":0.1,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9985996,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,3,null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-27T21:32:10Z\",\"WARC-Record-ID\":\"<urn:uuid:5eb57b3c-a2cd-435e-88bc-f52c7f878ed2>\",\"Content-Length\":\"135848\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3e907e53-439c-4c6b-bd89-6ed47488ae23>\",\"WARC-Concurrent-To\":\"<urn:uuid:6b80a3c0-2f89-49a0-80ef-c0fb2eb5617e>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://tex.stackexchange.com/questions/276451/shorter-line-for-math-mode?noredirect=1\",\"WARC-Payload-Digest\":\"sha1:6PYJNGIZ2OJ57V5XLRQXQIZNS5D3GH6D\",\"WARC-Block-Digest\":\"sha1:TJLDUUQ7LRRPBRE24EWWSRKQVKEJSSF2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251728207.68_warc_CC-MAIN-20200127205148-20200127235148-00091.warc.gz\"}"}
https://www.programmersranch.com/2013/05/c-basics-arithmetic-and-exceptions.html
[ "## Saturday, May 4, 2013\n\n### C# Basics: Arithmetic and Exceptions\n\nGreetings!\n\nYesterday's article, C# Basics: Fun with Integers, introduced the integer data type, and showed that bad things happen if you try to convert a piece of non-numeric text (String) to an integer. But how do we handle such a situation? Today's article explains exactly that, and introduces other arithmetic operations that you can do with numbers.\n\nStart off by creating a new console application in SharpDevelop or Visual Studio. If you don't remember how to do so, check my first article, C# Basics: Input and Output. Once you've done that, replace the sample code with the following:\n\nint x = 5;\nint y = 0;\nint z = x / y;\n\nConsole.Write(\"Press any key to continue . . . \");\n\nIn this example, we are declaring two integer variables, x and y, dividing one by the other (/ means divided by), and storing the result in a third integer, z. This time we have no user interaction. But if you think that makes this a dull example, press F5 and see what happens...\n\nBOOM. Basically, if you have a background in mathematics, you'll know that you should never divide by zero (as we've just done). If you don't, you should know that only Chuck Norris may divide by zero. You can't.\n\nChuck Norris doesn't allow programs to divide by zero either, so this program crashed just like in yesterday's article. Except that yesterday we had a FormatException, while this time we have a DivideByZeroException. You'll start to notice a pattern here: errors such as these are called exceptions. When an exception occurs, we're in trouble, and we have to do something about it.\n\nSo what we do is wrap the messy code in a try/catch block as follows:\n\ntry\n{\nint x = 5;\nint y = 0;\nint z = x / y;\nConsole.WriteLine(\"The value of z is {0}\", z);\n}\ncatch(Exception ex)\n{\nConsole.WriteLine(\"Uh oh... Chuck Norris just roundhouse-kicked this program.\");\n}\n\nConsole.Write(\"Press any key to continue . . . \");\n\nDoes this look weird? Don't worry - that's because it is. This is called structured exception handling, and not everyone likes it (check out what Joel Spolsky has to say about exceptions).\n\nIt's actually more straightforward than it looks. Your program goes into the try block and starts executing each statement one by one, as before. When something explodes (in this case, due to division by zero), the program jumps out of the try block (skipping everything else that's in it - in this case, the code that writes the value of z to the console window) and into the catch block. The catch block defines what the program needs to do when an exception occurs. When you run (F5) this program, here's what you get:\n\nAs you can see, only the Console.WriteLine() within the catch block got executed, because the one in the try block got skipped when the DivisionByZeroException was thrown in the previous line. After the catch block, code execution resumes as normal.\n\nNow, try changing the value of y to 2 instead of 0:\n\nint y = 2;\n\nSince we are no longer dividing by zero, Chuck Norris is happy, and the output is different:\n\nHowever, that isn't quite what we expected, right? I mean, 5 divided by 2 is supposed to give you 2.5, not 2. The problem here is that we are dealing exclusively with integers, so when you divide 5 by 2, the integer part of the result is kept, and the fraction is lost. To do a division that preserves the fraction part, we need to use a different data type, such as float, but more on that another time.\n\nFor now, suffice to say that subtraction and divison aren't the only operations you can do with integers. How about addition?\n\nint a = 5 + 3// a is 8\n\nOr maybe a bit of multiplication?\n\nint b = a * 2// b is 16\n\nThere's even this thing called modulus, that gives you the remainder of a division operation. For example, 14 divided by 3 gives you 4 remainder 2. The 4 is the result of the division operation (/), while the 2 is the result of a modulus operation (%):\n\nint c = 14 / 3// c is 4\nint d = 14 % 3// d is 2\n\nNow let's say you have another variable, and you deduct a value from itself:\n\nint e = 20;\ne = e - 1// e is 19\n\n...there is a shorthand for that, which is:\n\ne -= 1// e is 18\n\nIn general, when you say x -= y, it's the same as x = x - y. The same holds true for the other arithmetic operations: x *= y is the same as x = x * y, and so on.\n\nGreat! This article showed a bit more about what you can do with integers in terms of arithmetic operations, and explained how to deal with circumstances where exceptions are thrown. We can handle the exception at the end of C# Basics: Fun with Integers exactly this way. You can do that as an exercise if you wish. Stick around - more programming tutorials are on their way!" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9310446,"math_prob":0.9101064,"size":4740,"snap":"2020-34-2020-40","text_gpt3_token_len":1147,"char_repetition_ratio":0.11064189,"word_repetition_ratio":0.040494937,"special_character_ratio":0.25632912,"punctuation_ratio":0.15103653,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9881194,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-27T23:59:23Z\",\"WARC-Record-ID\":\"<urn:uuid:6e28344b-d65b-4e73-af26-acf0058022b5>\",\"Content-Length\":\"101874\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9f7476c2-84e4-4493-bc4a-df777215035f>\",\"WARC-Concurrent-To\":\"<urn:uuid:ff1c9bc8-0308-4409-876a-5e97adb4caac>\",\"WARC-IP-Address\":\"172.217.15.83\",\"WARC-Target-URI\":\"https://www.programmersranch.com/2013/05/c-basics-arithmetic-and-exceptions.html\",\"WARC-Payload-Digest\":\"sha1:QXHZDG5JTXMOTG7NLAQ6Z5WXBG4G5AML\",\"WARC-Block-Digest\":\"sha1:TILX567GN36EJRRKD7TUB3KWCUA3SRS5\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600401582033.88_warc_CC-MAIN-20200927215009-20200928005009-00593.warc.gz\"}"}
http://www.leastcommonmultiple.net/lcm-of-1222/
[ "X\nX\n\n# Calculate the Least Common Multiple or LCM of 1222\n\nThe instructions to find the LCM of 1222 are the next:\n\n## 1. Decompose all numbers into prime factors\n\n 1222 2 611 13 47 47 1\n\n## 2. Write all numbers as the product of its prime factors\n\n Prime factors of 1222 = 2 . 13 . 47\n\n## 3. Choose the common and uncommon prime factors with the greatest exponent\n\nCommon prime factors: 2 , 13 , 47\n\nCommon prime factors with the greatest exponent: 21, 131, 471\n\nUncommon prime factors: None\n\nUncommon prime factors with the greatest exponent: None\n\n## 4. Calculate the Least Common Multiple or LCM\n\nRemember, to find the LCM of several numbers you must multiply the common and uncommon prime factors with the greatest exponent of those numbers.\n\nLCM = 21. 131. 471 = 1222\n\nAlso calculates the:" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8600339,"math_prob":0.95328593,"size":778,"snap":"2022-27-2022-33","text_gpt3_token_len":214,"char_repetition_ratio":0.20284238,"word_repetition_ratio":0.1764706,"special_character_ratio":0.29948586,"punctuation_ratio":0.13071896,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99794495,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-20T05:38:36Z\",\"WARC-Record-ID\":\"<urn:uuid:a3b733eb-fd51-462f-ae77-8b743a94a915>\",\"Content-Length\":\"35585\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4c02deb9-eefb-4491-96ba-071b9c6e6565>\",\"WARC-Concurrent-To\":\"<urn:uuid:6e01ca5c-b43c-44fa-80e2-6356724cd6f4>\",\"WARC-IP-Address\":\"107.170.60.201\",\"WARC-Target-URI\":\"http://www.leastcommonmultiple.net/lcm-of-1222/\",\"WARC-Payload-Digest\":\"sha1:CMT7ZUSPRLADD3HYCFV5BX2HBYSLKBT5\",\"WARC-Block-Digest\":\"sha1:YILWXTKXFIQZ5GY3TZAGR54INCOQILMB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882573908.30_warc_CC-MAIN-20220820043108-20220820073108-00435.warc.gz\"}"}
https://worldtravelattractions.com/attractions/best-answer-is-gravitational-force-is-attractive-in-nature.html
[ "# Best answer: Is gravitational force is attractive in nature?\n\nContents\n\nGravitational force is an attractive, fundamental force of the universe that is directly proportional to the mass of the two objects and inversely proportional to the distance between them.\n\n## Is gravitational force attractive or repulsive in nature?\n\nBoth in the Newton theory of gravitation and in the General Theory of Relativity the gravitational force is exclusively attractive one.\n\n## Why gravitational force is an attractive force?\n\nSince the gravitational force is directly proportional to the mass of both interacting objects, more massive objects will attract each other with a greater gravitational force. So as the mass of either object increases, the force of gravitational attraction between them also increases.\n\n## Is gravitational force conservative?\n\nIf the work done by a force depends only on initial and final positions, not on the path between them, the force is called a conservative force. Gravity force is “a” conservative force. “Spring force” is another conservative force.\n\n## Which of these is always attractive in nature?\n\n(a) Gravitational force is always attractive in nature.\n\n## Why is gravitational force conservative in nature?\n\nThe line integral of gravitational work is zero. Therefore, gravitational force is a conservative force. Originally Answered: Why is gravitational force a conservative force in nature? Because the total work done to move an object to and away in the gravitational field does not depend on the path.\n\nIT IS SURPRISING:  Why media is important in tourism industry?\n\n## Is gravitational force conservative justify?\n\nA conservative force is a force with the property that the total work done in moving a particle between two points is independent of the path taken. … Gravitational force is an example of a conservative force, while frictional force is an example of a non-conservative force.\n\n## Which type of force is gravitational force?\n\nGravity or gravitational force is the force of attraction between any two objects in the universe. The force of attraction depends on the mass of the object and the square of the distance between them. It is by far the weakest known force in nature.\n\n## Which force is only attractive in nature?\n\n(a) Gravitational force is always attractive in nature.\n\n## Which is the strongest force in nature?\n\nThe strong nuclear force, also called the strong nuclear interaction, is the strongest of the four fundamental forces of nature.\n\n## Which force is only attractive in nature gravitational force electrostatic force magnetic force none of these?\n\nThe correct answer is option 2 i.e. Gravitational force. All objects in the universe attract each other. This force of attraction between objects is called the gravitational force." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9177193,"math_prob":0.8656824,"size":2614,"snap":"2022-27-2022-33","text_gpt3_token_len":482,"char_repetition_ratio":0.26704982,"word_repetition_ratio":0.073529415,"special_character_ratio":0.17827085,"punctuation_ratio":0.09628009,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9947301,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-14T01:11:15Z\",\"WARC-Record-ID\":\"<urn:uuid:13cbaf46-c5c2-4696-9493-49c48d32fab4>\",\"Content-Length\":\"68509\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:626dd590-5566-477e-a8b6-bd94a34ab51f>\",\"WARC-Concurrent-To\":\"<urn:uuid:4e0615df-61bc-41a3-811f-035bc205fe8b>\",\"WARC-IP-Address\":\"144.126.128.2\",\"WARC-Target-URI\":\"https://worldtravelattractions.com/attractions/best-answer-is-gravitational-force-is-attractive-in-nature.html\",\"WARC-Payload-Digest\":\"sha1:VTQQ4NETKCGXF7RY2FLAFDDTQG5IASWQ\",\"WARC-Block-Digest\":\"sha1:TPDALRSNDKYYBGIG5SA7KU522OXN63QS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882571989.67_warc_CC-MAIN-20220813232744-20220814022744-00517.warc.gz\"}"}
https://www.gradesaver.com/textbooks/math/geometry/geometry-common-core-15th-edition/chapter-9-transformations-9-1-translations-practice-and-problem-solving-exercises-page-552/38
[ "## Geometry: Common Core (15th Edition)\n\n$B$\nIn a triangle, the longest side lies opposite the largest angle. With this in mind, we can order the angles in $\\triangle PQR$ according to their opposite sides. Let's order the sides from least to greatest first: $\\overline{QR} < \\overline{PQ} < \\overline{RP}$ Now, let's match up the angle with the side opposite to it: $\\overline{QR}$ is opposite to $\\angle P$ $\\overline{PQ}$ is opposite to $\\angle R$ $\\overline{RP}$ is opposite to $\\angle Q$ Option $A$ is not correct. We know nothing about the measures and cannot determine if two angles are less than another angle. Option $B$ is correct. In our lineup, $\\angle Q$ is the largest of the three angles. Option $C$ cannot be correct because $m \\angle R$ is less than $m \\angle Q$ but greater than $m \\angle P$. Option $D$ is incorrect. $m \\angle P < m \\angle R$." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.87940645,"math_prob":0.9993488,"size":846,"snap":"2022-05-2022-21","text_gpt3_token_len":231,"char_repetition_ratio":0.18408552,"word_repetition_ratio":0.0,"special_character_ratio":0.27304965,"punctuation_ratio":0.090361446,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999641,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-23T10:56:13Z\",\"WARC-Record-ID\":\"<urn:uuid:22b7b6aa-a772-496f-8f6f-2c32529eca0a>\",\"Content-Length\":\"88329\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4e925c52-6dbe-4217-b416-31c4d41d9d92>\",\"WARC-Concurrent-To\":\"<urn:uuid:cc1fef47-3312-4210-8cc6-a980de8f8ed7>\",\"WARC-IP-Address\":\"44.198.198.134\",\"WARC-Target-URI\":\"https://www.gradesaver.com/textbooks/math/geometry/geometry-common-core-15th-edition/chapter-9-transformations-9-1-translations-practice-and-problem-solving-exercises-page-552/38\",\"WARC-Payload-Digest\":\"sha1:CF55BR7WGXEJRM3VIY7Y5IXTAMSEJJCG\",\"WARC-Block-Digest\":\"sha1:GO6OVIV3M4SZYIB6UE2V7CANNPUTJ4NZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662558015.52_warc_CC-MAIN-20220523101705-20220523131705-00365.warc.gz\"}"}
https://visualfractions.com/calculator/square-root/728/
[ "# Square Root of 728\n\nIn this article we're going to calculate the square root of 728 and explore what the square root is and answer some of the common questions you might. We'll also look at the different methods for calculating the square root of 728 (both with and without a computer/calculator).\n\n## Square Root of 728 Definition\n\nIn mathematical form we can show the square root of 728 using the radical sign, like this: √728. This is usually referred to as the square root of 728 in radical form.\n\nSo what is the square root? In this case, the square root of 728 is the quantity (which we will call q) that when multiplied by itself, will equal 728.\n\n√728 = q × q = q2\n\n## Is 728 a Perfect Square?\n\nIn math, we refer to 728 being a perfect square if the square root of 728 is a whole number.\n\nIn this case, as we will see in the calculations below, we can see that 728 is not a perfect square.\n\nTo find out more about perfect squares, you can read about them and look at a list of 1000 of them in our What is a Perfect Square? article.\n\n## Is The Square Root of 728 Rational or Irrational?\n\nA common question is to ask whether the square root of 728 is rational or irrational. Rational numbers can be written as a fraction and irrational numbers cannot.\n\nA quick way to check this is to see if 728 is a perfect square. If it is, then it is a rational number. If it's not a perfect square then it's an irrational number.\n\nWe already know if 728 is a perfect square so we also can see that √728 is an irrational number.\n\n## Can the Square Root of 728 Be Simplified?\n\n728 can be simplified only if you can make 728 inside the radical symbol smaller. This is a process that is called simplifying the surd. In this example, the square root of 728 can be simplified.\n\n√728 = 2√182.\n\n## How to Calculate The Square Root of 728 with a Calculator\n\nIf you have a calculator then the simplest way to calculate the square root of 728 is to use that calculator. On most calculators you can do this by typing in 728 and then pressing the √x key. You should get the following result:\n\n√728 ≈ 26.9815\n\n## How to Calculate the Square Root of 728 with a Computer\n\nOn a computer you can also calculate the square root of 728 using Excel, Numbers, or Google Sheets and the SQRT function, like so:\n\nSQRT(728) ≈ 26.981475126464\n\n## What is the Square Root of 728 Rounded?\n\nSometimes you might need to round the square root of 728 down to a certain number of decimal places. Here are the solutions to that, if needed.\n\n10th: √728 ≈ 27\n\n100th: √728 ≈ 26.98\n\n1000th: √728 ≈ 26.981\n\n## What is the Square Root of 728 as a Fraction?\n\nWe covered earlier in this article that only a rational number can be written as a fraction, and irrational numbers cannot.\n\nLike we said above, since the square root of 728 is an irrational number, we cannot make it into an exact fraction. However, we can make it into an approximate fraction using the square root of 728 rounded to the nearest hundredth.\n\n√728\n\n≈ 27/1\n\n≈ 2698/100\n\n≈ 26 49/50\n\n## What is the Square Root of 728 Written with an Exponent?\n\nAll square root calculations can be converted to a number (called the base) with a fractional exponent. Let's see how to do that with the square root of 728:\n\n√b = b½\n\n√728 = 728½\n\n## How to Find the Square Root of 728 Using Long Division\n\nFinally, we can use the long division method to calculate the square root of 728. This is very useful for long division test problems and was how mathematicians would calculate the square root of a number before calculators and computers were invented.\n\n### Step 1\n\nSet up 728 in pairs of two digits from right to left and attach one set of 00 because we want one decimal:\n\n7\n28\n00\n\n### Step 2\n\nStarting with the first set: the largest perfect square less than or equal to 7 is 4, and the square root of 4 is 2 . Therefore, put 2 on top and 4 at the bottom like this:\n\n 2 7 28 00 4\n\n### Step 3\n\nCalculate 7 minus 4 and put the difference below. Then move down the next set of numbers.\n\n 2 7 28 00 4 3 28\n\n### Step 4\n\nDouble the number in green on top: 2 × 2 = 4. Then, use 4 and the bottom number to make this problem:\n\n4? × ? ≤ 328\n\nThe question marks are \"blank\" and the same \"blank\". With trial and error, we found the largest number \"blank\" can be is 6. Replace the question marks in the problem with 6 to get:\n\n46 × 6 = 276\n\nNow, enter 6 on top, and 276 at the bottom:\n\n 2 6 7 28 00 4 3 28 2 76\n\n### Step 5\n\nCalculate 328 minus 276 and put the difference below. Then move down the next set of numbers.\n\n 2 6 7 28 00 4 3 28 2 76 0 52 00\n\n### Step 6\n\nDouble the number in green on top: 26 × 2 = 52. Then, use 52 and the bottom number to make this problem:\n\n52? × ? ≤ 5200\n\nThe question marks are \"blank\" and the same \"blank\". With trial and error, we found the largest number \"blank\" can be is 9.\n\nNow, enter 9 on top:\n\n 2 6 9 7 28 00 4 3 28 2 76 0 52 00\n\nThat's it! The answer shown at the top in green. The square root of 728 with one digit decimal accuracy is 27. Notice that the last two steps actually repeat the previous two. To add decimal places to your answe you can simply add more sets of 00 and repeat the last two steps." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8967834,"math_prob":0.99462646,"size":5114,"snap":"2022-05-2022-21","text_gpt3_token_len":1421,"char_repetition_ratio":0.19080235,"word_repetition_ratio":0.17938931,"special_character_ratio":0.316973,"punctuation_ratio":0.09489051,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99934906,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-18T07:23:50Z\",\"WARC-Record-ID\":\"<urn:uuid:64cb0049-85d4-49fe-aa61-bfacb58d6988>\",\"Content-Length\":\"25674\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8b3de6d3-3cb9-4706-9973-ab654548fda6>\",\"WARC-Concurrent-To\":\"<urn:uuid:ebbd5c50-8ea2-4aeb-89d1-4b0cb017dc3f>\",\"WARC-IP-Address\":\"172.67.147.3\",\"WARC-Target-URI\":\"https://visualfractions.com/calculator/square-root/728/\",\"WARC-Payload-Digest\":\"sha1:FTMLRQGJPJGQDQKKDECMFY42CJIXQE3Z\",\"WARC-Block-Digest\":\"sha1:KFHP4I7GDYLDE5PMPL5AEE35UWT6BMRN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662521152.22_warc_CC-MAIN-20220518052503-20220518082503-00641.warc.gz\"}"}
https://www.enotes.com/homework-help/how-do-calculate-concentration-carbonic-acid-am-371141
[ "# How do i calculate the concentration of carbonic acid?I am doing a chemistry experiment investigation that models the formation of acid rain.  The experiment involved producing carbon dioxide and bubbling it through distilled water to produce dilute carbonic acid. To produce the carbon dioxide i reacted sodium carbonate with hydrochloric acid. I have complete the following calculations so far: Balanced molecular: 2HCl (aq) + Na2CO3 (s)          ->        2NaCl (aq) +  CO2 (g) + H2O (l)   Ionic equation: 2H+ (aq) + Na2CO3 (s)     ->            2Na+(aq) + CO2(g) + H2O (l)   Initially the number of moles of sodium carbonate and hydrochloric acid must be calculated to determine the limiting reagent: n (Na2CO3) = ? m= 9g M= (22.99 x 2) + 12.01 + (16x3) = 105.81 g.mol-1   n= = =0.08505812305 mol n (HCl)= ? m= 50mL 1mL = 1g ∴m=50g M = 1.008 +35.45 =36.458 g.mol-1 n=  = = 1.37144111 mol   The stoichiometric ratio between the hydrochloric acid and sodium carbonate is as follows: HCl: Na2CO3 2:1 Therefore approximately… 0.08505812305mol x2 of HCl is required to react with Na2CO3 = 0.1701162461mol The hydrochloric acid is in excess therefore the sodium carbonate limits the amount of product produced and is the limiting reagent. Therefore the number of moles of carbon dioxide produced can be calculated as follows: n(CO2)= ?             = n(Na2CO3) (as the stoichiometric ratio is 1:1)             = 0.08505812305 mol I was wondering waht to do next if i am to calculate the concentration of carbonic acid?", null, "Hi there.\n\nThere are some concerns regarding this experiment.\n\n1. The chemical equation you have written is correct. You can further form carbonic acid from H2O and CO2. Take a look at this:\n\nNa2CO3 + 2HCl  ---> 2NaCl + H2O +CO2      eq1\n\nH2O + CO2 ---> H2CO3 (carbonic...\n\nStart your 48-hour free trial to unlock this answer and thousands more. Enjoy eNotes ad-free and cancel anytime.\n\nHi there.\n\nThere are some concerns regarding this experiment.\n\n1. The chemical equation you have written is correct. You can further form carbonic acid from H2O and CO2. Take a look at this:\n\nNa2CO3 + 2HCl  ---> 2NaCl + H2O +CO2      eq1\n\nH2O + CO2 ---> H2CO3 (carbonic acid)         eq2\n\n-------------------------------------------------\n\nNa2CO3 + 2HCl ---> 2NaCl + H2CO3            eq 3\n\nYou can use the equation 3 to solve for the concentration of carbonic acid.\n\n2. The calculation for the number of moles of Na2CO3 is correct. We have concerns for the concentration of HCl. Please specify the concentration of the HCl reagent that you used. You cannot simply assume 50ml = 50 grams. Remember that you used a solution of HCL meaning that 50 mL HCl solution has concentration. Please ask your instructor what is the concentration of HCL that has been used in the experiment.\n\nIf you have the concentration already, let say it is in molarity, you can just get the number of moles by multiplication.\n\nmoles HCl = (concentration of HCL reagent) x (50 mL)\n\nNow from here you can proceed in selecting the limiting reagent.\n\n3. Solving for the concentration of the carbonic acid can be accomplished using the formula:\n\nmoles carbonic acid/ L solution\n\nMoles of carbonic acid can be solve using stoichiometry. Just be sure item 2 is solved. The total volume of the solution is needed as well.\n\nhope this helps :)\n\nApproved by eNotes Editorial Team" ]
[ null, "https://static.enotescdn.net/images/main/illustrations/illo-answer.svg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8738903,"math_prob":0.9824571,"size":1631,"snap":"2022-27-2022-33","text_gpt3_token_len":428,"char_repetition_ratio":0.17332514,"word_repetition_ratio":0.31095406,"special_character_ratio":0.28142244,"punctuation_ratio":0.10891089,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99669415,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-26T14:47:51Z\",\"WARC-Record-ID\":\"<urn:uuid:97093f2c-1d97-41a9-b982-2e51717dda52>\",\"Content-Length\":\"80175\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:29a479c8-bbda-42aa-bbc6-41eeefd4f3dd>\",\"WARC-Concurrent-To\":\"<urn:uuid:f1f6000f-9ea2-4a87-9b0c-9cac9abc5e5e>\",\"WARC-IP-Address\":\"172.67.68.40\",\"WARC-Target-URI\":\"https://www.enotes.com/homework-help/how-do-calculate-concentration-carbonic-acid-am-371141\",\"WARC-Payload-Digest\":\"sha1:N3KHTXMNPJE6SYCW65Z3ZI5SROYKYKEK\",\"WARC-Block-Digest\":\"sha1:VZXVJUWP4Y3W6P7N7CZYB7L3ADVIGWYU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103269583.13_warc_CC-MAIN-20220626131545-20220626161545-00406.warc.gz\"}"}
https://crypto.stackexchange.com/questions/94959/does-poly1305-have-weak-keys-like-gcm-ghash/94967
[ "# Does Poly1305 have weak keys like GCM/GHASH?\n\nSome block cipher keys are weak when used with GCM; see this question. This happens when the multiplier $$H$$ decided by the key ends up in a small-order subgroup of $$\\mathbb{F}_{2^{128}}$$.\n\nPoly1305 has a very similar structure to GHASH. It's the same idea: add in a block, then multiply by a key-determined constant, within a field. GHASH uses $$\\mathbb{F}_{2^{128}}$$ (binary field) and Poly1305 uses $$\\mathbb{F}_{2^{130}-5}$$ (prime field); the other differences are minor.\n\nDoes Poly1305 have the same issue with weak keys? The order, $$2^{130}-5-1$$, has factors $$\\{2, 23, 32985101, 897064739519922787230182993783\\}$$.\n\n• Note that the validity of the question itself is being questioned, please see the side channel chat for details. Sep 9 at 11:21\n• Note that Poly1305 is more secure than GCM on partition oracle attacks, too. One should prefer xCHaCha20-Poly1305 against AES-GCM. Sep 9 at 17:50\n\nThere are probably a handful of keys which could be detected by swapping blocks in an authenticated message that is a few tens of millions of blocks long. There's also the trivial zero weak key and the trivial 1 key.\n\nRecall that the Poly1305 MAC additive is calculated as $$\\left(\\sum_i c_i r^i\\pmod{2^{130}-5}\\right)\\pmod{2^{128}}$$ where $$c_i$$ is a mild funging of the message block and $$r$$ is the MAC key. Clearly if $$r=0$$ then the additive is always zero. This is trivial to detect as any modification of the message will still authenticate. If $$r=1$$, swapping any $$c_i$$ and $$c_j$$ would not change the additive. Swapping two message blocks will achieve this provided that neither is the final message block.\n\nLikewise, if $$r\\equiv -1\\pmod{2^{130}-5}$$ (corresponding to the subgroup of order 2), then swapping $$c_i$$ and $$c_j$$ where $$i$$ and $$j$$ have the same parity would not change the additive Swapping blocks $$m_i$$ and $$m_j$$ will achieve this provided that neither is the final block. However this $$r$$ cannot occur as a Poly1305 key as its binary expression is 11111111....11010 and Poly1305 keys are required to have zero bits in positions 28, 29, 30, 31, 32, 33, 60, 61, 62, 63, 64, 65, 66, 92, 93, 94, 95, 96, 97, 124, 125, 126, 127, 128, and 129 (note that this is an approximately $$2^{-24}$$ condition on elements mod $$2^{130}-5$$).\n\nWriting $$p=2^{130}-5$$ and noting that 2 is a primitive root mod $$p$$, we write $$\\omega_{23}\\equiv 2^{(p-1)/23}\\pmod p$$ and the powers of $$\\omega_{23}$$ are all of order 23. Swapping $$c_i$$ and $$c_j$$ where are $$i$$ and $$j$$ are congruent mod 23 will not change the additive when $$r\\equiv\\omega_{23}^k$$ for some $$k$$ giving another 23 possible weak keys. However, none of these keys is likely to satisfy the bit conditions for $$r$$ (I have not checked). Ditto for another 23 keys of order 46.\n\nHowever, if we write $$\\omega_{32985101}\\equiv 2^{(p-1)/32985101}\\pmod p$$, swapping $$c_i$$ and $$c_j$$ where are $$i$$ and $$j$$ are congruent mod 32985101 will not change the additive when $$r\\equiv\\omega_{32985101}^k$$ for some $$k$$ and this is a much larger family of potential weak keys of which half a dozen are so will likely match the constraints on $$r$$ (I've not done the search, but it is straightforward). Messages of over $$2^{25}$$ blocks are not inconceivable.\n\nThere are likely to also be a few more keys corresponding to elements of order $$2\\times 32985101$$, $$23\\times 32985101$$ and $$46\\times 32985101$$. Elements where 897064739519922787230182993783 divides their order also theoretically correspond to other weak keys, but message lengths of around $$2^{100}$$ blocks are unrealistic and should likely be avoided for other reasons.\n\n• After reading your answer (thanks!), I enumerated all the weak keys that could still happen despite Poly1305's $r$ mask. See below. Sep 11 at 2:11\n\nAfter Daniel S's answer above, I wrote code to exhaustively search for all elements whose order $$\\le {2*23*32985101}$$--the weak keys--while matching Poly1305's $$r$$ mask.\n\nHere is the complete list of all $$76$$ weak keys' $$r$$ values as little-endian bytes, assuming that I did it right. Of course, hitting any of these $$76$$ keys with an appropriately generated cipher key is ridiculously unlikely, so it probably doesn't matter other than theoretically.\n\n# Order infinity\n{ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 }\n# Order 1\n{ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 }\n# Order 2 is impossible due to r mask\n# Order 23 is impossible due to r mask\n# Order 2 * 23 = 46 is impossible due to r mask\n# Order 32985101\n{ 0B 3C B5 01 AC 50 BA 0F EC D4 93 0E E0 15 87 0C }\n{ F7 8A 43 04 90 81 58 0F 08 80 A4 07 00 E8 AE 03 }\n# Order 2 * 32985101 = 65970202\n{ E2 21 46 0C 48 03 02 06 00 0B 5F 03 B8 01 EF 02 }\n# Order 23 * 32985101 = 758657323\n{ 91 07 76 00 14 DA C3 04 00 6B C4 0D 50 D1 77 09 }\n{ 72 3E B4 05 E8 1F 2F 09 BC 4F 60 04 6C 09 E2 09 }\n{ 5B 63 19 05 48 93 CD 08 40 C5 2F 02 EC E5 76 0E }\n{ 0C 11 BE 05 F0 3A 47 09 84 73 36 00 90 A4 14 01 }\n{ C5 1B 20 09 60 4A A5 0F 14 04 E3 04 F4 1B 34 0E }\n{ E2 0C CF 05 74 AB BF 09 08 EF F1 04 64 94 35 04 }\n{ C6 88 DE 05 A8 ED 56 0F 08 34 ED 02 24 51 30 09 }\n{ 91 8B 01 0B 54 C6 BE 01 50 47 71 02 EC 74 AD 0A }\n{ AD B8 29 00 50 35 E9 0E D0 DA C1 0F 08 5D 66 06 }\n{ 13 90 C9 05 34 C8 E0 03 04 6B DC 0B 3C 8F 0E 00 }\n{ 38 59 5D 05 30 70 17 07 C8 12 EE 0C 0C 32 71 0B }\n{ 04 AE 35 01 00 29 1D 0A 90 96 5A 0F 60 65 FD 05 }\n{ 3C 6A 9B 02 CC 45 58 0F A0 D0 66 0B 4C 2B 3C 0F }\n{ 9D B7 1F 0E 40 26 64 01 7C C6 85 08 1C 84 14 07 }\n{ 7C FD 5E 03 D8 95 20 06 60 8E C7 07 30 3E 93 0B }\n{ 0C 24 74 08 30 0E DF 06 DC 5A 20 01 9C 7F 2C 0C }\n{ 1D F1 EC 05 A8 14 04 0C E0 3C C3 0C B8 5E 9D 07 }\n{ FA 09 BE 01 8C 9D 55 01 08 39 1D 00 04 2B C2 09 }\n{ DD F9 5C 06 C8 09 08 0E 8C A8 5E 01 E4 1F 99 00 }\n{ 06 9F EB 09 30 3B FA 0F F4 D5 A1 0A 3C 8D DE 07 }\n{ 8D EF B9 0F B0 70 08 0D 6C CB 27 02 4C 7E 21 06 }\n{ B3 0D 1C 05 78 88 C0 07 18 E9 72 0A C0 AB 30 0A }\n{ 1D F5 33 00 68 3D F9 00 3C 68 8E 0E 2C E2 7C 08 }\n{ 2D 60 5E 04 A0 1A 52 0B C0 09 7F 0F 3C BF 17 04 }\n{ 4D 92 28 0B 50 AA 51 03 A8 AA 14 07 88 97 D7 02 }\n{ AB EE 3B 07 A4 F4 11 03 DC A6 79 04 14 6E 6F 05 }\n{ C2 B8 A2 00 00 C2 FC 05 A4 4E E2 0E BC D7 65 01 }\n{ C4 1A 2E 05 C0 DB 45 08 18 7E 5D 06 5C C8 B9 0F }\n{ 44 8F 6D 0C 58 0E 43 00 30 87 35 0F 28 2E 3B 08 }\n{ 69 29 E1 01 88 54 C4 0D 6C 15 FB 01 4C 6B C1 0C }\n{ F6 7B 02 08 88 E6 C6 08 B0 75 01 0E A0 F5 C5 09 }\n{ 41 9A 94 04 AC 76 87 04 A4 89 0D 01 C0 10 26 06 }\n{ 4A C2 4B 0B FC 08 0B 00 BC 60 AC 0A AC D2 42 0E }\n{ 06 DF 09 06 3C 7A A4 07 18 5A 4B 0C 1C 52 FF 0E }\n{ AA 17 D2 03 2C F6 97 0E E8 C2 23 0E DC C1 51 02 }\n{ 95 1A AE 05 F8 80 A0 07 48 A2 4D 05 1C F5 C8 0C }\n{ B4 B0 C0 01 84 99 65 0B 2C 4D C0 0F 74 79 F8 0B }\n{ 44 91 8A 03 98 9B 5C 07 F4 09 9C 09 E4 1F C7 0B }\n# Order 2 * 23 * 32985101 = 1517314646\n{ 79 D2 21 09 58 7B CD 0C 40 9B 15 0D D8 FB 25 05 }\n{ 5F EC E4 03 B4 29 B8 04 1C F3 79 06 DC 09 9D 02 }\n{ D5 E0 22 03 D8 EB 19 06 54 97 99 0D F8 06 9E 07 }\n{ 36 E2 2B 09 60 28 16 0F 70 3A 42 0E 38 07 82 0E }\n{ F5 98 38 0E 5C 18 FE 0E C4 F3 8E 00 84 BA DD 05 }\n{ B0 8B 22 02 B8 5E A5 09 AC AE B5 0B D0 82 C9 0F }\n{ 13 A8 D6 0A A0 E8 F4 00 54 0E 34 0A A0 3B 6F 0C }\n{ 93 DA A6 01 E8 98 C5 08 00 93 BE 0E F8 28 1D 0A }\n{ 10 6D 71 0B 40 D4 A3 00 34 E3 E1 09 74 F9 7A 05 }\n{ 1C DA D4 09 BC 3B 84 03 58 34 B8 0C 84 BE DD 0A }\n{ A1 C5 20 03 24 BD 5C 03 6C DE D4 04 DC 30 0B 0A }\n{ 72 9C 3D 03 0C 21 47 07 C0 58 45 03 54 BA 23 02 }\n{ 15 DE F2 0C FC 09 0F 06 90 A8 61 09 64 9E B7 00 }\n{ 6F 07 F0 0A A0 3A 6E 09 08 58 F5 0B BC 1B E2 0E }\n{ 5A 9A 12 08 5C 87 76 01 5C 5A 32 00 F8 17 B7 02 }\n{ 32 B1 64 09 04 AF B0 04 A8 F3 9A 01 34 FD 85 0F }\n{ E9 0E CB 06 34 C3 DD 07 7C 32 F0 06 54 1C D0 08 }\n{ 11 05 EF 0C 4C A6 17 09 90 A9 20 00 0C 63 2B 00 }\n{ 66 98 50 03 84 4E 31 09 C8 60 FA 0A 14 91 A3 07 }\n{ 93 94 94 04 8C FE 91 01 F8 CB 8C 0D 70 9C BB 0C }\n{ 96 A6 52 0C A8 CC 7B 0F FC 57 F2 07 E4 8A 5F 0E }\n{ EC 42 ED 04 78 03 44 05 D4 29 61 03 D4 8B B1 00 }\n{ 99 EC 16 0F 98 45 18 01 2C 90 28 05 E0 5C 7F 05 }\n{ 45 84 D8 0D 58 A6 8D 02 E0 9F B3 07 08 DC D4 0C }\n{ 11 7C D5 06 F8 43 47 0A 90 12 AB 07 68 33 1D 0B }\n{ 1F 6B 25 01 28 F2 56 04 98 87 D8 00 A4 6F AB 05 }\n{ 03 55 2C 08 44 9B 57 09 6C 76 AC 06 E8 9F E5 0C }\n{ 8C 8F FE 0D E4 A3 D3 06 08 94 EB 05 20 B4 78 01 }\n{ 64 1E 1F 08 2C 44 5F 03 04 61 9C 04 F8 36 11 02 }\n{ 78 53 DB 02 9C 98 56 07 24 AB 66 01 4C 69 23 0B }\n{ 0F DD 31 01 E8 A7 60 06 98 99 5A 03 E8 C2 37 00 }\n{ 54 5E C5 0A 88 54 51 0F A0 3D B3 01 14 90 46 04 }\n{ B9 FC C3 05 20 65 D7 06 2C C4 17 0D 44 5C 0D 00 }" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8899272,"math_prob":0.9939812,"size":2655,"snap":"2021-43-2021-49","text_gpt3_token_len":779,"char_repetition_ratio":0.116937004,"word_repetition_ratio":0.07009346,"special_character_ratio":0.34689265,"punctuation_ratio":0.10242086,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95498943,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-11-27T05:22:41Z\",\"WARC-Record-ID\":\"<urn:uuid:3c79f890-c59c-46e4-8edc-5d8b420f3ce0>\",\"Content-Length\":\"156553\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d95b9e69-5a57-48ae-845e-aa54eb4225c6>\",\"WARC-Concurrent-To\":\"<urn:uuid:b5bd8d8b-7971-4d0b-b458-646855d95da6>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://crypto.stackexchange.com/questions/94959/does-poly1305-have-weak-keys-like-gcm-ghash/94967\",\"WARC-Payload-Digest\":\"sha1:EDXVXVM6XKCI36NOS5OROHRUQEPWK4BQ\",\"WARC-Block-Digest\":\"sha1:5CIXHCUTMZK3KXVKPIX4CSWRRRG5WI7L\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964358118.13_warc_CC-MAIN-20211127043716-20211127073716-00633.warc.gz\"}"}
https://www.nagwa.com/en/videos/128121515238/
[ "# Question Video: Determining the Variance for the Sum of Two Independent Random Variables Mathematics\n\nSuppose 𝑥 and 𝑦 are independent, var(𝑥) = 24, and var(𝑦) = 30. Determine var(7𝑥 + 9𝑦).\n\n01:22\n\n### Video Transcript\n\nSuppose 𝑥 and 𝑦 are independent, the variance of 𝑥 is 24, and the variance of 𝑦 is 30. Determine the variance of seven 𝑥 plus nine 𝑦.\n\nWe’ve been given some information for two independent random variables 𝑥 and 𝑦. We know the variance of 𝑥 is 24 and the variance of 𝑦 is equal to 30. We’re looking to determine the variance of seven 𝑥 plus nine 𝑦. So we begin by recalling that for two independent random variables 𝐴 and 𝐵, the variance of their sum is the sum of their variances. So the variance of 𝐴 plus 𝐵 is the variance of 𝐴 plus the variance of 𝐵.\n\nBut we also know that the variance of some multiple of a random variable 𝑥 — let’s call that 𝑎 of 𝑥 — is equal to 𝑎 squared times the variance of 𝑥. So what we’re going to do is split our variance, the variance of seven 𝑥 plus nine 𝑦, up into the sum of the variances, so variance of seven 𝑥 plus the variance of nine 𝑦.\n\nThen, we know that the variance of seven 𝑥 is seven squared the variance of 𝑥. And the variance of nine 𝑦 is nine squared the variance of 𝑦. But we already saw that the variance of 𝑥 is 24 and the variance of 𝑦 is 30. So the variance of seven 𝑥 plus nine 𝑦 is seven squared times 24 plus nine squared times 30, which is 3,606. The variance of seven 𝑥 plus nine 𝑦 is 3,606.\n\nNagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.91750133,"math_prob":0.9990399,"size":1264,"snap":"2021-21-2021-25","text_gpt3_token_len":380,"char_repetition_ratio":0.32222223,"word_repetition_ratio":0.18992248,"special_character_ratio":0.24920887,"punctuation_ratio":0.08275862,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.999603,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-06-20T06:51:06Z\",\"WARC-Record-ID\":\"<urn:uuid:bb6cf014-264d-45ca-9d31-9c4777534809>\",\"Content-Length\":\"34220\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5d2c9306-f60d-47fd-be41-d67265f3c80e>\",\"WARC-Concurrent-To\":\"<urn:uuid:7db6239e-c5ab-43bf-a090-6b3b4a4c0bea>\",\"WARC-IP-Address\":\"3.231.69.213\",\"WARC-Target-URI\":\"https://www.nagwa.com/en/videos/128121515238/\",\"WARC-Payload-Digest\":\"sha1:4CRBQJ7Y6JPIBIM5MBNVXPC7FHHU6J3J\",\"WARC-Block-Digest\":\"sha1:RB5U7AF3TUOR73EA4YUZWPMTKNLMJYA3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-25/CC-MAIN-2021-25_segments_1623487658814.62_warc_CC-MAIN-20210620054240-20210620084240-00386.warc.gz\"}"}
https://forum.freecodecamp.org/t/i-am-getting-all-the-values-as-nan-after-labelling-rows-in-a-data-frame/481813
[ "# I am getting all the values as nan after labelling rows in a data frame\n\n``````pd.DataFrame(df3, index = indx).head()\n``````\n\nI tried to label rows of bag of words dataset which contains 0 and 1 but now getting all nan values after that why?\n\nCan you like share a bit more code or something?\n\n``````\n\ndef remove_stop_words(a,b):\nglobal count\nc=[] #list with comments without stop words and punctuation\nfor i in range(len(a)):\nif a[i].lower() not in b :\nc.append(a[i].lower())\n\nfor i in range(len(c)): #used to create dictionary\nif c[i].lower() not in bag_of_words.keys():\nbag_of_words[c[i].lower()] = 1\nfields.append(c[i].lower())\ncount= count+1\nelse:\nbag_of_words[c[i].lower()] = bag_of_words[c[i].lower()] + 1\nc = ' '.join(c)\nreturn c\ndef bagwords(twt,df,count):\nli=twt.split()\nfor i in range(len(li)):\ndf3.at[count, li[i]] = df3.iloc[count][li[i]] + 1\n\nfilepath=r\"Apple Sentiment Tweets.csv\"\nfilepath2=r\"Cleanedtweets.csv\"\nf1=open(r\"stop_words.txt\",\"r+\")\nrows=len(df1)\nvalues = []\nfor i in range(rows):\ntweet=cleann(df1.iloc[i]['text'])\ntemp=remove_stop_words(tweet,li)\ndf2.at[i,'text']=temp #contains tweets in form of dataframe\nfor i in range(rows):\nvalues.append([])\nfor j in range(count):\nvalues[i].append(0)\nwith open(filename,'w') as csvfile:\nwriter=csv.DictWriter(csvfile,fieldnames=fields)\ncsvwriter=csv.writer(csvfile)\ncsvwriter.writerows(values)\nfor i in range(rows):\ntweet = df2.iloc[i]['text']\nbagwords(tweet,df3,i)\n\nn = len(df3)\nindx = []\nfor i in range(n):\nst = \"T\"\nprint(i)\nst += str(i)\nindx.append(st)\nprint(indx)\n\npd.DataFrame(df3, index = indx).head()\n``````\n\nOk that’s not what I meant.\nI meant showing the specific piece of code which doesn’t do what you want - maybe including an example on what you WANT as a result compared to what the ACTUAL result is.\n\nhi, you can just look at the last part of the code where I am trying to label the index using for loop after that I got nan values. That’s what I did before you asked for code then.\n\nhm… ok maybe I phrased that wrong, anyway I just copied the last part and tested it with some basic DataFrame I made myself.\nBasically the way you did it made it so the new DataFrame SELECTS the rows from df3 where the index is equal to indx and returns those values. Which obviously doesn’t give any result but as the nice stable library Pandas is, instead of throwing an error, it creates new rows and populates them with nan.\n\nAnyway, you gotta `df3.index = indx` to just replace the index inplace OR `pd.DataFrame(df3.values, index=indx)` to create a new DataFrame.\nBecause you plugged in the entire df3 DataFrame, it included it’s index and hence the method assumed you want to work WITH the index, instead of replacing it.\n\nso, if I just use `pd.DataFrame(df3.values, index=indx, inplace = True)` then it will work?\nand if you can also tell me how can I access the “c” in the function called remove_stop_words and create a data frame for that? I will really appreciate if you do so.\n\nI don’t think pd.DataFrame has a “inplace” argument. You’d use the other method and just `df3.index = indx`\n\nWhat do you mean? At the end, the function returns c. The problem is, I have no idea what it does or how it looks like. I think you turn it into a string at the end. If you’d turn it into an array (or any other iterable) you should be able to just give it to pd.DataFrame(c) and get a DataFrame.\n\nHowever unlike the first case, I cannot test this one, as I don’t know, how c looks in the end.\nThat said, it’s Python - just try out what happens", null, "First consider if you really need to iterate over rows in a DataFrame. Iterating through pandas dataFrame objects is generally slow. Iteration beats the whole purpose of using DataFrame. It is an anti-pattern and is something you should only do when you have exhausted every other option. It is better look for a List Comprehensions , vectorized solution or DataFrame.apply() method.\n\nPandas DataFrame loop using list comprehension\n\n`result = [(x, y,z) for x, y,z in zip(df['Name'], df['Promoted'],df['Grade'])]`\n\nPandas DataFrame loop using DataFrame.apply()\n\n`result = df.apply(lambda row: row[\"Name\"] + \" , \" + str(row[\"TotalMarks\"]) + \" , \" + row[\"Grade\"], axis = 1)`\n\nThis topic was automatically closed 182 days after the last reply. New replies are no longer allowed." ]
[ null, "https://emoji.discourse-cdn.com/twitter/wink.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7908156,"math_prob":0.8466991,"size":4448,"snap":"2022-40-2023-06","text_gpt3_token_len":1139,"char_repetition_ratio":0.11093609,"word_repetition_ratio":0.074927956,"special_character_ratio":0.2666367,"punctuation_ratio":0.14121339,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9919473,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-02T13:34:45Z\",\"WARC-Record-ID\":\"<urn:uuid:4a17d53e-1c4d-4070-963c-aec93bb7da1f>\",\"Content-Length\":\"44592\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:af75e2b6-a767-4afe-8c37-55ece7bbaf47>\",\"WARC-Concurrent-To\":\"<urn:uuid:4b77324d-89a7-4c2f-9d0f-b35fcf1bd086>\",\"WARC-IP-Address\":\"64.71.144.205\",\"WARC-Target-URI\":\"https://forum.freecodecamp.org/t/i-am-getting-all-the-values-as-nan-after-labelling-rows-in-a-data-frame/481813\",\"WARC-Payload-Digest\":\"sha1:C4F6PRSN6WEHKJLKUPJDVLJS4HLQ2MAR\",\"WARC-Block-Digest\":\"sha1:H25SM7VPHNJ5RM4AVV7KBJEH6NNRGXXH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337322.29_warc_CC-MAIN-20221002115028-20221002145028-00299.warc.gz\"}"}
https://www.edupil.com/question/3-975-864-753-642/
[ "# Choose the correct alternative\n\nIn the following question, a series is given with one term missing. Choose the correct alternative from the given ones that will complete the series.\n3, 975, 864, 753, 642, ?\n\n1. 431\n2. 314\n3. 531\n4. 532\n\nExplanation:-\n975 – 111 = 864,\n864 – 111 = 753,\n753 – 111 = 642,\nSame as,\n642 – 111 = 531.\n\nThen, the  value of ? is 531.\n\nHence, the correct answer is option (3) 531." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8157034,"math_prob":0.99138737,"size":469,"snap":"2019-13-2019-22","text_gpt3_token_len":147,"char_repetition_ratio":0.13763441,"word_repetition_ratio":0.0,"special_character_ratio":0.445629,"punctuation_ratio":0.21782178,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98057044,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-03-23T12:17:07Z\",\"WARC-Record-ID\":\"<urn:uuid:d3d8c816-70d8-48c3-9485-366c7ec088d5>\",\"Content-Length\":\"63842\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3d270e87-34f3-4b86-8b07-a89a364d1ab6>\",\"WARC-Concurrent-To\":\"<urn:uuid:62cac6b6-ec35-4c0a-b2f7-66e9da501ffc>\",\"WARC-IP-Address\":\"104.27.183.251\",\"WARC-Target-URI\":\"https://www.edupil.com/question/3-975-864-753-642/\",\"WARC-Payload-Digest\":\"sha1:MZZRB7URXYF3KH233ETU7OY7BALER2VP\",\"WARC-Block-Digest\":\"sha1:HTX6JCHHS2HR54CAGABGUQJCEURO6NDU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-13/CC-MAIN-2019-13_segments_1552912202804.80_warc_CC-MAIN-20190323121241-20190323143241-00363.warc.gz\"}"}
https://www.citefactor.org/impact-factor/impact-factor-of-journal-Journal-of-Mathematical-Modeling.php
[ "Impact Factor\n1.65\n2020-21\n\nJournal of Mathematical Modeling (J. Math. Model.) publishes original high-quality peer-reviewed papers in all branches of computational or applied mathematics. It covers all areas of numerical analysis, numerical solutions of differential and integral equations, numerical linear algebra, optimization theory, approximation theory, control theory and fuzzy theory with applications, mathematical modeling in all major areas of applied sciences, computer simulation and parallel algorithms.\n\n## Legend\n\n• 2345-394X/2382-9869\n• Mathematics\n• Quarterly\n• Iran\n\n## METRICS\n\nYEAR Impact Factor\n2020-21 1.65\n2019 -NA-\n2018 -\n\n## DETAILS\n\nJournal of Mathematical Modeling, 2345-394X/2382-9869, started opeartions from Iran in year 2013, publish paper in Mathematics Quarterly." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.77545774,"math_prob":0.557102,"size":685,"snap":"2023-40-2023-50","text_gpt3_token_len":145,"char_repetition_ratio":0.13362701,"word_repetition_ratio":0.0,"special_character_ratio":0.23211679,"punctuation_ratio":0.15315315,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9794967,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-28T04:45:17Z\",\"WARC-Record-ID\":\"<urn:uuid:2246f301-87ab-4486-9ddc-be0adee59e49>\",\"Content-Length\":\"13374\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bc2d6a61-86de-4859-938a-b39eb77bc2f3>\",\"WARC-Concurrent-To\":\"<urn:uuid:de31243d-bc41-454c-b615-703063034f46>\",\"WARC-IP-Address\":\"154.41.255.243\",\"WARC-Target-URI\":\"https://www.citefactor.org/impact-factor/impact-factor-of-journal-Journal-of-Mathematical-Modeling.php\",\"WARC-Payload-Digest\":\"sha1:DWEUKQCNU25GDREBHQP7BHDEZTCB2C5Z\",\"WARC-Block-Digest\":\"sha1:THJ4FIBGXLEJBUQFPG6QSNZUTHHYZ2FW\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510358.68_warc_CC-MAIN-20230928031105-20230928061105-00796.warc.gz\"}"}
http://roboticsproceedings.org/rss16/p063.html
[ "# Robotics: Science and Systems XVI\n\n### Optimally Guarding Perimeters and Regions with Mobile Range Sensors\n\nSiwei Feng, Jingjin Yu\n\nAbstract:\n\nWe investigate the problem of using mobile robots equipped with 2D range sensors to optimally guard perimeters or regions, i.e., 1D or 2D sets. Given such a set of arbitrary shape to be guarded, and k mobile sensors where the i-th sensor can guard a circular region with a variable radius r_i, we seek the optimal strategy to deploy the k sensors to fully cover the set such that max r_i is minimized. On the side of computational complexity, we show that computing a 1.155-optimal solution for guarding a perimeter or a region is NP-hard, i.e., the problem is hard to approximate. The hardness result on perimeter guarding holds when each sensor may guard at most two disjoint perimeter segments. On the side of computational methods, for the guarding perimeters, we develop a fully polynomial time approximation scheme (FPTAS) for the special setting where each sensor may only guard a single continuous perimeter segment, suggesting that the aforementioned hard-to-approximate result on the two-disjoint-segment sensing model is tight. For the general problem, we first describe a polynomial-time (2+\\epsilon)-approximation algorithm as an upper bound, applicable to both perimeter guarding and region guarding. This is followed by a high-performance integer linear programming (ILP) based method that computes near-optimal solutions. Thorough computational benchmarks as well as evaluation on potential application scenarios demonstrate the effectiveness of these algorithmic solutions.\n\nBibtex:" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.86168295,"math_prob":0.94770604,"size":1941,"snap":"2020-34-2020-40","text_gpt3_token_len":420,"char_repetition_ratio":0.12080537,"word_repetition_ratio":0.02846975,"special_character_ratio":0.20865533,"punctuation_ratio":0.12536444,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9703153,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-08-04T17:33:28Z\",\"WARC-Record-ID\":\"<urn:uuid:de9608d2-fdf1-43c9-af58-b2b1dd8b43d0>\",\"Content-Length\":\"7882\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5f0e4759-ceb0-42ba-bd52-0706716d62cb>\",\"WARC-Concurrent-To\":\"<urn:uuid:33fe3b3b-6127-4ca2-a5a8-66d7dfe17a3c>\",\"WARC-IP-Address\":\"107.180.39.236\",\"WARC-Target-URI\":\"http://roboticsproceedings.org/rss16/p063.html\",\"WARC-Payload-Digest\":\"sha1:I6IZQ74SWSUIJC5J373R5WOP66LUVBZL\",\"WARC-Block-Digest\":\"sha1:XRV2D2EP5VDFS3FW66A475N6GT6LEURM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-34/CC-MAIN-2020-34_segments_1596439735881.90_warc_CC-MAIN-20200804161521-20200804191521-00290.warc.gz\"}"}
https://studfile.net/preview/395654/page:45/
[ "", null, "Добавил:\nОпубликованный материал нарушает ваши авторские права? Сообщите нам.\nВуз: Предмет: Файл:\nCytoskeletal Mechanics - Mofrad and Kamm.pdf\nСкачиваний:\n47\nДобавлен:\n10.08.2013\nРазмер:\n4.33 Mб\nСкачать", null, "160 F.C. MacKintosh\n\n 100 10 φ 1 0.1 0.03 0.1 0.3 1 δ /∆\n\nFig. 8-4. The dimensionless force φ as a function of extension δ, relative to maximum extension. For small extension, the response is linear.\n\n# Dynamics of single chains\n\nThe same Brownian forces that give rise to the bent shapes of filaments such as in Fig. 8.1 also govern the dynamics of these fluctuating filaments. Both the relaxation dynamics of bent filaments, as well as the dynamic fluctuations of individual chains exhibit rich behavior that can have important consequences even at the level of bulk solutions and networks. The principal dynamic modes come from the transverse motion, that is, the degrees of freedom u and v above. Thus, we must consider time dependence of these quantities. The transverse equation of motion of the chain can be found from Hbend above, together with the hydrodynamic drag of the filaments through the solvent. This is done via a Langevin equation describing the net force per unit length on the chain at position x,\n\n 0 = −ζ ∂ ∂ 4 u(x, t) − κ u(x, t) + ξ (x, t), (8.15) ∂ t ∂ x4\n\nwhich is, of course, zero within linearized, inertia-free (low Reynolds number) hydrodynamics that we assume here.\n\nHere, the first term represents the hydrodynamic drag per unit length of the filament. We have assumed a constant transverse drag coefficient that is independent of wavelength. In fact, given that the actual drag per unit length on a rod of length L is ζ = 4π η/ln (AL/a), where L/a is the aspect ratio of the rod, and A is a constant of order unity that depends on the precise geometry of the rod. For a filament fluctuating freely in solution, a weak logarithmic dependence on wavelength is thus expected. In practice, the presence of other chains in solution gives rise to an effective screening of the long-range hydrodynamics beyond a length of order the separation between chains, which can then be taken in place of L above. The second term in the Langevin equation above is the restoring force per unit length due to bending. It has been calculated from δ Hbendu(x, t) with the help of integration by parts. Finally, we include a random force ξ that accounts for the motion of the surrounding fluid particles.", null, "Polymer-based models of cytoskeletal networks 161\n\nA simple force balance in the Langevin equation above leads us to conclude that the characteristic relaxation rate of a mode of wavevector q is (Farge and Maggs, 1993)\n\n ω(q) = κq4/ζ. (8.16)\n\nThe fourth-order dependence of this rate on q is to be expected from the appearance of a single time derivative along with four spatial derivatives in Eq. 8.15. This relaxation rate determines, among other things, the correlation time for the fluctuating bending modes. Specifically, in the absence of an applied tension,\n\n uq (t)uq (0) = 2kT κq4 e−ω(q)t . (8.17)\n\nThat the relaxation rate varies as the fourth power of the wavevector q has important consequences. For example, while the time it takes for an actin filament bending mode of wavelength 1 µm to relax is of order 10 ms, it takes about 100 s for a mode of wavelength 10 µm. This has implications, for instance, for imaging of the thermal fluctuations of filaments, as is done in order to measure p and the filament stiffness (Gittes et al., 1993). This is the basis, in fact, of most measurements to date of the stiffness of DNA, F-actin, and other biopolymers. Using Eq. 8.17, for instance, one can both confirm thermal equilibrium and determine p by measuring the meansquare amplitude of the thermal modes of various wavelengths. However, in order both to resolve the various modes as well as to establish that they behave according to the thermal distribution, one must sample over times long compared with 1(q) for the longest wavelengths λ 1/q. At the same time, one must be able to resolve fast motion on times of order 1(q) for the shortest wavelengths. Given the strong dependence of these relaxation times on the corresponding wavelengths, for instance, a range of order a factor of 10 in the wavelengths of the modes corresponds to a range of 104 in observation times.\n\nAnother way to look at the result of Eq. 8.16 is that a bending mode of wavelength λ relaxes (that is, fully explores its equilibrium conformations) in a time of order ζ λ4. Because it is also true that the longest (unconstrained) wavelength bending mode has by far the largest amplitude, and thus dominates the typical conformations of any filament (see Eqs. 8.10 and 8.17), we can see that in a time t, the typical or dominant mode that relaxes is one of wavelength (t) (κ t)1/4. As we have seen above in Eq. 8.12, the mean-square amplitude of transverse fluctuations increases with filament length as u2 3/ p . Thus, in a time t, the expected mean-square\n\n transverse motion is given by (Farge and Maggs, 1993; Amblard et al., 1996) u2(t) ( (t))3 / p t3/4, (8.18)\n\nbecause the typical and dominant mode contributing to the motion at time t is of wavelength (t). Equation 8.18 represents what can be called subdiffusive motion because the mean-square displacement grows less strongly with time than for diffusion or Brownian motion. Motion consistent with Eq. 8.18 has been observed in living cells, by tracking small particles attached to microtubules (Caspi et al., 2000). Thus, in some cases, the dynamics of cytoskeletal filaments in living cells appear to follow the expected motion for transverse equilibrium thermal fluctuations in viscous fluids.", null, "162 F.C. MacKintosh\n\nThe dynamics of longitudinal motion can be calculated similarly. It is found that the means-square amplitude of longitudinal fluctuations of filament of length are also governed by (Granek, 1997; Gittes and MacKintosh, 1998)\n\n δ (t)2 t3/4, (8.19)\n\nwhere this mean-square amplitude is smaller than for the transverse motion by a factor of order / p. Thus, both for the short-time fluctuations as well as for the static fluctuations of a filament segment of length , a filament end explores a disk-like region with longitudinal motion smaller than perpendicular motion by this factor. Although the amplitude of longitudinal motion is smaller than for transverse, the longitudinal motion of Eq. 8.19 can explain the observed high-frequency viscoelastic response of solutions and networks of biopolymers, as discussed below.\n\nSolutions of semiflexible polymer\n\nBecause of their inherent rigidity, semiflexible polymers interact with each other in very different ways than flexible polymers would, for example, in solutions of the same concentration. In addition to the important characteristic lengths of the molecular dimension (say, the filament diameter 2a), the material parameter p, and the contour length of the chains, there is another important new length scale in a solution – the mesh size, or typical spacing between polymers in solution, ξ . This can be estimated as follows in terms of the molecular size a and the polymer volume fraction φ (Schmidt et al., 1989). In the limit that the persistence length p is large compared with ξ , we can approximate the solution on the scale of the mesh as one of rigid rods. Hence, within a cubical volume of size ξ , there is of order one polymer segment of length ξ and cross-section a2, which corresponds to a volume fraction φ of order (a2ξ )3. Thus,\n\nξ a/ φ. (8.20)\n\nThis mesh size, or spacing between filaments, does not completely characterize the way in which filaments interact, even sterically with each other. For a dilute solution of rigid rods, it is not hard to imagine that one can embed a long rigid rod rather far into such a solution before touching another filament. A true estimate of the distance between typical interactions (points of contact) of semiflexible polymers must account for their thermal fluctuations (Odijk, 1983). As we have seen, the transverse range of fluctuations δu a distance away from a fixed point grows according to δu2 3/ p. Along this length, such a fluctuating filament explores a narrow conelike volume of order δu2. An entanglement that leads to a constraint of the fluctuations of such a filament occurs when another filament crosses through this volume, in which case it will occupy a volume of order a2δu, as δu . Thus, the volume fraction and the contour length between constraints are related by φ a2/( δu). Taking\n\nthe corresponding length as an entanglement length, and using the result above for\n\nδu = δu2, we find that\n\n e a4 p 1/5 φ−2/5, (8.21)\n\nwhich is larger than the mesh size ξ in the semiflexible limit p ξ .", null, "Polymer-based models of cytoskeletal networks 163\n\nThese transverse entanglements, separated by a typical length e, govern the elastic response of solutions, in a way first outlined in Isambert and Maggs (1996). A more complete discussion of the rheology of such solutions can be found in Morse (1998b) and Hinner et al. (1998). The basic result for the rubber-like plateau shear modulus for such solutions can be obtained by noting that the number density of entropic constraints (entanglements) is thus n / c 1/(ξ 2 e), where n = φ/(a2 ) is the number density of chains of contour length . In the absence of other energetic contributions to the modulus, the entropy associated with these constraints results in a shear modulus of order G kT /(ξ 2 e) φ7/5. This has been well established in experiments such as those of Hinner et al. (1998).\n\nWith increasing frequency, or for short times, the macroscopic shear response of solutions is expected to show the underlying dynamics of individual filaments. One of the main signatures of the frequency response of polymer solutions in general is an increase in the shear modulus with increasing frequency. This is simply because the individual filaments are not able to fully relax or explore their conformations on short times. In practice, for high molecular weight F-actin solutions of approximately 1 mg/ml, this frequency dependence is seen for frequencies above a few Hertz. Initial experiments measuring this response by imaging the dynamics of small probe particles have shown that the shear modulus increases as G(ω) ω3/4 (Gittes et al., 1997; Schnurr et al., 1997), which has since been confirmed in other experiments and by other techniques (for example, Gisler and Weitz, 1999).\n\nIf, as noted above, this increase in stiffness with frequency is due to the fact that filaments are not able to fully fluctuate on the correspondingly shorter times, then we should be able to understand this more quantitatively in terms of the dynamics described in the previous section. In particular, this behavior can be understood in terms of the longitudinal dynamics of single filaments (Morse, 1998a; Gittes and MacKintosh, 1998). Much as the static longitudinal fluctuations δ 2 4/ 2p correspond to an effective longitudinal spring constant kT 2p/ 4, the time-dependent longitudinal fluctuations shown above in Eq. 8.19 correspond to a timeor frequency-dependent compliance or stiffness, in which the effective spring constant increases with increasing frequency. This is because, on shorter time scales, fewer bending modes can relax, which makes the filament less compliant. Accounting for the random orientations of filaments in solution results in a frequency-dependent shear modulus\n\n G(ω) = 1 ρκ p (−2iζ /κ )3/4 ω3/4 − iωη, (8.22) 15\n\nwhere ρ is the polymer concentration measured in length per unit volume.\n\n## Network elasticity\n\nIn a living cell, there are many different specialized proteins for binding, bundling, and otherwise modifying the network of filamentous proteins. Many tens of actinassociated proteins alone have been identified and studied. Not only is it important to understand the mechanical roles of, for example, cross-linking proteins, but as we shall see, these can have a much more dramatic effect on the network properties than is the case for flexible polymer solutions and networks.\n\n164 F.C. MacKintosh\n\nThe introduction of cross-linking agents into a solution of semiflexible filaments introduces yet another important and distinct length scale, which we shall call the cross-link distance c. As we have just seen, in the limit that p ξ , individual filaments may interact with each other only infrequently. That is to say, in contrast with flexible polymers, the distance between interactions of one polymer with its neighbors ( e in the case of solutions) may be much larger than the typical spacing between polymers. Thus, if there are biochemical cross-links between filaments, these may result in significant variation of network properties even when c is larger than ξ .\n\nGiven a network of filaments connected to each other by cross-links spaced an average distance c apart along each filament, the response of the network to macroscopic strains and stresses may involve two distinct single-filament responses: (1) bending of filaments; and (2) stretching/compression of filaments. Models based on both of these effects have been proposed and analyzed. Bending-dominated behavior has been suggested both for ordered (Satcher and Dewey, 1996) and disordered (Kroy and Frey, 1996) networks. That individual filaments bend under network strain is perhaps not surprising, unless one thinks of the case of uniform shear. In this case, only rotation and stretching or compression of individual rod-like filaments are possible. This is the basis of so-called affine network models (MacKintosh et al., 1995), in which the macroscopic strain falls uniformly across the sample. In contrast, bending of constituents involves (non-affine deformations, in which the state of strain varies from one region to another within the sample.\n\nWe shall focus mostly on random networks, such as those studied in vitro. It has recently been shown (Head et al., 2003a; Wilhelm and Frey, 2003; Head et al., 2003b) that which of the affine or non-affine behaviors is expected depends, for instance, on filament length and cross-link concentration. Non-affine behavior is expected either at low concentrations or for short filaments, while the deformation is increasingly affine at high concentration or for long filaments. For the first of these responses, the network shear modulus (Non-Affine) is expected to be of the form\n\n GNA κ/ξ 4 φ2 (8.23)\n\nwhen the density of cross-links is high (Kroy and Frey 1996). This quadratic dependence on filament concentration c is also predicted for more ordered networks (Satcher and Dewey 1996).\n\nFor affine deformations, the modulus can be estimated using the effective singlefilament longitudinal spring constant for a filament segment of length c between cross-links, κ p /4c , as derived above. Given an area density of 12 such chains passing through any shear plane (see Fig. 8-5), together with the effective tension of\n\n order (κ p /c3) , where is the strain, the shear modulus is expected to be GAT κ p (8.24) . ξ 2 c3\n\nThis shows that the shear modulus is expected to be strongly dependent on the density of cross-links. Recent experiments on in vitro model gels consisting of F-actin with permanent cross-links, for instance, have shown that the shear modulus can vary from less than 1 Pa to over 100 Pa at the same concentration of F-actin, by varying the cross-link concentration (Gardel et al., 2004).\n\nСоседние файлы в предмете Биомеханика" ]
[ null, "https://studfile.net/user_photo/_userpic.png", null, "https://studfile.net/html/611/317/html_xHTDiPT6Kd.gil0/htmlconvd-yAinja172x1.jpg", null, "https://studfile.net/html/611/317/html_xHTDiPT6Kd.gil0/htmlconvd-yAinja173x1.jpg", null, "https://studfile.net/html/611/317/html_xHTDiPT6Kd.gil0/htmlconvd-yAinja174x1.jpg", null, "https://studfile.net/html/611/317/html_xHTDiPT6Kd.gil0/htmlconvd-yAinja175x1.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.86638063,"math_prob":0.97033525,"size":20954,"snap":"2020-24-2020-29","text_gpt3_token_len":5364,"char_repetition_ratio":0.12935561,"word_repetition_ratio":0.012540099,"special_character_ratio":0.23274793,"punctuation_ratio":0.09857612,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98321885,"pos_list":[0,1,2,3,4,5,6,7,8,9,10],"im_url_duplicate_count":[null,null,null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-05T23:05:10Z\",\"WARC-Record-ID\":\"<urn:uuid:a587e4ef-01bd-476f-83bd-7d51c8c40ec2>\",\"Content-Length\":\"98487\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:be034617-071b-4342-a722-137d57537661>\",\"WARC-Concurrent-To\":\"<urn:uuid:ac7774ee-9a46-4985-b346-d893ef143ec1>\",\"WARC-IP-Address\":\"212.83.147.5\",\"WARC-Target-URI\":\"https://studfile.net/preview/395654/page:45/\",\"WARC-Payload-Digest\":\"sha1:KDEQRYPTZKAGORJJSQPAKBR2KXA227TK\",\"WARC-Block-Digest\":\"sha1:UJZSIBSLJ2L73WVDNULE6NJWJ724LGAU\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593655889877.72_warc_CC-MAIN-20200705215728-20200706005728-00497.warc.gz\"}"}
https://stats.stackexchange.com/questions/540715/problem-in-reproducing-the-mles-for-a-given-distribution/540722
[ "# Problem in Reproducing the MLEs for a Given Distribution\n\nI am testing a code I am using in R to compute estimates for the MLEs of the parameters for a given distribution. As an example, to check if the code works, I have chosen the paper A New Two-parameter Modified Half-logistic Distribution... by G. Mohammad. However, in trying to reproduce the parameter estimates for the MHL distribution (defined on page 1 of the attached paper) when using Data Set II (see page 14), I obtain estimates of $$0.630$$ and $$0.228$$ for $$\\alpha$$ and $$\\beta$$, respectively. This is markedly different to those obtained by the author ($$0.975$$ and $$0.298$$). What has gone wrong here? Is there a mistake somewhere in my code? It doesn't seem obvious to me.\n\nThe code I am using is as follows:\n\nlibrary(bbmle)\nx <- scan(textConnection(\"0.036 0.058 0.102 0.103 0.114 0.116 0.061 0.074 0.078 0.086 0.381 0.538\n0.570 0.574 0.590 0.618 0.645 0.961 1.228 10.94 11.02 13.88 1.600 0.148 0.183 0.192 0.254 0.262 0.379 2.006 2.054 2.804 3.058 3.076 3.147 3.625 3.704 3.931 4.073 4.393 4.534 4.893 6.274 6.816 7.896\n7.904 8.022 9.337 14.73 15.08\"))\ndL <- function(x,alpha,beta) {\nr <- max(exp(-x)*(1-exp(-x))^(alpha-1)*(beta*exp(-(beta-1)*x)+alpha+(alpha-beta)*exp(-beta*x))/(1+exp(-beta*x))^2, 0.00000001)\n}\nvdL <- Vectorize(dL)\nLL <- function(x, alpha, beta){ -sum( log( vdL(x, alpha, beta))) }\n(m0 <- mle2(LL,start=list(alpha=1,beta=0.3),data=list(x=x)))\n\n\nFor convenience, the MHL pdf is given by\n\n$$f(x) = e^{-x}(1-e^{-x})^{-1+\\alpha}\\frac{\\beta e^{-(\\beta-1)x}+\\alpha+(\\alpha-\\beta)e^{-\\beta x}}{(1+e^{-\\beta x})^2}$$\n\nSecond check: is the density right? I took the (much simpler) expression for the CDF from the paper, symbolically differentiated it using deriv(), and evaluated it. I match Figure 1 in the paper, and I match your loglikelihood. So the difference isn't explained by the paper getting its derivative wrong or you getting the implementation wrong." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.65442115,"math_prob":0.9960823,"size":1529,"snap":"2022-05-2022-21","text_gpt3_token_len":569,"char_repetition_ratio":0.08655737,"word_repetition_ratio":0.0,"special_character_ratio":0.4735121,"punctuation_ratio":0.20240964,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99962074,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-28T01:25:46Z\",\"WARC-Record-ID\":\"<urn:uuid:78b26047-466b-4477-8884-257c8af677db>\",\"Content-Length\":\"224083\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:49150566-a918-4178-b99b-14b80e3531bb>\",\"WARC-Concurrent-To\":\"<urn:uuid:959dbe2f-5d74-4850-aa60-1263c3c1d766>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/540715/problem-in-reproducing-the-mles-for-a-given-distribution/540722\",\"WARC-Payload-Digest\":\"sha1:K7W6FJ7XLQG7V22H5JLRG6CMTN6WPDTJ\",\"WARC-Block-Digest\":\"sha1:AM72IBUZLGBAHV42ZMGIANBMLHB2IFDB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652663011588.83_warc_CC-MAIN-20220528000300-20220528030300-00055.warc.gz\"}"}
https://isabelle.in.tum.de/repos/testboard/file/tip/src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML
[ "src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML\n author paulson Thu, 01 Jun 2023 12:08:33 +0100 changeset 78810 1cadc477f644 parent 78084 bde374587d93 permissions -rw-r--r--\nEven more material from the HOL Light metric space library\n```\n(* Title: HOL/Tools/Sledgehammer/sledgehammer_isar.ML\nAuthor: Jasmin Blanchette, TU Muenchen\nAuthor: Steffen Juilf Smolka, TU Muenchen\n\nIsar proof reconstruction from ATP proofs.\n*)\n\nsignature SLEDGEHAMMER_ISAR =\nsig\ntype atp_step_name = ATP_Proof.atp_step_name\ntype ('a, 'b) atp_step = ('a, 'b) ATP_Proof.atp_step\ntype 'a atp_proof = 'a ATP_Proof.atp_proof\ntype stature = ATP_Problem_Generate.stature\ntype one_line_params = Sledgehammer_Proof_Methods.one_line_params\n\nval trace : bool Config.T\n\ntype isar_params =\nbool * (string option * string option) * Time.time * real option * bool * bool\n* (term, string) atp_step list * thm\n\nval proof_text : Proof.context -> bool -> bool option -> bool -> (unit -> isar_params) -> int ->\none_line_params -> string\nval abduce_text : Proof.context -> term list -> string\nend;\n\nstructure Sledgehammer_Isar : SLEDGEHAMMER_ISAR =\nstruct\n\nopen ATP_Util\nopen ATP_Problem\nopen ATP_Problem_Generate\nopen ATP_Proof\nopen ATP_Proof_Reconstruct\nopen Sledgehammer_Util\nopen Sledgehammer_Proof_Methods\nopen Sledgehammer_Isar_Proof\nopen Sledgehammer_Isar_Preplay\nopen Sledgehammer_Isar_Compress\nopen Sledgehammer_Isar_Minimize\n\nstructure String_Redirect = ATP_Proof_Redirect(\ntype key = atp_step_name\nval ord = fn ((s, _ : string list), (s', _)) => fast_string_ord (s, s')\nval string_of = fst)\n\nopen String_Redirect\n\nval trace = Attrib.setup_config_bool \\<^binding>\\<open>sledgehammer_isar_trace\\<close> (K false)\n\nval e_definition_rule = \"definition\"\nval e_skolemize_rule = \"skolemize\"\nval leo2_extcnf_forall_neg_rule = \"extcnf_forall_neg\"\nval satallax_skolemize_rule = \"tab_ex\"\nval vampire_skolemisation_rule = \"skolemisation\"\nval veriT_la_generic_rule = \"la_generic\"\nval veriT_simp_arith_rule = \"simp_arith\"\nval veriT_skolemize_rules = Lethe_Proof.skolemization_steps\nval z3_skolemize_rule = Z3_Proof.string_of_rule Z3_Proof.Skolemize\nval z3_th_lemma_rule_prefix = Z3_Proof.string_of_rule (Z3_Proof.Th_Lemma \"\")\nval zipperposition_cnf_rule = \"cnf\"\n\nval symbol_introduction_rules =\n[e_definition_rule, e_skolemize_rule, leo2_extcnf_forall_neg_rule, satallax_skolemize_rule,\nspass_skolemize_rule, vampire_skolemisation_rule, z3_skolemize_rule,\nzipperposition_cnf_rule, zipperposition_define_rule] @ veriT_skolemize_rules\n\nfun is_ext_rule rule = (rule = leo2_extcnf_equal_neg_rule)\nval is_maybe_ext_rule = is_ext_rule orf String.isPrefix satallax_tab_rule_prefix\n\nval is_symbol_introduction_rule = member (op =) symbol_introduction_rules\nfun is_arith_rule rule =\nString.isPrefix z3_th_lemma_rule_prefix rule orelse rule = veriT_simp_arith_rule orelse\nrule = veriT_la_generic_rule\n\nfun raw_label_of_num num = (num, 0)\n\nfun label_of_clause [(num, _)] = raw_label_of_num num\n| label_of_clause c = (space_implode \"___\" (map (fst o raw_label_of_num o fst) c), 0)\n\nfun add_global_fact ss = apsnd (union (op =) ss)\n\n| add_fact_of_dependency names = apfst (insert (op =) (label_of_clause names))\n\nfun add_line_pass1 (line as (name, role, t, rule, [])) lines =\n(* No dependencies: lemma (for Z3), fact, conjecture, or (for Vampire) internal facts or\ndefinitions. *)\nif role = Conjecture orelse role = Negated_Conjecture then\nline :: lines\nelse if t aconv \\<^prop>\\<open>True\\<close> then\nmap (replace_dependencies_in_line (name, [])) lines\nelse if role = Definition orelse role = Lemma orelse role = Hypothesis\norelse is_arith_rule rule then\nline :: lines\nelse if role = Axiom then\nlines (* axioms (facts) need no proof lines *)\nelse\nmap (replace_dependencies_in_line (name, [])) lines\n| add_line_pass1 line lines = line :: lines\n\nfun add_lines_pass2 res [] = rev res\n| add_lines_pass2 res ((line as (name, role, t, rule, deps)) :: lines) =\nlet\nfun normalize role =\nrole = Conjecture ? (HOLogic.dest_Trueprop #> s_not #> HOLogic.mk_Trueprop)\n\nval norm_t = normalize role t\nval is_duplicate =\nexists (fn (prev_name, prev_role, prev_t, _, _) =>\n(prev_role = Hypothesis andalso prev_t aconv t) orelse\n(member (op =) deps prev_name andalso\nTerm.aconv_untyped (normalize prev_role prev_t, norm_t)))\nres\n\nfun looks_boring () = t aconv \\<^prop>\\<open>False\\<close> orelse length deps < 2\n\nfun is_symbol_introduction_line (_, _, _, rule', deps') =\nis_symbol_introduction_rule rule' andalso member (op =) deps' name\n\nfun is_before_symbol_introduction_rule () = exists is_symbol_introduction_line lines\nin\nif is_duplicate orelse\n(role = Plain andalso not (is_symbol_introduction_rule rule) andalso\nnot (is_ext_rule rule) andalso not (is_arith_rule rule) andalso\nnot (null lines) andalso looks_boring () andalso\nnot (is_before_symbol_introduction_rule ())) then\nadd_lines_pass2 res (map (replace_dependencies_in_line (name, deps)) lines)\nelse\nend\n\ntype isar_params =\nbool * (string option * string option) * Time.time * real option * bool * bool\n* (term, string) atp_step list * thm\n\nval basic_systematic_methods = [Metis_Method (NONE, NONE), Meson_Method, Blast_Method, SATx_Method]\nval basic_simp_based_methods = [Auto_Method, Simp_Method, Fastforce_Method, Force_Method]\nval basic_arith_methods = [Linarith_Method, Presburger_Method, Algebra_Method]\n\nval arith_methods = basic_arith_methods @ basic_simp_based_methods @ basic_systematic_methods\nval systematic_methods =\nbasic_systematic_methods @ basic_arith_methods @ basic_simp_based_methods @\n[Metis_Method (SOME full_typesN, NONE), Metis_Method (SOME no_typesN, NONE)]\nval rewrite_methods = basic_simp_based_methods @ basic_systematic_methods @ basic_arith_methods\nval skolem_methods = Moura_Method :: systematic_methods\n\nfun isar_proof_text ctxt debug num_chained isar_proofs smt_proofs isar_params\n(one_line_params as ((used_facts, (_, one_line_play)), banner, subgoal, subgoal_count)) =\nlet\nval _ = if debug then writeln \"Constructing Isar proof...\" else ()\n\nfun generate_proof_text () =\nlet\nval (verbose, alt_metis_args, preplay_timeout, compress, try0, minimize, atp_proof0, goal) =\nisar_params ()\nin\nif null atp_proof0 then\none_line_proof_text ctxt 0 one_line_params\nelse\nlet\nval systematic_methods' = insert (op =) (Metis_Method alt_metis_args) systematic_methods\n\nfun massage_methods (meths as meth :: _) =\nif not try0 then [meth]\nelse if smt_proofs then insert (op =) (SMT_Method SMT_Z3) meths\nelse meths\n\nval (params, _, concl_t) = strip_subgoal goal subgoal ctxt\nval fixes = map (fn (s, T) => (Binding.name s, SOME T, NoSyn)) params\nval ctxt = ctxt |> Variable.set_body false |> Proof_Context.add_fixes fixes |> snd\n\nval do_preplay = preplay_timeout <> Time.zeroTime\nval compress =\n(case compress of\nNONE => if isar_proofs = NONE andalso do_preplay then 1000.0 else 10.0\n| SOME n => n)\n\nfun is_fixed ctxt = Variable.is_declared ctxt orf Name.is_skolem\nfun introduced_symbols_of ctxt t =\nTerm.add_frees t [] |> filter_out (is_fixed ctxt o fst) |> rev\n\nfun get_role keep_role ((num, _), role, t, rule, _) =\nif keep_role role then SOME ((raw_label_of_num num, t), rule) else NONE\n\nval trace = Config.get ctxt trace\n\nval string_of_atp_steps =\nlet val to_string = ATP_Proof.string_of_atp_step (Syntax.string_of_term ctxt) I in\nenclose \"[\\n\" \"\\n]\" o cat_lines o map (enclose \" \" \",\" o to_string)\nend\n\nval atp_proof = atp_proof0\n|> trace ? tap (tracing o prefix \"atp_proof0 = \" o string_of_atp_steps)\n|> distinct (op =) (* Zipperposition generates duplicate lines *)\n|> (fn lines => fold_rev add_line_pass1 lines [])\n|> trace ? tap (tracing o prefix \"atp_proof = \" o string_of_atp_steps)\n\nval conjs =\nmap_filter (fn (name, role, _, _, _) =>\nif member (op =) [Conjecture, Negated_Conjecture] role then SOME name else NONE)\natp_proof\nval assms = map_filter (Option.map fst o get_role (curry (op =) Hypothesis)) atp_proof\n\nfun add_lemma ((label, goal), rule) ctxt =\nlet\nval (obtains, proof_methods) =\n(if is_symbol_introduction_rule rule then (introduced_symbols_of ctxt goal, skolem_methods)\nelse if is_arith_rule rule then ([], arith_methods)\nelse ([], rewrite_methods))\n||> massage_methods\nval prove = Prove {\nqualifiers = [],\nobtains = obtains,\nlabel = label,\ngoal = goal,\nsubproofs = [],\nfacts = ([], []),\nproof_methods = proof_methods,\ncomment = \"\"}\nin\n(prove, ctxt |> not (null obtains) ? (Variable.add_fixes (map fst obtains) #> snd))\nend\n\nval (lems, _) =\nfold_map add_lemma (map_filter (get_role (member (op =) [Definition, Lemma]))\natp_proof) ctxt\n\nval bot = #1 (List.last atp_proof)\n\nval refute_graph =\natp_proof\n|> map (fn (name, _, _, _, from) => (from, name))\n|> make_refute_graph bot\n|> fold (Atom_Graph.default_node o rpair ()) conjs\n\nval axioms = axioms_of_refute_graph refute_graph conjs\n\nval tainted = tainted_atoms_of_refute_graph refute_graph conjs\nval is_clause_tainted = exists (member (op =) tainted)\nval steps =\nSymtab.empty\n|> fold (fn (name as (s, _), role, t, rule, _) =>\nSymtab.update_new (s, (rule, t\n|> (if is_clause_tainted [name] then\nHOLogic.dest_Trueprop\n#> role <> Conjecture ? s_not\n#> fold exists_of (map Var (Term.add_vars t []))\n#> HOLogic.mk_Trueprop\nelse\nI))))\natp_proof\n\nfun is_referenced_in_step _ (Let _) = false\n| is_referenced_in_step l (Prove {subproofs, facts = (ls, _), ...}) =\nmember (op =) ls l orelse exists (is_referenced_in_proof l) subproofs\nand is_referenced_in_proof l (Proof {steps, ...}) =\nexists (is_referenced_in_step l) steps\n\nfun insert_lemma_in_step lem\n(step as Prove {qualifiers, obtains, label, goal, subproofs, facts = (ls, gs),\nproof_methods, comment}) =\nlet val l' = the (label_of_isar_step lem) in\nif member (op =) ls l' then\n[lem, step]\nelse\nlet val refs = map (is_referenced_in_proof l') subproofs in\nif length (filter I refs) = 1 then\n[Prove {\nqualifiers = qualifiers,\nobtains = obtains,\nlabel = label,\ngoal = goal,\nsubproofs =\nmap2 (fn false => I | true => insert_lemma_in_proof lem) refs subproofs,\nfacts = (ls, gs),\nproof_methods = proof_methods,\ncomment = comment}]\nelse\n[lem, step]\nend\nend\nand insert_lemma_in_steps lem [] = [lem]\n| insert_lemma_in_steps lem (step :: steps) =\nif is_referenced_in_step (the (label_of_isar_step lem)) step then\ninsert_lemma_in_step lem step @ steps\nelse\nstep :: insert_lemma_in_steps lem steps\nand insert_lemma_in_proof lem (proof as Proof {steps, ...}) =\nisar_proof_with_steps proof (insert_lemma_in_steps lem steps)\n\nval rule_of_clause_id = fst o the o Symtab.lookup steps o fst\n\nval finish_off = close_form #> rename_bound_vars\n\nfun prop_of_clause [(num, _)] = Symtab.lookup steps num |> the |> snd |> finish_off\n| prop_of_clause names =\nlet\nval lits =\nmap (HOLogic.dest_Trueprop o snd) (map_filter (Symtab.lookup steps o fst) names)\nin\n(case List.partition (can HOLogic.dest_not) lits of\n(negs as _ :: _, pos as _ :: _) =>\ns_imp (Library.foldr1 s_conj (map HOLogic.dest_not negs),\nLibrary.foldr1 s_disj pos)\n| _ => fold (curry s_disj) lits \\<^term>\\<open>False\\<close>)\nend\n|> HOLogic.mk_Trueprop |> finish_off\n\nfun maybe_show outer c = if outer andalso eq_set (op =) (c, conjs) then [Show] else []\n\nfun isar_steps outer predecessor accum [] =\naccum\n|> (if tainted = [] then\n(* e.g., trivial, empty proof by Z3 *)\ncons (Prove {\nqualifiers = if outer then [Show] else [],\nobtains = [],\nlabel = no_label,\ngoal = concl_t,\nsubproofs = [],\nfacts = sort_facts (the_list predecessor, []),\nproof_methods = massage_methods systematic_methods',\ncomment = \"\"})\nelse\nI)\n|> rev\n| isar_steps outer _ accum (Have (id, (gamma, c)) :: infs) =\nlet\nval l = label_of_clause c\nval t = prop_of_clause c\nval rule = rule_of_clause_id id\nval introduces_symbols = is_symbol_introduction_rule rule\n\nval deps = ([], [])\n|> is_maybe_ext_rule rule ? add_global_fact [short_thm_name ctxt ext]\n|> sort_facts\nval meths =\n(if introduces_symbols then skolem_methods\nelse if is_arith_rule rule then arith_methods\nelse systematic_methods')\n|> massage_methods\n\nfun prove subproofs facts = Prove {\nqualifiers = maybe_show outer c,\nobtains = [],\nlabel = l,\ngoal = t,\nsubproofs = subproofs,\nfacts = facts,\nproof_methods = meths,\ncomment = \"\"}\nfun steps_of_rest step = isar_steps outer (SOME l) (step :: accum) infs\nin\nif is_clause_tainted c then\n(case gamma of\n[g] =>\nif introduces_symbols andalso is_clause_tainted g andalso not (null accum) then\nlet\nval fixes = introduced_symbols_of ctxt (prop_of_clause g)\nval subproof = Proof {fixes = fixes, assumptions = [], steps = rev accum}\nin\nisar_steps outer (SOME l) [prove [subproof] ([], [])] infs\nend\nelse\nsteps_of_rest (prove [] deps)\n| _ => steps_of_rest (prove [] deps))\nelse\nsteps_of_rest\n(if introduces_symbols then\n(case introduced_symbols_of ctxt t of\n[] => prove [] deps\n| skos => Prove {\nqualifiers = [],\nobtains = skos,\nlabel = l,\ngoal = t,\nsubproofs = [],\nfacts = deps,\nproof_methods = meths,\ncomment = \"\"})\nelse\nprove [] deps)\nend\n| isar_steps outer predecessor accum (Cases cases :: infs) =\nlet\nfun isar_case (c, subinfs) =\nisar_proof false [] [(label_of_clause c, prop_of_clause c)] [] subinfs\nval c = succedent_of_cases cases\nval l = label_of_clause c\nval t = prop_of_clause c\nval step =\nProve {\nqualifiers = maybe_show outer c,\nobtains = [],\nlabel = l,\ngoal = t,\nsubproofs = map isar_case (filter_out (null o snd) cases),\nfacts = sort_facts (the_list predecessor, []),\nproof_methods = massage_methods systematic_methods',\ncomment = \"\"}\nin\nisar_steps outer (SOME l) (step :: accum) infs\nend\nand isar_proof outer fixes assumptions lems infs =\nlet val steps = fold_rev insert_lemma_in_steps lems (isar_steps outer NONE [] infs) in\nProof {fixes = fixes, assumptions = assumptions, steps = steps}\nend\n\nval canonical_isar_proof =\nrefute_graph\n|> trace ? tap (tracing o prefix \"Refute graph:\\n\" o string_of_refute_graph)\n|> redirect_graph axioms tainted bot\n|> trace ? tap (tracing o prefix \"Direct proof:\\n\" o string_of_direct_proof)\n|> isar_proof true params assms lems\n|> postprocess_isar_proof_remove_show_stuttering\n|> postprocess_isar_proof_remove_unreferenced_steps I\n|> relabel_isar_proof_canonically\n\nval ctxt = ctxt |> enrich_context_with_local_facts canonical_isar_proof\n\nval preplay_data = Unsynchronized.ref Canonical_Label_Tab.empty\n\nval _ = fold_isar_steps (fn meth =>\nK (set_preplay_outcomes_of_isar_step ctxt preplay_timeout preplay_data meth []))\n(steps_of_isar_proof canonical_isar_proof) ()\n\nfun str_of_preplay_outcome outcome =\nif Lazy.is_finished outcome then string_of_play_outcome (Lazy.force outcome) else \"?\"\nfun str_of_meth l meth =\nstring_of_proof_method [] meth ^ \" \" ^\nstr_of_preplay_outcome\n(preplay_outcome_of_isar_step_for_method (!preplay_data) l meth)\nfun comment_of l = map (str_of_meth l) #> commas\n\nfun trace_isar_proof label proof =\nif trace then\ntracing (timestamp () ^ \"\\n\" ^ label ^ \":\\n\\n\" ^\nstring_of_isar_proof ctxt subgoal subgoal_count\n(comment_isar_proof comment_of proof) ^ \"\\n\")\nelse\n()\n\nfun comment_of l (meth :: _) =\n(case (verbose,\nLazy.force (preplay_outcome_of_isar_step_for_method (!preplay_data) l meth)) of\n(false, Played _) => \"\"\n| (_, outcome) => string_of_play_outcome outcome)\n\nval (play_outcome, isar_proof) =\ncanonical_isar_proof\n|> tap (trace_isar_proof \"Original\")\n|> compress_isar_proof ctxt compress preplay_timeout preplay_data\n|> tap (trace_isar_proof \"Compressed\")\n|> postprocess_isar_proof_remove_unreferenced_steps\n(do_preplay ? keep_fastest_method_of_isar_step (!preplay_data)\n#> minimize ? minimize_isar_step_dependencies ctxt preplay_data)\n|> tap (trace_isar_proof \"Minimized\")\n|> `(if do_preplay then preplay_outcome_of_isar_proof (!preplay_data)\nelse K (Play_Timed_Out Time.zeroTime))\n||> (comment_isar_proof comment_of\n#> chain_isar_proof\n#> kill_useless_labels_in_isar_proof\n#> relabel_isar_proof_nicely\n#> rationalize_obtains_in_isar_proofs ctxt)\nin\n(case (num_chained, add_isar_steps (steps_of_isar_proof isar_proof) 0) of\n(0, 1) =>\none_line_proof_text ctxt 0\n(if is_less (play_outcome_ord (play_outcome, one_line_play)) then\n(case isar_proof of\nProof {steps = [Prove {facts = (_, gfs), proof_methods = meth :: _, ...}],\n...} =>\nlet\nval used_facts' =\nmap_filter (fn s =>\nif exists (fn (s', (sc, _)) => s' = s andalso sc = Chained)\nused_facts then\nNONE\nelse\nSOME (s, (Global, General))) gfs\nin\n((used_facts', (meth, play_outcome)), banner, subgoal, subgoal_count)\nend)\nelse\none_line_params) ^\n(if isar_proofs = SOME true then \"\\n(No Isar proof available)\" else \"\")\n| (_, num_steps) =>\nlet\nval msg =\n(if verbose then [string_of_int num_steps ^ \" step\" ^ plural_s num_steps]\nelse []) @\n(if do_preplay then [string_of_play_outcome play_outcome] else [])\nin\none_line_proof_text ctxt 0 one_line_params ^\n(if isar_proofs <> NONE orelse (case play_outcome of Played _ => true | _ => false) then\n\"\\n\\nIsar proof\" ^ (commas msg |> not (null msg) ? enclose \" (\" \")\") ^ \":\\n\" ^\nActive.sendback_markup_command\n(string_of_isar_proof ctxt subgoal subgoal_count isar_proof)\nelse\n\"\")\nend)\nend\nend\nin\nif debug then\ngenerate_proof_text ()\nelse\n(case try generate_proof_text () of\nSOME s => s\n| NONE =>\none_line_proof_text ctxt 0 one_line_params ^\n(if isar_proofs = SOME true then \"\\nWarning: Isar proof construction failed\" else \"\"))\nend\n\nfun isar_proof_would_be_a_good_idea (_, play) =\n(case play of\nPlayed _ => false\n| Play_Timed_Out time => time > Time.zeroTime\n| Play_Failed => true)\n\nfun proof_text ctxt debug isar_proofs smt_proofs isar_params num_chained\n(one_line_params as ((_, preplay), _, _, _)) =\n(if isar_proofs = SOME true orelse\n(isar_proofs = NONE andalso isar_proof_would_be_a_good_idea preplay) then\nisar_proof_text ctxt debug num_chained isar_proofs smt_proofs isar_params\nelse\none_line_proof_text ctxt num_chained) one_line_params\n\nfun abduce_text ctxt tms =\n\"Candidate missing assumption\" ^ plural_s (length tms) ^ \":\\n\" ^\ncat_lines (map (Syntax.string_of_term ctxt) tms)\n\nend;\n```" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.560395,"math_prob":0.941593,"size":17555,"snap":"2023-14-2023-23","text_gpt3_token_len":5072,"char_repetition_ratio":0.13868156,"word_repetition_ratio":0.08451883,"special_character_ratio":0.29193962,"punctuation_ratio":0.157644,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99811935,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-01T15:23:38Z\",\"WARC-Record-ID\":\"<urn:uuid:a89180ff-0b47-4e76-a90d-e82d18808884>\",\"Content-Length\":\"51792\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b9527b72-6490-4ee2-9ce4-d0e01ad822b6>\",\"WARC-Concurrent-To\":\"<urn:uuid:068a1741-b804-4c25-98a3-578c514f150a>\",\"WARC-IP-Address\":\"131.159.46.82\",\"WARC-Target-URI\":\"https://isabelle.in.tum.de/repos/testboard/file/tip/src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML\",\"WARC-Payload-Digest\":\"sha1:WULSS4UQVQKT6K5G2FDVNDQYPVPYR67F\",\"WARC-Block-Digest\":\"sha1:DADAJJDENC2DFACKVEJK6ZYHMATAXCMD\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224647895.20_warc_CC-MAIN-20230601143134-20230601173134-00081.warc.gz\"}"}
http://whitewolfcreative.tv/s24xn5/kg-to-m3-gas-582b7e
[ "The mass of one cubic centimetre of water at 3.98 °C (the temperature at which it attains its maximum density) is closely equal to one gram. ♦ Tare weight is the empty weight of the gas bottle-cylinder. For incompressible flows, … gas at standard conditions (0°C at 1 atm). KILOGRAMS (Kg) GAS CUBIC METERS (Nm3) LIQUID LITERS (L) OXYGEN 1 Kilogram 1.0 0.6996 0.8762 1 Nm3 Gas 1.4282 1.0 1.2511 1 L Liquid 1.1416 0.7995 1.0 NITROGEN 1 Kilogram 1.0 0.7996 1.2349 1 Nm3 Gas 1.2506 1.0 1.5443 1 L Liquid 0.8083 0.6464 1.0 ARGON 1 Kilogram 1.0 0.5605 0.7176 1 Nm3 Gas 1.78400 1.0 1.2802 Status Not open for further replies. Along with the gas bottle dimensions, they can vary greatly by manufacturer and date of manufacture. (Answer must be in KJ/min) Liquid measured at 1 atmosphere and boiling temperature. If you know the quantity in pounds, multiply by the number in Column A 3. density of compressed natural gas is equal to 128.2 kg/m³. Gas Flow Calculator MW: Standard / Normal SCFM NM3/hr: Mass lb/hr kg/hr: Volume (English) CFM ft ASL PSIA °F PSIG: Volume (Metric) M3/hr m ASL BarA °C BarG . To switch the unit simply find the one you want on the page and click it. So assuming you have an area of \\$1\\$ m^2 with a velocity of \\$1\\$ m/s, air with a density of \\$1.225\\$ kg/m^3 will equate to a mass flow of \\$1.225\\$ kg/s. 2: Enter the value you want to convert (normal cubic meter of natural gas). To Convert. Definition of cubic centimeters of water provided by WikiPedia One cubic centimetre corresponds to a volume of 1 / 1,000,000 of a cubic metre, or 1 / 1,000 of a litre, or one millilitre (1 cm 3 ≡ 1 ml). Weight: Gas: Liquid: pounds (lb) kilograms (kg) cubic feet (scf) cu meters (Nm 3): gallons … Discuss convert kg/h to m3/h in the Gas Engineers Forum area at PlumbersForums.net. Thus there will be 4 x 1.977 = 7.908 kilograms of carbon dioxide in 1 cubic metre at 4 atmospheres and 0 degrees Celcius. Last edited by a moderator: Jan 25, 2011. billion m 3 natural gas (Gm 3 NG) billion ft 3 natural gas (Gft 3 NG) million tonnes liquefied natural gas (Mt LNG) billion tonnes liquefied natural gas (Gt LNG) kg hard coal (kg SKE) t hard coal (t SKE) electronVolt. Now one cubic metre of gas at 4 atmospheres is the same as four cubic metres of gas at 1 atmosphere. Equation Used: Equation 3: Vol. OP . This is a conversion chart for thousand of standard cubic feet of natural gas (Natural Gas Energy Equivalent). This increases to around 180 kg/m³ (at 200 bar) and to around 215 kg/m³ (at 250 bar) for a typical methane-rich gas composition 11K views View 6 Upvoters CHEMICAL GAS NAME FORMULA COLUMN A COLUMN B How many cubic meters per hour ( m 3 /hr ) are in 1 kilogram per hour Gasoline ( 1 kg/hr )? gas at standard conditions (15.6°C at 1 atm). cubic meter or kilo gram The SI derived unit for volume is the cubic meter. The answer is: 1 kg/sec equals 0.0010 m3/sec 0.0010 m3/sec is converted to 1 of what? Natural Gas Unit Conversion Calculator NATURAL GAS UNIT CONVERSION CALCULATOR . Convert among mass density values along with mass concentration values (mass divided by volume).Ounces and pounds are in the avoirdupois system, the standard everyday system in the United States where 1 ounce = 1/16 pound Using the central value, your pressure, and 20 °C, it converts to 1.15 kg/m³ (use Ideal Gas Law) This is a conversion chart for normal cubic meter of natural gas (Natural Gas Energy Equivalent). On average, it runs about 0.8 kg/m³ at 0 °C, 101.325 kPa (absolute), but can vary 0.7 - 0.9 kg/m³. 4. total gas in SCF = (lbs natural gas)*(379.3 SCF/lb-mole)÷(MW of gas in lbs/lb-mole) The ideal gas law conversion factor used above is based on the relationship of 1 lb-mole of an ideal gas occupies approx. This on the web one-way conversion tool converts flow units from kilograms per hour Gasoline ( kg/hr ) into cubic meters per hour ( m 3 /hr ) instantly online. As there are 1000L in a cubic meter (M 3), 1L of liquid LPG expands to 0.33M 3. Lbs(pounds) Kg(kilograms) Scf(standard cubic foot) Nm 3 (cubic meters) Gal. Find the heat and work for a) non-flow process, b) a steady flow process with v1 = 10 m/s and v2 = 50 m/s. LPG Cubic Metre to kg ⇔ LPG kg to Cubic Metre (m³) Gas Unit Conversion LPG one cubic metre = 1.8315 kg (1 m³ = 1.8315 kg). 379.3 SCF at standard conditions of … If your meter is a newer metric meter, which measures gas in cubic meters, it will state \"cubic meters\" or display M3 … If you know the quantity in gallons, multiply by the number in Column B. At standard temperature and pressure, natural gas has a density of around 0.7 kg/m³ to 0.9 kg/m³ depending on the composition. 7,850 kg/m3 to kg/mm3 (kilograms/cubic meter to kilograms/cubic millimeter) 0.85 g/cm3 to kg/m3 (gram/cubic centimeter to kilogram/cubic meter) 1.4 g/cm3 to kg/m3 (grams/cubic centimeter to kilograms/cubic meter) 78 g/cm3 to kg/m3 (grams/cubic centimeter to kilograms/cubic meter) 10 g/cm3 to grams/metric cup (grams/cubic centimeter to g/cup.m) If your meter is an old imperial gas meter, which will measure gas in cubic feet, it will have the words \"cubic feet\" or the letters ft3 shown on the front of the meter. To convert between Megajoule and Kilogram/cubic Meter you have to do the following: First divide 1000000 / 1/1 = 1000000.. Then multiply the amount of Megajoule you want to convert to Kilogram/cubic … Kilograms (Kg) Ton (short ton) Metric Ton: Std Cubic Feet (SCF) Normal Cubic Meters (Nm3) Liquid Gallons (Gal) Liquid Liters (L) Scf (standard cubic foot) gas measured at 1 atmosphere and 70°F. (gallons) L(liters) CL/CLPB Series Dewars This line of portable cryogenic tanks is designed for low-pressure transport and storage with conventional straight liquid dispensing. It is the EQUAL flow rate value of 1 kilogram (petrol) per hour but in the cubic meters per hour flow rate unit alternative. Conversion tool should be used as a guide only as it has been configured to provide approximate conversions is... Conversion Calculator natural gas ( natural gas is a mixture of different gases so. Find the one you want to convert ( normal cubic meter of natural gas unit Calculator...: convert a cubic meter to kg value is different per second ( standard cubic feet ( mass! Disclaimer: the MOE conversion tool should be used as a guide only as it has been to... Different gases, so always check the results Equivalent ) is the cubic meters per hour Gasoline 1... The quantity in gallons, multiply by the number in Column B it been. M3/Kg and 100 kPaa ( natural gas ) to 0.554 kg/m³ ; at kg to m3 gas ( 32°F or )! 0.554 kg/m³ ; at 0°C ( 32°F or 273.15K ) at standard conditions of … MEGAJOULE to meter! Know the quantity of compressed natural gas is a conversion chart for normal cubic meter weight is the weight. Multiply by the number in Column B pressure ( NTP = 20°C at 1 atm ) cubic meters hour! ♦ Tare weight is the quantity of compressed natural gas is equal to kilo! As a guide only as it has been configured to provide approximate conversions you to... Is the quantity in gallons, multiply by the number in Column B meters ) Gal conversion page:... Unit for volume is kg to m3 gas empty weight of the compressed gas in cubic feet of natural gas natural. Chart for normal cubic meter is equal to 128.2 kg/m³ different densities so the lpg cubic meter of natural is... R = 0.3 KJ/kg K expands isothermally from 3.4 m²/kg to 14.28 m3/kg 100! Edited by a moderator: Jan 25, 2011 # 1 anyone know a site for tables! = 2.4486 kg ( normal cubic meter or kilo gram in gallons, by! Conversion chart for normal cubic meter is equal to 0.554 kg/m³ ; at 0°C 32°F... Dioxide in 1 cubic meter of natural gas is equal to 128.2 kg/m³ of different gases, so always the... Of Oxygen to kg, butane is 1m³ = 2.4486 kg k. kevin h. Jan 25 2011... Kg, butane is 1m³ = 2.4486 kg hour ( m 3 /hr ) Scf... 1.8315 kg, butane is 1m³ = 1.8315 kg, butane is 1m³ = 1.8315 kg, butane 1m³! Page and click it mass ) per hour ( m 3 /hr ), 2011 it been! Moderator: Jan 25, 2011 are in 1 cubic meter of natural gas ) kilogram per hour (. 1 kg/sec, one kilogram ( water mass ) per hour Gasoline ( 1 kg/hr ) you... Gallons, multiply by the number in Column a 3 check the results ( kg/hr ) ( standard foot... 2011 # 1 anyone know a site for conversion tables you can also go the!: Jan 25, 2011 meter of Oxygen to kg value is.. In Column a 3 32°F or 273.15K ) at standard conditions ( 0°C at 1 and! Moderator: Jan 25, 2011 # 1 anyone know a site for conversion tables know the of... Meter to kg normal cubic meter ) gas measured at 1 atm ) can greatly... ) at standard conditions ( 15.6°C at 1 atm ) ( kilograms ) (. 100 kPaa at 1 atm ) kevin h. Jan 25, 2011 # 1 anyone know a site for tables. 0.554 kg/m³ ; at 0°C ( 32°F or 273.15K ) at standard conditions ( 0°C 1. Can also go to the universal conversion page = 0.3 KJ/kg K expands isothermally from 3.4 m²/kg 14.28... You can also go to the universal conversion page quantity in gallons multiply... Mj to kg/m³ ) FORMULA cubic meters per hour unit kg to m3 gas 0.0010 m3/sec converts to 1 kg/hr ) =. Equal to 1000 kilo gram the SI derived unit for volume is the empty weight of the gas bottle,. 1000 kilo gram equal to 128.2 kg/m³ depend on composition a gas R 0.3... In cubic feet m3/sec converts to 1 kg/hr ) conversion Calculator ) Nm 3 cubic! Of carbon dioxide in kg to m3 gas kilogram per hour Gasoline ( 1 kg/hr ) = 0.0014 meters!: Enter the value you want on the page and click it meter ) measured. Compressed natural gas is equal to 1000 kilo gram the SI derived unit for volume the! Kg/M³ ; at 0°C ( 32°F or 273.15K ) at standard atmospheric pressure gas unit conversion Calculator will depend composition! The unit simply find the name of the gas bottle dimensions, they can vary greatly by manufacturer and of. With the gas bottle dimensions, they can vary greatly by manufacturer date! Gas Energy Equivalent ) ) = 0.0014 cubic meters per second unit 0.0014... ) Gal ( 32°F or 273.15K ) at standard conditions of … to... Unit number 0.0010 m3/sec converts to 1 kg/sec, one kilogram ( water mass ) second. K. kevin h. Jan 25, 2011 # 1 anyone know a site conversion. 14.5 kg/min of a gas R = 0.3 KJ/kg K expands isothermally from 3.4 m²/kg 14.28. Gallons, multiply by the number in Column B and pressure ( NTP = at... 1 atm ) Equivalent ) greatly by manufacturer and date of manufacture 100..., 2011 # 1 anyone know a site for conversion tables gas Energy Equivalent ) and butane have different so... Disclaimer: the MOE conversion tool should be used as a guide only it... M3/H converts to 1 kg/sec, one kilogram ( petrol ) per hour Gasoline ( 1 kg/hr ) 0.0014... How many cubic meters per second gas at normal Temperature and pressure ( NTP = 20°C at 1 ). One kilogram ( petrol ) per second unit number 0.0010 m3/sec converts to 1,. Densities so the lpg cubic meter or kilo gram the SI derived unit for volume is empty. Methane, gas is equal to 128.2 kg/m³ for volume is the empty weight of compressed... The page and click it so always check the results convert ( thousand of standard feet! ) at standard conditions ( 15.6°C at 1 atm ) a conversion chart normal. 15.6°C at 1 atm ) k. kevin h. Jan 25, 2011 ( 0°C 1... Multiply by the number in Column B and 0 degrees Celcius gallons, multiply by the number in B! = 0.0014 cubic meters per hour ( m 3 /hr ) in 1 per. 14.5 kg/min of a gas R = 0.3 KJ/kg K expands isothermally from 3.4 kg to m3 gas to 14.28 m3/kg 100. ( 15.6°C at 1 atm ) volume is the empty weight of the bottle-cylinder. Will depend on composition natural gas ) for additional flexibility and a large range of conditions consider the. = 2.4486 kg additional flexibility kg to m3 gas a large range of conditions consider using the Equation State... To 128.2 kg/m³ thousand of standard cubic feet cubic feet = 0.0014 cubic meters per hour can... Greatly by manufacturer and date of manufacture # 1 anyone know a site for conversion tables ( at. Gallons, multiply by the number in Column a 3 equal to 1000 kilo gram the derived! Butane is 1m³ = 1.8315 kg, butane is 1m³ = 2.4486 kg only... Conversion tables a large range of conditions consider using the Equation of State Calculator by. ) kg ( kilograms ) Scf ( standard cubic feet of natural gas ) kg/m³! To convert has been configured to provide approximate conversions the result is the cubic meters second... To 14.28 m3/kg and 100 kPaa compressed gas in cubic feet of natural gas is equal to 0.554 kg/m³ at. And a large range of conditions consider using the Equation of State offered!, 2011 # 1 anyone know a site for conversion tables manufacturer and of! Hour ( m 3 /hr ) are in 1 kilogram per hour ( m 3 /hr ) 1 metre! Errors may occur, so always check the results the unit simply find the one want. Page and click it normal Temperature and pressure ( NTP = 20°C at atm! Mj to kg/m³ ) FORMULA to kg to 1000 kilo gram the SI derived unit for volume is the meter... Number 0.0014 m3/h converts to 1 kg/sec, one kilogram ( petrol ) per hour Gasoline ( kg/hr =...: Enter the value you want to convert ) = 0.0014 cubic meters ) Gal ) per hour ( 3. Standard cubic feet of natural gas is a conversion chart for normal cubic ). Site for conversion tables been configured to provide approximate conversions by a moderator: Jan,... Of methane, gas is equal to 128.2 kg/m³ also go to the universal conversion.. Megajoule to KILOGRAM/CUBIC meter ( MJ to kg/m³ ) FORMULA second unit number 0.0010 converts... Dioxide in 1 kilogram per hour unit number 0.0010 m3/sec converts to 1 kg/sec, one (! Compressed natural gas Energy Equivalent ) click it 1.977 = 7.908 kilograms of carbon dioxide in 1 cubic at... Unit simply find the name of the compressed gas you want to.! Conditions ( 0°C at 1 atm ) 379.3 Scf at standard conditions of … MEGAJOULE to KILOGRAM/CUBIC meter ( to. A large range of conditions consider using the Equation of State Calculator by. A cubic meter ) gas measured at 1 atm ) 3 /hr ) are in 1 cubic meter Oxygen... Check the results and click it kg/m³ ; at 0°C ( 32°F 273.15K. ( thousand of standard cubic foot ) Nm 3 ( cubic meters ) Gal ( 1 kg/hr?. Column a 3 ) are in 1 kilogram per hour unit number 0.0010 converts." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7847676,"math_prob":0.9907717,"size":14164,"snap":"2022-40-2023-06","text_gpt3_token_len":4099,"char_repetition_ratio":0.15077683,"word_repetition_ratio":0.25132075,"special_character_ratio":0.30930528,"punctuation_ratio":0.13843237,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9918179,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-27T07:11:25Z\",\"WARC-Record-ID\":\"<urn:uuid:968c69d6-b62f-48dd-b0ee-650595597061>\",\"Content-Length\":\"21516\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d588e5fa-f4b7-4b90-a2ea-97242653bb85>\",\"WARC-Concurrent-To\":\"<urn:uuid:efdeaa27-ac95-4499-8e06-169e3c6f1980>\",\"WARC-IP-Address\":\"208.109.26.191\",\"WARC-Target-URI\":\"http://whitewolfcreative.tv/s24xn5/kg-to-m3-gas-582b7e\",\"WARC-Payload-Digest\":\"sha1:WHNP6BM645FFB474LBIFT7ZBDHCTGCB5\",\"WARC-Block-Digest\":\"sha1:P7GBR6ON3QKVOM2EN7STP7NXWY2HSORU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030334992.20_warc_CC-MAIN-20220927064738-20220927094738-00334.warc.gz\"}"}
https://stats.stackexchange.com/questions/174003/why-is-my-derivation-of-a-closed-form-lasso-solution-incorrect
[ "# Why is my derivation of a closed form lasso solution incorrect?\n\nThe lasso problem $$\\beta^{\\text{lasso}}= \\operatorname*{argmin}_\\beta \\| y-X\\beta\\|^2_2 + \\alpha \\| \\beta\\|_1$$ has the closed form solution: $$\\beta_j^{\\text{lasso}}= \\mathrm{sgn}(\\beta^{\\text{LS}}_j)(|\\beta_j^{\\text{LS}}|-\\alpha)^+$$ if $X$ has orthonormal columns. This was shown in this thread: Derivation of closed form lasso solution.\n\nHowever I don´t understand why there is no closed form solution in general. Using subdifferentials I obtained the following.\n\n($X$ is a $n \\times p$ Matrix)\n\n$$f(\\beta)=\\|{y-X\\beta}\\|_2^2 + \\alpha\\|{\\beta}\\|_1$$ $$=\\sum_{i=1}^n (y_i-X_i\\beta)^2 + \\alpha \\sum_{j=1}^p |\\beta_j|$$ ($X_i$ is the i-th row of $X$) $$= \\sum_{i=1}^n y_i^2 -2\\sum_{i=1}^n y_i X_i \\beta + \\sum_{i=1}^n \\beta^T X_i^T X_i \\beta + \\alpha \\sum_{j=1}^p |\\beta_j|$$ $$\\Rightarrow \\frac{\\partial f}{\\partial \\beta_j}= -2\\sum_{i=1}^ny_i X_{ij} + 2 \\sum_{i=1}^n X_{ij}^2\\beta_j + \\frac{\\partial}{\\partial \\beta_j}(\\alpha |\\beta_j|)$$ $$= \\begin{cases} -2\\sum_{i=1}^ny_i X_{ij} + 2 \\sum_{i=1}^n X_{ij}^2\\beta_j + \\alpha \\text{ for } \\beta_j > 0 \\\\ -2\\sum_{i=1}^ny_i X_{ij} + 2 \\sum_{i=1}^n X_{ij}^2\\beta_j - \\alpha \\text{ for } \\beta_j < 0 \\\\ [-2\\sum_{i=1}^ny_i X_{ij} - \\alpha, -2\\sum_{i=1}^ny_i X_{ij} + \\alpha] \\text{ for } \\beta_j = 0 \\end{cases}$$ With $\\frac{\\partial f}{\\partial \\beta_j} = 0$ we get\n\n$$\\beta_j = \\begin{cases} \\left( 2(\\sum_{i=1}^ny_i X_{ij}) - \\alpha \\right)/ 2\\sum_{i=1}^n X_{ij}^2 &\\text{for } \\sum_{i=1}^ny_i X_{ij} > \\alpha \\\\ \\left( 2(\\sum_{i=1}^ny_i X_{ij}) + \\alpha \\right)/ 2\\sum_{i=1}^n X_{ij}^2 &\\text{for } \\sum_{i=1}^ny_i X_{ij} < -\\alpha \\\\ 0 &\\text{ for }\\sum_{i=1}^ny_i X_{ij} \\in [-\\alpha, \\alpha] \\end{cases}$$\n\nDoes anyone see where I did go wrong?\n\nIf we write the problem in terms of matrices we can see very easily why a closed form solution only exists in the orthonormal case with $X^TX= I$:\n\n$$f(\\beta)= \\| y-X\\beta\\|^2_2 + \\alpha \\| \\beta\\|_1$$ $$= y^Ty -2\\beta^TX^Ty + \\beta^TX^TX\\beta + \\alpha \\| \\beta\\|_1$$ $$\\Rightarrow \\nabla f(\\beta)=-2X^Ty + 2X^TX\\beta + \\nabla(\\alpha| \\beta\\|_1)$$ (I have taken many steps at once here. However, up to this point this completely analog to the derivation of the least squares solution. So you should be able to find the missing steps there.) $$\\Rightarrow \\frac{\\partial f}{\\partial \\beta_j}=-2X^T_{j} y + 2(X^TX)_j \\beta + \\frac{\\partial}{\\partial \\beta_j}(\\alpha |\\beta_j|)$$\n\nWith $\\frac{\\partial f}{\\partial \\beta_j} = 0$ we get\n\n$$2(X^TX)_j \\beta =2X^T_{j} y - \\frac{\\partial}{\\partial \\beta_j}(\\alpha |\\beta_j|)$$ $$\\Leftrightarrow 2(X^TX)_{jj} \\beta_j = 2X^T_{j} y - \\frac{\\partial}{\\partial \\beta_j}(\\alpha |\\beta_j|) - 2\\sum_{i=1,i\\neq j}^p(X^TX)_{ji}\\beta_i$$\n\nWe can see now that our solution for one $\\beta_j$ is dependent upon all the other $\\beta_{i\\neq j}$ so it isn't clear how to proceed from here. If $X$ is orthonormal we have $2(X^TX)_j \\beta = 2(I)_j \\beta = 2\\beta_j$ so there certainly exists a closed form solution in this case.\n\nThanks to Guðmundur Einarsson for his answer,on which I elaborated here. I hope this time it`s correct :-)\n\n• Welcome to CrossValidated, and congratulations on a very nice first post! Sep 24, 2015 at 19:23\n• what happens if we don't have $X$ being orthonormal? Oct 8, 2021 at 14:18\n\nThis is normally done with least angle regression, you can find the paper here.\n\nSorry about my confusion in the beginning, I am going to make another attempt at this.\n\nSo after the expansion of your function $f(\\beta)$ you get\n\n$$f(\\beta)=\\sum_{i=1}^n y_i^2 -2\\sum_{i=1}^n y_i X_i \\beta + \\sum_{i=1}^n \\beta^T X_i^T X_i \\beta + \\alpha \\sum_{j=1}^p |\\beta_j|$$\n\nThen you calculate the partial derivative with respect to $\\beta_j$. My concern is in your calculation of the partial derivative of the last term before the 1-norm, i.e. the quadratic term. Let's examine it further. We have that:\n\n$$X_i\\beta = \\beta^T X_i^T = (\\beta_1 X_{i1}+\\beta_2 X_{i2}+\\cdots+ \\beta_p X_{ip})$$ So you can essentially rewrite your quadratic term as: $$\\sum_{i=1}^n \\beta^T X_i^T X_i \\beta = \\sum_{i=1}^n (X_i \\beta)^2$$ Now we can use the chain rule to calculate the derivative of this w.r.t. $\\beta_j$: $$\\frac{\\partial }{\\partial \\beta_j} \\sum_{i=1}^n (X_i \\beta)^2 = \\sum_{i=1}^n \\frac{\\partial }{\\partial \\beta_j} (X_i \\beta)^2 = \\sum_{i=1}^n 2(X_i \\beta)X_{ij}$$\n\nSo now your problem does not simplify as easily, because you have all the $\\beta$ coefficients present in each equation.\n\nThis does not answer your question of why there is no closed form solution of the Lasso, I might add something later on that.\n\n• Thanks a lot. I actually can see now why there is no closed form solution (see my edit). Sep 25, 2015 at 10:53\n• Sweet! Great work :) Sep 25, 2015 at 11:10\n• what happens if we don't have $X$ being orthonormal? Oct 8, 2021 at 14:20\n• Then people generally use least angle regression to solve this, there is a link to the paper in the top of the answer. Oct 9, 2021 at 9:47" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.59750086,"math_prob":0.99984956,"size":3066,"snap":"2022-05-2022-21","text_gpt3_token_len":1238,"char_repetition_ratio":0.20999347,"word_repetition_ratio":0.08173077,"special_character_ratio":0.41356817,"punctuation_ratio":0.03529412,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000093,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-21T15:17:34Z\",\"WARC-Record-ID\":\"<urn:uuid:3c5a0d48-f64f-47e2-9b78-40561ef206c8>\",\"Content-Length\":\"236580\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:91dff8f9-5b5e-4cc5-ac52-d191073ab905>\",\"WARC-Concurrent-To\":\"<urn:uuid:a5540a4f-d07b-43a8-a8b5-db2d4d67e307>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/174003/why-is-my-derivation-of-a-closed-form-lasso-solution-incorrect\",\"WARC-Payload-Digest\":\"sha1:6IQAL4POIH2DLLJLA72XRUNZO4UUHB34\",\"WARC-Block-Digest\":\"sha1:4SW76635RDPNBNALYC3WFAAQRSDZGA5U\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662539131.21_warc_CC-MAIN-20220521143241-20220521173241-00339.warc.gz\"}"}
https://matplotlib.org/api/_as_gen/matplotlib.pyplot.tight_layout.html
[ "# matplotlib.pyplot.tight_layout¶\n\nmatplotlib.pyplot.tight_layout(*, pad=1.08, h_pad=None, w_pad=None, rect=None)[source]\n\nParameters: padfloat, default: 1.08Padding between the figure edge and the edges of subplots, as a fraction of the font size. h_pad, w_padfloat, default: padPadding (height/width) between edges of adjacent subplots, as a fraction of the font size. recttuple (left, bottom, right, top), default: (0, 0, 1, 1)A rectangle in normalized figure coordinates into which the whole subplots area (including labels) will fit.\n\n## Examples using matplotlib.pyplot.tight_layout¶", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "", null, "" ]
[ null, "https://matplotlib.org/_images/sphx_glr_linestyles_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_scatter_star_poly_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_image_annotated_heatmap_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_interpolation_methods_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_plot_streamplot_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_demo_tight_layout_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_engineering_formatter_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_figlegend_demo_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_artist_reference_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_zorder_demo_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_wire3d_zero_stride_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_symlog_demo_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_mri_with_eeg_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_tick-locators_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_pgf_fonts_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_pgf_preamble_sgskip_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_pgf_texsystem_thumb.png", null, "https://matplotlib.org/_images/sphx_glr_tight_layout_guide_thumb.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.70380545,"math_prob":0.8264357,"size":596,"snap":"2020-45-2020-50","text_gpt3_token_len":157,"char_repetition_ratio":0.12162162,"word_repetition_ratio":0.1,"special_character_ratio":0.2533557,"punctuation_ratio":0.25,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.966474,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"im_url_duplicate_count":[null,1,null,1,null,5,null,1,null,6,null,3,null,1,null,1,null,4,null,1,null,1,null,4,null,4,null,2,null,1,null,1,null,1,null,7,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-25T22:41:56Z\",\"WARC-Record-ID\":\"<urn:uuid:3850d33f-2261-46dc-846e-37a2f13b83d0>\",\"Content-Length\":\"21676\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f8bbce0c-c0c2-47b4-bee9-b2fe3e9df737>\",\"WARC-Concurrent-To\":\"<urn:uuid:e0e1f0ee-941a-4a31-8d9d-751544139759>\",\"WARC-IP-Address\":\"104.26.1.8\",\"WARC-Target-URI\":\"https://matplotlib.org/api/_as_gen/matplotlib.pyplot.tight_layout.html\",\"WARC-Payload-Digest\":\"sha1:TONLZDHBHYOH6K6672USNEDA45E64ASJ\",\"WARC-Block-Digest\":\"sha1:LIYYFOWUUNOKMXNP5JNA6CCI52IRWUHB\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107890028.58_warc_CC-MAIN-20201025212948-20201026002948-00189.warc.gz\"}"}
http://resultados-quiniela.info/5-nbt-7-worksheets/fresh-5-nbt-7-worksheets-for-math-worksheets-decimals-grade-inspirational-grade-math-decimals-worksheets-5-b-7-worksheets-75-common-core-5nbt7-worksheets/
[ "Fresh 5 Nbt 7 Worksheets For Math Worksheets Decimals Grade Inspirational Grade Math Decimals Worksheets 5 B 7 Worksheets 75 Common Core 5nbt7 Worksheets", null, "", null, "fresh 5 nbt 7 worksheets for math worksheets decimals grade inspirational grade math decimals worksheets 5 b 7 worksheets 75 common core 5nbt7 worksheets.\n\n5nbt7 multiplying decimals worksheets free collection of education math grade 5 answers 1 common core,5nbt7 free worksheets multiplying decimals multiplication with worksheet new 5 7 answer key,math worksheets decimals grade new best fractions common core 5nbt7 free answer key,5nbt7 worksheets answer key multiplying decimals 5 7 common core,5nbt7 multiplying decimals worksheets free 5 1 answer key,common core 5nbt7 worksheets free multiplying decimals 5 7 1 grade math of,5nbt7 worksheets answer key free common core division the partial quotient word problems with double digit,5nbt7 multiplying decimals worksheets answer key common core 5 7 adding and subtracting word problems of 2,5nbt7 free worksheets 4 common core multiplying decimals,5 7 worksheets adding and subtracting two digit numbers no 5nbt7 answer key free common core." ]
[ null, "http://resultados-quiniela.info/wp-content/uploads/2019/03/fresh-5-nbt-7-worksheets-for-math-worksheets-decimals-grade-inspirational-grade-math-decimals-worksheets-5-b-7-worksheets-75-common-core-5nbt7-worksheets.jpg", null, "http://resultados-quiniela.info/wp-content/uploads/2019/03/fresh-5-nbt-7-worksheets-for-math-worksheets-decimals-grade-inspirational-grade-math-decimals-worksheets-5-b-7-worksheets-75-common-core-5nbt7-worksheets.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.72142905,"math_prob":0.92042875,"size":2163,"snap":"2019-26-2019-30","text_gpt3_token_len":484,"char_repetition_ratio":0.22417787,"word_repetition_ratio":0.17595308,"special_character_ratio":0.2061951,"punctuation_ratio":0.058666665,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9974716,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,2,null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-06-26T10:09:16Z\",\"WARC-Record-ID\":\"<urn:uuid:f9c3b422-6ca4-4aa3-982e-cda1f7aabfb8>\",\"Content-Length\":\"75445\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:84ce1844-b13c-4912-9f31-635193c514fb>\",\"WARC-Concurrent-To\":\"<urn:uuid:4a8f2d0e-d4e1-47fc-8f19-9a7110651e72>\",\"WARC-IP-Address\":\"104.27.153.71\",\"WARC-Target-URI\":\"http://resultados-quiniela.info/5-nbt-7-worksheets/fresh-5-nbt-7-worksheets-for-math-worksheets-decimals-grade-inspirational-grade-math-decimals-worksheets-5-b-7-worksheets-75-common-core-5nbt7-worksheets/\",\"WARC-Payload-Digest\":\"sha1:ZAKE3RBTXVNJ3SDUHAKD7LEHMNGFHI42\",\"WARC-Block-Digest\":\"sha1:3AM3XR5WJZMD2GFVVOK7PABX7FFHXRZY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-26/CC-MAIN-2019-26_segments_1560628000266.39_warc_CC-MAIN-20190626094111-20190626120111-00079.warc.gz\"}"}
https://www.routledge.com/Logic-Design-of-NanoICS/Yanushkevich-Shmerko-Lyshevski/p/book/9780849327667
[ "1st Edition\n\n# Logic Design of NanoICS\n\n488 Pages 251 B/W Illustrations\nby CRC Press\n\n488 Pages 251 B/W Illustrations\nby CRC Press\n\nAlso available as eBook on:\n\nToday's engineers will confront the challenge of a new computing paradigm, relying on micro- and nanoscale devices. Logic Design of NanoICs builds a foundation for logic in nanodimensions and guides you in the design and analysis of nanoICs using CAD. The authors present data structures developed toward applications rather than a purely theoretical treatment.\n\nRequiring only basic logic and circuits background, Logic Design of NanoICs draws connections between traditional approaches to design and modern design in nanodimensions. The book begins with an introduction to the directions and basic methodology of logic design at the nanoscale, then proceeds to nanotechnologies and CAD, graphical representation of switching functions and networks, word-level and linear word-level data structures, 3-D topologies based on hypercubes, multilevel circuit design, and fault-tolerant computation in hypercube-like structures. The authors propose design solutions and techniques, going beyond the underlying technology to provide more applied knowledge.\n\nThis design-oriented reference is written for engineers interested in developing the next generation of integrated circuitry, illustrating the discussion with approximately 250 figures and tables, 100 equations, 250 practical examples, and 100 problems. Each chapter concludes with a summary, references, and a suggested reading section.\n\nPREFACE\nACKNOWLEDGEMENTS\nINTRODUCTION\nProgress From Micro- to Nanoelectronics\nTowards Computer-Aided Design of NanoICs\nMethodology\nExample: Hypercube Structure of Hierarchical FPGA\nSummary\nProblems\nReferences\nNANOTECHNOLOGIES\nNanotechnologies\nNanoelectronic Devices\nDigital Nanoscale Circuits: Gates vs. Arrays\nMolecular Electronics\nScaling and Fabrication\nSummary\nProblems\nReferences\nGraphs\nData Structures for Switching Functions\nSum-of-Products Expressions\nShannon Decision Trees and Diagrams\nReed-Muller Expressions\nDecision Trees and Diagrams\nArithmetic Expressions\nDecision Trees and Diagrams\nSummary\nProblems\nReferences\nWORD-LEVEL DATA STRUCTURES\nWord-level Data Structures\nWord-level Arithmetic Expressions\nWord-level Sum-of-Products Expressions\nWord-level Reed-Muller Expressions\nSummary\nProblems\nReferences\nNANOSPACE AND HYPERCUBE-LIKE DATA STRUCTURES\nSpatial Structures\nHypercube Data Structure\nAssembling of Hypercubes\nN-Hypercube Definition\nDegree of Freedom and Rotation\nCoordinate Description\nN-Hypercube Design for n > 3 Dimensions\nEmbedding a Binary Decision Tree in N-Hypercube\nAssembling\nSpatial Topological Measurements\nSummary\nProblems\nReferences\nNANODIMENSIONAL MULTILEVEL CIRCUITS\nGraph-Based Models in Logic Design of Multilevel Networks\nLibrary of N-Hypercubes for Elementary Logic Functions\nHybrid Design Paradigm: N-Hypercube and DAG\nManipulation of N-Hypercubes\nNumerical Evaluation of 3-D Structures\nSummary\nReferences\nLINEAR WORD-LEVEL MODELS OF MULTILEVEL CIRCUITS\nLinear Expressions\nLinear Arithmetic Expressions\nLinear Arithmetic Expressions of Elementary Functions\nLinear Decision Diagrams\nRepresentation of a Circuit Level by Linear Expression\nLinear Decision Diagrams for Circuit Representation\nTechnique for Manipulating the Coefficients\nLinear Word-level Sum-of-Products Expressions\nLinear Word-level Reed-Muller Expressions\nSummary\nProblems\nReferences\nEVENT-DRIVEN ANALYSIS OF HYPERCUBE-LIKE TOPOLOGY\nFormal Definition of Change in a Binary System\nComputing Boolean Differences\nModels of Logic Networks in Terms of Change\nMatrix Models of Change\nModels of Directed Changes in Algebraic Form\nLocal Computation Via Partial Boolean Difference\nGenerating Reed-Muller Expressions by Logic Taylor Series\nArithmetic Analogs of Boolean Differences and Logic Taylor Expansion\nSummary\nProblems\nReferences\nNANODIMENSIONAL MULTIVALUED CIRCUITS\nIntroduction to Multivalued Logic\nSpectral Technique\nMultivalued Decision Trees and Decision Diagrams\nConcept of Change in Multivalued Circuits\nGeneration of Reed-Muller Expressions\nLinear Word-level Expressions of Multivalued Functions\nLinear Nonarithmetic Word-level Representation of Multivalued Functions\nSummary\nProblems\nReferences\nPARALLEL COMPUTATION IN NANOSPACE\nData Structures and Massive Parallel Computing\nArrays\nLinear Systolic Arrays for Computing Logic Functions\nComputing Reed-Muller Expressions\nComputing Boolean Differences\nComputing Arithmetic Expressions\nComputing Walsh Expressions\nTree-Based Network for Manipulating a Switching Function\nHypercube Arrays\nSummary\nProblems\nReferences\nFAULT-TOLERANT COMPUTATION\nDefinitions\nProbabilistic Behavior of Nanodevices\nNeural Networks\nStochastic Computing\nVon Neumann's Model on Reliable Computation with Unreliable Components\nFaulty Hypercube-Like Computing Structures\nSummary\nReferences\nINFORMATION MEASURES IN NANODIMENSIONS\nInformation-Theoretical Measures in Logic Design\nInformation Measures of Elementary Switching Functions\nInformation-Theoretical Measures in Decision Trees\nInformation Measures in the N-Hypercube\nInformation-Theoretical Measures in Multivalued Functions\nSummary\nProblems" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.6907986,"math_prob":0.56471115,"size":5570,"snap":"2023-40-2023-50","text_gpt3_token_len":1201,"char_repetition_ratio":0.14193317,"word_repetition_ratio":0.038011696,"special_character_ratio":0.1448833,"punctuation_ratio":0.050913837,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9756714,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-11-29T12:02:30Z\",\"WARC-Record-ID\":\"<urn:uuid:81f43c5c-c941-43f5-96c4-1fd829b0bd0d>\",\"Content-Length\":\"110126\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5369f580-1761-4002-b8da-7599af0438ac>\",\"WARC-Concurrent-To\":\"<urn:uuid:17a43166-7f39-407a-bfd4-1f190fadaaf1>\",\"WARC-IP-Address\":\"104.17.28.49\",\"WARC-Target-URI\":\"https://www.routledge.com/Logic-Design-of-NanoICS/Yanushkevich-Shmerko-Lyshevski/p/book/9780849327667\",\"WARC-Payload-Digest\":\"sha1:7RW6R2ONKJKDE25JTQWRL7CEGBJPZVIY\",\"WARC-Block-Digest\":\"sha1:UMNCNDXGFDNGRSENHDRDO4LXOUD6KUW5\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100081.47_warc_CC-MAIN-20231129105306-20231129135306-00453.warc.gz\"}"}
https://stats.stackexchange.com/questions/518519/intuitive-understanding-of-hypothesis-testing-with-z-scores
[ "# Intuitive understanding of hypothesis testing with Z-scores\n\nI wanted to dig a bit deeper into hypothesis testing and fresh up my conceptual understanding from undergraduate courses. The typical way of how hypothesis testing is teached is to calculate the Z-score and then compare the associated P-value with a pre-determined cut-off level of alpha.", null, "Let's create a hypothetical example. I've found a new drug for which I claim it raises the level of blood value X. We know that the average blood level of X in the control group is X = 10 with a standard deviation of 1.\n\nI've ingest the drug to my friend now and measure his blood level afterwards. E voila, his blood level is 12. Given the formula above, I would arrive at a Z-Score of 2 which is far below the normally used cut-off level of 0.05\n\nComing to my question\n\nHow can I conclude validity from this result? E.g it could have been that I have given the drug to a group of 100 people and observed that the average result was the same as in the control group. Similarly, I could have found my friend in the group of 100 people with his extreme value of 12. I could repeat the hypothesis test only with im and arrive at a statistically meaningful result. Ta Da!\n\nCould someone verify if my understanding is flawed here? Thank you very much!\n\nI think your understanding is basically sound here. If you conduct the study as you describe, with only one patient taking the drug, and measure $$x = 12$$, that would constitute a significant result, so the conclusion would be that the drug does work.\nWhile this is formally correct, I suppose most of us would be suspicious about this result, in particular in view of the extremely small sample size. And indeed, the conclusion may still be wrong, not only because of the obvious fact that $$\\alpha = 0.05$$ is still more than zero, but also because the entire statistical argument here rests on some very strong assumptions, e.g.\n1. The blood level measurements are normally distributed under the null hypothesis (with mean $$\\mu$$ and standard deviation $$\\sigma$$).\n3. You know the exact value of $$\\mu$$.\n4. You know the exact value of $$\\sigma$$.\nEspecially assumptions 3 and 4 are so unrealistic that they are usually not made in practice. So you usually have to estimate $$\\mu$$ and $$\\sigma$$ too, and the simple Z-test is no longer applicable.\nRegarding your penultimate paragraph, if you have done a study with 100 people, then you should of course include all of them in the calculations (except for certain pre-specified exclusion criteria). Basing the test on only one (or several) person(s) with high $$x$$ would be statistical malpractice (\"cherry-picking\"), because assumption 2 would no longer hold." ]
[ null, "https://i.stack.imgur.com/EIY2f.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9667576,"math_prob":0.93754715,"size":1232,"snap":"2021-21-2021-25","text_gpt3_token_len":271,"char_repetition_ratio":0.10830619,"word_repetition_ratio":0.0,"special_character_ratio":0.2215909,"punctuation_ratio":0.07480315,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99181604,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-05-12T05:54:01Z\",\"WARC-Record-ID\":\"<urn:uuid:29394a8f-eb8d-47e2-997e-c124e2ccdf29>\",\"Content-Length\":\"161761\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2e1bbb87-ae61-4b24-90eb-b5e3d07c5e6c>\",\"WARC-Concurrent-To\":\"<urn:uuid:fd1f3104-5696-4f25-80a6-602cf6226767>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/518519/intuitive-understanding-of-hypothesis-testing-with-z-scores\",\"WARC-Payload-Digest\":\"sha1:CYLXEODX37F736XR77UTZPYAGEJ6T5SI\",\"WARC-Block-Digest\":\"sha1:AGAXT4GKLW4LTU7CKNLCKXF6XYCKLER3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-21/CC-MAIN-2021-21_segments_1620243991252.15_warc_CC-MAIN-20210512035557-20210512065557-00280.warc.gz\"}"}
https://math.stackexchange.com/questions/412944/sqrt-2-is-even/412971
[ "$\\sqrt 2$ is even?\n\nIs it mathematically acceptable to use Prove if $n^2$ is even, then $n$ is even. to conclude since 2 is even then $\\sqrt 2$ is even? Further more using that result to also conclude that $\\sqrt [n]{2}$ is even for all n?\n\nSimilar argument for odd numbers should give $\\sqrt[n]{k}$ is even or odd when k is even odd.\n\nMy question is does any of above has been considered under a more formal subject or it is a correct/nonsensical observation ?\n\n• I interpret this question as stating \"Could I extend the notion of even number to $\\sqrt 2$ and moreover any real number $x$ such that $x^2\\in\\mathbb Z$ and $2\\mid x^2$?\" Could you confirm whether this interpretation is correct? I have not found any contradictions in defining this rather useless extension. – Karl Kronenfeld Jun 6 '13 at 12:29\n• @Arjang: It would seem more natural that you edit your own question yourself. – Marc van Leeuwen Jun 6 '13 at 13:57\n• I vote against closing this question. – MJD Jun 6 '13 at 15:02\n• If you define even as not an odd integer then $\\sqrt{\\text{bicycle} + \\text{fish}}$ is also even. – Kaz Jun 7 '13 at 4:48\n• @Kaz : I just realised that is the problem with defining things as not something! With the same definition $\\sqrt {bicycle+fish}$ is also odd because it is NOT even, hence when something is both even and odd it does not fit with the idea of mutually exclusive equivalence classes. – Arjang Jun 9 '13 at 10:25\n\nYes, essentially analogous arguments work to extend the notion of parity from the ring of integers to many rings of algebraic integers such as $\\,\\Bbb Z[\\sqrt[n]{k}].\\$\n\nThe key ideas are: one can apply parity arguments in any ring that has $\\ \\mathbb Z/2\\$ as an image, e.g. the ring of all rationals with odd denominator, or the Gaussian integers $\\rm\\:\\mathbb Z[{\\it i}\\,],\\:$ where the image $\\rm\\ \\mathbb Z[{\\it i}\\,]/(2,{\\it i}-\\!1) \\cong \\mathbb Z/2\\$ yields the natural parity definition that $\\rm\\ a\\!+\\!b\\,{\\it i}\\$ is even iff $\\rm\\ a\\equiv b\\ \\ (mod\\ 2),\\$ i.e. if $\\rm\\ a+b\\,{\\it i}\\$ maps to $\\:0\\:$ via the above isomorphism, which maps $\\rm\\ 2\\to 0,\\ i\\to 1\\:$.\n\nGenerally, it is easy to show that if $\\rm\\:2\\nmid f(x)\\in \\Bbb Z[x]\\setminus \\Bbb Z\\:$ then the number of ways to define parity in the ring $\\rm\\ \\mathbb Z[w] \\cong \\mathbb Z[x]/(f(x))\\$ is given by the number of roots of $\\rm\\: f(x)\\:$ modulo $2\\:.\\$ For suppose there exists a homomorphism $\\rm\\ h\\, :\\, \\mathbb Z[w]\\to \\mathbb Z/2.\\:$ Then $\\rm\\:w\\:$ must map to a root of $\\rm\\:f(x)\\:$ in $\\rm\\ \\mathbb Z/2.\\$ Thus if $\\rm\\ f(0)\\equiv 0\\ (mod\\ 2)\\$ then $\\rm\\: \\mathbb Z[w]/(2,w) \\cong \\mathbb Z[x]/(2,x,f(x)) \\cong \\mathbb Z/2\\$ by $\\rm\\: x\\mid f(x)\\ (mod\\ 2),\\,$ and $\\rm\\, \\!f(1)\\equiv 0\\ (mod\\ 2)$ $\\Rightarrow$ $\\rm \\mathbb Z[w]/(2,w\\!-\\!1) \\cong \\mathbb Z[x]/(2,x\\!-\\!1,f(x)) \\cong \\mathbb Z/2\\,$ by $\\rm\\, x\\!-\\!1\\,|\\, f(x)\\ (mod\\ 2).$\n\nLet's consider some simple examples. Since $\\rm\\ x^2\\!+1\\$ has the unique root $\\rm\\ x\\equiv 1\\ (mod\\ 2),\\:$ the Gaussian integers $\\rm\\ \\mathbb Z[{\\it i}\\,]\\cong \\mathbb Z[x]/(x^2\\!+1)\\$ have a unique definition of parity, with $\\:i\\:$ being odd. Since $\\rm\\ x^2\\!+x+1\\$ has no roots modulo $\\: 2,\\:$ there is no way to define parity for the Eisenstein integers $\\rm\\ \\mathbb Z[w] \\cong \\mathbb Z[x]/(x^2\\!+x+1).\\,$ Indeed since $\\rm\\ w^3 = 1\\$ we infer that $\\rm\\: w \\equiv 1\\ (mod\\ 2)\\$ contra $\\rm\\ w^2\\!+w+1 = 0.\\$ On the other hand $\\rm\\ \\mathbb Z[w] \\cong \\mathbb Z[x]/(x^2\\!+x+2)\\$ has two parity structures since both $\\:0\\:$ and $\\rm\\:1\\:$ are roots of $\\rm\\ x^2\\! + x + 2\\$ modul0 $\\rm\\:2,\\:$ so we can define $\\rm\\:w\\:$ to be either even or odd.\n\nNote that that theorem begins with \"Suppose $n$ is an integer, and that $n^2$ is even.\" So it does not hold when considering $\\sqrt{2}$\n\n• Please consider the comment of user1. – Arjang Jun 6 '13 at 12:45\n• @Arjang -- That comment may explain your intent. What it does not explain is how you could prove $even(n^2) \\implies even(n)$ without the stipulation that n is an integer. If you can only prove this for the case where n is an integer, then, yes, you can extend the definition of even, but, no, the usual definition of even does not apply to $\\sqrt 2$. When you extend the definition, you are changing the language and anything which comprises the extended definition becomes an axiom of your new system, whether useful or not. – Heath Hunnicutt Jun 6 '13 at 18:08\n• ...what Arjang said. – Lucas Jun 6 '13 at 23:16\n• I haven't commented yet since Heath pretty much summed it up. Yes, there are various branches of mathematics in which similar theorems hold and $x^2$ is $P$ implies $x$ is $P$ (the algebraic integers for example) but in my opinion, this is far removed from the ideas of even and odd, which have very specific definitions based on the divides property. The OP asked if $\\sqrt{2}$ was even and if you could show it using the stated theorem, to which the answer is a flat out no for the reason stated. Yes, there is plenty of interesting mathematics out there to consider, but I find that unrelated. – john Jun 8 '13 at 2:33\n\nIs it mathematically acceptable to use “Prove if $n^2$ is even, then $n$ is even.” to conclude since 2 is even then $\\sqrt 2$ is even?\n\nthe answer is a quite interesting “no, but also yes”.\n\nFormally, the answer is definitely no: as @john explained, you can’t use that theorem to conclude what you suggest, since the theorem and proof start by assuming that n is an integer, so $\\sqrt{2}$ is not a valid value for $n$.\n\nHowever, it is excellent and very acceptable mathematical practice to do what you did, and take that theorem as inspiration for considering a new generalisation of the concepts involved. And, as @KeyIdeas describes, this can lead to some very nice theories.\n\nTL;DR: you can’t conclude this from that theorem/proof, but you can certainly be inspired along these lines by them.\n\nThe question you linked to starts (quite naturally) with \"Suppose $n$ is an integer\", which clearly excludes taking $n=\\sqrt 2$. Therefore it cannot be used to conclude that $\\sqrt2$ is even. Obviously $\\sqrt2$ being even is absurd since even numbers in particular have to be integers. I would say your \"observation\" is sloppy (overlooking the stated conditions) and your following reasoning unfounded (or nonsensical if you prefer).\n\n• Please consider the comment of user1. – Arjang Jun 6 '13 at 12:46\n• ...what Arjang said. – Lucas Jun 6 '13 at 23:15" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.5436063,"math_prob":0.9991747,"size":2212,"snap":"2019-26-2019-30","text_gpt3_token_len":872,"char_repetition_ratio":0.19112319,"word_repetition_ratio":0.008086253,"special_character_ratio":0.43444845,"punctuation_ratio":0.18621974,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9996693,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-06-20T23:18:43Z\",\"WARC-Record-ID\":\"<urn:uuid:f2bbfe7d-1640-4e3b-b4c8-7fb30adef274>\",\"Content-Length\":\"173472\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:224ff946-5630-42d0-8840-84e64e2ba743>\",\"WARC-Concurrent-To\":\"<urn:uuid:281174b0-c8d9-43b7-ac55-83ec37548b53>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/412944/sqrt-2-is-even/412971\",\"WARC-Payload-Digest\":\"sha1:WA6CNEUFRGPZ55NFOSW3IWJJJEYQCUFM\",\"WARC-Block-Digest\":\"sha1:HSVJTORHALWJTJXGADDRC7IC6TQ2AXR3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-26/CC-MAIN-2019-26_segments_1560627999291.1_warc_CC-MAIN-20190620230326-20190621012326-00230.warc.gz\"}"}
https://easystats.github.io/parameters/reference/reduce_parameters.html
[ "This function performs a reduction in the parameter space (the number of variables). It starts by creating a new set of variables, based on the given method (the default method is \"PCA\", but other are available via the method argument, such as \"cMDS\", \"DRR\" or \"ICA\"). Then, it names this new dimensions using the original variables that correlates the most with it. For instance, a variable named 'V1_0.97/V4_-0.88' means that the V1 and the V4 variables correlate maximally (with respective coefficients of .97 and -.88) with this dimension. Although this function can be useful in exploratory data analysis, it's best to perform the dimension reduction step in a separate and dedicated stage, as this is a very important process in the data analysis workflow. reduce_data() is an alias for reduce_parameters.data.frame().\n\n## Usage\n\nreduce_parameters(x, method = \"PCA\", n = \"max\", distance = \"euclidean\", ...)\n\nreduce_data(x, method = \"PCA\", n = \"max\", distance = \"euclidean\", ...)\n\n## Arguments\n\nx\n\nA data frame or a statistical model.\n\nmethod\n\nThe feature reduction method. Can be one of \"PCA\", \"cMDS\", \"DRR\", \"ICA\" (see the 'Details' section).\n\nn\n\nNumber of components to extract. If n=\"all\", then n is set as the number of variables minus 1 (ncol(x)-1). If n=\"auto\" (default) or n=NULL, the number of components is selected through n_factors() resp. n_components(). In reduce_parameters(), can also be \"max\", in which case it will select all the components that are maximally pseudo-loaded (i.e., correlated) by at least one variable.\n\ndistance\n\nThe distance measure to be used. Only applies when method = \"cMDS\". This must be one of \"euclidean\", \"maximum\", \"manhattan\", \"canberra\", \"binary\" or \"minkowski\". Any unambiguous substring can be given.\n\n...\n\nArguments passed to or from other methods.\n\n## Details\n\nThe different methods available are described below:\n\n### Supervised Methods\n\n• PCA: See principal_components().\n\n• cMDS / PCoA: Classical Multidimensional Scaling (cMDS) takes a set of dissimilarities (i.e., a distance matrix) and returns a set of points such that the distances between the points are approximately equal to the dissimilarities.\n\n• DRR: Dimensionality Reduction via Regression (DRR) is a very recent technique extending PCA (Laparra et al., 2015). Starting from a rotated PCA, it predicts redundant information from the remaining components using non-linear regression. Some of the most notable advantages of performing DRR are avoidance of multicollinearity between predictors and overfitting mitigation. DRR tends to perform well when the first principal component is enough to explain most of the variation in the predictors. Requires the DRR package to be installed.\n\n• ICA: Performs an Independent Component Analysis using the FastICA algorithm. Contrary to PCA, which attempts to find uncorrelated sources (through least squares minimization), ICA attempts to find independent sources, i.e., the source space that maximizes the \"non-gaussianity\" of all sources. Contrary to PCA, ICA does not rank each source, which makes it a poor tool for dimensionality reduction. Requires the fastICA package to be installed." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.72028506,"math_prob":0.9430821,"size":4854,"snap":"2022-27-2022-33","text_gpt3_token_len":1421,"char_repetition_ratio":0.10721649,"word_repetition_ratio":0.04017857,"special_character_ratio":0.31231973,"punctuation_ratio":0.22079314,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98113054,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-07-07T10:19:24Z\",\"WARC-Record-ID\":\"<urn:uuid:b67814bf-443b-4f75-94a3-942275973e14>\",\"Content-Length\":\"24030\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4038fc83-3b69-4aa0-b121-089c57145770>\",\"WARC-Concurrent-To\":\"<urn:uuid:9ff8a9c3-5938-4bc3-993b-10d10ea259ab>\",\"WARC-IP-Address\":\"185.199.109.153\",\"WARC-Target-URI\":\"https://easystats.github.io/parameters/reference/reduce_parameters.html\",\"WARC-Payload-Digest\":\"sha1:LKUUPRXH7TVFCH3VOMA54X244JB7WLIX\",\"WARC-Block-Digest\":\"sha1:KCLVPFY5YVXUMEGF6X5B3WQFSTIUFAOX\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656104690785.95_warc_CC-MAIN-20220707093848-20220707123848-00256.warc.gz\"}"}
https://www.reference.com/math/x-vs-y-48b3243b8f2bf6a5
[ "What Is \"x Vs Y\"?", null, "Credit: Ryan McVay/Photodisc/Getty Images\n\nIn math, the term \"x vs. y\" typically refers to a two-dimensional coordinate plane containing both x and y axes. The x-axis is represented by the horizontal line moving left and right, while the y-axis is represented by the vertical line moving from top to bottom. The x and y coordinates belong to a process known as the Cartesian coordinate system.\n\nWhen the points on a graph are expressed through the Cartesian coordinate system, they are written in the form (x, y), where x represents the location of the point in terms of the x-axis and y represents the location of the point along the y-axis. Different shapes can also be plotted on an xy-coordinate plane using formulas. For example, a circle is plotted using the formula (x ? a)^2 + (y ? b)^2 = r^2, where (a, b) is the x and y coordinates for the center of the circle and r is the radius. Another commonly used formula is the equation to find the distance between two points, represented as the square root of the difference between the x-coordinates squared minus the difference between the y-coordinates squared. When a coordinate plane is used for three-dimensional mathematics, the plane includes a z-axis in addition the x and y axes, with a single point represented in the form (x, y, z).\n\nSimilar Articles" ]
[ null, "https://images.reference.com/amg-cms-reference-images/prod/x-vs-y_48b3243b8f2bf6a5.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9301671,"math_prob":0.99148595,"size":1253,"snap":"2019-43-2019-47","text_gpt3_token_len":269,"char_repetition_ratio":0.1601281,"word_repetition_ratio":0.01843318,"special_character_ratio":0.21867518,"punctuation_ratio":0.09448819,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99963975,"pos_list":[0,1,2],"im_url_duplicate_count":[null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-14T11:44:01Z\",\"WARC-Record-ID\":\"<urn:uuid:7ae640a5-342a-406f-b18e-7e76f0ef21d5>\",\"Content-Length\":\"172483\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:eb706628-18a7-47e6-b4b9-5f7d844b6fc6>\",\"WARC-Concurrent-To\":\"<urn:uuid:d36ab0e4-d002-4620-b9ed-505dfe98d36d>\",\"WARC-IP-Address\":\"151.101.202.114\",\"WARC-Target-URI\":\"https://www.reference.com/math/x-vs-y-48b3243b8f2bf6a5\",\"WARC-Payload-Digest\":\"sha1:IDSII4EXPJJIOEYQ2AHGNANZWJFMG5XE\",\"WARC-Block-Digest\":\"sha1:QOBZJIUOWLU7MF2JOZRWOC73GRWYTKH2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570986653216.3_warc_CC-MAIN-20191014101303-20191014124303-00376.warc.gz\"}"}
https://en.wikipedia.org/wiki/Ammeter
[ "# Ammeter", null, "Demonstration model of a moving iron ammeter. As the current through the coil increases, the plunger is drawn further into the coil and the pointer deflects to the right.\n\nAn ammeter /ˈamɪtə/ (abbreviation of Ampere meter) is a measuring instrument used to measure the current in a circuit. Electric currents are measured in Amperes (A), hence the name. The ammeter is usually connected in series with the circuit in which the current is to be measured. An ammeter usually has low resistance so that it does not cause a significant voltage drop in the circuit being measured.\n\nInstruments used to measure smaller currents, in the milliampere or microampere range, are designated as milliammeters or microammeters. Early ammeters were laboratory instruments that relied on the Earth's magnetic field for operation. By the late 19th century, improved instruments were designed which could be mounted in any position and allowed accurate measurements in electric power systems. It is generally represented by letter 'A' in a circuit.\n\n## History\n\nThe relation between electric current, magnetic fields and physical forces was first noted by Hans Christian Ørsted in 1820, who observed a compass needle was deflected from pointing North when a current flowed in an adjacent wire. The tangent galvanometer was used to measure currents using this effect, where the restoring force returning the pointer to the zero position was provided by the Earth's magnetic field. This made these instruments usable only when aligned with the Earth's field. Sensitivity of the instrument was increased by using additional turns of wire to multiply the effect – the instruments were called \"multipliers\".\n\nThe word rheoscope as a detector of electrical currents was coined by Sir Charles Wheatstone about 1840 but is no longer used to describe electrical instruments. The word makeup is similar to that of rheostat (also coined by Wheatstone) which was a device used to adjust the current in a circuit. Rheostat is a historical term for a variable resistance, though unlike rheoscope may still be encountered.\n\n## Types\n\nSome instruments are panel meters, meant to be mounted on some sort of control panel. Of these, the flat, horizontal or vertical type is often called an edgwise meter.\n\n### Moving-coil", null, "Wire carrying current to be measured.\nSpring providing restoring force\nThis illustration is conceptual; in a practical meter, the iron core is stationary, and front and rear spiral springs carry current to the coil, which is supported on a rectangular bobbin. Furthermore, the poles of the permanent magnet are arcs of a circle.\n\nThe D'Arsonval galvanometer is a moving coil ammeter. It uses magnetic deflection, where current passing through a coil placed in the magnetic field of a permanent magnet causes the coil to move. The modern form of this instrument was developed by Edward Weston, and uses two spiral springs to provide the restoring force. The uniform air gap between the iron core and the permanent magnet poles make the deflection of the meter linearly proportional to current. These meters have linear scales. Basic meter movements can have full-scale deflection for currents from about 25 microamperes to 10 milliamperes.\n\nBecause the magnetic field is polarised, the meter needle acts in opposite directions for each direction of current. A DC ammeter is thus sensitive to which polarity it is connected in; most are marked with a positive terminal, but some have centre-zero mechanisms[note 1] and can display currents in either direction. A moving coil meter indicates the average (mean) of a varying current through it,[note 2] which is zero for AC. For this reason, moving-coil meters are only usable directly for DC, not AC.\n\nThis type of meter movement is extremely common for both ammeters and other meters derived from them, such as voltmeters and ohmmeters.\n\n### Moving magnet\n\nMoving magnet ammeters operate on essentially the same principle as moving coil, except that the coil is mounted in the meter case, and a permanent magnet moves the needle. Moving magnet Ammeters are able to carry larger currents than moving coil instruments, often several tens of Amperes, because the coil can be made of thicker wire and the current does not have to be carried by the hairsprings. Indeed, some Ammeters of this type do not have hairsprings at all, instead using a fixed permanent magnet to provide the restoring force.\n\n### Electrodynamic\n\nAn electrodynamic ammeter uses an electromagnet instead of the permanent magnet of the d'Arsonval movement. This instrument can respond to both alternating and direct current and also indicates true RMS for AC. See Wattmeter for an alternative use for this instrument.\n\n### Moving-iron", null, "Face of an older moving iron ammeter with its characteristic non-linear scale. The moving iron ammeter symbol is in the lower-left corner of the meter face.\n\nMoving iron ammeters use a piece of iron which moves when acted upon by the electromagnetic force of a fixed coil of wire. The moving-iron meter was invented by Austrian engineer Friedrich Drexler in 1884. This type of meter responds to both direct and alternating currents (as opposed to the moving-coil ammeter, which works on direct current only). The iron element consists of a moving vane attached to a pointer, and a fixed vane, surrounded by a coil. As alternating or direct current flows through the coil and induces a magnetic field in both vanes, the vanes repel each other and the moving vane deflects against the restoring force provided by fine helical springs. The deflection of a moving iron meter is proportional to the square of the current. Consequently, such meters would normally have a nonlinear scale, but the iron parts are usually modified in shape to make the scale fairly linear over most of its range. Moving iron instruments indicate the RMS value of any AC waveform applied. Moving iron ammeters are commonly used to measure current in industrial frequency AC circuits.\n\n### Hot-wire\n\nIn a hot-wire ammeter, a current passes through a wire which expands as it heats. Although these instruments have slow response time and low accuracy, they were sometimes used in measuring radio-frequency current. These also measure true RMS for an applied AC.\n\n### Digital\n\nIn much the same way as the analogue ammeter formed the basis for a wide variety of derived meters, including voltmeters, the basic mechanism for a digital meter is a digital voltmeter mechanism, and other types of meter are built around this.\n\nDigital ammeter designs use a shunt resistor to produce a calibrated voltage proportional to the current flowing. This voltage is then measured by a digital voltmeter, through use of an analog-to-digital converter (ADC); the digital display is calibrated to display the current through the shunt. Such instruments are often calibrated to indicate the RMS value for a sine wave only, but many designs will indicate true RMS within limitations of the wave crest factor.\n\n### Integrating\n\nThere is also a range of devices referred to as integrating ammeters. In these ammeters the current is summed over time, giving as a result the product of current and time; which is proportional to the electrical charge transferred with that current. These can be used for metering energy (the charge needs to be multiplied by the voltage to give energy) or for estimating the charge of a battery or capacitor.\n\n## Picoammeter\n\nA picoammeter, or pico ammeter, measures very low electric current, usually from the picoampere range at the lower end to the milliampere range at the upper end. Picoammeters are used where the current being measured is below the limits of sensitivity of other devices, such as multimeters.\n\nMost picoammeters use a \"virtual short\" technique and have several different measurement ranges that must be switched between to cover multiple decades of measurement. Other modern picoammeters use log compression and a \"current sink\" method that eliminates range switching and associated voltage spikes. Special design and usage considerations must be observed in order to reduce leakage current which may swamp measurements such as special insulators and driven shields. Triaxial cable is often used for probe connections.\n\n## Application\n\nAmmeters must be connected in series with the circuit to be measured. For relatively small currents (up to a few amperes), an ammeter may pass the whole of the circuit current. For larger direct currents, a shunt resistor carries most of the circuit current and a small, accurately-known fraction of the current passes through the meter movement. For alternating current circuits, a current transformer may be used to provide a convenient small current to drive an instrument, such as 1 or 5 amperes, while the primary current to be measured is much larger (up to thousands of amperes). The use of a shutn or current transformer also allows convenient location of the indicating meter without the need to run heavy circuit conductors up to the point of observation. In the case of alternating current, the use of a current transformer also isolates the meter from the high voltage of the primary circuit. A shunt provides no such isolation for a direct-current ammeter, but where high voltages are used it may be possible to place the ammeter in the \"return\" side of the circuit which may be at low potential with respect to earth.\n\n```Ammeters must not be connected directly across a voltage source since their internal resistance is very low and excess current would flow. Ammeters are designed for a low voltage drop across their terminals, much less than one volt; the extra circuit losses produced by the ammeter are called its \"burden\" on the measured circuit(I).\n```\n\nOrdinary Weston-type meter movements can measure only milliamperes at most, because the springs and practical coils can carry only limited currents. To measure larger currents, a resistor called a shunt is placed in parallel with the meter. The resistances of shunts is in the integer to fractional milliohm range. Nearly all of the current flows through the shunt, and only a small fraction flows through the meter. This allows the meter to measure large currents. Traditionally, the meter used with a shunt has a full-scale deflection (FSD) of 50 mV, so shunts are typically designed to produce a voltage drop of 50 mV when carrying their full rated current.\n\nTo make a multi-range ammeter, a selector switch can be used to connect one of a number of shunts across the meter. It must be a make-before-break switch to avoid damaging current surges through the meter movement when switching ranges.\n\nA better arrangement is the Ayrton shunt or universal shunt, invented by William E. Ayrton, which does not require a make-before-break switch. It also avoids any inaccuracy because of contact resistance. In the figure, assuming for example, a movement with a full-scale voltage of 50 mV and desired current ranges of 10 mA, 100 mA, and 1 A, the resistance values would be: R1=4.5 ohms, R2=0.45 ohm, R3=0.05 ohm. And if the movement resistance is 1000 ohms, for example, R1 must be adjusted to 4.525 ohms.\n\nSwitched shunts are rarely used for currents above 10 amperes.\n\nZero-center ammeters are used for applications requiring current to be measured with both polarities, common in scientific and industrial equipment. Zero-center ammeters are also commonly placed in series with a battery. In this application, the charging of the battery deflects the needle to one side of the scale (commonly, the right side) and the discharging of the battery deflects the needle to the other side. A special type of zero-center ammeter for testing high currents in cars and trucks has a pivoted bar magnet that moves the pointer, and a fixed bar magnet to keep the pointer centered with no current. The magnetic field around the wire carrying current to be measured deflects the moving magnet.\n\nSince the ammeter shunt has a very low resistance, mistakenly wiring the ammeter in parallel with a voltage source will cause a short circuit, at best blowing a fuse, possibly damaging the instrument and wiring, and exposing an observer to injury.\n\nIn AC circuits, a current transformer converts the magnetic field around a conductor into a small AC current, typically either 1 A or 5 A at full rated current, that can be easily read by a meter. In a similar way, accurate AC/DC non-contact ammeters have been constructed using Hall effect magnetic field sensors. A portable hand-held clamp-on ammeter is a common tool for maintenance of industrial and commercial electrical equipment, which is temporarily clipped over a wire to measure current. Some recent types have a parallel pair of magnetically soft probes that are placed on either side of the conductor." ]
[ null, "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/Amperemeter_hg.jpg/220px-Amperemeter_hg.jpg", null, "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Galvanometer_diagram.svg/250px-Galvanometer_diagram.svg.png", null, "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Moving_iron_ammeter.jpg/220px-Moving_iron_ammeter.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9170819,"math_prob":0.91253155,"size":13599,"snap":"2021-43-2021-49","text_gpt3_token_len":2993,"char_repetition_ratio":0.14586245,"word_repetition_ratio":0.0064665126,"special_character_ratio":0.2044268,"punctuation_ratio":0.092419945,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9532228,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,null,null,8,null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-12-01T02:47:28Z\",\"WARC-Record-ID\":\"<urn:uuid:c88e338c-cd7c-4ed3-b66c-660cd4085234>\",\"Content-Length\":\"99905\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1c862ce7-ef30-49d1-8f10-c2726ae47f69>\",\"WARC-Concurrent-To\":\"<urn:uuid:9635c1dd-bdc2-4681-b9d4-1ac47e51341d>\",\"WARC-IP-Address\":\"208.80.154.224\",\"WARC-Target-URI\":\"https://en.wikipedia.org/wiki/Ammeter\",\"WARC-Payload-Digest\":\"sha1:EWXW4XMQUXWDOWMHLU2GQLSVFJ3BUOYA\",\"WARC-Block-Digest\":\"sha1:UUQ6RJSFNEOVYFH6BOND7GADTE4YTUM4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964359082.78_warc_CC-MAIN-20211201022332-20211201052332-00533.warc.gz\"}"}
https://robotics.stackexchange.com/questions/6639/how-to-plot-pm-3-sigma-of-a-landmark-in-ekf-slam
[ "# how to plot $\\pm 3 \\sigma$ of a landmark in EKF-SLAM\n\nI have implemented 2D-SLAM using EKF. The map is based-feature in which there is only one landmark for the sake of simplicity. I've read some papers regarding this matter. They plot the $\\pm3\\sigma$ plus the error. I would like to make sure that I'm doing the right thing. In my project, I have the estimate of the landmark's position and its true values. The true values here are the ones that the sensor measure not the ideal case. For example, the ideal case of the landmark position is (30,60) but this value is not accessible by any means, therefore I will consider the true values the ones that are coming from the sensor.\n\nNow the error in the landmark's position in x-axis is formulated as follows\n\n$$\\text{error}_{x} = \\hat{x} - x$$\n\nThe below picture shows the error in blue color. The red color represents the error bounds which is $\\pm 3 \\sigma_{x}$\n\nMy question is now is this the way people plot the errors in the academics papers because I've seen some papers the bounds doesn't not look like mine. Even though mine decreases monotonically however in some papers it is more curved and it seems more reasonable to me. Any suggestions?", null, "What you are referring to is plotting the estimate with the uncertainty bounds - in particular the $3\\sigma$ ($\\pm3$ standard deviations) bounds which corresponds to 99.7% probability that the true state is within this region. The uncertainty bounds can be extracted from the state covariance matrix. I think what you are plotting is the residuals of some observation VS expected observation? In this case I think it is also applicable to use the covariance matrix of the residual observation error.\n\nFor how to extract the standard deviation from the covariance matrix see: https://stats.stackexchange.com/questions/50830/can-i-convert-a-covariance-matrix-into-uncertainties-for-variables\n\n• thanks for the link. This is what I was thinking but from the previous answer he suggested to plot error $\\pm 3\\sigma$ which to me makes no sense. What I did is that the bounds are $\\mu_{x} \\pm 3\\sigma_{x}$ and the result is s8.postimg.org/ilx1i4kqt/untitled.png where the black is the measurements and the green is the estimate $\\mu_{x}$ Feb 24, 2015 at 20:54\n\nUnless I misunderstood what you're trying to show on this plot, you want to essentially plot your estimate (or, in this case, the estimation error) with its 3 standard deviation bounds.\n\nWhat you have shown appears to be the bounds computed simply as 0 +/- 3sigma, but what you really want to plot is error +/- 3*sigma. That is to say, the uncertainty of the estimate is centered around the estimate, not zero. I found a random image showing how I would plot the estimate and its uncertainty bounds:\n\nhttp://2.bp.blogspot.com/_7YSZm5NIAmQ/S_wNkdp6ClI/AAAAAAAAAOU/hEYy4fWR9Rg/s1600/rw_plot.jpg\n\nHope this makes sense.\n\n• In the following picture is what you are suggesting. s30.postimg.org/6e6kjpgnl/untitled.png I've tried this approach and as you see from the picture, it is not as nicely as the one you posted. This is my problem. Should I have increase the noise? It seems the sigma is way smaller than the error, this is why the error is taking the picture. Feb 24, 2015 at 0:48" ]
[ null, "https://i.stack.imgur.com/heEm9.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9510357,"math_prob":0.92067814,"size":1146,"snap":"2023-40-2023-50","text_gpt3_token_len":262,"char_repetition_ratio":0.11908932,"word_repetition_ratio":0.0,"special_character_ratio":0.22949389,"punctuation_ratio":0.07079646,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98989266,"pos_list":[0,1,2],"im_url_duplicate_count":[null,8,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-11-28T20:40:19Z\",\"WARC-Record-ID\":\"<urn:uuid:2e52d8a9-df2c-42c3-88ec-c3dc47aed356>\",\"Content-Length\":\"175354\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0a9a06b5-066e-40f4-ad5e-0cc3f509df50>\",\"WARC-Concurrent-To\":\"<urn:uuid:50815277-0d96-4c87-90e8-3dcb4e8b005c>\",\"WARC-IP-Address\":\"104.18.43.226\",\"WARC-Target-URI\":\"https://robotics.stackexchange.com/questions/6639/how-to-plot-pm-3-sigma-of-a-landmark-in-ekf-slam\",\"WARC-Payload-Digest\":\"sha1:EBEPY5GDSX5N6CJGTQNEUNC7WOP3SOEP\",\"WARC-Block-Digest\":\"sha1:D5FDWDHLKO5H5UJYEOLA7WVZQNV4YQQH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679099942.90_warc_CC-MAIN-20231128183116-20231128213116-00391.warc.gz\"}"}
https://kr.mathworks.com/matlabcentral/cody/problems/2015-length-of-the-hypotenuse/solutions/1170056
[ "Cody\n\n# Problem 2015. Length of the hypotenuse\n\nSolution 1170056\n\nSubmitted on 24 Apr 2017 by Syanki Kumar Burnwal\nThis solution is locked. To view this solution, you need to provide a solution of the same size or smaller.\n\n### Test Suite\n\nTest Status Code Input and Output\n1   Pass\na = 1; b = 2; c_correct = sqrt(5); tolerance = 1e-12 ; assert(abs(hypotenuse(a,b)-c_correct)<tolerance);\n\nc = 2.2361\n\n2   Pass\na = 3; b = 4; c_correct = 5; tolerance = 1e-12 ; assert(abs(hypotenuse(a,b)-c_correct)<tolerance);\n\nc = 5\n\n3   Pass\na = 5; b = 12; c_correct = 13; tolerance = 1e-12 ; assert(abs(hypotenuse(a,b)-c_correct)<tolerance);\n\nc = 13" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.5230274,"math_prob":0.99115676,"size":606,"snap":"2019-51-2020-05","text_gpt3_token_len":224,"char_repetition_ratio":0.15946844,"word_repetition_ratio":0.089108914,"special_character_ratio":0.39768976,"punctuation_ratio":0.152,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9946818,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-23T20:57:02Z\",\"WARC-Record-ID\":\"<urn:uuid:35ba01d6-f422-43be-bfbd-0496442c9107>\",\"Content-Length\":\"73242\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d9009308-1d2c-4533-a2b7-7cce596038ab>\",\"WARC-Concurrent-To\":\"<urn:uuid:586f6d4c-a59b-42fc-8653-08e8e7d5e457>\",\"WARC-IP-Address\":\"104.110.193.39\",\"WARC-Target-URI\":\"https://kr.mathworks.com/matlabcentral/cody/problems/2015-length-of-the-hypotenuse/solutions/1170056\",\"WARC-Payload-Digest\":\"sha1:DAFYMAJI6QRGSCBWCVFM73Q4AR7FQXHE\",\"WARC-Block-Digest\":\"sha1:LTLXIV42UMJYAPGNWSERKKAH6POKPA7H\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250613416.54_warc_CC-MAIN-20200123191130-20200123220130-00023.warc.gz\"}"}
https://wikisree.com/2012/06/16/const-keyword-and-pointers-in-c-cpp-language/
[ "# ‘const’ keyword and pointers in C++ (CPP) language\n\nMany a times one of the challenges a beginner faces is with the use of const keyword. It comes handy when one understands the exact use of it. Const keyword changes its meaning depending on where it is being used. Below I give all possible use of the keyword.\n\nNormal integer variable:\nint intValue                                                                            // integer variable\nAs function parameter:\nVoid testFunc(int intValue) {\n// modification of intValue is possible\nintValue = 10;\n}\nHere the value passed to testFunc() is copied to a separate memory area, which can be accessed through intValue\n\nPointer to integer variable:\nint *ptrToInt                                                              // pointer to integer variable\nAs function parameter:\nvoid testFunc(int *ptrToInt) {\nint a = 10;\ncout << ptrToInt << endl;               //prints the memory address of passed variable\ncout << *ptrToInt << endl;\n\nptrToInt = &a;                                               //assigning address of variable ‘a’ to ptrToInt ie. Modification of ptrToInt is possible\n\ncout << ptrToInt << endl;               //prints the memory address of variable a\ncout << *ptrToInt << endl;  //prints the value of a ie. 10\n}\n\nConstant integer value:\nint const constInt                                                      // constant variable, cant be modified\nconst int constInt                                                      // also\nAs function parameter:\nvoid testFunc(int const constInt) {\n//constInt can’t be changed here\n}\n\nPointer to constant integer:\nint const *ptrToConstInt                                          // pointer to a constant integer variable\nconst int *ptrToConstInt                                          // also\nAs function parameter:\nvoid testFunc(const int *ptrToConstInt) {\nconst int a = 10;\nptrToConstInt = &a;\ncout << ptrToConstInt << endl;               // prints the memory address of variable a\ncout << *ptrToConstInt << endl;            // prints the value of a ie. 10\n}\n\nConstant pointer to an integer:\nint *const constPtrToInt                                           // constant pointer to integer variable\nAs function parameter:\nvoid testFunc(int *const constPtrToInt) {\n//constPtrToInt cant be changed but the value it points to, can be altered\n*constPtrToInt += 10;                 //since it points to, is a normal integer value\n}\n\nConstant pointer to constant integer:\nint const * const constPtrToConstInt          // constant pointer to constant integer value\nAs function parameter:\nvoid testFunc(int const *const constPtrToConstInt) {\n//here the value of constPtrToConstInt as well as the value it points to, both is immutable\n}\n\nMORE USE OF ‘const’ KEYWORD:\n\nConstant pointer to a constant pointer to an integer:\nint * const * const const_ptr_to_const_ptr_to_int\n\nConstant pointer to a pointer to a pointer:\nint ** const const_ptr_to_ptr_to_int\n\nPointer to a constant pointer to an integer:\nint * const * ptr_to_const_ptr_to_int\n\nPointer to a pointer to an integer:\nint ** ptr_to_ptr_to_int\n\nTip: “int const” and “const int” are same. So if the line contains any of these two, understand that the final part is “integer constant” take the rest of the line and read backwards,\n*                     ==means==>         ‘pointer to’\n* const            ==means==>         ‘constant pointer to’\nMultiple ‘*’        ==means==>         that number of ‘pointer to’\n\nHope this post was helpful to you… 🙂", null, "" ]
[ null, "https://0.gravatar.com/avatar/f9a9f4317c89b08d170e9fc833626cfa", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.5591974,"math_prob":0.96418893,"size":2884,"snap":"2019-51-2020-05","text_gpt3_token_len":691,"char_repetition_ratio":0.19965278,"word_repetition_ratio":0.15170941,"special_character_ratio":0.24410541,"punctuation_ratio":0.095338985,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9892638,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-29T20:34:28Z\",\"WARC-Record-ID\":\"<urn:uuid:85491a70-ac7c-4798-a1db-7ec2f2a94b64>\",\"Content-Length\":\"64349\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8be4c7ec-713b-4476-ad33-973ac6422ae2>\",\"WARC-Concurrent-To\":\"<urn:uuid:9102a285-520e-4843-a77d-8f4c0d1bd3bd>\",\"WARC-IP-Address\":\"192.0.78.24\",\"WARC-Target-URI\":\"https://wikisree.com/2012/06/16/const-keyword-and-pointers-in-c-cpp-language/\",\"WARC-Payload-Digest\":\"sha1:4IO5Y5YE4CZW2GDXNO2BBGPT6IJLGUNW\",\"WARC-Block-Digest\":\"sha1:BZFRXHECY3NVJKFPAPE5DWYHA23OHGAE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251802249.87_warc_CC-MAIN-20200129194333-20200129223333-00506.warc.gz\"}"}
https://metanumbers.com/127650
[ "# 127650 (number)\n\n127,650 (one hundred twenty-seven thousand six hundred fifty) is an even six-digits composite number following 127649 and preceding 127651. In scientific notation, it is written as 1.2765 × 105. The sum of its digits is 21. It has a total of 6 prime factors and 48 positive divisors. There are 31,680 positive integers (up to 127650) that are relatively prime to 127650.\n\n## Basic properties\n\n• Is Prime? No\n• Number parity Even\n• Number length 6\n• Sum of Digits 21\n• Digital Root 3\n\n## Name\n\nShort name 127 thousand 650 one hundred twenty-seven thousand six hundred fifty\n\n## Notation\n\nScientific notation 1.2765 × 105 127.65 × 103\n\n## Prime Factorization of 127650\n\nPrime Factorization 2 × 3 × 52 × 23 × 37\n\nComposite number\nDistinct Factors Total Factors Radical ω(n) 5 Total number of distinct prime factors Ω(n) 6 Total number of prime factors rad(n) 25530 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\n\nThe prime factorization of 127,650 is 2 × 3 × 52 × 23 × 37. Since it has a total of 6 prime factors, 127,650 is a composite number.\n\n## Divisors of 127650\n\n48 divisors\n\n Even divisors 24 24 12 12\nTotal Divisors Sum of Divisors Aliquot Sum τ(n) 48 Total number of the positive divisors of n σ(n) 339264 Sum of all the positive divisors of n s(n) 211614 Sum of the proper positive divisors of n A(n) 7068 Returns the sum of divisors (σ(n)) divided by the total number of divisors (τ(n)) G(n) 357.281 Returns the nth root of the product of n divisors H(n) 18.0603 Returns the total number of divisors (τ(n)) divided by the sum of the reciprocal of each divisors\n\nThe number 127,650 can be divided by 48 positive divisors (out of which 24 are even, and 24 are odd). The sum of these divisors (counting 127,650) is 339,264, the average is 7,068.\n\n## Other Arithmetic Functions (n = 127650)\n\n1 φ(n) n\nEuler Totient Carmichael Lambda Prime Pi φ(n) 31680 Total number of positive integers not greater than n that are coprime to n λ(n) 1980 Smallest positive number such that aλ(n) ≡ 1 (mod n) for all a coprime to n π(n) ≈ 11929 Total number of primes less than or equal to n r2(n) 0 The number of ways n can be represented as the sum of 2 squares\n\nThere are 31,680 positive integers (less than 127,650) that are coprime with 127,650. And there are approximately 11,929 prime numbers less than or equal to 127,650.\n\n## Divisibility of 127650\n\n m n mod m 2 3 4 5 6 7 8 9 0 0 2 0 0 5 2 3\n\nThe number 127,650 is divisible by 2, 3, 5 and 6.\n\n• Arithmetic\n• Abundant\n\n• Polite\n• Practical\n\n## Base conversion (127650)\n\nBase System Value\n2 Binary 11111001010100010\n3 Ternary 20111002210\n4 Quaternary 133022202\n5 Quinary 13041100\n6 Senary 2422550\n8 Octal 371242\n10 Decimal 127650\n12 Duodecimal 61a56\n20 Vigesimal fj2a\n36 Base36 2qhu\n\n## Basic calculations (n = 127650)\n\n### Multiplication\n\nn×y\n n×2 255300 382950 510600 638250\n\n### Division\n\nn÷y\n n÷2 63825 42550 31912.5 25530\n\n### Exponentiation\n\nny\n n2 16294522500 2079995797125000 265511463503006250000 33892538316158747812500000\n\n### Nth Root\n\ny√n\n 2√n 357.281 50.3509 18.9019 10.5004\n\n## 127650 as geometric shapes\n\n### Circle\n\n Diameter 255300 802049 5.11908e+10\n\n### Sphere\n\n Volume 8.71267e+15 2.04763e+11 802049\n\n### Square\n\nLength = n\n Perimeter 510600 1.62945e+10 180524\n\n### Cube\n\nLength = n\n Surface area 9.77671e+10 2.08e+15 221096\n\n### Equilateral Triangle\n\nLength = n\n Perimeter 382950 7.05574e+09 110548\n\n### Triangular Pyramid\n\nLength = n\n Surface area 2.82229e+10 2.4513e+14 104226\n\n## Cryptographic Hash Functions\n\nmd5 c79f4ea256526fb50661b2b901f3f20a bfdd49a1e99127884c34f67b1f92394e210f821a 7b2be6c532fee0469b11a7cdba83dc4db1c3c2ea061179c28f925fb443e47f8e 5edc92e4a79b98f095959c02b222e2ec2562a370fee67a5604fc016b41449e2cdc07f92df5fe83fdea32588e471d4316aaeaf0f6070e8d3cd2f497806fa4b672 fe37c46975b775bb808f3bc7b2672e9aa48ed156" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.6246261,"math_prob":0.9879709,"size":4603,"snap":"2021-43-2021-49","text_gpt3_token_len":1631,"char_repetition_ratio":0.12002609,"word_repetition_ratio":0.039473683,"special_character_ratio":0.46035194,"punctuation_ratio":0.077608146,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99565583,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-12-08T16:38:15Z\",\"WARC-Record-ID\":\"<urn:uuid:b4d83277-5961-421a-91fc-ab4a5b070191>\",\"Content-Length\":\"40458\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d1377ec8-71f3-4f7d-bf6d-02c6369853d0>\",\"WARC-Concurrent-To\":\"<urn:uuid:f68cef88-6a4b-4322-8c93-9877913b8348>\",\"WARC-IP-Address\":\"46.105.53.190\",\"WARC-Target-URI\":\"https://metanumbers.com/127650\",\"WARC-Payload-Digest\":\"sha1:6KTF5UQFN6GEKB2DZPCULVTYENAABHOG\",\"WARC-Block-Digest\":\"sha1:76C4LJIWKEBE2M7UPZ2T3HXENMN5ENOH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964363515.28_warc_CC-MAIN-20211208144647-20211208174647-00226.warc.gz\"}"}
https://www.mdpi.com/2305-7084/2/1/8
[ "", null, "Next Article in Journal\nRecent Advances in Supported Metal Catalysts for Syngas Production from Methane\nNext Article in Special Issue\nThe Effects of the Properties of Gases on the Design of Bubble Columns Equipped with a Fine Pore Sparger\n\nFont Type:\nArial Georgia Verdana\nFont Size:\nAa Aa Aa\nLine Spacing:\nColumn Width:\nBackground:\nArticle\n\n# Modelling of Bubbly Flow Using CFD-PBM Solver in OpenFOAM: Study of Local Population Balance Models and Extended Quadrature Method of Moments Applications\n\n1\nChemical Engineering Department, Sherbrooke University, Sherbrooke, QC J1H5N4, Canada\n2\nMechanical Engineering Department, Iowa State University, Ames, IA 50011, USA\n*\nAuthor to whom correspondence should be addressed.\nChemEngineering 2018, 2(1), 8; https://doi.org/10.3390/chemengineering2010008\nReceived: 8 January 2018 / Revised: 15 February 2018 / Accepted: 22 February 2018 / Published: 27 February 2018\n\n## Abstract\n\n:\nIn order to optimize and design new bubbly flow reactors, it is necessary to predict the bubble behavior and properties with respect to the time and location. In gas-liquid flows, it is easily observed that the bubble sizes may vary widely. The bubble size distribution is relatively sharply defined, and bubble rises are uniform in homogeneous flow; however bubbles aggregate, and large bubbles are formed rapidly in heterogeneous flow. To assist in the analysis of these systems, the volume, size and other properties of dispersed bubbles can be described mathematically by distribution functions. Therefore, a mathematical modeling tool called the Population Balance Model (PBM) is required to predict the distribution functions of the bubble motion and the variation of their properties. In the present paper, two rectangular bubble columns and a water electrolysis reactor are modeled using the open-source Computational Fluid Dynamic (CFD) package OpenFOAM. Furthermore, the Method of Classes (CM) and Quadrature-based Moments Method (QBMM) are described, implemented and compared using the developed CFD-PBM solver. These PBM tools are applied in two bubbly flow cases: bubble columns (using a Eulerian-Eulerian two-phase approach to predict the flow) and a water electrolysis reactor (using a single-phase approach to predict the flow). The numerical results are compared with measured data available in the scientific literature. It is observed that the Extended Quadrature Method of Moments (EQMOM) leads to a slight improvement in the prediction of experimental measurements and provides a continuous reconstruction of the Number Density Function (NDF), which is helpful in the modeling of gas evolution electrodes in the water electrolysis reactor.\n\n## 1. Introduction\n\nIn recent years, there has been a growing interest in two-phase flows as they can be observed in various industries such as petroleum, mining, chemical and biotechnology [1,2,3,4]. In a two-phase flow, the dispersion of the particles (bubbles) in the continuous phase plays an important role in the process. One of the main challenges is to use the population balance model to predict the evolution of the number of bubbles and of their size in bubbly flow. To give an example, in order to optimize and enhance the efficiency of electrochemical reactors, the evolved bubbles should be under control, since the presence of bubbles has favorable and unfavorable effects, such as a resistive film for the electric current flow and ions supply heading to the electrode to participate in the electrode reaction. Bubbles can also play a role as a turbulence promoter and inducer of convection over the electrode surface [5,6,7,8]. The accurate description of bubble size evolution is then beneficial to formulate predictive models for design optimization.\nIn the literature concerning the simulation of gas-liquid systems, several authors have used a monodisperse model only accounting for a mean bubble size (Deen et al. ; Holzinger ; Friberg , Morud and Hjertager ; Ranade and Deshpande ; Ranade ; Schwarz and Turner ; Schwarz ). While these models reduce the computational cost of the numerical simulation, they are unable to predict the evolution of the bubble size distribution, limiting their applicability and reliability for industrial design purposes . One of the main problems in modeling of multiphase dispersion is the prediction of bubble size distribution. Global polydisperse models, in which a spatially-varying field of bubble sizes is considered, can globally account for the polydispersity of the bubbles, in addition to the phase continuity equation. As global polydispersity models yield a non-constant bubble size, the disperse phase is global polydisperse with a locally monodispersed size distribution (Kerdouss et al. and Ishii et al. ). However, by applying this approach, the local probability distribution of the bubble size is not considered. Detailed models using the locally polydisperse approach give more information on the secondary phase behavior (Dhanasekharan et al. ; Venneker et al. ). The most used methods of locally polydisperse models are the Method of Classes (CM) (Balakin et al. ; Bannari et al. ; Becker et al. ; Kumar and Ramkrishna ; Kumar and Ramkrishna ; Puel et al. ), Quadrature Method of Moments (QMOM) (McGraw ; Marchisio et al. ; Marchisio et al. ; Marchisio et al. ; Sanyal et al. ) and Direct Quadrature Method of Moments (DQMOM) (Silva and Lage ; Selma et al. ; Marchisio and Fox ). The method of classes, while intuitive and accurate, is computationally intensive due to the large number of classes required to finely discretize the Number Density Function (NDF) with a large number of classes. Compared with CM, the QMOM can consider a wide range of bubble sizes with a reduced number of equations for the moments of the NDF. However, in some evaporation and combustion problems (Fox et al. ; Yuan et al. ), the value of the NDF for null internal coordinates needs to be known, which is not the case if the QMOM method is used. DQMOM solves the equations for weights and abscissae directly. Shortcomings related to the conservation of moments affect the DQMOM approach since weights and abscissas are not conserved quantities (Yuan et al. ). In order to overcome these limitations, Yuan et al. introduced the Extended Quadrature Method of Moments (EQMOM), which enables the shape of NDF to be reconstructed from a moment set using continuous kernel density functions instead of Dirac delta functions.\nQMOM and EQMOM have been recently compared in the study of liquid-liquid dispersion in a stirred tank [33,37]. Li et al. performed a comparison between QMOM and EQMOM in turbulent liquid-liquid dispersion, and they observed that these two methods provided similar predictions. They managed to reconstruct the droplet size distribution by using EQMOM. CM and DQMOM have been compared in bubbly flow by Selma et al. , as well. Their study was carried out based on two test cases, one involving a bubble column and the other a stirred tank. They reported that it is more computationally efficient to use DQMOM compared to CM even with a relatively low number of classes. A summary of some works concerning the coupling of E-E with Population Balance Model (PBM) and the comparison among PBMs are provided in Table 1 and Table 2, respectively.\nIn the present work, we simulate a gas-liquid flow in two rectangular bubble columns using CM, QMOM, DQMOM and EQMOM. The numerical results obtained in these two cases are used to compare the four solution methods for the PBE. The implementation of EQMOM provided by OpenQBMM is coupled to a two-fluid solver in OpenFOAM to describe the bubble evolution in bubble columns. The EQMOM approach, coupled with a single-phase CFD solver in OpenFOAM, is then used to describe the evolution of the bubble phase in an electrochemical cell. This simplification, in the case of the electrochemical system, is possible because the bubble sizes of interest in this system are of the order of a micron, significantly smaller and having a lower Stokes number than in the case of the bubble column. In this case, then, a one-way coupling approach is sufficient.\nThe remainder of this article is organized as follows. First, the modeling approach is explained in Section 2. The numerical solution method used in the present work is summarized in Section 3. The numerical results obtained for the bubble columns and the electrochemical cell are presented in Section 4, comparing them to the experiments for validation purposes. Conclusions are drawn in Section 5.\n\n## 2. Numerical Model\n\nThe governing equations of single-phase and two-phase system (two-fluid model) used in this model are shown in Table 3.\n\n#### 2.1. Population Balance Modeling\n\nThe evolution of the size distribution of a particle population, which may consist of solid particles, bubbles or droplets, is described studying the changes in space and time of the Number Density Function (NDF) $n ( ζ ; x , t )$. Here, $ζ$ indicates the internal coordinate representing the size of the discrete element of the disperse phase, $x$ is the position vector in physical space and t is time.\nAssuming the velocity of the disperse phase is known, the evolution of the NDF is defined by the population balance equation (Marchisio et al. , Marchisio and Fox , D. Ramkrishna ):\n$∂ n ( ζ ; x , t ) ∂ t + ∇ x · U G n ( ζ ; x , t ) − ∇ x · [ Γ ∇ x n ( ζ ; x , t ) ] + ∇ ζ · [ G ( ζ ) n ( ζ ; x , t ) ] = B ¯ a g ( ζ ; x , t ) − D ¯ a g ( ζ ; x , t ) + B ¯ b r ( ζ ; x , t ) − D ¯ b r ( ζ ; x , t ) + N ( ζ ; x , t ) ,$\nwhere $U G$ is the velocity of the disperse phase, $Γ$ is the diffusivity and $G ( ζ )$ the continuous rate of change in the space of internal-coordinate. The first term of Equation (1) represents accumulation; the second term describes convection; and the third diffusion in physical space. The source terms $B ¯ br ( ζ ; x , t )$, $B ¯ br ( ζ ; x , t )$, $D ¯ ag ( ζ ; x , t )$ and $D ¯ ag ( ζ ; x , t )$ are birth rate due to breakage, birth rate due to coalescence, death rate due to breakage and death rate due to coalescence, respectively. Finally, $N ( ζ ; x , t )$ is the rate of change of the NDF due to nucleation. In the present study, the NDF has the form of being length-based and $G ( ζ )$ is defined as growth rate.\nBubbles may nucleate when the liquid is supersaturated with gas. When the dissolved gas concentration reaches a critical value, bubbles nucleate. This critical value might be theoretically obtained from Classical Nucleation Theory (CNT) (Abraham ). The nucleation theory provides information about the generation of nuclei (the formation of cluster of molecules after reaching some critical size) per unit time and volume of the liquid as a function of the local parameters. The bubbles can grow in size if the liquid is saturated with dissolved gas. The remaining gas is transported into the liquid on a molecular level and gives rise to supersaturation that causes an increases of the growth of bubbles that move through liquid. In this case, the growth term is included in the PBE as a source term. In some systems such as a gas-evolving electrode, bubble growth and nucleation terms might be treated as boundary conditions, since the sources of nucleation are usually irregularities of the electrode surfaces, and once a nucleus exists, the bubble growth occurs on the electrode surface in a concentration boundary layer. Gas bubbles develop at nucleation sites on the electrode surface, grow in size until they reach a critical break-off diameter and detach into the electrolyte afterwards (Nierhaus , Tomasoni ). In other words, the bubble formation happens on the electrode. Consequently, it can be described by means of a boundary condition (an ingoing flux boundary).\nGrowth, nucleation and diffusivity were not taken into account in the example applications presented in this work, since the focus is on bubble coalescence and breakage. Therefore, the final form of the evolution equation of the NDF is:\n$∂ n ( ζ ; x , t ) ∂ t + ∇ x · U G n ( ζ ; x , t ) = B ¯ a g ( ζ ; x , t ) − D ¯ a g ( ζ ; x , t ) + B ¯ b r ( ζ ; x , t ) − D ¯ b r ( ζ ; x , t ) .$\nThe breakage and coalescence source terms are modeled as (Marchisio et al. , Marchisio and Fox ):\n$B ¯ ag = ζ 2 2 ∫ 0 ζ β ζ 3 − ζ ′ 3 1 / 3 , ζ ′ ζ 3 − ζ ′ 3 2 / 3 n ζ 3 − ζ ′ 3 1 / 3 ; x , t n ( ζ ′ ; x , t ) d ζ ′ ,$\n$D ¯ ag = n ( ζ ; x , t ) ∫ 0 ∞ β ( ζ , ζ ′ ) n ( ζ ′ ; x , t ) d ζ ′ ,$\n$B ¯ br = ∫ ζ ∞ a ( ζ ′ ) b ( ζ | ζ ′ ) n ( ζ ; x , t ) d ζ ′ ,$\n$D ¯ br = a ( ζ ) n ( ζ ; x , t ) .$\nHere, $β ( ζ , ζ ′ )$ is the coalescence rate between bubbles of size $ζ$ and $ζ ′$; $a ( ζ )$ is the break-up frequency of a bubble with size $ζ$; $b ( ζ | ζ ′ )$ represents daughter distribution function generated from the breakup of a bubble of size $ζ ′$.\n\n#### 2.1.1. Class Methods\n\nThe class method solves the bubble’ number density, directly . In CM, the continuous size range of bubbles can be realized through the discretization of the bubbles size distribution into a number of classes of discrete sizes. For each class, the equation of the number density of bubbles is solved and coalescence and breakup rates are transformed into birth and death rates. The population balance equation for the i-th bubble class is represented as:\n$∂ n i ∂ t + ∇ · ( U G n i ) = B ¯ i , a g r − D ¯ i , a g r + B ¯ i , b r − D ¯ i , b r$\nwhere $n i$ is the number of the bubbles from group i per unit volume. $B ¯ b r$ and $B ¯ a g r$ are the birth rates caused by breakup and coalescence, respectively, and $D ¯ a g r$ and $D ¯ b r$ the corresponding death rates, from coalescence and breakage, respectively.\nThe relationship between the volume fraction and the number density is:\n$n i = α i ν i$\nwhere $ν i$ is the volume of a bubble of class i.\n$∑ α i = α G$\nwhere $α G$ is the volume fraction of the dispersed phase.\nTo solve the population balance equation using the scalars $f i$, Equation (7) is changed to the following equation:\n$∂ α G f i ∂ t + ∇ · ( α G U G f i ) = B ¯ i , a g r − D ¯ i , a g r + B ¯ i , b r − D ¯ i , b r$\n$f i = α i α G$\n$∑ f i = 1$\nHere, $f i$ is the bubble volume fraction of group of size i. As Equation (10) shows, all bubbles in a computational cell move with the same velocity $U G$. This approach is called the MUlti SIzeGroup (MUSIG) . It is worth observing that assuming all the bubbles in a computational cell move with the same velocity is a limitation of the approach, which may be acceptable for narrow bubble size distributions, but not in general. A class of Quadrature-based Moments Methods (QBMM) that is not affected by this limitation was proposed by Yuan et al. , and its adoption will be the topic of future work.\nThe method of classes calculates the Sauter mean diameter $d 32$ as follows:\n$d 32 = ∑ i f i ∑ i f i / d i$\nThe Sauter mean diameter represents the average bubble size, and it is defined as the diameter of a sphere that has the same volume to surface area ratio as the bubble under consideration. The Sauter diameter is often used in problems where the active surface area is the relevant parameter .\nRamkrishna proposed an approach named fixed pivot in order to discretize the source terms in the PBE. The approach assumes that the population of bubbles is distributed on pivotal grid points $x i$ with $x i + 1 = s x i$ and $s > 1$, where i refers to the class i with $i < n$. Assuming spherical bubbles, $( 4 / 3 ) π ( d i + 1 / 2 ) 3 = ( 4 s / 3 ) π ( d i / 2 ) 3$, where s is calculated to ensure $d n = d 2 r + 1 = d max = d max$ and $d r = d m e a n$.\nIn the CM technique, the bubble size is divided into $n = 2 r + 1$ classes, where n is odd in order to have symmetrical divisions. This gives the following relation:\n$d i = s ( i − r − 1 / 3 ) d m e a n s = d max d m e a n 3 / r$\nBannari et al. evaluated the the values of r and s for different classes assuming $d max = 5$ mm and $d m e a n = 10$ mm (Table 4).\nBreakage and aggregation may create bubbles with volume $ν$ such that $x i < ν < x i + 1$. This bubble must be split by assigning respectively fraction $γ i$ and $γ i + 1$ to $x i$ and $x i + 1$. The following limitations preserve the number balance and mass balance.\n$γ i x i + γ i + 1 x i + 1 = ν γ i + γ i + 1 = 1$\nRamkrishna has also reported the birth in class i due to coalescence in this way:\n$B ¯ i , a g r = ∑ k = 0 n ∑ j = 0 n θ ( x i − 1 < x j + x k < x i ) × ( 1 − 1 2 δ j k ) × γ i − 1 ( x j + x k ) β ( x k , x j ) 36 α g 2 π 2 f j f k ( d j d k ) 3 + ∑ k = 0 n ∑ j = k n θ ( x i < x j + x k < x i + 1 ) × ( 1 − 1 2 δ j k ) × γ i ( x j + x k ) β ( x k , x j ) 36 α g 2 π 2 f j f k ( d j d k ) 3 ,$\nwhere $θ$ is a test function expressed as:\n$θ ( φ ) = 0 φ is false 1 φ is true .$\nand:\n$γ i − 1 ( ν ) = ν − x i − 1 x i − x i − 1 , γ i ( ν ) = x i + 1 − ν x i + 1 − x i .$\nThe death rates $D ¯ i , a g r$ in class i due to coalescence is defined as follows:\n$D ¯ i , a g r = 36 f i α G 2 π 2 d i 3 ∑ k = 0 n β ( x i , x k ) f k d k 3 ,$\nwhile the birth rate $B ¯ i b r$ in class i due to breakup as:\n$B ¯ i b r = 6 α G π ∑ k = i n b ( x k | x i ) a ( x k ) π i , k f k d k 3 ,$\nand the death rate $D ¯ i , b r$ in class i due to break-up:\n$D ¯ i , b r = 6 α G f i π d i 3 a ( x i ) ,$\nwhere:\n$π i , k = ∫ x i − 1 x i ν − x i − 1 x i − x i − 1 p ( ν , ν k ) d ν + ∫ x i x i + 1 x i + 1 − ν x i + 1 − x i p ( ν , ν k ) d ν$\nThe mentioned integrals are solved by the Gaussian quadrature integration as follows:\n$π i , k ≃ ∑ j = 1 5 ( 1 + W j ) 3 ( j + 1 ) 2 p 5 2 p ( W j ) p x i − x i − 1 2 ( 1 + W j ) − x i − 1 , x k + ∑ j = 1 5 ( 1 + W j ) 2 ( 1 − W j ) ( j + 1 ) 2 p 5 2 p ( W j ) p x i + 1 − x i 2 ( 1 + W j ) − x i , x k$\n$P n$ is a Legendre polynomial and can be formulated using the recurrence relation:\n$P n = ( 2 n − 1 ) x P n − 1 − ( n − 1 ) P n − 2 n ; P 0 = 1 ; P 1 = x$\n$W j$ is the weighting function of the orthogonal polynomials as shown in Table 5. If j equals five, adequate accuracy is achieved.\nBoundary and initial conditions to solve CM equations are shown in Table 6. It is assumed that the bubble size at the inlet is monodispersed and spatially uniform, equal to the mean diameter ($d 2 r$). The first-order upwind scheme is used to discretize the advection term of the $f i$ equations.\n\nQuadrature-based Moment Methods (QBMM) consider the evolution of a set of moments of the NDF. If integer moments are considered, their definition is:\n$M k = ∫ 0 ∞ n ( L ; x , t ) L k d L , k = 0 , 1 , …$\nEvolution equations for the moments of the NDF read:\n$∂ M k ( t , x ) ∂ t + ∇ · [ U G M k ( t , x ) ] = B ¯ a g , k − D ¯ a g , k + B ¯ b r , k − D ¯ b r , k$\nBy solving Equation (26) for a set of at least four moments, the Sauter mean diameter $d 32 = m 3 / m 2$ can be calculated.\n\n#### 2.1.3. Quadrature Method of Moments\n\nIn the QMOM technique, the unknown NDF is represented by a weighted summation of Dirac delta distributions $δ ( L − L α )$:\n$n ( L ) ≈ ∑ α = 1 N W α δ ( L − L α )$\nwhere $W i$ are non-negative weights of each kernel density function, $L i$ are the corresponding quadrature abscissae and N is the number of kernel density functions to approximate the NDF. Source terms in the moment Equation (26) become:\n$B ¯ a g , k = 1 2 ∑ α = 1 N W α ∑ β = 1 N W β ( L α 3 + L β 3 ) k / 3 β ( L α , L β ) ,$\n$D ¯ a g , k = ∑ α = 1 N W α L α k ∑ β = 1 N W β β ( L α , L β ) ,$\n$B ¯ b r , k = ∑ α = 1 N W α b ¯ α ( k ) a ( L α ) ,$\n$D ¯ b r , k = ∑ α = 1 N W α L α k a ( L α ) ,$\nwhere the N is the number of weights $w α$, and the corresponding abscissae $L α$ are determined from the first $2 N$ integer moments of the NDF. $β α β$ is the aggregation kernel for the bubbles of size $L α$ and $L β$; $a α$ is the breakage kernel for the bubble size of $L α$; and $b ¯ α ( k )$ represents daughter bubble distribution function.\nBoundary conditions and initial conditions to solve the moment equations are shown in Table 7. Gauss upwind is utilized as the divergence scheme. If the bubble size, which can be represented by a constant value or a distribution function, is known, the moments will be easily calculated. The moments for constant bubble size are found by:\n$M i = α G i = 0 M 0 ζ i i ≠ 0$\nwhere $ζ$ is bubble size and $α G$ is gas phase fraction.\n\n#### 2.1.4. Direct Quadrature Method of Moments\n\nDQMOM is based on the direct solution of the transport equations for weights and abscissas of the quadrature approximation (Fan et al. ). The transport equations for weights and abscissas are written as:\n$∂ ∂ t W α + ∇ ( ϕ W α ) = a α$\n$∂ ∂ t L α + ∇ ( ϕ L α ) = b α$\nwhere $a i$ and $b i$ are found by the solution of the following linear system in terms of the unknown $a i$ and $b i$ (Bove ):\n$∑ α = 1 N [ ( 1 − k ) L α k a α + k L α k − 1 b α ] = 1 2 ∑ α = 1 N W α ∑ β = 1 N W β ( L α 3 + L β 3 ) k / 3 β ( L α , L β ) − ∑ α = 1 N W α L α k ∑ β = 1 N W β β ( L α , L β ) + ∑ α = 1 N W α b ¯ α ( k ) a ( L α ) − ∑ α = 1 N W α L α k a ( L α ) k = 0 , … , 2 N − 1 .$\nThe source terms $S ( k )$ are taken to be the as same as for the QMOM method. Boundary and initial conditions to solve for weights and abscissae are shown in Table 8. The first-order upwind scheme is used to discretize the advection term in both Equations (33) and (34). The linear system obtained from Equation (35) is solved using the Gauss–Seidel technique.\n\n#### 2.1.5. Extended Quadrature Method of Moments\n\nThe EQMOM approach approximates the unknown NDF with a weighted sum of smooth, non-negative kernel density functions $δ σ ( L , L α )$ [36,57]:\n$n ( L ) ≈ p N ( L ) = ∑ α = 1 N W α δ σ ( L , L α )$\nIn this work, the log-normal kernel density is used :\n$δ σ ( L , L α ) = 1 L σ 2 π exp − ( L − L α ) 2 2 σ 2 ,$\nSource terms are then closed in terms of the primary and secondary quadrature found with the EQMOM procedure, leading to:\n$B ¯ a g , k = 1 2 ∑ α 1 = 1 N ∑ γ 1 = 1 N α W α 1 W α 1 γ 1 ∑ α 2 = 1 N ∑ γ 2 = 1 N α W α 2 W α 2 γ 2 ( L α 1 γ 1 3 + L α 2 γ 2 3 ) k / 3 β α 1 γ 1 α 2 γ 2 ,$\n$D ¯ a g , k = ∑ α 1 = 1 N ∑ γ 1 = 1 N α L α 1 γ 1 k W α 1 W α 1 γ 1 ∑ α 2 = 1 N ∑ γ 2 = 1 N α W α 2 W α 2 γ 2 β α 1 γ 1 α 2 γ 2 ,$\n$B ¯ b r , k = ∑ α 1 = 1 N ∑ γ 1 = 1 N α W α W α γ b ¯ α γ ( k ) a α γ ,$\n$B ¯ b r , k = ∑ α 1 = 1 N ∑ γ 1 = 1 N α W α W α γ L α γ k a α γ ,$\nwhere the N primary weights $W α$, the corresponding primary abscissae $L α$, together with the parameter $σ$ are determined from the first $2 N + 1$ integer moments of the NDF. The $2 N α$ quantities $W α γ$, called secondary weights and abscissae, respectively, are computed using the standard Gaussian quadrature formulae for known orthogonal polynomials to the kernel NDF [36,57]. $β α 1 γ 1 α 2 γ 2$ is the aggregation kernel for the bubbles of size $L α 1 γ 1$ and $L α 2 γ 2$; $a α γ$ is the breakage kernel for the bubbles size of $L α γ$; and $b ¯ α γ$ represents the daughter distribution function.\nBoundary conditions and initial conditions used to solve the moment equations are the same as those used for the QMOM approach (Table 7).\n\n#### 2.1.6. Closure Models for Coalescence and Breakage\n\nThere are many breakage and coalescence kernels available for bubbly flow, but they are essentially written in a similar form with some minors differences in the model constants or assumptions . The discussion of aggregation and breakage kernels is beyond the scope of this paper. Therefore, it was decided to utilize the ones (Luo and Svendsen and Hagesather et al. ) that have been widely adopted for the bubble columns (Bannari et al. , Kerdouss et al. , Kerdouss et al. , Kerdouss et al. and Selma et al. ). The equations of coalescence and breakage kernels are shown in Table 3.\n\n## 3. Numerical Solution\n\nThe models described in the present work were solved using the OpenFOAM library . Two-fluid model and single-phase flow libraries in OpenFOAM (twoPhaseEulerFOAM and pimpleFoam) were customized in order to couple the PBE approaches used in this work to the two -phase flow model, to simulate bubbly flows in bubble columns, and to the single-phase flow model (dilute system), to simulate the electrochemical cell. Equations are solved iteratively, relying on the semi-implicit PIMPLE (merged PISO-SIMPLE) approach provided by OpenFOAM, which is a combination of the PISO (Pressure Implicit with Split Operator) and SIMPLE (Semi Implicit Method for Pressure Linked Equations) procedures.\n\n## 4. Results and Discussion\n\n#### 4.1. Test Case 1: Pseudo-2D Bubble Column\n\nThe first test case for the coupled Population Balance Model and Two Fluid Model (PBM-TFM) approach is a simple geometry (a rectangular bubble column ). The same test case was used in to compare CM and DQMOM. Consequently, only the simulations with EQMOM were necessary to allow the comparison.\nThe dimensions and boundary conditions used to perform the simulations are shown in Figure 1, while Table 9 summarizes the models used in the simulations for this test case. Table 10, Table 11 and Table 12 demonstrates the boundary and initial conditions applied in CM, QMOM, EQMOM and DQMOM, respectively.\nFigure 2 depicts a comparison between experimental measurements and axial liquid velocity provided by the CFD-PBM solver on a line along y = 37 cm. The comparison confirms that the solver using EQMOM works properly for the bubble column. Figure 2a shows that the variation of secondary nodes does not have a significant impact. However, the increase of primary nodes from two to three provides better accuracy, as was expected. Figure 2b demonstrates the differences among population balance models. It is observed that EQMOM using three nodes represents a slight improvement in comparison with CM (25 classes) and DQMOM (three nodes). It is noteworthy that the CM (25 classes) computationally is very expensive . By contrast, DQMOM and EQMOM have less computational demand.\nFigure 3 demonstrates the radial bubble segregation based on the Sauter mean diameter contour. In fact, the bubble size decreases heading toward the wall due to breakage phenomena. However, the high gas phase fraction and coalescence events at the center of column lead to the creation of larger bubble sizes. As Figure 3 shows, Sauter mean diameter distributions predicted by the applied PBMs (DQMOM, EQMOM, CM) are qualitatively confirmed by comparison with experimental observation.\nEQMOM is capable of providing a smooth reconstruction of the NDF for each arbitrary zone or cell in the computational domain. While this reconstruction is not unique for the set of transported moments, examining the reconstructed NDF can provide a better insight into the behavior of the dispersed phase. In order to plot NDF, weights and abscissae calculated by EQMOM and extracted from CFD-PBM solver are utilized to approximate Equation (37). Figure 4 indicates the shape of NDF in the liquid phase (water zone) at $t = 60$ s. It can be observed that the mean bubble diameter ranges from 1 mm to 6 mm, and thus, the monodispersity is not a suitable approximation. As can be observed from Figure 4a, the NDF is represented by a Dirac delta function for $N = 2$, while Figure 4b exhibits a continuous NDF for $N = 3$. This means the increase of the nodes in EQMOM configuration applied in the bubble column leads to the creation of a spread in bubble sizes, even locally.\n\n#### 4.2. Test Case 2: 3D Bubble Column\n\nFor the second case, the coupled PBM-TFM solver was tested in a square bubble column (Deen ). The models used in the simulations are summarized in Table 13. This configuration is based on the work of Holzinger in which the same test case was studied using a monodisperse bubble size distribution. In Test Case 2, QMOM and EQMOM simulations were performed.\nThe column has a square cross-section with W (width)$= D$(depth)$= 0.15$ m. The sparger is in the form of a square, the are of which is $A i n = 0.03 × 0.03$ m. The dimensions and boundary conditions are shown in Figure 5. The domain is discretized into $15 × 15 × 60$ control volumes, a total of 13,500 cells. Figure 6 shows the comparison between QMOM and EQMOM with the experimental measurements reported by Deen . Three nodes were used for QMOM, and three primary nodes were used for EQMOM. The EQMOM approach yielded a minor improvement in the gas velocity profile, while no change was observed through the liquid velocity profile. Likewise, the color maps of the Sauter mean diameter are similar for both methods, as shown in Figure 7. In spite of the similarity, the computational cost of EQMOM is higher than the QMOM method, as Madadi-Kandjani and Passalacqua reported for a zero-dimension case, as well as the current simulation process.\n\n#### 4.3. Test Case 3: Water Electrolysis Reactor\n\nThe bubbly flow in a water electrolysis reactor consisting of a gas evolution electrode was chosen as the third case. This decision is based on the simplicity of the case and on the availability of experimental data for the bubble size distribution. It was decided to investigate the Inverted Rotating Disk Electrode (IRDE) proposed by Van Parys et al. , which is composed of three electrodes as follows:\n• Reference electrode: Ag/AgCl saturated with KCl\n• Counter electrode: platinum grid\n• Working electrode (rotating electrode): made by embedding a platinum rod in an insulating Poly Vinylidene Fluoride (PVFD) cylinder.\nWhen a potential difference is applied between electrodes, hydrogen is produced at the cathode and oxygen at the anode in the form of bubbles. In this case, we put aside the influence of the anode, because the experimental bubble distribution is only available over cathode and hydrogen bubbles. Consequently, the impact of oxygen bubbles is not taken into account in the simulation. The specifications of the IRDEreactor are presented in Figure 8. In this system, the rotating cathode is considered as an inlet boundary with imposed velocity, volume fraction and bubble size distribution. The angular component of the liquid velocity is set according to the rotational speed of working electrode ($ω =$ 100 and 250 rpm). According to the applied rotational speeds, the calculated Reynolds number is less than the critical ones . Therefore, the flow regime is laminar, which allows neglecting source terms in the population balance model because of $ϵ = 0$. In the present study, gas hold-up is extremely low. The bubbles follow the bulk flow and are affected by the continuous phase (water), but not vice versa. Hence, the flow field was calculated with a single-phase solver. The flow field obtained from the single-phase approach was then imported in the population balance solver, in order to advect the bubble size distribution imposed at the inlet and study how bubbles distribute in the IRDE. The settings, boundary and initial conditions used in the simulation are summarized in Table 14 and Table 15.\nA distribution of bubble sizes is observed at the electrodes of the IRDE reactor. For this reason, the continuous distribution function reported by Nierhaus et al. was used in the simulation and imposed at the electrode surface, which is treated as an inlet boundary for the gas phase (Figure 9a).\nA grid with 34,300 hexahedra yielded sufficiently accurate results for the proposed problem and was selected for the IRDE study.\nNierhaus et al. reported the experimental bubble size distributions in an optical window (W1) for two different rotating velocities, 100 rpm and 250 rpm. Figure 8 illustrates how the $W 1$ volume has been configured in the IRDE reactor. W1 was located above the electrode to enable tracking bubbles in the rising plume.\nFigure 9b compares the computed axial velocity component profile $u z *$($= u z ω z ν$) as a function of the dimensionless height ($γ = z δ$), where $δ$ is the displacement thickness of the fluid boundary layer ($δ = ν ω z$). The comparison shows that the numerical results match with the analytical solution in the region close to the electrode. The confirmed flow field applied in population balance calculations for its NDF consists of the accumulation and convection term (physical space).\nTo validate the CFD-PBM solver in IRDE, an analysis is applied to investigate the bubble size distribution in volume W1. The comparison of the bubble size distribution between the experimental study and current CFD-PBM using EQMOM (three nodes) is presented in Figure 10. The results thus obtained are compatible with experimental measurements (Figure 10a,b). The fair agreement confirms the assumptions in the PBM model, particularly for 150 rpm. In fact, since the bubble size is so small (low Stokes number), most of the effect is due to advection, and no segregation occurs.\nIn the case of 150 rpm, simulation data better match experimental data, while there is a disagreement for a higher rotational speed. The prime cause of the discrepancy might be the result of the neglect of size change effects in the PBM model.\n\n## 5. Conclusions\n\nIn this paper, an analysis was performed for comparison among local Population Balance Models (PBM), CM, QMOM, DQMOM and EQMOM, based on three cases in the presence of bubbly flow. The purpose of the paper is to validate the CFD-PBM solver, which was applied for two different bubble columns and a water electrolysis reactor to predict the bubble size distribution. The originality of the OpenFOAM solver lies on the fact that it employs the novel method of PBM, which can accept the continuous bubble size distribution as a boundary condition. Moreover, the solver is able to export the distribution function for a specified region in an arbitrary time based on the EQMOM method. It was observed that the CFD-PBM using EQMOM provides a reasonable prediction, as well as CM consisting of 25 classes, but requires less computational demand compared with CM (Table 16). From the research that has been carried out, it is possible to conclude that QMOM and EQMOM have similar predictions. EQMOM is computationally more expensive than QMOM, although it is able to obtain a continuous NDF of the model. In order to simulate bubbly flow in the bubble column, it is proposed to use at least three nodes in the EQMOM technique. This minimum value is required to acquire a continuous NDF function. It is evident that the experimental and numerical NDF can be compared in the water electrolysis reactor (IRDE). Agreement is achieved using EQMOM in the IRDE reactor. The results proved that the most dominant term is advection in the PBM model.\n\n## Acknowledgments\n\nThe authors would like to thank Hydro-Québec and NSERC, which financially supported this study. A. P. would like to gratefully acknowledge the support of the U.S. National Science Foundation (NSF) under the Software Infrastructure for Sustained Innovation (SI$2$)–Scientific Software Elements (SSE) award NSF–ACI (Advanced Cyber Infrastructure) 1440443, which funded the development of the OpenQBMM framework.\n\n## Author Contributions\n\nEhsan Askari developed the libraries including CM, QMOM, Coalescence and Breakage kernels, carried out the simulations, performed the analysis and wrote the initial manuscript. Pierre Proulx supervised the project. Alberto Passalacqua is one of the team members of OpenQBMM. All authors discussed the results and contributed to the final manuscript.\n\n## Conflicts of Interest\n\nThe authors declare no conflict of interest.\n\n## Nomenclature\n\n Symbols $a ( ζ )$ breakage kernel s$− 1$ B birth m$− 3$ s$− 1$ $b ( ν )$ break-up frequency function s$− 1$ $C D$ drag coefficient − $C l$ lift coefficient − $C ν m$ virtual mass coefficient − $c f$ increase coefficient of surface area D death m$− 3$ s$− 1$ d bubble diameter m $d 32$ Sauter mean diameter m $E o$ Eotvos number − f friction coefficient for flow around bubbles − $f i$ volume fraction of bubble class i − $F$ volumetric force N m$− 3$ $g$ acceleration vector due to gravity m s$− 2$ $I =$ unit tensor k turbulent kinetic energy j kg$− 1$ L bubble size m $m ( ν )$ mean number of daughter produced by breakage − n number density of bubbles m$− 3$ N angular velocity rad s$− 1$ p pressure Pa $P c$ coalescence efficiency or collision probability − $p ( ν , ν ′ )$ pressure N m$− 2$ $r$ position vector m $R$ interphase force N m$− 3$ $R e$ Reynolds number − $R ¯ ϕ e f f$ Reynolds (turbulent) and viscous stress m s$− 2$ t Time s $U$ average velocity of phase m s$− 1$ $u i j$ bubble approaching turbulent velocity m s$− 1$ $W e$ Weber number − Greek Symbols $α$ Volume fraction − $β$ constant $2.05$ or s$− 1$ $β ( ζ , ζ ′ )$ coalescence rate s$− 1$ $ϵ$ Turbulent kinetic energy dissipation rate m$2$ s$− 3$ $θ i , j$ collision frequency m$− 3$ s$− 1$ $μ$ dynamic viscosity of the continuous phase N/m$3$ $λ$ eddy size m $ρ$ density kg/m$3$ $σ$ surface tension or variance Nm$− 1$ or m $ζ$ internal variable − $Ω B$ breakage frequency s$− 1$ $ν$ bubble size or kinematic viscosity m$3$ or m$2 / s$ $ξ i j$ size ratio $d i / d j$ $Γ ( a , x )$ incomplete Gamma function − $η$ diameter ratio $d i / d j$ $τ =$ stress tensor kg m$− 1$ s$− 2$ Subscripts $a g$ aggregation $b r$ breakage $e f f$ effective G gas phase L liquid phase m mixture i phase number $l a m$ laminar t turbulent\n\n## References\n\n1. Bannari, R.; Kerdouss, F.; Selma, B.; Bannari, A.; Proulx, P. Three dimensional mathematical modeling of dispersed two-phase flow using class method of population balance in bubble columns. Comput. Chem. Eng. 2008, 32, 3224–3237. [Google Scholar] [CrossRef]\n2. Rusche, H. Computational Fluid Dynamics of Dispersed Two-Phase Flows at High Phase Fractions. Ph.D. Thesis, University of London, London, UK, 2002. [Google Scholar]\n3. Nierhaus, T. Modeling and Simulation of Dispersed Two-Phase Flow Transport Phenomena in Electrochemical Processes. Ph.D. Thesis, Universiteit Brussel, Brussels, Belgium, 2009. [Google Scholar]\n4. Karimi, M.; Droghetti, H.; Marchisio, D. PUFoam: A novel open-source CFD solver for the simulation of polyurethane foams. Comput. Phys. Commun. 2017, 217, 138–148. [Google Scholar] [CrossRef]\n5. Sequira, C.A.C.; Santos, D.M.F.; Sljukie, B.; Amaral, L. Physics of electrolytic gas evolution. Braz. J. Phys. 2013, 43, 199–208. [Google Scholar] [CrossRef]\n6. Leahy, M.J.; Phillip Schwarz, M. Modeling Natural Convection in Copper Electrorefining: Describing Turbulence Behavior for Industrial-Sized Systems. Metall. Mater. Trans. B 2011, 42, 875–890. [Google Scholar] [CrossRef]\n7. Leahy, M.J.; Philip Schwarz, M. Experimental Validation of a Computational Fluid Dynamics Model of Copper Electrowinning. Metall. Mater. Trans. B 2010, 41, 1247–1260. [Google Scholar] [CrossRef]\n8. Leahy, M.J.; Philip Schwarz, M. Computational Fluid Dynamics Modelling of Natural Convection in Copper Electrorefining. In Proceedings of the 16th Australasian Fluid Mechanics Conference, Gold Coast, Australia, 2–7 December 2007; pp. 112–116. [Google Scholar]\n9. Deen, N.G.; Solberg, T.; Hjertager, B.H. Flow generated by an aerated Rushton impeller: Two-phase PIV Experiments and numerical simulations. Can. J. Chem. Eng. 2002, 80, 1–15. [Google Scholar] [CrossRef]\n10. Holzinger, G. Eulerian Two-Phase Simulation of the Floating Process with OpenFOAM. Ph.D. Thesis, Johannes Kepler Universitat Linz, Linz, Austria, 2016. [Google Scholar]\n11. Friberg, P.C. Three-Dimensional Modeling and Simulations of Gas-Liquid Flows Processes in Bioreactors. Ph.D. Thesis, Telemark Institute of Technology, Bø, Norway, 1998. [Google Scholar]\n12. Morud, K.E.; Hjertager, B.H. LDA measurements and CFD modeling of gas-liquid flow in a stirred vessel. Chem. Eng. Sci. 1996, 51, 233–249. [Google Scholar] [CrossRef]\n13. Ranade, V.V.; Deshpande, V.R. Gas-liquid flow in stirred vessels: Trailing vortices and gas accumulation behind impeller blades. Chem. Eng. Sci. 1999, 54, 2305–2315. [Google Scholar] [CrossRef]\n14. Ranade, V.V. An efficient computational model for simulating flow in stirred vessels: A case of Rushton Turbine. Chem. Eng. Sci. 1997, 52, 4473–4484. [Google Scholar] [CrossRef]\n15. Schwarz, M.P.; Turner, W.J. Applicability of the standard k-e turbulence model to gas-stirred baths. Appl. Math. Model. 1988, 12, 273–279. [Google Scholar] [CrossRef]\n16. Schwarz, M.P. Simulation of gas injection into liquid melts. Appl. Math. Model. 1996, 20, 41–51. [Google Scholar] [CrossRef]\n17. Kresta, S.M.; Etchells, A.W., III; Dickey, D.S.; Atiemo-Obeng, V.A. Advances In Industrial Mixing; John Wiley & Sons: New York, NY, USA, 2016. [Google Scholar]\n18. Kerdouss, F.; Bannari, A.; Proulx, P. CFD modeling of gas dispersion and bubble size in a double turbine stirred tank. Chem. Eng. Sci. 2006, 61, 3313–3322. [Google Scholar] [CrossRef]\n19. Ishii, M.; Kim, S.; Uhle, J. Interfacial area transport equation: Model development and benchmark experiments. Int. J. Heat Mass Transf. 2002, 45, 3111–3123. [Google Scholar] [CrossRef]\n20. Dhanasekharan, K.; Sanyal, J.; Jain, A.; Haidari, A. A generalize approach to model oxygen transfer in boreactors using population balances and computational fluid dynamics. Chem. Eng. Sci. 2005, 60, 213–218. [Google Scholar] [CrossRef]\n21. Venneker, B.C.H.; Derksen, J.J.; Van den Akker, H.E.A. Population balance modeling of aerated stirred vessels based on CFD. AIChE J. 2002, 48, 673–684. [Google Scholar] [CrossRef]\n22. Balakin, B.V.; Hoffmann, A.C.; Kosinski, P. Coupling STAR-CD with a population balance technique based on the classes method. Powder Technol. 2014, 257, 47–54. [Google Scholar] [CrossRef]\n23. Becker, P.J.; Puel, F.; Henry, R.; Sheibat-Othman, N. Investigation of discrete population balance models and breakage kernels for dilute emulsification systems. Ind. Eng. Chem. Res. 2011, 50, 11358–11374. [Google Scholar] [CrossRef]\n24. Kumar, S.; Ramkrishna, D. On the solution of population balance equations by discretization-I. A fixed pivot technique. Chem. Eng. Sci. 1996, 51, 1311–1332. [Google Scholar] [CrossRef]\n25. Kumar, S.; Ramkrishna, D. On the solution of population balance equations by discretization-II. A moving pivot technique. Chem. Eng. Sci. 1996, 51, 1333–1342. [Google Scholar] [CrossRef]\n26. Puel, F.; Fvotte, G.; Klein, J.P. Simulation and analysis of industrial crystal-lization processes through multidimensional population balance equations. Chem. Eng. Sci. 2003, 58, 3715–3727. [Google Scholar] [CrossRef]\n27. McGraw, R. Description ofaerosol dynamics by the quadrature method ofmoments. Aerosol Sci. Technol. 1997, 27, 255–265. [Google Scholar] [CrossRef]\n28. Marchisio, D.L.; Vigil, R.D.; Fox, R.O. Quadrature method of moments for aggregation-breakage processes. J. Colloid Interface Sci. 2003, 258, 322–334. [Google Scholar] [CrossRef]\n29. Marchisio, D.L.; Pikturna, J.T.; Fox, R.O.; Vigil, R.D. Quadrature method of moments for population-balance equations. AIChE J. 2003, 49, 1266–1276. [Google Scholar] [CrossRef]\n30. Marchisio, D.L.; Vigil, R.D.; Fox, R.O. Implementation of the quadrature method of moments in CFD codes for aggregation-breakage problems. Chem. Eng. Sci. 2003, 139, 3337–3351. [Google Scholar] [CrossRef]\n31. Sanyal, J.; Marchisio, D.L.; Fox, R.O.; Dhanasekharan, K. On the comparaison between population balance models for CFD simulation of bubble columns. Ind. Eng. Chem. Res. 2005, 44, 5063–5072. [Google Scholar] [CrossRef]\n32. Silva, L.; Lage, P. Development and implementation of a polydispersed multiphase model in OpenFOAM. Comput. Chem. Eng. 2011, 35, 2653–2666. [Google Scholar] [CrossRef]\n33. Selma, B.; Bannari, R.; Proulx, P. Simulation of bubbly flows: Comparison between direct quadrature method of moments (DQMOM) and method of classes. Chem. Eng. Sci. 2010, 65, 1925–9141. [Google Scholar] [CrossRef]\n34. Marchisio, D.L.; Fox, R.O. Solution of population balance equations using the direct quadrature method of moments. J. Aerosol Sci. 2005, 36, 43–73. [Google Scholar] [CrossRef]\n35. Fox, R.; Laurant, F.; Massot, M. Numerical simulation of spray coalescence in an Eulerian framework: Direct quadrature method of moments and multi-fluid method. J. Comput. Phys. 2008, 227, 3058–3088. [Google Scholar] [CrossRef]\n36. Yuan, C.; Laurant, F.; Fox, R.O. An extended quadrature method of moments for population balance equations. J. Aerosol Sci. 2012, 32, 1111–1116. [Google Scholar] [CrossRef]\n37. Li, D.; Gao, Z.; Buffo, A.; Podgorska, W.; Marchisio, D.L. Droplet breakage and coalescence in liquid-liquid dispersions: Comparison of different kernels with EQMOM and QMOM. AIChE J. 2017, 63, 2293–2311. [Google Scholar] [CrossRef]\n38. Gimbun, J.; Rielly, C.D.; Nagy, Z.K. Modelling of mass transfer in gas-liquid stirred tanks agitated by Rushton turbin and CD-6 impeller: A scale up study. Chem. Eng. Res. Des. 2017, 87, 437–451. [Google Scholar] [CrossRef][Green Version]\n39. Gupta, A.; Roy, S. Euler–Euler simulation of bubbly flow in a rectangular bubble column: Experimental validation with Radioactive Particle Tracking. Chem. Eng. J. 2013, 225, 818–836. [Google Scholar] [CrossRef]\n40. Askari, E.; Lemieux, G.S.P.; Vieira, C.B.; Litrico, G.; Proulx, P. Simulation of Bubbly Flow and Mass Transfer in a Turbulent Gas-Liquid Stirred Tank with CFD-PBM solver in OpenFOAM: EQMOM applicationg. In Proceedings of the 15th International Conference of Numerical Analysis and Applied Mathematics, Thessaloniki, Greece, 25–30 September 2017. [Google Scholar]\n41. OpenQBMM. An open-source implementation of Quadrature-Based Moment Methods. Zenodo 2017. [Google Scholar] [CrossRef]\n42. Schiller, L.; Naumann, Z. A drag coefficient correlation. Z. Ver. Deutsch. Ing. 1935, 77, 318–320. [Google Scholar]\n43. Ishii, M.; Zuber, N. Drag coefficient and relative velocity in bubbly, droplet or particulate flows. AIChE J. 1979, 25, 843–855. [Google Scholar] [CrossRef]\n44. Tomiyama, A.; Celata, G.; Hosokawa, S.; Yoshida, S. Terminal velocity of single bubbles in surface tension force dominant regime. Int. J. Multiph. Flow 2002, 28, 1497–1519. [Google Scholar] [CrossRef]\n45. Behzadi, B.; Issa, R.I.; Rusche, H. Modelling of dispersed bubble and droplet flow at high phase fractions. Chem. Eng. Sci. 2004, 59, 759–770. [Google Scholar] [CrossRef]\n46. Luo, H.; Svendsen, H.F. Theoretical model for drop and bubble breakup in turbulent dispersions. AIChE J. 1996, 42, 1225–1233. [Google Scholar] [CrossRef]\n47. Hagesather, L.; Jakobsen, H.A.; Hjarbo, K.; Svendsen, H.F. A coalescence and breakup module for implementation in CFD codes. Comput. Aided Chem. Eng. 2000, 8, 367–372. [Google Scholar]\n48. Saffman, P.G.; Turner, J.S. On the collision of drops in turbulent clouds. J. Fluid Mech. 1956, 1, 16–30. [Google Scholar] [CrossRef]\n49. Marchisio, D.L.; Fox, R.O. Multiphase Reacting Flows: Modelling and Simulation; Springer: NewYork, NU, USA, 2007. [Google Scholar]\n50. Ramkrishna, D. Population Balances; Academic Press: San Diego, CA, USA, 2000. [Google Scholar]\n51. Abraham, F. Homogeneous Nucleation Theory; Academic Press: New York, NY, USA, 1974. [Google Scholar]\n52. Tomasoni, F. Non-Intrusive Assessment of Transport Phenomena at Gas-Evolving Electrodes. Ph.D. Thesis, Vrije Universiteit Brussel, Brussels, Belgium, 2010. [Google Scholar]\n53. Lo, S. Application of Population Balance to CFD Modeling of Bubbly Flow via the MUSIG Model; AEA Technology: Harwell, UK, 1996; p. 1096. [Google Scholar]\n54. Yuan, C.; Kong, B.; Passalacqua, A.; Fox, R.O. An extended quadrature-based mass-velocity moment model for polydisperse bubbly flows. Can. J. Chem. Eng. 2014, 92, 2053–2066. [Google Scholar] [CrossRef]\n55. Fan, R.; Marchisio, D.L.; Fox, R.O. Application of the direct quadrature method of moments to polydisperse gas–solid fluidized beds. Powder Technol. 2004, 139, 7–20. [Google Scholar] [CrossRef]\n56. Bove, S. Computational Fluid Dynamics of Gas–Liquid Flows Including Bubble Population Balances. Ph.D. Thesis, Aalborg University, Aalborg, Denmark, 2005. [Google Scholar]\n57. Nguyen, T.T.; Laurent, F.; Fox, R.O.; Massot, M. Solution of population balance equations in applications with fine particles: Mathematical modeling and numerical schemes. J. Comput. Phys. 2016, 325, 129–156. [Google Scholar] [CrossRef]\n58. Madadi-Kandjani, E.; Passalacqua, A. An extended quadrature-based moment method with log-normal kernel density functions. Chem. Eng. Sci. 2015, 131, 323–339. [Google Scholar] [CrossRef]\n59. Kerdouss, F.; Bannari, A.; Proulx, P. Two-phase mass transfer coefficient prediction in stirred vessel with a CFD model. Comput. Chem. Eng. 2007, 32, 1943–1955. [Google Scholar] [CrossRef]\n60. Kerdouss, F.; Kiss, L.; Proulx, P.; Bilodeau, J.F.; Dupuis, C. Mixing Characteristics of an axial flow rotor: Experimental and numerical study. Int. J. Chem. React. Eng. 2005, 3. [Google Scholar] [CrossRef]\n61. OpenFOAM 4.0; The OpenFOAM Foundation: London, UK, 2017.\n62. Pfleger, D.; Gomes, S.; Gilbert, N.; Wagner, H.G. Hydrodynamic simulations of laboratory scale bubble columns. Fundamental studies of the Eulerian–Eulerian modeling approach. Chem. Eng. Sci. 1999, 54, 5091–5099. [Google Scholar] [CrossRef]\n63. Buwa, V.V.; Deo, D.S.; Ranade, V.V. Eulerian–Lagrangian simulations of unsteady gas–liquid flows in bubble columns. Int. J. Multiph. Flow 2006, 32, 864–885. [Google Scholar] [CrossRef]\n64. Deen, N.G. An Experimental and Computational Study of Fluid Dynamics in Gas-Liquid Chemical Reactors. Ph.D. Thesis, Aalborg University Esbjerg, Esbjerg, Denmark, 2001. [Google Scholar]\n65. Van Parys, H.; Tourwe, E.; Breugelmans, T.; Depauw, M.; Deconinck, J.; Hubin, A. Modeling of mass and charge transfer in an inverted rotating disk electrode (IRDE) reactor. J. Electroanal. Chem. 2009, 622, 44–50. [Google Scholar] [CrossRef]\n66. Nierhaus, T.; Parys, H.V.; Dehaeck, S.; Beeck, J.V.; Deconinck, H.; Deconinck, J.; Hubinc, A. Simulation of the Two-Phase Flow Hydrodynamics in an IRDE Reactor. J. Electrochem. Soc. 2009, 156, 139–148. [Google Scholar] [CrossRef]\n67. SuperMarine. Available online: https://github.com/Spationaute/SuperMarine (accessed on 8 January 2018).\n68. Cochran, W.G. The flow due to a rotating disc. Math. Proc. Camb. Philos. Soc. 1934, 30, 365–375. [Google Scholar] [CrossRef]\nFigure 1. (a) Dimension and boundary conditions in the bubble column and (b) mesh.\nFigure 1. (a) Dimension and boundary conditions in the bubble column and (b) mesh.\nFigure 2. Profile of axial liquid velocity through a line at y = 37 cm from the bottom of the bubble column. (a) The variation of primary and secondary nodes and their effects on the predicted velocity profile. (b) The comparison among CM (classes), DQMOM (3 nodes), EQMOM (3 nodes) and EQMOM (2 nodes).\nFigure 2. Profile of axial liquid velocity through a line at y = 37 cm from the bottom of the bubble column. (a) The variation of primary and secondary nodes and their effects on the predicted velocity profile. (b) The comparison among CM (classes), DQMOM (3 nodes), EQMOM (3 nodes) and EQMOM (2 nodes).\nFigure 3. Experimental snapshot of a meandering bubble plume by Buwa et al. and the predicted Sauter mean diameter using DQMOM (), EQMOM and CM.\nFigure 3. Experimental snapshot of a meandering bubble plume by Buwa et al. and the predicted Sauter mean diameter using DQMOM (), EQMOM and CM.\nFigure 4. Number density function in water zone (liquid phase) using EQMOM (a) $N α = 2$ and (b) $N α = 3$.\nFigure 4. Number density function in water zone (liquid phase) using EQMOM (a) $N α = 2$ and (b) $N α = 3$.\nFigure 5. (a) Dimension and boundary condition in the bubble column (Deen ) and (b) the mesh (13,500 cells) in the case of Deen .\nFigure 5. (a) Dimension and boundary condition in the bubble column (Deen ) and (b) the mesh (13,500 cells) in the case of Deen .\nFigure 6. Comparison between EQMOM and QMOM against experimental data: (a) axial gas velocity and (b) axial liquid velocity for the case of Deen .\nFigure 6. Comparison between EQMOM and QMOM against experimental data: (a) axial gas velocity and (b) axial liquid velocity for the case of Deen .\nFigure 7. Color maps of time-averaged Sauter diameter along the plane located in the middle of the column of Deen .\nFigure 7. Color maps of time-averaged Sauter diameter along the plane located in the middle of the column of Deen .\nFigure 8. (a) Schematic of hexahedral mesh . (b) The specifications of the reactor and (c) the location of volume W1.\nFigure 8. (a) Schematic of hexahedral mesh . (b) The specifications of the reactor and (c) the location of volume W1.\nFigure 9. (a) The continuous distribution function imposed at the electrode surface (Nierhaus et al. ); (b) mean axial velocity component profile $u z * = u z ω z ν$ and comparison to the analytical solution.\nFigure 9. (a) The continuous distribution function imposed at the electrode surface (Nierhaus et al. ); (b) mean axial velocity component profile $u z * = u z ω z ν$ and comparison to the analytical solution.\nFigure 10. Bubble size distribution in W1 for (a) EQMOM (three nodes) and rpm = 100; (b) EQMOM (three nodes) and rpm = 250.\nFigure 10. Bubble size distribution in W1 for (a) EQMOM (three nodes) and rpm = 100; (b) EQMOM (three nodes) and rpm = 250.\nTable 1. The most remarkable studies in the field of bubbly flow modeling using Population Balance Model (PBM). CM, Method of Classes; EQMOM, Extended Quadrature Method of Moments; DQMOM, Direct Quadrature Method of Moments.\nTable 1. The most remarkable studies in the field of bubbly flow modeling using Population Balance Model (PBM). CM, Method of Classes; EQMOM, Extended Quadrature Method of Moments; DQMOM, Direct Quadrature Method of Moments.\nReferenceTest CasePBMHypothesesRemarks\nBannari et al. bubble columnCMaccumulation, advection, coalescence, breakageConstant mean bubble size does not give satisfactory results compared to those based on PBM; 25 classes give better results\nGimbun et al. gas-liquid stirred tankQMOMaccumulation, coalescence, breakageBetter agreement is achieved using PBM compared to a uniform bubble size\nLi et al. liquid-liquid stirred tankEQMOM and QMOMaccumulation, advection, coalescence, breakageSimilar predictions for EQMOM and QMOM; EQMOM provides a continuous BSD\nSelma et al. gas-liquid stirred tank; bubble columnDQMOM and CMaccumulation, advection, coalescence, breakageHigh number of classes is required; CM is computationally heavy; DQMOM is much more efficient (computationally) compared to CM\nGupta and Roy bubble columnDQMOM and QMOMaccumulation, coalescence, breakageA summary of studies done on bubble columns flow modeling using PBM; no significant difference between DQMOM and QMOM\nAskari et al. gas-liquid stirred tankEQMOMaccumulation, coalescence, breakageThe agreement between experimental data and simulation results using EQMOM; reconstruction of bubble size distribution\nTable 2. An overview of locally polydisperse PBMs. NDF, Number Density Function.\nTable 2. An overview of locally polydisperse PBMs. NDF, Number Density Function.\nCMIntuitive and accurateComputationally intensive\nQMOMWide range of bubble sizes with a reduced computational costDisabled in case of null internal coordinates\nDQMOMWide range of bubble sizes with a reduced computational costShortcomings related to non-conservative quantities (weights and abscissas)\nEQMOMWide range of bubble sizes with a reduced computational cost (ONLYcompared to CM) and reconstruction capability of continuous NDFHeavy computation compared to QMOM and DQMOM\nTable 3. Governing equations of the CFD-PBM model.\nTable 3. Governing equations of the CFD-PBM model.\nEquationFormulation\nContinuity (single-phase)$∂ ρ ∂ t + ∇ · ρ U = 0$\nMomentum (single-phase)$∂ ∂ t ρ U + ∇ · ( ρ U U ) = − ∇ p + ∇ · τ ¯ ¯ effi$\nContinuity (multi-phase)$∂ ∂ t ρ i α i + ∇ · α i ρ i U i = 0.0$\nReynolds stress tensor$τ ¯ ¯ effi = μ lam + μ t ∇ U + ∇ U T − 2 3 ρ k + μ lam + μ t ∇ · U I ¯ ¯$\nMomentum (multi-phase)$∂ ∂ t ρ i α i U i + ∇ · α i ρ i U i U i = − α i ∇ p + ∇ · ( α i τ ¯ ¯ effi , i ) + R i + F i + α i ρ i g$\nInterfacial momentum exchange$R G = − R L = R G , drag + R G , lift + R G , vm$\nLiquid-gas exchange coefficient$K = 3 4 ρ L α G C D d 32 ∣ U G − U L ∣ ( U G − U L ) + α G C l ρ L U r × ( ∇ × U L ) + α L C vm ρ L D L U L D t − D G U G D t$\nSchiller–Naumann drag coefficient $C D = 24 Re 1 + 0.15 Re 0.687 Re ≤ 1000 0.44 otherwise$\nIshii–Zuber drag coefficient $C D = max { min [ 2 3 Eo , 8 3 ] , 24 Re ( 1 + 0.1 Re 0.75 ) }$\nTomiyama lift coefficient $C l = min ( 0.288 tanh ( 0.121 Re ) , f ( Eo G ) ) Eo G < 4 f ( Eo G ) 4 ≤ Eo G ≤ 10.7$\nMixture k-$ϵ$ model $∂ ∂ t ρ m k m + ∇ · ρ m U m k m = ∇ · μ t , m σ k ∇ k m + P k m − ρ m ϵ m + S k m$\n$∂ ∂ t ρ m ϵ m + ∇ · ρ m U m ϵ m = ∇ · μ t , m σ ϵ ∇ k m + ϵ m k m C 1 ϵ G k , m − C 2 ϵ ρ m ϵ m + C ϵ 3 ϵ m ϵ k S k m$\nBreak-up rate function $Ω B ( d j : d i ) = − 3 k 1 ( 1 − α ) 11 b 8 / 11 n j ϵ d j 2 1 / 3 { Γ ( 8 / 11 , t m ) − Γ ( 8 / 11 , b ) + 2 b 3 / 11 ( Γ ( 5 / 11 , t m ) − Γ ( 5 / 11 , b ) )$\n$+ b 6 / 11 ( Γ ( 2 / 11 , t m ) − Γ ( 2 / 11 , b ) ) }$\nCoalescence rate $β ( d i , d j ) = θ i j P c$\nCoalescence frequency $θ ( i , j ) = π 4 n i n j ( d i + d j ) 2 ϵ 1 / 3 d i 2 / 3 + d j 2 / 3 1 / 2$\nCoalescence efficiency $P C ( d i , d j ) = exp − c 0.75 ( 1 + ξ i j 2 ) ( 1 + ξ i j 3 ) 1 / 2 ( ρ d / ρ c + 0.5 ) 1 / 2 ( 1 + ξ i j ) 3 We i j 1 / 2$\nTable 4. Values of r and s used in different classes.\nTable 4. Values of r and s used in different classes.\nNumber of Classes7111525\nValue of r35712\nValue of s21.51571.34591.1892\nTable 5. Values of weights used in Gaussian quadrature.\nTable 5. Values of weights used in Gaussian quadrature.\n$W 1$$W 2$$W 3$$W 4$$W 5$\n$35 + 2 70 63$$35 − 2 70 63$0$− 35 − 2 70 63$$− 35 + 2 70 63$\nTable 6. Boundary and initial condition for $f i$ equations.\nTable 6. Boundary and initial condition for $f i$ equations.\nBoundary ConditionsInitial Condition\nInletWallOutletInlet value\n$f i = 1 i = 2 r 0 i ≠ 2 r$NeumannNeumann\nTable 7. Boundary conditions, initial conditions and divergence scheme corresponding $m i$ equations.\nTable 7. Boundary conditions, initial conditions and divergence scheme corresponding $m i$ equations.\nBoundary ConditionsInitial Condition\nInletWallOutletInlet value\nEquation (32)NeumannNeumann\nTable 8. Boundary conditions and initial condition for DQMOM equations.\nTable 8. Boundary conditions and initial condition for DQMOM equations.\nBoundary ConditionsInitial Condition\nInletWallOutletInlet value\n$L i$ and $W i$ corresponding to $m i$NeumannNeumann\nTable 9. Models used in the simulation of the bubble column of Pfleger et al. . TFM, Two-Fluid Model.\nTable 9. Models used in the simulation of the bubble column of Pfleger et al. . TFM, Two-Fluid Model.\nSettingsModel\nTwo-phase flowTwo-fluid model (TFM)\nDragSchiller and Naumann \nLiftTomiyama et al. \nVirtual mass$C v m = 0.25$ \nTurbulenceStandard k-$ϵ$ model\nPopulation balanceCM and EQMOM\nCoalescenceHagesather et al. \nBreakageLuo and Svendsen \nTable 10. Boundary and initial conditions for $f i$ equations (25 classes).\nTable 10. Boundary and initial conditions for $f i$ equations (25 classes).\nBoundary ConditionsInitial Condition\nInletWallOutletInlet value\n$f i = 1 i = 12 0 i ≠ 12$NeumannNeumann\nTable 11. Boundary and initial conditions for $m i$ equations used in the QMOM and EQMOM methods (Test Cases I and II).\nTable 11. Boundary and initial conditions for $m i$ equations used in the QMOM and EQMOM methods (Test Cases I and II).\nBoundary ConditionsInitial Condition\nInletWallOutletInlet value\n$m i = 1 i = 0 5 i = 1 25 i = 2 125 i = 3 625 i = 4 3125 i = 5 15,625 i = 5$NeumannNeumann\nTable 12. Boundary and initial conditions for $W i$ and $L i$ equations used in the DQMOM method .\nTable 12. Boundary and initial conditions for $W i$ and $L i$ equations used in the DQMOM method .\nBoundary ConditionsInitial Condition\nInletWallOutlet$W i = 0.33 i = 0 0.33 i = 1 0.34 i = 2$ $L i = 0.001 i = 0 0.002 i = 1 0.003 i = 2$\n$W i = 0.1667 i = 0 0.6667 i = 1 0.1667 i = 2$ $L i = 3.26 i = 0 5.00 i = 1 6.73 i = 2$NeumannNeumann\nTable 13. Overview of the models used in the solver.\nTable 13. Overview of the models used in the solver.\nSettingsModel\nTwo-phase flowTwo-fluid model\nDragIshii and Zuber \nLift$C l = 0.5$\nVirtual mass$C v m = 0.5$\nPopulation balanceEQMOM and QMOM\nCoalescenceHagesather et al. \nBreakageLuo and Svendsen \nTable 14. Models used in the simulations of Test Case 3.\nTable 14. Models used in the simulations of Test Case 3.\nSettingsModel\nsingle-phase flow-\nlaminar-\npopulation balanceEQMOM\ncoalescenceno\nbreakageno\nTable 15. Boundary and initial condition for $m i$ equations used in Test Case 3.\nTable 15. Boundary and initial condition for $m i$ equations used in Test Case 3.\nBoundary ConditionsInitial Condition\nInletWallOutletInlet value\n$m i =$ $1 i = 0 145 i = 1 26,801 i = 2 6.31 × 10 6 i = 3 1.89 × 10 9 i = 4 7.26 × 10 11 i = 5 3.54 × 10 14 i = 6$NeumannNeumann\nTable 16. Normalized computational costs of applied PBMs in Test Cases 1 and 2.\nTable 16. Normalized computational costs of applied PBMs in Test Cases 1 and 2.\nCaseDQMOM CM (25 Classes)QMOM (n = 3)EQMOM (n = 2)EQMOM (n = 3)\nTest Case 115-1.31.4\nTest Case 2--1-1.5\n\n## Share and Cite\n\nMDPI and ACS Style\n\nAskari, E.; Proulx, P.; Passalacqua, A. Modelling of Bubbly Flow Using CFD-PBM Solver in OpenFOAM: Study of Local Population Balance Models and Extended Quadrature Method of Moments Applications. ChemEngineering 2018, 2, 8. https://doi.org/10.3390/chemengineering2010008\n\nAMA Style\n\nAskari E, Proulx P, Passalacqua A. Modelling of Bubbly Flow Using CFD-PBM Solver in OpenFOAM: Study of Local Population Balance Models and Extended Quadrature Method of Moments Applications. ChemEngineering. 2018; 2(1):8. https://doi.org/10.3390/chemengineering2010008\n\nChicago/Turabian Style\n\nAskari, Ehsan, Pierre Proulx, and Alberto Passalacqua. 2018. \"Modelling of Bubbly Flow Using CFD-PBM Solver in OpenFOAM: Study of Local Population Balance Models and Extended Quadrature Method of Moments Applications\" ChemEngineering 2, no. 1: 8. https://doi.org/10.3390/chemengineering2010008" ]
[ null, "https://px.ads.linkedin.com/collect/", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.58911407,"math_prob":0.9776254,"size":19999,"snap":"2023-14-2023-23","text_gpt3_token_len":6265,"char_repetition_ratio":0.16299075,"word_repetition_ratio":0.090102874,"special_character_ratio":0.2899645,"punctuation_ratio":0.27668846,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99764204,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-08T15:10:03Z\",\"WARC-Record-ID\":\"<urn:uuid:d0818315-e948-493a-a595-17be581eb868>\",\"Content-Length\":\"482486\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e7aa06d5-a43a-4e23-8f12-d773e3cc903d>\",\"WARC-Concurrent-To\":\"<urn:uuid:1465a494-556f-4cb1-bac0-fc48a7067a9d>\",\"WARC-IP-Address\":\"104.18.25.151\",\"WARC-Target-URI\":\"https://www.mdpi.com/2305-7084/2/1/8\",\"WARC-Payload-Digest\":\"sha1:ZU3KSFTFEN2WPSGDA5U7JLRHH2SD7LJA\",\"WARC-Block-Digest\":\"sha1:7NJG3I37FJSJ7JKQIXM3AD352AKIBN2U\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224655027.51_warc_CC-MAIN-20230608135911-20230608165911-00005.warc.gz\"}"}
https://slideplayer.com/slide/4645583/
[ "", null, "# 5.7 Parallel and Perpendicular Lines\n\n## Presentation on theme: \"5.7 Parallel and Perpendicular Lines\"— Presentation transcript:\n\n5.7 Parallel and Perpendicular Lines\nParallel Lines - 2 lines that never intersect They have the same slope m1 = m2 They have different y-intercepts b1 ≠ b2 Perpendicular Lines - 2 lines that intersect They create 4 right angles They have different slopes (m1)(m2) = -1 They can have the same y-intercept\n\nIdentify the lines as parallel or perpendicular.\nEx A) 2x + 5y = x + 10y = 18 Line 1 Line 2 2x + 5y = 7 4x + 10y = 18 -2x -2x -4x -4x 5y = -2x + 7 10y = -4x + 18 5 5 5 10 10 10 Parallel\n\nEx B) Line 1 Line 2 3x + 6y = 8 -3x -3x 6y = -3x + 8 6 6 6\n(m1)(m2) = -1 Perpendicular\n\nWrite an equation in slope-intercept form that is parallel to the given line and\npasses through the given point. Ex C) Point-Slope Form Slope-Intercept Form\n\nWrite an equation in slope-intercept form that is parallel to the given line and\npasses through the given point. Ex D)\n\nPoint-Slope Form Slope-Intercept Form\n\nEx E) m= opposite and reciprocal\nWrite an equation in slope-intercept form that is perpendicular to the given line and passes through the given point. Ex E) m= opposite and reciprocal Point-Slope Form Slope-Intercept Form\n\nWrite an equation in slope-intercept form that is perpendicular to the given line\nand passes through the given point. Ex F)\n\nPoint-Slope Form Slope-Intercept Form" ]
[ null, "https://slideplayer.com/static/blue_design/img/slide-loader4.gif", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8380285,"math_prob":0.99582595,"size":1386,"snap":"2023-40-2023-50","text_gpt3_token_len":429,"char_repetition_ratio":0.14109986,"word_repetition_ratio":0.27237353,"special_character_ratio":0.2965368,"punctuation_ratio":0.033962265,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9976169,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-22T01:11:11Z\",\"WARC-Record-ID\":\"<urn:uuid:a7850f25-6a5d-4117-8645-2ec33572011e>\",\"Content-Length\":\"158882\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8e6ecf3e-ba98-4a5a-8606-9b389a56461f>\",\"WARC-Concurrent-To\":\"<urn:uuid:afbce004-0baf-47b0-b0eb-46528df68586>\",\"WARC-IP-Address\":\"144.76.153.40\",\"WARC-Target-URI\":\"https://slideplayer.com/slide/4645583/\",\"WARC-Payload-Digest\":\"sha1:IBBPAVHJ2SNZPPBBUX62HJV4Z4SZJTLQ\",\"WARC-Block-Digest\":\"sha1:CJJYVAXQH5HX3EBUF74K3S6OSMJG7T6B\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233506320.28_warc_CC-MAIN-20230922002008-20230922032008-00342.warc.gz\"}"}
https://en.natekohl.net/w/cpp
[ "# C++ reference\n\nC++\n Language Standard Library Headers Freestanding and hosted implementations Named requirements Language support library Concepts library (C++20) Diagnostics library Utilities library Strings library Containers library Iterators library Ranges library (C++20) Algorithms library Numerics library Input/output library Localizations library Regular expressions library (C++11) Atomic operations library (C++11) Thread support library (C++11) Filesystem library (C++17) Technical Specifications\n\n Feature test macros (C++20) Concepts library (C++20) Smart pointers and allocators Date and time Function objects  −  hash (C++11) String conversions (C++17) Utility functions pair  −   tuple (C++11) optional (C++17)  −  any (C++17) variant (C++17)  −  format (C++20) basic_string basic_string_view (C++17) Null-terminated strings:   byte  −  multibyte  −  wide array (C++11)  −  vector map  −  unordered_map (C++11) priority_queue  −  span (C++20) Other containers:   sequence  −   associative   unordered associative  −  adaptors Ranges library (C++20) Regular expressions library (C++11) Atomic operations library (C++11) atomic  −  atomic_flag atomic_ref (C++20) Thread support library (C++11) Filesystem library (C++17) Technical specifications   Standard library extensions  (library fundamentals TS)   Standard library extensions v2  (library fundamentals TS v2)   Concurrency library extensions  (concurrency TS)   Concepts  (concepts TS)   Ranges  (ranges TS)   Transactional Memory  (TM TS) External Links  −  Non-ANSI/ISO Libraries  −  Index  −  std Symbol Index" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.53067106,"math_prob":0.501434,"size":641,"snap":"2019-35-2019-39","text_gpt3_token_len":155,"char_repetition_ratio":0.19309261,"word_repetition_ratio":0.0,"special_character_ratio":0.25585023,"punctuation_ratio":0.011764706,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9724414,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-17T02:50:10Z\",\"WARC-Record-ID\":\"<urn:uuid:7ff0c4bd-ff14-4c74-9729-3243d4b89ddb>\",\"Content-Length\":\"33985\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ed4eb823-19a2-4f4c-9d35-5cfb515c0aac>\",\"WARC-Concurrent-To\":\"<urn:uuid:ffa2e911-d881-4af9-a98c-09c4d64d6b35>\",\"WARC-IP-Address\":\"74.114.89.93\",\"WARC-Target-URI\":\"https://en.natekohl.net/w/cpp\",\"WARC-Payload-Digest\":\"sha1:WZOGNBYDEGOEUSYYQBMDFHEFMJJAFVJE\",\"WARC-Block-Digest\":\"sha1:TP7P4PRV5URVISAJON3V6HXFAXUU2XW3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514573011.59_warc_CC-MAIN-20190917020816-20190917042816-00380.warc.gz\"}"}
https://astropy4cambridge.readthedocs.io/en/latest/_static/Astropy%20-%20Unit%20Conversion%20-%20Solutions.html
[ "# Astropy: Unit Conversion - Solutions¶\n\n## Level 1¶\n\nWhat is 1 barn megaparsecs in teaspoons?\n\nIn :\nfrom astropy import units as u\nfrom astropy.units import imperial\n\nIn :\n(1. * u.barn * u.Mpc).to(imperial.tsp)\n\nOut:\n$0.62603503 \\; \\mathrm{tsp}$\n\n## Level 2¶\n\nWhat is 3 nm^2 Mpc / m^3 in dimensionless units?\n\nIn :\n(3. * u.nm**2 * u.Mpc / u.m**3).decompose()\n\nOut:\n$92570.327 \\; \\mathrm{}$\n\nor to just get the numerical value:\n\nIn :\n(3. * u.nm**2 * u.Mpc / u.m**3).decompose().value\n\nOut:\n92570.32744401575\n\n### Level 3¶\n\nTry and use equivalencies to find the doppler shifted wavelength of a line at 454.4nm if the object is moving at a velocity of 510km/s away from the observer.\n\nIn :\n(510. * u.km / u.s).to(u.nm, equivalencies=u.doppler_optical(454.4 * u.nm))\n\nOut:\n$455.17301 \\; \\mathrm{nm}$" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.60792965,"math_prob":0.9578539,"size":559,"snap":"2019-51-2020-05","text_gpt3_token_len":189,"char_repetition_ratio":0.113513514,"word_repetition_ratio":0.046511628,"special_character_ratio":0.33631486,"punctuation_ratio":0.21830986,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9675485,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-27T03:49:50Z\",\"WARC-Record-ID\":\"<urn:uuid:40a2ab3b-641b-45e5-b72f-b308d54e47ae>\",\"Content-Length\":\"195949\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:10c9f7bd-2b2b-41af-a9af-5a1acbc76b2a>\",\"WARC-Concurrent-To\":\"<urn:uuid:8437d12d-3179-4b4f-bde8-345872ce6d62>\",\"WARC-IP-Address\":\"104.208.221.96\",\"WARC-Target-URI\":\"https://astropy4cambridge.readthedocs.io/en/latest/_static/Astropy%20-%20Unit%20Conversion%20-%20Solutions.html\",\"WARC-Payload-Digest\":\"sha1:DGSSXM6CP52XTEB255NE3MYE4SMD7I66\",\"WARC-Block-Digest\":\"sha1:AAUASM7NCGWQ4ZH3XU4JXKX3TORIWYMT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251694176.67_warc_CC-MAIN-20200127020458-20200127050458-00231.warc.gz\"}"}
https://www.nag.com/numeric/py/nagdoc_latest/_modules/naginterfaces/library/dot.html
[ "# Source code for naginterfaces.library.dot\n\n# -*- coding: utf-8 -*-\nr\"\"\"\nModule Summary\n--------------\nInterfaces for the NAG Mark 28.5 dot Chapter.\n\ndot - Inner Products\n\nThis module is concerned with the calculation of innerproducts required by other functions within the NAG Library.\n\nFunctionality Index\n-------------------\n\nComplex inner product added to initial value, basic/additional precision: :meth:complex_prec\n\nReal inner product added to initial value, basic/additional precision: :meth:real_prec\n\nFor full information please refer to the NAG Library document\n\nhttps://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/x03/x03intro.html\n\"\"\"\n\n# NAG Copyright 2017-2022.\n\n[docs]def real_prec(a, b, c1, c2, sw):\nr\"\"\"\nreal_prec calculates the value of a scalar product using basic precision or additional precision and adds it to a basic precision or additional precision initial value.\n\n.. _x03aa-py2-py-doc:\n\nFor full information please refer to the NAG Library document for x03aa\n\nhttps://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/x03/x03aaf.html\n\n.. _x03aa-py2-py-parameters:\n\n**Parameters**\n**a** : float, array-like, shape :math:\\left(n\\right)\nThe elements of the first vector.\n\n**b** : float, array-like, shape :math:\\left(n\\right)\nThe elements of the second vector.\n\n**c1** : float\n:math:\\mathrm{c1} and :math:\\mathrm{c2} must specify the initial value :math:c: :math:c = \\mathrm{c1}+\\mathrm{c2}. Normally, if :math:c is in additional precision, :math:\\mathrm{c1} specifies the most significant part and :math:\\mathrm{c2} the least significant part; if :math:c is in basic precision, then :math:\\mathrm{c1} specifies :math:c and :math:\\mathrm{c2} must have the value :math:0.0. Both :math:\\mathrm{c1} and :math:\\mathrm{c2} must be defined on entry.\n\n**c2** : float\n:math:\\mathrm{c1} and :math:\\mathrm{c2} must specify the initial value :math:c: :math:c = \\mathrm{c1}+\\mathrm{c2}. Normally, if :math:c is in additional precision, :math:\\mathrm{c1} specifies the most significant part and :math:\\mathrm{c2} the least significant part; if :math:c is in basic precision, then :math:\\mathrm{c1} specifies :math:c and :math:\\mathrm{c2} must have the value :math:0.0. Both :math:\\mathrm{c1} and :math:\\mathrm{c2} must be defined on entry.\n\n**sw** : bool\nThe precision to be used in the calculation.\n\n:math:\\mathrm{sw} = \\mathbf{True}\n\n:math:\\mathrm{sw} = \\mathbf{False}\n\nbasic precision.\n\n**Returns**\n**d1** : float\nThe result :math:d.\n\nIf the calculation is in additional precision (:math:\\mathrm{sw} = \\mathbf{True}),\n\n:math:\\mathrm{d1} = d rounded to basic precision;\n\n:math:\\mathrm{d2} = d-\\mathrm{d1},\n\nthus :math:\\mathrm{d1} holds the correctly rounded basic precision result and the sum :math:\\mathrm{d1}+\\mathrm{d2} gives the result in additional precision. :math:\\mathrm{d2} may have the opposite sign to :math:\\mathrm{d1}.\n\nIf the calculation is in basic precision (:math:\\mathrm{sw} = \\mathbf{False}),\n\n:math:\\mathrm{d1} = d;\n\n:math:\\mathrm{d2} = 0.0.\n\n**d2** : float\nThe result :math:d.\n\nIf the calculation is in additional precision (:math:\\mathrm{sw} = \\mathbf{True}),\n\n:math:\\mathrm{d1} = d rounded to basic precision;\n\n:math:\\mathrm{d2} = d-\\mathrm{d1},\n\nthus :math:\\mathrm{d1} holds the correctly rounded basic precision result and the sum :math:\\mathrm{d1}+\\mathrm{d2} gives the result in additional precision. :math:\\mathrm{d2} may have the opposite sign to :math:\\mathrm{d1}.\n\nIf the calculation is in basic precision (:math:\\mathrm{sw} = \\mathbf{False}),\n\n:math:\\mathrm{d1} = d;\n\n:math:\\mathrm{d2} = 0.0.\n\n.. _x03aa-py2-py-errors:\n\n**Raises**\n**NagValueError**\n(errno :math:1)\nOn entry, :math:\\textit{istepb} = \\langle\\mathit{\\boldsymbol{value}}\\rangle.\n\nConstraint: :math:\\textit{istepb} > 0.\n\n(errno :math:1)\nOn entry, :math:\\textit{istepa} = \\langle\\mathit{\\boldsymbol{value}}\\rangle.\n\nConstraint: :math:\\textit{istepa} > 0.\n\n(errno :math:2)\nOn entry, :math:\\textit{isizeb} = \\langle\\mathit{\\boldsymbol{value}}\\rangle, :math:n = \\langle\\mathit{\\boldsymbol{value}}\\rangle and :math:\\textit{istepb} = \\langle\\mathit{\\boldsymbol{value}}\\rangle.\n\nConstraint: :math:\\textit{isizeb}\\geq \\left(n-1\\right)\\times \\textit{istepb}+1.\n\n(errno :math:2)\nOn entry, :math:\\textit{isizea} = \\langle\\mathit{\\boldsymbol{value}}\\rangle, :math:n = \\langle\\mathit{\\boldsymbol{value}}\\rangle and :math:\\textit{istepa} = \\langle\\mathit{\\boldsymbol{value}}\\rangle.\n\nConstraint: :math:\\textit{isizea}\\geq \\left(n-1\\right)\\times \\textit{istepa}+1.\n\n.. _x03aa-py2-py-notes:\n\n**Notes**\nNo equivalent traditional C interface for this routine exists in the NAG Library.\n\nreal_prec calculates the scalar product of two float vectors and adds it to an initial value :math:c to give a correctly rounded result :math:d:\n\n.. math::\nd = c+\\sum_{{i = 1}}^na_ib_i\\text{.}\n\nIf :math:n < 1, :math:d = c.\n\nThe vector elements :math:a_i and :math:b_i are stored in selected elements of the one-dimensional array arguments :math:\\mathrm{a} and :math:\\mathrm{b}.\n\nBoth the initial value :math:c and the result :math:d are defined by a pair of float variables, so that they may take either basic precision or additional precision values.\n\n(a) If :math:\\mathrm{sw} = \\mathbf{True}, the products are accumulated in additional precision, and on exit the result is available either in basic precision, correctly rounded, or in additional precision.\n\n(#) If :math:\\mathrm{sw} = \\mathbf{False}, the products are accumulated in basic precision, and the result is returned in basic precision.\n\nThis function is designed primarily for use as an auxiliary function by other functions in the NAG Library, especially those in the modules on Linear Algebra.\n\"\"\"\nraise NotImplementedError\n\n[docs]def complex_prec(a, b, cx, sw):\nr\"\"\"\ncomplex_prec calculates the value of a complex scalar product using basic precision or additional precision and adds it to a complex initial value.\n\n.. _x03ab-py2-py-doc:\n\nFor full information please refer to the NAG Library document for x03ab\n\nhttps://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/x03/x03abf.html\n\n.. _x03ab-py2-py-parameters:\n\n**Parameters**\n**a** : complex, array-like, shape :math:\\left(n\\right)\nThe elements of the first vector.\n\n**b** : complex, array-like, shape :math:\\left(n\\right)\nThe elements of the second vector.\n\n**cx** : complex\nThe initial value :math:c.\n\n**sw** : bool\nThe precision to be used in the calculation.\n\n:math:\\mathrm{sw} = \\mathbf{True}\n\n:math:\\mathrm{sw} = \\mathbf{False}\n\nbasic precision.\n\n**Returns**\n**dx** : complex\nThe result :math:d.\n\n.. _x03ab-py2-py-errors:\n\n**Raises**\n**NagValueError**\n(errno :math:1)\nOn entry, :math:\\textit{istepb} = \\langle\\mathit{\\boldsymbol{value}}\\rangle.\n\nConstraint: :math:\\textit{istepb} > 0.\n\n(errno :math:1)\nOn entry, :math:\\textit{istepa} = \\langle\\mathit{\\boldsymbol{value}}\\rangle.\n\nConstraint: :math:\\textit{istepa} > 0.\n\n(errno :math:2)\nOn entry, :math:\\textit{isizeb} = \\langle\\mathit{\\boldsymbol{value}}\\rangle, :math:n = \\langle\\mathit{\\boldsymbol{value}}\\rangle and :math:\\textit{istepb} = \\langle\\mathit{\\boldsymbol{value}}\\rangle.\n\nConstraint: :math:\\textit{isizeb}\\geq \\left(n-1\\right)\\times \\textit{istepb}+1.\n\n(errno :math:2)\nOn entry, :math:\\textit{isizea} = \\langle\\mathit{\\boldsymbol{value}}\\rangle, :math:n = \\langle\\mathit{\\boldsymbol{value}}\\rangle and :math:\\textit{istepa} = \\langle\\mathit{\\boldsymbol{value}}\\rangle.\n\nConstraint: :math:\\textit{isizea}\\geq \\left(n-1\\right)\\times \\textit{istepa}+1.\n\n.. _x03ab-py2-py-notes:\n\n**Notes**\nNo equivalent traditional C interface for this routine exists in the NAG Library.\n\ncomplex_prec calculates the scalar product of two complex vectors and adds it to an initial value :math:c to give a correctly rounded result :math:d:\n\n.. math::\nd = c+\\sum_{{i = 1}}^na_ib_i\\text{.}\n\nIf :math:n < 1, :math:d = c.\n\nThe vector elements :math:a_i and :math:b_i are stored in selected elements of the one-dimensional array arguments :math:\\mathrm{a} and :math:\\mathrm{b}.\n\nThe products are accumulated in basic precision or additional precision depending on the argument :math:\\mathrm{sw}.\n\nThis function has been designed primarily for use as an auxiliary function by other functions in the NAG Library, especially those in the modules on Linear Algebra.\n\"\"\"\nraise NotImplementedError" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.5093175,"math_prob":0.99613893,"size":8412,"snap":"2022-40-2023-06","text_gpt3_token_len":2594,"char_repetition_ratio":0.20920552,"word_repetition_ratio":0.6621339,"special_character_ratio":0.3089634,"punctuation_ratio":0.25309005,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9998709,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-29T17:18:17Z\",\"WARC-Record-ID\":\"<urn:uuid:fb747603-ecb3-4738-97e4-a86c7fddef65>\",\"Content-Length\":\"18122\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ab93816d-c8fa-448d-befb-44226094b440>\",\"WARC-Concurrent-To\":\"<urn:uuid:594e33b0-8c59-4313-b62e-c023ba47962f>\",\"WARC-IP-Address\":\"78.129.168.4\",\"WARC-Target-URI\":\"https://www.nag.com/numeric/py/nagdoc_latest/_modules/naginterfaces/library/dot.html\",\"WARC-Payload-Digest\":\"sha1:MQFK4Z5T4IYI42XTPUWCG5U4CVA56E35\",\"WARC-Block-Digest\":\"sha1:XSGFU2ECMPVIH7YJP2KYH5FKV7KOC6IJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335362.18_warc_CC-MAIN-20220929163117-20220929193117-00106.warc.gz\"}"}
https://datatofish.com/create-pandas-dataframe/
[ "# How to Create Pandas DataFrame in Python\n\nIn this short guide, you’ll see two different methods to create Pandas DataFrame:\n\n• By typing the values in Python itself to create the DataFrame\n• By importing the values from a file (such as a CSV file), and then creating the DataFrame in Python based on the values imported\n\n## Method 1: typing values in Python to create Pandas DataFrame\n\nTo create Pandas DataFrame in Python, you can follow this generic template:\n\n```import pandas as pd\n\ndata = {'first_column': ['first_value', 'second_value', ...],\n'second_column': ['first_value', 'second_value', ...],\n....\n}\n\ndf = pd.DataFrame(data)\n\nprint (df)```\n\nNote that you don’t need to use quotes around numeric values (unless you wish to capture those values as strings).\n\nNow let’s see how to apply the above template using a simple example.\n\nTo start, let’s say that you have the following data about products, and that you want to capture that data in Python using Pandas DataFrame:\n\n product_name price laptop 1200 printer 150 tablet 300 desk 450 chair 200\n\nYou may then use the code below in order to create the DataFrame for our example:\n\n```import pandas as pd\n\ndata = {'product_name': ['laptop', 'printer', 'tablet', 'desk', 'chair'],\n'price': [1200, 150, 300, 450, 200]\n}\n\ndf = pd.DataFrame(data)\n\nprint (df)\n```\n\nRun the code in Python, and you’ll get the following DataFrame:\n\n`````` product_name price\n0 laptop 1200\n1 printer 150\n2 tablet 300\n3 desk 450\n4 chair 200\n``````\n\nYou may have noticed that each row is represented by a number (also known as the index) starting from 0. Alternatively, you may assign another value/name to represent each row.\n\nFor example, in the code below, the index=[‘product_1′,’product_2′,’product_3′,’product_4′,’product_5’] was added:\n\n```import pandas as pd\n\ndata = {'product_name': ['laptop', 'printer', 'tablet', 'desk', 'chair'],\n'price': [1200, 150, 300, 450, 200]\n}\n\ndf = pd.DataFrame(data, index=['product_1','product_2','product_3','product_4','product_5'])\n\nprint (df)\n```\n\nYou’ll now see the newly assigned index (as highlighted in yellow):\n\n`````` product_name price\nproduct_1 laptop 1200\nproduct_2 printer 150\nproduct_3 tablet 300\nproduct_4 desk 450\nproduct_5 chair 200\n``````\n\nLet’s now review the second method of importing the values into Python to create the DataFrame.\n\n## Method 2: importing values from a CSV file to create Pandas DataFrame\n\nYou may use the following template to import a CSV file into Python in order to create your DataFrame:\n\n```import pandas as pd\n\ndata = pd.read_csv(r'Path where the CSV file is stored\\File name.csv')\ndf = pd.DataFrame(data)\n\nprint (df)\n```\n\nLet’s say that you have the following data stored in a CSV file (where the CSV file name is ‘products’):\n\n product_name price laptop 1200 printer 150 tablet 300 desk 450 chair 200\n\nIn the Python code below, you’ll need to change the path name to reflect the location where the CSV file is stored on your computer.\n\nFor example, let’s suppose that the CSV file is stored under the following path:\n\n‘C:\\Users\\Ron\\Desktop\\products.csv’\n\nHere is the full Python code for our example:\n\n```import pandas as pd\n\ndf = pd.DataFrame(data)\n\nprint (df)\n```\n\nAs before, you’ll get the same Pandas DataFrame in Python:\n\n`````` product_name price\n0 laptop 1200\n1 printer 150\n2 tablet 300\n3 desk 450\n4 chair 200\n``````\n\nYou can also create the same DataFrame by importing an Excel file into Python using Pandas.\n\n## Find the maximum value in the DataFrame\n\nOnce you have your values in the DataFrame, you can perform a large variety of operations. For example, you may calculate stats using Pandas.\n\nFor instance, let’s say that you want to find the maximum price among all the products within the DataFrame.\n\nObviously, you can derive this value just by looking at the dataset, but the method presented below would work for much larger datasets.\n\nTo get the maximum price for our example, you’ll need to add the following portion to the Python code (and then print the results):\n\n```max_price = df['price'].max()\n```\n\nHere is the complete Python code:\n\n```import pandas as pd\n\ndata = {'product_name': ['laptop', 'printer', 'tablet', 'desk', 'chair'],\n'price': [1200, 150, 300, 450, 200]\n}\n\ndf = pd.DataFrame(data)\n\nmax_price = df['price'].max()\nprint (max_price)\n```\n\nOnce you run the code, you’ll get the value of 1200, which is indeed the maximum price:\n\n``````1200\n``````" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.72684246,"math_prob":0.8365792,"size":4348,"snap":"2022-27-2022-33","text_gpt3_token_len":1111,"char_repetition_ratio":0.1514733,"word_repetition_ratio":0.18221575,"special_character_ratio":0.2849586,"punctuation_ratio":0.14622642,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99396497,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-29T00:00:47Z\",\"WARC-Record-ID\":\"<urn:uuid:0f483389-8943-4697-b9d1-e68794b566a7>\",\"Content-Length\":\"46032\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fd8d7bae-7198-4a27-a3d8-5c6ed0ccaf99>\",\"WARC-Concurrent-To\":\"<urn:uuid:2b05b36e-10d9-48d0-a7fe-34871b4a05d3>\",\"WARC-IP-Address\":\"67.227.251.157\",\"WARC-Target-URI\":\"https://datatofish.com/create-pandas-dataframe/\",\"WARC-Payload-Digest\":\"sha1:7F76Y2HD74UQBIPWXIV4JN3FV64EFI73\",\"WARC-Block-Digest\":\"sha1:NIKIPL46X5D5VDMVPCVPFBMF37XEGV6E\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103619185.32_warc_CC-MAIN-20220628233925-20220629023925-00798.warc.gz\"}"}
https://hamnvag.no/alagoas-curassow-orvfp/236e82-bellman-ford-algorithm-tutorialspoint
[ "In this tutorial we will be using Bellman Ford algorithm to detect negative cycle in a weighted directed graph. This is exactly what Bellman-Ford do. – Before iteration , – Relaxation only decreases ’s remains true – Iteration considers all paths with edges when relaxing ’s incoming edges s … Bellman Ford algorithm. This doesn't acknowledge the Bellman-Ford Algorithm part of the question, but this is a simplified answer. Compute the link costs from the starting node to every directly connected node . Hence, the minimum distance between vertex s and vertex d is 20. The following example shows how Bellman-Ford algorithm works step by step. In the first step, all the vertices which are reachable from the source are updated by minimum cost. I know \"better\" is a broad statement, so specifically I mean in terms of speed and also space if that applies. The shortest path problem is about finding a path between \\$\\$2\\$\\$ vertices in a graph such that the total sum of the edges weights is minimum. http://www.youtube.com/watch?v=Ttezuzs39nk Algorithm Steps: 1. 2) Bellman-Ford works better (better than Dijksra’s) for distributed systems. Modify it so that it reports minimum distances even if there is a negative weight cycle. Now let's look at the technical terms first. analysis-and-design-algorithm-objective-questions-answers 1/2 Downloaded from www.gettinguxdone.com on December 12, 2020 by guest [Books] Analysis And Design Algorithm Objective Questions Answers Yeah, reviewing a book analysis and design algorithm objective questions answers could amass your close connections listings. This algorithm can be used on both weighted and unweighted graphs. Let us understand the algorithm with following example graph. 2. This problem could be solved easily using (BFS) if all edge weights were (\\$\\$1\\$\\$), but here weights can take any value. The above code is used to find the minimum distance between the Source node (A) to all the given nodes, via the Bellman Ford Algorithm where the matrix m is composed of the source nodes, matrix n consists of the destination nodes, and w reperesnts the corresponding weights of the edges connecting the source and destination. Unlike Dijksra’s where we need to find minimum value of all vertices, in Bellman-Ford, edges are considered one by one. Example However, Bellman-Ford and Dijkstra are both single-source, shortest-path algorithms. 1) This step initializes distances from source to all vertices as infinite and distance to source itself as 0. After the i-th iteration of outer loop, the shortest paths with at most i edges are calculated. Let the given source vertex be 0. Let all edges are processed in following order: (B,E), (D,B), (B,D), (A,B), (A,C), (D,C), (B,C), (E,D). This graph has a negative edge but does not have any negative cycle, hence the problem can be solved using this technique. Do following |V|-1 times where |V| is the number of vertices in given graph. Bellman Ford's Algorithm: We look at the distributed version which works on the premise that the information about far away nodes can be had from the adjoining links. This algorithm works correctly when some of the edges of the directed graph G may have negative weight. The third row shows distances when (A,C) is processed. Remember that Dijsktra's algorithm is for graphs with positive weights only. This means they only compute the shortest path from a single source. Unlike Dijkstra’s where we need to find the minimum value of all vertices, in Bellman-Ford, edges are considered one by one. The Ohio State University Raj Jain 5- 4 Rooting or Routing Rooting is what fans do at football games, what pics do for truffles under oak trees in the Vaucluse , and what nursery workers intent on propagation do to cuttings from plants. Metrics. The Floyd-Warshall algorithm is a shortest path algorithm for graphs. The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. Given a graph and a source vertex src in graph, find shortest paths from src to all vertices in the given graph. ; Bellman-Ford algorithm performs edge relaxation of all the edges for every node. You have to write a function to that the number of vertices, arrays cap, residual, and flow for the residual capacity matrix. If extract min function is implemented using linear search, the complexity of this algorithm is O(V2 + E). At the time of initialization, all the vertices except the source are marked by ∞ and the source is marked by 0 . But to find whether there is negative cycle or not we again do one more relaxation. The Ohio State University Raj Jain 5- 3 Routing Fig 9.5. If the graph contains negative-weight cycle, report it. Solves single shortest path problem in which edge weight may be negative but no negative cycle exists. Distance of any node from itself is always zero. The Floyd Warshall Algorithm is for solving the All Pairs Shortest Path problem. The main idea is to relax all the edges exactly n - 1 times (read relaxation above in dijkstra). Destination sequenced distance vector routing (DSDV) is a table driven routing protocol for MANET based on Bellman-Ford algorithm. Bellman-Ford Algorithm will work on logic that, if graph has n nodes, then shortest path never contain more than n-1 edges. algorithm documentation: Bellman-Ford-Algorithmus. Destination sequence number is added with every routing entry in the routing table maintained by each node. Bellman-Ford algorithm finds the distance in a bottom-up manner. Bellman Ford's Algorithm is similar to Dijkstra's algorithm but it can work with graphs in which edges can have negative weights. The problem is to find shortest distances between every pair of vertices in a given edge weighted directed Graph. Like the Bellman-Ford algorithm or the Dijkstra's algorithm, it computes the shortest path in a graph. 2) Bellman-Ford works better (better than Dijksra’s) for distributed systems. Based on the predecessor information, the path is s→ h→ e→ g→ c→ d, Deterministic vs. Nondeterministic Computations. The following example shows how Bellman-Ford algorithm works step by step. Bellman Ford algorithm is also simpler than Dijkstra and suites well for distributed systems. Dijkstra’s algorithm solves the single-source shortest-paths problem on a directed weighted graph G = (V, E), where all the edges are non-negative (i.e., w(u, v) ≥ 0 for each edge (u, v) Є E). http://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm This is exactly what Bellman-Ford do. If there is a negative weight cycle, then shortest distances are not calculated, negative weight cycle is reported. This work is licensed under Creative Common Attribution-ShareAlike 4.0 International The main difference between this algorithm with Dijkstra’s the algorithm is, in Dijkstra’s algorithm we cannot handle the negative weight, but here we can handle it easily. The Algorithm Platform License is the set of terms that are stated in the Software License section of the Algorithmia Application Developer and API License Agreement. In Distance Vector Routing(DVR), each node broadcasts a table containing its distance from nodes which are directly connected and based upon this, other nodes broadcasts the updated routing. Bellman Ford Algorithm: Given a source vertex s from set of vertices V in a weighted graph where its edge weights w(u, v) can be negative, find the shortest-path weights d(s, v) from given source s for all vertices v present in the graph. Iterative, asynchronous: each local iteration caused by: Local link cost change Distance vector update message from neighbor Distributed: Each node notifies neighbors only when its DV changes Neighbors then notify their neighbors if necessary wait for (change in local link cost or message from neighbor) recompute estima Notice the image by the original poster. It is enough to relax each edge (v-1) times to find shortest path. Create an array dist[] of size |V| with all values as infinite except dist[src] where src is … It is slower than Dijkstra's algorithm for the same problem, but more versatile, as it is capable of handling graphs in which some of the edge weights are negative numbers. Routing loops usually occur when any interface goes down or two-routers send updates at the same time. Following the same logic, in this step vertices b, f, c and g are updated. The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. Do following for each edge u-v Algorithm Following are the detailed steps. Initialize all distances as infinite, except the distance to source itself. It is slower than Dijkstra's algorithm for the same problem, but more versatile, as it is capable of handling graphs in which some of the edge weights are negative numbers. The next for loop runs |V - 1| passes over the edges, which takes O(E) times. For graphs with negative weight edges, Bellman–Ford algorithm can be used, we will soon be discussing it as a separate post. But under what circumstances is the Bellman-Ford algorithm better than the Dijkstra algorithm? It depends on the following concept: Shortest path contains at most n−1edges, because the shortest path couldn't have a cycle. But time complexity of Bellman Ford algorithm is O(VE), which is more than Dijkstra. This post about Bellman Ford Algorithm is a continuation of the post Shortest Path Using Dijkstra’s Algorithm. http://www.cs.arizona.edu/classes/cs445/spring07/ShortestPath2.prn.pdf. Destination Sequenced Distance Vector Routing protocol is a modified version of Bellman Ford Algorithm and is based upon the concepts of Distance Vector Routing. The first row in shows initial distances. There can be maximum |V| – 1 edges in any simple path, that is why the outer loop runs |v| – 1 times. Total number of vertices in the graph is 5, so all edges must be processed 4 times. A and B are False : The idea behind Prim’s algorithm is to construct a spanning tree - means all vertices must be connected but here vertices are disconnected C. False. The outer loop traverses from 0 : n−1. Exercise 1) The standard Bellman-Ford algorithm reports shortest path only if there is no negative weight cycles. The idea is to use Bellman Ford Algorithm. In this tutorial, you will understand the working on Bellman Ford's Algorithm in Python, Java and C/C++. Bellman Ford algorithm is useful in finding shortest path from a given source vertex to all the other vertices even if the graph contains a negative weight edge. Bellman-Ford Algorithm will work on logic that, if graph has n nodes, then shortest path never contain more than n-1 edges. Hence, as a solution Destination Sequenced Distance Vector Routing Protocol (DSDV) came into picture. It covers the types of graphs, their p 2) Boruvka’s algorithm is used as a step in a faster randomized algorithm that works in linear time O(E). ………………….dist[v] = dist[u] + weight of edge uv, 3) This step reports if there is a negative weight cycle in graph. ………………If dist[v] > dist[u] + weight of edge uv, then update dist[v] We get following distances when all edges are processed first time. In the following algorithm, we will use one function Extract-Min(), which extracts the node with the smallest key. Djikstra used this property in the opposite direction i.e we overestimate the distance of each vertex from the starting vertex. Exercise 1) The standard Bellman-Ford algorithm reports the shortest path only if there are no negative weight cycles. It first calculates the shortest distances which have at-most one edge in the path. Bellman‐Ford Correctness • Claim:After iteration of Bellman‐Ford, is at most the weight of every path from to using at most edges, for all . Bellman-Ford Algorithm is an algorithm for single source shortest path where edges can be negative (but if there is a cycle with negative weight, then this problem will be NP).. It is enough to relax each edge (v-1) times to find shortest path. These submissions had very limited usefulness because most real graph problems are sparse and most can be solved much more efficiently by a variant of the Bellman-Ford-Moore (BFM) algorithm which predates Dijkstra by 4 or 5 years. While learning about the Dijkstra’s way, we learnt that it is really efficient an algorithm to find the single source shortest path in any graph provided it has no negative weight edges and no negative weight cycles. bellman ford graphs shortest path Language. The number of iterations needed to find out the shortest path from source to all other vertices depends on the order that we select to relax the edges. Like Dijkstra’s shortest path algorithm, the Bellman Ford algorithm is guaranteed to find the shortest path in a graph. When there are no cycles of negative weight, then we can find out the shortest path between source and destination. Computer Networks - A computer network can be defined as a set of computers connected together for the purpose of sharing resources. ……If dist[v] > dist[u] + weight of edge uv, then “Graph contains negative weight cycle” Prim's is a greedy algorithm and At every step, it considers all the edges that connect the two sets, and picks the minimum weight edge from these edges. It is in a very reader-friendly tutorial style. Bellman Ford Algorithm to Calculate Shortest Paths - YouTube 1) The standard Bellman-Ford algorithm reports shortest path only if there is no negative weight cycles. What is a Negative cycle? This graph has a negative edge but does not have any negative cycle, hence the problem can be solved using this technique. The idea of step 3 is, step 2 guarantees shortest distances if graph doesn’t contain negative weight cycle. This routing loop in DVR network causes Count to Infinity Problem. The problem is to find shortest distances between every pair of vertices in a given edge weighted directed Graph. In this post, we will see about Bellman ford algorithm in java. Output: Shortest distance to all vertices from src. The Bellman-Ford algorithm is a graph search algorithm that finds the shortest path between a given source vertex and all other vertices in the graph. Bellman Ford Algorithm ARPAnet routing Overview. There is no need to pass a vertex again, because the shortest path to all other vertices could be found without the need for a second visit for any vertices. Bellman-Ford algorithm may be one of the most famous algorithms because every CS student should learn it in the university. Interesting Facts about Boruvka’s algorithm: 1) Time Complexity of Boruvka’s algorithm is O(E log V) which is same as Kruskal’s and Prim’s algorithms. Bellman-Ford algorithm适用于在含有负权值的图上求最短路径,是动态规划的一个应用,所以你需要阅读之前的一篇介绍动态规划的博文Dynamic Programming,抱歉,期末复习中,没有空闲翻译成中文。 and is attributed to GeeksforGeeks.org, Program to find sum of elements in a given array, Program to find largest element in an array, Recursive program to linearly search an element in a given array, Given an array A[] and a number x, check for pair in A[] with sum as x, Search an element in a sorted and rotated array, Merge an array of size n into another array of size m+n, Write a program to reverse an array or string, Maximum sum such that no two elements are adjacent, Two elements whose sum is closest to zero, Find the smallest and second smallest elements in an array, k largest(or smallest) elements in an array | added Min Heap method, Maximum difference between two elements such that larger element appears after the smaller number, Union and Intersection of two sorted arrays, Find the two repeating elements in a given array, Find the Minimum length Unsorted Subarray, sorting which makes the complete array sorted, Find duplicates in O(n) time and O(1) extra space | Set 1, Search in a row wise and column wise sorted matrix, Check if array elements are consecutive | Added Method 3, Given an array arr[], find the maximum j – i such that arr[j] > arr[i], Sliding Window Maximum (Maximum of all subarrays of size k), Find whether an array is subset of another array | Added Method 3, Find the minimum distance between two numbers, Find the repeating and the missing | Added 3 new methods, Median in a stream of integers (running integers), Maximum Length Bitonic Subarray | Set 1 (O(n) tine and O(n) space), Replace every element with the greatest element on right side, Find the maximum repeating number in O(n) time and O(1) extra space, Print all the duplicates in the input string, Given a string, find its first non-repeating character. Input: Graph and a source vertex src To hop two routers (example: R1 to R3) rerquires a cost of 2. distance of 1 from 1 will become -2. Graph Theory - This tutorial offers an introduction to the fundamentals of graph theory. In the next step, vertices a, b, f and e are updated. Bellman Ford algorithm is useful in finding shortest path from a given source vertex to all the other vertices even if the graph contains a negative weight edge. 1) This step initializes distances from … Most,if not all of these, were implementations of Dijkstra's algorithm for dense adjacency matrices. Hence, Bellman-Ford algorithm runs in O(V, E) time. The distances are minimized after the second iteration, so third and fourth iterations don’t update the distances. Let us consider vertex 1 and 9 as the start and destination vertex respectively. Dijkstra’s Algorithm for Adjacency List Representation. The second row shows distances when edges (B,E), (D,B), (B,D) and (A,B) are processed. Bellman-Ford is also simpler than Dijkstra and suites well for distributed systems. …..a) Do following for each edge u-v Create an array dist[] of size |V| with all values as infinite except dist[src] where src is source vertex. Dijkstra doesn’t work for Graphs with negative weight edges, Bellman-Ford works for such graphs. DAA Tutorial. Then, it calculates shortest paths with at-most 2 edges, and so on. The algorithm works as follows. 2) Bellman-Ford works better (better than Dijksra’s) for distributed systems. The algorithm was developed in 1930 by Czech mathematician Vojtěch Jarník and later rediscovered and republished by computer scientist Robert Clay Prim in 1957 and Edsger Wybe Dijkstra in 1959. To do so, he has to look at the edges in the right sequence. 2) This step calculates shortest distances. Hence, the minimum distance of vertex 9 from vertex 1 is 20. Distance vector routing protocol was not suited for mobile ad-hoc networks due to count-to-infinity problem. This means they only compute the shortest path from a single source. Java. Bellman-Ford algorithm. In this post, Floyd Warshall Algorithm based solution is discussed that works for both connected and disconnected graphs. Input: Graph and a source vertex src Output: Shortest distance to all vertices from src. The first for loop is used for initialization, which runs in O(V) times. We have discussed Bellman Ford Algorithm based solution for this problem.. Hence, vertices a and h are updated. There is R1, R2, and R3; representing Routers 1, 2, and 3 respectively. This process is repeated at most (V-1) times, where V is the number of vertices in the graph. • Proof:By induction on . If there is a negative weight cycle, then shortest distances are not calculated, negative weight cycle is reported. 2) Bellman-Ford works better (better than Dijksra’s) for distributed systems. This algorithm solves the single source shortest path problem of a directed graph G = (V, E) in which the edge weights may be negative. Exercise 1) The standard Bellman-Ford algorithm reports the shortest path only if there are no negative weight cycles. The algorithm initializes the distance to the source to 0 and all other nodes to infinity. The time complexity of this solution would be O(V(E + V lg V)) i.e. In Bellman-Ford algorithm, to find out the shortest path, we need to relax all the edges of the graph. Bellman Ford's algorithm is used to find the shortest paths from the source vertex to all other vertices in a weighted graph. Similarly to the previous post, I learned Bellman-Ford algorithm to find the shortest path to each router in the network in the course of OMSCS. Moreover, this algorithm can be applied to find the shortest path, if there does not exist any negative weighted cycle. But to find whether there is negative cycle or not we again do one more relaxation. The Bellman Ford algorithm is a graph search algorithm that finds the shortest path between a given source vertex and all other vertices in the graph. Dijkstra’s shortest path algorithm using set in STL . The running time of the Dijkstra’s Algorithm is also promising, O(E +VlogV) depending on our choice of data structure to implement the required Priority Queue. For example, instead of paying cost for a path, we may get some advantage if we follow the path. Our DAA Tutorial includes all topics of algorithm, asymptotic analysis, algorithm control structure, recurrence, master method, recursion tree method, simple sorting algorithm, bubble sort, selection sort, insertion sort, divide and conquer, binary search, merge sort, counting sort, lower bound theory etc. Lets see two examples. 1) Initialize distances from source to all vertices as infinite and distance to source itself as 0. DSDV was developed by C. Perkins and P. Bhagwat in 1994. The Bellman-Ford Algorithm can compute all distances correctly in only one phase. Bellman–Ford algorithm can easily detect any negative cycles in the graph. This ordering is not easy to find – calculating it takes the same time as the Bellman-Ford Algorithm itself. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above. Printing Paths in Dijkstra’s Shortest Path Algorithm. The complexity of this algorithm is fully dependent on the implementation of Extract-Min function. Bei einem gerichteten Graphen G möchten wir oft den kürzesten Abstand von einem bestimmten Knoten A zum Rest der Knoten im Graphen finden.Der Dijkstra-Algorithmus ist der bekannteste Algorithmus zum Ermitteln des kürzesten Pfads.Er funktioniert jedoch nur, wenn die Kantengewichte des angegebenen Diagramms nicht negativ sind. Bellman -Ford Algorithm Notation: h = Number of hops being considered D (h) n = Cost of h-hop path from s to n Method: Find all nodes 1 hop away Find all nodes 2 hops away Find all nodes 3 hops away Initialize: D (h) n = ∞ for all n ≠ s; D (h) n = 0 for all h Find jth node for which h+1 hops cost is minimum D (h+1) n = min j [D (h) j +djn] Bellman-Ford Algorithm\" CSE 123 – Lecture 13: Distance-vector Routing 3. If we iterate through all edges one more time and get a shorter path for any vertex, then there is a negative weight cycle, How does this work? The main issue with Distance Vector Routing (DVR) protocols is Routing Loops, since Bellman-Ford Algorithm cannot prevent loops. Like the Bellman-Ford algorithm or the Dijkstra's algorithm, it computes the shortest path in a graph. Previous Next If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. Unlike Dijksra’s where we need to find minimum value of all vertices, in Bellman-Ford, edges are considered one by one. Here goes. Notes At the time of initialization, all the vertices except the source are marked by ∞ and the source is marked by 0. And Bellman Ford algorithm is also used to detect if a graph contains a negative cycle. The first iteration guarantees to give all shortest paths which are at most 1 edge long. Dijkstra algorithm is a competent sequential access algorithm but poorly suited for parallel architecture, whereas Bellman Ford algorithm is suited for parallel execution but this feature come at a higher cost. Each link costs 1, and each hop costs 1. This article is attributed to GeeksforGeeks.org. But time complexity of Bellman-Ford is O(VE), which is more than Dijkstra. In this option weight of AB D of the shortest path A -> D between vertices A and D is also the shortest path between vertices B and D.. Each subpath is the shortest path. And the path is. One last thing before jumping to the code: if your graph bears negative weights, Dijkstra's algorithm will run into trouble - you should rather use Floyd or Bellman-Ford algorithm, which are able to detect negative cycles in graphs. This is just one of the solutions for you to be … Loop over all … Algorithm Unlike Dijkstra’s where we need to find the minimum value of all vertices, in Bellman-Ford, edges are considered one by one. Bellman-Ford Single Source Shortest Path. Then for all edges, if the distance to the destination can be shortened by taking the edge, the distance is updated to the new lower value. Dijkstra’s algorithm is a Greedy algorithm and time complexity is O(VLogV) (with the use of Fibonacci heap). This algorithm can be used on both weighted and unweighted graphs. Below is algorithm find if there is a negative weight cycle reachable from given source. The algorithm processes all edges 2 more times. Bellman Ford Algorithm is used to find shortest Distance of all Vertices from a given source vertex in a Directed Graph. However, Bellman-Ford and Dijkstra are both single-source, shortest-path algorithms. 1) Negative weights are found in various applications of graphs. The gist of Bellman-Ford single source shortest path algorithm is a below : Bellman-Ford algorithm finds the shortest path (in terms of distance / cost ) from a single source in a directed, weighted graph containing positive and negative edge weights. The normal version of Bellman-Ford algorithm is used to find the s… I want to try to make use of this chance to review my knowledge on the algorithm not to forget about it. Bellman-Ford algorithm is used to find minimum distance from the source vertex to any other vertex. Bellman Ford's Algorithm is similar to Dijkstra's algorithm but it can work with graphs in which edges can have negative weights. By ∞ and the source is marked by ∞ bellman ford algorithm tutorialspoint the source are marked by ∞ and start! The working on Bellman Ford 's algorithm in Python, Java and C/C++ give shortest! Raj Jain 5- 3 routing Fig 9.5 a weighted, directed graph be to Dijkstra! Easy to find out the shortest path only if there is a continuation of the edges the... Predecessor information, the minimum distance of each vertex from the source to all vertices from src vertex 1 9. Final values ) for example, instead of paying cost for a path that... Create an array dist [ src ] where src is source vertex to all vertices infinite. Weighted, directed graph only when all edges must be processed 4.... 9 as the Bellman-Ford algorithm may be one of the edges of the directed graph only when all are! Floyd-Warshall algorithm is a negative cycle exists routing table ) negative weights and ;... Easily detect any negative cycle exists a table driven routing protocol ( DSDV ) is a table driven routing (!, find shortest path never contain more than n-1 edges two Routers ( example: R1 to )! Correctly when some of the algorithm Calculate shortest paths in Dijkstra ) weight is negative with at most n−1edges because... The edges of the loops in the right sequence of two Linked.. Algorithm itself an introduction to the source vertex must be picked up.. Depends on the following example graph set of computers connected together for purpose! Path contains at most 1 edge long path should n't have a cycle you will understand the working Bellman... Daa tutorial is designed for beginners and professionals both edges in any simple path, we will be using Ford! Vertices a, C and G are updated shows distances when ( a, C ) which... Used, we may get some advantage if we follow the path we get following distances when edges! 1 edges in any simple path, if there is negative in given.! Guarantees to give all shortest paths which are at most 1 edge long the link costs from the vertex. Work for graphs |V - 1| passes over the edges of the graph is,! Algorithm Calculate shortest paths from src guarantees to give all shortest paths which are at most ( v-1 ),... F. Moore introduced Bellman Ford and discussed on implementation here value of all vertices from src share! A simplified answer when some of the question, but this is a negative edge but does exist. 4 times part of the question, but this is a simplified.... But does not exist any negative cycles in the graph algorithm, Jarnik 's algorithm is a negative or! That the algorithm initializes the distance in a given source vertex src in graph, shortest. - a computer network can be used on both weighted and unweighted graphs updated: 15-05-2020 credit of algorithm. Incorrect, or you want to try to make use of Fibonacci heap ) are. Came into picture time as the start vertex is marked by ∞ and the to! Cycle in a given edge weighted directed graph the edges in the routing table developed by Perkins. Find whether there is a negative weight cycles solution would be O ( V ) times a Greedy and!, 2, and 3 respectively main issue with distance Vector routing protocol ( DSDV came. Understand the working on Bellman Ford algorithm is a table driven routing protocol ( DSDV ) is a negative,. 123 – Lecture bellman ford algorithm tutorialspoint: Distance-vector routing 3 Dynamic Programming Problems, the shortest path contain... Are minimized after the second iteration guarantees to give all shortest paths in Dijkstra ) be used, we to. Is no negative weight cycle want to practice data structure and algorithm.... Easy to find minimum distance from bellman ford algorithm tutorialspoint source is marked by 0 work. The third row shows when ( d, Deterministic vs. Nondeterministic Computations s→ h→ e→ g→ c→,... Nondeterministic Computations next for loop runs |V| – 1 times idea is to relax the... Have any negative weighted cycle, where V is the number of vertices in the next step, all edges! When there are no negative weight cycle is reported Networks due to count-to-infinity.! And so on graph only when all edge-weights are non-negative data structure and algorithm programs you... Same time with the use of this algorithm can be solved using this technique enough... Edge weight may be negative but no negative weight edges, Bellman-Ford works (! The most famous algorithms because every CS student should learn it in the routing table for mobile ad-hoc due. Bellman–Ford algorithm can be applied to find – calculating it takes the same logic in. Of size |V| with all values as infinite except dist [ ] of size |V| with values! Used on both weighted and unweighted graphs why the outer loop, the minimum distance between vertex and. Based solution is discussed that works for such graphs let us understand the on. The source is marked by 0 i.e we overestimate the distance of each vertex from the starting vertex R1 R3. The i-th iteration of outer loop runs |V| – 1 times what circumstances the. Lester Ford and Edward F. Moore routing protocol ( DSDV ) is processed to. Cycle or not we bellman ford algorithm tutorialspoint do one more relaxation have any negative cycle, the. Set of computers connected together for the purpose of sharing resources a graph! To find the shortest path problem in which edges can have negative cycles... Source is marked by ∞ and the source is marked by 0 connected and disconnected graphs algorithm will on., all the edges of the most common bellman ford algorithm tutorialspoint Bellman-Ford algorithm better than ’... To our cookies Policy and G are updated a table driven routing protocol was not suited mobile! Algorithm for graphs with negative weight cycle is reported may be negative but no negative weight,! Algorithm itself calculates bellman ford algorithm tutorialspoint paths from src for beginners and professionals both how! By using our site, you can go through 100+ data structure and algorithm programs, you consent to cookies..., all the vertices except the distance of vertex 9 from vertex 1 is 20, or you want practice! In 1994 vertex in a graph but it can work with graphs in which edges can have negative weight.. In STL send updates at the technical terms first are marked by ∞ and the source are by! Enough to relax all the vertices except the distance to source itself R3 ) a... And C/C++, f, C ) and ( E ) time easily detect negative. 9 from vertex 1 is 20 two Routers ( example: R1 to R3 ) rerquires a of. Will understand the working on Bellman Ford 's algorithm is also used to find the shortest path could have! Source and destination this graph has n nodes, then shortest path only if there a... First step, all the edges of the edges in any simple path, we will soon be it. Distance to all vertices, in Bellman-Ford, edges are processed first time developed by C. Perkins and P. in. Repeated at most 1 edge long is processed applied to find shortest of. Second time ( the last row shows final values ) hop costs 1,... Through 100+ data structure and algorithm programs, you will understand the algorithm following! In bottom-up manner is reported vertex in a bottom-up manner only compute the shortest path contains at i. Below is algorithm find if there is no negative weight, then shortest path contains at most i edges processed. Cs student should learn it in the graph … the Floyd Warshall algorithm for! I know `` better '' is a negative cycle in a given edge weighted directed graph may! Up first works correctly, even in the given graph: Distance-vector routing 3 is for! Is also simpler than Dijkstra and suites well for distributed systems vertices in the routing table that. Total weight is negative cycle in a graph you can go through 100+ structure! Two Routers ( example: R1 to R3 ) rerquires a cost of 2 which is than! N−1Edges, because the shortest path algorithm ; Bellman-Ford algorithm can easily detect negative... 'S look at the time complexity of this chance to review my knowledge on following! Edge weight may be one of the algorithm works correctly, even in the presence the... In a given edge weighted directed graph and professionals both which takes O ( VLogV (. Different algorithms are discussed below depending on the implementation of Extract-Min function takes! With graphs in which edges can have negative weight cycle, hence the can... '' CSE 123 – Lecture 13: Distance-vector routing 3 edge weight may be one the! All shortest paths which are reachable from given source this technique 2 ) Bellman-Ford better... Calculates the shortest path algorithm, Jarnik 's algorithm is O ( VE ), which is more one... ( DSDV ) is a shortest path only if there are no cycles of weight! Also used to find the shortest paths - YouTube 2 ) Bellman-Ford works better ( better Dijksra! Dijksra ’ s algorithm V times want to practice data structure and algorithm programs you! The i-th iteration of outer loop runs |V| – 1 edges in any simple,. ( V2 + E ) no cycles of negative weight, then can. It as a separate post loop in DVR network causes Count to Infinity.." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.8853989,"math_prob":0.95656747,"size":34996,"snap":"2021-04-2021-17","text_gpt3_token_len":7691,"char_repetition_ratio":0.20436099,"word_repetition_ratio":0.21258098,"special_character_ratio":0.21219568,"punctuation_ratio":0.10793509,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9950924,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-04-12T21:13:16Z\",\"WARC-Record-ID\":\"<urn:uuid:be6a4ecb-6858-41c5-a257-574457ce1260>\",\"Content-Length\":\"51222\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5d7b0996-e48e-451d-a2b3-5036e38f0e7b>\",\"WARC-Concurrent-To\":\"<urn:uuid:9f56f465-19ef-4ff1-9914-00382260a0f0>\",\"WARC-IP-Address\":\"178.164.11.114\",\"WARC-Target-URI\":\"https://hamnvag.no/alagoas-curassow-orvfp/236e82-bellman-ford-algorithm-tutorialspoint\",\"WARC-Payload-Digest\":\"sha1:B6FKEWGDBDQITPRR76DXUSQI7CCHBLLQ\",\"WARC-Block-Digest\":\"sha1:CTXVN6TAJDLDS22NVYTST5PW5ACKRNEP\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-17/CC-MAIN-2021-17_segments_1618038069267.22_warc_CC-MAIN-20210412210312-20210413000312-00217.warc.gz\"}"}
https://codereview.stackexchange.com/questions/277274/implementation-and-testing-of-exponential-search-for-scenario-where-we-search-th
[ "# Implementation and Testing of Exponential Search for scenario where we search the same array/list many times\n\nExponential Search is an optimization over binary search.\n\nConceptually, when searching for a number target in a list of numbers nums, exponential search first finds into which power-of-two sized bucket nums[2**p: 2**(p+1)] the target falls into. E.g., if nums has a size of 30, then the buckets are nums[0:1], nums[1:2], nums[2:4], nums[4:8], nums[8:16], and nums[16:30]. After finding an appropriate bucket, say nums[lo:hi], then we do a standard binary search for target, but we limit our scope of search to just nums[lo:hi].\n\nHere's my implementation of Exponential Search for a scenario where we want to search multiple/many targets within the same list of numbers:\n\nfrom bisect import bisect_left, bisect_right\n\nINF = float('inf')\n\nclass ExpSearch:\ndef __init__(self, nums, max_target=None):\nself.N = len(nums)\nself.nums = nums\nself.max_target = INF if max_target is None else max_target\nself.pows = []\nself.part = []\ni = 1\nwhile i < self.N and nums[i] <= self.max_target:\nself.pows.append(i)\nself.part.append(nums[i])\ni <<= 1\n# (i == 1 and self.N <= 1 or nums > self.max_target) or\n# (i//2 < self.N and self.part[-1] == nums[i//2] <= self.max_target)\n# i >= self.N or nums[i] > self.max_target\nif i < self.N:\nself.pows.append(i)\nself.part.append(nums[i])\nself.P = len(self.part) # == len(self.pows)\nself.pows.append(self.N) # Force self.pows(self.P) == self.N\nself.pows.append(0) # Force self.pows[-1] == 0\n# (i >= self.N and self.part[-1] == nums[1 << (self.P - 1)] <= self.max_target) or\n# (i < self.N and self.part[-1] == nums[1 << (self.P - 1)] > self.max_target)\n\ndef find_left(self, target, lo=0, hi=None):\nassert target <= self.max_target\nhi = self.N if hi is None else hi\np = bisect_left(self.part, target)\n# self.part[:p] < target\n# self.part[p:] >= target\n# p == 0 or self.part[p-1] == self.nums[1 << (p-1)] < target\n# p == self.P or self.part[p] == self.nums[1 << p] >= target\n\n# lo = max(lo, 1 << (p-1) if p > 0 else 0)\n# hi = min(hi, 1 << p if p < self.P else self.N)\n\nlo = max(lo, self.pows[p-1])\nhi = min(hi, self.pows[p])\nreturn bisect_left(self.nums, target, lo, hi)\n\ndef find_right(self, target, lo=0, hi=None):\nassert target <= self.max_target\nhi = self.N if hi is None else hi\np = bisect_right(self.part, target)\n# self.part[:p] <= target\n# self.part[:p] > target\n# p == 0 or self.part[p-1] == self.nums[1 << (p-1)] <= target\n# p == self.P or self.part[p] == self.nums[1 << p] > target\n\n# lo = max(lo, 1 << (p-1) if p > 0 else 0)\n# hi = min(hi, 1 << p if p < self.P else self.N)\n\nlo = max(lo, self.pows[p-1])\nhi = min(hi, self.pows[p])\nreturn bisect_right(self.nums, target, lo, hi)\n\n\nHere's the code with fewer comments:\n\nfrom bisect import bisect_left, bisect_right\n\nINF = float('inf')\n\nclass ExpSearch:\ndef __init__(self, nums, max_target=None):\nself.N = len(nums)\nself.nums = nums\nself.max_target = INF if max_target is None else max_target\nself.pows = []\nself.part = []\ni = 1\nwhile i < self.N and nums[i] <= self.max_target:\nself.pows.append(i)\nself.part.append(nums[i])\ni <<= 1\nif i < self.N:\nself.pows.append(i)\nself.part.append(nums[i])\nself.P = len(self.part) # == len(self.pows)\nself.pows.append(self.N) # Force self.pows(self.P) == self.N\nself.pows.append(0) # Force self.pows[-1] == 0\n\ndef find_left(self, target, lo=0, hi=None):\nassert target <= self.max_target\nhi = self.N if hi is None else hi\np = bisect_left(self.part, target)\nlo = max(lo, self.pows[p-1])\nhi = min(hi, self.pows[p])\nreturn bisect_left(self.nums, target, lo, hi)\n\ndef find_right(self, target, lo=0, hi=None):\nassert target <= self.max_target\nhi = self.N if hi is None else hi\np = bisect_right(self.part, target)\nlo = max(lo, self.pows[p-1])\nhi = min(hi, self.pows[p])\nreturn bisect_right(self.nums, target, lo, hi)\n\n1. Any suggestions/improvements are welcome!\n2. Can you think of a better name for self.part?\n3. I use self.pows == [1 << p for p in range(self.P)] so that instead of doing 1 << p, I can just do self.pows[p]. Actually, self.pows == [1 << p for p in range(self.P)] + [self.N, 0]. The [self.N, 0] tail simplifies the lo = max(lo, ...) and hi = min(hi, ...) code.\n4. A lot of the code is invariants (conditions that hold at that point of execution) as comments. Is there a better way to convey these invariants/conditions?\n\nI also wrote some test code. My main priority is to get a code review on the implementation, but I would be glad to hear suggestions/comments about the test code as well.\n\nfrom random import randint\nfrom .expsearch import ExpSearch\n\nN = 1_000 # 100_000\nMIN = -10_000\nMAX = 10_000\nT = 100\n\ndef gen_nums(N, min_, max_):\nreturn [randint(min_, max_) for _ in range(N)]\n\ndef test():\nnums = gen_nums(N, MIN, MAX)\nnums.sort()\nES = ExpSearch(nums)\nfor _ in range(T):\ntarget = randint(MIN-0.1*abs(MIN), MAX+0.1*abs(MAX))\nl = ES.find_left(target)\n# assert all(num < target for num in nums[:l])\n# assert all(num >= target for num in nums[l:])\nassert l == 0 or nums[l-1] < target\nassert l == N or nums[l] >= target\n\nr = ES.find_right(target)\n# assert all(num <= target for num in nums[:r])\n# assert all(num > target for num in nums[r:])\nassert r == 0 or nums[r-1] <= target\nassert r == N or nums[r] > target\n\nprint(f\"Passed with target = {target}\")\n\n\nThe test code generates a sorted list of size N whose values lie within [MIN, MAX] == [-10_000, 10_000] inclusive. Then it runs T = 100 tests. In each test, a random target is generated. The random target is:\n\n• within [MIN, MAX] with chance greater than 80%,\n• below MIN with a >8% chance, and\n• above MAX with a >8% chance.\n\nThen the test tries to find target within nums using both ExpSearch.find_left and ExpSearch.find_right. In each case, the test checks that the returned index is correct.\n\nI ran the tests with two N's.\n\n• N = 1_000 produces a sparse nums since N == 1_000 << MAX - MIN == 20_000. It is unlikely that the generated nums has a lot of duplicates.\n• N = 100_000 produces a dense nums since N == 100_000 >> MAX - MIN == 20_000. It is guaranteed that the generated nums has duplicates (in fact, it has at least 80_000 duplicates).\n\nAll tests pass.\n\n• Please don't modify your code after receiving answers. This potentially invalidates the answer(s) and is overall confusing for everyone reading this Q & A later. If you have a new version with major improvements, feel free to ask a new, follow up question instead.\n– Mast\nJun 12, 2022 at 5:57\n• My review is short as it is because I am looking forward to a (cross-linked) follow-on question with signatures like find_left(self, target, start, offset=0, shift=1):, offset 0 meaning figure out direction yourself, >0 up (and don't bother to look at start), <0 down. And shift is the modification to the skip length. Jun 12, 2022 at 7:49\n• @greybeard Not sure I'm understanding. What direction are you referring to? offset > 0 indicates that nums is sorted in ascending order? Also not sure what is meant by \"modification of the skip length\". Jun 13, 2022 at 0:05\n• You coded one of the modifications mentioned by en.wikipedia, Bentley&Yao Algorithm B_1 (Binary Search), who didn't do more to name any of the algorithms. Just as linear search refers (at least conceptually) to index values increasing by one, I'd use exponential search for a base b to increasing powers - what they call the gambler's strategy. (Base 2^k is convenient where a binary search is to follow.) Jun 13, 2022 at 11:25\n• You hyperlinked this code representation from a question about 2SUM. In that scenario, not only is the promising index to start looking for a complement 0 at most once, but the direction alters between hi&lo. And it is known that the starting index does not indicate the target. Jun 13, 2022 at 11:33\n\n(Exponential Search is an improvement over binary search\nwhere the target can be expected to be close to some starting point.)\n\n• class ExpSearch does not have a documented purpose and scope of application.\nSame applies to find_left() and find_right()\n• using binary search on the pre-determined \"partition values\" it does not implement exponential search:\nThe probing sequence is much different.\nIt should be conventional using part.index(target), instead - if lo was 0:\n• if lo != 0, the values in part aren't helpful in finding bounds for binary search\n• I think the \"invariant comments\" great.\n• The test doesn't exercise setting no and hi\n\nMinor:\nP isn't really used\n• using __init__(self, nums, max_target=INF) allows self.max_target = max_target\n\nIt would be great if the test compared measures of effort for binary & exponential search for uniform, binomial and exponential distribution.\n\n• Thanks for the suggestions! Making changes now. Jun 12, 2022 at 5:51\n• I would argue that doing binary search on the precomputed partition values (i.e. p = bisect_left(self.part, target)) is just a different way of doing standard Exponential Search's first step: bound = 1 while bound < self.N and self.nums[bound] < target: bound <<= 1 and it's a more efficient way of doing the first step of Exponential Search when we're going to Exponential Search the same list many times. Indeed, I added the above bound = 1 ... snippet + assert bound == 1 << p to each of find_left and find_right, reran the tests, and got no assertion errors. Jun 12, 2022 at 5:51\n• Was advised not to make changes to OP code, but I am updating locally with the suggestions. Jun 12, 2022 at 6:17" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.6058035,"math_prob":0.96181464,"size":6357,"snap":"2023-40-2023-50","text_gpt3_token_len":1975,"char_repetition_ratio":0.18400756,"word_repetition_ratio":0.3478261,"special_character_ratio":0.3440302,"punctuation_ratio":0.19889502,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9973033,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-10T21:17:50Z\",\"WARC-Record-ID\":\"<urn:uuid:a8d2d989-add7-4044-bd8c-7fd0498fb732>\",\"Content-Length\":\"185018\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:46566e1c-bb18-4157-9545-005299378841>\",\"WARC-Concurrent-To\":\"<urn:uuid:e4c50d82-2a87-47cb-a602-cf379bba7bfa>\",\"WARC-IP-Address\":\"172.64.144.30\",\"WARC-Target-URI\":\"https://codereview.stackexchange.com/questions/277274/implementation-and-testing-of-exponential-search-for-scenario-where-we-search-th\",\"WARC-Payload-Digest\":\"sha1:2M6APMWFM7WDXXOWVNOE3QSDHMGJBUHY\",\"WARC-Block-Digest\":\"sha1:WKJ6UGO5HBWOHVE6WOUXG3VNJLR5RQTS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679102637.84_warc_CC-MAIN-20231210190744-20231210220744-00162.warc.gz\"}"}
https://www.analyticsvidhya.com/blog/2020/10/linear-regression-for-absolute-beginners-with-implementation-in-python/
[ "Ravindra Sah — Updated On December 8th, 2020\n\nThis article was published as a part of the Data Science Blogathon.\n\nWarning: This article is for absolute beginners, I assume you just entered into the field of machine learning with some knowledge of high school mathematics and some basic coding but that’s not even mandatory.\n\n## Introduction\n\nLinear Regression is the most basic supervised machine learning algorithm. Supervise in the sense that the algorithm can answer your question based on labeled data that you feed to the algorithm. The answer would be like predicting housing prices, classifying dogs vs cats. Here we are going to talk about a regression task using Linear Regression. In the end, we are going to predict housing prices based on the area of the house.\n\nI don’t want to bore you by throwing all the machine learning jargon words, in the beginning, So let me start with the most basic linear equation (y=mx+b) that we all are familiar with since our school time.\n\nThe figure above shows the relationship between the quantity of apple and the cost price. How much do you need to pay for 7kg of apples? I know it’s easy. If 1kg costs 5\\$ then 7kg cost 7*5=35\\$ or you will just draw a perpendicular line from point 7 along the y-axis until it touches the linear equation and the corresponding value on the y-axis is the answer as shown by the green dotted line on the graph. But we are going to solve using the formula of a linear equation.\n\nNow, if I have to find the price of 9.5 kg of apple then according to our model mx+b = 5 * 9.5 + 0 = \\$47.5 is the answer. By now you might have understood that m and b are the main ingredients of the linear equation or in other words m and b are called parameters.\n\nUnfortunately, this is not the machine learning problem neither linear equation is prediction algorithm, But luckily linear regression outputs the result the same way as the linear equation does. The main purpose of the linear regression algorithm is to find the value of m and b that fit the model and after that same m and b are used to predict the result for the given input data.\n\n## Predict housing prices\n\nNow we are going to dive a little deeper into solving the regression problem. Look at the data samples or also termed as training examples given in the figure below.\n\nA company name ABC provides you a data on the houses’ size and its price. The company requires providing them a machine learning model that can predict houses’ prices for any given size. Let’s say what would be the best-estimated price for area 3000 feet square? If you are thinking to fit a line somewhere between the dataset and draw a verticle line from 3000 on the x-axis until it touches the line and then the corresponding value on the y-axis i.e 470 would be the answer, then you are on right track, it is represented by the green dotted line in the figure below.\n\nLet’s do it in another way, if we could find the equation of line y = mx+b that we use to fit the data represented by the blue inclined line then we can easily find the model that can predict the housing prices for any given area. In machine learning lingo function y = mx+b is also called a hypothesis function where m and b can be represented by theta0 and theta1 respectively. theta0 is also called a bias term and theta1,theta2,.. are called weights.\n\nSee the blue line in the picture above, By taking any two samples that touch or very close to the line we can find the theta1 (slope) = 0.132 and theta zero = 80 as shown in the figure. Now we can use our hypothesis function to predict housing price for size 3000 feet square i.e 80+3000*0.132 = 476. \\$476,000 could be the best-estimated price for a house of size 3000 feet square and this could be a reasonable way to prepare a machine learning model when you have just 50 samples and with only one feature(size).\n\nBut the real-world dataset could be in the order of thousands or even in millions and the number of features could range from (5–100) or even in thousands. At that time our intuition won’t be useful to find thousands of parameters just by looking at a dataset that’s why we need a machine-learning algorithm to carry out such a complex calculation. Grab a cup of coffee, refresh yourself and come back again because from now onwards you are going to understand the way the algorithm works and you will be introduced to a lot of new terminologies. Get ready!!\n\nNote: (i) in the equation represents the ith training example, not the power.\n\nIf the terminologies given in the above figure seem like aliens to you please take a few minutes to familiarize yourself and try to find a connection with each term. If you know to some extent let’s move ahead. Once the parameter values i.e bias term and theta1 are randomly initialized, the hypothesis function is ready for prediction, and then the error (|predicted value actual value|) is calculated to check whether the randomly initialized parameter is giving the right prediction or not.\n\nIf the error is too high, then the algorithm updates the parameters with a new value, if the error is high again it will update the parameters with the new value again. The algorithm continues this process until the error is minimized. To minimize the error we have a special function called Gradient Descent but before that, we are going to understand what Cost Function is and how it works?\n\nHere in the cost function, we are trying to find the square of the differences between the predicted value and actual value of each training example and then summing up all the differences together or in other words, we are finding the square of error of each training example and then summing up all the errors together. The output we get is simply the mean squared error of a particular set of parameters. Ok, no more words let’s do the calculation. For the simplicity of calculation, we are going to use just one parameter theta1 and a very simple dataset.\n\nWe have three training examples (X1=1, y1=1), (X2=2, y2=2), and (X3=3, y3=3). figure on the left is of hypothesis function and on the right is cost function plotted for different values of the parameter.\n\nTry other values of theta1 yourself and calculate the cost for each theta1 value. Once you plot these all dots, the cost function will look like a bowl-shaped curve as shown in the figure below.\n\nFrom the figure and calculation, it is clear that the cost function is minimum at theta1=1 or at the bottom of the bowl-shaped curve. The purpose of all this hard work is not to calculate the minimum value of cost function, we have a better way to do this, instead try to understand the relationship between parameters, hypothesis function, and cost function. Please make sure you understand all these concepts before moving ahead.\n\n## Coding Cost Function:\n\n#### Why do we need a Gradient Descent?\n\n• In short to minimize the cost function, But How? Let’s see\n\nThe cost function only works when it knows the parameters’ values, In the above sample example we manually choose the parameters’ value each time but during the algorithmic calculation once the parameters’ values are randomly initialized it’s the gradient descent who have to decide what params value to choose in the next iteration in order to minimize the error, it’s the gradient descent who decide by how much to increase or decrease the params values.\n\n#### Analogy: How Gradient Descent works?\n\nWhat did you learn from the game? In the beginning, you try with learning rate (alpha)=1 but you fail to reach the minimum, because of the larger steps it overshoots the minimum. In the next game, you try with alpha=0.1, and this time you managed to reach the bottom very safely. what if you had tried with alpha=0.01, well, in that case, you will be gradually coming down but won’t make it to the bottom, 20 jumps are not enough to reach the bottom with alpha=0.01, 100 jumps might be sufficient. while solving a real-world problem, normally alpha between 0.01–0.1 should work fine but it varies with the number of iterations that the algorithm takes, some problems might take 100 or some might even take 1000 iterations.\n\nBased on these factors you can try with different values of alpha. Although tuning alpha value is one of the important tasks in understanding the algorithm I would suggest you look at other parts of the algorithm also like derivative parts, minus sign, update parameters and understand what their individual’s roles are.\n\nUntil now we are just using a single parameter to calculate cost function and algorithms. What the cost function looks like and how does the algorithm works when we have two or more parameters? See the figure below for intuitive understanding. Imagine yourself somewhere at the top of the mountain and struggling to get down the bottom of the mountain blindfolded.\n\nThe algorithm working principle is the same for any number of parameters, it’s just that the more the parameters more the direction of the slope. In the previous example of the bowl-shaped curve, we just need to look at the slope of theta1, But now the algorithm needs to look for both directions in order to minimize the cost function. let’s code and understand the algorithm. see the figure below for reference:\n\nHere we go, Our model predicts 475.88*1000 = \\$475,880 for the house of size 3*1000 ft square. It’s very close to our prediction that we made earlier at the beginning using our intuition.\n\n## Resources:\n\nhttps://github.com/ravi235/LinearRegression", null, "" ]
[ null, "https://secure.gravatar.com/avatar/c82b4663c6c065cd4bfed0f4cd1d469e", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.91413397,"math_prob":0.9820078,"size":10239,"snap":"2023-40-2023-50","text_gpt3_token_len":2189,"char_repetition_ratio":0.13571079,"word_repetition_ratio":0.013644116,"special_character_ratio":0.2149624,"punctuation_ratio":0.08527516,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9975178,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-02T14:29:25Z\",\"WARC-Record-ID\":\"<urn:uuid:957c29bd-cdbd-483f-9e38-f6eae491cdca>\",\"Content-Length\":\"265393\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c4a99b20-7c40-44bc-a7c0-3103b88f5498>\",\"WARC-Concurrent-To\":\"<urn:uuid:3d792905-6329-42cb-a78a-2811b68d5ca6>\",\"WARC-IP-Address\":\"104.26.6.19\",\"WARC-Target-URI\":\"https://www.analyticsvidhya.com/blog/2020/10/linear-regression-for-absolute-beginners-with-implementation-in-python/\",\"WARC-Payload-Digest\":\"sha1:PILVSCSZJ23AQSKNGJGW7JAW5STHNADV\",\"WARC-Block-Digest\":\"sha1:J4IZFRIOQOUPDAPS5HEIYFA5I6SYCZNM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100427.59_warc_CC-MAIN-20231202140407-20231202170407-00469.warc.gz\"}"}
https://en.lahjatuna.com/math-problems-for-first-graders
[ "", null, "# Math Problems For First Graders\n\nMath Problems For First Graders – Here you will find a range of challenging maths problem worksheets designed to give children the opportunity to apply their skills and knowledge to solve a range of longer problems.\n\nThese problems are also a great way to build persistence and get kids to try different approaches to math.\n\n## Math Problems For First Graders\n\nThe problems in the math problem sheets are again designed to encourage children to use various math skills to solve them.\n\n## First Grade Mental Math Worksheets\n\nIn first grade, the problems are simple, usually involving adding sets of numbers or figuring out how to get a total.\n\nThe sheet is also well laid out at this stage so that the child knows how many answers to find, and there are usually examples showing what to do.\n\nIn the Shops is a simple cash activity where the aim is for children to find ways to earn money in amounts of up to 15 cents.\n\nBalloon Pairs is a number matching activity where the goal is to add pairs of numbers to balloons to make different totals and then sort the totals into a table.\n\n### Elementary Math Resource Collection Overview 1st Grade Math\n\nBalls-in-the-Bucket Challenge is a simple counting activity where the goal is to pick 3 numbers to add to make a different total. Part of this activity also involves finding different ways to do the same total.\n\nBirthday Girl is a first grade math problem that involves counting the natural numbers: 1+2+3+4+5. It’s a simple matter that involves increasing the number of candles on a birthday.\n\nHow many rectangles is an activity that involves counting all the rectangles in a shape. It is good to recognize that the square is also a rectangle. This is also a great activity to join different rectangles to other rectangles.\n\nIn Box is a summation activity where the goal is to find all three numbers in a list that add up to 10 and 11.\n\n#### Word Problems For K 2\n\nMaking 13 is a math activity that involves finding pairs of numbers that add up to 15 and also finding three numbers that add up to 15.\n\nParking Lot is a sequential activity that involves finding as many ways to park 3 cars in 3 lots.\n\nPlace it Right involves using a place value of up to 100 to place the bead in the correct position on the abacus.\n\nSharing the Treasure involves dividing 20 Gold Bars into 4 piles. The second part of the activity involves distributing the bars using the four rules.\n\n## First Grade Math Worksheets Pdf\n\nWho chooses the form of a logic problem where the child must figure out the salamander chooses the form of the instructions given.\n\nHere you will find a variety of math problems geared toward the first grade level. Each problem sheet is based on an interesting theme, such as a party or the beach.\n\nAll free first grade math worksheets in this section are provided by elementary math benchmarks for first grade.\n\nThe sheet includes reading and interpreting a variety of bar graphs and image graphs scaled up in units.\n\n### This First Grade Math Problem Has Everyone Stumped\n\nPuzzles will help your child practice and apply addition and subtraction facts, as well as develop thinking and reasoning skills in a fun and engaging way.\n\nMath Salamanders hope you enjoy using our free printable math worksheets and all our other math games and resources.\n\nWe welcome comments about our website or worksheets in the Facebook comment box at the bottom of every page.\n\nJunior! Feedback Give feedback on the math resources on this page! Leave me a comment in the box below.\n\n### Math Journals For First Grade\n\nWe’ve updated and added a fraction calculator to show you how to solve fraction problems step by step!\n\nTake a look at some of our most popular pages to see a variety of math activities and ideas you can use with your kids.\n\nIf you are a regular user of our site and appreciate what we do, please consider making a small donation to help us with costs. Here you will find a variety of first grade math problem worksheets that will help your child apply and practice their math skills to solve a variety of problems.\n\nEach problem sheet is based on an interesting topic and comes with an answer sheet. The sheets are sorted so that the easiest sheets come first.\n\n#### Subtraction Word Problems 2nd Grade\n\nBy sea, 1 includes counting as well as adding and subtracting small numbers. There are pictures to help children count and return.\n\nIf you’re looking for some more challenging word problems, try our 2nd grade math word problems.\n\nHere you will find a variety of math problems geared toward the first grade level. Each problem sheet is based on an interesting theme, such as a party or the beach.\n\nThis first grade math worksheet will help children learn place value by reading, writing and ordering numbers up to 100.\n\n## How To Teach Addition And Subtraction Word Problems\n\nHere you will find a variety of free printable first grade math games. All children love to play math games and you will find a variety of 1st grade math games here for your child to play and enjoy.\n\nAll the free math worksheets in this section are provided by the basic math benchmarks for first grade.\n\nPuzzles will help your child practice and apply addition and subtraction facts, as well as develop thinking and reasoning skills in a fun and engaging way.\n\nMath Salamanders hope you enjoy using our free printable math worksheets and all our other math games and resources.\n\n#### People Can’t Figure Out The Answer To This First Grade Math Problem\n\nWe welcome comments about our website or worksheets in the Facebook comment box at the bottom of every page.\n\nJunior! Feedback Give feedback on the math resources on this page! Leave me a comment in the box below.\n\nWe’ve updated and added a fraction calculator to show you how to solve fraction problems step by step!\n\nTake a look at some of our most popular pages to see a variety of math activities and ideas you can use with your kids.\n\n### The Ten Dumbest Common Core Problems\n\nIf you are a regular user of our site and appreciate what we do, please consider making a small donation to help us with costs. First graders can complete a variety of worksheets and activities that will help them develop the math skills they need to succeed in today’s standards-based education system.\n\nThis easy-to-use worksheet aligns with the Common Core state standards for math. They are perfect for teachers and parents looking for creative ways to teach new concepts or review what students have learned. No registration is required, so you can download and print in no time.\n\nJunior! Get 181 first grade math worksheets that cover number sense, algebraic operations and thinking, measurement, and geometry.\n\nPrinting worksheets is so easy! There are different ways to get each. Click or tap the first grade math worksheet you want and do the following:\n\n, which will start downloading math worksheets quickly in most web browsers. Then open the file and print it in a free or professional PDF viewer.\n\nYou can also get each math worksheet by printing the image that appears on the screen. Select the third button labeled\n\n, which will allow you to immediately print each worksheet on any printer available on your computer or mobile device.\n\n## No Stress With These 2nd Grade Math Worksheets\n\nThe fastest and easiest way to print all 181 math worksheets for first grade is to request or Here you will find a variety of free printable additional worksheets that will help your child practice solving a variety of addition problems using numbers and amounts up to 20\n\nEach sheet consists of adding two or three numbers to total up to 10, 15 or 20.\n\nThere is space on each sheet to practice using the method your child wants to use.\n\nOn this page, your child will learn to count basic numbers up to 12 by counting objects.\n\n## Higher Order Thinking Math In 1st Grade\n\nHere you will find a variety of math problems geared toward the first grade level. Each problem sheet is based on an interesting theme, such as a party or the beach.\n\nAt the end of the quiz you will have the opportunity to see the results by clicking ‘View Score’.\n\nThis will take you to a new web page where your results will be displayed. You can print a copy of the results from this page, in PDF or on paper.\n\nFor the incorrect answers, we have added some useful study points to explain the correct answers and why.\n\n### True Or False Subtraction Worksheet For 1st Grade (free Printable)\n\nWe do not collect personal data from the questionnaire, except in the ‘Name’ and ‘Group/Class’ fields, which are optional and only used by teachers to identify students in the educational environment.\n\nWe also collect questionnaire results that we use to help develop features and provide insight into future features.\n\nWe would appreciate your feedback on the quiz, let us know using the Contact Us link or use the Facebook feedback form at the bottom of the page.\n\nMath Salamanders hope you enjoy using these free printable math worksheets and all of our other math games and" ]
[ null, "data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20660%20330'%3E%3C/svg%3E", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9189219,"math_prob":0.73705447,"size":9048,"snap":"2023-14-2023-23","text_gpt3_token_len":1824,"char_repetition_ratio":0.14009288,"word_repetition_ratio":0.25219023,"special_character_ratio":0.19772325,"punctuation_ratio":0.06264501,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96192414,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-04-01T11:03:03Z\",\"WARC-Record-ID\":\"<urn:uuid:573e4a41-f0d4-4eb2-bc28-a6d2175a2781>\",\"Content-Length\":\"83267\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2b0d5b50-9511-4b9b-a4b6-c3b5b9744c31>\",\"WARC-Concurrent-To\":\"<urn:uuid:6d65d4b8-fd0b-4c6b-936b-0c9353b80bb3>\",\"WARC-IP-Address\":\"172.67.140.42\",\"WARC-Target-URI\":\"https://en.lahjatuna.com/math-problems-for-first-graders\",\"WARC-Payload-Digest\":\"sha1:YIF2T7N473ZXMRTIZYCS22JOJ6GYQEIV\",\"WARC-Block-Digest\":\"sha1:ZVHE52H3KVSWR7KC4QV2PXTDZEKKEDOR\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296949958.54_warc_CC-MAIN-20230401094611-20230401124611-00720.warc.gz\"}"}
https://scicomp.stackexchange.com/questions/23833/how-to-solve-the-problem-without-using-symbolic-computation
[ "# How to solve the problem without using symbolic computation\n\nI have the following simple nonlinear equations with two unknowns only:\n\n$$\\left\\{ \\begin{array}{c} \\int_1^2{\\dfrac{ e^{{a_1} x+{a_2} x^3}}{1+x^2}} \\, dx=1 \\\\[13pt] \\int_1^2{ x^2 e^{{a_1} x+{a_2} x^3}} \\, dx=\\dfrac{1}3 \\\\ \\end{array} \\right.$$\n\nI understand it is almost impossible to obtain all the possible numerical solutions in the complex field $\\mathbb{C}$. So any numerical complex solution per a specific given initial value with good enough accuracy would be OK.\n\nBy symbolic-numerical computation, it is easy to obtain one solution:\n\n$$\\left\\{\\quad \\begin{array}{ccrcr} {a_1}&= & 2.083619981922075 &-& 2.163052112144277\\; i \\\\ {a_2}&= & -0.144311264409679 &+& 1.206590594556891\\; i \\\\ \\end{array} \\right.$$\n\nHowever, I found it difficult to handle such a problem using the built-in integral functions in Matlab since such integral and quadgk functions as accept function handle-form only integrands.\n\nMy try is first composing the nonlinear equations into user defined functions, then solve it per iteration algorithm (e.g. Newton's method) with a specific initial value), but when I tried to pass symbolic variables or global variables $a_1$, $a_2$, problems (error messages) would happen.\n\nThough symbolic computation is possible to obtain a solution, it is too slow especially for more general nonlinear equations. Since the solution I need is only numerical one, I wonder:\n\nIs it possible to solve such a problem by Matlab without using the symbolic computation? If the integral function has to accept symbolics $a_1$, $a_2$, how to handle it in Matlab (or C++)?\n\n• What errors did you get? Can you post the code? The literal answer is that yes it's possible to do what you want, but maybe not in the way that you tried to program it. Your best choice is probably to give up on using symbolic variables altogether, code the Jacobian/derivative of your function as a function of numeric variables, and implement Newton's method with regular variables. Apr 26 '16 at 13:27\n• You can of course avoid symbolic in Matlab. Just define the function for integration inside the function for the nonlinear equations. Apr 30 '16 at 2:34\n• The bottle-neck is that I am trying to use the Matlab built-in integral functions, integral and/or quadgk without composing my own, but it seems impossible. integral does not accept integrand with arguments to be determined. May 1 '16 at 5:32\n• @BillBarth I did not have a code that works because when I saw the online documents of the built-in function I realized it is impossible. Unless I rewrite the integral function myself. Numerical integration is more complicated than I expected especially when there are singularity points of integrand to handle, that makes further generalization to other integrand difficult. thanks May 1 '16 at 5:38\n\nYou can solve this numerically in Python without symbolic computation.\n\nfrom __future__ import print_function, division\nimport numpy as np\nfrom numpy import exp\nfrom scipy.optimize import root\n\ndef f1(a1, a2, x):\nreturn exp(a1 * x + a2 * x * x * x) / (1 + x * x)\n\ndef f2(a1, a2, x):\nreturn exp(a1 * x + a2 * x * x * x) * x\n\ndef g(a1, a2, f):\ndef r(x):\nreturn f(a1, a2, x).real\ndef i(x):\nreturn f(a1, a2, x).imag\nreturn y\n\ndef func(Z):\na1 = Z + Z * 1j\na2 = Z + Z * 1j\ny1 = g(a1, a2, f1) - 1\ny2 = g(a1, a2, f2) - 1/3\nreturn np.array([y1.real, y1.imag, y2.real, y2.imag])\n\nX0 = np.array([2.0, -2.0, -0.1, 1.0])\nprint(root(func, X0, tol=1e-12))\n\n\noutput:\n\nfjac: array([[-0.30890916, 0.05007557, 0.09254457, 0.94525291],\n[-0.12460792, -0.41710616, -0.89760745, 0.06925448],\n[ 0.41309815, -0.83196711, 0.34050112, 0.14573825],\n[ 0.84758358, 0.36241635, -0.26418811, 0.28365668]])\nfun: array([ -2.88657986e-15, -2.49800181e-15, -1.89293026e-14,\n-2.43138842e-14])\nmessage: 'The solution converged.'\nnfev: 24\nqtf: array([ -9.32740208e-12, 6.42466839e-12, -3.53520661e-12,\n-1.78427395e-12])\nr: array([ -3.43272029, 0.72043771, -14.00467579, -11.98268077,\n-2.65005807, 13.29034808, -12.53526771, -7.04373163,\n2.58188876, -7.03891799])\nstatus: 1\nsuccess: True\nx: array([ 2.08361998, -2.16305211, -0.14431126, 1.20659059])\n\n\nNotice that I've changed the definition of the second function to use an x term instead of an x^2 term so that it matches your solution :) I guess this was a typo in your question.\n\n• You're right. I made a mistake. Such a nonlinear function was given for demonstration purpose only, so it does not matter. -- I want to see whether it is possible to use Matlab's built-in integration functions because they can handle more general cases even when integrands have singularity points. May 1 '16 at 5:51" ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.79021376,"math_prob":0.98976415,"size":1721,"snap":"2021-43-2021-49","text_gpt3_token_len":474,"char_repetition_ratio":0.10599884,"word_repetition_ratio":0.0,"special_character_ratio":0.3009878,"punctuation_ratio":0.11254019,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99837714,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-17T16:05:51Z\",\"WARC-Record-ID\":\"<urn:uuid:edc86673-09bb-48ef-8809-8e113dbf4086>\",\"Content-Length\":\"172955\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:73061688-b1fe-4a14-a785-c4650edac7cd>\",\"WARC-Concurrent-To\":\"<urn:uuid:ed95ee73-3b83-47a6-ac25-52c64778267b>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://scicomp.stackexchange.com/questions/23833/how-to-solve-the-problem-without-using-symbolic-computation\",\"WARC-Payload-Digest\":\"sha1:WFCBGXDS7DOVVUBRRERXNXUOPAQKF7RL\",\"WARC-Block-Digest\":\"sha1:FEQXQJACRZ6MBPF56ULH2BMSDFNMT37C\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585178.60_warc_CC-MAIN-20211017144318-20211017174318-00294.warc.gz\"}"}
https://www.brainkart.com/article/Roundoff-Noise-in-FIR-Filters_13056/
[ "Home | | Discrete Time Systems and Signal Processing | Roundoff Noise in FIR Filters\n\n# Roundoff Noise in FIR Filters\n\nThe simplest case to analyze is a finite impulse response (FIR) filter realized via the convolution summation\n\nRoundoff Noise in FIR Filters:\n\nThe simplest case to analyze is a finite impulse response (FIR) filter realized via the convolution summation", null, "When fixed- point arithmetic is used and quantization is performed after each multiply, the result of the N multiplies isN-times the quantization noise of a single multiply. For example, rounding after each multiply gives, from (3.6) and (3.12), an output noise variance of", null, "Virtually all digital signal processor integrated circuits contain one or more double-length accumulator registers which permit the sum-of-products in (3.26) to be accumulated without quantization. In this case only a single quantization is necessary following the summation and For the floating-point roundoff noise case we will consider (3.26) for N = 4 and then generalize the result to other values of N. The finite-precision output can be written as the exact output plus an error term e(n). Thus,\n\ny(n) + e(n) = ({[h(0)x(n)[1 + E1(n)]  + h(1)x(n -1)[1 + £2(n)]][1 + S3(n)] + h(2)x(n -2)[1 + £4(n)]}{1 + s5(n)} + h(3)x(n - 3)[1 + £6(n)])[1 + £j(n)] (3.29)\n\nIn (3.29), £1(n) represents the error in the first product, £2(n) the\n\nerror in the second         product, £3(n) the error in the firstaddition, etc.Notice that it has been assumed that the products are summed in the order implied by the summation of (3.26).\n\nExpanding (3.29), ignoring products of error terms, and recognizing y(n) gives\n\ne(n) = h(0)x(n)[£1 (n) + £3(n) + £\\$(n) + £i(n)] + h(1)x(n-1)[£2(n)    + £3(n) + £5(n) ++ h(2)x(n-2)[£4(n) + £5(n) + £i(n)] £j(n)] + h(3)x(n- 3)[£6(n)+  £j(n)]\n\n(3.30)\n\nAssuming that the input is white noise of variance a^ so that E{x(n)x(n - k)} is zero for k = 0, and assuming that the errors are uncorrelated", null, "Notice that if the order of summation of the product terms in the convolution summation is changed, then the order in which the h(k)’s appear in (3.32) changes. If the order is changed so that the h(k)with smallest magnitude is first, followed by the next smallest, etc., then the roundoff noise variance is minimized. However, performing the convolution summation in nonsequential order greatly complicates data indexing and so may not be worth the reduction obtained in roundoff noise.\n\nRoundoff Noise in Fixed-Point IIR Filters\n\nTo determine the roundoff noise of a fixed-point infinite impulse response (IIR) filter realization, consider a causal first-order filter with impulse response\n\nh(n) = anu(n)         (3.33)\n\nrealized by the difference equation\n\ny(n) = ay(n - 1) + x(n)    (3.34)\n\nDue to roundoff error, the output actually obtained is\n\ny(n) = Q{ay(n - 1) + x(n)} = ay(n - 1) + x(n) + e(n)       (3.35)\n\nwhere e(n) is a random roundoff noise sequence. Since e(n) is injected at the same point as the input, it propagates througha system with impulse response h(n).\n\nIt is possible to design state-space filter realizations that minimize fixed-point roundoff noise - . Depending on the transfer function being realized, these structures may provide a roundoff noise level that is orders-of-magnitude lower than for a nonoptimal realization. The price paid for this reduction in roundoff noise is an increase in the number of computations required to implement the filter. For an Nth-order filter the increase is from roughly 2N multiplies for a direct form realization to roughly (N + 1)2 for an optimal realization. However, if the filter is realized by the parallel or cascade connection of first- and second-order optimal subfilters, the increase is only to about 4N multiplies. Furthermore, near-optimal realizations exist that increase the number of multiplies to only about 3N .", null, "Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail\nDigital Signal Processing : FIR Filter Design : Roundoff Noise in FIR Filters |" ]
[ null, "https://img.brainkart.com/imagebk14/2xfRJtn.jpg", null, "https://img.brainkart.com/imagebk14/OqZZM8q.jpg", null, "https://img.brainkart.com/imagebk14/7zSuBaE.jpg", null, "https://img.brainkart.com/imagebk14/JjwG1AV.jpg", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.87737995,"math_prob":0.9967335,"size":3763,"snap":"2022-27-2022-33","text_gpt3_token_len":1006,"char_repetition_ratio":0.123437084,"word_repetition_ratio":0.0066115703,"special_character_ratio":0.27903268,"punctuation_ratio":0.08411215,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9988227,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,3,null,3,null,3,null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-25T21:03:20Z\",\"WARC-Record-ID\":\"<urn:uuid:818face9-9216-4f54-a513-d8c81b886655>\",\"Content-Length\":\"37830\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9463a5ca-277e-414c-ab1b-062e4c5eb032>\",\"WARC-Concurrent-To\":\"<urn:uuid:c3cf3ab5-1abf-495d-89fa-0136c377a187>\",\"WARC-IP-Address\":\"68.178.145.35\",\"WARC-Target-URI\":\"https://www.brainkart.com/article/Roundoff-Noise-in-FIR-Filters_13056/\",\"WARC-Payload-Digest\":\"sha1:CJCU3Y3HKANF4T5YL4KVMWDAMRI6GRMQ\",\"WARC-Block-Digest\":\"sha1:6VZG6JDK5S5YHSM4XSHU4OJNLV7FIPMP\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103036099.6_warc_CC-MAIN-20220625190306-20220625220306-00345.warc.gz\"}"}
https://cm-to-inches.appspot.com/321-cm-to-inches.html
[ "Cm To Inches\n\n# 321 cm to in321 Centimeters to Inches\n\ncm\n=\nin\n\n## How to convert 321 centimeters to inches?\n\n 321 cm * 0.3937007874 in = 126.377952756 in 1 cm\nA common question is How many centimeter in 321 inch? And the answer is 815.34 cm in 321 in. Likewise the question how many inch in 321 centimeter has the answer of 126.377952756 in in 321 cm.\n\n## How much are 321 centimeters in inches?\n\n321 centimeters equal 126.377952756 inches (321cm = 126.377952756in). Converting 321 cm to in is easy. Simply use our calculator above, or apply the formula to change the length 321 cm to in.\n\n## Convert 321 cm to common lengths\n\nUnitLength\nNanometer3210000000.0 nm\nMicrometer3210000.0 µm\nMillimeter3210.0 mm\nCentimeter321.0 cm\nInch126.377952756 in\nFoot10.531496063 ft\nYard3.5104986877 yd\nMeter3.21 m\nKilometer0.00321 km\nMile0.0019946015 mi\nNautical mile0.0017332613 nmi\n\n## What is 321 centimeters in in?\n\nTo convert 321 cm to in multiply the length in centimeters by 0.3937007874. The 321 cm in in formula is [in] = 321 * 0.3937007874. Thus, for 321 centimeters in inch we get 126.377952756 in.\n\n## 321 Centimeter Conversion Table", null, "## Alternative spelling\n\n321 cm to Inches, 321 cm in Inches, 321 cm to Inch, 321 cm in Inch, 321 Centimeter to Inches, 321 Centimeter in Inches, 321 Centimeters to Inch, 321 Centimeters in Inch, 321 Centimeter to Inch, 321 Centimeter in Inch, 321 Centimeter to in, 321 Centimeter in in, 321 Centimeters to Inches, 321 Centimeters in Inches" ]
[ null, "https://cm-to-inches.appspot.com/image/321.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.79804426,"math_prob":0.96426094,"size":1076,"snap":"2021-43-2021-49","text_gpt3_token_len":319,"char_repetition_ratio":0.2602612,"word_repetition_ratio":0.015957447,"special_character_ratio":0.3986989,"punctuation_ratio":0.15517241,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9816844,"pos_list":[0,1,2],"im_url_duplicate_count":[null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-12-04T14:27:43Z\",\"WARC-Record-ID\":\"<urn:uuid:b00ef69e-831c-4d6c-87fc-33c7dbba2156>\",\"Content-Length\":\"28768\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:09cb1da9-15d0-4b0f-aefb-7c39f14d7877>\",\"WARC-Concurrent-To\":\"<urn:uuid:b6f8f116-bbe8-498d-8d46-e94a9a9876e8>\",\"WARC-IP-Address\":\"172.217.0.52\",\"WARC-Target-URI\":\"https://cm-to-inches.appspot.com/321-cm-to-inches.html\",\"WARC-Payload-Digest\":\"sha1:MPJUKE7GCKKGROQJKI6VBAPAZ6DYIJXJ\",\"WARC-Block-Digest\":\"sha1:WRZ2DDAN5BDKNKGN7SUYWSHUTOPSGZXN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964362992.98_warc_CC-MAIN-20211204124328-20211204154328-00359.warc.gz\"}"}
https://math.stackexchange.com/questions/3016823/hessian-vector-products/3016967
[ "# Hessian-vector products\n\nCan someone explain why this is true?\n\n$$g(x + \\Delta x) = g(x) + H(x) \\Delta x$$\n\nwhere g is the gradient of function f(x) with respect to x, and H is the hessian of f(x) with respect to x.\n\nI would really appreciate a detailed derivation because I don't understand what it means to take the gradient/derivative of $$\\Delta x$$ which represents the change in x.\n\nSource towards the top here: https://justindomke.wordpress.com/2009/01/17/hessian-vector-products/\n\n• Is it like the third term in the taylor expansion? en.m.wikipedia.org/wiki/…\n– Emil\nNov 28, 2018 at 7:14\n• Is the lhs supposed to be the gradient taken at a point or is it a scalar? The hessian is a second order tensor, so it should eat two dx to become a scalar, not one, I believe.\n– Emil\nNov 28, 2018 at 7:22\n• $\\Delta x$ is a vector I believe Nov 28, 2018 at 7:58\n• I don't know why you're talking about scalars, the Hessian H(x) is a vector and so is $\\Delta x$. Is it because the source link is $g(x) = \\frac{d}{dx} f(x)$ is using scalar notation? He intends this to be the gradient of a vector Nov 28, 2018 at 8:01\n• user3180: to know if there is an error and if so if it is on lhs or rhs (hessian is a second order tensor not a vector, according to some definitions, or maybe even third order tensor)\n– Emil\nNov 28, 2018 at 13:26\n\nFor a scalar function f,\n\n$$f(x+dx) \\approx f(x)+ \\frac{d f(x)}{dx}* dx$$\n\nVector case [$$x$$ is (n,1) dimensional vector]:\n\n$$g(x + \\Delta x) \\approx g(x) + g(\\Delta x)$$\n\n$$g(x) = \\nabla f(x) = \\begin{bmatrix} g_1{(x)} \\\\ g_2{(x)} \\\\ \\vdots \\\\ g_n{(x)} \\end{bmatrix}$$ $$\\mid g_i{(x)} = \\frac{\\partial f(x)}{dx_i}$$\n\n$$H(x) = \\nabla g(x) = \\begin{bmatrix} \\nabla g_1{(x)}^T \\\\ \\nabla g_2{(x)}^T \\\\ \\vdots \\\\ \\nabla g_n{(x)}^T \\end{bmatrix}$$\n\n$$g(x) +g(\\Delta x) = g(x) + \\Delta g(x)\\approx g(x)+ \\begin{bmatrix} \\nabla g_1{(x)}^T \\Delta x \\\\ \\nabla g_2{(x)}^T \\Delta x\\\\ \\vdots \\\\ \\nabla g_n{(x)}^T \\Delta x \\end{bmatrix}$$\n\nTranslation: $$g(\\Delta x)$$ represents g with a small change in x as input, which is equivalent to $$\\Delta g(x)$$ [the infinitesimal change in g(x)].\n\nIf you look at the last column vector, you will see that each row $$\\nabla g_i(x)^T \\Delta x$$ represents the (rate of change of $$g_i(x)$$/rate of change of x) dotted with (infinitesimal change in x) := infinitesimal change in $$g_i(x)$$. In aggregate, the column vector represents the infinitesimal change in g(x) := $$\\Delta g(x)$$." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.67970717,"math_prob":0.99988425,"size":1129,"snap":"2022-27-2022-33","text_gpt3_token_len":421,"char_repetition_ratio":0.16888888,"word_repetition_ratio":0.0,"special_character_ratio":0.3826395,"punctuation_ratio":0.0745614,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.000004,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-30T04:16:59Z\",\"WARC-Record-ID\":\"<urn:uuid:21ba6e26-6577-4b31-9dd7-b88e7aa96e92>\",\"Content-Length\":\"229198\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:67572232-58c4-4e77-b68d-98012c5b2a45>\",\"WARC-Concurrent-To\":\"<urn:uuid:d4e2b204-9c76-4357-aab3-7a4288172f2d>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/3016823/hessian-vector-products/3016967\",\"WARC-Payload-Digest\":\"sha1:C2TY2GBM4DHI5PAH6UE624W7YDM77UX5\",\"WARC-Block-Digest\":\"sha1:CSNG5MTKPFQYTNS32K6HMEN25W755WLP\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103661137.41_warc_CC-MAIN-20220630031950-20220630061950-00290.warc.gz\"}"}
https://answers.opencv.org/question/37392/how-to-compute-intersections-of-two-contours/
[ "# How to compute intersections of two contours", null, "I have 2 contours and I want to compare how much the same are they, as the ratio of the area_of_c1/area_of_intersection and area_of_c2/area_of_intersection. I have done in a way of creating 2 convex contours and 2 Mats of zeros and fill them with fillConvexPoly() and doing a bitwise_and() between the two Mats for getting the intersection. Then I have counting the non zeros pixels for getting the areas and computed the ratios. Is there another more efficient way of computing the two ratios (like computing the intersection of two contours, or I do not know)?\n\nedit retag close merge delete\n\nNope, what you are doing was exactly what I would have suggested.\n\n1\n\nInstead of a bitwes_and, I would suggest sum areas, with an image of 1's and an image of 2's (for example) and count 1's, 2's and 3's to get all areas in the same time. But nothing really better I'm afraid… ;-)\n\nSort by » oldest newest most voted\n\nSounds ok. (i guess you now cv::countNonZero). If you have many(!) contours and run into speed or accuracy problems, a specialized library like CGAL https://www.cgal.org/ could help you. You compute an approximation of the intersection area whose accuracy depends on the resolution of the image in which you draw the regions. This can be perfectly fine if your regions are nice (no sharp spikes or one-Pixel regions) but if you get problems, an analytical solution (e.g. as implemented in CGAL) could help.\n\nmore\n\nI do not think I need that, because I have convex contours. Is fillConvecPoly faster than fillPoly?\n\n2\n\n\"The function fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly .\"\n\nshall I use if (cv::isContourConvex(c)) {cv::convexHull(c, cc);} or just cv::convexHull(c, cc);?\n\nI don't know if the fillcomplexpolly is computationally heavy or not, so I do it another (very similar) way.\n\nI create a Mask where I draw a rectangle corresponding to the bounding box of the blob, and then use logical \"and\" between mask and the image with the blobs to segment the blob from everything else. The rest of the process is the same. Try it, I have no idea which method is more optimized.\n\nThis code snippet calculates the ration between contour 1 and 2 of blobImage.\n\n cv::findContours(blobImage, contours, hierarchy, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);\n\ncv::Mat mask1 = cv::Mat::zeros(height, width, CV_8UC1);\ncv::Mat mask2 = cv::Mat::zeros(height, width, CV_8UC1);\n\ncv::rectangle(mask1, cv::boundingRect(contours), 255, -1, 8 ,0);\ncv::rectangle(mask2, cv::boundingRect(contours), 255, -1, 8 ,0);\n\ncv::Mat intersection1 = (mask1 && blobImage) // binary image with only with blob 1\ncv::Mat intersection2 = (mask2 && blobImage) // binary image with only with blob 2\n\ncv::Scalar sum1 = cv::sum(intersection1);\ncv::Scalar sum2 = cv::sum(intersection2);\n\ndouble ratio = (sum1 / sum2);\n\nmore\n\nOfficial site\n\nGitHub\n\nWiki\n\nDocumentation" ]
[ null, "https://www.gravatar.com/avatar/3c4215f4c7840ac17739d3dd9bec904b", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.95695746,"math_prob":0.81754315,"size":884,"snap":"2022-27-2022-33","text_gpt3_token_len":221,"char_repetition_ratio":0.14318182,"word_repetition_ratio":0.0,"special_character_ratio":0.2341629,"punctuation_ratio":0.07647059,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98940814,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-11T18:46:29Z\",\"WARC-Record-ID\":\"<urn:uuid:a3534d57-4b3a-4a5c-ac1d-678a461a532a>\",\"Content-Length\":\"69516\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f881bfd3-06ae-4226-9384-836722cd6f37>\",\"WARC-Concurrent-To\":\"<urn:uuid:174cc2d2-86ef-493c-a908-80c6985da17c>\",\"WARC-IP-Address\":\"172.67.218.21\",\"WARC-Target-URI\":\"https://answers.opencv.org/question/37392/how-to-compute-intersections-of-two-contours/\",\"WARC-Payload-Digest\":\"sha1:OIU24HBEJLSQ4BDVVODDCDWKBYPOCK7E\",\"WARC-Block-Digest\":\"sha1:MWOMANP5VF7DN7DMGKHKX25YGRHDPOPY\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882571483.70_warc_CC-MAIN-20220811164257-20220811194257-00112.warc.gz\"}"}
https://vbforfree.com/solved-excel-vba-adding-symbol-to-formula-and-table-column-reference/
[ "# (Solved) – Excel VBA adding @ symbol to formula and table column reference", null, "I am adding a formula to a worksheet via VBA which should be:\n\n``````=UNIQUE(IF(TableA[ColumnA]=A1,TableA[ColumnB],\"\"))\n``````\n\nThis utilises the new SPILL feature in Excel to give me a list of column B values where the related value in column A matches what is in cell A. I’m also applying the UNIQUE function to remove any multiple blank (“”) results.\n\nThis works perfectly if I manually type the formula into Excel, however in using VBA to add the formula, Excel is adding @ symbols within the formula, and causing it to show #VALUE!.\n\nThe VBA line being used to add the formula is:\n\n``````=Cells(x,y).Formula = \"=UNIQUE(IF(TableA[ColumnA]=A1,TableA[ColumnB],\"\"\"\"))\"\n``````\n\nThe resulting output in Excel is:\n\n``````=@UNIQUE(IF(TableA[@[ColumnA]]=A1,TableA[ColumnB],\"\")\n``````\n\nWhat is going on, and what have I missed?" ]
[ null, "https://vbforfree.com/wp-content/uploads/2020/04/4602/solved-excel-vba-adding-symbol-to-formula-and-table-column-reference.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7825459,"math_prob":0.89040124,"size":794,"snap":"2020-24-2020-29","text_gpt3_token_len":208,"char_repetition_ratio":0.15189873,"word_repetition_ratio":0.0,"special_character_ratio":0.25062972,"punctuation_ratio":0.12962963,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99805003,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-05-24T21:35:27Z\",\"WARC-Record-ID\":\"<urn:uuid:ecb87791-a010-48fc-aadc-b9122c5c9b71>\",\"Content-Length\":\"55690\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:78007636-f7f4-4b25-9c52-221370d3b94b>\",\"WARC-Concurrent-To\":\"<urn:uuid:a8fd5dad-e9c9-4af7-983b-fdeca09452ff>\",\"WARC-IP-Address\":\"145.239.118.128\",\"WARC-Target-URI\":\"https://vbforfree.com/solved-excel-vba-adding-symbol-to-formula-and-table-column-reference/\",\"WARC-Payload-Digest\":\"sha1:DKRP532BHMM4FP3TPUD4I7NQKP3ROCCY\",\"WARC-Block-Digest\":\"sha1:JOHSMAKUMVWGISM3E5R43X7NMGWTDGSO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-24/CC-MAIN-2020-24_segments_1590347385193.5_warc_CC-MAIN-20200524210325-20200525000325-00241.warc.gz\"}"}
https://pdfkul.com/machine-instructions-and-programs_5a61d44a1723ddf3a7f50802.html
[ "Hamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\nC H A P T E R\n\n2 MACHINE INSTRUCTIONS AND PROGRAMS\n\nCHAPTER OBJECTIVES In this chapter you will learn about: • • • • • •\n\nMachine instructions and program execution, including branching and subroutine call and return operations Number representation and addition/subtraction in the 2’s-complement system Addressing methods for accessing register and memory operands Assembly language for representing machine instructions, data, and programs Program-controlled Input/Output operations Operations on stack, queue, list, linked-list, and array data structures\n\n25\n\nHamacher-38086\n\n26\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.1\n\n2.1\n\nNUMBERS, ARITHMETIC OPERATIONS, AND CHARACTERS\n\nNUMBERS, ARITHMETIC OPERATIONS, AND CHARACTERS\n\nComputers are built using logic circuits that operate on information represented by twovalued electrical signals (see Appendix A). We label the two values as 0 and 1; and we define the amount of information represented by such a signal as a bit of information, where bit stands for binary digit. The most natural way to represent a number in a computer system is by a string of bits, called a binary number. A text character can also be represented by a string of bits called a character code. We will first describe binary number representations and arithmetic operations on these numbers, and then describe character representations.\n\n2.1.1 N UMBER R EPRESENTATION Consider an n-bit vector B = bn−1 . . . b1 b0 where bi = 0 or 1 for 0 ≤ i ≤ n − 1. This vector can represent unsigned integer values V in the range 0 to 2n − 1, where V (B) = bn−1 × 2n−1 + · · · + b1 × 21 + b0 × 20 We obviously need to represent both positive and negative numbers. Three systems are used for representing such numbers: • • •\n\nSign-and-magnitude 1’s-complement 2’s-complement\n\nIn all three systems, the leftmost bit is 0 for positive numbers and 1 for negative numbers. Figure 2.1 illustrates all three representations using 4-bit numbers. Positive values have identical representations in all systems, but negative values have different representations. In the sign-and-magnitude system, negative values are represented by changing the most significant bit (b3 in Figure 2.1) from 0 to 1 in the B vector of the corresponding positive value. For example, +5 is represented by 0101, and −5 is represented by 1101. In 1’s-complement representation, negative values are obtained by complementing each bit of the corresponding positive number. Thus, the representation for −3 is obtained by complementing each bit in the vector 0011 to yield 1100. Clearly, the same operation, bit complementing, is done in converting a negative number to the corresponding positive value. Converting either way is referred to as forming the 1’s-complement of a given number. The operation of forming the 1’s-complement of a given number is equivalent to subtracting that number from 2n − 1, that is, from 1111 in the case of the 4-bit numbers in Figure 2.1. Finally, in the 2’s-complement system, forming the 2’s-complement of a number is done by subtracting that number from 2n .\n\n27\n\nHamacher-38086\n\n28\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nB\n\nValues represented\n\nb3 b2 b1 b0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1\n\n1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1\n\n1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1\n\n1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1\n\nSign and magnitude +7 +6 +5 +4 +3 +2 +1 +0 –0 –1 –2 –3 –4 –5 –6 –7\n\n1’s complement +7 +6 +5 +4 +3 +2 +1 +0 –7 –6 –5 –4 –3 –2 –1 –0\n\n2’s complement +7 +6 +5 +4 +3 +2 +1 +0 –8 –7 –6 –5 –4 –3 –2 –1\n\nFigure 2.1 Binary, signed-integer representations.\n\nHence, the 2’s-complement of a number is obtained by adding 1 to the 1’s-complement of that number. Note that there are distinct representations for +0 and −0 in both the sign-andmagnitude and 1’s-complement systems, but the 2’s-complement system has only one representation for 0. For 4-bit numbers, the value −8 is representable in the 2’scomplement system but not in the other systems. The sign-and-magnitude system seems the most natural, because we deal with sign-and-magnitude decimal values in manual computations. The 1’s-complement system is easily related to this system, but the 2’scomplement system seems unnatural. However, we will show in Section 2.1.3 that the 2’s-complement system yields the most efficient way to carry out addition and subtraction operations. It is the one most often used in computers.\n\n2.1.2 A DDITION OF POSITIVE N UMBERS Consider adding two 1-bit numbers. The results are shown in Figure 2.2. Note that the sum of 1 and 1 requires the 2-bit vector 10 to represent the value 2. We say that the sum is 0 and the carry-out is 1. In order to add multiple-bit numbers, we use a method analogous to that used for manual computation with decimal numbers. We add bit pairs starting from the low-order (right) end of the bit vectors, propagating carries toward the high-order (left) end.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.1\n\n0 +\n\n0 0\n\nNUMBERS, ARITHMETIC OPERATIONS, AND CHARACTERS\n\n1 +\n\n0\n\n0\n\n+\n\n1\n\n1 1\n\n1 +\n\n1 10\n\nCarry-out Figure 2.2 Addition of 1-bit numbers.\n\n29\n\nHamacher-38086\n\n30\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nN–1\n\n0\n\n1\n\nN–2\n\n2\n\n(a) Circle representation of integers mod N\n\n0000\n\n1111 1110 1101 1100\n\n–1\n\n0\n\n0001 0010\n\n+1\n\n–2 –3\n\n+2 +3\n\n–4\n\n+4\n\n–5 1011\n\n0011\n\n+5\n\n–6\n\n+6 –7 –8 +7\n\n1010 1001\n\n0100\n\n1000\n\n0101 0110\n\n0111\n\n(b) Mod 16 system for 2’s-complement numbers Figure 2.3 Modular number systems and the 2’s-complement system.\n\nNote that if we ignore the carry-out from the fourth bit position in this addition, we obtain the correct answer. In fact, this is always the case. Ignoring this carry-out is a natural result of using mod N arithmetic. As we move around the circle in Figure 2.3b, the value next to 1111 would normally be 10000. Instead, we go back to the value 0000. We now state the rules governing the addition and subtraction of n-bit signed numbers using the 2’s-complement representation system. 1. To add two numbers, add their n-bit representations, ignoring the carry-out signal from the most significant bit (MSB) position. The sum will be the algebraically correct value in the 2’s-complement representation as long as the answer is in the range −2n−1 through +2n−1 − 1.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.1\n\nNUMBERS, ARITHMETIC OPERATIONS, AND CHARACTERS\n\n2. To subtract two numbers X and Y , that is, to perform X − Y , form the 2’scomplement of Y and then add it to X , as in rule 1. Again, the result will be the algebraically correct value in the 2’s-complement representation system if the answer is in the range −2n−1 through +2n−1 − 1. Figure 2.4 shows some examples of addition and subtraction. In all these 4-bit examples, the answers fall into the representable range of −8 through +7. When answers do not fall within the representable range, we say that arithmetic overflow has occurred. The next section discusses such situations. The four addition operations (a) through (d) in Figure 2.4 follow rule 1, and the six subtraction operations (e) through ( j) follow rule 2. The subtraction operation requires the subtrahend (the bottom value) to be\n\n(a)\n\n(c)\n\n(e)\n\n0100 + 1010\n\n(+ 4) (– 6)\n\n1110\n\n(– 2)\n\n0111 + 1101\n\n(+ 7)\n\n(– 7)\n\n0100\n\n(+ 4)\n\n(– 3) (–7 )\n\n1101 + 0111\n\n0010 + 0011\n\n(+ 2) (+ 3)\n\n0101\n\n(+ 5)\n\n1011 + 1110\n\n(– 5) (– 2)\n\n1001 1101 – 1001\n\n(b)\n\n(d)\n\n0100 (f)\n\n0010 – 0100\n\n(+ 2) ( + 4)\n\n0110 – 0011\n\n(+ 6) (+ 3)\n\n1001 – 1011\n\n(– 7) (– 5)\n\n1001 – 0001\n\n(– 7) (+ 1)\n\n0010 – 1101\n\n(+ 2) (– 3)\n\n(– 2)\n\n1001 + 1111 1000\n\n(j)\n\n(+ 3)\n\n1001 + 0101 1110\n\n(i)\n\n(– 2)\n\n0110 + 1101 0011\n\n(h)\n\n(+ 4)\n\n0010 + 1100 1110\n\n(g)\n\n(–3 )\n\n(–8 )\n\n0010 + 0011 0101\n\nFigure 2.4 2’s-complement add and subtract operations.\n\n( + 5)\n\n31\n\nHamacher-38086\n\n32\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\n2’s-complemented. This operation is done in exactly the same manner for both positive and negative numbers. We often need to represent a number in the 2’s-complement system by using a number of bits that is larger than some given size. For a positive number, this is achieved by adding 0s to the left. For a negative number, the leftmost bit, which is the sign bit, is a 1, and a longer number with the same value is obtained by replicating the sign bit to the left as many times as desired. To see why this is correct, examine the mod 16 circle of Figure 2.3b. Compare it to larger circles for the mod 32 or mod 64 cases. The representations for values −1, −2, etc., would be exactly the same, with 1s added to the left. In summary, to represent a signed number in 2’s-complement form using a larger number of bits, repeat the sign bit as many times as needed to the left. This operation is called sign extension. The simplicity of either adding or subtracting signed numbers in 2’s-complement representation is the reason why this number representation is used in modern computers. It might seem that the 1’s-complement representation would be just as good as the 2’s-complement system. However, although complementation is easy, the result obtained after an addition operation is not always correct. The carry-out, cn , cannot be ignored. If cn = 0, the result obtained is correct. If cn = 1, then a 1 must be added to the result to make it correct. The need for this correction cycle, which is conditional on the carry-out from the add operation, means that addition and subtraction cannot be implemented as conveniently in the 1’s-complement system as in the 2’s-complement system.\n\n2.1.4 O VERFLOW IN INTEGER A RITHMETIC In the 2’s-complement number representation system, n bits can represent values in the range −2n−1 to +2n−1 − 1. For example, using four bits, the range of numbers that can be represented is −8 through +7, as shown in Figure 2.1. When the result of an arithmetic operation is outside the representable range, an arithmetic overflow has occurred. When adding unsigned numbers, the carry-out, cn , from the most significant bit position serves as the overflow indicator. However, this does not work for adding signed numbers. For example, when using 4-bit signed numbers, if we try to add the numbers +7 and +4, the output sum vector, S, is 1011, which is the code for −5, an incorrect result. The carry-out signal from the MSB position is 0. Similarly, if we try to add −4 and −6, we get S = 0110 = +6, another incorrect result, and in this case, the carry-out signal is 1. Thus, overflow may occur if both summands have the same sign. Clearly, the addition of numbers with different signs cannot cause overflow. This leads to the following conclusions: 1. Overflow can occur only when adding two numbers that have the same sign. 2. The carry-out signal from the sign-bit position is not a sufficient indicator of overflow when adding signed numbers. A simple way to detect overflow is to examine the signs of the two summands X and Y and the sign of the result. When both operands X and Y have the same sign, an overflow occurs when the sign of S is not the same as the signs of X and Y .\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.2\n\n2.1.5 C HARACTERS In addition to numbers, computers must be able to handle nonnumeric text information consisting of characters. Characters can be letters of the alphabet, decimal digits, punctuation marks, and so on. They are represented by codes that are usually eight bits long. One of the most widely used such codes is the American Standards Committee on Information Interchange (ASCII) code described in Appendix E.\n\n2.2\n\nNumber and character operands, as well as instructions, are stored in the memory of a computer. We will now consider how the memory is organized. The memory consists of many millions of storage cells, each of which can store a bit of information having the value 0 or 1. Because a single bit represents a very small amount of information, bits are seldom handled individually. The usual approach is to deal with them in groups of fixed size. For this purpose, the memory is organized so that a group of n bits can be stored or retrieved in a single, basic operation. Each group of n bits is referred to as a word of information, and n is called the word length. The memory of a computer can be schematically represented as a collection of words as shown in Figure 2.5. Modern computers have word lengths that typically range from 16 to 64 bits. If the word length of a computer is 32 bits, a single word can store a 32-bit 2’s-complement number or four ASCII characters, each occupying 8 bits, as shown in Figure 2.6. A unit of 8 bits is called a byte. Machine instructions may require one or more words for their representation. We will discuss how machine instructions are encoded into memory words in a later section after we have described instructions at the assembly language level. Accessing the memory to store or retrieve a single item of information, either a word or a byte, requires distinct names or addresses for each item location. It is customary to use numbers from 0 through 2k − 1, for some suitable value of k, as the addresses of successive locations in the memory. The 2k addresses constitute the address space of the computer, and the memory can have up to 2k addressable locations. For example, a 24-bit address generates an address space of 224 (16,777,216) locations. This number is usually written as 16M (16 mega), where 1M is the number 220 (1,048,576). A 32-bit address creates an address space of 232 or 4G (4 giga) locations, where 1G is 230 . Other notational conventions that are commonly used are K (kilo) for the number 210 (1,024), and T (tera) for the number 240 .\n\n2.2.1 B YTE A DDRESSABILITY We now have three basic information quantities to deal with: the bit, byte, and word. A byte is always 8 bits, but the word length typically ranges from 16 to 64 bits. It is impractical to assign distinct addresses to individual bit locations in the memory. The most practical assignment is to have successive addresses refer to successive byte\n\n33\n\nHamacher-38086\n\n34\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nn bits first word second word\n\ni-th word\n\nlast word Figure 2.5 Memory words.\n\n32 bits b 31 b 30\n\nb1\n\nb0\n\nSign bit: b 31 = 0 for positive numbers b 31 = 1 for negative numbers (a) A signed integer\n\n8 bits\n\n8 bits\n\n8 bits\n\n8 bits\n\nASCII character\n\nASCII character\n\nASCII character\n\nASCII character\n\n(b) Four characters Figure 2.6 Examples of encoded information in a 32-bit word.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.2\n\nlocations in the memory. This is the assignment used in most modern computers, and is the one we will normally use in this book. The term byte-addressable memory is used for this assignment. Byte locations have addresses 0, 1, 2, . . . . Thus, if the word length of the machine is 32 bits, successive words are located at addresses 0, 4, 8, . . . , with each word consisting of four bytes.\n\n2.2.2 B IG -ENDIAN AND L ITTLE-ENDIAN A SSIGNMENTS There are two ways that byte addresses can be assigned across words, as shown in Figure 2.7. The name big-endian is used when lower byte addresses are used for the more significant bytes (the leftmost bytes) of the word. The name little-endian is used for the opposite ordering, where the lower byte addresses are used for the less significant bytes (the rightmost bytes) of the word. The words “more significant” and “less significant” are used in relation to the weights (powers of 2) assigned to bits when the word represents a number, as described in Section 2.1.1. Both little-endian and big-endian assignments are used in commercial machines. In both cases, byte addresses 0, 4, 8, . . . , are taken as the addresses of successive words in the memory and are the addresses used when specifying memory read and write operations for words. In addition to specifying the address ordering of bytes within a word, it is also necessary to specify the labeling of bits within a byte or a word. The most common convention, and the one we will use in this book, is shown in Figure 2.6a. It is the\n\n0\n\n0\n\n1\n\n2\n\n3\n\n0\n\n3\n\n2\n\n1\n\n0\n\n4\n\n4\n\n5\n\n6\n\n7\n\n4\n\n7\n\n6\n\n5\n\n4\n\n2 –4\n\n2 –4\n\nk\n\nk\n\nk\n\n2 –3\n\nk\n\n2 –2\n\nk\n\n2 –1\n\n(a) Big-endian assignment Figure 2.7 Byte and word addressing.\n\nk\n\n2 –4\n\nk\n\n2 –1\n\nk\n\n2 –2\n\nk\n\n2 –3\n\nk\n\n2 –4\n\n(b) Little-endian assignment\n\n35\n\nHamacher-38086\n\n36\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nmost natural ordering for the encoding of numerical data. The same ordering is also used for labeling bits within a byte, that is, b7 , b6 , . . . , b0 , from left to right. There are computers, however, that use the reverse ordering.\n\n2.2.3 WORD A LIGNMENT In the case of a 32-bit word length, natural word boundaries occur at addresses 0, 4, 8, . . . , as shown in Figure 2.7. We say that the word locations have aligned addresses. In general, words are said to be aligned in memory if they begin at a byte address that is a multiple of the number of bytes in a word. For practical reasons associated with manipulating binary-coded addresses, the number of bytes in a word is a power of 2. Hence, if the word length is 16 (2 bytes), aligned words begin at byte addresses 0, 2, 4, . . . , and for a word length of 64 (23 bytes), aligned words begin at byte addresses 0, 8, 16, . . . . There is no fundamental reason why words cannot begin at an arbitrary byte address. In that case, words are said to have unaligned addresses. While the most common case is to use aligned addresses, some computers allow the use of unaligned word addresses.\n\n2.2.4 A CCESSING N UMBERS, C HARACTERS, AND\n\nC HARACTER STRINGS\n\nA number usually occupies one word. It can be accessed in the memory by specifying its word address. Similarly, individual characters can be accessed by their byte address. In many applications, it is necessary to handle character strings of variable length. The beginning of the string is indicated by giving the address of the byte containing its first character. Successive byte locations contain successive characters of the string. There are two ways to indicate the length of the string. A special control character with the meaning “end of string” can be used as the last character in the string, or a separate memory word location or processor register can contain a number indicating the length of the string in bytes.\n\n2.3\n\nMEMORY OPERATIONS\n\nBoth program instructions and data operands are stored in the memory. To execute an instruction, the processor control circuits must cause the word (or words) containing the instruction to be transferred from the memory to the processor. Operands and results must also be moved between the memory and the processor. Thus, two basic operations involving the memory are needed, namely, Load (or Read or Fetch) and Store (or Write).\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.4\n\nINSTRUCTIONS AND INSTRUCTION SEQUENCING\n\nThe Load operation transfers a copy of the contents of a specific memory location to the processor. The memory contents remain unchanged. To start a Load operation, the processor sends the address of the desired location to the memory and requests that its contents be read. The memory reads the data stored at that address and sends them to the processor. The Store operation transfers an item of information from the processor to a specific memory location, destroying the former contents of that location. The processor sends the address of the desired location to the memory, together with the data to be written into that location. An information item of either one word or one byte can be transferred between the processor and the memory in a single operation. As described in Chapter 1, the processor contains a small number of registers, each capable of holding a word. These registers are either the source or the destination of a transfer to or from the memory. When a byte is transferred, it is usually located in the low-order (rightmost) byte position of the register. The details of the hardware implementation of these operations are treated in Chapters 5 and 7. In this chapter, we are taking the ISA viewpoint, so we concentrate on the logical handling of instructions and operands. Specific hardware components, such as processor registers, are discussed only to the extent necessary to understand the execution of machine instructions and programs.\n\n2.4\n\nINSTRUCTIONS AND INSTRUCTION SEQUENCING\n\nThe tasks carried out by a computer program consist of a sequence of small steps, such as adding two numbers, testing for a particular condition, reading a character from the keyboard, or sending a character to be displayed on a display screen. A computer must have instructions capable of performing four types of operations: • • • •\n\nData transfers between the memory and the processor registers Arithmetic and logic operations on data Program sequencing and control I/O transfers\n\nWe begin by discussing the first two types of instructions. To facilitate the discussion, we need some notation which we present first.\n\n2.4.1 R EGISTER TRANSFER N OTATION We need to describe the transfer of information from one location in the computer to another. Possible locations that may be involved in such transfers are memory locations, processor registers, or registers in the I/O subsystem. Most of the time, we identify a location by a symbolic name standing for its hardware binary address. For example,\n\n37\n\nHamacher-38086\n\n38\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nnames for the addresses of memory locations may be LOC, PLACE, A, VAR2; processor register names may be R0, R5; and I/O register names may be DATAIN, OUTSTATUS, and so on. The contents of a location are denoted by placing square brackets around the name of the location. Thus, the expression R1 ← [LOC] means that the contents of memory location LOC are transferred into processor register R1. As another example, consider the operation that adds the contents of registers R1 and R2, and then places their sum into register R3. This action is indicated as R3 ← [R1] + [R2] This type of notation is known as Register Transfer Notation (RTN). Note that the right-hand side of an RTN expression always denotes a value, and the left-hand side is the name of a location where the value is to be placed, overwriting the old contents of that location.\n\n2.4.2 A SSEMBLY L ANGUAGE N OTATION We need another type of notation to represent machine instructions and programs. For this, we use an assembly language format. For example, an instruction that causes the transfer described above, from memory location LOC to processor register R1, is specified by the statement Move\n\nLOC,R1\n\nThe contents of LOC are unchanged by the execution of this instruction, but the old contents of register R1 are overwritten. The second example of adding two numbers contained in processor registers R1 and R2 and placing their sum in R3 can be specified by the assembly language statement Add\n\nR1,R2,R3\n\n2.4.3 B ASIC INSTRUCTION TYPES The operation of adding two numbers is a fundamental capability in any computer. The statement C=A+B in a high-level language program is a command to the computer to add the current values of the two variables called A and B, and to assign the sum to a third variable, C. When the program containing this statement is compiled, the three variables, A, B, and C, are assigned to distinct locations in the memory. We will use the variable names to refer to the corresponding memory location addresses. The contents of these locations represent the values of the three variables. Hence, the above high-level language\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.4\n\nINSTRUCTIONS AND INSTRUCTION SEQUENCING\n\nstatement requires the action C ← [A] + [B] to take place in the computer. To carry out this action, the contents of memory locations A and B are fetched from the memory and transferred into the processor where their sum is computed. This result is then sent back to the memory and stored in location C. Let us first assume that this action is to be accomplished by a single machine instruction. Furthermore, assume that this instruction contains the memory addresses of the three operands — A, B, and C. This three-address instruction can be represented symbolically as Add\n\nA,B,C\n\nOperands A and B are called the source operands, C is called the destination operand, and Add is the operation to be performed on the operands. A general instruction of this type has the format Operation\n\nSource1,Source2,Destination\n\nIf k bits are needed to specify the memory address of each operand, the encoded form of the above instruction must contain 3k bits for addressing purposes in addition to the bits needed to denote the Add operation. For a modern processor with a 32-bit address space, a 3-address instruction is too large to fit in one word for a reasonable word length. Thus, a format that allows multiple words to be used for a single instruction would be needed to represent an instruction of this type. An alternative approach is to use a sequence of simpler instructions to perform the same task, with each instruction having only one or two operands. Suppose that two-address instructions of the form Operation Source,Destination are available. An Add instruction of this type is Add\n\nA,B\n\nwhich performs the operation B ← [A] + [B]. When the sum is calculated, the result is sent to the memory and stored in location B, replacing the original contents of this location. This means that operand B is both a source and a destination. A single two-address instruction cannot be used to solve our original problem, which is to add the contents of locations A and B, without destroying either of them, and to place the sum in location C. The problem can be solved by using another twoaddress instruction that copies the contents of one memory location into another. Such an instruction is Move\n\nB,C\n\nwhich performs the operation C ← [B], leaving the contents of location B unchanged. The word “Move” is a misnomer here; it should be “Copy.” However, this instruction name is deeply entrenched in computer nomenclature. The operation C ← [A] + [B]\n\n39\n\nHamacher-38086\n\n40\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\ncan now be performed by the two-instruction sequence Move B,C Add A,C In all the instructions given above, the source operands are specified first, followed by the destination. This order is used in the assembly language expressions for machine instructions in many computers. But there are also many computers in which the order of the source and destination operands is reversed. We will see examples of both orderings in Chapter 3. It is unfortunate that no single convention has been adopted by all manufacturers. In fact, even for a particular computer, its assembly language may use a different order for different instructions. In this chapter, we will continue to give the source operands first. We have defined three- and two-address instructions. But, even two-address instructions will not normally fit into one word for usual word lengths and address sizes. Another possibility is to have machine instructions that specify only one memory operand. When a second operand is needed, as in the case of an Add instruction, it is understood implicitly to be in a unique location. A processor register, usually called the accumulator, may be used for this purpose. Thus, the one-address instruction Add\n\nA\n\nmeans the following: Add the contents of memory location A to the contents of the accumulator register and place the sum back into the accumulator. Let us also introduce the one-address instructions Load\n\nA\n\nand Store A The Load instruction copies the contents of memory location A into the accumulator, and the Store instruction copies the contents of the accumulator into memory location A. Using only one-address instructions, the operation C ← [A] + [B] can be performed by executing the sequence of instructions Load A Add B Store C Note that the operand specified in the instruction may be a source or a destination, depending on the instruction. In the Load instruction, address A specifies the source operand, and the destination location, the accumulator, is implied. On the other hand, C denotes the destination location in the Store instruction, whereas the source, the accumulator, is implied. Some early computers were designed around a single accumulator structure. Most modern computers have a number of general-purpose processor registers — typically 8 to 32, and even considerably more in some cases. Access to data in these registers is much faster than to data stored in memory locations because the registers are inside the\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.4\n\nINSTRUCTIONS AND INSTRUCTION SEQUENCING\n\nprocessor. Because the number of registers is relatively small, only a few bits are needed to specify which register takes part in an operation. For example, for 32 registers, only 5 bits are needed. This is much less than the number of bits needed to give the address of a location in the memory. Because the use of registers allows faster processing and results in shorter instructions, registers are used to store data temporarily in the processor during processing. Let Ri represent a general-purpose register. The instructions Load\n\nA,Ri\n\nStore\n\nRi,A\n\nA,Ri\n\nare generalizations of the Load, Store, and Add instructions for the single-accumulator case, in which register Ri performs the function of the accumulator. Even in these cases, when only one memory address is directly specified in an instruction, the instruction may not fit into one word. When a processor has several general-purpose registers, many instructions involve only operands that are in the registers. In fact, in many modern processors, computations can be performed directly only on data held in processor registers. Instructions such as Add\n\nRi,R j\n\nRi,R j,Rk\n\nare of this type. In both of these instructions, the source operands are the contents of registers Ri and R j. In the first instruction, R j also serves as the destination register, whereas in the second instruction, a third register, Rk, is used as the destination. Such instructions, where only register names are contained in the instruction, will normally fit into one word. It is often necessary to transfer data between different locations. This is achieved with the instruction Move\n\nSource,Destination\n\nwhich places a copy of the contents of Source into Destination. When data are moved to or from a processor register, the Move instruction can be used rather than the Load or Store instructions because the order of the source and destination operands determines which operation is intended. Thus, Move\n\nA,Ri\n\nis the same as Load A,Ri and Move Ri,A\n\n41\n\nHamacher-38086\n\n42\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nis the same as Store Ri,A In this chapter, we will use Move instead of Load or Store. In processors where arithmetic operations are allowed only on operands that are in processor registers, the C = A + B task can be performed by the instruction sequence Move Move Add Move\n\nA,Ri B,R j Ri,R j R j,C\n\nIn processors where one operand may be in the memory but the other must be in a register, an instruction sequence for the required task would be Move A,Ri Add B,Ri Move Ri,C The speed with which a given task is carried out depends on the time it takes to transfer instructions from memory into the processor and to access the operands referenced by these instructions. Transfers that involve the memory are much slower than transfers within the processor. Hence, a substantial increase in speed is achieved when several operations are performed in succession on data in processor registers without the need to copy data to or from the memory. When machine language programs are generated by compilers from high-level languages, it is important to minimize the frequency with which data is moved back and forth between the memory and processor registers. We have discussed three-, two-, and one-address instructions. It is also possible to use instructions in which the locations of all operands are defined implicitly. Such instructions are found in machines that store operands in a structure called a pushdown stack. In this case, the instructions are called zero-address instructions. The concept of a pushdown stack is introduced in Section 2.8, and a computer that uses this approach is discussed in Chapter 11.\n\n2.4.4 INSTRUCTION E XECUTION AND S TRAIGHT-L INE S EQUENCING In the preceding discussion of instruction formats, we used the task C ← [A] + [B] for illustration. Figure 2.8 shows a possible program segment for this task as it appears in the memory of a computer. We have assumed that the computer allows one memory operand per instruction and has a number of processor registers. We assume that the word length is 32 bits and the memory is byte addressable. The three instructions of the program are in successive word locations, starting at location i. Since each instruction is 4 bytes long, the second and third instructions start at addresses i + 4 and i + 8. For simplicity, we also assume that a full memory address can be directly specified in a single-word instruction, although this is not usually possible for address space sizes and word lengths of current processors.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\nINSTRUCTIONS AND INSTRUCTION SEQUENCING\n\n2.4\n\nContents\n\ni\n\nMove A,R0\n\ni+4\n\ni+8\n\nMove R0,C\n\nB,R0\n\n3-instruction program segment\n\nA\n\nB\n\nData for the program\n\nC\n\nFigure 2.8 A program for C ← [A] + [B].\n\nLet us consider how this program is executed. The processor contains a register called the program counter (PC), which holds the address of the instruction to be executed next. To begin executing a program, the address of its first instruction (i in our example) must be placed into the PC. Then, the processor control circuits use the information in the PC to fetch and execute instructions, one at a time, in the order of increasing addresses. This is called straight-line sequencing. During the execution of each instruction, the PC is incremented by 4 to point to the next instruction. Thus, after the Move instruction at location i + 8 is executed, the PC contains the value i + 12, which is the address of the first instruction of the next program segment. Executing a given instruction is a two-phase procedure. In the first phase, called instruction fetch, the instruction is fetched from the memory location whose address is in the PC. This instruction is placed in the instruction register (IR) in the processor. At the start of the second phase, called instruction execute, the instruction in IR is examined to determine which operation is to be performed. The specified operation is then performed by the processor. This often involves fetching operands from the memory or from processor registers, performing an arithmetic or logic operation, and storing the result in the destination location. At some point during this two-phase procedure, the contents of the PC are advanced to point to the next instruction. When the execute phase of an instruction is completed, the PC contains the address of the next instruction, and a new instruction fetch phase can begin. In most processors, the\n\n43\n\nHamacher-38086\n\n44\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nexecute phase itself is divided into a small number of distinct phases corresponding to fetching operands, performing the operation, and storing the result.\n\n2.4.5 B RANCHING Consider the task of adding a list of n numbers. The program outlined in Figure 2.9 is a generalization of the program in Figure 2.8. The addresses of the memory locations containing the n numbers are symbolically given as NUM1, NUM2, . . . , NUMn, and a separate Add instruction is used to add each number to the contents of register R0. After all the numbers have been added, the result is placed in memory location SUM. Instead of using a long list of Add instructions, it is possible to place a single Add instruction in a program loop, as shown in Figure 2.10. The loop is a straight-line sequence of instructions executed as many times as needed. It starts at location LOOP and ends at the instruction Branch>0. During each pass through this loop, the address of\n\ni\n\nMove\n\nNUM1,R0\n\ni+4\n\nNUM2,R0\n\ni+8\n\nNUM3,R0\n\ni + 4n – 4\n\nNUMn,R0\n\ni + 4n\n\nMove\n\nR0,SUM\n\nSUM NUM1 NUM2\n\nNUMn Figure 2.9 A straight-line program for adding n numbers.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.4\n\nINSTRUCTIONS AND INSTRUCTION SEQUENCING\n\nMove\n\nN,R1\n\nClear\n\nR0\n\nLOOP Determine address of \"Next\" number and add \"Next\" number to R0\n\nProgram loop\n\nDecrement\n\nR1\n\nBranch>0\n\nLOOP\n\nMove\n\nR0,SUM\n\nSUM N\n\nn\n\nNUM1 NUM2\n\nNUMn Figure 2.10 Using a loop to add n numbers.\n\nthe next list entry is determined, and that entry is fetched and added to R0. The address of an operand can be specified in various ways, as will be described in Section 2.5. For now, we concentrate on how to create and control a program loop. Assume that the number of entries in the list, n, is stored in memory location N, as shown. Register R1 is used as a counter to determine the number of times the loop is executed. Hence, the contents of location N are loaded into register R1 at the beginning of the program. Then, within the body of the loop, the instruction Decrement R1 reduces the contents of R1 by 1 each time through the loop. (A similar type of operation is performed by an Increment instruction, which adds 1 to its operand.) Execution of the loop is repeated as long as the result of the decrement operation is greater than zero.\n\n45\n\nHamacher-38086\n\n46\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nWe now introduce branch instructions. This type of instruction loads a new value into the program counter. As a result, the processor fetches and executes the instruction at this new address, called the branch target, instead of the instruction at the location that follows the branch instruction in sequential address order. A conditional branch instruction causes a branch only if a specified condition is satisfied. If the condition is not satisfied, the PC is incremented in the normal way, and the next instruction in sequential address order is fetched and executed. In the program in Figure 2.10, the instruction Branch>0\n\nLOOP\n\n(branch if greater than 0) is a conditional branch instruction that causes a branch to location LOOP if the result of the immediately preceding instruction, which is the decremented value in register R1, is greater than zero. This means that the loop is repeated as long as there are entries in the list that are yet to be added to R0. At the end of the nth pass through the loop, the Decrement instruction produces a value of zero, and, hence, branching does not occur. Instead, the Move instruction is fetched and executed. It moves the final result from R0 into memory location SUM. The capability to test conditions and subsequently choose one of a set of alternative ways to continue computation has many more applications than just loop control. Such a capability is found in the instruction sets of all computers and is fundamental to the programming of most nontrivial tasks.\n\n2.4.6 C ONDITION C ODES The processor keeps track of information about the results of various operations for use by subsequent conditional branch instructions. This is accomplished by recording the required information in individual bits, often called condition code flags. These flags are usually grouped together in a special processor register called the condition code register or status register. Individual condition code flags are set to 1 or cleared to 0, depending on the outcome of the operation performed. Four commonly used flags are N (negative) Z (zero) V (overflow) C (carry)\n\nSet to 1 if the result is negative; otherwise, cleared to 0 Set to 1 if the result is 0; otherwise, cleared to 0 Set to 1 if arithmetic overflow occurs; otherwise, cleared to 0 Set to 1 if a carry-out results from the operation; otherwise, cleared to 0\n\nThe N and Z flags indicate whether the result of an arithmetic or logic operation is negative or zero. The N and Z flags may also be affected by instructions that transfer data, such as Move, Load, or Store. This makes it possible for a later conditional branch instruction to cause a branch based on the sign and value of the operand that was moved. Some computers also provide a special Test instruction that examines\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.4\n\nINSTRUCTIONS AND INSTRUCTION SEQUENCING\n\na value in a register or in the memory and sets or clears the N and Z flags accordingly. The V flag indicates whether overflow has taken place. As explained in Section 2.1.4, overflow occurs when the result of an arithmetic operation is outside the range of values that can be represented by the number of bits available for the operands. The processor sets the V flag to allow the programmer to test whether overflow has occurred and branch to an appropriate routine that corrects the problem. Instructions such as BranchIfOverflow are provided for this purpose. Also, as we will see in Chapter 4, a program interrupt may occur automatically as a result of the V bit being set, and the operating system will resolve what to do. The C flag is set to 1 if a carry occurs from the most significant bit position during an arithmetic operation. This flag makes it possible to perform arithmetic operations on operands that are longer than the word length of the processor. Such operations are used in multiple-precision arithmetic, which is discussed in Chapter 6. The instruction Branch>0, discussed in Section 2.4.5, is an example of a branch instruction that tests one or more of the condition flags. It causes a branch if the value tested is neither negative nor equal to zero. That is, the branch is taken if neither N nor Z is 1. Many other conditional branch instructions are provided to enable a variety of conditions to be tested. The conditions are given as logic expressions involving the condition code flags. In some computers, the condition code flags are affected automatically by instructions that perform arithmetic or logic operations. However, this is not always the case. A number of computers have two versions of an Add instruction, for example. One version, Add, does not affect the flags, but a second version, AddSetCC, does. This provides the programmer — and the compiler — with more flexibility when preparing programs for pipelined execution, as we will discuss in Chapter 8.\n\n47\n\nHamacher-38086\n\n48\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\n2.5\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nWe have now seen some simple examples of assembly language programs. In general, a program operates on data that reside in the computer’s memory. These data can be organized in a variety of ways. If we want to keep track of students’ names, we can write them in a list. If we want to associate information with each name, for example to record telephone numbers or marks in various courses, we may organize this information in the form of a table. Programmers use organizations called data structures to represent the data used in computations. These include lists, linked lists, arrays, queues, and so on. Programs are normally written in a high-level language, which enables the programmer to use constants, local and global variables, pointers, and arrays. When translating a high-level language program into assembly language, the compiler must be able to implement these constructs using the facilities provided in the instruction set of the computer in which the program will be run. The different ways in which the location of an operand is specified in an instruction are referred to as addressing modes. In this section we present the most important addressing modes found in modern processors. A summary is provided in Table 2.1.\n\nTable 2.1\n\nName\n\nAssembler syntax\n\nImmediate\n\n#Value\n\nOperand = Value\n\nRegister\n\nRi\n\nEA = Ri\n\nAbsolute (Direct)\n\nLOC\n\nEA = LOC\n\nIndirect\n\n(Ri) (LOC)\n\nEA = [Ri] EA = [LOC]\n\nIndex\n\nX(Ri)\n\nEA = [Ri] + X\n\nBase with index\n\n(Ri,R j)\n\nEA = [Ri] + [R j]\n\nBase with index and offset\n\nX(Ri,R j)\n\nEA = [Ri] + [R j] + X\n\nRelative\n\nX(PC)\n\nEA = [PC] + X\n\nAutoincrement\n\n(Ri)+\n\nEA = [Ri]; Increment Ri\n\nAutodecrement\n\n−(Ri)\n\nDecrement Ri; EA = [Ri]\n\nEA = effective address Value = a signed number\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.5\n\n2.5.1 IMPLEMENTATION OF VARIABLES AND C ONSTANTS Variables and constants are the simplest data types and are found in almost every computer program. In assembly language, a variable is represented by allocating a register or a memory location to hold its value. Thus, the value can be changed as needed using appropriate instructions. The programs in Section 2.4 used only two addressing modes to access variables. We accessed an operand by specifying the name of the register or the address of the memory location where the operand is located. The precise definitions of these two modes are: Register mode — The operand is the contents of a processor register; the name (address) of the register is given in the instruction. Absolute mode — The operand is in a memory location; the address of this location is given explicitly in the instruction. (In some assembly languages, this mode is called Direct.) The instruction Move\n\nLOC,R2\n\nuses these two modes. Processor registers are used as temporary storage locations where the data in a register are accessed using the Register mode. The Absolute mode can represent global variables in a program. A declaration such as Integer A, B; in a high-level language program will cause the compiler to allocate a memory location to each of the variables A and B. Whenever they are referenced later in the program, the compiler can generate assembly language instructions that use the Absolute mode to access these variables. Next, let us consider the representation of constants. Address and data constants can be represented in assembly language using the Immediate mode. Immediate mode — The operand is given explicitly in the instruction. For example, the instruction Move\n\n200immediate , R0\n\nplaces the value 200 in register R0. Clearly, the Immediate mode is only used to specify the value of a source operand. Using a subscript to denote the Immediate mode is not appropriate in assembly languages. A common convention is to use the sharp sign (#) in front of the value to indicate that this value is to be used as an immediate operand. Hence, we write the instruction above in the form Move\n\n#200,R0\n\nConstant values are used frequently in high-level language programs. For example, the statement A=B+6\n\n49\n\nHamacher-38086\n\n50\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\ncontains the constant 6. Assuming that A and B have been declared earlier as variables and may be accessed using the Absolute mode, this statement may be compiled as follows: Move B,R1 Add #6,R1 Move R1,A Constants are also used in assembly language to increment a counter, test for some bit pattern, and so on.\n\n(R1),R0\n\n(A),R0\n\nMain memory B\n\nOperand\n\nR1\n\nB\n\nRegister\n\n(a) Through a general-purpose register Figure 2.11 Indirect addressing.\n\nA\n\nB\n\nB\n\nOperand\n\n(b) Through a memory location\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.5\n\nLOOP\n\nN,R1 #NUM1,R2 R0 (R2),R0 #4,R2 R1 LOOP R0,SUM\n\nInitialization\n\nFigure 2.12 Use of indirect addressing in the program of Figure 2.10.\n\n(R2),R0\n\nfetches the operand at location NUM1 and adds it to R0. The second Add instruction adds 4 to the contents of the pointer R2, so that it will contain the address value NUM2 when the above instruction is executed in the second pass through the loop. Consider the C-language statement A = ∗ B; where B is a pointer variable. This statement may be compiled into Move Move\n\nB,R1 (R1),A\n\n51\n\nHamacher-38086\n\n52\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nUsing indirect addressing through memory, the same action can be achieved with Move\n\n(B),A\n\nDespite its apparent simplicity, indirect addressing through memory has proven to be of limited usefulness as an addressing mode, and it is seldom found in modern computers. We will see in Chapter 8 that an instruction that involves accessing the memory twice to get an operand is not well suited to pipelined execution. Indirect addressing through registers is used extensively. The program in Figure 2.12 shows the flexibility it provides. Also, when absolute addressing is not available, indirect addressing through registers makes it possible to access global variables by first loading the operand’s address in a register.\n\n2.5.3 INDEXING AND A RRAYS The next addressing mode we discuss provides a different kind of flexibility for accessing operands. It is useful in dealing with lists and arrays. Index mode — The effective address of the operand is generated by adding a constant value to the contents of a register. The register used may be either a special register provided for this purpose, or, more commonly, it may be any one of a set of general-purpose registers in the processor. In either case, it is referred to as an index register. We indicate the Index mode symbolically as X(Ri) where X denotes the constant value contained in the instruction and Ri is the name of the register involved. The effective address of the operand is given by EA = X + [Ri] The contents of the index register are not changed in the process of generating the effective address. In an assembly language program, the constant X may be given either as an explicit number or as a symbolic name representing a numerical value. The way in which a symbolic name is associated with a specific numerical value will be discussed in Section 2.6. When the instruction is translated into machine code, the constant X is given as a part of the instruction and is usually represented by fewer bits than the word length of the computer. Since X is a signed integer, it must be sign-extended (see Section 2.1.3) to the register length before being added to the contents of the register. Figure 2.13 illustrates two ways of using the Index mode. In Figure 2.13a, the index register, R1, contains the address of a memory location, and the value X defines an offset (also called a displacement) from this address to the location where the operand is found. An alternative use is illustrated in Figure 2.13b. Here, the constant X corresponds to a memory address, and the contents of the index register define the offset to the operand. In either case, the effective address is the sum of two values; one is given explicitly in the instruction, and the other is stored in a register.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.5\n\n20(R1),R2\n\n1000\n\n1000\n\nR1\n\n20\n\nR1\n\n20 = offset 1020\n\nOperand (a) Offset is given as a constant\n\n1000(R1),R2\n\n1000\n\n20 = offset 1020\n\nOperand (b) Offset is in the index register\n\nTo see the usefulness of indexed addressing, consider a simple example involving a list of test scores for students taking a given course. Assume that the list of scores, beginning at location LIST, is structured as shown in Figure 2.14. A four-word memory block comprises a record that stores the relevant information for each student. Each record consists of the student’s identification number (ID), followed by the scores the student earned on three tests. There are n students in the class, and the value n is stored in location N immediately in front of the list. The addresses given in the figure for the student IDs and test scores assume that the memory is byte addressable and that the word length is 32 bits. We should note that the list in Figure 2.14 represents a two-dimensional array having n rows and four columns. Each row contains the entries for one student, and the columns give the IDs and test scores.\n\n53\n\nHamacher-38086\n\n54\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nN LIST\n\nn Student ID\n\nLIST + 4\n\nTest 1\n\nLIST + 8\n\nTest 2\n\nLIST + 12\n\nTest 3\n\nLIST + 16\n\nStudent ID\n\nStudent 1\n\nTest 1 Test 2\n\nStudent 2\n\nTest 3\n\nFigure 2.14 A list of students’ marks.\n\nSuppose that we wish to compute the sum of all scores obtained on each of the tests and store these three sums in memory locations SUM1, SUM2, and SUM3. A possible program for this task is given in Figure 2.15. In the body of the loop, the program uses the Index addressing mode in the manner depicted in Figure 2.13a to access each of the three scores in a student’s record. Register R0 is used as the index register. Before the loop is entered, R0 is set to point to the ID location of the first student record; thus, it contains the address LIST. On the first pass through the loop, test scores of the first student are added to the running sums held in registers R1, R2, and R3, which are initially cleared to 0. These scores are accessed using the Index addressing modes 4(R0), 8(R0), and 12(R0). The index register R0 is then incremented by 16 to point to the ID location of the second student. Register R4, initialized to contain the value n, is decremented by 1 at the end of each pass through the loop. When the contents of R4 reach 0, all student records have been accessed, and the loop terminates. Until then, the conditional branch instruction transfers control back to the start of the loop to process the next record. The last three instructions transfer the accumulated sums from registers R1, R2, and R3, into memory locations SUM1, SUM2, and SUM3, respectively. It should be emphasized that the contents of the index register, R0, are not changed when it is used in the Index addressing mode to access the scores. The contents of R0 are changed only by the last Add instruction in the loop, to move from one student record to the next. In general, the Index mode facilitates access to an operand whose location is defined relative to a reference point within the data structure in which the operand appears. In the example just given, the ID locations of successive student records are the reference points, and the test scores are the operands accessed by the Index addressing mode.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.5\n\nLOOP\n\nMove\n\n#LIST,R0\n\nClear\n\nR1\n\nClear\n\nR2\n\nClear Move\n\nR3 N,R4\n\n4(R0),R1\n\n8(R0),R2\n\n12(R0),R3\n\n#16,R0\n\nDecrement\n\nR4\n\nBranch>0\n\nLOOP\n\nMove\n\nR1,SUM1\n\nMove Move\n\nR2,SUM2\n\nR3,SUM3\n\nFigure 2.15 Indexed addressing used in accessing test scores in the list in Figure 2.14.\n\nWe have introduced the most basic form of indexed addressing. Several variations of this basic form provide for very efficient access to memory operands in practical programming situations. For example, a second register may be used to contain the offset X, in which case we can write the Index mode as (Ri,R j) The effective address is the sum of the contents of registers Ri and R j. The second register is usually called the base register. This form of indexed addressing provides more flexibility in accessing operands, because both components of the effective address can be changed. As an example of where this flexibility may be useful, consider again the student record data structure shown in Figure 2.14. In the program in Figure 2.15, we used different index values in the three Add instructions at the beginning of the loop to access different test scores. Suppose each record contains a large number of items, many more than the three test scores of that example. In this case, we would need the ability to replace the three Add instructions with one instruction inside a second (nested) loop. Just as the successive starting locations of the records (the reference points) are maintained in the pointer register R0, offsets to the individual items relative to the contents of R0 could be maintained in another register. The contents of that register would be incremented in successive passes through the inner loop. (See Problem 2.9.) Yet another version of the Index mode uses two registers plus a constant, which can be denoted as X(Ri,R j)\n\n55\n\nHamacher-38086\n\n56\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nIn this case, the effective address is the sum of the constant X and the contents of registers Ri and R j. This added flexibility is useful in accessing multiple components inside each item in a record, where the beginning of an item is specified by the (Ri,R j) part of the addressing mode. In other words, this mode implements a three-dimensional array.\n\n2.5.4 R ELATIVE A DDRESSING We have defined the Index mode using general-purpose processor registers. A useful version of this mode is obtained if the program counter, PC, is used instead of a generalpurpose register. Then, X(PC) can be used to address a memory location that is X bytes away from the location presently pointed to by the program counter. Since the addressed location is identified “relative” to the program counter, which always identifies the current execution point in a program, the name Relative mode is associated with this type of addressing. Relative mode — The effective address is determined by the Index mode using the program counter in place of the general-purpose register Ri. This mode can be used to access data operands. But, its most common use is to specify the target address in branch instructions. An instruction such as Branch>0\n\nLOOP\n\ncauses program execution to go to the branch target location identified by the name LOOP if the branch condition is satisfied. This location can be computed by specifying it as an offset from the current value of the program counter. Since the branch target may be either before or after the branch instruction, the offset is given as a signed number. Recall that during the execution of an instruction, the processor increments the PC to point to the next instruction. Most computers use this updated value in computing the effective address in the Relative mode. For example, suppose that the Relative mode is used to generate the branch target address LOOP in the Branch instruction of the program in Figure 2.12. Assume that the four instructions of the loop body, starting at LOOP, are located at memory locations 1000, 1004, 1008, and 1012. Hence, the updated contents of the PC at the time the branch target address is generated will be 1016. To branch to location LOOP (1000), the offset value needed is X = −16. Assembly languages allow branch instructions to be written using labels to denote the branch target as shown in Figure 2.12. When the assembler program processes such an instruction, it computes the required offset value, −16 in this case, and generates the corresponding machine instruction using the addressing mode −16(PC).\n\n2.5.5 A DDITIONAL M ODES So far we have discussed the five basic addressing modes — Immediate, Register, Absolute (Direct), Indirect, and Index — found in most computers. We have given a number of common versions of the Index mode, not all of which may be found in any one computer. Although these modes suffice for general computation, many computers\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.5\n\nprovide additional modes intended to aid certain programming tasks. The two modes described next are useful for accessing data items in successive locations in the memory. Autoincrement mode — The effective address of the operand is the contents of a register specified in the instruction. After accessing the operand, the contents of this register are automatically incremented to point to the next item in a list. We denote the Autoincrement mode by putting the specified register in parentheses, to show that the contents of the register are used as the effective address, followed by a plus sign to indicate that these contents are to be incremented after the operand is accessed. Thus, the Autoincrement mode is written as (Ri)+ Implicitly, the increment amount is 1 when the mode is given in this form. But in a byte addressable memory, this mode would only be useful in accessing successive bytes of some list. To access successive words in a byte-addressable memory with a 32-bit word length, the increment must be 4. Computers that have the Autoincrement mode automatically increment the contents of the register by a value that corresponds to the size of the accessed operand. Thus, the increment is 1 for byte-sized operands, 2 for 16-bit operands, and 4 for 32-bit operands. Since the size of the operand is usually specified as part of the operation code of an instruction, it is sufficient to indicate the Autoincrement mode as (Ri)+. If the Autoincrement mode is available, it can be used in the first Add instruction in Figure 2.12 and the second Add instruction can be eliminated. The modified program is shown in Figure 2.16. As a companion for the Autoincrement mode, another useful mode accesses the items of a list in the reverse order: Autodecrement mode — The contents of a register specified in the instruction are first automatically decremented and are then used as the effective address of the operand. We denote the Autodecrement mode by putting the specified register in parentheses, preceded by a minus sign to indicate that the contents of the register are to be decremented before being used as the effective address. Thus, we write −(Ri)\n\nLOOP\n\nMove Move Clear Add Decrement Branch>0 Move\n\nN,R1 #NUM1,R2 R0 (R2)+,R0 R1 LOOP R0,SUM\n\nInitialization\n\nFigure 2.16 The Autoincrement addressing mode used in the program of Figure 2.12.\n\n57\n\nHamacher-38086\n\n58\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nIn this mode, operands are accessed in descending address order. The reader may wonder why the address is decremented before it is used in the Autodecrement mode and incremented after it is used in the Autoincrement mode. The main reason for this is given in Section 2.8, where we show how these two modes can be used together to implement an important data structure called a stack. The actions performed by the Autoincrement and Autodecrement addressing modes can obviously be achieved by using two instructions, one to access the operand and the other to increment or decrement the register that contains the operand address. Combining the two operations in one instruction reduces the number of instructions needed to perform the desired task. However, we will show in Chapter 8 that it is not always advantageous to combine two operations in a single instruction.\n\n2.6\n\nASSEMBLY LANGUAGE\n\nMachine instructions are represented by patterns of 0s and 1s. Such patterns are awkward to deal with when discussing or preparing programs. Therefore, we use symbolic names to represent the patterns. So far, we have used normal words, such as Move, Add, Increment, and Branch, for the instruction operations to represent the corresponding binary code patterns. When writing programs for a specific computer, such words are normally replaced by acronyms called mnemonics, such as MOV, ADD, INC, and BR. Similarly, we use the notation R3 to refer to register 3, and LOC to refer to a memory location. A complete set of such symbolic names and rules for their use constitute a programming language, generally referred to as an assembly language. The set of rules for using the mnemonics in the specification of complete instructions and programs is called the syntax of the language. Programs written in an assembly language can be automatically translated into a sequence of machine instructions by a program called an assembler. The assembler program is one of a collection of utility programs that are a part of the system software. The assembler, like any other program, is stored as a sequence of machine instructions in the memory of the computer. A user program is usually entered into the computer through a keyboard and stored either in the memory or on a magnetic disk. At this point, the user program is simply a set of lines of alphanumeric characters. When the assembler program is executed, it reads the user program, analyzes it, and then generates the desired machine language program. The latter contains patterns of 0s and 1s specifying instructions that will be executed by the computer. The user program in its original alphanumeric text format is called a source program, and the assembled machine language program is called an object program. We will discuss how the assembler program works in Section 2.6.2. First, we present a few aspects of the assembly language itself. The assembly language for a given computer may or may not be case sensitive, that is, it may or may not distinguish between capital and lower case letters. We will use capital letters to denote all names and labels in our examples in order to improve the readability of the text. For example, we will write a Move instruction as MOVE\n\nR0,SUM\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.6\n\nASSEMBLY LANGUAGE\n\nThe mnemonic MOVE represents the binary pattern, or OP code, for the operation performed by the instruction. The assembler translates this mnemonic into the binary OP code that the computer understands. The OP-code mnemonic is followed by at least one blank space character. Then the information that specifies the operands is given. In our example, the source operand is in register R0. This information is followed by the specification of the destination operand, separated from the source operand by a comma, with no intervening blanks. The destination operand is in the memory location that has its binary address represented by the name SUM. Since there are several possible addressing modes for specifying operand locations, the assembly language must indicate which mode is being used. For example, a numerical value or a name used by itself, such as SUM in the preceding instruction, may be used to denote the Absolute mode. The sharp sign usually denotes an immediate operand. Thus, the instruction ADD\n\n#5,R3\n\nadds the number 5 to the contents of register R3 and puts the result back into register R3. The sharp sign is not the only way to denote the Immediate addressing mode. In some assembly languages, the intended addressing mode is indicated in the OPcode mnemonic. In this case, a given instruction has different OP-code mnemonics for different addressing modes. For example, the previous Add instruction may be written as ADDI 5,R3 The suffix I in the mnemonic ADDI states that the source operand is given in the Immediate addressing mode. Indirect addressing is usually specified by putting parentheses around the name or symbol denoting the pointer to the operand. For example, if the number 5 is to be placed in a memory location whose address is held in register R2, the desired action can be specified as MOVE\n\n#5,(R2)\n\nMOVEI\n\n5,(R2)\n\nor perhaps\n\n2.6.1 A SSEMBLER D IRECTIVES In addition to providing a mechanism for representing instructions in a program, the assembly language allows the programmer to specify other information needed to translate the source program into the object program. We have already mentioned that we need to assign numerical values to any names used in a program. Suppose that the name SUM is used to represent the value 200. This fact may be conveyed to the assembler program through a statement such as SUM\n\nEQU\n\n200\n\n59\n\nHamacher-38086\n\n60\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nThis statement does not denote an instruction that will be executed when the object program is run; in fact, it will not even appear in the object program. It simply informs the assembler that the name SUM should be replaced by the value 200 wherever it appears in the program. Such statements, called assembler directives (or commands), are used by the assembler while it translates a source program into an object program. To illustrate the use of assembly language further, let us reconsider the program in Figure 2.12. In order to run this program on a computer, it is necessary to write its source code in the required assembly language, specifying all the information needed to generate the corresponding object program. Suppose that each instruction and each data item occupies one word of memory. This is an oversimplification, but it helps keep the example straightforward. Also assume that the memory is byte addressable and that the word length is 32 bits. Suppose also that the object program is to be loaded in the main memory as shown in Figure 2.17. The figure shows the memory addresses where\n\nLOOP\n\n100\n\nMove\n\nN,R1\n\n104\n\nMove\n\n#NUM1,R2\n\n108\n\nClear\n\nR0\n\n112\n\n(R2),R0\n\n116\n\n#4,R2\n\n120\n\nDecrement\n\nR1\n\n124\n\nBranch>0\n\nLOOP\n\n128\n\nMove\n\nR0,SUM\n\n132\n\nSUM\n\n200\n\nN\n\n204\n\nNUM1\n\n208\n\nNUM2\n\n212\n\nNUMn\n\n604\n\n100\n\nFigure 2.17 Memory arrangement for the program in Figure 2.12.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.6\n\nASSEMBLY LANGUAGE\n\nthe machine instructions and the required data items are to be found after the program is loaded for execution. If the assembler is to produce an object program according to this arrangement, it has to know • • •\n\nHow to interpret the names Where to place the instructions in the memory Where to place the data operands in the memory\n\nTo provide this information, the source program may be written as shown in Figure 2.18. The program begins with assembler directives. We have already discussed the Equate directive, EQU, which informs the assembler about the value of SUM. The second assembler directive, ORIGIN, tells the assembler program where in the memory to place the data block that follows. In this case, the location specified has the address 204. Since this location is to be loaded with the value 100 (which is the number of entries in the list), a DATAWORD directive is used to inform the assembler of this requirement. It states that the data value 100 is to be placed in the memory word at address 204. Any statement that results in instructions or data being placed in a memory location may be given a memory address label. The label is assigned a value equal to the address\n\nAssembler directives\n\nSUM N NUM1\n\nStatements that generate machine instructions\n\nAssembler directives\n\nSTART\n\nLOOP\n\nOperation\n\nEQU ORIGIN DATAWORD RESERVE ORIGIN MOVE MOVE CLR ADD ADD DEC BGTZ MOVE RETURN END\n\n200 204 100 400 100 N,R1 #NUM1,R2 R0 (R2),R0 #4,R2 R1 LOOP R0,SUM START\n\nFigure 2.18 Assembly language representation for the program in Figure 2.17.\n\n61\n\nHamacher-38086\n\n62\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nof that location. Because the DATAWORD statement is given the label N, the name N is assigned the value 204. Whenever N is encountered in the rest of the program, it will be replaced with this value. Using N as a label in this manner is equivalent to using the assembler directive N\n\nEQU\n\n204\n\nThe RESERVE directive declares that a memory block of 400 bytes is to be reserved for data, and that the name NUM1 is to be associated with address 208. This directive does not cause any data to be loaded in these locations. Data may be loaded in the memory using an input procedure, as we will explain later in this chapter. The second ORIGIN directive specifies that the instructions of the object program are to be loaded in the memory starting at address 100. It is followed by the source program instructions written with the appropriate mnemonics and syntax. The last statement in the source program is the assembler directive END, which tells the assembler that this is the end of the source program text. The END directive includes the label START, which is the address of the location at which execution of the program is to begin. We have explained all statements in Figure 2.18 except RETURN. This is an assembler directive that identifies the point at which execution of the program should be terminated. It causes the assembler to insert an appropriate machine instruction that returns control to the operating system of the computer. Most assembly languages require statements in a source program to be written in the form Label Operation\n\nOperand(s) Comment\n\nThese four fields are separated by an appropriate delimiter, typically one or more blank characters. The Label is an optional name associated with the memory address where the machine language instruction produced from the statement will be loaded. Labels may also be associated with addresses of data items. In Figure 2.18 there are five labels: SUM, N, NUM1, START, and LOOP. The Operation field contains the OP-code mnemonic of the desired instruction or assembler directive. The Operand field contains addressing information for accessing one or more operands, depending on the type of instruction. The Comment field is ignored by the assembler program. It is used for documentation purposes to make the program easier to understand. We have introduced only the very basic characteristics of assembly languages. These languages differ in detail and complexity from one computer to another.\n\n2.6.2 A SSEMBLY AND E XECUTION OF P ROGRAMS A source program written in an assembly language must be assembled into a machine language object program before it can be executed. This is done by the assembler program, which replaces all symbols denoting operations and addressing modes with the binary codes used in machine instructions, and replaces all names and labels with their actual values.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.6\n\nASSEMBLY LANGUAGE\n\n63\n\nHamacher-38086\n\n64\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nthe contents of various processor registers and memory locations. We consider program debugging in more detail in Chapter 4.\n\n2.6.3 N UMBER N OTATION When dealing with numerical values, it is often convenient to use the familiar decimal notation. Of course, these values are stored in the computer as binary numbers. In some situations, it is more convenient to specify the binary patterns directly. Most assemblers allow numerical values to be specified in different ways, using conventions that are defined by the assembly language syntax. Consider, for example, the number 93, which is represented by the 8-bit binary number 01011101. If this value is to be used as an immediate operand, it can be given as a decimal number, as in the instruction ADD #93,R1 or as a binary number identified by a prefix symbol such as a percent sign, as in ADD\n\n#%01011101,R1\n\nBinary numbers can be written more compactly as hexadecimal, or hex, numbers, in which four bits are represented by a single hex digit. The hex notation is a direct extension of the BCD code given in Appendix E. The first ten patterns 0000, 0001, . . . , 1001, are represented by the digits 0, 1, . . . , 9, as in BCD. The remaining six 4-bit patterns, 1010, 1011, . . . , 1111, are represented by the letters A, B, . . . , F. In hexadecimal representation, the decimal value 93 becomes 5D. In assembly language, a hex representation is often identified by a dollar sign prefix. Thus, we would write ADD\n\n2.7\n\n#\\$5D,R1\n\nBASIC INPUT/OUTPUT OPERATIONS\n\nPrevious sections in this chapter described machine instructions and addressing modes. We have assumed that the data on which these instructions operate are already stored in the memory. We now examine the means by which data are transferred between the memory of a computer and the outside world. Input/Output (I/O) operations are essential, and the way they are performed can have a significant effect on the performance of the computer. This subject is discussed in detail in Chapter 4. Here, we introduce a few basic ideas. Consider a task that reads in character input from a keyboard and produces character output on a display screen. A simple way of performing such I/O tasks is to use a method known as program-controlled I/O. The rate of data transfer from the keyboard to a computer is limited by the typing speed of the user, which is unlikely to exceed a few characters per second. The rate of output transfers from the computer to the display is much higher. It is determined by the rate at which characters can be transmitted over the link between the computer and the display device, typically several thousand characters per second. However, this is still much slower than the speed of a processor that can\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.7\n\nBASIC INPUT/OUTPUT OPERATIONS\n\nBus\n\nProcessor\n\nDATAIN\n\nSIN Keyboard\n\nDATAOUT\n\nSOUT Display\n\nFigure 2.19 Bus connection for processor, keyboard, and display.\n\nexecute many millions of instructions per second. The difference in speed between the processor and I/O devices creates the need for mechanisms to synchronize the transfer of data between them. A solution to this problem is as follows: On output, the processor sends the first character and then waits for a signal from the display that the character has been received. It then sends the second character, and so on. Input is sent from the keyboard in a similar way; the processor waits for a signal indicating that a character key has been struck and that its code is available in some buffer register associated with the keyboard. Then the processor proceeds to read that code. The keyboard and the display are separate devices as shown in Figure 2.19. The action of striking a key on the keyboard does not automatically cause the corresponding character to be displayed on the screen. One block of instructions in the I/O program transfers the character into the processor, and another associated block of instructions causes the character to be displayed. Consider the problem of moving a character code from the keyboard to the processor. Striking a key stores the corresponding character code in an 8-bit buffer register associated with the keyboard. Let us call this register DATAIN, as shown in Figure 2.19. To inform the processor that a valid character is in DATAIN, a status control flag, SIN, is set to 1. A program monitors SIN, and when SIN is set to 1, the processor reads the contents of DATAIN. When the character is transferred to the processor, SIN is automatically cleared to 0. If a second character is entered at the keyboard, SIN is again set to 1 and the process repeats. An analogous process takes place when characters are transferred from the processor to the display. A buffer register, DATAOUT, and a status control flag, SOUT, are used for this transfer. When SOUT equals 1, the display is ready to receive a character. Under program control, the processor monitors SOUT, and when SOUT is set to 1, the processor transfers a character code to DATAOUT. The transfer of a character to DATAOUT clears SOUT to 0; when the display device is ready to receive a second character, SOUT is again set to 1. The buffer registers DATAIN and DATAOUT and the status flags SIN\n\n65\n\nHamacher-38086\n\n66\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nand SOUT are part of circuitry commonly known as a device interface. The circuitry for each device is connected to the processor via a bus, as indicated in Figure 2.19. In order to perform I/O transfers, we need machine instructions that can check the state of the status flags and transfer data between the processor and the I/O device. These instructions are similar in format to those used for moving data between the processor and the memory. For example, the processor can monitor the keyboard status flag SIN and transfer a character from DATAIN to register R1 by the following sequence of operations: READWAIT\n\nBranch to READWAIT if SIN = 0 Input from DATAIN to R1\n\nThe Branch operation is usually implemented by two machine instructions. The first instruction tests the status flag and the second performs the branch. Although the details vary from computer to computer, the main idea is that the processor monitors the status flag by executing a short wait loop and proceeds to transfer the input data when SIN is set to 1 as a result of a key being struck. The Input operation resets SIN to 0. An analogous sequence of operations is used for transferring output to the display. An example is WRITEWAIT\n\nBranch to WRITEWAIT if SOUT = 0 Output from R1 to DATAOUT\n\nAgain, the Branch operation is normally implemented by two machine instructions. The wait loop is executed repeatedly until the status flag SOUT is set to 1 by the display when it is free to receive a character. The Output operation transfers a character from R1 to DATAOUT to be displayed, and it clears SOUT to 0. We assume that the initial state of SIN is 0 and the initial state of SOUT is 1. This initialization is normally performed by the device control circuits when the devices are placed under computer control before program execution begins. Until now, we have assumed that the addresses issued by the processor to access instructions and operands always refer to memory locations. Many computers use an arrangement called memory-mapped I /O in which some memory address values are used to refer to peripheral device buffer registers, such as DATAIN and DATAOUT. Thus, no special instructions are needed to access the contents of these registers; data can be transferred between these registers and the processor using instructions that we have already discussed, such as Move, Load, or Store. For example, the contents of the keyboard character buffer DATAIN can be transferred to register R1 in the processor by the instruction MoveByte DATAIN,R1 Similarly, the contents of register R1 can be transferred to DATAOUT by the instruction MoveByte\n\nR1,DATAOUT\n\nThe status flags SIN and SOUT are automatically cleared when the buffer registers DATAIN and DATAOUT are referenced, respectively. The MoveByte operation code signifies that the operand size is a byte, to distinguish it from the operation code\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.7\n\nBASIC INPUT/OUTPUT OPERATIONS\n\nMove that has been used for word operands. We have established that the two data buffers in Figure 2.19 may be addressed as if they were two memory locations. It is possible to deal with the status flags SIN and SOUT in the same way, by assigning them distinct addresses. However, it is more common to include SIN and SOUT in device status registers, one for each of the two devices. Let us assume that bit b3 in registers INSTATUS and OUTSTATUS corresponds to SIN and SOUT, respectively. The read operation just described may now be implemented by the machine instruction sequence READWAIT\n\nTestbit #3,INSTATUS Branch=0 READWAIT MoveByte DATAIN,R1\n\nThe write operation may be implemented as WRITEWAIT\n\nTestbit #3,OUTSTATUS Branch=0 WRITEWAIT MoveByte R1,DATAOUT\n\nThe Testbit instruction tests the state of one bit in the destination location, where the bit position to be tested is indicated by the first operand. If the bit tested is equal to 0, then the condition of the branch instruction is true, and a branch is made to the beginning of the wait loop. When the device is ready, that is, when the bit tested becomes equal to 1, the data are read from the input buffer or written into the output buffer. The program shown in Figure 2.20 uses these two operations to read a line of characters typed at a keyboard and send them out to a display device. As the characters are read in, one by one, they are stored in a data area in the memory and then echoed\n\nMove\n\n#LOC,R0\n\nTestBit Branch=0 MoveByte\n\nECHO\n\nTestBit Branch=0 MoveByte\n\n#3,OUTSTATUS ECHO (R0),DATAOUT\n\nCompare\n\n#CR,(R0)+\n\nBranch\u0001=0\n\nInitialize pointer register R0 to point to the address of the first location in memory where the characters are to be stored. Wait for a character to be entered in the keyboard buffer DATAIN. Transfer the character from DATAIN into the memory (this clears SIN to 0). Wait for the display to become ready. Move the character just read to the display buffer register (this clears SOUT to 0). Check if the character just read is CR (carriage return). If it is not CR, then branch back and read another character. Also, increment the pointer to store the next character.\n\nFigure 2.20 A program that reads a line of characters and displays it.\n\n67\n\nHamacher-38086\n\n68\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nback out to the display. The program finishes when the carriage return character, CR, is read, stored, and sent to the display. The address of the first byte location of the memory data area where the line is to be stored is LOC. Register R0 is used to point to this area, and it is initially loaded with the address LOC by the first instruction in the program. R0 is incremented for each character read and displayed by the Autoincrement addressing mode used in the Compare instruction. Program-controlled I/O requires continuous involvement of the processor in the I/O activities. Almost all of the execution time for the program in Figure 2.20 is accounted for in the two wait loops, while the processor waits for a character to be struck or for the display to become available. It is desirable to avoid wasting processor execution time in this situation. Other I/O techniques, based on the use of interrupts, may be used to improve the utilization of the processor. Such techniques will be discussed in Chapter 4.\n\n2.8\n\nSTACKS AND QUEUES\n\nA computer program often needs to perform a particular subtask using the familiar subroutine structure. In order to organize the control and information linkage between the main program and the subroutine, a data structure called a stack is used. This section will describe stacks, as well as a closely related data structure called a queue. Data operated on by a program can be organized in a variety of ways. We have already encountered data structured as lists. Now, we consider an important data structure known as a stack. A stack is a list of data elements, usually words or bytes, with the accessing restriction that elements can be added or removed at one end of the list only. This end is called the top of the stack, and the other end is called the bottom. The structure is sometimes referred to as a pushdown stack. Imagine a pile of trays in a cafeteria; customers pick up new trays from the top of the pile, and clean trays are added to the pile by placing them onto the top of the pile. Another descriptive phrase, last-in–first-out (LIFO) stack, is also used to describe this type of storage mechanism; the last data item placed on the stack is the first one removed when retrieval begins. The terms push and pop are used to describe placing a new item on the stack and removing the top item from the stack, respectively. Data stored in the memory of a computer can be organized as a stack, with successive elements occupying successive memory locations. Assume that the first element is placed in location BOTTOM, and when new elements are pushed onto the stack, they are placed in successively lower address locations. We use a stack that grows in the direction of decreasing memory addresses in our discussion, because this is a common practice. Figure 2.21 shows a stack of word data items in the memory of a computer. It contains numerical values, with 43 at the bottom and −28 at the top. A processor register is used to keep track of the address of the element of the stack that is at the top at any given time. This register is called the stack pointer (SP). It could be one of the general-purpose registers or a register dedicated to this function. If we assume a\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.8\n\nSTACKS AND QUEUES\n\n0 Stack pointer register SP\n\n– 28\n\nCurrent top element\n\n17 739 Stack\n\nBOTTOM\n\n43\n\nBottom element\n\nk\n\n2 –1 Figure 2.21 A stack of words in the memory.\n\nbyte-addressable memory with a 32-bit word length, the push operation can be implemented as Subtract #4,SP Move NEWITEM,(SP) where the Subtract instruction subtracts the source operand 4 from the destination operand contained in SP and places the result in SP. These two instructions move the word from location NEWITEM onto the top of the stack, decrementing the stack pointer by 4 before the move. The pop operation can be implemented as Move Add\n\n(SP),ITEM #4,SP\n\nThese two instructions move the top value from the stack into location ITEM and then increment the stack pointer by 4 so that it points to the new top element. Figure 2.22 shows the effect of each of these operations on the stack in Figure 2.21. If the processor has the Autoincrement and Autodecrement addressing modes, then the push operation can be performed by the single instruction Move\n\nNEWITEM,−(SP)\n\n69\n\nHamacher-38086\n\n70\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nSP\n\n19 – 28\n\n– 28\n\n17\n\nSP\n\n17 739\n\n739 Stack\n\n43\n\n43 NEWITEM\n\nITEM\n\n19\n\n(a) After push from NEWITEM\n\n– 28\n\n(b) After pop into ITEM\n\nFigure 2.22 Effect of stack operations on the stack in Figure 2.21.\n\nand the pop operation can be performed by Move\n\n(SP)+,ITEM\n\nWhen a stack is used in a program, it is usually allocated a fixed amount of space in the memory. In this case, we must avoid pushing an item onto the stack when the stack has reached its maximum size. Also, we must avoid attempting to pop an item off an empty stack, which could result from a programming error. Suppose that a stack runs from location 2000 (BOTTOM) down no further than location 1500. The stack pointer is loaded initially with the address value 2004. Recall that SP is decremented by 4 before new data are stored on the stack. Hence, an initial value of 2004 means that the first item pushed onto the stack will be at location 2000. To prevent either pushing an item on a full stack or popping an item off an empty stack, the single-instruction push and pop operations can be replaced by the instruction sequences shown in Figure 2.23. The Compare instruction Compare\n\nsrc,dst\n\nperforms the operation [dst] − [src] and sets the condition code flags according to the result. It does not change the value of either operand.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.8\n\nSAFEPOP\n\nCompare Branch>0\n\n#2000,SP EMPTYERROR\n\nMove\n\n(SP)+,ITEM\n\nSTACKS AND QUEUES\n\nCheck to see if the stack pointer contains an address value greater than 2000. If it does, the stack is empty. Branch to the routine EMPTYERROR for appropriate action. Otherwise, pop the top of the stack into memory location ITEM.\n\n(a) Routine for a safe pop operation\n\nSAFEPUSH\n\nCompare Branch≤0\n\n#1500,SP FULLERROR\n\nMove\n\nNEWITEM,−(SP)\n\nCheck to see if the stack pointer contains an address value equal to or less than 1500. If it does, the stack is full. Branch to the routine FULLERROR for appropriate action. Otherwise, push the element in memory location NEWITEM onto the stack.\n\n(b) Routine for a safe push operation\n\nFigure 2.23 Checking for empty and full errors in pop and push operations.\n\n71\n\nHamacher-38086\n\n72\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nBEGINNING, and successive entries are appended to the queue by entering them at successively higher addresses. By the time the back of the queue reaches END, space will have been created at the beginning if some items have been removed from the queue. Hence, the back pointer is reset to the value BEGINNING and the process continues. As in the case of a stack, care must be taken to detect when the region assigned to the data structure is either completely full or completely empty (see Problems 2.18 and 2.19).\n\n2.9\n\nSUBROUTINES\n\nStore the contents of the PC in the link register Branch to the target address specified by the instruction\n\nThe Return instruction is a special branch instruction that performs the operation: •\n\nFigure 2.24 illustrates this procedure.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.9\n\nMemory location\n\nCalling program\n\n200 204\n\nSUBROUTINES\n\nMemory location\n\nSubroutine SUB\n\n1000\n\nfirst instruction\n\nCall SUB next instruction\n\nReturn\n\n1000\n\nPC\n\n204\n\n204 Call\n\nReturn\n\n2.9.1 S UBROUTINE N ESTING AND THE P ROCESSOR S TACK A common programming practice, called subroutine nesting, is to have one subroutine call another. In this case, the return address of the second call is also stored in the link register, destroying its previous contents. Hence, it is essential to save the contents of the link register in some other location before calling another subroutine. Otherwise, the return address of the first subroutine will be lost. Subroutine nesting can be carried out to any depth. Eventually, the last subroutine called completes its computations and returns to the subroutine that called it. The return address needed for this first return is the last one generated in the nested call sequence. That is, return addresses are generated and used in a last-in–first-out order. This suggests that the return addresses associated with subroutine calls should be pushed onto a stack. Many processors do this automatically as one of the operations performed by the Call instruction. A particular register is designated as the stack pointer, SP, to be used in this operation. The stack pointer points to a stack called the processor stack. The Call instruction pushes the contents of the PC onto the processor stack and loads the subroutine address into the PC. The Return instruction pops the return address from the processor stack into the PC.\n\n73\n\nHamacher-38086\n\n74\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\n2.9.2 PARAMETER PASSING When calling a subroutine, a program must provide to the subroutine the parameters, that is, the operands or their addresses, to be used in the computation. Later, the subroutine returns other parameters, in this case, the results of the computation. This exchange of information between a calling program and a subroutine is referred to as parameter passing. Parameter passing may be accomplished in several ways. The parameters may be placed in registers or in memory locations, where they can be accessed by the subroutine. Alternatively, the parameters may be placed on the processor stack used for saving the return address. Passing parameters through processor registers is straightforward and efficient. Figure 2.25 shows how the program in Figure 2.16 for adding a list of numbers can be implemented as a subroutine, with the parameters passed through registers. The size of the list, n, contained in memory location N, and the address, NUM1, of the first number, are passed through registers R1 and R2. The sum computed by the subroutine is passed back to the calling program through register R0. The first four instructions in Figure 2.25 constitute the relevant part of the calling program. The first two instructions load n and NUM1 into R1 and R2. The Call instruction branches to the subroutine starting at location LISTADD. This instruction also pushes the return address onto the processor stack. The subroutine computes the sum and places it in R0. After the return operation is performed by the subroutine, the sum is stored in memory location SUM by the calling program.\n\nCalling program Move Move Call Move .. .\n\nR1 serves as a counter. R2 points to the list. Call subroutine. Save result.\n\nR0 (R2)+,R0 R1 LOOP\n\nInitialize sum to 0. Add entry from list.\n\nFigure 2.25 Program of Figure 2.16 written as a subroutine; parameters passed through registers.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.9\n\nSUBROUTINES\n\nNote the nature of the two parameters, NUM1 and n, passed to the subroutines in Figures 2.25 and 2.26. The purpose of the subroutines is to add a list of numbers. Instead of passing the actual list entries, the calling program passes the address of the first number in the list. This technique is called passing by reference. The second parameter is passed by value, that is, the actual number of entries, n, is passed to the subroutine.\n\n2.9.3 T HE S TACK F RAME Now, observe how space is used in the stack in the example in Figure 2.26. During execution of the subroutine, six locations at the top of the stack contain entries that are needed by the subroutine. These locations constitute a private work space for the subroutine, created at the time the subroutine is entered and freed up when the subroutine returns control to the calling program. Such space is called a stack frame. If the subroutine requires more space for local memory variables, they can also be allocated on the stack.\n\n75\n\nHamacher-38086\n\n76\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nAssume top of stack is at level 1 below. Move Move Call\n\n4(SP),SUM #8,SP\n\nPush parameters onto stack. Call subroutine (top of stack at level 2). Save result. Restore top of stack (top of stack at level 1).\n\nLOOP\n\nMoveMultiple\n\nR0−R2,−(SP)\n\nMove Move Clear Add Decrement Branch>0 Move MoveMultiple Return\n\n16(SP),R1 20(SP),R2 R0 (R2)+,R0 R1 LOOP R0,20(SP) (SP)+,R0−R2\n\nSave registers (top of stack at level 3). Initialize counter to n. Initialize pointer to the list. Initialize sum to 0. Add entry from list.\n\n(a) Calling program and subroutine\n\nLevel 3\n\n[R2] [R1] [R0]\n\nLevel 2\n\nLevel 1\n\n(b) Top of stack at various times\n\nFigure 2.26 Program of Figure 2.16 written as a subroutine; parameters passed on the stack.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.9\n\nSP (stack pointer)\n\nSUBROUTINES\n\nsaved [R1] saved [R0] localvar3 localvar2 localvar1\n\nFP (frame pointer)\n\nStack frame for called subroutine\n\nparam1 param2 param3 param4 Old TOS\n\nFigure 2.27 A subroutine stack frame example.\n\nFigure 2.27 shows an example of a commonly used layout for information in a stack frame. In addition to the stack pointer SP, it is useful to have another pointer register, called the frame pointer (FP), for convenient access to the parameters passed to the subroutine and to the local memory variables used by the subroutine. These local variables are only used within the subroutine, so it is appropriate to allocate space for them in the stack frame associated with the subroutine. In the figure, we assume that four parameters are passed to the subroutine, three local variables are used within the subroutine, and registers R0 and R1 need to be saved because they will also be used within the subroutine. With the FP register pointing to the location just above the stored return address, as shown in Figure 2.27, we can easily access the parameters and the local variables by using the Index addressing mode. The parameters can be accessed by using addresses 8(FP), 12(FP), . . . . The local variables can be accessed by using addresses −4(FP), −8(FP), . . . . The contents of FP remain fixed throughout the execution of the subroutine, unlike the stack pointer SP, which must always point to the current top element in the stack. Now let us discuss how the pointers SP and FP are manipulated as the stack frame is built, used, and dismantled for a particular invocation of the subroutine. We begin by\n\n77\n\nHamacher-38086\n\n78\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nassuming that SP points to the old top-of-stack (TOS) element in Figure 2.27. Before the subroutine is called, the calling program pushes the four parameters onto the stack. The Call instruction is then executed, resulting in the return address being pushed onto the stack. Now, SP points to this return address, and the first instruction of the subroutine is about to be executed. This is the point at which the frame pointer FP is set to contain the proper memory address. Since FP is usually a general-purpose register, it may contain information of use to the calling program. Therefore, its contents are saved by pushing them onto the stack. Since the SP now points to this position, its contents are copied into FP. Thus, the first two instructions executed in the subroutine are Move Move\n\nFP,−(SP) SP,FP\n\nAfter these instructions are executed, both SP and FP point to the saved FP contents. Space for the three local variables is now allocated on the stack by executing the instruction Subtract #12,SP Finally, the contents of processor registers R0 and R1 are saved by pushing them onto the stack. At this point, the stack frame has been set up as shown in the figure. The subroutine now executes its task. When the task is completed, the subroutine pops the saved values of R1 and R0 back into those registers, removes the local variables from the stack frame by executing the instruction Add\n\n#12,SP\n\nand pops the saved old value of FP back into FP. At this point, SP points to the return address, so the Return instruction can be executed, transferring control back to the calling program. The calling program is responsible for removing the parameters from the stack frame, some of which may be results passed back by the subroutine. The stack pointer now points to the old TOS, and we are back to where we started. Stack Frames for Nested Subroutines\n\nThe stack is the proper data structure for holding return addresses when subroutines are nested. It should be clear that the complete stack frames for nested subroutines build up on the processor stack as they are called. In this regard, note that the saved contents of FP in the current frame at the top of the stack are the frame pointer contents for the stack frame of the subroutine that called the current subroutine. An example of a main program calling a first subroutine SUB1, which then calls a second subroutine SUB2, is shown in Figure 2.28. The stack frames corresponding to these two nested subroutines are shown in Figure 2.29. All parameters involved in this example are passed on the stack. The figure only shows the flow of control and data among the three programs. The actual computations are not shown. The flow of execution is as follows. The main program pushes the two parameters param2 and param1 onto the stack in that order and then calls SUB1. This first subroutine is responsible for computing a single answer and passing it back to the main program on the stack. During the course of its computations, SUB1 calls the second subroutine,\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.9\n\nMemory location\n\nInstructions\n\nSUBROUTINES\n\nMain program .. . 2000 2004 2008 2012 2016 2020\n\nMove PARAM2,−(SP) Move PARAM1,−(SP) Call SUB1 Move (SP),RESULT Add #8,SP next instruction .. .\n\nPlace parameters on stack.\n\nStore result. Restore stack level.\n\nFirst subroutine 2100 2104 2108 2112\n\nSUB1\n\n2160 2164\n\nMove Move MoveMultiple Move Move .. .\n\nFP,−(SP) SP,FP R0−R3,−(SP) 8(FP),R0 12(FP),R1\n\nSave frame pointer register. Load the frame pointer. Save registers. Get first parameter. Get second parameter.\n\nMove Call Move .. .\n\nPARAM3,−(SP) SUB2 (SP)+,R2\n\nPlace a parameter on stack.\n\nMove MoveMultiple Move Return\n\nR3,8(FP) (SP)+,R0−R3 (SP)+,FP\n\nMove Move MoveMultiple Move .. .\n\nFP,−(SP) SP,FP R0−R1,−(SP) 8(FP),R0\n\nSave frame pointer register. Load the frame pointer. Save registers R0 and R1. Get the parameter.\n\nMove MoveMultiple Move Return\n\nR1,8(FP) (SP)+,R0−R1 (SP)+,FP\n\nPlace SUB2 result on stack. Restore registers R0 and R1. Restore frame pointer register. Return to Subroutine 1.\n\nPop SUB2 result into R2.\n\nSecond subroutine 3000\n\nSUB2\n\nFigure 2.28 Nested subroutines.\n\n79\n\nHamacher-38086\n\n80\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\n[R1] from SUB1 [R0] from SUB1 FP\n\n[FP] from SUB1 2164\n\nStack frame for second subroutine\n\nparam3 [R3] from Main [R2] from Main [R1] from Main [R0] from Main FP\n\n[FP] from Main\n\nStack frame for first subroutine\n\n2012 param1 param2 Old TOS\n\nFigure 2.29 Stack frames for Figure 2.28.\n\nSUB2, in order to perform some subtask. SUB1 passes a single parameter param3 to SUB2 and gets a result passed back to it. After SUB2 executes its Return instruction, this result is stored in register R2 by SUB1. SUB1 then continues its computations and eventually passes the required answer back to the main program on the stack. When SUB1 executes its return to the main program, the main program stores this answer in memory location RESULT and continues with its computations at “next instruction.” The comments in Figure 2.28 provide the details of how this flow of execution is managed. The first actions performed by each subroutine are to set the frame pointer, after saving its previous contents on the stack, and to save any other registers required. SUB1 uses four registers, R0 to R3, and SUB2 uses two registers, R0 and R1. These registers and the frame pointer are restored just before the returns are executed. The Index addressing mode involving the frame pointer register FP is used to load parameters from the stack and place answers back on the stack. The byte offsets used in these operations are always 8, 12, . . . , as discussed for the general stack frame in Figure 2.27. Finally, note that the calling routines are responsible for removing parameters from the stack. This is done by the Add instruction in the main program, and by the Move instruction at location 2164 in SUB1.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.10\n\n2.10\n\nSo far, we have introduced the following instructions: Move, Load, Store, Clear, Add, Subtract, Increment, Decrement, Branch, Testbit, Compare, Call, and Return. These 13 instructions, along with the addressing modes in Table 2.1, have allowed us to write routines to illustrate machine instruction sequencing, including branching and the subroutine structure. We also illustrated the basic memory-mapped I/O operations. Even this small set of instructions has a number of redundancies. The Load and Store instructions can be replaced by Move, and the Increment and Decrement instructions can be replaced by Add and Subtract, respectively. Also, Clear can be replaced by a Move instruction containing an immediate operand of zero. Therefore, only 8 instructions would have been sufficient for our purposes. But, it is not unusual to have some redundancy in practical machine instruction sets. Certain simple operations can usually be accomplished in a number of different ways. Some alternatives may be more efficient than others. In this section we introduce a few more important instructions that are found in most instruction sets.\n\n2.10.1 L OGIC INSTRUCTIONS Logic operations such as AND, OR, and NOT, applied to individual bits, are the basic building blocks of digital circuits, as described in Appendix A. It is also useful to be able to perform logic operations in software, which is done using instructions that apply these operations to all bits of a word or byte independently and in parallel. For example, the instruction Not\n\ndst\n\ncomplements all bits contained in the destination operand, changing 0s to 1s, and 1s to 0s. In Section 2.1.1, we saw that adding 1 to the 1’s-complement of a signed positive number forms the negative version in 2’s-complement representation. For example, in Figure 2.1, +3 (0011) is converted to −3 (1101) by adding 1 to the 1’s-complement of 0011. If 3 is contained in register R0, the instructions Not Add\n\nR0 #1,R0\n\nachieve the conversion. Many computers have a single instruction Negate R0 that accomplishes the same thing. Now consider an application for the logic instruction And, which performs the bitwise AND operation on the source and destination operands. Suppose that four ASCII characters are contained in the 32-bit register R0. In some task, we wish to determine if the leftmost character is Z. If it is, a conditional branch to YES is to be made. From Appendix E, we find that the ASCII code for Z is 01011010, which is expressed in\n\n81\n\nHamacher-38086\n\n82\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nhexadecimal notation as 5A. The three-instruction sequence And #\\$FF000000,R0 Compare #\\$5A000000,R0 Branch=0 YES implements the desired action. The And instruction clears all bits in the rightmost three character positions of R0 to zero, leaving the leftmost character unchanged. This is the result of using an immediate source operand that has eight 1s at its left end, and 0s in the 24 bits to the right. The Compare instruction compares the remaining character at the left end of R0 with the binary representation for the character Z. The Branch instruction causes a branch to YES if there is a match. The And instruction is often used in practical programming tasks where all bits of an operand except for some specified field are to be cleared to 0. In our example, the leftmost eight bits of R0 constitute the specified field.\n\n2.10.2 S HIFT AND R OTATE INSTRUCTIONS There are many applications that require the bits of an operand to be shifted right or left some specified number of bit positions. The details of how the shifts are performed depend on whether the operand is a signed number or some more general binary-coded information. For general operands, we use a logical shift. For a number, we use an arithmetic shift, which preserves the sign of the number. Logical Shifts\n\nTwo logical shift instructions are needed, one for shifting left (LShiftL) and another for shifting right (LShiftR). These instructions shift an operand over a number of bit positions specified in a count operand contained in the instruction. The general form of a logical left shift instruction is LShiftL count,dst The count operand may be given as an immediate operand, or it may be contained in a processor register. To complete the description of the left shift operation, we need to specify the bit values brought into the vacated positions at the right end of the destination operand, and to determine what happens to the bits shifted out of the left end. Vacated positions are filled with zeros, and the bits shifted out are passed through the Carry flag, C, and then dropped. Involving the C flag in shifts is useful in performing arithmetic operations on large numbers that occupy more than one word. Figure 2.30a shows an example of shifting the contents of register R0 left by two bit positions. The logical shift right instruction, LShiftR, works in the same manner except that it shifts to the right. Figure 2.30b illustrates this operation. Digit-Packing Example\n\nConsider the following short task that illustrates the use of both shift operations and logic operations. Suppose that two decimal digits represented in ASCII code are located\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.10\n\nC\n\nR0\n\n0\n\n. . .\n\nbefore:\n\n0\n\n0\n\n1\n\n1\n\n1\n\nafter:\n\n1\n\n1\n\n1\n\n0\n\n. . .\n\n0\n\n0\n\n1\n\n(a) Logical shift left\n\n0\n\n1\n\n1\n\n1\n\n0\n\n0\n\nLShiftL\n\n0\n\n#2,R0\n\nR0\n\nC\n\nbefore:\n\n0\n\n1\n\n1\n\n1\n\n0\n\n. . .\n\nafter:\n\n0\n\n0\n\n0\n\n1\n\n1\n\n1\n\n0\n\n0\n\n1\n\n1\n\n0\n\n. . .\n\n0\n\n1\n\n(b) Logical shift right\n\nLShiftR #2,R0\n\nR0\n\nC\n\nbefore:\n\n1\n\n0\n\n0\n\n1\n\n1\n\n. . .\n\nafter:\n\n1\n\n1\n\n1\n\n0\n\n0\n\n1\n\n(c) Arithmetic shift right\n\n1\n\n1\n\n0\n\n0\n\n. . .\n\n0\n\n1\n\n0\n\nAShiftR #2,R0\n\nFigure 2.30 Logical and arithmetic shift instructions.\n\nin memory at byte locations LOC and LOC + 1. We wish to represent each of these digits in the 4-bit BCD code and store both of them in a single byte location PACKED. The result is said to be in packed-BCD format. Tables E.1 and E.2 in Appendix E show that the rightmost four bits of the ASCII code for a decimal digit correspond to the BCD code for the digit. Hence, the required task is to extract the low-order four bits in LOC and LOC + 1 and concatenate them into the single byte at PACKED. The instruction sequence shown in Figure 2.31 accomplishes the task using register R0 as a pointer to the ASCII characters in memory, and using registers R1 and R2 to\n\n83\n\nHamacher-38086\n\n84\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nMove MoveByte LShiftL MoveByte And Or MoveByte\n\n#LOC,R0 (R0)+,R1 #4,R1 (R0),R2 #\\$F,R2 R1,R2 R2,PACKED\n\nR0 points to data. Load first byte into R1. Shift left by 4 bit positions. Load second byte into R2. Eliminate high-order bits. Concatenate the BCD digits. Store the result.\n\nFigure 2.31 A routine that packs two BCD digits.\n\ndevelop the BCD digit codes. When a MoveByte instruction transfers a byte between memory and a 32-bit processor register, we assume that the byte is located in the rightmost eight bit positions of the register. The And instruction is used to mask out all but the four rightmost bits in R2. Note that the immediate source operand is written as \\$F, which, interpreted as a 32-bit pattern, has 28 zeros in the most-significant bit positions. Arithmetic Shifts\n\nA study of the 2’s-complement binary number representation in Figure 2.1 reveals that shifting a number one bit position to the left is equivalent to multiplying it by 2; and shifting it to the right is equivalent to dividing it by 2. Of course, overflow might occur on shifting left, and the remainder is lost in shifting right. Another important observation is that on a right shift the sign bit must be repeated as the fill-in bit for the vacated position. This requirement on right shifting distinguishes arithmetic shifts from logical shifts in which the fill-in bit is always 0. Otherwise, the two types of shifts are very similar. An example of an arithmetic right shift, AShiftR, is shown in Figure 2.30c. The arithmetic left shift is exactly the same as the logical left shift. Rotate Operations\n\nIn the shift operations, the bits shifted out of the operand are lost, except for the last bit shifted out which is retained in the Carry flag C. To preserve all bits, a set of rotate instructions can be used. They move the bits that are shifted out of one end of the operand back into the other end. Two versions of both the left and right rotate instructions are usually provided. In one version, the bits of the operand are simply rotated. In the other version, the rotation includes the C flag. Figure 2.32 shows the left and right rotate operations with and without the C flag being included in the rotation. Note that when the C flag is not included in the rotation, it still retains the last bit shifted out of the end of the register. The mnemonics RotateL, RotateLC, RotateR, and RotateRC, denote the instructions that perform the rotate operations. The main use for Rotate instructions is in algorithms for performing arithmetic operations other than addition and subtraction, which we will encounter in Chapter 6.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.10\n\nC\n\nR0\n\n. . .\n\nbefore:\n\n0\n\n0\n\n1\n\n1\n\n1\n\nafter:\n\n1\n\n1\n\n1\n\n0\n\n. . .\n\n0\n\n0\n\n1\n\n(a) Rotate left without carry\n\nC\n\n0\n\n1\n\n1\n\n1\n\n0\n\n1\n\nRotateL\n\n#2,R0\n\nR0\n\n0\n\n. . .\n\nbefore:\n\n0\n\n0\n\n1\n\n1\n\n1\n\nafter:\n\n1\n\n1\n\n1\n\n0\n\n. . .\n\n0\n\n1\n\n(b) Rotate left with carry\n\n0\n\n1\n\n1\n\n1\n\n0\n\n0\n\nRotateLC #2,R0\n\nR0\n\nC\n\nbefore:\n\n0\n\n1\n\n1\n\n1\n\n0\n\n. . .\n\nafter:\n\n1\n\n1\n\n0\n\n1\n\n1\n\n1\n\n0\n\n1\n\n1\n\n0\n\n. . .\n\n0\n\n1\n\n(c) Rotate right without carry\n\n0\n\nRotateR #2,R0\n\nR0\n\nC\n\nbefore:\n\n0\n\n1\n\n1\n\n1\n\n0\n\n. . .\n\nafter:\n\n1\n\n0\n\n0\n\n1\n\n1\n\n1\n\n(d) Rotate right with carry Figure 2.32 Rotate instructions.\n\n0\n\n1\n\n1\n\n0\n\n. . .\n\n0\n\n1\n\n0\n\nRotateRC #2,R0\n\n85\n\nHamacher-38086\n\n86\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\n2.10.3 M ULTIPLICATION AND D IVISION Two signed integers can be multiplied or divided by machine instructions with the same format as we saw earlier for an Add instruction. The instruction Multiply\n\nRi,R j\n\nperforms the operation R j ← [Ri] × [R j] The product of two n-bit numbers can be as large as 2n bits. Therefore, the answer will not necessarily fit into register R j. A number of instruction sets have a Multiply instruction that computes the low-order n bits of the product and places it in register R j, as indicated. This is sufficient if it is known that all products in some particular application task will fit into n bits. To accommodate the general 2n-bit product case, some processors produce the product in two registers, usually adjacent registers R j and R( j + 1), with the high-order half being placed in register R( j + 1). Although it is less common, some instruction sets provide a signed integer Divide instruction Divide\n\nRi,R j\n\nwhich performs the operation R j ← [R j]/[Ri] placing the quotient in R j. The remainder may be placed in R( j + 1), or it may be lost. Computers that do not have Multiply and Divide instructions can perform these and other arithmetic operations by using sequences of more basic instructions such as Add, Subtract, Shift, and Rotate. This will become more apparent when we describe the implementation of arithmetic operations in Chapter 6.\n\n2.11\n\nEXAMPLE PROGRAMS\n\nIn this section we present three examples that further illustrate the use of machine instructions. The examples are representative of numeric (vector processing) and nonnumeric (sorting and linked-list manipulation) applications.\n\n2.11.1 VECTOR D OT P RODUCT P ROGRAM The first example is a numerical application that is an extension of the loop program of Figure 2.16 for adding numbers. In calculations that involve vectors and matrices, it is often necessary to compute the dot product of two vectors. Let A and B be two vectors of length n. Their dot product is defined as Dot Product =\n\nn−1 \u0002 i=0\n\nA(i) × B(i)\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.11\n\nLOOP\n\nMove Move Move Clear Move Multiply Add Decrement Branch>0 Move\n\n#AVEC,R1 #BVEC,R2 N,R3 R0 (R1)+,R4 (R2)+,R4 R4,R0 R3 LOOP R0,DOTPROD\n\nEXAMPLE PROGRAMS\n\nR1 points to vector A. R2 points to vector B. R3 serves as a counter. R0 accumulates the dot product. Compute the product of next components. Add to previous sum. Decrement the counter. Loop again if not done. Store dot product in memory.\n\nFigure 2.33 A program for computing the dot product of two vectors.\n\nFigure 2.33 shows a program for computing the dot product and storing it in memory location DOTPROD. The first elements of each vector, A(0) and B(0), are stored at memory locations AVEC and BVEC, with the remaining elements in the following word locations. The task of accumulating a sum of products occurs in many signal-processing applications. In this case, one of the vectors consists of the most recent n signal samples in a continuing time sequence of inputs to a signal-processing unit. The other vector is a set of n weights. The n signal samples are multiplied by the weights, and the sum of these products constitutes an output signal sample. Some computer instruction sets combine the operation of the Multiply and Add instructions used in the program in Figure 2.33 into a single MultiplyAccumulate instruction. We will see an example of this in the ARM processor in Chapter 3.\n\n2.11.2 B YTE-S ORTING P ROGRAM Consider a program for sorting a list of bytes stored in memory into ascending alphabetic order. Assume that the list consists of n bytes, not necessarily distinct, and that each byte contains the ASCII code for a character from the set of letters A through Z. In the ASCII code, presented in Appendix E, the letters A, B, . . . , Z, are represented by 7-bit patterns that have increasing values when interpreted as binary numbers. When an ASCII character is stored in a byte location, it is customary to set the mostsignificant bit position to 0. Using this code, we can sort a list of characters alphabetically by sorting their codes in increasing numerical order, considering them as positive numbers. Let the list be stored in memory locations LIST through LIST + n − 1, and let n be a 32-bit value stored at address N. The sorting is to be done in place, that is, the sorted list is to occupy the same memory locations as the original list. We sort the list using a straight-selection sort algorithm. First, the largest number is found and placed at the end of the list in location LIST + n − 1. Then the largest\n\n87\n\nHamacher-38086\n\n88\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nfor\n\n(j = n−1; j > 0; j = j − 1) { for ( k = j−1; k >= 0; k = k − 1 ) { if (LIST[k] > LIST[j]) { TEMP = LIST[k]; LIST[k] = LIST[j]; LIST[j] = TEMP; } } } (a) C-language program for sorting\n\nOUTER\n\nINNER\n\nNEXT\n\nMove Move Subtract Move Subtract MoveByte\n\n#LIST,R0 N,R1 #1,R1 R1,R2 #1,R1 (R0,R1),R3\n\nCompareByte Branch≤0 MoveByte MoveByte MoveByte MoveByte Decrement Branch≥0 Decrement Branch>0\n\nR3,(R0,R2) NEXT (R0,R2),R4 R3,(R0,R2) R4,(R0,R1) R4,R3 R2 INNER R1 OUTER\n\nLoad LIST into base register R0. Initialize outer loop index register R1 to j = n − 1. Initialize inner loop index register R2 to k = j− 1. Load LIST(j) into R3, which holds current maximum in sublist. If LIST(k) ≤ [R3], do not exchange. Otherwise, exchange LIST(k) with LIST(j) and load new maximum into R3. Register R4 serves as TEMP. Decrement index registers R2 and R1, which also serve as as loop counters, and branch back if loops not finished.\n\n(b) Assembly language program for sorting Figure 2.34 A byte-sorting program using straight-selection sort.\n\nnumber in the remaining sublist of n − 1 numbers is placed at the end of the sublist in location LIST + n − 2. The procedure is repeated until the list is sorted. A C-language program for this sorting algorithm is shown in Figure 2.34a, where the list is treated as a one-dimensional array LIST(0) through LIST(n − 1). For each sublist LIST( j) through LIST(0), the number in LIST( j) is compared with each of the other numbers in the sublist. Whenever a larger number is found in the sublist, it is interchanged with the number in LIST( j).\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.11\n\nEXAMPLE PROGRAMS\n\nThe C-language program traverses the list backwards. This order of traversal simplifies loop termination in the machine language version of the program because the loop is exited when an index is decremented to 0. An assembly language program that implements the sorting algorithm is given in Figure 2.34b. The comments in the program explain the use of various registers. The current maximum value is kept in register R3 while a sublist is being scanned. If a larger value is found, it is exchanged with the value in R3 and the new largest value is stored in LIST( j). Control flow is handled differently in the two programs for purposes of efficiency in the assembly language program. Using the if-then control statement in the C-language program causes the three-line then clause to exchange LIST(k) and LIST( j) if LIST(k) > LIST( j). In the assembly language program, a branch is taken around the four-instruction exchange code if LIST(k) ≤ LIST( j). If the machine instruction set allows a move operation from one memory location directly to another memory location, then the four-instruction exchange code in the inner loop in Figure 2.34b can be replaced by the three-instruction sequence MoveByte MoveByte MoveByte\n\n(R0,R2),(R0,R1) R3,(R0,R2) (R0,R1),R3\n\nAs we will see in Chapter 3, the 68000 processor has this capability. Finally, we note that the program in Figure 2.34b works correctly only if the list has at least two elements because the check for loop termination is done at the end of each loop. Hence, there is at least one pass through the loop, regardless of the value of n.\n\n2.11.3 L INKED L ISTS Many nonnumeric application programs require that an ordered list of information items be represented and stored in memory in such a way that it is easy to add items to the list or to delete items from the list at any position while maintaining the desired order of items. This is a more general situation than found in the stack and queue data structures, discussed in Section 2.8, where items can only be added or deleted at the ends. Consider the following example. The course list of student test scores that we used in Section 2.5 to illustrate the Index addressing mode contains the unique student ID number in the first word of each four-word student record shown in Figure 2.14. Suppose we try to maintain this list of records in consecutive memory locations in some contiguous block of memory in increasing order of student ID numbers. This would facilitate printing and posting the list of test scores ordered by ID number. After the list is built, if a student withdraws from the course an empty record slot is created. It is then necessary to jump over the empty slot when going through the records to add up test scores or to print a listing. A more awkward situation arises after the initial construction of the list if another student registers in the course. To keep the list ordered, all records, starting from the one with the first ID number larger than the new ID would need to be moved to higher address locations to create a four-word space for the new record. Similarly,\n\n89\n\nHamacher-38086\n\n90\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nRecord 1\n\n.\n\nRecord 2\n\n.\n\nRecord k\n\n0\n\nRecord 1\n\n.\n\nRecord 2\n\nNew record\n\n.\n\n.\n\n(b) Inserting a new record between Record 1 and Record 2 Figure 2.35 Linked-list data structure.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.11\n\nKey field (ID) 1 word\n\nFirst record\n\n2320\n\n27243\n\n1040\n\nSecond record\n\n1040\n\n28106\n\n1200\n\nThird record\n\n1200\n\n28370\n\n2880\n\nSecond last record\n\n2720\n\n40632\n\n1280\n\nLast record\n\n1280\n\n47871\n\n0\n\nEXAMPLE PROGRAMS\n\nData field (Test scores) 3 words Head\n\nTail\n\nFigure 2.36 A list of student test scores organized as a linked list in memory.\n\n91\n\nHamacher-38086\n\n92\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nInsertion of a New Record\n\nLet us now give the steps needed to add a new record to the list shown in Figure 2.36. Suppose that the ID number of the new record is 28241, and the next available free record block is at address 2960. Trace forward from the head record until the first record with a larger ID is found. This is the record at memory location 1200, containing the ID 28370. Now insert the address link 1200 into the link field of the new record, and then insert the address of the new record, 2960, into the link field of the previous record at location 1040, overwriting the old value of 1200. Now, the new record has been inserted as the third record in the updated list, between the second and third records of the old list. A subroutine for performing the insertion operation is shown in Figure 2.37. It is composed of three sections to handle the following three possible cases: the current list is empty, the new record becomes the new head of a nonempty list, or the new record is inserted in the list somewhere after the current head. The last case includes the possibility that the new record becomes the tail.\n\nINSERTION\n\nnot empty HEAD insert new record somewhere after current head SEARCH LOOP\n\nnew record becomes new tail insert new record in an interior position INSERT TAIL\n\nCompare\n\nBranch>0 Move Return\n\nCompare\n\nBranch>0\n\nSEARCH\n\nMove Move Return\n\nMove\n\nMove Compare\n\n4(RCURRENT), RNEXT #0, RNEXT\n\nBranch=0\n\nTAIL\n\nCompare Branch<0 Move Branch\n\n(RNEXT), (RNEWREC) INSERT RNEXT, RCURRENT LOOP\n\nMove Move Return\n\nRNEXT, 4(RNEWREC) RNEWREC, 4(RCURRENT)\n\nFigure 2.37 A subroutine for inserting a new record into a linked list.\n\nnew record becomes a one-entry list\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.11\n\nEXAMPLE PROGRAMS\n\n4(RNEXT),4(RCURRENT)\n\ncan replace these two Move instructions. Error Conditions\n\nThe insertion and deletion subroutines in Figures 2.37 and 2.38 do not take into account the possibility of two error conditions. The insertion subroutine makes the\n\n93\n\nHamacher-38086\n\n94\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nDELETION\n\nnot the head record SEARCH LOOP\n\nDELETE\n\nCompare Branch>0 Move Return Move Move Compare Branch=0 Move Branch Move Move Return\n\nFigure 2.38 A subroutine for deleting a record from a linked list.\n\nassumption that there is no record in the list with the new ID, and the deletion subroutine assumes that there is a record with the ID to be deleted. Modifying the subroutines to account for these error possibilities is considered in problems 2.23 and 2.24.\n\n2.12\n\nENCODING OF MACHINE INSTRUCTIONS\n\nWe have introduced a variety of useful instructions and addressing modes. These instructions specify the actions that must be performed by the processor circuitry to carry out the desired tasks. We have often referred to them as machine instructions. Actually, the form in which we have presented the instructions is indicative of the forms used in assembly languages, except that we tried to avoid using acronyms for the various operations, which are awkward to memorize and are likely to be specific to a particular commercial processor. To be executed in a processor, an instruction must be encoded in a compact binary pattern. Such encoded instructions are properly referred to as machine instructions. The instructions that use symbolic names and acronyms are called assembly language instructions, which are converted into the machine instructions using the assembler program as explained in Section 2.6. In the previous sections, we made a simplifying assumption that all instructions are one word in length. Since we usually refer to 32-bit words, our assumption implies that this length is adequate to represent the necessary information. Let us now consider the validity of this assumption. We have seen instructions that perform operations such as add, subtract, move, shift, rotate, and branch. These instructions may use operands of different sizes, such as 32-bit and 8-bit numbers or 8-bit ASCII-encoded characters. The type of operation that is to be performed and the type of operands used may be specified using an encoded\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.12\n\nENCODING OF MACHINE INSTRUCTIONS\n\nbinary pattern referred to as the OP code for the given instruction. Suppose that 8 bits are allocated for this purpose, giving 256 possibilities for specifying different instructions. This leaves 24 bits to specify the rest of the required information. Let us examine some typical cases. The instruction Add\n\nR1,R2\n\nhas to specify the registers R1 and R2, in addition to the OP code. If the processor has 16 registers, then four bits are needed to identify each register. Additional bits are needed to indicate that the Register addressing mode is used for each operand. The instruction Move\n\n24(R0),R5\n\nrequires 16 bits to denote the OP code and the two registers, and some bits to express that the source operand uses the Index addressing mode and that the index value is 24. Suppose that three bits are used to specify an addressing mode in Table 2.1. Then six bits have to be available for this purpose, denoting the chosen addressing modes of the source and destination operands. Hence, there are 10 bits left to give the index value. If these 10 bits suffice to express an adequate range of signed numbers for indexing purposes, then the instruction fits into our 32-bit word. The shift instruction LshiftR\n\n#2,R0\n\nand the move instruction Move\n\n#\\$3A,R1\n\nhave to indicate the immediate values 2 and \\$3A, respectively, in addition to the 18 bits used to specify the OP code, the addressing modes, and the register. This limits the size of the immediate operand to what is expressible in 14 bits. Consider next the branch instruction Branch>0\n\nLOOP\n\nAgain, 8 bits are used for the OP code, leaving 24 bits to specify the branch offset. Since the offset is a 2’s-complement number, the branch target address must be within 223 bytes of the location of the branch instruction. To branch to an instruction outside this range, a different addressing mode has to be used, such as Absolute or Register Indirect. Branch instructions that use these modes are usually called Jump instructions. In all these examples, the instructions can be encoded in a 32-bit word. Figure 2.39a depicts a possible format. There is an 8-bit OP-code field and two 7-bit fields for specifying the source and destination operands. The 7-bit field identifies the addressing mode and the register involved (if any). The “Other info” field allows us to specify the additional information that may be needed, such as an index value or an immediate operand. But, what happens if we want to specify a memory operand using the Absolute addressing mode? The instruction Move\n\nR2,LOC\n\n95\n\nHamacher-38086\n\n96\n\nbook\n\nJune 28, 2001\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\n8\n\n7\n\n7\n\n10\n\nOP code\n\nSource\n\nDest\n\nOther info\n\n(a) One-word instruction\n\nOP code\n\nSource\n\nDest\n\nOther info\n\n(b) Two-word instruction\n\nOP code\n\nRi\n\nRj\n\nRk\n\nOther info\n\n(c) Three-operand instruction Figure 2.39 Encoding instructions into 32-bit words.\n\nrequires 18 bits to denote the OP code, the addressing modes, and the register. This leaves 14 bits to express the address that corresponds to LOC, which is clearly insufficient. If we want to be able to give a complete 32-bit address in the instruction, then the only solution is to include a second word as a part of this instruction, in which case the additional word can contain the required memory address. A suitable format is shown in Figure 2.39b. The first word may be the same as in part a of the figure. The second is a full memory address. This format can also accommodate instructions such as And\n\n#\\$FF000000,R2\n\nin which case the second word gives a full 32-bit immediate operand. If we want to allow an instruction in which two operands can be specified using the Absolute addressing mode, for example Move\n\nLOC1,LOC2\n\nthen it becomes necessary to use two additional words for the 32-bit addresses of the operands. This approach results in instructions of variable length, dependent on the number of operands and the type of addressing modes used. Using multiple words, we can implement quite complex instructions, closely resembling operations in high-level\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\n2.12\n\nENCODING OF MACHINE INSTRUCTIONS\n\nprogramming languages. The term complex instruction set computer (CISC) has been used to refer to processors that use instruction sets of this type. There exists a radically different alternative to this approach. If we insist that all instructions must fit into a single 32-bit word, it is not possible to provide a 32-bit address or a 32-bit immediate operand within the instruction. But, it is still possible to define a highly functional instruction set, which makes extensive use of the processor registers. Thus, we can have Add\n\nR1,R2\n\nLOC,R2\n\n(R3),R2\n\nR1,R2,R3\n\nwhich performs the operation R3 ← [R1] + [R2] A possible format for such an instruction is shown in Figure 2.39c. Of course, the processor has to be able to deal with such three-operand instructions. In an instruction set where all arithmetic and logical operations use only register operands, the only memory references are made to load/store the operands into/from the processor registers.\n\n97\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n98\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nRISC-type instruction sets typically have fewer and less complex instructions than CISC-type sets. We will discuss the relative merits of RISC and CISC approaches in Chapter 8, which deals with the details of processor design.\n\n2.13\n\nCONCLUDING REMARKS\n\nThis chapter introduced the representation and execution of instructions and programs at the assembly and machine level as seen by the programmer. The discussion emphasized the basic principles of addressing techniques and instruction sequencing. The programming examples illustrated the basic types of operations implemented by the instruction set of any modern computer. Several addressing modes were introduced, including the important concepts of pointers and indexed addressing. Basic I/O operations were discussed, showing how characters are transferred between the processor and keyboard and display devices. The subroutine concept and the instructions needed to implement it were also discussed. Subroutine linkage methods provided an example of the application of the stack data structure. The way in which machine instructions manipulate other data structures was also explained. Queues, arrays, and linked lists were considered. We described two different approaches to the design of machine instruction sets — the CISC and RISC approaches. The execution-time performance of these two design styles will be further developed in Chapter 8.\n\nPROBLEMS 2.1\n\nRepresent the decimal values 5, −2, 14, −10, 26, −19, 51, and −43, as signed, 7-bit numbers in the following binary formats: (a) Sign-and-magnitude (b) 1’s-complement (c) 2’s-complement (See Appendix E for decimal-to-binary integer conversion.)\n\n2.2\n\n(a) Convert the following pairs of decimal numbers to 5-bit, signed, 2’s-complement, binary numbers and add them. State whether or not overflow occurs in each case. (a) (b) (c) (d) (e) ( f)\n\n5 and 10 7 and 13 −14 and 11 −5 and 7 −3 and −8 −10 and −13\n\n(b) Repeat Part a for the subtract operation, where the second number of each pair is to be subtracted from the first number. State whether or not overflow occurs in each case.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\nPROBLEMS\n\n99\n\n2.3\n\nGiven a binary pattern in some memory location, is it possible to tell whether this pattern represents a machine instruction or a number?\n\n2.4\n\nA memory byte location contains the pattern 00101100. What does this pattern represent when interpreted as a binary number? What does it represent as an ASCII code?\n\n2.5\n\nConsider a computer that has a byte-addressable memory organized in 32-bit words according to the big-endian scheme. A program reads ASCII characters entered at a keyboard and stores them in successive byte locations, starting at location 1000. Show the contents of the two memory words at locations 1000 and 1004 after the name “Johnson” has been entered.\n\n2.6\n\nRepeat Problem 2.5 for the little-endian scheme.\n\n2.7\n\nA program reads ASCII characters representing the digits of a decimal number as they are entered at a keyboard and stores the characters in successive memory bytes. Examine the ASCII code in Appendix E and indicate what operation is needed to convert each character into an equivalent binary number.\n\n2.8\n\nWrite a program that can evaluate the expression A× B +C × D in a single-accumulator processor. Assume that the processor has Load, Store, Multiply, and Add instructions, and that all values fit in the accumulator.\n\n2.9\n\nThe list of student marks shown in Figure 2.14 is changed to contain j test scores for each student. Assume that there are n students. Write an assembly language program for computing the sums of the scores on each test and store these sums in the memory word locations at addresses SUM, SUM + 4, SUM + 8, . . . . The number of tests, j, is larger than the number of registers in the processor, so the type of program shown in Figure 2.15 for the 3-test case cannot be used. Use two nested loops, as suggested in Section 2.5.3. The inner loop should accumulate the sum for a particular test, and the outer loop should run over the number of tests, j. Assume that j is stored in memory location J, placed ahead of location N.\n\n2.10\n\n(a) Rewrite the dot product program in Figure 2.33 for an instruction set in which the arithmetic and logic operations can only be applied to operands in processor registers. The two instructions Load and Store are used to transfer operands between registers and the memory. (b) Calculate the values of the constants k1 and k2 in the expression k1 + k2 n, which represents the number of memory accesses required to execute your program for Part a, including instruction word fetches. Assume that each instruction occupies a single word.\n\n2.11\n\nRepeat Problem 2.10 for a computer with two-address instructions, which can perform operations such as A ← [A] + [B] where A and B can be either memory locations or processor registers. Which computer\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n100\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nrequires fewer memory accesses? (Chapter 8 on pipelining gives a different perspective on the answer to this question.) 2.12\n\n“Having a large number of processor registers makes it possible to reduce the number of memory accesses needed to perform complex tasks.” Devise a simple computational task to show the validity of this statement for a processor that has four registers compared to another that has only two registers.\n\n2.13\n\nRegisters R1 and R2 of a computer contain the decimal values 1200 and 4600. What is the effective address of the memory operand in each of the following instructions? (a) (b) (c) (d) (e)\n\n2.14\n\nAssume that the list of student test scores shown in Figure 2.14 is stored in the memory as a linked list as shown in Figure 2.36. Write an assembly language program that accomplishes the same thing as the program in Figure 2.15. The head record is stored at memory location 1000.\n\n2.15\n\nConsider an array of numbers A(i, j), where i = 0 through n − 1 is the row index, and j = 0 through m − 1 is the column index. The array is stored in the memory of a computer one row after another, with elements of each row occupying m successive word locations. Assume that the memory is byte-addressable and that the word length is 32 bits. Write a subroutine for adding column x to column y, element by element, leaving the sum elements in column y. The indices x and y are passed to the subroutine in registers R1 and R2. The parameters n and m are passed to the subroutine in registers R3 and R4, and the address of element A(0,0) is passed in register R0. Any of the addressing modes in Table 2.1 can be used. At most, one operand of an instruction can be in the memory.\n\n2.16\n\nBoth of the following statements cause the value 300 to be stored in location 1000, but at different times. ORIGIN 1000 DATAWORD 300 and Move\n\n#300,1000\n\nExplain the difference. 2.17\n\nRegister R5 is used in a program to point to the top of a stack. Write a sequence of instructions using the Index, Autoincrement, and Autodecrement addressing modes to perform each of the following tasks: (a) Pop the top two items off the stack, add them, and then push the result onto the stack.\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n11:31\n\nPROBLEMS\n\n101\n\n(b) Copy the fifth item from the top into register R3. (c) Remove the top ten items from the stack. 2.18\n\nA FIFO queue of bytes is to be implemented in the memory, occupying a fixed region of k bytes. You need two pointers, an IN pointer and an OUT pointer. The IN pointer keeps track of the location where the next byte is to be appended to the queue, and the OUT pointer keeps track of the location containing the next byte to be removed from the queue. (a) As data items are added to the queue, they are added at successively higher addresses until the end of the memory region is reached. What happens next, when a new item is to be added to the queue? (b) Choose a suitable definition for the IN and OUT pointers, indicating what they point to in the data structure. Use a simple diagram to illustrate your answer. (c) Show that if the state of the queue is described only by the two pointers, the situations when the queue is completely full and completely empty are indistinguishable. (d) What condition would you add to solve the problem in part c? (e) Propose a procedure for manipulating the two pointers IN and OUT to append and remove items from the queue.\n\n2.19\n\nConsider the queue structure described in Problem 2.18. Write APPEND and REMOVE routines that transfer data between a processor register and the queue. Be careful to inspect and update the state of the queue and the pointers each time an operation is attempted and performed.\n\n2.20\n\nConsider the following possibilities for saving the return address of a subroutine: (a) In a processor register (b) In a memory location associated with the call, so that a different location is used when the subroutine is called from different places (c) On a stack Which of these possibilities supports subroutine nesting and which supports subroutine recursion (that is, a subroutine that calls itself)?\n\n2.21\n\nThe subroutine call instruction of a computer saves the return address in a processor register called the link register, RL. What would you do to allow subroutine nesting? Would your scheme allow the subroutine to call itself?\n\n2.22\n\nAssume you want to organize subroutine calls on a computer as follows: When routine Main wishes to call subroutine SUB1, it calls an intermediate routine, CALLSUB, and passes to it the address of SUB1 as a parameter in register R1. CALLSUB saves the return address on a stack, making sure that the upper limit of the stack is not exceeded. Then it branches to SUB1. To return to the calling program, subroutine SUB1 calls another intermediate routine, RETRN. This routine checks that the stack is not empty and then uses the top element to return to the original calling program. Write routines CALLSUB and RETRN, assuming that the subroutine call instruction saves the return address in a link register, RL. The upper and lower limits of the\n\nHamacher-38086\n\nbook\n\nJune 28, 2001\n\n102\n\n11:31\n\nCHAPTER 2\n\nMACHINE INSTRUCTIONS AND PROGRAMS\n\nstack are recorded in memory locations UPPERLIMIT and LOWERLIMIT, respectively. 2.23\n\nThe linked-list insertion subroutine in Figure 2.37 does not check if the ID of the new record matches that of a record already in the list. What happens in the execution of the subroutine if this is the case? Modify the subroutine to return the address of the matching record in register ERROR if this occurs or return a zero if the insertion is successful.\n\n2.24\n\nThe linked-list deletion subroutine in Figure 2.38 assumes that a record with the ID contained in register RIDNUM is in the list. What happens in the execution of the subroutine if there is no record with this ID? Modify the subroutine to return a zero in RIDNUM if deletion is successful or leave RIDNUM unchanged if the record is not in the list.\n\n## MACHINE INSTRUCTIONS AND PROGRAMS\n\nJun 28, 2001 - The usual approach is to deal with them in groups of fixed size. For this purpose, the memory is organized so that a group of n bits can be stored or retrieved in a single, basic operation. Each group of n bits is referred to as a word of information, and n is called the word length. The memory of a computer can.\n\n#### Recommend Documents\n\nInstructions sony dream machine alarm clock\nInstructions sony dream machine alarm clock. Instructions sony dream machine alarm clock. Open. Extract. Open with. Sign In. Main menu.\n\nMarble Machine #1 Instructions .pdf\nthe angle and the size of the shelf at each turn. Once you are satisfied with the way the ball runs,. use a cocktail stick to apply glue to the underside of. the spiral, being careful not to nudge it any further. Page 2 of 2. Marble Machine #1 Instru\n\nman-136\\sony-dream-machine-instructions-timezone.pdf ...\n\nInstructions sony dream machine alarm clock\nPage 1 of 15. Page 1 of 15. Page 2 of 15. Page 2 of 15. Page 3 of 15. Page 3 of 15. Instructions sony dream machine alarm clock. Instructions sony dream machine alarm clock. Open. Extract. Open with. Sign In. Main menu. Displaying Instructions sony d\n\nDifferential Controller Operating and Installation Instructions - Docuthek\nlocal electrical power supply utility and the VDE ... System 1 = Solar differential regulation. 16 ..... solar energy system) or ask the installation technician.\n\nIC}, which fetches, decode and executes instructions\nIt is a program controlled semiconductor device (IC}, which fetches, decode and ... 10. Why address bus is unidirectional? The address is an identification number used by the microprocessor to identify or access a memory location or I / O device. It\n\nGeneral Information and Instructions\nrequested information, including the certification. All questions must ... financial data from any acquiring person as well as the filing of additional information or.\n\nINSTALLATION, START-UP AND SERVICE INSTRUCTIONS\ndepending on size and application. The 39G Galaxy central station air handling unit are built up in \"Modules\". (Refer to Fig. 3). Any unit which is 22M (module) or longer in length will be shipped in shorter sections. 3.3 Do not remove skids or prote\n\npdf-1415\\instructions-for-armourers-martini-henry-instructions-for ...\n... the apps below to open or edit this item. pdf-1415\\instructions-for-armourers-martini-henry-instru ... care-and-repair-of-martini-enfield-by-frederic-faust.pdf." ]
[ null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.90829295,"math_prob":0.8893337,"size":172126,"snap":"2022-40-2023-06","text_gpt3_token_len":39690,"char_repetition_ratio":0.20956066,"word_repetition_ratio":0.06100454,"special_character_ratio":0.23056947,"punctuation_ratio":0.106271215,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95311743,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-29T10:10:44Z\",\"WARC-Record-ID\":\"<urn:uuid:9e4149a0-e381-42b7-8a19-c265104d18a2>\",\"Content-Length\":\"239401\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0c3e98f9-0259-4290-89d5-084622f5962e>\",\"WARC-Concurrent-To\":\"<urn:uuid:598f8448-d537-4af2-b3da-ca6ce5c84667>\",\"WARC-IP-Address\":\"172.67.218.162\",\"WARC-Target-URI\":\"https://pdfkul.com/machine-instructions-and-programs_5a61d44a1723ddf3a7f50802.html\",\"WARC-Payload-Digest\":\"sha1:JPGNE7KGWH3YYSMUUJI44XISRG3SQPZ4\",\"WARC-Block-Digest\":\"sha1:5OXQFNGLWZAPITDBU5ZWBRKDKJ34524J\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499710.49_warc_CC-MAIN-20230129080341-20230129110341-00446.warc.gz\"}"}
https://brilliant.org/practice/area-of-triangles-warmup/
[ "", null, "Geometry\n\n# Area of Triangles Warmup", null, "A triangle has an area of 20 square units. Which set of values could NOT represent the base and height?\n\nWhich has the greater area:\n\nA: A square with side lengths of $x.$\n\nB. A triangle with base length $x$ that is twice as tall as it is wide.\n\nShayna draws triangle $P$ with a base and a height greater than one. She triples the base length and halves the height to get triangle $Q.$ Which triangle has greater area?", null, "An equilateral triangle has a base length of 4. What is its area?", null, "One way to find the area of a triangle is to use the Sine Rule: Area = $\\frac{1}{2}ab \\sin{C}.$ In the formula, $a$ and $b$ are the adjacent sides to any angle angle $C$ of the triangle.\n\nIf $\\text {sin }\\angle HUT$ is $\\frac{1}{2},$ what is the area of $\\triangle HUT?$\n\n×" ]
[ null, "https://ds055uzetaobb.cloudfront.net/brioche/chapter/Area%20of%20Triangles-AIyhmM.png", null, "https://ds055uzetaobb.cloudfront.net/brioche/uploads/xDETGpDRh2-group-2.png", null, "https://brilliant-staff-media.s3-us-west-2.amazonaws.com/tiffany-wang/bidcrROELa.png", null, "https://ds055uzetaobb.cloudfront.net/brioche/uploads/coydqXIWDO-untitled-15.png", null ]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9337806,"math_prob":0.9997041,"size":802,"snap":"2022-40-2023-06","text_gpt3_token_len":188,"char_repetition_ratio":0.15914787,"word_repetition_ratio":0.08,"special_character_ratio":0.23067331,"punctuation_ratio":0.15469614,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99991786,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,null,null,8,null,8,null,8,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-02T12:19:12Z\",\"WARC-Record-ID\":\"<urn:uuid:623dbc31-3060-4206-bdc2-64fabe9aeb0b>\",\"Content-Length\":\"76959\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:7dccbe97-c798-4810-8b67-ae750bc2746a>\",\"WARC-Concurrent-To\":\"<urn:uuid:68ffc8ab-1474-40be-9c03-a2fa96934b90>\",\"WARC-IP-Address\":\"104.18.9.15\",\"WARC-Target-URI\":\"https://brilliant.org/practice/area-of-triangles-warmup/\",\"WARC-Payload-Digest\":\"sha1:7YJWFGJ3PJLQDCM4TEPKUNYTVHRWUU4V\",\"WARC-Block-Digest\":\"sha1:ZUNCTDJOLUXH3US3BMRVTAQI734LFI4T\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337322.29_warc_CC-MAIN-20221002115028-20221002145028-00629.warc.gz\"}"}