url stringlengths 14 1.76k | text stringlengths 100 1.02M | metadata stringlengths 1.06k 1.1k |
|---|---|---|
https://minireference.com/blog/multilingual-authoring-for-the-win/ | Multilingual authoring for the win
I have been working on a French translation for the math book and in the process I stumbled upon some really powerful “authoring hacks” that I would like to describe here in case they might be useful for other bilingual authors and educators.
Let’s see les maths!
Before we begin with the “How it’s made” episode, let me show you some examples of the final product. I have selected the best four “backports” — explanations that now exist in the English version thanks to the additions in the French version.
1. Reader feedback was consistent at pointing out the algebra sections as boring and TL;DR. Readers are willing to learn algebra (the rules for manipulating math expressions), but then when it comes to algebra “techniques” they are not sold on the concept. One solution to this problem would be to drop the “boring stuff” (lower the expectations of the reader), but I was having none of this. Instead I decided to just improve the explanations and add pictures: Completing the square en Français et in English.
2. Functions (modelling superpowers) are the best thing ever, and probably the most powerful tool readers will develop in the book. This is why proper definitions and examples of functions are essential.
3. Polar coordinates are super important—for both practical reasons and for the “aha” moment (knowledge buzz) that occur when readers understand $(x,y)$ is just one example of the many possible representations of the points in the Cartesian plane and $r\angle \theta$ is an equivalent representation (instructions that specify the position of a particular point int he Cartesian plane based on the distance $r$ and direction $\theta$).
4. Speaking of knowledge buzz through representation theory, the book now finally has a proper motivation why readers need to think about the concept of a basis (a set of direction vectors that is used as the coordinate system for a vector space). On this one I go back to the basics—explain through an example.
Contuinuez à lire si ça a l’air intéressant. Read on if you’re interested.
Context
The No Bullshit Guide to Mathematics (a.k.a. the green book) is a short summary of all the essential topics from high school math intended for adult learners. Last year, by sheer luck and good fortune, I was introduced to Gerard Barbanson who offered to translate the book to French. Gerard is a professional mathematician, a native French speaker, and has also taught math in English for many years, which makes him the perfect translator. Gerard is leading the translation project and provides lots of useful feedback and improvements for the text.
Look out for a followup blog post and announcement about the release of the French translation (in a few months). This blog post is not about that, but about the benefits of the translation efforts brought to the original English version.
Translation as a way to highlight problems
While reviewing Gerard’s “first pass” of translation, I kept noticing spots where the explanations didn’t work well. My initial reaction was that this was a bug in the translation, but every time I looked into a passage, I realized the problem existed in the original English text, and the translation only magnified the problem and made it more noticeable. Examples of “weak spots” include paragraphs that are too conversational (i.e. no content), missing definitions, and explanations that are unclear or confusing.
I found this process to be extremely useful. Even though I’ve read and reread the English version many times, I never noticed these weak spots until now. The translation process highlighted the lack of clarity in certain specific parts and forced me to think of ways to fix these explanations. Essentially, if an explanation is good, it will “survive” the process of translation, but if it’s not 100% solid and clear, then it turns into “noise” at the end of the process.
We can think of translating explanations as a communication scenario, where the source language (English) is the transmitter, and the target language (French) is the receiver. The process of translation adds “noise” in the form of ambiguities, so the received signal is a degraded version of the original signal. The French translation will be good only if the original English explanation is really solid and clear. This puts additional pressure on the original English version to be extra clear and precise.
The language of mathematics
Another benefit that came out of the translation work has been the focus on the consistent use of terminology and notation. For the most part, mathematical concepts translate well between English and French, but sometimes French has more precise terminology available. For example I’ve adopted the precise terminology of source set and target set to refer to the sets that appear in the function “type signature,” which are distinct concepts from the function’s domain and image.
One of the core responsibilities of any math teacher is to use precise and consistent language to describe mathematics, including choosing the simplest terminology when the complicated terminology is unnecessary, but not shying away from the “real math” terms when they help illuminate the concepts. Working with Gerard to explicitly establish our conventions for the French version forced me to also be consistent in the English version as well.
I guess that’s not too surprising—using consistent terminology and notation is just best practices.
Bilingual writing for better explanations
Perhaps the most surprising thing I noticed from the translation project is the amazing efficiency of developing English and French explanations in parallel, sometimes aided by Google Translate. This was most apparent in writing the new sections on polar coordinates and vectors. Normally writing a new section would take me days, going through several mediocre versions, rereading on paper, and slowly converging to a decent narrative. I noticed the new sections I added over the holidays converged to a “quality product” much faster. Here is the process I followed:
1. Explain the concept in English.
2. Translate explanation to French improving and simplifying it in the process.
3. Take the best parts of the French explanation and incorporate them back into the English version. Go to step 2.
After a few cycles of going between the English and French version, I saw clear improvements from the initial English version and of course the French version was improving in tandem.
Kaizen for textbooks
I guess the thing that makes me excited about these “authoring hacks” is the fact that they allow me to go one step deeper in the process of continuous improvement of the books. I’ve read and reread the text at least a dozen times, worked closely with my editor Sandy Gordon to iron out all the major flaws and acted on feedback from readers to fix confusing passages, but at some point I get tired and start to let things go. I say to myself things like “yeah this is not the clearest explanation, but it’s kind of OK as is.” This is partially out of laziness, but also because of the law of diminishing returns: sometimes rewriting makes things worse!
There is a famous quote that says:
“There is no great writing, only great rewriting.”
― Louis D. Brandeis
I know this is good advice, but it’s hard to adhere to it. After five editions of the math book, I find it difficult to motivate myself to rewrite things, even if I know there is still room for improvement. That’s why I’m always looking for hacks that can help with the process (see for example the text-to-speech proofreading hack). The translation work of the past few months gave me the impetus to do more productive rewriting without it feeling like a chore. Look out for the updated No Bullshit Guide to Mathematics v5.4 coming soon in both English and French. Sign up for the mailing list if you want to be notified.
One thought on “Multilingual authoring for the win”
1. Elias
Oh wow, that’s an awesome finding!
And it makes a lot of sense!
I have a friend who works as an interpreter, she finished recently her PhD and her thesis was on a method to evaluate a hypothesis about these ambiguities and nuances that translations expose in literary narratives (euh, I think it’s more complicated than that, but that’s what I got at least, haha).
I find very appealing this idea of using translation precisely to find ambiguities more quickly in a text that aims for clarity!
Rock on! ^^ | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.522016704082489, "perplexity": 861.5748461852506}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-04/segments/1610703538431.77/warc/CC-MAIN-20210123191721-20210123221721-00528.warc.gz"} |
http://statisfaction.wordpress.com/2013/09/25/clone-wars-inside-the-uniform-random-variable/ | # Statisfaction
## Clone wars inside the uniform random variable
Posted in General by Pierre Jacob on 25 September 2013
Hello,
In a recent post Nicolas discussed some limitation of pseudo-random number generation. On a related note there’s a feature of random variables that I find close to mystical.
In an on-going work with Alex Thiery, we had to precisely define the notion of randomized algorithms at some point, and we essentially followed Keane and O’Brien [1994] (as it happens there’s an article today on arXiv that also is related, maybe, or not). The difficulty comes with the randomness. We can think of a deterministic algorithm as a good old function mapping an input space to an output space, but a random algorithm adds some randomness over a deterministic scheme (in an accept-reject step for instance, or a random stopping criterion), so that given fixed inputs the output might still vary. One way to formalise it consists in defining the algorithm as a deterministic function of inputs and of a source of randomness; that randomness is represented by a single random variable $U$ e.g. following an uniform distribution.
The funny, mystical and disturbing thing is that a single uniform random variable is enough to represent an infinity of them. It sounds like an excerpt of the Vedas, doesn’t it? To see this, write a single uniform realization in binary representation. That is, for $U \in [0,1]$ write
$U = \sum_{k> 0} b_k 2^{-k}$
with $b_k = \mbox{floor}(2^k U) \mbox{ mod } 2$. The binary representation is $b_1b_2b_3b_4b_5\ldots$
Realization of an uniform random variable in binary representation
Now it’s easy to see that these zeros and ones are distributed as independent Bernoulli variables. Now we put these digits in a particular position, as follows.
Same zeros and ones ordered in a triangle of increasing size
If we take each column or each row from the grid above, they’re independent and they’re also binary representations of uniform random variables – you could also consider diagonals or more funky patterns. You could say that the random variable contains an infinity of independent clones.
This property actually sounds dangerous now, come to think of it. I think it was always well-known but people might not have made the link with Star Wars. In the end I’m happy to stick with harmless pseudo-random numbers, for safety reasons. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 5, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7242109775543213, "perplexity": 698.1391101437534}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-23/segments/1405997894931.59/warc/CC-MAIN-20140722025814-00038-ip-10-33-131-23.ec2.internal.warc.gz"} |
https://www.futurelearn.com/courses/precalculus/0/steps/32336 | 1.12
## Precalculus
Skip to 0 minutes and 10 secondsWhen last we met, we had defined real numbers to be distances measured along the real axis, this infinite horizontal line where we've placed a 0, and then other numbers. For example, a number x on this line corresponds to the distance between 0 and x. Of course, numbers to the right are positive and have to be written with a plus sign. Those to the left are negative. Now, consider two real numbers, a and b. Terminology, we write a less than or equal b, if a is to the left of b on the real line, as these two numbers, for example, illustrate. We write a less than b, not less than or equal, when a is strictly to the left of b.
Skip to 1 minute and 5 secondsNotice that these two inequality symbols can be used in the other order as well, and they retain the meaning that they had, of course. Terminology, we say that x is positive if it's greater or equal 0, so to the right of 0 on the line. And we say x is strictly positive if x is strictly greater than 0. The real numbers admit a complete arithmetic system that I'm briefly going to describe here. I'm going to describe it in symmetric terms with regards to addition and multiplication, which are the two main operations that we perform on real numbers. For addition, we have something called the associative law.
Skip to 1 minute and 49 secondsThis means, as you see, that the result of adding three numbers, for example, is the same whether you add the first two first and then the third, or the second and the third then added to the first. And the same way for associative law. There's also a commutative law. This says that the order doesn't matter. So for example, the product ab is the same as the product ba. There is an identity element for both operations. For the case of addition, the identity element is 0, a plus 0 equals a, whereas for multiplication, it's the number 1 that plays this role. There's also a way to cancel out these operations. You cancel out an element by adding to it minus a.
Skip to 2 minutes and 35 secondsYou get 0. You cancel out in the sense that you come back to the identity element a by multiplying it by 1 over a, its reciprocal. Notice though that in this last law, you have to exclude the possibility a equals 0 because division by 0 is not defined. Another important arithmetic law is called the distributive law. It says that a times a sum can be broken down in the indicated way as a times each of the two terms added up. And finally, the vanishing of a product. If the product of two numbers equals 0, then one of them must be 0, or both, possibly.
Skip to 3 minutes and 18 secondsSo let us take two numbers, a and b on the real line, and ask you the following question. Where do you think the number a plus b over 2 sits on the real line? Answer? Right in the middle between a and b. A plus b over 2 is the average, also called the mean of the numbers a and b. It's halfway between a and b. Now let's look at intervals. Again, more terminology, more notation, but important.
Skip to 3 minutes and 51 secondsGiven, again, two numbers, a and b with a less than b, the interval ab-- you notice I've used brackets here around a and b-- is defined to be the set of all numbers-- I also think of numbers as points since we're on the line-- between a and b including a and b themselves. Now, the set ab is called the closed interval. And you see that it's given by the red segment that I've indicated on the diagram. If you don't wish to include a and b in the interval, then we obtain the open interval. And it's denoted by ab, but with the brackets turned the wrong way, so to speak.
Skip to 4 minutes and 33 secondsNow, I have to point out that there is a big division in the world between those who write open intervals the way I've just indicated, and those who write open intervals using parentheses around the a and the b. As long as we know what we're doing, either notation, of course, is fine. Now, there are also, of course, half open, half closed intervals, as I've indicated here. And they have their evident meaning. As for unbounded intervals, it requires us to introduce the symbol infinity.
Skip to 5 minutes and 4 secondsThe interval a infinity or plus infinity means the unbounded interval consisting of all real numbers to the right of a, all the way up to infinity, and including a itself since the bracket is turned the way it is. Similarly, minus infinity a is the set of all real numbers to the left of a, including a itself. Now, if a set of real numbers is called a, then the complement of a means the set of all those numbers that are not in a, notation a with a upper c on the right-hand side, c for complement, of course. Thus, the complement of a in another notation is the set difference r delete a.
Skip to 5 minutes and 52 secondsTo give a quick example, the complement of the interval a plus infinity is the interval minus infinity a. But notice that the a is not included in the complement. That's why the bracket is turned the way it is. Terminology and facts now about the inequality relationship, basic arithmetic. A is less than or equal to itself. That's called the reflexive law. A, the inequality relationship is anti-symmetric. That is, if a is less than or equal to b, and vice versa, then a and b must coincide. A third law is transitivity. If a is less than or equal b, and in turn, b is less than or equal c, then it follows that a is less than or equal to c.
Skip to 6 minutes and 39 secondsWhat about the compatibility of inequality where there are two operations of addition and multiplication? Well, this first law says that if you have two inequalities in the same direction, then you can add them side by side, and you get a plus c is less than or equal b plus d. So you can add inequalities. The second observation is that you can add the identical number to each side of an inequality, and that preserves the inequality. And a third law here says that if you have a positive number c, then you can multiply the inequality across by c, and it remains true. It is preserved. Now I must warn you about something though.
Skip to 7 minutes and 23 secondsIt's a mistake one commonly sees in the early days of this sort of course. What happens if you multiply across our inequality by a negative number? So, if c is a negative number, and a is less than or equal b, what does that tell me about ac and bc? Answer? It tells me the reverse inequality. That is, the inequality has actually been reversed. It's easy to see on an example how this can happen and why it should happen. Here are two numbers, a and b. As you see, a is less than b because it's on the left. If you now multiply by 2, where does 2b appear? Answer? Even more to the right. Where does 2a appear? Answer?
Skip to 8 minutes and 7 secondsEven more to the left. And as you can see, the inequality is preserved. 2a is less than 2b. However, if you take negatives, what happens? Where is minus 2b? Well, it's over here. And where is minus 2a? It's over there. And now you see that the inequality is reversed.
Skip to 8 minutes and 27 secondsNow, the study of real numbers will be continued in the next segment when we look at absolute value.
# Real numbers
Arithmetic, intervals, means (average), complements, inequalities | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8616966605186462, "perplexity": 234.47282020756776}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-35/segments/1566027316549.78/warc/CC-MAIN-20190821220456-20190822002456-00293.warc.gz"} |
http://www.msri.org/workshops/205/schedules/1268 | # Mathematical Sciences Research Institute
Home » Workshop » Schedules » Feynman path integral for an inverse problem
# Feynman path integral for an inverse problem
## The Feynman Integral Along with Related Topics and Applications December 09, 2002 - December 12, 2002
December 09, 2002 (11:00 AM PST - 12:00 PM PST)
Speaker(s): Brian DeFacio
Location: MSRI: Simons Auditorium
Video
The Speaker(s) declined to post the Video on the Web.
Abstract No Abstract Uploaded
Supplements No Notes/Supplements Uploaded | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9143165349960327, "perplexity": 4024.5375429941523}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-41/segments/1410657124356.76/warc/CC-MAIN-20140914011204-00307-ip-10-196-40-205.us-west-1.compute.internal.warc.gz"} |
https://codegolf.stackexchange.com/questions/102370/add-a-language-to-a-polyglot/124702 | # Add a language to a polyglot
This is an challenge in which each answer builds on the previous answer. I recommend sorting the thread by "oldest" in order to be sure about the order in which the posts are made.
Note: This has become quite a long-lasting challenge, and posting new answers is fairly difficult. As such, there's now a chat room available for this challenge, in case you want advice on a particular part of a potential answer, have ideas for languages that could be added, or the like. Feel free to drop in if you have anything to ask or say!
The nth program to be submitted must run in n different languages; specifically, all the languages added in previous programs to be submitted, plus one more. The program must output 1 when run in the first language used in answers to this question, 2 when run in the second language, and so on. For example, the first answer could print 1 when run in Python 3, and the second answer could output 1 when run in Python 3 and 2 when run in JavaScript; in this case, the third answer would have to output 1 when run in Python 3, 2 when run in JavaScript, and 3 when run in some other language.
• Your program must run without erroring out or crashing. Warnings (and other stderr output) are acceptable, but the program must exit normally (e.g. by running off the end of the program, or via a command such as exit that performs normal program termination).
• The output must be only the integer, but trailing newlines are OK. Other unavoidable stdout output is also allowed. Examples: interpreter name and version in Befunge-93, space after printed string in Zephyr. Some languages provide two methods of printing – with and without trailing space; in this case method without trailing space must be used.
• Each answer must be no more than 20% or 20 bytes (whichever is larger) longer than the previous answer. (This is to prevent the use of languages like Lenguage spamming up the thread, and to encourage at least a minor amount of golfing.)
• Using different versions of the same language is allowed (although obviously they'll have to print different numbers, so you'll need to fit a version check into the polyglot). However, you may not use a language feature that returns the language's version number. Repeating the exact same language is, obviously, impossible (as the program would have to deterministically print one of two different numbers).
• Tricks like excessive comment abuse, despite being banned in some polyglot competitions, are just fine here.
• You don't have to use the previous answers as a guide to writing your own (you can rewrite the whole program if you like, as long as it complies with the spec); however, basing your answer mostly on a previous answer is allowed and probably the easiest way to make a solution.
• You cannot submit two answers in a row. Let someone else post in between. This rule applies until victory condition is met.
• As this challenge requires other competitors to post in the same languages you are, you can only use languages with a free implementation (much as though this were a contest).
• In the case where a language has more than one interpreter, you can pick any interpreter for any given language so long as all programs which are meant to run successfully in that language do so in that interpreter. (In other words, if a program works in more than one interpreter, future posts can pick either of those interpreters, rather than a post "locking in" a particular choice of interpreter for a language.)
• This challenge now uses the new PPCG rules about language choice: you can use a language, or a language interpreter, even if it's newer than the question. However, you may not use a language/interpreter that's newer than the question if a) the language was designed for the purpose of polyglotting or b) the language was inspired by this question. (So newly designed practical programming languages are almost certainly going to be OK, as are unrelated esolangs, but things like A Pear Tree, which was inspired by this question, are banned.) Note that this doesn't change the validity of languages designed for polyglotting that are older than this question.
• Note that the victory condition (see below) is designed so that breaking the chain (i.e. making it impossible for anyone else to answer after you via the use of a language that is hard to polyglot with further languages) will disqualify you from winning. The aim is to keep going as long as we can, and if you want to win, you'll have to respect that.
As all the answers depend on each other, having a consistent answer format is going to be helpful. I recommend formatting your answer something like this (this is an example for the second link in the chain):
# 2. JavaScript, 40 bytes
(program goes here)
This program prints 1 in Python 3, and 2 in JavaScript.
(if you want to explain the program, the polyglotting techniques, etc., place them here)
# Victory condition
Once there have been no new answers for 14 days, the winner will be whoever posted the second newest answer, i.e. the largest polyglot that's been proven not to have broken the chain. Extending the chain after that is still very welcome, though!
The winner is Chance, see answer 194 (TemplAt).
# Language list
// This snippet is based on the snippet from hello world thread https://codegolf.stackexchange.com/questions/55422/hello-world
// It was tested only in Google Chrome
// https://stackoverflow.com/a/4673436
if (!String.prototype.format) {
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, (match, number) => (typeof args[number] != 'undefined' ? args[number] : match) );
};
}
var QUESTION_ID = 102370; // from the question url
return "https://api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}
jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function (data) {
if (data.has_more) { $('#status').text($('#status').text() + '.'); getAnswers(); }
else process();
},
// [Documentation](http://api.jquery.com/jquery.ajax/) states that error handler is not called for cross-domain JSONP requests,
// but it works here, probably because api.stackexchange.com and codegolf.stackexchange.com are on the same domain.
error: function (a,b,c) {
$('#status').text( "Failed to load answers: " + b + " " + c ); console.log( b + " " + c ); }, }); } getAnswers(); // https://stackoverflow.com/questions/6290442/html-input-type-text-onchange-event-not-working/39834997#39834997 // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event const input = document.querySelector('input'); input.addEventListener('input', onSearchInput); function onSearchInput(e) { var table = document.getElementsByTagName("table")[0]; var str = e.srcElement.value.toLowerCase(); var num_results = 0; if(str == "") // optimization for empty input { // show all rows for(var i = 1, row; row = table.rows[i]; i++) { row.className = ""; num_results++; } } else { for(var i = 1, row; row = table.rows[i]; i++) { var hidden = row.innerText.toLowerCase().indexOf(str) == -1; if(!hidden) num_results++; row.className = hidden ? "hidden" : ""; } } document.getElementById("results").innerText = "Results: " + num_results; } /* Function ParseHeader() extracts answer number, language name and size of polyglot from answer header. Argument: header - answer header string without markup, eg. "1. Python 3 (8 bytes)" or "59. Tcl, 1324 bytes". Retval: object, eg. {num: 1, language: "Python 3", size: 8} or null if header has wrong format There are two formats of header, new one with comma and old one with parens. Parsing new format only with regexp is hard because: - language name may contain commas, eg. "51. Assembly (x64, Linux, AS), 1086 bytes" - there may be several sizes, of which the last one should be used, eg. "210. Haskell without MonomorphismRestriction, 10035 9977 bytes" There are only several answers with old format header: 1-5, 7, 12-17, 21. All of them have single size and don't have parens in language name, so they can be parsed with simple regexp. Algorithm: Find commas. If there are no commas parse it as old format. Otherwise parse it as new format. New format parsing: Let everything after last comma be sizes. Check if sizes ends with the word "bytes". If not, set size to 0. Take the word before "bytes" and convert it to number. Parse the rest of the header (before last comma) with regexp. */ function ParseHeader(header) { var a = header.split(','); if(a.length > 1) // current format: Number "." Language "," Size+ "bytes" { // filter(s=>s) removes empty strings from array (handle multiple consecutive spaces) var sizes = a[a.length-1].split(" ").filter(s=>s); // " 123 100 bytes " -> ["123", "100", "bytes"] var size; if(sizes.length < 2 || sizes[sizes.length-1] != "bytes") size = 0; else size = +sizes[sizes.length-2]; a.splice(a.length-1,1); // remove last element var match = a.join(',').match(/(\d*)\.(.*)/); if (!match) return null; return{ num: +match[1], language: match[2].trim(), size: size, }; } else // old format: Number "." Language "(" Size "bytes" ")" { var format = /(\d*)\.([^(]*)$$(\d*)\s*bytes$$/; var match = header.match(format); if (!match) return null; return{ num: +match[1], language: match[2].trim(), size: +match[3] }; } } // 1533246057 (number of seconds since UTC 00:00 1 Jan 1970) -> "Aug 2 '18" // other useful Date functions: toUTCString, getUTCDate, getUTCMonth, getUTCFullYear function FormatDate(n) { var date = new Date(n*1000); // takes milliseconds var md = date.toLocaleDateString("en-US", {timeZone:"UTC", day:"numeric", month:"short"}); var y = date.toLocaleDateString("en-US", {timeZone:"UTC", year:"2-digit"}); return md + " '" + y; } var processed = []; // processed answers, it's called valid in original snippet function ProcessAnswer(a) { var body = a.body, header; // // Extract header from answer body. // Try find <h1> header (markdown #). If not found try find <h2> (markdown ##). // Extracted header contains only text, all markup is stripped. // For 99 language markup is later readded to language name because markup is essential for it. // var el = document.createElement('html'); // dummy element used for finding header el.innerHTML = body; var headers = el.getElementsByTagName('h1'); if(headers.length != 0) header = headers[0].innerText; else { headers = el.getElementsByTagName('h2'); if(headers.length != 0) header = headers[0].innerText; else { console.log(body); return; } // error: <h1> and <h2> not found } var info = ParseHeader(header) if(!info) { console.log(body); return; } // error: unrecognised header format if(info.num == 99 && info.language == "99") info.language = "<i>99</i>"; processed.push({ num: info.num, language: info.language, size: info.size, answer_link: a.share_link, user: a.owner.display_name, user_link: a.owner.link, // undefined if user was deleted creation_date: a.creation_date, // unix epoch (number of seconds since UTC 00:00 1 Jan 1970) }); } function process() {$('#status').remove();
processed.sort( (a,b)=>(a.num-b.num) ); // sort by answer number, ascending
processed.forEach(function (a) {
var date = FormatDate(a.creation_date);
var user = a.user_link ? ('<a href="'+a.user_link+'">'+a.user+'</a>') : a.user; // redundant code, currently the only deleted user is ais523
if(user == "user62131") user = '<a href="https://chat.stackexchange.com/users/246227/ais523">ais523</a>';
var style = (a.num == 194) ? "background: #ccf" : ""; // 194 is winner answer
var row = "<tr style='{0}'><td>{1}</td> <td><a href='{2}'>{3}</a></td> <td>{4}</td> <td>{5}</td> <td>{6}</td></tr>"
('#answers').append( row ); }); } a {text-decoration:none} a:visited {color:#00e} table, td, th { border: 1px solid black; } td, th { padding-left: 5px; padding-right: 5px; white-space: nowrap; } tr:hover { background-color: #ff9; } td:first-child { text-align:center; } /* # */ td:nth-child(4) { font-style:italic; } /* author */ td:nth-child(5) { text-align:right; } /* date */ p { margin: 8px 0px } .hidden { display: none } /* search hides rows */ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <p> <span>Search: </span><input autofocus> <span id="results"></span> </p> <table class="answer-list"> <thead> <tr><th>#</th> <th>Language</th> <th>Size (bytes)</th> <th>Author</th> <th>Date</th></tr> </thead> <tbody id="answers"> </tbody> </table> <div id="status">Loading answers...</div> • For people who can see deleted posts: the Sandbox post was here. – user62131 Dec 6 '16 at 19:00 • There's no need to copy the previous program, although of course you can use it as a guide; redoing the program from scratch is likely to take longer! There's no need to permalink to answers; sorting by oldest will show all the answers in order already. – user62131 Dec 6 '16 at 19:44 • @ais523 I think what was meant was that should new answers contain try it links with the new code? – Blue Dec 6 '16 at 19:45 • I think we need a script that takes a hex dump of the code and automatically runs it in all the languages... – mbomb007 Dec 7 '16 at 20:05 • This is the Versatile integer printer posted as a different type of challenge. (Inspiration?) The final answer (currently) would score 0.0127, only beaten by Sp3000's 30 language submission... :) – Stewie Griffin Dec 17 '16 at 12:11 ## 300 Answers # 67. C11, 1674 bytes #16 "(}o+?23!@)-("//*\Dv;'[af2.q]PkPPX'#CO)"14";n4 #/*0|7//" [-'v][!(>77*,;68*,@;'1,@10␉␉11)(22)S␉␉(1 P''53'S^'q #>␉ # 36!@␉ # #_>++++.>.+?+++++::@ #< #<]}} +<[<.>>-]>[ #{ #z} # #=x<R+++++[D>+++++++59xL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][ # #x4O6O@ #x%+>+=ttt Z_*. #D>xU/-<+++L #R+.----\).>]| #[#[(?2?20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_00) [ "]56p26q[puts 59][exit]" ,'\[' ];#/s\\/;print"24";exit}}__DATA__/ # ###x<+@+-@@@@=>+<@@@=>+<?#d>+.--.
#
'((( p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A )echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f2")and 9or 13)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>){(<{}(({}){})>)}{}({}())wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWW li ha '#}#( prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"'
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
=begin
<>{nd
#sseeeemPaeueewuuweeeeeeeeeeCis:ajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define u8 "38\0"
#define p sizeof'p'-1?u8"67":"37"
#include<stdio.h>
main ( ){puts( p);}/*
print 61
#}
disp 49;
#{
}<>
$'main'3 #-3o4o#$$#<T>"3"O.s =end """#" #} #sx|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi ax fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm # sss8␛dggi2␛|// ''25 16*///~-<~-<~-<<<~-XCOprint("65")#s^_^_2229996# VIP score (Versatile Integer Printer): .005565 (to improve, next entry should be no more than 1749 bytes) Try it online! ## Numbers This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11 ## Verification Most languages can be tested with the test driver above, but 6 languages have to be tested manually: • Reng (#19) online. • Modular SNUSP (#31) online. • Incident (#33) local. • Deadfish~ (#48) local. Run like this: deadfish.py < polyglot. Prints a bunch of >> lines, but that's an unavoidable consequence of running any Deadfish~ program, so it's okay. • Moorhens (#60) local. Note that moorhens.py from master branch doesn't work. • Surface (#66) local. ## Explanation ### Adding C11 I am using the trick with utf-8 literals (introduced in C11). #define u8 "C99\0" puts(u8"C11"); This trick can also be used to distinguish C++11 from C++03. Cubix and Retina broke as a result. ### Cubix Cube size 16 -> 17. Moved 4O6O@ further in file, it ended up on line 13 (#x%+>+=ttt Z_*.), which broke fission, cardinal and minimal-2d. So I placed 4O6O@ on a separate line instead and padded it with #x. ### Retina I ended up adding 2 lines (#define u8 "38\0" and #x4O6O@), so total line count remained odd, which is good for retina. But retina still didn't work. So I moved empty line around to fix it (line 20 in answer 66). This empty line ended up before #x4O6O@. Thutu broke, so I added # to that line. ### Surface Surface still prints NULL character before 66, I didn't fix it. (It is fixed in the next answer.) • Given that #38’s C has so far been tested with bash run-wrapper.sh gcc -o polyglot polyglot.blah.c, I would prefer to define #38 as the C11 answer, and #67 as the C99 answer, but that is trivial. Nice Addition! – Chance Jun 5 '17 at 15:56 • I thought surface printed a null character, but when I run it on my machine I don't seem to get it in my output. How are you running surface? – Wheat Wizard Jun 5 '17 at 16:28 • @WheatWizard I run surface.exe on my Windows 7 32-bit machine. In console window I see blank space before 66 (NULL char is displayed exactly like a space char). If I redirect output to a file I can see it in hex viewer: ...0D 0D 0A 00 36 36 │ 0D 0D 0A 0D 0D... (newlines and other text are added by interpreter). Also, python program print("\x00\x01") produces exactly the same output (minus newlines and interpreter text) as surface program .+.@ - a blank space followed by a smiley face (char \1). – stasoid Jun 5 '17 at 19:15 • @stasoid Hm, I'll investigate perhaps it is a difference between running on windows and using Wine. I may have also made a mistake. I did run it through a hex editor but I might have missed it. – Wheat Wizard Jun 5 '17 at 19:39 # 7. Japt (50 bytes) #v;7||"<++++<;n4 #>3N. print('1'if 1/2else'5') #i2 Man, it was fun to fit Japt in there. Hopefully it didn't kill anyone's plans... Test it online! This program prints 1 in Python 3, 2 in V, 3 in Minkolang v0.15, 4 in ><>, 5 in Python 2, 6 in SMBF and 7 in Japt How this works: #v; takes the char code of v, or 118. Then 7|| returns the logical OR of 7 and the rest of the code, which is wrapped in a string with " to avoid any syntax errors. The result, 7, is automatically sent to STDOUT. For future polyglotters, " can be changed to at no penalty to the Japt program (though I'm not sure about the others). • More on Japt is in answer 58. – stasoid Jan 26 at 13:18 # 8. Retina, 70 bytes #v;7||"<+0+0+0+<;n4 #>3N. #|\w* #8 #| #M print('1'if 1/2else'5') #i2 Try it online This program prints 1 in Python 3, 2 in V, 3 in Minkolang v0.15, 4 in ><>, 5 in Python 2, 6 in SMBF, and 7 in Japt. Screw creating hyperlinks to interpreters. That's going to take way too much time. It's up to the poster and anyone creating new answers to test it yourself. Explanation: #v;7||"<+0+0+0+<;n4 # replace every empty string with "#>3N." #>3N. #|\w* # replace words chars with "#8" #8 #| # remove all "#". The "|" is something I could've golfed off. #M # match all places between characters (finds 8) print('1'if 1/2else'5') # replace something that won't be found. noop #i2 • This is 2 bytes too long (50 + 20 is 70, 50 + 20% is 60). – user62131 Dec 6 '16 at 20:30 • @ais523 Fixed it. – mbomb007 Dec 6 '16 at 20:36 • Care to provide an explanation? If not, that's ok. – MildlyMilquetoast Dec 7 '16 at 5:41 • @MistahFiggins Sure. Added. – mbomb007 Dec 7 '16 at 14:44 # 14. Turtlèd (135 bytes) #v;2^0;7||"<+0+0+0+<*!2'!1'L#'1r'4;n4 #v0#_q@ #>3N. #|\w* #8 ^1b0< #| #M print ((0 and'13')or(None and 9 or 1/2 and 1 or 5)) #jd5ki2 This prints 1 in Python 3, 2 in Vim, 3 in Minkolang, 4 in <><, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl, 10 in Befunge, 11 in Befunge-98, 12 in Fission, 13 in Ruby and 14 in Turtlèd. First line added #'1r'4 near the end of line, Turtled takes #[string]# as string input then 'X places the value of x on the grid, r moves right 1 space on the grid. The value on the grid is printed at the end of the program implicitly. Try it Online Link to Turtled docs • @Sp3000 - edited and fixed (should be) – Teal pelican Dec 7 '16 at 9:34 • – Teal pelican Dec 7 '16 at 9:48 • hooray! My language is used. Also it has a capital t, unlike brainfuck – Destructible Lemon Dec 8 '16 at 5:26 • @DestructibleWatermelon It's a fun little language for some challenges :) I saw you post a while back and thought I'd pick it up just in case. – Teal pelican Dec 8 '16 at 8:42 # 19. Reng, 152 bytes #v16 "<" 6/b0\ .q@#;n4"14"" #>3N9@15o|R"12"*^*ttt*~++% #=| print((1/2and 9 or 13)-(0and+4)^1<<65>>62);# =#;print(17) # ~nJ< # #gg99ddi2 |1|1+6 I added another #\n so that retina would cooperate. Here's how it works: # redefines v to push 0, the default TOS. Then, it negates the TOS (), pushes 1 and 6, the character of <, pushes 6 again, and mirrors upwards with /, colliding with the other , which negates the 6. Then, it hits the <, pushes J (base 36 for 19), then outputs it as a number, finally terminating (~). Escapes in between 2 and ; and # and g. # 24. Thutu, 211 bytes Fourth try. Hopefully the implementation is uncontroversially valid this time. #v16/"<"6/b.q@"(::)::: (22)S#;n4"14" #>3N6@15o|> ^*ttt*~++~~~% #=~nJ<R"12"; #[ #| print((eval("1\x2f2")and 9 or 13)-(0and+4)^1<<65>>62)#@46(8+9+9+9+9+=!)=#print(17)#3]#echo 21#===2|/=1/24=x=9+/ #8␛dggi2␛ |1|6 ␛ represents a literal ESC character, as usual. As far as I know, there isn't a Thutu implementation that works in a browser yet. I used the implementation in the Esoteric Files Archive, which is a compiler from Thutu to Perl (basically, compile the Thutu into Perl, then run the Perl). Update: Since I wrote that, the language has been added to TIO. So now you can: Try it online! I had to pretty much redo the Hexagony part of the solution. It turns out to be easiest to run the Hexagony code on a diagonal, rather than horizontally: # v 1 6 / " < " 6 / b . q @ " ( : : ) : : : ( 2 2 ) S # ; n 4 " 1 4 " # > 3 N 6 @ 1 5 o | > ^ * t t t * ~ + + ~ ~ ~ % # = ~ n J < R " 1 2 " ; # [ # | p r i n t ( ( e v a l ( " 1 \ x 2 f 2 " ) a n d 9 o r 1 3 ) - ( 0 a n d + 4 ) ^ 1 < < 6 5 > > 6 2 ) # @ 4 6 ( 8 + 9 + 9 + 9 + 9 + = ! ) = # p r i n t ( 1 7 ) # 3 ] # e c h o 2 1 # = = = 2 | / = 1 / 2 4 = x = 9 + / # 8 ␛ d g g i 2 ␛ | 1 | 6 . . . . . . . . . . . . . . . . . . . . . . The bold font doesn't show up that well for me, but nonetheless, I've boldened the route that the IP takes. There's only one IP used, this time, and it hardly runs any commands. The program starts by pushing some junk to the memory edge, then replacing its value with the sum of the memory edges to either side (which still have their initial value of 0), thus resetting memory to all-zeroes. Then we can just do 23!@ to print 23 and exit. Thutu doesn't like blank lines. As such, I had to replace Retina's blank line (which matches anything) with #| (which also matches anything). Thutu also cares a lot about slashes; they're the main syntactical element of the language. Luckily, # at the start of a line is a comment in Thutu, so we only have one line to worry about. However, # inside a line is not a comment, so the big long line is something of a concern. As such, I had to hide the slash from Thutu by placing it inside an eval. Luckily, both versions of Python, Perl, and Ruby all have an eval, and will all unescape \x2F into / inside a string delimited by ". Unfortunately, the use of " makes the code live in Pyth, and can easily cause syntax errors (e.g. eval("1\x2F2") is a syntax error), but we can use a lowercase \x2f and Pyth will be OK with that, at least syntax-wise (it's in a part of the code that never runs, so we don't have to worry about what it actually does). Thutu interprets most of the big long line (up to the first slash) as a regular expression. As such, the Prelude code was causing problems, as +++ is too much quantification. However, it was fairly easy to fix that by re-associating the uses of +. So how does the Thutu work? Most of the code is a comment, with only one line of code. Thutu's kind-of like Retina; it works by repeatedly regexing a working space. Initially, the input is =1. We first check to see if it matches the regex print(( … ===2| (it does, because most (all)? regexes ending with | will match anything). Then we replace one occurrence of =1 with 24=x=9+. At the end of each cycle, the Thutu implementation will output everything before =x (i.e. 24), exit (due to the presence of =9), and keep the + (which we don't care about) for the next cycle (which doesn't exist). In terms of places where code can be added, the main offender is Hexagony, which is incredibly fragile in the current case. As such, I suspect that the last line is currently the easiest place to add code if you don't want to redo a large amount of work. The 6 at the end is used for SMBF, but the |1| is used only by Retina, which can cope with any other regex there that's matched a lot of times, and Vim; a few 2D languages will pass over the line but will consider most characters fairly harmless. Before the first ESC is touched even less, with only Retina caring (although if you go too far right, you'll affect some 2D languages, like before). Note that there's a limit to how long the code there can be, because if the Hexagony side length gets thrown off, everything will break. If you're willing to redo the Hexagony, the long line is still a good place to add code, although slightly worse than before. The ===2 is purely Hexagony, and will hardly be seen by other languages (although Thutu wants it to be a valid regexp, Prelude doesn't want parentheses or exclamation marks, SMBF doesn't want periods or mismatched brackets). Earlier in the line (the #@) is also a safe place to add code so long as you're careful with Thutu and SMBF, and redo the Hexagony; you may need to add a 0 or two at the end of your code to prevent it confusing the Prelude code later. Finally, if you're prepared to dodge the 2D languages, the #| line is pretty much entirely free, with only Retina and the occasional wild two-dimensional instruction pointer causing problems. # 32. Whirl, 388 bytes ## Program #v16/"<"6/b.q@"(: ::T): ␉␉␉␉ :(22)S#;n4"14" #>3N6@15o|>␉^*ttt*~++~~~% #=~nJ<R"12"; ␉ #[␉00011000001111000010000010000011000000000000000001100011111100 #<| print((eval("1\x2f2")and (9)or(13))-(0and 4)^(1)<<(65)>>62)or'(\{(\{})(\{}[()])}\{})(\{}\{})'#46(8+9+9+9+9+=!)=#print(17)#]#echo 21#|/=1/24=x=9[<+@+-@@@@=>+<@@@=>+<?#>+.--.]/ #8␛dggi2␛␉ |1|6//''25 #>say␉␉ 27#T222999+/+23!@"26 As usual, ␛ is a literal ESC character and ␉ is a literal tab. ## Rundown This program prints 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification ## Explanation First off, thanks @ais523 for the Polyglot Test Driver! It helped testing tremendously. I'll need help updating it for this solution. Whirl is, well, maybe you should look at this flash representation first. Whirl only reads 1's and 0's and the only performs operations when it reads 2 consecutive 0's. So this is a really easy one to fit in and is unlikely to break on future additions. 1's just spin the dials and singleton 0's switch between the dial being controlled. I debated with myself about going with this solution because it's so byte heavy, but ultimately decided that it would be worked in eventually, since it can fit in so easily, and #32 is the best place for it since round numbers are much easier. In code we're adding up to 2 then multiplying by 2 until we hit the magic number. The long binary looking string could be moved elsewhere if needed in the future, but you may need to rework the solution using the flash program if you lose track of where the dials are pointing, which is very easy to do. Keep in mind that there are 4 1's in code prior to the Whirl string, which are integral to the correct output. Everything after this irrelevant dial spinning, like a DJ that forgot to power the turntables. • I was actually considering Whirl for 31, but that language is a pain to write in (and I wasn't aware of the Flash program), and I also hadn't cottoned on to the fact that 32 would be easier. So you were way ahead of me on this one. (Also, thanks for setting up #33!) – user62131 Jan 17 '17 at 22:48 # 47. Lily, 938 bytes #16 "(}23!@)" 3//v\D(@;'[af2.q]GkGGZ'#)"14";n4 #/* "[!PPP(22)SP(>7 7*,;68*,@;'1,@ ␉␉␉␉ q #>␉ # >36!@␉ #< #<]+<[.>-]>[ #{#z} #=<xR+++++[D>+++++++L+++<-][PLEASE,2<-#2DO,2SUB#1<-#52PLEASE,2SUB#2<-#32DOREADOUT,2DOGIVEUPDO]>+.---.>][ #Rx%>~~~+ +~*ttt*.x #D>xU/-<+++Lnd #R+.----\).>]| #[#[kGkGx@O6O4/0l0v01k1k(0l0i0jx0h0h1d111x0eU0bx0b0o1d0b0e0e00m1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100^_)46(8+9+9+9+9+=!) ###| print( (eval ("1\x2f2")and(9)or(13))-(0and 4)^1<<(65)>>(62))or'({({1})({1}[(0)])}{1}\{1})'#}#(prin 45)(bye)|/=1/24=x<+@+-@@@@=>+<@@@=>+<?#d>+.--./ __DATA__=1#// #.\."12"__* ###;console.log 39 """"#// =begin // #ssseemeePaeueewuuweeeeeeeeeeCisajjapppp/*/ #define z sizeof'c'-1?"38":"37" #include<stdio.h> main( )/*/ #()#\'*/{puts(z );}/*' 'main'// #-3o4o#$$$
#<.>"3"O.
=end #//
"""#"#//
#|o51~nJ;#:p'34'\
#ss8␛dggi2␛ |1|6$//''25 =#print(17)#>27.say#]#print(47)#]#echo 21#ss*///^_^_Z222999"26 ␉ is a literal tab, ␛ a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it. Try it online! VIP score): .009034 (to improve, next entry should be no more than 999 bytes) ## Rundown This program prints 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainf***, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Most of the languages are tested by the test driver shown above. Reng can be tested to output 19 here. I’m not positive this doesn’t have an error, if someone could verify…? Modular SNUSP can be tested to output 31 here. Cubix’s cube shape viewed here Incident is checked by keeping the tokens balanced as described in previous answers. ## VIP I’m happy to announce that with the addition of Lily today, we officially have the lowest VIP score of all time. And so, I do hereby proclaim that this polyglot, at the time of writing, to be unequivocally the greatest polyglot of all time. Congratulations to all contributors. Because we’ve finally achieved this self-imposed goal, and because I ended up touching code for damn near all the languages this round, I’ve added a small code snippet from each language along with the code change description. The purpose of these is to provide a place to search for code snippets from the polyglot for research starting point. For example, if you want to make a change to this 8+9+9+9+9+ you could search for this string, to find that it’s part of Prelude’s code. Then, you may wish to read over the original prelude answer, look at some prelude code changes that have been made, or review the Prelude documentation for alternative solutions. ## State of the Test Driver I copied @SnoringFrog’s Alphuck Transpiler into the Test Driver for viewing the Alphuck code’s in the BrainF*** character set. I found it much easier to debug this way, and I suspect others would as well. I also added titles to the Extra Information outputs since Alphick’s output is easy to confuse with BF if you’re not familiar with the Bash script. ## Lily ]#print(47)# Nim, we know from this polyglot, uses #[ and ]# for block comments and according to this tip for creating polyglots, Lily uses the same syntax for block comments. So, I wondered if I could find a truthy/falsey abuse to create different outputs, but alas I could not. Then while browsing Rosettscode.org for unused block comment structures, I came to this post about Nim, and realized it was wrong in its assertion that Nim only has single-line comments. Then I checked Lily’s post and it too failed to mention block comments. (Sadly, I did not have permission to edit the posts.) Then I went ahead and looked at Nim and Lily’s documentation, just to make sure I wasn’t crazy and I saw an exploitable difference. Nim allows nested comments. I sat on this knowledge for months, thinking it would be my final addition to the polyglot because it was virtually guaranteed to be available at any time considering its block comment structure was already included, and because it was so under documented. Over the months, it occurred to me that abusing nested block comments is not a trick that’s not documented in the Tips for Creating Polyglot thread, so I added it. My explanation used a simplified Lily/Nim polyglot as an example, so I’ll refer you to that post if it’s not obvious how I abused this language feature. ## CoffeeScript ###;console.log 39 One of Lily’s features is that ### is used to attach a docstring to a function, so if you use this without following it with what Lily views as a function, then Lily will error out. And since ### is CoffeeScript’s block comment, the ### on the INTERCAL line had to change. So the final two # got cut from this line and moved to the line after Lily’s #[ block comment so Lily would view it as a comment instead of a doc string. ## Julia =#print(17)# By moving the two ## for CoffeeScript, a hole was opened up on the INTERCAL line. The spacing on this line is delicate because Minimal-2D is looping between the beginning of this line and the line two below. So I had to fill the space. The first byte I filled with Julia’s initial block comment command (#=) by moving the = down to fill the space. This move also helped as a partial solve for Labrynth’s final answer, which I talk about later. ## BrainF*** +++++[D>+++++++L+++<-] >+.---.> The second space opened up by the CoffeeScript move still needed to be filled, and the > at the end of the line above was an easy move. This character set up the proper memory cell for BF so it just needed to go anywhere in the correct order of BF characters, and since there were no BF characters between the old and new location, no problem. ## Brain-Flack ({({1})({1}[(0)])}{1}\{1}) In the process of working a different solution, I had an epiphany about old this Brain-Flak code: (\{(\{})(\{}[()])}\{}\{}\{}). I was using \ to escape out { for Japt, but I could put a 1 in each curly brace, to give Japt something to do like I did in the PicoLisp answer. But what would that give me? Trading a \ for any other instruction was at best an even byte swap. But wait… Retina. Retina had a string of 1s in the same line that were somehow integral to its answer. So I tried moving the 1s over to Brain-Flak’s code to handle Japt and it worked almost entirely. Thutu, didn’t like having the last \ removed from this snippet, so I left it. I had one fewer 1 in Retina’s code than I required to fill Japt’s braces anyways, so it all worked out rather swimmingly to golf down 5 bytes and produce this: ({({1})({1}[(1)])}{1}\{}). Later I found I had to swap around 1s because The above tokenized {1} for Incident. So I swapped around the 1s to make ({({1})({1}[(0)])}{1}\{1}). ## Modular SNUSP <$+@+-@@@@=>+<@@@=>+<?#>+.--.
While I was looking at the big line, I decided to look at some other languages. Modular SNUSP is encased in a pair of [], to protect the code from SM/BF. But SM/BF were both already jumping this code because of the [ on line 14. Cut.
## Thutu
|/=1/24=x
I never bothered to learn how Thutu works, but I do know that it’s answer was somehow produced in part by |=/=1/24=x=9, so I experimentally, removed various characters and verified that the same results were produced, and found I could get there with less. Golfed!
## INTERCAL
[PLEASE,2<-#2DO,2SUB#1<-#52PLEASE,2SUB#2<-#32DOREADOUT,2DOGIVE]
I swapped some Latin FACs for English DOs because it was byte saving, and all the Ds worked safely as Fusion starting points with INTERCAL’s new location.
## Hexagony
"(}23!@)"
Here’s where things got messy. I got it in my head that Hexagony’s code module should really, really go inside C/++’s preprocessor directive on line 1. The benefit here is that Hexagony would be permanently be solved because its pointer always starts on line 1 heading to the right, which puts its output command prior to any hexagon wrapping non-sense. And with Cubix in the mix now, providing basically the same headache… Well let’s just do this with 1 language, yeah?
So }23!@ appears in line 1 now, and everything that follows is a consequence of that move. Note that the } is still needed to clear the top value of the stack due to the preceding ( in the final solution.
## Pyth
#16
;'[af2.q]
The first problem was moving Pyth’s answer to somewhere else. I spent quite a while looking through Pyth’s documentation for a way to pop the string off the stack or something, before stumbling into the answer. For Pyth, a space preceding any command causes the command to be skipped. This actually works for a full string, like where our Hexagony capsule is residing, so the first x characters of the polyglot became #16 "}23!@", with the 16 here now being Pyth’s answer.
(22)S
Underload needed the Hexagony capsule to exist within a pair of parenthesis, but if too much of the polyglot went into that first set of parentheses Underload would bomb out. Also, our last few solutions had an open ended ( on line 1, which was preceded by a \ for Retina to escape it out of consideration. (Retina didn’t like the imbalanced ().) But now, this solution didn’t work for Retina if there was already a pair of () in the line. The new solution opens and closes 2 sets of parenthesis on line 1 to get around these problems. Fortunately Underload didn’t complain before a new set of parenthesis could be opened on line 2.
Meanwhile, inserting more text in line 1 prior to the v causes line 2 to require a bunch of filler characters prior to its >, which is the Befunge code path. The largest piece of lose code that could fill the hole was Underloads answer statement (22)S which got moved earlier in line 2 along with some related Alphuck Ps that needed to appear prior to s’s for its jump. (More on Alphuck later.)
## Trigger
GkGGZ
Z222999
Trigger’s jump code got pushed out of line 2 by Underload’s shift, so it had to go somewhere and the earlier the better. The Japt string '[af2.q]’ in line 1 turned out to be a well-hidden location, so I plopped Trigger jump code there after Pyth quit, making '[af2.q] GkGGZ’.
You may notice that the letters in the jump code got changed again, this is partly because I wanted to leverage the space for a polyglot unique Incident jump token, and partly because of a problem caused by… wait never mind. I just uppercased the Gs for no good reason. Ok, whatever.
## SMBF
<]+<[.>-]>[
With characters spaces to fill prior to the > on line 2, I moved the [ back in the line to help fill the hole. You might think as I did that it might be possible to golf off this character all together, as well as the ] on line 1, but this causes Retina to get grumpy, as it did with Underload. And even if you think about throwing a \ prior to [ might fix Retina, you would be right, but it would cause 05AB1E to fail in a way that I presume cannot be fixed with a zero byte budget. So I didn’t bother.
## Turtlèd
#)"14"
I managed a line 1 character order that didn’t necessitate the # # therein. So the turtle no longer pokes his head out of the shell before finding “14”.
## Labrynth
# >36!@
The maze got kinda messed up by all the shifts for Hexagony. The biggest problem was that the old solution relied on the second character in the polyglot being a space (aka maze wall). Now the pointer turns right once it passes into the 1 on line 1, which was a problem because the / on line 2 set the top of the stack to 0, which caused the pointer to really want to go straight.
Trial and error montage
This got solved by putting a > in the path of the pointer after the /, which is an instruction to shift all of row 3 one cell to the right. This puts the pointer in column 3 as it continues its zero valued straight path to the > in >36!@ which again shifts; this time row 4. From this point, the pointer turns to head down line 4 which from that point forward is a 1 way trip to the end of the maze.
@SnoringFrog made a gif of Labrynth's code path to help someone with an answer, and I thought it was cool and helpful enough that it should be added here.
## Japt
|1|6$ I golfed some other bytes off of line 1. It was all trial and error and I have no idea how Japt works for the most part. I guess I can say that in the # near the end of line 1 causes Japt to take the ascii value of the ). Most everything else is a mystery. ## Minimal-2D #=<xR+++++[D>+++++++L #Rx%>~~~+ +~*ttt*.x #D>xU/-<+++Lnd #R+.----\).>]| Part of the line 1 refactor was to place the D early enough in the line to minimize the amount of empty space thrown into line 8, where Minimal 2-D catches the code path From the D to L. I ended up being able to place the \D just after the v in line 1, which ended up being the same column it started in, so I didn’t have to touch line 8. ## Befunge 7 7*,;68*,@ The space between the 7’s on line 2 is a spacing shift for Minimal-2D’s D on line 1 so that Fission doesn’t pass through a character. The 7 that Fission would otherwise pass through here doesn’t actually cause a problems, but the space is part of White space’s answer, so it needs to appear somewhere on the line, and this seemed like a better place than most. ## Befunge-98 >7 7*,;68*,@;'1,@ For some reason the Hexagony capsule gave a problem for Befung-98. I believe it was producing non-deterministic results for a while there. I don’t know what the issue was, because I went back and looked at an old solution for inspiration and saw that there was a @ before it quit in prior solutions, so I tried it and it worked. ## Reticular ;#:p'34'\ Reticular, Haystack, and Reng, which all wrap around the polyglot when they hit the first / on line 1, had to be redone because we’re wrapping on a later column than in previous solutions. Now the code path goes through the 6 on the final line, which gets buried in a stack values for these languages, and continues to the \ on the next to last line which catches the code path, and pushes these languages’ pointers to the left. Reticular was the problem child of the bunch because it had a command in the Hexagony capsule, which it traversed prior to wrapping, that caused the old solution to break on Reng’s code. I solved this by throwing Reticular’s code first in the order. ## Reng ~nJ The ;, which terminated Reticular, gave Reng some problems because it views the command as a reflector. So Reng gets a # jump command to skip past the ;. But Reticular threw an error on the #, so I tossed in a preceding : to indicate that the following # was to be pushed onto the stack as a string. ## Haystack |o51 Haystack’s old solution was too long, unless I was going to wrap up to another line, but I no longer needed to use the old solution because I was terminating Reticular earlier, so I reverted to the old solution of outputting a string rather than ascii values, which was shorter, allowing the 3 languages to exactly fit in one line. ## Minkolang $$ #<.>"3"O. The change to remove the space before the first number in line 1 caused Minkolang to fall through time a in column 4. The upshot of this was I could golf out a bunch of the junk that had to be thrown into Minkolang’s code line because it previously couldn’t start with a #. The . in the final solution is both needed as a placeholder, and to detokenize .>. ## Incident kGkG0l0v0@O6O4/1k1k0l(0i0jx0h0h1d111x0eU0bx0b0o1d0b0e0e00m1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100^_ ^_^_ I think @SnoringFrog, during his week of all-nighters and fantastic code golfing, changed the incident token 0e to 0ee, presumably to make Cubix work. I found I could once again set this token back to 0e to save a few bytes. I also went through the polyglot and re-tokenized any Incident tokens that were littered about. I ended up putting just a few back. One I mentioned is the . in <.>. Another is the ! in [!PPP on line 2. The nd in +Lnd is a detokenizing string as well that I couldn’t otherwise fit into a place holding gap. ## PicoLisp }#(prin 45)(bye) The location of PicoLisp’s instructions became kind of a problem because Prelude’s parenthesis budget got shifted by Underload’s change. So I just moved PicoLisp’s answer. Putting all these parenthesis so close to column 1 was just asking for trouble anyway. Code is now in the Python line, which is safer. ## Alphuck ssseemeePaeueewuuweeeeeeeeeeCisajjapppp This is my first time working with Alphuck and it is surprising how much it doesn’t feel like BrainF***. Just the fact that all the characters show up all the time makes the language much harder to work with. And it’s much more difficult to read. Anyways, the PicoLisp move changed the [] balance (speaking in BF terms) so I had to add back some s’ in the evil line and the last line. ## Prelude 46(8+9+9+9+9+=!) Prelude had all kinds of rearrangements due to the Underload move. But these we’re mostly just the spacing shifts we’ve all become accustomed to. The one large change was to move the ) now seen in #R+.----\).>]| from the end of the line above. To leave it in its old home required too many spaces. Experimentation showed there was a happy home a few columns left of its original spot and the the characters to the left were all rigidly incorporated into the Minimal-2D solution. So the next best move was to go down a line where Minimal-2D was more flexible and Underload was still happy. ## Retina ({({1})({1}[(0)])}{1}\{1}) |1|6 Retina had a small problem with the Prelude move discussed above however. The line change put the hanging ) on a cares-about-symbol-balance line, so preceding \ was thrown in to placate Retina. We were still byte saving from the number of spaces Prelude needed on the line above, so we were good with this result. ## Cubix @O6O4/ While I loved the elegance of the Cubix Placement in the last answer it was fragile, and yeah I broke it with all this stuff I did. So I stepped through the Cubix interpreter to find a good place to catch the code path and ended up hooking it in the Incident/While line, which is a pretty good place to catch it because the Cubix module could mostly slide freely throughout the line. The only catch was that you had to be very careful not to place Cubix inside an incident token. All the incident tokens in this space start with either a 1 or a 0 and are followed by a letter, other than x. x in this space appears to be a de-tokenizer. Fortunately Cubix slipped in between tokens without a spacer. ## Whitespace Or ␉␉␉␉ There were a few hidden tabs left over from earlier Whitespace solutions that were still needed as whitespace for whatever other languages were in the region. So I swapped these out for plain old spaces, just for the convenience of reading. And that was the last of my code changes. Here are the few languages I didn’t touch. ## evil meePaeueewuuw ## Cardinal x%>~~~+ +~*ttt*.x ## C #define z sizeof'c'-1?"38":"37" #include<stdio.h> main( )/*/ #()#\'*/{puts(z );}/*' ## C++ #define z sizeof'c'-1?"38":"37" #include<stdio.h> main( )/*/ #()#\'*/{puts(z );}/*' ## Rail 'main'// #-3o4o# ## Python 2 print( (eval ("1\x2f2")and(9)or(13))-(0and 4)^1<<(65)>>(62)) ## Python 3 print( (eval ("1\x2f2")and(9)or(13))-(0and 4)^1<<(65)>>(62)) ## Ruby print( (eval ("1\x2f2")and(9)or(13))-(0and 4)^1<<(65)>>(62)) ## Perl print( (eval ("1\x2f2")and(9)or(13))-(0and 4)^1<<(65)>>(62)) __DATA__=1#// ## Perl 6 #>27.say# ## 05AB1E "26 ## Pip ''25 ## Whirl 0l0v0@O6O4/1k1k0l(0i0jx0h0h1d111x0eU0bx0b0o1d0b0e0e00m1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100 ## Fission #.\."12"__* ## V dggi2 Or ␛ dggi2␛ ## ><> ;n4 ## Nim ]#echo 21# ## Going Forward While trying to prove to my insistent brain that Octave was an impossible addition, I instead proved that actually will fit in here. It requires a bit of comfort with tricking Japt around curly braces and a rather interesting 3 language solve, but it is possible. The polyglot currently executes in Objective-C (clang) to produce 38 (the C answer). I’ve looked for a language native method for differentiating from C, but haven’t had any luck. Clang has pre-defined macros like TIME that are not used in the C/C++ compiler we’re so far using. But I’d prefer to find a language native method of differentiating Objective-C is possible. Any ideas? And along those lines, I think we’re at a point where we’re soliciting ideas from the community. I know my idea bank is running low, so if you have any suggestions, please leave a comment. Also, a special shout out to @WheatWizard for suggesting Glypho as a possible addition as well. I haven’t looked too deeply at it yet, but I am intrigued. • Oh wow, I just realised how the Thutu works now. It's inputting EOF from stdin, and then misinterpreting that EOF as a command, which just happens to be the command to exit the program. (Meanwhile, the INTERCAL appears to be crashing with an error after printing output; there's likely a missing GIVE UP statement. That probably needs to be fixed.) – user62131 Mar 17 '17 at 22:28 • Oh, and on the subject of Objective-C, I believe it's a strict superset of C (i.e. all C programs will run unchanged in Objective-C). Thus, adding it into the polyglot is going to have to rely on implementation-specific details somehow (such as evaluation order, which isn't specified in many cases in C); it's maybe not impossible, but it's going to be harder than normal. Perhaps we should create a chatroom for discussing polyglot ideas? Doing it in comments is awkward. – user62131 Mar 17 '17 at 22:36 • @ais523 Interesting that INTERCAL gave an exit code of zero in the test driver. Do we have a compiler discrepancy with Tio? I think a polyglot chat room is an excellent idea. – Chance Mar 17 '17 at 22:56 • It's a syntax error, which has error code ICL000I. C-INTERCAL returns the error number as the exit code; it's just that 0 for a syntax error is indistinguishable from 0 for success. As for the chat room, let's discuss things here. – user62131 Mar 17 '17 at 23:19 # 33. Incident, 460 bytes #v16/"<"6/b.q@"(: ::T): ␉␉␉␉ :(22)S#;n4"14" #>3N6@15o|>␉^*ttt*~++~~~% #=~nJ<R"12"; ␉ #[␉#vx#v0l0mx01k1k0l0ix0jx0h0h1d111x0ex0bx0b0o1d0b0e0e00x1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10mx0m0l11111100(23!@) #<| print((eval("1\x2f2")and (9)or(13))-(0and 4)^(1)<<(65)>>62)or'(\{(\{})(\{}[()])}\{})(\{}\{})'#46(8+9+9+9+9+=!)=#print(17)#]#echo 21#|/=1/24=x=9[<+@+-@@@@=>+<@@@=>+<?#>+.--.]/ #8␛dggi2␛␉ |1|6//''25 #>say␉␉ 27#T222999/+/-/+23!@23!@"26 As usual, ␉ is a literal tab, ␛ is a literal ESC character. ## Rundown This program prints 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Try them online! For the languages that aren't supported by the above test driver: • V can be tested here on TIO, and outputs 2 as expected. • Reng can be tested here, and outputs 19 as expected. • Modular SNUSP can be tested here, and outputs 31 as expected. • Incident currently doesn't have an online interpreter; I tested it locally. I've put in a request for it to be added to TIO, though. ## Explanation I was always planning to add Incident once this challenge reached its 33rd language. You see, it takes a huge amount of code to do anything in Incident, and 33 is by far the simplest (and thus tersest) two-digit number to output. Even then, I only just came in under the length restriction. ### Making the Incident code robust against changes to the polyglot The main weird feature of Incident is that it's very hard to lex; as a quick summary, a token is anything that appears exactly 3 times in the input, and isn't a subset of another token, and doesn't overlap another token. It'll be much easier to understand this answer with syntax highlighting. Stack Exchange doesn't support colour in posts, and (unsurprisingly) doesn't support syntax highlighting for Incident, so I'll do it with a screenshot of a slightly older version (click for full size): The tokens are shown in bright, bold colours. Dim colours are for non-tokens; grey means that they don't occur 4 times, brown shows tokens that are invalid due to overlapping other tokens (and dark cyan shows the locations of the overlaps). As you can see, the #v at the start of the program is a token (appearing three times), and as it follows the pattern #v … #v#v (appearing once and later twice), compiles into a forward jump, thus jumping over the start of the code. Likewise, 23!@ is a token, and follows the same pattern, and thus is a forward jump that jumps over the end of the code. As such, Incident won't execute anything but the Incident code in the middle of the program. The Incident code is interleaved with the Whirl code; the purpose of this is to reduce the chance that Incident tokens will appear in future added code and thus cause the Incident code to lex incorrectly. Each token in this code consists of a digit (0 or 1), followed by a lowercase letter (other than a, as the program already has a 0a). So avoid that combination in future. (The reason I used this particular representation was that the Whirl code was already full of 0s and 1s that I could borrow.) The most fragile part of this program, and something that's unavoidable in Incident, is the part that does the output; this is the token 0o (seen underlined in the syntax highlighting; I chose the name 0o as "output" starts with o). Incident identifies the token that produces output via checking for the centremost token in the entire program; this happens to hit an 0o right now, but might not in the future, so you may have to add dummy tokens (i.e. something repeated three times that doesn't appear elsewhere in the program; three copies of the same token next to each other is a no-op in Incident) in order to bring it back to the centre. Hopefully this will at least be less obnoxious than dealing with the Hexagony. ### Keeping the other languages working. Given that this answer pretty much just adds a bunch of letters in the middle of the program, few languages minded. One of the more awkward languages to deal with is Reng; there's naturally a # in its execution path. Luckily, this can be fixed easily by adding a (non-token) x on the sixth column; Reng treats this as a no-op, and Incident doesn't parse it as a token (as the program has a ton of xes already). Hexagony was fairly benign; I just needed to add padding to line the /+23!@ into the right place on the line. (Note that the second occurrence of 23!@ is for Incident, giving three copies of that token; you may well want to change the 23!@ token to something else if you move the Hexagony token earlier on the line, and the basic principle is just that the token in question should appear once at the end of the Incident line, twice very near the end of the program, and not appear anywhere else.) Unfortunately, my first thought for the padding (++++) broke Retina. I changed it to /+/- instead, to ensure that it was valid within a regular expression (and didn't accidentally create an Incident token); Retina hardly runs the code at the end of the last line (it's already matched enough times by then so the value will be thrown away), but it does parse it. The other language that gave some amount of trouble was Prelude, which produces when it sees ! characters. Parentheses, on any line (not necessarily the same line as the ! character), affect control flow in Prelude; thus the ! characters on the last line are harmless. The ! character at the end of the Incident code isn't, though, so I had to enclose the 23!@ there in parentheses; luckily, 0(…) is a comment in Prelude, and there's a 0 naturally at the end of the Whirl program. ### How the Incident code works Here's the Incident-specific (plus interleaved Whirl) section of the code, with tokens bolded and whitespace and comments added: 0l 0m x 0 # Run subroutine 0l, then jump to 0m 1k 1k # Jump target for backwards jump 1k 0l # Entry and exit point for subroutine 0l 0i x 0j x # Run subroutine 0i, then jump to 0j 0h 0h # Jump target for backwards jump 0h 1d 1 1 1 x 0e x # Run subroutine 1d, then jump to 0e 0b x 0b # Jump target for backwards jump 0b 0o # Output a 0 bit, then run subroutine 0o 1d # Entry and exit point for subroutine 0o 0b # Jump back to jump target 0b 0e 0e 0 0 x # Jump target for forwards jump 0e 1d # Run subroutine 1d 0i # Entry and exit point for subroutine 0i 0f x 0g # Run subroutine 0f, then jump to 0g 0n 0n 1 1 x # Jump target for backwards jump 0n 0o # Entry and exit point for subroutine 0o 0n # Jump back to jump target 0n 0c x 0c # Jump target for backwards jump 0c 0o # Output a 1 bit, then run subroutine 0o 0f # Entry and exit point for subroutine 0g 0c # Jump back to jump target 0n 0g x 0g # Jump target for forwards jump 0g 0f # Run subroutine 0f 0h # Jump back to jump target 0h 0j 0j # Jump target for forwards jump 0j 0i 0 0 0 # Run subroutine 0i 1k 1 # Jump back to jump target 1k 0m x 0m # Jump target for forwards jump 0m 0l # Run subroutine 0l First, note the random digits scattered around (these are bits of the Whirl code, which is slightly longer than the Incident code); we don't care about those. The random xs are to avoid parsing ambiguities (basically to prevent an overlap between a digit-letter token and a letter-digit token, we use xs to break up letter-digit tokens). Everything else is tokens, and those are the bits that are actually executed; all nontokens are NOPs. The next thing to note is that this is almost entirely made out of jumps and procedure calls. An Incident procedure has its exit point at the same place its entry point is, and thus we use jumps to loop each of the procedures round into a cycle (i.e. we enter at one point, run forwards until we reach a jump, jump backwards, then run forwards until we reach the entry point again). Additionally, Incident cares about the order of the three uses of a token (it's how it assigns meaning to them), so there are also some extra jumps added simply to get the code into a sequence that will be interpreted with the meaning we want. We can straighten out the jumps to get the following pseudocode for the procedure definitions: Main program: call 0l; call 0l. 0l: call 0i; call 0i. 0i: call 0f; call 0f; call 1d; call 1d. 0f: call 0o (outputting a 1 bit as a side effect). 1d: call 0o (outputting a 0 bit as a side effect). 0o: a no-op. Note that each Incident procedure has to be called from exactly two places in the program (due to the way the syntax works); it's easy to verify that that's true in the table above. (If the centremost token in the program is a procedure definition – 0o in this case – the two calls output 0 bits and 1 bits respectively as side effects.) It should be fairly easy at this point to see what the program outputs: the bit pattern 1100110011001100. This is broken into bytes, taking the least significant bit first. So that's 33 33 in hexadecimal. And of course, hexadecimal 33 is ASCII 3. The program could thus be made significantly simpler by exploiting the fact that 33 is the only 2-digit decimal number which consists of the same nybble repeated four times; and that let me fit it into the polyglot. • Wow! So glad I blew up the byte count now. – Chance Jan 17 '17 at 21:44 # 18. Cardinal, 137 bytes #v16 "<" 6/b0\ .q@#;n4"14"" #>3N9@15o|R"12"*^*ttt*~++% #=| print((1/2and 9 or 13)-(0and+4)^1<<65>>62);# =#;print(17) #gg99ddi2 |1|1+6 Literal escape chars between # and g, and 2 and . Prints: Edit: Fixed esc character between o and | - don't know why it was there in the first place. • Bytes cannot be fractions, so the limit was really floor(128 * 1.2), so good thing you didn't need another byte. – mbomb007 Dec 7 '16 at 19:52 • Also, this is incorrect, as it prints 6\x00 in SMBF. (There are two . characters.) – mbomb007 Dec 7 '16 at 19:54 • Can we get the SMBF to modify out the second period? – Pavel Dec 7 '16 at 19:56 • Oh right, forgot about the second period. Shoot. – MildlyMilquetoast Dec 7 '16 at 19:57 • @ais523 It was deleted for a little while, but it should be fixed now. As far as I know, it works with all 18 languages... – MildlyMilquetoast Dec 7 '16 at 22:22 # 34. Rail, 549 bytes #v16/"<"6/b.q@"(: ::Q): ␉␉␉␉ :(22)S#;n4"14" #>3N6@15o|>␉^*ttt*~++~~~% #= >␉1#v#v0l0mx01k1k0l0ix0jx0h0h1d111x0ex0bx0b0o1d0b0e0e00x1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10mx0m0l11111100(^_) #[␉ #<| print((eval("1\x2f2")and(9)or(13 ))-(0and 4)^(1)<<(65)>>62)or'(\{(\{})(\{}[()])}\{}\{}\{}) '#46(8+9+9+9+9+=!)#1111|=/=1/24=x=9[[<+@+-@@@@=>+<@@@=>+<?#>+.--.]]/ __DATA__=1#// #.\."12"␉; """"#// =begin␉// 'main'// #-3o4o␉ =end #// """#"#// #]#echo 21 #//=#print( 17) # +/Jn~ #8␛dggi2␛␉|1|6//''25 #>say 27#nd^_^_.Q222999/+23!@"26 As usual, ␉ is a literal tab, ␛ is a literal ESC character. ## Rundown This program prints 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Try them online! For the languages that aren't supported by the above test driver: • V can no longer test the full polyglot in Tio because it takes too long to run now. But I have added a test to the above test driver to run all code after ␛dgg in the polyglot since these V commands essentially invalidate all prior code. • Reng can be tested here, and outputs 19 as expected. • Modular SNUSP can be tested here, and outputs 31 as expected. • Incident was confirmed to output 33 by ais523. ## Explanation I too have been planning! I have long been stymied by the limitation of starting every line with a # or exposing the code to Python, Ruby, and Perl. Well no more! I decided to rip a literal hole in the code. (I use the term literal figuratively.) We're now including a literal string from the perspective of the scripting languages, so that we can begin lines with characters other than # which Rail, takes advantage of. ### Kill Perl The first problem was that Perl 5 didn't want to execute when there was an unsigned string, so after some experimentation, I settled on killing Perl 5's execution after the big print statement. This is handled with __DATA__=1. This is followed by # to comment out Thutu's //. You'll see these in the solution wherever there is a line that doesn't start with a #. They seemed to make Thutu happy. The DATA in this statement created two other consequences as well. First, we were using T as our Trigger jump label, so that got changed to a quirky Q in first line's : ::Q and the last line's Q222999. Second, Fission treats UDL and R as starting points and the D in DATA kicked off another fission reaction heading in the down direction. So, I had to kill the 3rd line's Fission statement R"12"; and create the line #.\."12"␉; to make sure the reactor didn't melt down. The \ redirects Fission's code path along the line and the .'s are just for spacing. ### Let's Get Literal Both Python flavors use """ to denote the beginning and end of literal strings. Ruby naively thinks " denotes a literal string and has no problem with multiple literal strings bumping up against each other and not being used. But Ruby, Perl, and Pip just could not all agree on when the stuff in between the starting and ending lines for the literal string where actually strings. I settled on letting Pip and Python agree and letting Ruby think what's in between is code. So, this line """"#// and this line """#"#// begin and end the string from Python's perspective. Ruby ended up going to a multi-line comment syntax in the middle of all this business with the =begin // and =end #// statements. ### Reng Around the Rosie With all the extra #'s floating around, Reng had all kinds of problems, so it's code got moved to the bottom and I golf'd out the extra x in the Whirl-Incident capsule. At this point, I believe the only 2D lang to traverse the literal string's space is Cardinal and it can be moved into and bound within the literal zone, but I didn't have the byte count to accomplish this today. Next time. ### Ride The Rail Rail starts at the in 'main'// and continues heading right on the next line starting with the -in #-3o4o␉. The 'main'// line is pretty flexible for inter mixing other code, so it's a good place to add onto. ## The Literal Zone New lines can be added now above or below the Rail code with a few stipulations: • Lines need to be added in pairs for Retina to keep working. • Lines not starting with a # are exposed to Thutu but have generally worked for me if I end the statement with // • Code before a # is still exposed to Brain-Flak, so (){}[] and <> may cause problems. • Every other line should have a literal tab for Whitespace. Or, if this pattern has to be broken, a triple space will usually work. ## Incidental Edit Incident required a few alterations. and nd turned out to be new tokens after the refactor, so I added an extra set of both of these tokens near the end so they no longer counted. The Hexagony module needed to be nearer the end than Incident's final jump token wanted to be placed as a copy of the end of the module, so I had replaced the final jump token with ^_ which all appear before hexagony. Finally, I believe a [ got pushed to the other side of the bulk of incident's code Incident's which I believe caused the center token to be changed. AIS523 pointed out that an extra set could probably be added safely around the Modular SNUSP code, which worked out nicely and let us meet the byte count, just barely. • Fails in Incident due to adding a lot of new strings that are repeated three times after the Incident code; the control flow in the Incident program is still correct, but there's no longer an 0o in the centre of the program (the centre of the program in tokens, as seen by Incident, comes rather later). This seems fixable, however. – user62131 Jan 18 '17 at 1:16 • Dangit, I was going to add Cubix as 34, which would only require a carefully placed QO@... – ETHproductions Jan 18 '17 at 1:20 • It still doesn't work, due to more stray tokens; the easiest fix I've found is to add an additional [ and ] (each of which currently appears three times). I placed them around the SNUSP code; no idea if that breaks anything else. – user62131 Jan 18 '17 at 15:50 • @ais523 Thanks again. That looked like a good fix for everything else. I had to reduce the second Incident jump code to 2 characters to meet the byte limit. We might need something that identifies Incident's tokens and specifically the center token for testing purposes. – Chance Jan 18 '17 at 17:20 • I can confirm that this works in Incident now. I agree that an Incident syntax highlighter would be useful here (there's one as part of the Incident distribution, but that's not really usable online). I know Martin Ender was considering starting a challenge about writing one; I wonder what the progress on that is like. – user62131 Jan 18 '17 at 18:11 # 56. dc, 1286 bytes #16 "(}23!@)(" 3//*v\D@;'[af2.qc]'#)"14";n4 #/* PkPPX (22)S"[!(>7 7*,;68*,@;'1,@␉␉␉␉ P''53'S^'q #>␉ # >36!@␉ #< #<]+<[.>-]>[ #{ #z} # #=x<R+++++[D>+++++++EAL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.-- -. >][4O6O@ #x%+>+=ttt Z_*. #D>xU/-<+++L #R+.----\).>]| #[#[(}2}20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_)0 ###x<+@+-@@@@=>+<@@@=>+<?#d>+.--.| # [ ']56pq[' ];#// '(p(x0 \';case argv[1] in *1*)echo 50;;*)echo 54;;esac;exit;0';print((eval("2\x2f5")and(9)or(13))-(0and 4)^1<<(65)>>(62))or"'x"or'\{0}1{0}1{0}1{0}([9]<((((((1)(1)(1))){1}1{1}))0{1}1{1})1>0)5{(<{1}(({1}){1})>0)}{0}({1}(1))'#}#(prin 45)(bye)|/=1/24=x046(8+9+9+9+9+=!)/ __DATA__=1#"'x"// #.;R"12"' ###;console.log 39 """"#// =begin // #sseeeemPaeueewuuweeeeeeeeeeCisajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/* #define p sizeof'p'-1?"38":"37" #include<stdio.h> main ( )/*/ # #"#"\'*/{puts (p);}/*'"" /* <>{#65}// #} disp 49#// #{ 1}<>// 'main'// #-3o4o#$$$
#<R>"3"O.
=end #//
"""#"#//
#}
#s|o51~nJ;#:p'34'\=#print (17)#>27.say#]#print(47)#]#echo 21
#sss8␛dggi2␛ |1|6$//''25 16*///^_^_X222999"26 ␉ is a literal tab, ␛ a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it. Try them online! VIP score (Versatile Integer Printer): .007322 (to improve, next entry should be no more than 1355 bytes) # Rundown This program prints 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Most of the languages (including the most recent addition, dc) were tested via the use of the test driver on TIO, linked above. • Reng can be tested to output 19 here. • Modular SNUSP can be tested to output 31 here. • Incident was verified to test 33 by running the official interpreter locally. • Deadfish~ can be tested to output 48 using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, and prints a number of >> prompts to standard output, which are an unavoidable consequence of running any Deadfish~ program; the remaining output is the output of the program. ## Explanation ### dc dc is a fairly old programming language. It originally started as a calculator program, then ended up being given a bunch of stack manipulation commands, and the ability to place functions on the stack, making it Turing complete (in a way rather close to Underload). It was originally intended as a practical language – in fact, it was the first programming language that could be run on the PDP-11 machine that was later used to develop UNIX – but more recently, many people would consider it an esolang. It's also a fairly popular choice for answering challenges here on PPCG, despite being fairly obscure nowadays. In this case, there are a few relevant properties of dc that make it easy to work into a polyglot: # comments; […] string literals; and a quit command q. So the program that runs is simply […]56pq, i.e. push a string literal (that we never look at), print 56, then quit. ### bash, zsh, Perl, Python, Ruby The dc line is a new line, and it comes before the existing scripting language code. As such, it needs to be harmless in all those languages. In Perl, Python, and Ruby, […] is a list literal. Placing a string literal inside this allows us to hide the code from these languages, while allowing dc to see it. Single quotes are much better for this purpose than double quotes (single quotes are only used in the polyglot at present to skip small sections of code, whereas several languages have almost the whole thing in a double-quoted literal). We also need a semicolon to discard the list literal when we're done. In bash and zsh, [ is a command that evaluates expressions (and for balance's sake, uses ] to terminate the command rather than ;). If the first parameter seen doesn't start with - (it doesn't), this is a test for nonemptiness, which is great as we can meaningfully apply it to pretty much any string. ### Thutu Adding a new line that doesn't start with a # means it need to be made Thutu-safe. Appending // is the typical way to do this, and works. I also needed to add a # to hide it from the scripting languages. ### Retina Retina ascribes a different meaning to odd lines and to even lines. I added a line with just # in order to get the parity right. ### Brainf***, self-modifying and otherwise dc has no need to reopen a string literal after its q. However, square brackets need to match for another reason: they're loops in Brainf***. We can fix this by putting in an opening square bracket in at the point just between the q (where dc stops reading) and the ' (where the scripting languages start). ### Alphuck p, dc's print instruction, starts a loop in Alphuck. I changed a p on the next line to an x in order to rebalance the Alphuck code. ### Incident As usual. The rebalancing here was accomplished by adding a filler character to the Modular SNUSP line to break up one copy of the #< token (this rebalance was more awkward than usual as I needed to break up a token which had copies before the main body of the Incident code). ## Summary This was actually a really easy add (as can be seen by the small size increase). The difference in literal syntax between dc and the scripting languages made it possible to split it off early and safely (this is the same technique that's normally used to include Lua in polyglots, but Lua doesn't have # comments; dc does). A lot of languages needed changing, but most of the changes were really minor. # 61. S.I.L.O.S., 1445 bytes #16 "(}23!@)(" 3//*v\D;'[af2.qc]PkPPX'#)"14";n4 #/*0|7//" ['][!(>77*,;68*,@;'1,@1␉0␉␉11)(22)S␉(1 P''53'S^'q #>␉ # 36!@␉ # # #< #<]+<[.>-]>[ #{ #z} # #=x<R+++++[D>+++++++ L+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.-- -. >][4O6O@ #x%+>+=ttt Z_*. #D>xU/-<+++L #R+.----\).>]| #[#[(}2}20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_00) ###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.|
#
[ "]56p26q[puts 59][exit]" ,'\[' ];#//
'(((p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f2")and 9or 13)-(0and 4)^1<<(65)>>62)or"'x"or'{}{}{}{}({}<(((((()()())){}{})){}{})>)\{(<{}(( {}){})>)}{}({}()) li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"|/=1/24=x'/
__DATA__=1#"'x"//
#.;R"12"'
###;console.log +39
""""#//
=begin //
#sseeeemPaeueewuuweeeeeeeeeeCisajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define p sizeof'p'-1?"38":"37"
#include<stdio.h>
main ( )/*/
#*/{puts(p);}/*
#
/*
1=61 //
printInt 1//
<>{//
#}
disp 49#//
#{
}<>//
'main'// #-3o4o##<R>"3"O.s =end #// """#"#// #} #s|o51~nJ;#:p'34'\=#print (17)#>27.say#]#print(47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi ax #sss8␛dggi2␛|//''25 16*///~-<~-<~-<<<~-^_^_X2229996 Try it Online VIP score (Versatile Integer Printer): .006366 (to improve, next entry should be no more than 1517 bytes) ## Rundown This program prints 61 in S.I.L.O.S, 60 in Moorhens 2.0, 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Most of the languages are tested by the test driver shown above. • Reng can be tested to output 19 here. • Modular SNUSP can be tested to output 31 here. • This has been tested to working Incident by ais523 on the official interpreter. • Deadfish~ was can be tested to output 48 locally, using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are n unavoidable consequence of running any Deadfish~ program. • Moorhens 2.0 can be tested to output 60 using this interpreter. ## S.I.L.O.S. At @RohanJhunjhunwala’s suggestion, I looked at adding S.I.L.O.S.. It was a short investigation, because I only had to put a line that said print 61 in somewhere, and it worked. The only problem was Thutu, which required a trailing // on each line that didn’t start with a #, and when I added this to the end of the print statement, the output became 61//. So I poked around with the documentation for a minute, and found this: 1 = 5 printInt 1 //prints five Well that’s easy. 1 = 61 // and printInt 1// gets us past Thutu and virtually done. Just a couple tweaks. ## Alphuck S.I.L.O.S. added a p, which is a loop initializer is Alphuck, so I had to add the matching terminator to compile. That Terminator, s, got placed at the end of the Minkolang line #<R>"3"O.s ## Incident Incident was slightly imbalanced, so I removed some detokenizing bits from @ais523’s last answer in a guess and check fashion. Now, #*/{puts(p);}/* no longer has a trailing space, and console.log 39 no longer has a +. Edit: Okay, I didn't need to actually do anything with incident, so I just undid all the above detokenizations. ## Test Driver Update In the past, I've found myself failing to notice that a language was returning a number, but the wrong one. I've finally gotten around to addressing the problem and added a test result to the output of the test driver. so now, when Retina returns 7 instead of 8, the test will be flagged as a fail. I also did a little formatting for alignment. Languages that aren't on Tio will now have a place holding X's where their numeric result is expected and single digit results will have a place holding space inserted as well. • Wow +1 because I didn't think anyone would come up with such a clever abuse of the use of integers as variables!! – Rohan Jhunjhunwala May 3 '17 at 22:37 • Moorhens 2.0 works – Wheat Wizard May 3 '17 at 23:32 • @RohanJhunjhunwala Did you patch my hack? :P This polyglot solution stopped working. tio.run/nexus/silos#@29oa2aooK/PVVCUmVfimVeiYKiv//8/AA – Chance May 18 '17 at 20:40 • Unfortunately, the latest change with expression parsing is broken, however this works – Rohan Jhunjhunwala May 18 '17 at 21:05 • @RohanJhunjhunwala Oh, thanks! That's an easy swap. – Chance May 18 '17 at 21:37 # 72. Fortran (GFortran), 1948 bytes #16 "}(o+?23!@- "/*\Dv;'[af2.q]PkPPX)$$'#CO"14";*/ #/*0|7//" )[-'][(>77*,;68*,@;'1,@1011)(22)S ␉\4n;␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx #>␉ # 36!@␉ # #_>++++.>++++++::@---x---.+? #< #<]}}+<[<.>>-]>[ #{ #x} #2""/*\* #=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][ #x%+>+=ttt Z_*.ar #D>xU/-<+++L #R+.----$$.>]| #[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d@O6O4111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0 [ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/ ###x<+@+-@@@@=>+<@@@=>+<?#d>+.--. '((( p\';a=a;case argv[1]+{a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f 2")and 9or 13<<(65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>){(<{}(({}5){})>)}{}({}())wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWW li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"' __DATA__=1#"'x" #.;R"12"' ###;console.log 39 """" =begin <>{ utpb now 70 dollar off! ai utpb has been selling out worldwide! ai fir at fir #sseeeemPaeueewuuweeeeeeeeeeCis:ajjap*/ #if 0 .int 2298589328,898451655,12,178790,1018168591,84934449,12597 #endif//* #1""//* #define u8 "38\0" #define p sizeof'p'-1?u8"67":"37" #include<stdio.h> main ( ) {puts(p);}//*/ #if 0 #endif//* /*/ print'("72")';end; #if 0 #endif//* rk:start | print: "69" rk:end print 61 #} disp 49; #{ }<> 'main'3 #-3o4o#
#<T>"3"O.
=end
"""#"
#}
#s|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi os fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm
#s8␛dggi2␛|$// '' 25 16*///~-<~-<~-<<<~-COprint("65")#ssss^_^_X2229996# VIP score (Versatile Integer Printer): .005219 (to improve, next entry should be no more than 2030 bytes) This program prints 72 in Fortran, 71 in what, 70 in Commercial, 69 in rk-lang, 68 in Python, 67 in C11, 66 in Surface, 65 in ALGOL 68, 64 in Agony, 63 in Brian & Chuck, 62 in Grass, 61 in S.I.L.O.S, 60 in Moorhens 2.0, 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C99, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. Try it online! • Reng can be tested to output 19 here. • Modular SNUSP can be tested to output 31 here. • Incident tested to output 33 via manual balancing of tokens. • Deadfish~ and Moorhens were tested by WheatWizard. • Surface can be tested to output 66 here. • Japt was updated in Tio to fix the parsing error we've been exploiting, so it must be tested individually here. # Explanation ## Fortran Fortran is another old and famous language we're able to add to the polyglot. It’s original spec appeared in 1956 which is a just prior to ALGOL 58, which I believe makes this the oldest high-level language we’ve added. Assembly is, I believe, the oldest overall. Of course we’re not using the original compiler, because that wouldn’t work. We’re using GCC’s Gfortran interpreter and we're using the 08 version of Fortran, although the Fortran code we’re using is compatible with other versions, it’s just the one I arbitrarily picked. The biggest problem with adding Fortran was that the language doesn’t have a block comment, which is the #1 trick for hiding the polyglot. But, Gfortran happened to have C style preprocessor directives if you’re file extension is among the following (.fpp, .FPP, .F, .FOR, .FTN, .F90, .F95, .F03 or .F08), which is the track I took. I happen to be using F08. I had originally planned to hide the polyglot in a non-executing preprocessor if block, but the lines contained therein continued to be read by the pre-processor unfavorably. But I stumbled into the realization that C-style comments appearing within pre-processor directives are treated as comments. After some experimentation I found that #endif//* entered a comment block for Fortran, but not the C family, nor asm. This appears to be because the GFortran supports C style block comments, but not line comments. Our asm interpreter naturally treats lines starting with a # (that it doesn’t recognize as a preprocessor directive) as a comment. Once C comments were handled, I just needed to put in the following line in a space only read by Fortran print'("72")';end; and we made a successful polyglot. ## /* Comments */ The comments were the main difficulty with this addition, so I’m going to step through the comment state of all the languages that use /* comments since I changed them so drastically. C11, C99 and C++ all use the same comment path, unsurprisingly, so I’ll just refer to this group as C. The other unique comment blocks are in asm and Fortran. The polyglot starts out with a preprocesser directive of the form of #1 "", which refers to a line number and file name in quotes. The previous answers followed this with a //* to line comment in C and block comment in asm. Fortran didn’t accept this comment style, so things had to change, and the fix was to change line 1’s comment to a block style comment with a #1 ""/* bla */ pattern. Line 2’s answer held Japt, which it somewhat syntactically rigid in the polyglot, so I opted to leave Japt’s line 2 answer intact. Japt transpiles to JavaScript BTW, which is another /* style comment language, but these comment indicators can get altered in the transpolation. The /* at the beginning of line 2 is such a case. By converting the // comment to a /* comment on line 1, japt needed the /* comment to close, so a */ was added to the end of line 1. This BTW broke <><, so we now redirect it’s IP to line 2 since / is conveniently a reflector. Okay, so line 1 is a single line block comment for C, a # style line comment for asm, and an unknown preprocessor directive for Fortran, which only issues a warning. Line 2 starts a block comment for C and Fortran, and asm again ignores it as a line comment. The Fortran block comment is in the middle of a preprocessor directive and so is required to end the comment just prior to the completion of the directive, or with a line feed. I chose the latter. From here, asm continues to see line comments until we arrive at #2""/*\* which is the pre-processor pattern from before. The \* exists here because Agony needed a second * to complete its copy paste operation, and Retina needed the \ to escape out the second *. Ok, we’ve established the 3 languages in a comment and can move down the polyglot to evil’s line where we drop out of the comment and begin the real work. We start with a #if 0 directive, valid in both C and Fortran as initiating a non-executing preprocessor if block. Perfect! We can answer asm within the block and move to close the block as well as start a Fortran comment with #endif//*. Following this, we have to close asm so we’ll once again use our preprocessor output file syntax to begin an asm comment, which leaves only C open. So we’ll just answer for the C family and end with //*/ , which sets asm and Fortran comments to a closed state. Now, all the comments are closed, and we need to have a state when only Fortran is open. I don’t actually see a good way to do this, so I take the verbose track of starting a Fortran only comment with #endif//* and then toggling all 3 languages with /*/. Finally! We can answer Fortran with print'("72")';end; and then put Fortran back into a comment with the same if block trick from before. Hurray! Currently we’re closing the comment for all 3 on the final line with */// which somehow works for all 3 and I don’t totally understand why. But I accept that it is valid and that is enough. ## What I massively busted What with my changes, and it turns out that any change has a 2/3 chance of busting what, if the code is placed prior to its code. So I move it into line 2, to mitigate that problem going forward. This caused some Cubix problems because the starting IP was dead center in INTERCAL. I fixed by changing some INTERCAL DOs to FACs and adding a padding x at the end of line 2. ## Golf Report I cut ! on line 2 after finding experimentally that it was not needed by Underload. Similarly, I removed ) and a ( near the beginning of line 1 because Underload could get by without it. Prelude no longer needed the space in the Brain-Flak’s code, so I cut that. Alphuck got its end of polyglot s’s rearranged because the changes to line 1 caused the 2D langs that wrap around the polyglot to be off by 1 column. I had to shorten the last 2 lines to match so, I moved some leading s’s to near the end. There is a bit of overhead to put code at the end of the polyglot, so rk was ripe for some byte saving simply by moving it. Now it lives near the beginning of the final C family comment block. ## Incident Report <>{nd became <>{ because nd was no longer needed to be detokenized Removed the space between }} and + in #<]}} +<[<.>>-]>[ to detokenize because }}+ no longer needed to be detokenized. I removed “6” at the end of commercial with no good reason. Added a 5 to the Brain-Flak line. removed the 59 detokenizing string from the Minimal-2D space and replaced it with a q to detokenize q because e the space was now only 1 char wide. Never replaced the 59 • Hey, that "6" was added to detokenize a "6, I had a good reason for it, I swear :P – SnoringFrog Jun 9 '17 at 11:29 • "clock comments" – CalculatorFeline Jun 9 '17 at 17:00 # 64. Agony, 1613 bytes #16 "(}+?23!@)-("//*\Dv;'[af2.qc]PkPPX'#)"14";n4 #/*0|7//" [-'][!(>77*,;68*,@;'1,@10␉11)(22)S␉␉␉(1 P''53'S^'q #>␉ # 36!@␉ # #_>++++.>.}+? #< #<]}}+<[.>-]>[ #{ #z} # #=x<R+++++[D>+++++++59L+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsd4O6O@oh]>@@+.---@.>][ #x%+>+=ttt Z_*. #D>xU/-<+++L #R+.----\).>]| #[#[(?2?20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_00) [ "]56p26q[puts 59][exit]" ,'\[' ];#/s\\/;print"24";exit}}__DATA__/ # ###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.
#
'(((p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f2")and 9or 13)-(0and 4)^1<<(65)>>62)or"'x"or'{}{}{}{}({}<(((((()()())){}{})){}{})>){(<{}(({}){})>)}{}({}())wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWW li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"'
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
=begin
<>{
#sseeeemPaeueewuuweeeeeeeeeeCis:ajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define p sizeof'p'-1?"38":"37"
#include<stdio.h>
main ( ){puts(p);}/*
print 61
#}
disp 49;
#{
}<>
'main'3 #-3o4o##<q>"3"O.s =end """#" #} #s|o51~nJ;#:p'34'3\=#print (17)#>27.say#]#print(47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi ax fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm # sss8␛dggi2␛|// ''25 16*///~-<~-<~-<<<~-}+^_^_X2229996 VIP score (Versatile Integer Printer): .006153 (to improve, next entry should be no more than 1689 bytes) Try it online! ## Rundown This program prints 64 in Agony, 63 in Brian & Chuck, 62 in Grass, 61 in S.I.L.O.S, 60 in Moorhens 2.0, 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Most languages can be tested with the test driver above, but 6 languages have to be tested locally. • Reng can be tested to output 19 here. • Modular SNUSP can be tested to output 31 here. • Incident was verified to test 33 via manual balancing of tokens. • Deadfish~ was can be tested to output 48 locally, using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are n unavoidable consequence of running any Deadfish~ program. • Moorhens 2.0 can be tested to output 60 using this interpreter. • Agony can be tested to output 64 using this interpreter ## Agony Agony is another brainfuck derivative, but quite an interesting one. I found it on the list of esolangs and it seemed to be fit for this polyglot. It ignores all characters it doesn't recognise (it only recognises *+-@~[]()<>{}.,). Most brainfuck programs also work in Agony, but every memory cell only has 4 bits. On top of that, the code and memory share the same space, so this language is self-modifying as well (though we don't use that here). Input and output work on two memory cells, effectively the same as brainfuck. The commands @~{}() are the counterparts of +-<>[] respectively, but they only work on one memory cell. The commands imported from brainfuck work on two memory cells. The program stops when it reaches the first and it knows two loops (() and []) which can also be executed 0 times, effectively adding holes to the code. It's important to skip .s until we've placed the correct value on the tape, as that is the output command. Let's get to the code Agony sees. As I said before, all characters it doesn't recognise are discarded. The ^ character indicates that this is either a loop that isn't executed or a comment to indicate the line number. (^)-(*[^]) *[-][^line 8^]}}+<[^]> [{}^line 12^<+++++[>++++++++++<-][^]>@@+.---@.>[^line 19^ The first loop is skipped, because the memory starts as 0. Then, the memory value is decremented, so it is non-zero, so it enters the loop. Then, the * character is executed, which copies the current memory value and replaces it by 0. That causes the [] loop to not be executed. Then there's another *, which pastes the (non-zero) copied value. This causes the [-] loop to be executed, which decrements the memory value until it reaches 0. This then causes the next loop to not be executed. Then, we move the memory pointer two positions to the right, increment that memory value and then move the memory pointer back to the 0 memory value. This causes the following loop to not be executed. Then > moves the memory pointer to the 1 value, so the next loop is executed. Until now, we've followed the exact same path as brainfuck, so we now reach the loop that sets brainfuck's memory cell to the ASCII value for 3. We follow that same loop, until it reaches the output. There, brainfuck prints 41. To print 64, we simply add two @ commands before the first print (they are not recognised by brainfuck, so that is not messed up), and one before the second print. ## Other changes First of all, I added a - on line two, which caused several 2D languages to misalign. To fix this, I removed the tab just before it and placed it later on the same line. This fixed all the 2D languages and Whitespace was happy as well. Secondly, I added two }s on line 8, which caused an Incident. }+ was tokenised, so to counter that, I added }+ to the very last line, just before ^_^_. Thirdly, I moved Cubix' code one line up, because the o from the Deadfish~ part caused a null byte to be prepended to Cubix' output. I think this also is a good place to note that the c in the very first line turned out to be just a filler character, so we might be able to replace that in the future. This is my very first contribution to this project and I couldn't have done this without the help from the people in the chatroom. I want to thank @Chance and @ais532 in particular because of their help and guidance. I'm looking forward to making another contribution soon! • "The stack"? There's no stack! – CalculatorFeline Jun 9 '17 at 16:52 • You're right. Fixed it. – Luke Jun 9 '17 at 21:57 # 77. C++14, 2089 bytes #16 "}(o+?23!@- "/*\Dv;'[af2.q]PkPPX)$$'#CO"14";*/ #/*0|7//" )[-'][(>77*;,68*,@,1',;# l1011)(22)\4nS ␉;␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx #>␉ # 36!@␉ # #_>++++.>++++++::@---x---.+? #< #<]}}+<[<<.>>x>-]>[ #{ #x} #2""/*\* #=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][ #x%+>+=ttt Z_*.ar #D>xU/-<+++L #R+.----$$.>]| #[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111\4O6O@x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0 [ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/ ###x<+@+-@@@@=>+<@@@=>+<?#d>+.--.< '((( p\';a=a;case argv[1]+{a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;'␉;print((eval("1\x2f 2")and 9or 13<<(65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>){(<{}(({}5){})>)}{}({}() )wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWW li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'# __DATA__=1#"'x" #.;R"12"' ###;console.log 39 """" =begin <>{ utpb now 70 dollar off! ai utpb has been selling out worldwide! ai fir at fir #sseeeemPaeueewuuweeeeeeeeeeCis:ajjapp*/ #if 0 .int 2298589328,898451655,12,178790,1018168591,84934449,12597 #endif//* #1"" //* #include<stdio.h> #define ␉p(d) #d #define u8 "38\0_" main ( ){puts( sizeof( 0,u8)-5?u8"67":*u8""?"37":p(0'0 "'\"")[9]?"75":"77" );"7";}//*/ #if 0 #endif//* --... ...-- /*/ print'("72")';end; #if 0␌ #endif//* rk:start | print: "69" rk:end<>5b*:,1-,@<> print 61 #} disp 49; #{ }<> 'main'3 #-3o4o#
#<T>"3"O.</+++++++>/+++<-\>+++.---.
=end
"""#"# xi xi xi xi \++++>/ xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi os
#}
#s|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47) #]#echo 21#fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M|$//'' 16~-<~-<~-<<<~-COprint("65")#ssss^_^_# #5 "25" +/ *///X222999686# VIP score (Versatile Integer Printer): .004575 (to improve, next entry should be no more than 2171 bytes) This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14 ## Verification Try it online! Languages that are not on TIO: • Reng (#19) online. • Deadfish~ (#48) local. Run like this: deadfish.py < polyglot. Prints a bunch of >> lines, but that's an unavoidable consequence of running any Deadfish~ program, so it's okay. • Moorhens (#60) local. Use python 2. Note that moorhens.py from master branch doesn't work. • Morse (#73) local. • Archway (#74) local • Trefunge-98 (#76) local. Note that flags must be -v 98 -d 3 for Trefunge-98. Could also be installed via pip. Languages that use abstracted interpreters in the test driver: Other languages: • Japt (#7) was updated in Tio to fix the parsing error we've been exploiting, so it must be tested individually online. • Surface (#66) local. Tio Surface interpreter is no contest because it was created after challenge was started. ## Explanation ### Adding C++14 I am using digit separators to separate C++14 from C++11. See also: stringizing. #define s(x) #x // stringize puts( s(0'0 "'\"")[9] ? "C++11" : "C++14" ); C++11 sees 4 tokens: 0, '0 "', \, "" and puts them in a string as is. C++14 sees 2 tokens: 0'0 and "'\"". Two spaces between these tokens are collapsed into one, so resulting string is one char shorter than in C++11. I also tried using comments: s(0'0/*'*/). C++14 sees it as token 0'0 followed by comment; comment is replaced with space, which is then discarded (because it is trailing). C++11 sees it as sequence of 4 tokens (0, '0/*', *, /), nothing is replaced/discarded. But I cannot use it because multiline comment breaks assembler. If use single-line comments instead: s(0'0//' ) then closing paren needs to be padded with 13 bytes to satisfy Prelude, which is more bytes than just using a string. ### Fixing other languages Prelude, incident and alphuck broke as a result. Prelude and incident are fixed as usual. Spaces around main() are for prelude. Space after <stdio.h>, tab before p(d), space after "77" are there to break unwanted incident tokens. Macro parameter called d also for that reason, to untokenize #d. "7"; is there to untokenize "7. Alphuck is fixed by naming macro p and adding another p to ajjap (seems like number of s and p should match for alphuck to work). ### C vs C++ As someone who worked with a processor with sizeof(void*) == sizeof(int) == sizeof(char) == 1 (TMS320C33, search for "A TMS320C3x/C4x Byte Is 32 Bits"), I didn't feel very comfortable with separating C from C++ using sizeof('p'). So I decided to search for another method, hopefully not too much more verbose than existing one. I found this: in the C++ standard, par C.1.4 page 1232 "Change: The result of a conditional expression, an assignment expression, or a comma expression may be an lvalue" char arr[100]; sizeof(0, arr) yields 100 in C++ and sizeof(char*) in C Luckily, we already have an array - u8. Also we already have redundant use of it to satisfy incident (see u8; after puts(p); in the previous answer). So we can just put that into use. I only changed its size from 4 to 5 bytes because 4 is a common pointer size. So to separate C++ from C I use sizeof(0,u8)-5. It should work on all architectures except those were sizeof(void*) == 5. • RIP online Japt testing please unfix (or provide a flag for enabling broken behavior or something) – CalculatorFeline Jun 19 '17 at 17:51 • @CalculatorFeline I don't quite understand what you want me to do. I personally also don't like that we use interpreter bug (seems unfair to me) and ended up in this situation. But I can't see how it could be fixed. – stasoid Jun 19 '17 at 18:17 • Ask (whoever makes Japt) to add a flag reintroducing the parser bug so we can pretend we're using an earlier version. – CalculatorFeline Jun 19 '17 at 18:19 • @CalculatorFeline I don't want to solve this problem, at least at the moment. If you want this done you could ask him yourself. – stasoid Jun 19 '17 at 18:25 • Not interested enough :/ – CalculatorFeline Jun 19 '17 at 18:28 # 99. 99, 2943 bytes #16 "?63(o?23!*# #@"/*\DZZCv;'[af2.q]PkPPX)$$'#CO"14"; */ #/*0|7//" [>.>.])[-'][(>77*;,68*,@,1',;# l1011)(22)S\4n;iiipsddpsdoh coding:utf8ââââ(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx #>â # 36!@â e++++++::@ #~ #y #< #<<<#>>]}}+<[<<.>>x>-]>[ #{ #x} #2""/*\* #=x<R+++++[D>+++++++q L+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]>@@+.---@.>][ #x%+>+=ttt Z_*. #D>xU/-<+++L #R+.----\$$.>]| #[#[(?24O6O@?20l0v01k1kMoOMoOMoOMoO MOO0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0 )0\\ [ "]56p26q[puts 59][exit]" ,'\[999'];#/s\\/;print"24";exit}}__DATA__/ ###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<!\
'(wWWWwWWWWwvwWWwWWWwvwWWWw WWWWWWWWwWW/"78"oo@WWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw (([5]{})))â\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<*.*\>]xxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39;'(******* **********819+*+@[*99[?]*]***|!)'
#\\
""""#\
' ( <>< ( )> ){ ({}[()] )}{\'; a=$(printf \\x00 );b=${#a};#\\
" }"'; (( ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))#\
=begin
#p +555/2+55x%6E2x
;set print "-";print 89;exit#ss 9
utpb now 70 dollar off!
utpb has been selling out worldwide!
#9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjapppppppðð¨ðð¨ð¬95ð¬ð¥â¡
ðð¢ðððððððð
set ! 57
set ! 51
More 91 of thiset of re9
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449, 12597
#endif//*
#1"" //*
#include<stdio.h>
#defineâ x(d)â#d
#define u8 "38\0 "
main ( ) {puts( sizeof (0,u8)-5?u8"67":*u8""?"37": x( 0'0 "'\"")[9]?"75":'??-'&1? "79":"77");"eg5""6 27""e ' Zing ";}//*/
#if 0
#endif//* --... ...--
/*/
p=sizeof("9( 999 99\" ); print'(''72'')';end!" );main( ){puts( "92");return(9-9+9 -9);}
#if 0â
#endif//* rk:start | print: "69" rk:end<(9 >5b*:,1-,@
print 61
#}
disp 49 ;9;
#{
}{}<>
$'main'3 #-3o4o#$$#<T>"3"O.</+++++++>/+++<-\>+++.---. #<<<#>>> / reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-. =end ;"""#"#xxxxxxxy"78"\++++>/<~#class P{ function:Main(a:String[] )~Nil{83->Print();} } #}pS9^7^8^MUOUOF@:8:8\\ #s|)o51~nJ;#:p'34'3 \=#print(17)#>27.say#]# print(47) #]#echo 21#fwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++ #s8âdggi2âM|//'' 16~-<~-<~-<<<~-COprint ("65")#asss^_^_# #9 "25" +/ *///X222999686# VIP score (Versatile Integer Printer): .003033 (to improve, next entry should be no more than 3032 bytes) This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice, 88 in PingPong, 89 in gnuplot, 90 in RunR, 91 in Cood, 92 in C89, 93 in Set, 94 in Emotinomicon, 95 in Emoji, 96 in EmojiCoder, 97 in Cubically, 98 in Archway2, 99 in 99 ## Verification Try it Online! Languages currently not on TIO: ## Explanation 99 is a language that only cares about 9s newlines and spaces. Each line falls into one of 4 forms (excluding nop lines) depending on whether there is a space before the first 9 or not and whether there are multiple space seperated groups of 9s or not. Lines that have only one variable (group of 9s) and have no spaces before that variable are print statements. Lines that have only one varable but preceded by at least one space prompt for input. Lines that have multiple variables but no space before the first variable are assignment via alternating sum. Lines that have multiple variables and spaces before the first variable are conditional jumps. The code this answer is based off is this: 9999 9 9 // assign 0 (9-9) to 9999 9 999 99 9999 9 // assign 881 (999-99+0-9) to 9 9 // print 99 because 881/9 = 99 and 9 is a variable with an odd number of 9s The code in the answer also includes a lot of conditional jumps that don't activate. These mostly came from adding extra 9s to prevent input statements from being in the code. A code formatter for 99 has been added to the test driver if you want to see the full program. The 3 main lines of the program are located: • near the Evil #9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjappppppp😆😨😒😨💬95💬👥➡ • inside the Fortran/C89 p=sizeof("9( 999 99\" ); print'(''72'')';end!" );main( ){puts( "92");return(9-9+9 -9);} • on the 5th last line #}pS9^7^8^MUOUOF@:8:8\\ ### Pip Pip was the only language that gave me any real trouble and even that was fairly minor. I had to get a 9 into the last line to avoid the creation of an input statement for 99. This was achieved by replacing the 5 that we were using as a dummy argument to the # operator with the 9 • Heh. Good language choice. – MD XF Jul 30 '17 at 21:12 • @MDXF I have been waiting out since the late 80s or so to add it. – Potato44 Jul 31 '17 at 3:46 # 62. Grass, 1617 bytes #16 "(}23!@)(" 3//*v\D;'[af2.qc]PkPPX'#)"14";n4 #/*0|7//" ['][!(>77*,;68*,@;'1,@1␉0␉␉11)(22)S␉(1 P''53'S^'q #>␉ # 36!@␉ # # #< #<]+<[.>-]>[ #{ #z} # #=x<R+++++[D>+++++++ L+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.-- -. >][ #x%+>+=ttt Z_*.x4O6O@ #D>xU/-<+++L #R+.----\).>]| #[#[(}2}20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_00) ###x<+@+-@@@@=>+<@@@=>+<?#d>+.--.| # [ "]56p26q[puts 59][exit]" ,'\[' ];#// '(((p\';a=a;case argv[1]+{a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f2")and 9or 13)-(0and 4)^1<<(65)>>62)or"'x"or'{}{}{}{}({}<(((((()()())){}{})){}{})>)\{(<{}(( {}){})>)}{}({}())wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWW li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"|/=1/24=x'/ __DATA__=1#"'x"// #.;R"12"' ###;console.log +39 """"#// =begin // #sseeeemPaeueewuuweeeeeeeeeeCisajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/* #define p sizeof'p'-1?"38":"37" #include<stdio.h> main ( )/*/ #*/{puts(p);}/* # /* 1=61 // printInt 1// <>{// #} disp 49#// #{ }<>// 'main'// #-3o4o#$$$
#<R>"3"O.s
=end #//
"""#"#//
#}
#s|o51~nJ;#:p'34'\=#print (17)#>27.say#]#print(47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi ax fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm
#sss8␛dggi2␛|$//''25 16*///~-<~-<~-<<<~-^_^_X2229996 Try it online VIP score (Versatile Integer Printer): .006780 (to improve, next entry should be no more than 1695 bytes) ## Rundown This program prints 62 in Grass 61 in S.I.L.O.S, 60 in Moorhens 2.0, 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Most of the languages are tested by the test driver shown above. • Reng can be tested to output 19 here. • Modular SNUSP can be tested to output 31 here. • Amazingly the incident tokenizer in the test driver indicated that the tokens had not changed from the last entry, so I did not bother to run this. • Deadfish~ was can be tested to output 48 locally, using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are n unavoidable consequence of running any Deadfish~ program. • Moorhens 2.0 can be tested to output 60 using this interpreter. ## Explanation Here is the Grass code: wWWWwWWWWwv wWWwWWWwv w WWWw WWWWWWWWw WWWWw WWWWWWWw WWWWWWWWwwww v wWWWwWWWWwv wWWwWWWwv wWWwWWWwv wWWwWWWwv wWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwv Try it online! It was taken from an earlier answer made by myself and 1000000000. # Evil The first problem with inserting the grass was that evil already had some ws in its code which would mess with the grass. In order to fix this I split the grass code into two sections straddling the evil code. Now evil had a little bit of a problem with the grass code. Each w in the grass code printed a null character \x00 so I needed to skip over all the ws, this was done easily with a f and an m. # Cubix Cubix once again broke because of the increase in program size so I had to move the capsule. Moving the Capsule broke cardinal, but I was able to fix it by adding an x before the Cubix. • SILOS has recently had changes, therefore, this was valid with a recent commit, but with the new version, l=61 // doesn't quite work, instead please change it to l+61 – Rohan Jhunjhunwala May 18 '17 at 21:57 # 12. Fission (110 bytes) Just adding yet another 2d lang... Streak of 3 2d-langs in a row, let's keep it moving folks! #v;2^0;7||"<+0+0+0+<*!2'!1'L;n4 #v0#_q@ #>3N. #|\w* #8 ^1b0< #| #M print(None and 9or 1/2and 1or 5) #jd5ki2 This prints 1 in Python 3, 2 in Vim, 3 in Minkolang, 4 in <><, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl, 10 in Befunge, 11 in Befunge-98, and 12 in Fission. Try it online! ### Explanation The only important piece of code is the first line These are the important bits >------< #v;2^0;7||"<+0+0+0+<*!2'!1'L;n4 ^ we start here by creating an atom moving Left (I could not use R for Right since that means Replace in Vim) 1' sets the atom's mass to the ASCII value of '1' ! outputs the atom's mass (as a character) 2' sets the atom's mass to the ASCII value of '2' ! outputs it * program terminates # Next... If Fission is causing trouble, remember, you can move the Fission code anywhere you want, since the start of the program is only identified by the commands that create atoms, and the program ends whenever the atoms are destroyed. You can also change the atom's start direction to suit your needs, R for Right (but Vim will interpret that as Replace), U for Up, D for Down (or Deletes entire line in Vim, can be useful). • This answer doesn't work with the Befunge93 answer, it only produces a 0 not 10. – Teal pelican Dec 7 '16 at 8:54 • @Tealpelican Works for me. Did you remember the ESC character between j and d on the last line? See the TIO link. – Zgarb Dec 7 '16 at 8:59 • @Tealpelican tio.run/nexus/… – user41805 Dec 7 '16 at 9:00 • Yeah my bad, for some reason chrome was removing it for me. – Teal pelican Dec 7 '16 at 9:23 # 25. Pip, 220 bytes #v16/"<"6/b.q@"(::)::: (22)S#;n4"14" #>3N6@15o|> ^*ttt*~++~~~% #=~nJ<R"12"; #[ #| print((eval("1\x2f2")and 9 or 13)-(0and+4)^1<<65>>62)#@46(8+9+9+9+9+=!)=#print(17)#3]#echo 21#===2|/=1/24=x=9+/ #8␛dggi2␛ |1|6//1''19+6 ␛ represents a literal ESC character, as per previous submissions. The 1|6 is used by both Retina and Japt and the // serves to comment out the end of the code so that Japt doesn't output anything else. I feel like 26 should be fairly 'easy' to sneak into the end since SMBF needs a trailing 6, so anything that will output the last item in the code (being 26) should be at an advantage... Perhaps 05ab1e? Good luck! • I had a look at 05AB1E. It almost works very easily; the main issues are Hexagony (this one's easily solvable), Pip, and Japt. (The problem is that Pip comments start with two spaces, and Japt doesn't like that at all, because a space is the equivalent of a closing parenthesis; this causes Japt to add opening parentheses to the start of the program to balance, leading to a syntax error because the closing parentheses are commented out.) 05AB1E next still seems like a good idea – it'll output 26 for almost any program ending 26 – but maybe you'll have to move the Pip earlier. – user62131 Dec 14 '16 at 15:35 • Followup: $// works as a comment marker in Japt that's happy to see spaces later on the line. I might have another try in a bit, but if someone else wants to get there first, go for it; testing a program in 26 different languages is exhausting. (Also, it's too late to edit my previous comment, but I should have said "almost any program ending "26".) – user62131 Dec 14 '16 at 15:44
• @ais523 Agree about tiring testing, such hard work! What's annoying is finding a problem in Japt and having to re-test the others! I did really enjoy this challenge though. I wonder if there's a record for the smallest polyglot with most languages... – Dom Hastings Dec 14 '16 at 15:45
• The problem is precisely that // is a comment marker in Japt, but Japt doesn't know it's a comment marker, so it tries to balance parentheses in it and ends up making things worse. // avoids that problem by telling it not to parse the stuff until the next dollar. – user62131 Dec 14 '16 at 15:46 # 26. 05AB1E, 224 bytes #v16/"<"6/b.q@"(::)::: (22)S#;n4"14" #>3N6@15o|> ^*ttt*~++~~~% #=~nJ<R"12"; #[ #| print((eval("1\x2f2")and 9 or 13)-(0and+4)^1<<65>>62)#@46(8+9+9+9+9+=!)=#print(17)#3]#echo 21#===2|/=1/24=x=9+/ #8␛dggi2␛ |1|6//1"'"'--1+26 ␛ represents a literal ESC character, which you likely know by now if you're here, but I'm reminding you just in case. I wish I could explain this a bit, but I mostly just stumbled through this blindly. Never heard of/used 05AB1E or Pip, and never used Pyth (which gave me the most trouble). 05AB1E saw most of the program as an unclosed string (from ")and 9 onwards), so that needed to be closed. Pip and Pyth didn't cooperate with the extra double quote initially, which turned into trial and error of single/double quote placement until they complied. The exact math used for Pip was mostly arbitrary, as long as it resulted in 25, so toying with that got me a plain 26 at the end for 05AB1E while still calculating the 25 needed for Pip. • You should probably note that you need to pipe in empty input for this to work (e.g. < /dev/null), otherwise the interpreter hangs waiting for input – Sp3000 Dec 17 '16 at 8:53 # 39. CoffeeScript, 828 bytes # 1"16" 3//v@#/;n4"14" #/*3 auaaZ<>16/"<"6/b.q@")(22)S# ␉␉␉␉ #yy␉;36!@ ### ␉ #=␉> #[#yy#yy0l0mx01k1k0l0ix0jx0h0h1d111P0eU0bx0b0o1d0b0e0e00x1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10mx0m0l11111100(^_) #<␉| print((eval("1\x2f2")and( 9 )or(13 ))-(0and 4)^1<<(65)>>(62))or'(\{(\{})(\{}[()])}\{}\{}\{})'#46(8+9+9+9+9+=!)#1111|=/=1/24=x=9[<+@+-@@@@=>+<@@@=>+<?#>+.--.]/ __DATA__=1#// #.\."12"*␉ ###; console.log 39 """"#// =begin␉// #*/ #define␉z sizeof 'c'-1?"38":"37" #include<stdio.h> int main() /*/ #()#\'*/{puts(z);;}/*' 'main'␉// #-3o4o# <>3N.<>␉// #xx #x%~~~+␉+~*ttt*.x #xx =end #// """#"#// #0]#echo 21#/(\[FAC,1<-#2FAC,1SUB#1<-#52FAC,1SUB#2<-#32FACLEGEREEX,1PLEASEGIVEUPPLEASE) ap #_~nJ|#o51\ #0␛dggi2␛␉|1|6//''25 >>>#>27.say# =#print(17)###^_^_7LEintndus({})!<>+]/*///Z/}23!@222999"26 ␉ is a literal tab, ␛ a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it. Try them online! ## Rundown This program prints 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Most of the languages are tested by the test driver shown above. You can test Reng here and Modular SNUSP here; they output 19 and 31 respectively, as required. Here is yet another evolution of the Incident tokenizer, I reworked it so the polyglot can be put directly to input and removed the linefeed replacing format from the test driver since it was no longer needed. Edit: Thanks to @SnoringFrog to pointing out how to fit CoffeeScript into the test driver. Link is updated. ## Explanation This answer came directly from this general polyglot tip by @Sp3000 where I learned that Coffeescript used # based comments, and a different block comment indicator than all the other languages we’ve used so far. @Sp3000’s example didn’t have the output going to STDOUT though. So I took a quick trip over to the PPCG Hello, World! Collection and found that @Lynn provided an example here that was closer to my STDOUT tastes. Sweet. Here are the CoffeeScript syntactic highlights: • # This is a line comment • ### This is a block ### • """ This is a literal string""" • console.log 39 # This is the STDOUT print statement There were only a couple quirks with CoffeeScript that I had to work out. First, the print statement really needed to live behind a # to hide from the other languages, but the statement seemed to want to be on its own line. This was eventually resolved by throwing a ; between the end of the comment block and the print statement. Second, the block comments seem fail on the C/C++lines. I’m not sure why exactly, but my guess is something to do with the /* comments. (CoffeeScript is used to programmatically generate JavaScript which uses /* comments. /Shrug. ) In any event, I found that I could use Python’s syntactically matching literal string to hide this code more effectively. So I simply dropped out of the block comment earlier than I had planned to print 39 and everything else was just magically hidden from CoffeeScript. Great Success! ## The Few Things I Did Break Retina didn’t like the line I inserted for console.log 39, so I needed to remove a line for Retina’s rule of even numbers. Maybe I just made that rule up, or maybe it’s legit. It feels legit. Anyways, there was already a do nothing line in the Python string. So I just removed that. This changed the value of Retina’s output, but that was easy to fix by throwing a few more 1’s in the long Python print statement. So far so good. Hexagony’s hex got bumped up to the next size, so I had to resolve that. But first, the new Hexagony module /(3!@) , while super effective, made my Prelude sense tingle. I didn’t like the idea of having to move this all the time for Hexagony’s alignment and then having to redo Prelude’s vertical parenthetic alignment. So I dug in and found a new Hexagony module that didn’t have this poly-linguistic baggage: /}23!@. Incident, in all these tweaks lost its singular left side incidental token. (Get it? Cuz it’s not used by Incident… Never mind). The easiest solution to re-balance Incident’s center token turned out to be CoffeeScript’s block comment. So, I added the 3rd ### just prior to final pair of jump tokens (^_). This put one unused token on the left side and eight unused tokes on the right side. (Eight minus one is lucky number seven.) This also happened to align the hexagon so the Hexagony module could be nested in Trigger’s code like so: Z/}23!@222999. Whitespace was the last piece of broken code, but it was not too difficult rebuild. It was just a matter of removing lines from the end until it worked, and then putting them back one by one and figuring out if I should make it a triple space line, a tab line, or a no whitespace line. Good Luck. • Nice one! There are definitely more things that can be done with #-initiated multi-line comments, I think. – Muzer Feb 4 '17 at 1:23 • @Muzer Thanks. Yeah, I decided go into some # space since you've been having so much success with the C variants. Looking forward to your next. – Chance Feb 4 '17 at 2:12 • coffee polyglot.poly is all you need to add it to the driver, at least that worked for me – SnoringFrog Feb 6 '17 at 15:38 • @SnoringFrog And of course it's the easy solution I didn't bother to try. Thanks! – Chance Feb 6 '17 at 19:42 • "Retina’s rule of even numbers" → Retina has two parsers, and (in the common case where lines don't contain the backquote character) alternates which one it uses from one line to the next. One is a lot more tolerant than the other one, so making sure that complex lines end up on the tolerant parser is likely going to be helpful. – user62131 Apr 27 '17 at 23:53 # 40. Minimal-2D, 902 bytes # 1"16" 3//v\(@#/;"14"\Dv #/*3 auaaZ<>16/"<"6/b.q@")(22)S# ␉␉␉␉ #yy␉;36!@ ### ␉ #=␉> #[#yy#yy0l0mx01k1k0l0ix0jx0h0h1d111P0eU0bx0b0o1d0b0e0e00x1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10mx0m0l11111100(^_) #<␉| print((eval("1\x2f2")and( 9 )or(13 ))-(0and 4)^1<<(65)>>(62))or'(\{(\{})(\{}[()])}\{}\{}\{})'#46(8+9+9+9+9+=!)#1111|=/=1/24=x=9[<+@+-@@@@=>+<@@@=>+<?#>+.--.]/ __DATA__=1#// #.\."12"*␉ ###; console.log 39 """"#// =begin␉// #*/ #define␉z sizeof 'c'-1?"38":"37" #include<stdio.h> int main() /*/ #()#\'*/{puts(z);;}/*' 'main'␉// #-3o4o# <>3N.<>␉// #xx\"R++++++++++++++++++\"++++++++++++++++++.----. #x%~~~+␉+~*ttt*.x #xx++U++++++++++++++++v<L>4n; =end #// """#"#// #0]#echo 21#/(\[FAC,1<-#2FAC,1SUB#1<-#52FAC,1SUB#2<-#32FACLEGEREEX,1PLEASEGIVEUPPLEASE) ap #_|#o51~nJ\ #0␛dggi2␛␉|1|6//''25 >>>#>27.say# =#print(17)###^_^_7LEintndus({})!<>+]/*///Z/}23!@222999"26 ␉ is a literal tab, ␛ a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it. Try it online! ## Rundown This program prints 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3. ## Verification Most of the languages are tested by the test driver shown above. You can test Reng here and Modular SNUSP here; they output 19 and 31 respectively, as required. Minimal-2D is not available on TIO, but a python interpreter is available here. Current version of the Incident tokenizer for working with Incident. ## Explanation I couldn't find something I knew that would work, so I googled "2D language" and used the first thing that popped up. Minimal-2D is essentially Brainfuck, except it lacks loops and used UDLR to redirect a pointer around. If the pointer hits an edge of the file, execution terminates. It can probably be golfed down somewhat; if I get a chance before the next answer comes in I'll try to do that. The D on the first line sends the pointer downwards to the L in <L>, then the rest is dumb, brute force brainfuck to the U and R. The ++ preceding the U is filler to not break Fission, and the final + on line 22 is Hexagony filler. ## Things that broke ><> breaks on D, so it's code is now redirected downwards. Since I was already extending line 20, I used that to terminate the string that got started, and moved the >4n; into line 22. I tried to just use ! to skip the D, but Turtled didn't like that. Fission broke in various places, which led to filler characters throughout this process. The ++ before the U is all that's left of that now, I think. Those could be changed to whatever is necessary for other languages. Perl 6 didn't like my unmatched >, so I added in a <. 05ab1e went a little crazy over my extra quotation mark, so I quoted most of line 20 to appease it. Pyth didn't like the D or the quotations, so all of those got escaped (at least I guess that's what happened? I just tossed a \ before all of them and it worked, so I moved on). Hexagony was broken most of the time. Then at the end it miraculously worked. Reng was apparently broken a few answers back and was outputting a nonprintable character before the 19. That's been fixed now by putting the Haystack code before the Reng. Incident, by this point, had picked up two new tokens that shifted the center, v and +<. So I changed my +< to +v<. Problem solved. ## Scores from The versatile integer printer Just for kicks and going off of @Stewie Griffin's comment on the question, here's a snippet that shows how each answer would have scored if it was entered into "The Verstatile Integer Printer". So far, looks like answer 31 was our best score with a .01094, but still not quite good enough to beat the best VIP score of .009185. // This was stolen/sloppily hacked together from the snippet here: https://codegolf.stackexchange.com/questions/55422/hello-world. Feel free to clean it up if you'd like. /* Configuration */ var QUESTION_ID = 102370; // Obtain this from the url // It will be like http://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe"; var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk"; var OVERRIDE_USER = 8478; // This should be the user ID of the challenge author. /* App */ var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page; function answersUrl(index) { return "http://api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=asc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER; } function commentUrl(index, answers) { return "http://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER; } function getAnswers() { jQuery.ajax({ url: answersUrl(answer_page++), method: "get", dataType: "jsonp", crossDomain: true, success: function (data) { answers.push.apply(answers, data.items); answers_hash = []; answer_ids = []; data.items.forEach(function(a) { a.comments = []; var id = +a.share_link.match(/\d+/); answer_ids.push(id); answers_hash[id] = a; }); if (!data.has_more) more_answers = false; comment_page = 1; getComments(); } }); } function getComments() { jQuery.ajax({ url: commentUrl(comment_page++, answer_ids), method: "get", dataType: "jsonp", crossDomain: true, success: function (data) { data.items.forEach(function(c) { if (c.owner.user_id === OVERRIDE_USER) answers_hash[c.post_id].comments.push(c); }); if (data.has_more) getComments(); else if (more_answers) getAnswers(); else process(); } }); } getAnswers(); var SCORE_REG = /<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*)[,\(].*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/; var OVERRIDE_REG = /^Override\s*header:\s*/i; function getAuthorName(a) { return a.owner.display_name; } function getScore(langs, bytes) { var l = Math.pow(langs,3); return bytes/l; } function process() { var valid = []; answers.forEach(function(a) { var body = a.body; a.comments.forEach(function(c) { if(OVERRIDE_REG.test(c.body)) body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>'; }); var match = body.match(SCORE_REG); if (match) valid.push({ user: getAuthorName(a), size: +match[2], language: match[1], link: a.share_link, score: getScore(match[1].split(".")[0],+match[2]).toFixed(6), }); else console.log(body); }); valid.sort(function (a, b) { var aB = a.size, bB = b.size; return aB - bB }); var languages = {}; var place = 1; var lastSize = null; var lastPlace = 1; valid.forEach(function (a) { if (a.size != lastSize) lastPlace = place; lastSize = a.size; ++place; var answer = jQuery("#answer-template").html(); answer = answer.replace("{{PLACE}}", lastPlace + ".") .replace("{{NAME}}", a.user) .replace("{{LANGUAGE}}", a.language) .replace("{{SIZE}}", a.size) .replace("{{LINK}}", a.link); answer = jQuery(answer); jQuery("#answers").append(answer); var lang = a.language; lang = jQuery('<a>'+lang+'</a>').text(); languages[lang] = languages[lang] || {lang: a.language, lang_raw: lang, user: a.user, size: a.size, link: a.link, score: a.score}; }); var langs = []; for (var lang in languages) if (languages.hasOwnProperty(lang)) langs.push(languages[lang]); langs.sort(function (a, b) { return a.lang_raw.split(".")[0] - b.lang_raw.split(".")[0]; }); for (var i = 0; i < langs.length; ++i) { var language = jQuery("#language-template").html(); var lang = langs[i]; language = language.replace("{{LANGUAGE}}", lang.lang) .replace("{{NAME}}", lang.user) .replace("{{SIZE}}", lang.score) .replace("{{LINK}}", lang.link); language = jQuery(language); jQuery("#languages").append(language); } } body { text-align: left !important} #language-list { padding: 10px; width: 400px; float: left; } table thead { font-weight: bold; } table td { padding: 5px; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="language-list"> <h2>Scores from <a href="https://codegolf.stackexchange.com/questions/65641/the-versatile-integer-printer">The Versatile Integer Printer</a></h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr> </thead> <tbody id="languages"> </tbody> </table> </div> <table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr> </tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr> </tbody> </table> • Fun note: changing the text after \" to ++]++++[>+++++++++++++<-]>.---<[-]>. will get brainfuck to output 41. Didn't have time to fix the problems that causes, but maybe it's a decent starting point for someone; esp with SMBF. – SnoringFrog Feb 6 '17 at 22:57 • I think your Tio link's code is different from your submission. Can you update? – Chance Feb 7 '17 at 4:10 • @SnoringFrog I was under the impression that the only way to produce SMBF code that will have a different result in BF, is to rely on undefined behaviour in BF? Even if you have a BF compiler that allows you to go left without UB, I suspect it'll be rather tricky to get them both to behave... perhaps not impossible though! – Muzer Feb 7 '17 at 16:47 • @Muzer It'd hinge on the interpreter. Assuming we use TIO, moving left from the start in BF doesn't error out, it's just a no-op. From there it's just getting BF/SMBF to enter/skip different loops than one another. This does it (kept the line structure of the current program but stripped unnecessary characters). Mixing that w/ the other langs is the issue then. – SnoringFrog Feb 7 '17 at 21:37 • @Muzer But I'm not seeing any good/easy way to do that. I'd wager the SMBF needs to be significantly altered to have a chance at making this work with everything else. That line 1 period is annoying. – SnoringFrog Feb 7 '17 at 21:58 # 29. Trigger, 292 bytes #v16/"<"6/b.q@"(: ::T): :(22)S#;n4"14" #>3N6@15o|> ^*ttt*~++~~~% #=~nJ<R"12"; #[ #<| print((eval("1\x2f2")and (9) or (13))-(0and 4)^(1)<<(65)>>62)or'(\{(\{})(\{\/+23!@=}[()])}\{})(\{}\{})'#@46(8+9+9+9+9+=!)=#print(17)#]#echo 5+5+11#|/=1/24=x=90/ #8␛dggi2␛ |1|6//''25 #>say 27#T222999"26 Something must have been working in my subconcious in the time since the last submission to this challenge, because by the point I decided it was running low on time and I wanted to ensure it wouldn't die, I suddenly remembered a language from years back that could be added fairly easily as seen by the low increase in the byte count, and quite a bit of that was due to Hexagony rather than Trigger itself. Except for commands that assign to variables (which mostly don't matter), all Trigger's commands contain two consecutive equal characters. The first time this happens is in the Underload code in the first line, so I simply modified that a bit to jump to almost the end of the program, and placed the Trigger code to print 29 (which is 222999) there. The jump label I used is T (originally I tried U but Fission disliked it), but if you need to use a capital T in your own program for some reason, you can easily change both occurrences to something else that isn't used in your program. Very little else needed changing, apart from (as always) the Hexagony. I decided it was time to stop messing around with formatting the code into a hexagon by hand, but luckily we've already had a challenge about Hexagony parsing, so I went and modified this answer to the challenge into an online-usable Hexagony formatter that handles backticks correctly (here). Here's how this version of the program looks as a hexagon: # v 1 6 / " < " 6 / b . q @ " ( : : : U ) : : ( 2 2 ) S # ; n 4 " 1 4 " # > 3 N 6 @ 1 5 o | > ^ * t t t * ~ + + ~ ~ ~ % # = ~ n J < R " 1 2 " ; # [ # < | p r i n t ( ( e v a l ( " 1 \ x 2 f 2 " ) a n d ( 9 ) o r ( 1 3 ) ) - ( 0 a n d 4 ) ^ ( 1 ) < < ( 6 5 ) > > 6 2 ) o r ' ( \ { ( \ { } ) ( \ { \ / + 2 3 ! @ # } [ ( ) ] ) } \ { } ) ( \ { } \ { } ) ' # @ 4 6 ( 8 + 9 + 9 + 9 + 9 + = ! ) = # p r i n t ( 1 7 ) # ] # e c h o 5 + 5 + 1 1 # | / = 1 / 2 4 = x = 9 0 / # 8 ␛ d g g i 2 ␛ | 1 | 6 / / ' ' 2 5 # > s a y 2 7 # U 2 2 2 9 9 9 " 2 6 . You might well have noticed that the Nim code is more verbose than it used to be. This is purely because padding it out as 5+5+11 rather than 21 happened to make the Hexagony line up perfectly; if you start at the / of /+23!@#, you can see an uninterrupted run of Hexagony-safe characters, and that's how I made that part of the program work. • +1 for the updated hexagony formatter. Are there any online resources for testing in Trigger? I think it may have blown out my next solution. :P – Chance Jan 5 '17 at 17:00 • @Chance: Not yet, although I put in a request for it on TIO. Also, I'd be both surprised and upset if Trigger ended up blocking a language, because it's fairly easy to work into a polyglot; it doesn't parse code you jump over, and its jumping ability is fairly flexible. – user62131 Jan 5 '17 at 17:16 • Yeah, I've been digging into some turing tarpits with limited character sets, which had a lot of repeated characters as you'd expect. I'll read up about Trigger's jumping ability though. Maybe it is workable. – Chance Jan 5 '17 at 17:40 • @Chance: The : ::U in the current program jumps to the U at the end. Everything in between won't even be parsed, so you can repeat as much as you like there. – user62131 Jan 5 '17 at 18:31 • /+23!@= != /+23!@# – CalculatorFeline Mar 10 '17 at 17:16 # 68. Python (1.6.1), 1698 bytes #16 "(}o+?23!@)-("//*\Dv;'[af2.q]PkPPX'#CO)"14";n4 #/*0|7//" [-'v][!(>77*,;68*,@;'1,@10␉␉11)(22)S␉␉(1 P''53'S^'q #>␉ # 36!@␉ # #_>++++.>++++++::@-----x-.+? #< #<]}} +<[<.>>-]>[ #{ #z} # #=x<R+++++[D>+++++++59xL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---4O6O@.>][ # #x #x%+>+=ttt Z_*. #D>xU/-<+++L #R+.----.>]| #[#[(?2?20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_00) [ "]56p26q[puts 59][exit]" ,'\[' ];#/s\\/;print"24";exit}}__DATA__/ # ###x<+@+-@@@@=>+<@@@=>+<?#d>+.--.
#
'((( p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A )echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f 2")and 9or 13<<(65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{}) ){}{})>){(<{}(({}){})>)}{}({}())wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWW li ha '#}#( prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"'
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
=begin
<>{nd
#sseeeemPaeueewuuweeeeeeeeeeCis:ajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define u8 "38\0"
#define p sizeof'p'-1?u8"67":"37"
#include<stdio.h>
main ( ){puts( p);}/*
print 61
#}
disp 49;
#{
}<>
$'main'3 #-3o4o#$$#<T>"3"O.s =end """#" #} #sx|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi ax fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm # sss8␛dggi2␛|// ''25 16*///~-<~-<~-<<<~-XCOprint("65")#s^_^_2229996# VIP score (Versatile Integer Printer): .005400 (to improve, next entry should be no more than 1773 bytes) Try it online! ## Rundown This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11 68 in Python ## Verification Most languages can be tested with the test driver above, but 6 languages have to be tested locally. • Reng can be tested to output 19 here. • Modular SNUSP can be tested to output 31 here. • Incident was verified to test 33 locally. • Deadfish~ can be tested to output 48 locally, using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are n unavoidable consequence of running any Deadfish~ program. • Moorhens 2.0 can be tested to output 60 using this interpreter. • Surface can be tested to output 66 using this interpreter run using Wine (It probably works on Windows but Windows is not a free software, so it would be forbidden for this challenge (I also don't have it so I can't test it anyway)) ## Explanation We already had two versions of python so I thought, why not add a 3rd. The first thing Python took issue with was "1\x2f2". It parses \x2f2 as one character instead of two separate characters. In order to remedy this I inserted a new space between f and 2. Now Python outputs 13 as if it were Ruby. This meant I wanted to separate it from Ruby and Python 2, making 68 instead of 13. To do this we rely on python's limited precision, not present in Ruby or Python 2. In ruby or python2: 13<<65>>65 Is just 13, but in python it is 0. We use this to short circuit an or causing Python to get a 68 instead of a 13. Ok so what did I break? Surprisingly not much. When I ran this in TIO the only thing that broke was Brain-Flak Classic. ## Brain-Flak Classic Brain-Flak Classic had a problem with <<>>. This is a stack switch and caused Classic to get caught in a loop. We could remedy this by placing parentheses around 65, this will cause the <<>> to become <<()>> which is a noop. ## Prelude Fixing Brain-Flak broke prelude again. I added a space to counteract the movement caused by fixing Brain-Flak. • I confirm that it works in surface on windows (no null bytes). – stasoid Jun 5 '17 at 20:33 # 128. Haskell, 4904 bytes #16 "?63(o?23!*# #@"/*"r"{\Dv;'[af2.q]PkPPX)$$'#CO"14" ^; */ #/*0|7//" [>.>.])[-'][(x>77*;,68*,@,1',;# l1011)(22)/ \S \7aa*+42@n;iiipsddpsdoh coding=utf8␉␉␉␉(1P''53'S^'?????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx #>␉xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxOBxxxxxV/112\n # 36!@␉ e++++++::@ / "78"oo@xxxx h#115 o# doxe b xx----- #cxx#z#111#y#y#y#_#11111xx #~==++++++++++++++++++++++++++++++++++++++++x+++++++++.._+++++++. #<============================================================ #<<<#>>]}}+-[.^+.._]+-+<[<<.>>x>-]>[ #{ #x} #2""/*\* #=x<R+++++[D>+++++++q L+++<-][PLACET,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@.>][ #x%+>+=ttt Z_*. _ _ _ #D>xU/-<+++L _ #R+.----\$$.>]| #[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00@O6O4/m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0 )0\\ [ "e.1'.0'.6''i]56pq{}26q[puts 59][exit]" ,'_\[999'];#/s\\/;print"24";exit}}__DATA__/ ###x<+@+-@@@@=>+<@@@=>+<?#d>+.--.<!\ '(wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx (([5]{})))␉\';';print(( eval("1\x2f 2") and 9or 13<< (65)>>65or 68)-(0 and eval("\"ppp\".bytes.class==Array and 4or(\"ar_\"[2]==95 and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<*.*\>]xxxxxxxxxxxxx)'# \\ __DATA__=1#"'x" #.;R"12"' ###;console.log 39; '_(*****************819+*+@[*99[?]*]***|! )' #\\ """"#\ ' ( <>< ( )> ){ ({}[()] )}{\'; a=(printf \\x00 ) ;b={#a};#\\ " }"'; (( ( (';case "{"ar[1]"}"{b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*) echo 58;;esac;exit;#(((('))))#\ =begin #p +555/2+55x%6E2x ;set print "-";print 89;exit# ss9 utpb now 70 dollar off! utpb has been selling out worldwide! #9999 9seeeemPaeueewuuweeeeeeeeeeCis:aj (japppppp😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀 👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡ 😊♈💖 😇♈♈ 😊♉♈ +-------+ 😇♈♈ |0011 \| 😇♈♉ |/1000 /| 😇♈💜|\ 0011\| 😊♉♈ |/01 00/| 😊📢♈|\ 0011\| 😈♈💜|@ 0110/| 😊📢♈| | 😇♉💞+-------+ 😊📢♉ 7 UP 7 RIGHT 7 RIGHT 7 TEACH 6 BOND 6 BOND 6 BOND 5 RIGHT 5 LEFT 5 RIGHT 7 BOND 7 TEACH 5 TEACH 6 YELL 5 TEACH 6 YELL 6 YELL You can see a y and a x here. <>< >{-< >SET y TO 88. < >SET x TO 32. < >PUT x IN y. < >X y. PPVs""o< >-} set ! 57,,...,,.,,..,,,,,,..,,,.^ set ! 51. # More 91 of thiset of re9 red down one blue up red down one blue up red up one red right two blue up ssswwwWWWwWWWWWwWWWWWWWwWWWWWWWWW How much is it*/ #if 0 .int 2298589328,898451655,12,178790,1018168591,84934449, 12597 #endif//* #1"" //* #include<stdio.h> #define␉ x(d)␉#d #define u8 "38\0 "//" char*x[]={"23 7 20 1 ", # define _ , "z c #0C8302"_"b c #B87A63"_"_ c #0000C0"_"d c #708FB7"_"e c #58007B"_"f c #FFC0FF"_"O c #FFFFFF"_"y c #FFFF00", "h c #E60001 "_"i c #CAFFFF" _"j c #280000"_"k c #CA0000"_"l c #E60100"_"m c #CA007F"_"n c #330001 "_"q c #E60000", "c c black", "g c green","x c blue","o c magenta", "fheyyyyyyyyyyyyyyyyyyyz", "fibyyyyyyyyyyyyyyyyyyyz", "fjbyyyyyyyyyyOyOdObOOOO", "fkggyyyyyyyygOOOOOOOOOO", "flmnqcccccccccccccccccc", "fffoOOOxxxxx_oOxxx_Oxo_", "fffOOOOxxxxxOOOxxxOOc__"};//" int y(){puts ( sizeof (0,u8)-5?u8"67":*u8""?"37":x( 0'0 "'\"")[9]?"75":'??-'&1? "79":"77" );"21015""6 27""Zingeg-' ?";return 2;}int z=0;int q(int a,int b){return b;}main(){q(z++,z++)?puts("124"):y ();}//*/ #1"" /*/ 1<2 >main=putStr"128" #1"" /*/ #if 0 #endif//* --... ...-- /*/ p=sizeof("9( 999 99\" ) ;print'(''72'')';end! " );main( ){puts('??-'&1?"101":"92");return(9-9+9 -9);} #if 0␌ #endif//* rk:start | print: "69" rk:end<9 >5b*:,1-,@ print 61 #} disp 49 ;9; #{ }{}<> K y7g+H ; 'main'3x # | #-3o4o#$$$
#<T>"3"O._</+++++++>/+++<-\>;+=4C++.---.
#<<<#>>> / 44
reg end="";print(85);reg s#+++;+++++++++++++++++++++++++++++++++++++++++++++++++++++.-.
=end
;"""#"#pxxxxcly"78" \++++>/<~#class P{ function:Main(a:String[] )~Nil{83->Print();} }
#}S9^7^8^MUOUOF@0:8:8\\ _@125iRE
#s|)o51~nJ;#:p'34'3 \=#print(17)#>27.say#]# print(47 ) #]#echo 21 #fWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M|$//'' 1$6~-<~-<~-<<<~-COprint("65")#asss^_^_#
#9 "25" +/ ppppppp (x*n*n*n*e*s*s*s*ee*n*n*n*e*sss*e*n*n*n*ee*s*e)*///V222999686#
VIP score (Versatile Integer Printer): .002338 (to improve, next entry should be no more than 5018 bytes)
This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt 1.4, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby 2.4.1, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03(gcc), 38 in C99(gcc), 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11(gcc), 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11(gcc), 76 in Trefunge, 77 in C++14(gcc), 78 in dash, 79 in C++17(gcc), 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice, 88 in PingPong, 89 in gnuplot, 90 in RunR, 91 in Cood, 92 in C89(gcc), 93 in Set, 94 in Emotinomicon, 95 in Emoji, 96 in EmojiCoder, 97 in Cubically, 98 in Archway2, 99 in 99, 100 in brainbool, 101 in K&R C(gcc), 102 in Symbolic Brainfuck, 103 in Unicat, 104 in Paintfuck, 105 in Emoji-gramming, 106 in Unlambda, 107 in Gol><>, 108 in Ruby 1.8.7, 109 in DOBELA, 110 in Ruby 1.9.3, 111 in Del|m|t, 112 in Pyramid Scheme, 113 in ADJUST, 114 in Axo, 115 in xEec, 116 in Piet(XPM), 117 in Stones, 118 in MarioLANG, 119 in ImageFuck, 120 in TRANSCRIPT, 121 in Braincopter, 122 in Monkeys, 123 in Mycelium, 124 in C(clang), 125 in Gammaplex, 126 in Nhohnhehr, 127 in Deltaplex, 128 in Haskell
## Verification
Try it online!
Languages that are not in the driver:
• Japt (7) online.
• Moorhens (60) local. Use moorhens.py from the v2.0-dev branch.
• Objeck (83) local
• RunR (90) local
• Emotinomicon (94) online
• EmojiCoder (96) online
• Cubically (97) local
• Symbolic Brainfuck (102) local
• Paintfuck (104) online (9x9 grid, origin at top-left)
• Gol><> (107) local, online
• Ruby 1.8.7 and 1.9.3 (108 and 110) installed locally using rvm
• Piet (116) local
• Stones (117) local
• ImageFuck (119) local
• Braincopter (121) local
• Mycelium (123) local
• Deltaplex (127) local
## Explanation
We’ve been chasing Haskell in polyglot chat for quite some time. It has long seemed an attractive option because it supports literate programming natively. Literate programming is sort of a philosophy that says a program should primarily be written for the benefit of the person reading the code. In Haskell this means that instead of comment blocks, you’d have non-comment blocks. Sound’s attractive right?
Well, not so much.
Haskell seemed to interpret the first line of the polyglot as the same preprocessor directive we’ve all come to love, but then failed on line 2. This seemed like a blocking issue for a long time, until I started looking into Haskell’s option to use C-style preprocessor directive.
Much like FORTRAN, Haskell’s C-preprocessor allowed c-style block comments (/*bla*/), which vastly simplified the insertion process.
Haskell, unlike the other members of the /* comment family only seemed to read start and end comment declarations on lines that start with #. This was a difference that could be leveraged easily enough, so I went back to my documentation in the FORTRAN answer to figure out which languages were commented where.
The insertion point I choose was immediately after the C family languages, where a //*/ was purported to take all the related languages out of their comment state. A careful read of the polyglot up to this point told me that Haskell had still never dropped out of its pre-processor comment, so a #1"" /*/ statement is read by all the languages, and accepted because it is essentially the same directive used on line 1, and the /*/ is a toggle to initiate a comment for everything not in a comment, and to close the comment for the only one left open: Haskell.
So now we have a private place to put our Haskell print statement: >main=putStr"128". The > here is the Bird style literate programming I mentioned earlier to indicate this is code and not comment. Everything else on this line is just a modification of Tio’s “Hello, World!” example.
After this line I wanted to flip all the comments to the state they were in prior to editing. A simple #/*/ would do this, but Haskell protested because of the way the polyglot ends. On the last line with code, we use */// to end the block comment and initiate a line comment to hide the remainder of the code, but Haskell didn’t accept // as a preprocessor comment indicator, and concatenated the before and after of this block as #//, which it declared an error worthy invalid preprocessor declaration. Haskell allows junk code after a valid preprocessor declaration however, so we just needed to change #/*/ to the gold standard directive of #1"" /*/.
## Transcript
Ok, now we’ve hidden all the invalid preprocessor directives from Haskell’s pre-parser (Is that a thing? That must be a thing.) But we still had the main parser to deal with. Almost everything is hidden by our commitment to literacy, but Transcript also uses Bird style code declarations, so it had to be dealt with. Fortunately, Transcript didn’t have a problem with being encased in a Haskell comment block. So, with a couple adjustments for Perl and Incident, this:
You can see a y and a x here. <
>SET y TO 88. <
>SET x TO 32. <
>PUT x IN y. <
>X y. PPVs""o
Became this:
You can see a y and a x here. <><
>{-<
>SET y TO 88. <
>SET x TO 32. <
>PUT x IN y. <
>X y. PPVs""o<
>-}
I should also note here that Haskell comments don’t like to touch Haskell code. You need a buffer line between. So, I’m adjusting for that and Retina her as well.
## S.I.L.O.S.
Finally, within the Haskell private code block, I had to add a < preceding the > code indicator to balance the symbols for Perl6 and the Flaks. Attempting to put a lone < on the line above worked for everything except S.I.L.O.S.. It saw this as something it should parse, and then crash about. The simple fix was to make the statement into this S.I.L.O.S. parse-able statement: 1<2. So, in total, the main Haskell section is now this:
#1"" /*/
1<2
>main=putStr"128"
#1"" /*/
• I think what happens is that the "literate pre-processor" runs first, stripping away everything except lines starting with # or > (or in LaTeX-style \begin{code} blocks), and that happens before it gets sent to CPP. This would explain why CPP is not parsed on other lines, and also means it could be put on > lines if you want. Also it means you've hidden things from the final normal Haskell parser, not a pre-parser. – Ørjan Johansen Sep 7 '17 at 2:48
• @ØrjanJohansen Testing confirms your thinking. Thanks for the insight! – Chance Sep 7 '17 at 4:18
• This is impressive. Thanks for adding it. – stasoid Sep 7 '17 at 8:07
• runhaskell can accept options for particular phases, -optL passes the option to literate pre-processor (unlit). Unfort-ly, there is curr-ly no way to config unlit to remove lines starting with #, which can be considered a bug 'cause it must remove them according to docs. unlit.c already has necessary var leavecpp which is set to 1 by default, but there is no command line option to change it. – stasoid Sep 7 '17 at 8:56
• @ØrjanJohansen Might not be the reason why but the loops cancel thesmselves in Alphuck with putStr. – Potato44 Sep 9 '17 at 2:21
# 155. Simula (cim), 7000 bytes
#16 "?63(o+?50;+'51;'# #@"/*"r"{\D-v e-'[fa5.q]PkPPX)$$9 '#CO"14"^ 92*/ #/*0|7//" [>.>.])[-'][( 7 >77*,68*,@'_ 7 )(22)S/ \ 5 \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλiiipsddpsdoh k zzzzkf kf k zzzzzd kf k zzzzza kf bfz(coding=utf8␉␉␉␉1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????! #>c#z#111#y#y#y#_#1111xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/112\␉ # 36!@␉ e++++++::@ /"78"oo@ h#115 o# do x----- #comment afTaTaTa TbTbTbRtRtRtVkVk-VkRcRcRcBkBkBkMbMbMbLzLzxxxxxxxxxxxx8=, #~==++++++++++++++++++++++++++++++ +++++++++++++++++++.._+++++++. #<============================================================ x #<<<#>>]}}+-[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]+-+<[<<.>>x>-]>[ #{ #x} #2""/*\* #=x<R+++++[D>+++++++ L+++<-][PLACET,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@._+>][ #x%+>+=ttt Z_*. _ _ _ #D>xU/-<+++L #R+.----._>]| #[#[(+?+?0l0v01k1kMoOMoOMoOMoOMOOx0l0ix0jor0h0h1d111 0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n114O6O@MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0 )0\\ [ "e.1'.0'.6''i]56pq{}26q[puts 59][exit]" ,'_\[999'];#/s\\/;print"24"; exit}}__DATA__/ ###x<+@+-@@@@=>+<@@@=>+<?#d>;?\:-._++._++++._#/<?\>3-++._6+---2._#</++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.!\ '(wWWWwWWWWwvwWWwWWWwvwWWWwWWWW\WWWWwWWWWwWWWWW/WW\wWWWWWWWWwwwwvwWW/WwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx (([5]{})))\';';print(( eval("1\x2f 2") and 9or 13<< (65)>>65or 68)-(0 and eval("\"ppp\".bytes.class==Array and 4or(\"ar_\"[2]==95 and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{( <(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*.*]*.*(<\>]xxxxxxxxxxxxxxxxxxx)'# \\ __DATA__=1#"'x" #.;R"12"' ###;console.log 39; 999; #\\ """"#\ ' ( <>< ( x)> ){ ({}[( )] )}{\'; a=(printf \\x00 ) ;b={#a};#\\ " }"'; (( ( (';case "{"ar[1]"}"{b} in *1)echo 54;;*4)echo 78;;*1*) echo 50;;*) echo 58;;esac;exit;#(((('))))#\ =begin #p +555!/2+55x%6E2x********>********************828+*+@[*9 9[?]*]*****|! ;set print "-";print 89;exit# ss9 111<eP+x+x+x+x+x*D*x+x+x+1+x+1E!s utpb now 70 dollar off! utpb has been selling out worldwide! #9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjapppppp⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀 👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→ 밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん 😊♈💖 😇♈♈ +-------+ 😊♉♈ |0011 \| 😇♈♈ |/1000 /| 😇♈♉ |\ 0011\| 😇♈💜|/01 00/| 😊♉♈ |\ 0011\| 😊📢♈|@ 0110/| 😈♈💜| | 😊📢♈+-------+--- 😇♉💞 😊📢♉⠀⢃⠛⠋ 1 1 ! ! 2 ! ! 1 !! 1 x* 53 + 1 x* 51 + 1 x* 34 + 15 + ? ?@ ! 1 * ?@ ? 1 ! + * 1 ? ! ? 1 ! ? @ ? < < << < < < B= ===== =>8 = , 8= > B = = = == = = > 8 = D B = D x xxx x = > 8 = > ~ B = = = = > ~ B = D ~ 8 = > xx x x x x x xx x x x x xx x x x xx xx x x xx x 8=,x x 7 UP 7 RIGHT 7 RIGHT 7 TEACH 6 BOND 6 BOND 6 BOND 5 RIGHT 5 LEFT 5 RIGHT 7 BOND 7 TEACH 5 TEACH 6 YELL 5 TEACH 6 YELL 6 YELL Yo::=~147 ::= You can see an x here.<<110[0]{472454523665721469465830106052219449897} 9 >{-<< >SET x TO 120. >X x. PPQ-} >main=print 146{-ss set ! 57,,...,,.,,..,,,,,,..,,,.^ set ! 51. #"1015""6027""ing-?"ye h m 3 ;p seLz More 91 of thiset of re9 red down one blue up red down one blue up red up one red right two blue up ssswwwWWWwWWWWWwWWWWWWWwWWWWWWWWW baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet How much is it*/ #if 0 .int 2298589328,898451655,12,178790,1018168591 ,84934449, 12597 #endif//* #1""//* #include<stdio.h> #define x(d) #d #define u8 "38\0 "//"16 char*x="24 10 31 1" "a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302" "h c #E60001""i c #CAFFFF""j c #280000""k c #CA0000""l c #CA007F""n c #330001 ""q c #E60000" "o c #FF8000""t c #FF00BC""u c #008080" "A c #0040C0""E c #808000""F c #00C040""G c #008000 ""R c #800000" "H c #0000AA""I c #00AA00""J c #55FFFF""K c #AAAAAA" "r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF" "HHHahtdegggggggyrggggggc" "IHHaixuEFbGGbggbryAEGRgc" "JJHajyurbgbgggggggb____o" "IJHakmyyyyyyyyyyyyyyyyye" "I__almyyyyyyyyyyyyyyyyye" "K__anmyyyyyyyyyyyyyy_y_e" "HH_aqggyyyyyyyyg____m_Je" "JH_axxxxxxxxxxxxxxxxxxxx" "K__aaaam___bbbbbBm_bbBab" "K__________bbbbb___bbxbb";//" int y(){puts ( sizeof (0,u8)-5?u8"67":*u8""?"37":x( 0'0 "'\"")[9]?"75":'??-'&1? "79":"77" );return 2;}int z=0;int q(int a,int b ){return b;}main( ){q(z+=1,z)?puts("124"):y();}//<*/ #1""/*/ >main=putStr"128"--} #1""/*/ #if 0 #endif//* --... ...-- /*/ p=sizeof("9( 999 99\" ) ;print'(''72'')';end! "); main( ){puts('??-'&1?"101":"92");return(9-9+9 -9);} #if 0 #endif//* rk:start | print: "69" rk:end 9 @,-1,:*b5<>␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋ print 61 #} disp 49 ;9; #{ }{}<> K yya+- & g+ 'main'3x A=AgRA; AC #-3o4o# #<T>"3"O._</+++++++>/+++<-\>+++.---.\_<!+++++++++++++++++++++++++++++++++++++++++++++++++._++.-.>@ #<<<#>>> / reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-. =end ;"""#"#xxxxclou"78" \++++>/<~#class P{function:Main (a:String[] )~Nil{83->Print();}} #endcOmment #nocOmment outtext("155" ) #}pS9^7^8^MUOUOF@0:8:8 \\ @,,1'1'<> _@125iRE # |o51~nJ;#:p'34'3 \=#print(17)#>27.say#]# print(47)#]#echo 21#WWWWWWWWWWWWWWWwWWWWWWWWWWWWwv>++++ #8M| <esc>dggi2<esc>// }<}}<}>}[<<}< <<<<}<<}<<<<}<<<}}}<}}<}}<}}< }}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}+++++++++++++++++++++++++++++++++++++++++++++++++._++.._#]~-<~-<~-<<<~-<COprint("65")#=>asss^_^_# #9 "25" +/ppppppp neeeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee<*s 5>1 *e*///$$Q222999686#
Try it online!
Simula is an object-oriented extension of ALGOL. Simula does not allow most of non-whitespace controls (link). Before this addition polyglot had only one such character - ESC for V. To get rid of it I used V verbose mode in which <esc> can be used instead of literal ESC character.
Cim Simula compiler (installed on tio) has preprocessor. I used #comment and #endcomment to hide the bulk of polyglot and #nocomment to insert Simula code on a line starting with #. Invalid preprocessor directives are ignored.
Line 5:
#comment af ...
Lines 153/154:
#endcOmment
#nocOmment outtext("155" )
To fix evil: removed a before f on the first line, added af after #comment. Removing a from the first line breaks Beatnik, so I just swapped a and f. Capital Os are for ADJUST.
Line 157:
#8M| <esc>dggi2<esc>// ...
Separated Retina from V. Two spaces before <esc> are for Pip, third space is to fix Archway. // after <esc> is for V. Two es in <esc>s are compensated by removing two es from Paintfuck. Two ss are compensated in alphuck by removing ss from lines 156/157 (previously 154/155). One of these ss is skipped by Paintfuck, so we still need to add one n to fix it. Two <s are compensated with two }<} in BitChanger.
Removed $, '' and string of {s from line 157. Small refactoring: 2 + 35 for l33t on the first line. • That's not just "an object-oriented extension of ALGOL", that's the oldest OO language, period! – Ørjan Johansen Nov 10 '17 at 3:19 • #comment af ... well that's a pretty good description of this polyglot – Kamil Drakari Nov 15 '17 at 21:35 # 87. Alice, 2448 bytes #16 "}(o+?23!@- "/*\Dv;'[af2.q]PkPPX)$$'#CO"14";*/ #/*0|7//" )[-'][(>77*;,68*,@,1',;# l1011)(22)\4nS ␉;␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx #>␉ # 36!@␉ #~ #_>++++.>++++++::@---x---.+? #< #<<<#>>]}}+<[<<.>>x>-]>[ #{ #x} #2""/*\* #=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][ #x%+>+=ttt Z_*.ar4O6O@ #D>xU/-<+++L #R+.----$$.>]| #[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO/"78"oo@0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0 [ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/ ###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw((.*.*.*.*.*.*.*.*.*.*819.+.*.+@[5]{}) ) )␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<\>@*99[?]*]*.*|!)'#
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
' (<>< ( )> ){ ({}[()] )}{\'; a=$(printf \\x00 );b=${#a};
" }"'; (( ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))
=begin
utpb now 70 dollar off!
utpb has been selling out worldwide!
#seeeemPaeueewuuweeeeeeeeeeCis:ajjappp*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h>
#define ␉l(d)␉#d
#define u8 "38\0\0"
main ( ␉){puts( sizeof (0,u8)-5?u8"67":*u8""?"37":l( 0'0 "'\"")[9]?"75\0":'??-'&1? "79":"77\0");}//*/
#if 0
#endif//* --... ...--
/*/
print'("72")';end;
#if 0␌
#endif//* rk:start | print: "69" rk:end<>5b*:,1-,@
print 61
#}
disp 49;
#{
}{}<>
$'main'3 #-3o4o#$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>>
reg end="";print(85);reg s
=end
;"""#"#yxxxxxxx"78"\++++>/<~#class P{ function:Main(a:String[] )~Nil{83->Print();} }
#}
#s|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47) #]#echo 21#fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M|$//'' 16~-<~-<~-<<<~-COprint("65")#sss^_^_# #5 "25" +/ *///X222999686# VIP score (Versatile Integer Printer): .003717 (to improve, next entry should be no more than 2533 bytes) ## Rundown This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice ## Verification Try it Online! Languages currently not on TIO: • Japt, 7 online. • Reng, 19 online. • Deadfish~, 48 local. • Moorhens, 60 local. use moorhens.py from the v2.0-dev branch • Morse, 73 local • Archway, 74 local • Trefunge-98, 76 local. Use -v 98 -d 3 for Trefunge-98. • Objeck, 83 local • zkl, 85 local ## Explanation Alice is a 2D language created by Martin Ender. As well as the orthogonal movement that most 2D languages have it also has diagonal movement. Although we don't really use it in this program each character performs a different operation depending on whether travel is orthogonal or diagonal. Operations with integers when moving orthogonally and string operations when moving diagonally. Mirrors (/ and \) are how the IP changes between orthogonal and diagonal movement. This diagram from the github explains in which way they do so: The IP starts in the top left corner travelling East. We travel over some commands that don't do anything besides add junk to the stack until we reach /. This sends the IP South-East which we will go through a couple of other commands that don't do anything important until we reach /"78"oo@ embedded in the Incident/Whirl/Cow line (The reason it is here and not earlier is because Underload didn't like it earlier). The IP comes into this snippet on the / which changes its direction from South-East to East. The " then puts Alice in string mode. As we are in String mode the 7and 8 don't perform their normal action. The second " then closes string mode; since we are travelling orthogonally this means the ascii values of the characters we passed over in string mode are pushed onto the stack, one number per character. The o command is the output top of stack (truncated to one byte) command. Passing over two of these will output the '8' and then the '7'. @ then ends the program. ### Incident Some of the x just before the archway loop were replaced with "78" to prevent 8" and 78 from becoming tokens • The mirrors behave more like lenses. If they were mirrors, the IP wouldn't go through them. – CalculatorFeline Sep 27 '17 at 17:01 • @CalculatorFeline I prefer the description Martin gave somewhere. The path the IP follows is like what would happen if you were to hold a stick up to a mirror and came in travelling along the stick and then came out along the reflection of the stick. – Potato44 Sep 27 '17 at 17:07 # 170. Haskell with NegativeLiterals, 8944 bytes #16 "?63(o+?50;+'51;'# #@"/*"r"{\D-v e-'[fa5.q]PkPPX)$$9 '#CO"14"^ 92*/ #/*0|7//" [>.>.])[-'][( 7 >77*,68*,@'_ 7 )(22)S/ \ 5 \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλiiipsddpsdoh k zzzzkf kf k zzzzzd kf k zzzzza kf bfz(coding=utf8 1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????! #>c#z#111#y#y#y#_#1111x -x xxxxxxxxxxxxxxxxxxxxxxxxx/112\ # 36!@ e ++++++::@ /"78"oo@ h#115 o# dO x----- #comment -[af] tAtAtA TbTbTbRtRtRt-VkVkVkRcRcRcBkBkBkMbMbMbPSPSPSpspspsQhQhQhQrQrQrHnHnHnbqbqbqLzLzLzTcTcTcxxxxx8=, #~==++++++ ++++++++++++++++++++++ +++++++++++++++++++++.._+++++++. #<=============================================================== p #<<<#>>]+-}}[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._++++._+++._^<]+-+<[<<._>>x>-]^>[ #{ #cs} #2""/*\* #=x<R+++++[D>+++++++9999 9 9 L+++<-][PLACET,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@._+>][ #x%+>+=ttt_Z_*.9 999 99 9999 9 _ _ _ #D>xU/-<+++L_9 #R+.----._>]| 9 9999 #[#[(+?+?0l0v01k1kMoOMoOMoOMoOMOOx0l0ix0jor0h0h1d111 0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11yxMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOotMOo0moo0n0tx0t0moO0fx4O6O@ 0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0 )000011100\\ [ "e.1'.0'.6''i]56pq{}26q[puts 59][exit]" ,'_\['];#/s\\/;print"24"; exit}}__DATA__/ ###x<+@+-@@@@=>+<@@@=>+<?#d>;?\:-._++._++++._#/<?\>3-++._6+---2._#</++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.>!\ '(wWWWwWWWWwvwWWwWWWwvwWWWwWWWW\WWWWwWWWWwWWWWW/WW\wWWWWWWWWwwwwvwWW/WwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx (([5]{})))\';';print(( eval("1\x2f 2")and(9)or 13<< (65 )>>65or 68)-(0and eval("\"ppp\".bytes.class==Array and(4)or(95==\"ar_\"[2]and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{}) ){}{})>)(({})5){}x{( <(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO MU s '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*.*]*.*(<\>]xxxxxxxxxxxxxxxxxxx)'# \\ __DATA__=1#"'x" #.;R"12"' ###;console.log 39; # \\ """"# \ ' ( <>< ( x)> ){ ({}[( )] )}{\'; a=(printf \\x00 ) ;b={#a};#\\ " }"'; (( ( (';case "{"ar[1]"}"{b} in *1)echo 54;;*4)echo ((19629227668178112600/ 118248359446856100));; *1*)echo 50;;*)echo 58;;esac;exit;#( (((') )))#\ =begin #p +555!/2+55x%6E2x!<******>**********************828+*+@[*99[?]*]*****|! ;set print "-";print 89;exit#ss eP+ + + + + *D* + + +1+ +1E!s p now 70 dollar off! p has been selling out worldwide! [mxf]-main=-[165]-###jxf # seeeemPaeueewuuweeeeeeeeeeCisajjappppppxf⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀 👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→ 밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん 😊♈💖 😇♈♈ 😊♉♈ 😇♈♈ 😇♈♉ 😇♈💜 😊♉♈ 😊📢♈ 😈♈💜 😊📢♈ 😇♉💞 😊📢♉⠀⢃⠛⠋ #-49,A,-1 # #-5,A,-1 # #6,A,-1 # 1 ! ! 2 ! ! 1 !! 1 x* 53 ++-------+ 1 x*|0011 \| 51 +|/1000 /| 1 x*|\ 0011\| 34 +|/01 00/| 15 +|\ 0011\| ? ?@ _ ! 1 *|@ 0110/| ?@ ? 1 | +| + * 1 !+-------+--- ? ! ? 1 ! ? @ ? < < << < < < B= ===== =>8 = , 8= > B = = = == = = > 8 = D B+ += D x xxx x + = > 8 = > x ~ B = = = = > ~ B + = D+ ~ 8 = >x x x x x x xx x x x x+ xx x + + + + + x x xx xx +++ + x+ +x +x x + + + + 8=+, _ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # + + + #+ + ++ + + + # + + + +# * + *+* *************************************************+ # + + # + + + + * *****+ # + + # + + * * +***** # + ( printout t 164 ) (exit ) #cepp MsgBox(0,"",169 ) #cs Yo::=~147 ::= You can see an x here.<<<< >{-<< >SET x TO 120. [0]{472454523665721469465830106052219449897} >X x. PPQ-} >x--/2 > =157;y=146--/2 >main=print y{-ss \begin{code} {-x ␉␉␉␉ ␉ ␉ -} open import IO;main = run (putStr"159" ) --s \end{code} pppppppppppp Take Northern Line to Tooting Bec Take Northern Line to Charing Cross Take Northern Line to Charing Cross Take Northern Line to Bank Take District Line to Hammersmith Take District Line to Upminster Take District Line to Hammersmith Take District Line to Upminster Take District Line to Embankment Take Bakerloo Line to Embankment 7 UP Take Northern Line to Mornington Crescent 7 RIGHT 7 RIGHT 7 TEACH 6 BOND 6 BOND 6 BOND 5 RIGHT 5 LEFT 5 RIGHT 7 BOND 7 TEACH 5 TEACH 6 YELL 5 TEACH 6 YELL 6 YELL set ! 57,,...,,.,,..,,,,,,..,,,.^ set ! 51. #"6027"1,_ye do{--}gibe16"124"+*sizeString tnd xfmain=9717 96lo More 91 of this red down one blue up red down one blue up red up one red right two blue up ssswwwWWWwWWWWWwWWWWWWWwWWWWWWWWW baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet How much is it*/ #if 0 .int 2298589328,898451655,12,178790,1018168591,84934449,12597 #endif//* #1""//* #include<stdio.h> #define x(d) #d #define u8 "38\0 "//" char*x="24 10 31 1" "a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302" "h c #E60001""i c #CAFFFF""j c #280000""k c #CA0000""l c #CA007F""n c #330001 ""q c #E60000" "o c #FF8000""t c #FF00BC""u c #008080" "A c #0040C0""E c #808000""F c #00C040""G c #008000 ""R c #800000" "H c #0000AA""I c #00AA00""J c #55FFFF""K c #AAAAAA" "r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF" "HHHahtdegggggggyrggggggc" "IHHaixuEFbGGbggbryAEGRgc" "JJHajyurbgbgggggggb____o" "IJHakmyyyyyyyyyyyyyyyyye" "I__almyyyyyyyyyyyyyyyyye" "K__anmyyyyyyyyyyyyyy_y_e" "HH_aqggyyyyyyyyg____m_Je" "JH_axxxxxxxxxxxxxxxxxxxx" "K__aaaam___bbbbbBm_bbBab" "K__________bbbbb___bbxbb";//" int f(char*a,char*b ){ puts(a?"124":sizeof(0,u8)-5?u8"67":*u8""?"37": x( 0'0 "'\"")[9]?"75":'??-'&1? "79":"77" );}main(){f(x,x=0);}//<*/ #1""/*/ >data B=B Integer--WWWWWWWWWWWWWW<<W<p >instance Eq B where{-[ppWWWWWWWWWWWWay Uce stagehere]-}(B a )== (B b)=a==b >instance Num B where{ fromInteger=B;negate ( B a )=Ba+1} >main=printlast169+1:[128|B 2==head [(-1 )::B]]--} #1""/*/ #if 0 #endif//* --... ...-- /*/ p=sizeof(" (\"); print'(''72'')';end!" );main(){ puts('??-'&1?"101":"92");return 0;} #if 0 #endif//* rk:start | print: "69" rk:end @,-1,:*b5<>␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋ print 61 #} disp 49 #{ }{}<> K yya+- & g+ 'main'3x A=AgRA; AC #-3o4o# #<T>"3"O._</+++++++>/+++<-\>+++.---.\_<!+++++++++++++++++++++++++++++++++++++++++++++++++._++.-.>@ #<<<#>>> / reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-. =end ;"""#"#xxxxclou"78"<\++++>/<~#class P{function:Main (a:String[] )~Nil{83->Print(); }} #endcOmment #nocOmment outtext("155" ) #ce pS9^7^8^MUOUOF @0:8:8 \ @,,1'1'<> @125iRE # |o51~nJ;#:p'34'3 \=#print( size([[1] [3]][1,:] )[1]==2?158+4:17 )#>say 27#p>>>say 170-3#]#print(47)#]#echo 21#v>++++ #8M| <esc>dggi2<esc>// }<}}<}>} [<<}<<<<<}<<}<<<<}<<<}}}<}}<}}<}}< }}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}+++++++++++++++++++++++++++++++++++++++++++++++++._++.._#]~-<~-<~-<<<~-<COprint("65")#=>ass^_^_# #9 "25" +/ppppppp ggeeee*n*n*n*es^*s*s*ee*n*n*n*e*sss*e*n*n*n*ee<*s 5>1 *e*///$$Q222999686# VIP score (Versatile Integer Printer): .001820 (to improve, next entry should be no more than 9100 bytes) Try it online! ## Explanation The new language is the same old Haskell we used before, except with the language extension NegativeLiterals enabled. The negative literals extension is pretty simple it makes it so that when Haskell is desugaring negative literals it applies fromInteger.negate instead of applying negate.fromInteger. Usually this doesn't make a lick of difference to the way a Haskell program behaves, however thanks to this SO answer we can use split the two versions of Haskell. >data B=B Integer deriving Eq >instance Num B where{fromInteger=B;negate(B a)=B$a+1}
>main=print$last$170:[128|B 2==((-1)::B)]
This prints 128 normally and 170 when NegativeLiterals is enabled. I replaced the existing code with this.
### Grass
This program would have added vw to grass, which is not something we could afford. I was able to remove the v by not deriving Eq
>data B=B Integer
>instance Eq B where(B a)==(B b)=a==b
>instance Num B where{fromInteger=B;negate(B a)=B$a+1} >main=print$last$170:[128|B 2==((-1)::B)] however this added another w making the code as read by Grass ww. ww is a bit easier to work with than vw because v is a delimiter and thus is really hard to add to the program. In order to make ww work I had to move all of the remaining Grass into the Haskell program. >data B=B Integer--WWWWWWWWWWWWWWW >instance Eq B where(B a)==(B b)=a==b--WWWWWWWWWWWW >instance Num B where{fromInteger=B;negate(B a)=B$a+1}
>main=print$last$170:[128|B 2==((-1)::B)]
There were only two remaining ws so we are all out now, if more are needed some creativity is going to be required.
### Balancing act
The insertion of this code caused a few languages to have unbalanced parentheses. In particular the Brain-Flak family are upset by the >s used to make the Haskell literate and the ss upset alphuck. Fixing this one was pretty simple we just add the relevant open parens
>data B=B Integer--WWWWWWWWWWWWWWW<<<ppp
>instance Eq B where(B a)==(B b)=a==b--WWWWWWWWWWWW
>instance Num B where{fromInteger=B;negate(B a)=B$a+1} >main=print$last$170:[128|B 2==((-1)::B)] ### Prelude Prelude of course had a problem with me adding parentheses to the code. In order to fix this I first tried to minimize the parentheses I used. All in all I was only able to remove one pair of parentheses by changing (...) to last[...] this made the code >data B=B Integer--WWWWWWWWWWWWWWW<<<ppp >instance Eq B where(B a)==(B b)=a==b--WWWWWWWWWWWW >instance Num B where{fromInteger=B;negate(B a)=B$a+1}
>main=print$last$170:[128|B 2==last[(-1)::B]]
From here I just started adding the relevant whitespace.
>data B=B Integer--WWWWWWWWWWWWWWW<<<ppp
>instance Eq B where (B a )== (B b)=a==b--WWWWWWWWWWWW
>instance Num B where{fromInteger=B;negate ( B a )=B$a+1} >main=print$last$169+1:[128|B 2==head [(-1 )::B]]--} Now since this just needs to be spacing I was able to move parts of the comments into this space to reduce the size of the code >data B=B Integer--WWWWWWWWWWWWWWW<<<p >instance Eq B where{-ppWWWWWWWWWWWW-} (B a )== (B b)=a==b >instance Num B where{fromInteger=B;negate ( B a )=B$a+1}
>main=print$last$169+1:[128|B 2==head [(-1 )::B]]--}
### Incident Incidents
I had quite the struggle with Incident in this case, but I was able to get everything in order, in the end my code came out like:
>data B=B Integer--WWWWWWWWWWWWWW<<W<p
>instance Eq B where{-[ppWWWWWWWWWWWWay Uce stagehere]-}(B a )== (B b)=a==b
>instance Num B where{ fromInteger=B;negate ( B a )=B$a+1} >main=print$last\$169+1:[128|B 2==head [(-1 )::B]]--}
• I think something similar to data B=B Int;instance Num B where fromInteger _=B 170;negate _=B 128 and B x= -1;main=print x might shorten this (and make the Eq instance unnecessary.) – Ørjan Johansen Jan 18 '18 at 3:03
• Might also be able to replace B with the use of lists. – Ørjan Johansen Jan 18 '18 at 3:41
• @ØrjanJohansen If I were to do this again I would probably do something like data B=B{u::Integer}, which would give me the function u this would reduce the need for parens (shortening the code drastically) and would mean I don't need it to be an instance of Eq. However at this point things are very fragile so I probably won't be changing the way it works unless I'm already making edits to that section of the code. – Wheat Wizard Jan 18 '18 at 3:45
# 181. Ropy, 10000 bytes
#16 "?63(o+?50;+'51;' # #@ " /*"r"{\D-v e-'[fa5.q]PkPPX)$$9 '#CO"14"^ 92 7 222222222222222222222222 ##*/ #/*1&7//" [>.>.] )[-'][(7 >77*,68*,@'_ 7 )(22)S / \iiipsddpsdoh#####(#######?? #### ## ###### #### ###### # #### ####### #### ###### # #### ####### a5# \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλa k zzzzkf kf k zzzzzd kf k zzzzza kf bfz coding=utf8 p''53'S^' #>c#z#111#y#y#y#_#1111x18&1& -xxxxxxxxxxxxxxxx /112\ ##### ####### # # ##### # # # ##### #### ### #### # # ##### # ##### #### ### #### # # ##### # # # 36!@ e ++++++::@ /"78"oo@ h#115 o# dO 8=,_ x-----x ######## ## ### ###### ######## #### ##### ####### ##### ### # # #### ### ##### ####### ##### ### # # #### ### ##### # #comment -[af] tAtAtA TbTbTbRtRtRtVkVk-VkRcRcRcBkBkBkMbMbMbPSPSPSpspsps # ########## ### ## ##### ## #### ## # ##### ## ##### #### ##### ## # ## ## #### ## ##### #### ##### ## # ## ## #### #~==++++++ ++++++++++++++++++++++++++ +++++++++++++++++.._+++++++._ # ????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????! #[#[===============================================================]] # #<<<#QhQhQhQrQrQrHnHnHnbqbqbqLzLzLzqTqTqTTcTcTc # ############################################################################## p #-]+-}}[.^x+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._++++._+++._^<][4O6O@]+-+<[<<._>>x>-]^>[ #{ #cs} # #** #2""/*\* #=x<R+++++[D>+++++++9999 9 9 L+++<-][PLACET,2<- #2FAC,2SUB#1<- #52FAC,2SUB#2<- #32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@._+>][ #x%+>+=ttt_Z_*.9 999 99 9999 9 _ _ _ #D>xU/-<+++L_9 #R+.----._>]| 9 9999\[\[yYyY #<(+?+?0l0v01k1kMoOMoOMoOMoOMOOx0l0ix0jor0h0h1d111 0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11yxMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOotMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0 )000011100\\ [ "e.1'.0'.6''i]56pq\{}26q[puts 59][exit]" ,'_\['];#/s\\/;print"24"; exit}}__DATA__/ ###x<+@+-@@@@=>+<@@@=>+<?#d>;?\:-._++._++++._#/<?\>3-++._6+---2._#</++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.>!\ '(wWWWwWWWWwvwWWwWWWwvwWWWwWWWW\WWWWwWWWWwWWWWW/WW\wWWWWWWWWwwwwvwWW/WwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx (([5]{})))\';';print(( eval("1\x2f 2")and(9)or 13<< (65 )>>65or 68)-(0and eval("\"ppp\".bytes.class==Array and(4)or(95==\"ar_\"[2]and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{}) ){}{})>)(({})5){}x{( <(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({;}()<()()()>)wWW ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO MU s '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]* *]* * *(<\>]xxxxxxxxxxxxxxxxxxxxxxxx)'#\\ __DATA__=1#"'x" #.;R"12"' pp ###;{a=1}={a:null};if a then console.log 39 else console.log 180 # \\ """"# \ ' ( <>< ( x)> ){ ({}[( )] )}{\'; a=(printf \\x00) ;b={#a};#\\ " }"'; (( ( (';case "{"ar[1]"}"{b} in *1)echo 54;;*4)echo ((19629227668178112600/ 118248359446856100));; *1*)echo 50;;*)echo 58;;esac;exit;#( (((') )))#\ =begin #p +555!/2+55x%6E2x !|******[*[?]828+*+]@[*99[?]*]*****|! ;set print "-";print 89;exit#ss <> [mxf]-main=-[165]- ###jxf*#p 173#*s eP+++++*D*+++1++1E!s # p now 70 dollar off! p has been selling out worldwide! seeeemPaeueewuuweeeeeeeeeeCisajjappppppxf⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀 👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→ 밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん 😊♈💖 😇♈♈ 😊♉♈ 😇♈♈ 😇♈♉ 😇♈💜 😊♉♈ 😊📢♈ 😈♈💜 😊📢♈ 😇♉💞 😊📢♉⠀⢃⠛⠋ #-49,A,-1 # #-5,A,-1 # #6,A,-1 # 1 ! ! 2 ! ! 1 !! 1 x* 53 ++-------+ 1 x*|0011 \| 51 +|/1000 /| 1 x*|\ 0011\| 34 +|/01 00/| 15 +|\ 0011\| ? ?@ _ ! 1 *|@ 0110/| ?@ ? 1 | +| + * 1 !+-------+--- ? ! ? 1 ! <=> ? @ ? < < << < < < B= ===== =>8 = , 8= > B = = = == = = > 8 = D B+ += D x xxx x + = > 8 = > x ~ B = = = = > ~ B + = D+ ~ 8 = >x x x x x x xx x x x x+ xx x + + + + + x x xx xx +++ + x+ +x +x x + + + + 8=+, _ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # + + + #+ + ++ + + + # + + + +# * + *+* # *************************************************+ # + + # + + + + * *****+ # + + # + + * * +***** # + ( printout t 164 ) (exit ) #cepp MsgBox(0,"",169 ) #cs Yo::=~147 ::= You can see an x here.<<<< >{-<<<<< > 176 >> Output 1 >SET x TO 120. [0]{472454523665721469465830106052219449897} >X x. PPQ-} >x--/2 > =157;y=146--/2 >main=print y{-sss \begin{code} {-x ␉␉␉␉ ␉ ␉ -} open import IO;main = run (putStr"159" ) \end{code} ppppppppppppp Take Northern Line to Tooting Bec Take Northern Line to Charing Cross Take Northern Line to Charing Cross Take Northern Line to Bank Take District Line to Hammersmith Take District Line to Upminster Take District Line to Hammersmith Take District Line to Upminster Take District Line to Embankment Take Bakerloo Line to Embankment 7 UP Take Northern Line to Mornington Crescent 7 RIGHT 7 RIGHT 7 TEACH 6 BOND 6 BOND 6 BOND 5 RIGHT 5 LEFT 5 RIGHT 7 BOND 7 TEACH 5 TEACH 6 YELL 5 TEACH 6 YELL 6 YELL set ! 57,,...,,.,,..,,,,,,..,,,.^ set ! 51. #"6027"1,_ye do{--}gibe16"124"#8+*sizeString tnd xfmain=96los*81''cayY More 91 of this red down one blue up red down one blue up red up one red right two blue up sss_ baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet How much is it wwWWWwWWWWWwWWWWWWWwWWWWWWWWppppp When this program starts: There is a scribe called x x is to write 179 */ #if 0 .int 2298589328,898451655,12,178790,1018168591,84934449,12597 #endif//* #1""//* #include<stdio.h> #define x(d) #d #define u8 "38\0 "//" char*x="24 10 31 1" "a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302" "h c #E60001""i c #CAFFFF""j c #280000""k c #CA0000""l c #CA007F""n c #330001 ""q c #E60000" "o c #FF8000""t c #FF00BC""u c #008080" "A c #0040C0""E c #808000""F c #00C040""G c #008000 ""R c #800000" "H c #0000AA""I c #00AA00""J c #55FFFF""K c #AAAAAA" "r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF" "HHHahtdegggggggyrggggggc" "IHHaixuEFbGGbggbryAEGRgc" "JJHajyurbgbgggggggb____o" "IJHakmyyyyyyyyyyyyyyyyye" "I__almyyyyyyyyyyyyyyyyye" "K__anmyyyyyyyyyyyyyy_y_e" "HH_aqggyyyyyyyyg____m_Je" "JH_axxxxxxxxxxxxxxxxxxxx" "K__aaaam___bbbbbBm_bbBab" "K__________bbbbb___bbxbb";//" int f(char*a,char*b ){ puts(a?"124":sizeof(0,u8)-5?u8"67":*u8""?"37": x( 0'0 "'\"")[9]?"75":'??-'&1? "79":"77" );}main(){f(x,x=0);}//<*/ #1""/*/ >import Text.Heredoc--WWWWWWWWWWWWWW<<W >instance Num B where fromInteger _=B 170;negate _=Bx#x >data B=B{u::Integer};g=[here|here<-"W>W"] --WWWWWWWWWW570rt Unc27<<[w|] >x=1;y#a=128;x#a=174 >main=printlast172:[u[-1]!!0|g<"Z>"] --} console.log 178; #1""/*/ #if 0 #endif//* --... ...-- /*/ p=sizeof(" (\"); print'(''72'')';end!" );main(){ puts('??-'&1?"101":"92");return 0;} #if 0 #endif//* rk:start | print: "69" rk:end @,-1,:*b5<>␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋ print 61 #} disp 49 #{ }{}<> K yya+- & g+ 'main'3x A=AgRA; AC #-3o4o# #<T>"3"O._</+++++++>/+++<-\>+++.---.\_<!+++++++++++++++++++++++++++++++++++++++++++++++++._++.-.>@ #<<<#>>> / reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-. =end ;"""#"#xxxxclou"78"<\++++>/<~#class P{function:Main (a:String[] )~Nil{83->Print(); }} #endcOmment #nocOmment outtext("155" ) #ce pS9^7^8^MUOUOF @0:8:8 \ @,,1'1'<> @125iRE #p|o51~nJ;#:p'34'3 \=# print(size([[1] [3]][1,:] )[1]==2?158+4:17 )#>say 27#>>>say 170-3#]#print(47)#]#echo 21#>/#print(171)#s-#print 175#s #8M| <esc>dggi2<esc>// }<}}<}>}[<< }<<<<<}<<}<<<<}<<<}}}<}}<}}<} }<}}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}+++++++++++++++++++++++++++++++++++++++++++++++++._++.._#]~-<~-<~-<<<~-<COprint("65")#=>ass^_^_# #9 "25" +/pppppppx eeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee*s<* 5>1 e*///$$Q222999686#
Try it online!
This is another addition from A Brief History of 2D Programming Languages.
I used this interpreter.
There are two ways to print in Ropy - to use # instruction or implicitly print top of the stack on exit. I use second method as it is standard for Ropy - see examples. # does nothing if stack is empty, so # at (0,0) is harmless.
Main code is on line 3: 18&1&.
181&&18&1& for Pip.
Normally Ropy IP wants to turn left. So when on the first line it moves straight. When top of the stack is 0 IP wants to turn right, which causes problems. To remove first 0 from IP path I changed 0| to 1& in Japt code on line 2. Second 0 is on line 1, it was fixed by adding spaces to line 2 under it so that IP cannot turn right. So there must be no nonspace chars on line 2 near pink code. Important spaces are shown in gray.
Labyrinth broke, and the easiest way for me to fix it was to remove * from line 4. So now Brat comment starts on line 14. Second * is for Agony. As in Zephyr answer, two new lines added for Brat forced to move /` on line 1 to keep Kleins in the same place relative to surrounding code, other 2D langs were updated accordingly.
• What is this madness!? A 10KB, 181-lang polyglot!? – OldBunny2800 Feb 25 '18 at 3:52
• VIP score: 0.001686 – Luke Mar 4 '18 at 16:34 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 2, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.40726393461227417, "perplexity": 4796.598299982003}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-45/segments/1603107876307.21/warc/CC-MAIN-20201021093214-20201021123214-00442.warc.gz"} |
https://brilliant.org/discussions/thread/enormous-harmonic-sum-proof-help-mehhh/ | ×
# Enormous Harmonic Sum proof (help mehhh)
My friend asked me a question about this (from Russia IMO or something I forgot). The question asked for $$n=2013$$. I know the answer by just trying small numbers and then predict. Here's the question to prove:
Prove that $$\sum\limits_{j=1}^n (\sum\limits_{i=j}^n \frac{1}{i})^{2} + \sum\limits_{i=1}^n \frac{1}{i} = 2n$$
If you're confused with these stuffs, it is...
$$(\frac{1}{1} + \frac{1}{2} + ... + \frac{1}{n})^{2} + (\frac{1}{2} + ... + \frac{1}{n})^{2} + ....... + (\frac{1}{n})^{2} + \frac{1}{1} + \frac{1}{2} + ... + \frac{1}{n} = 2n$$
Note by Samuraiwarm Tsunayoshi
3 years, 5 months ago
Sort by:
Let $$H_n = \sum_{i=1}^n \frac1{i}$$ (with the convention that $$H_0 = 0$$ ). My approach was to write the quantity on the left side as $$S_n = \sum_{j=1}^n (H_n - H_{j-1})^2 + H_n$$. It is enough to show that $$S_{n+1}-S_n = 2$$, since $$S_1 = 2$$ is the base case for an easy induction.
This difference equals $$\sum_{j=1}^{n+1} \left( (H_{n+1}-H_{j-1})^2-(H_n-H_{j-1})^2 \right) + \frac1{n+1}$$, which simplifies by a difference of squares formula to $$\sum_{j=1}^{n+1} \frac1{n+1} ( H_{n+1} + H_n - 2 H_{j-1}) + \frac1{n+1}$$, which becomes $$H_{n+1} + H_n + \frac1{n+1} - \frac2{n+1} \sum_{j=1}^{n+1} H_{j-1} = 2 H_{n+1} - \frac2{n+1} \sum_{j=1}^{n+1} H_{j-1}$$.
Ah, but now we can use the identity $$\sum_{i=0}^n H_i = (n+1)H_n - n$$, which is easy to prove by induction. (I found it on the wikipedia page for "harmonic number.") Plugging this in, we get $$2 H_{n+1} - \frac2{n+1} ((n+1) H_n - n) = 2 H_{n+1} - 2 H_n + \frac{2n}{n+1} = \frac2{n+1} + \frac{2n}{n+1} = 2$$ as desired.
There is probably a much more elegant way to do the problem (i.e. directly without induction), but this certainly works. · 3 years, 5 months ago
Thank you for the proof. ^__^ · 3 years, 5 months ago
I don't quite understand how it is enough to prove that $$S_{n+1} - S_{n} = 2$$. I understand the rest but I'm just stuck at the first part. =_=" Sorry about that *cries · 3 years, 5 months ago
$$S_{n+1} - S_{n} = 2(n+1) - 2n = 2$$ · 3 years, 5 months ago
Oh, my bad. =__=" · 3 years, 5 months ago
This is from IMC 2013. :) · 3 years, 5 months ago | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9907188415527344, "perplexity": 657.5122995466035}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-30/segments/1500549424756.92/warc/CC-MAIN-20170724062304-20170724082304-00594.warc.gz"} |
https://www.emathhelp.net/notes/algebra-2/trigonometry/the-simplest-transformations-of-arithmetic-root-radical/ | # The Simplest Transformations of Arithmetic Root (Radical)
When we transform the arithmetic root we should use their properties.
Example 1. Simplify the following: sqrt(45a^5).
Using property 1, we will obtain sqrt(45a^5)=sqrt(9a^4*5a)=sqrt(9)*sqrt(a^4)*sqrt(5a)=3a^2sqrt(5a).
Such transformation is called factoring out of root.
Example 2. Simplify the following: (root(3)(a^2))^5.
Using property 3, we will obtain (root(3)(a^2))^5=root(3)((a^2)^5)=root(3)(a^10). Let′s simplify radical expression, for this we will factor out of root.
Then root(3)(a^10)=root(3)(a^9*a)=root(3)(a^9)*root(3)(a)=a^3root(3)(a).
Example 3. Simplify the following: root(4)(x^2root(3)(x)).
Let′s transform expression x^2root(3)(x), for this we will factor in of root:
x^2root(3)(x)=root(3)((x^2)^3)*root(3)(x)=root(3)(x^6)*root(3)(x)=root(3)(x^6*x)=root(3)(x^7).
According to property 4, we have root(4)root(3)(x^7)=root(12)(x^7).
Example 4. Simplify the following: root(30)(2^9) .
According to property 5, we can divide the index of radical and exponent of radicand by the same natural number. Dividing these indicators by 3, we will obtain root(30)(2^9)=root(10)(2^3)=root(10)(8).
Example 5. Simplify the following: root(5)(a)*root(5)(a^2).
According to property 1, if we need to multiply the same degree we should multiply the radicands and extract the root of the same degree from obtained result. So, root(5)(a)*root(5)(a^2)=root(5)(a*a^2)=root(5)(a^3).
Example 6. Simplify the following: root(3)(a)*root(6)(a).
At first we should reduce the radicals to the same index. According to property 5, we can divide the index of radical and exponent of radicand by the same natural number. That is why root(3)(a)=root(6)(a^2). Then we have root(6)(a^2)xxroot(6)(a)=root(6)(a^3). Dividing the index of radical and exponent of radicand by 3, we will obtain root(6)(a^3)=sqrt(a).
When we perform the operations with radicals, we often transform into fractional exponents. For example,
root(8)(x^3)*root(12)(x^7)=x^(3/8)*x^(7/12)=x^(3/8+7/12)=x^(23/24)=root(24)(x^23). | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9882630705833435, "perplexity": 1376.0221070738498}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-30/segments/1563195525414.52/warc/CC-MAIN-20190717221901-20190718003901-00521.warc.gz"} |
http://mathhelpforum.com/pre-calculus/80242-find-all-solutions.html | # Math Help - find all solutions
1. ## find all solutions
tanxsinx-sinx=0
I can get to sinx(tanx-1)=0
and that sinx=0
where do i go from there???
2. Originally Posted by guardofthecolor4ever
tanxsinx-sinx=0
I can get to sinx(tanx-1)=0
and that sinx=0
where do i go from there???
sin(x)= 0 at $x = 0 \pm k\pi$ where k is an integer
Then do tan(x)-1=0
tan(x) = 1 at $\frac{\pi}{4} \pm k\pi$ where k is an integer | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 2, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8105904459953308, "perplexity": 2800.1104487654825}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-41/segments/1412037663743.38/warc/CC-MAIN-20140930004103-00307-ip-10-234-18-248.ec2.internal.warc.gz"} |
https://mathmaine.com/tag/practice-problems/ | ## Three Step Linear Equation Problems
The solution to each of the following problems is 20. Focus on finding the most helpful three or four algebraic steps to take someone reading your work from the problem as stated to the solution.
1. $3(x+10)~=~90$
2. $2x-20~=~60-2x$
3. $\dfrac{2x}{3}~=~\dfrac{60-x}{3}$
4. Continue reading Three Step Linear Equation Problems
## Two Step Linear Equation Problems
The solution to each of the following problems is 18. Focus on finding the most helpful algebraic steps to take a reader from the problem as stated to the solution.
1. $3(x+10)-20~=~70$
2. $2x-20~=~60-2x$
3. $\dfrac{2x}{3}~=~\dfrac{60-x}{3}$
4. Continue reading Two Step Linear Equation Problems
## One Step Linear Equation Problems
The solution to each of the following twenty problems is 12. Focus on finding the most helpful algebraic step to take a reader from the problem as stated to the solution, and be sure you can explain why that step leads to a solution.
1. $x+7~=~19$
2. $3+x~=~15$
3. $11~=~-1+x$
4. Continue reading One Step Linear Equation Problems | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 9, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6244256496429443, "perplexity": 1403.2286930618145}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-09/segments/1518891814857.77/warc/CC-MAIN-20180223213947-20180223233947-00486.warc.gz"} |
https://wiki.kidzsearch.com/wiki/Buddhism | kidzsearch.com > wiki Explore:images videos games
# Buddhism
Buddhism
Buddhism
Basic terms
People
Schools
Practices
Buddhism is a religion founded by Siddhartha Gautama. Buddhism teaches people how to end their suffering by cutting out greed, hatred and ignorance. When people do bad things, they will get bad consequences. When people do good things, they will get good consequences. Good and bad things do not cancel out.
This cause-and-effect chain is reflected in the endless cycles of life, death and rebirth. Buddhism believes in reincarnation (rebirth). The ultimate goal of a Buddhist is to reach the state of enlightenment (Nirvana) and liberate oneself from endless reincarnation and suffering. Some see Buddhism as a religion,[1] others see it is a philosophy, and others think it is a way of finding reality.[2][3] Some think that it is unnecessary to label Buddhism.
Gautama Buddha – a man who lived between about 563 BC and 483 BC – was a rich prince. He gave up everything to find a way to end suffering. His teachings spread, after his death, through most of Asia, to Central Asia, Tibet, Sri Lanka, Southeast Asia, and the East Asian countries of China, Mongolia, Korea, and Japan and have now spread to the west.
## Background
The Buddha's teachings are about suffering and how to overcome it.[4] According to the Buddha, overcoming suffering allows a person to be truly happy. The Buddha taught that if people make good decisions they would be happy and have peace of mind. The Buddha taught that life is imperfect and that we will suffer. He taught that we suffer because of desire, anger and stupidity, and he showed that we could end our suffering by letting go of desires and overcoming anger and stupidity. The complete letting go of these negative influences is called Nirvana, meaning "to extinguish", like putting out the flame of a candle. The end of suffering, when one is fully awake (put an end to one's own ignorance) and has let go of all desire and anger, is also called Enlightenment. In Buddhism Enlightenment and Nirvana mean the same thing.
"To avoid all evil
To do good.
To purify one's mind.
This is the teaching of all the Buddhas."
--Dhammapāda, XIV, 5 ,
Buddhism teaches non-harm and moderation or balance, not going too far one way or the other. Buddhists often meditate while sitting in a special or specific way. They often chant and meditate while walking. Buddhists sometimes do these things to understand the human heart and mind. Sometimes they do these things to understand the way the world works. Sometimes they do these things to find peace.
Buddhism does not say if gods exist or not, but one can read many stories about gods in some Buddhist books. Buddhists do not believe that people should look to gods to save them or bring them enlightenment.[5] The gods may have power over world events and they might help people, or they might not. But it's up to each person to get to enlightenment. Many Buddhists honor gods in ritual. Other Buddhists believe the stories about gods are just there to help us learn about parts of ourselves.
## What is a Buddha?
Buddha is a word in the very old Indian languages Pāli and Sanskrit which means "Enlightened one". The word "Buddha" often means the historical Buddha named Buddha Shakyamuni (Siddhartha Gautama),[6] but "Buddha" does not mean just one man who lived at a certain time. It is used for a type of person, the equivalent of a prophet, and Buddhists believe there have been many - that there were Buddhas a very long time ago and there will be for a long time in the future.
Buddhists do not believe that a Buddha is a god, but that he is a human being who has woken up and can see the true way the world works. They believe this knowledge totally changes the person. Some say this puts them beyond birth, death, and rebirth. Others think this represents the final extinction of desire. This person can help others become enlightened too.
### Who was the first Buddha?
According to Buddhism, there were countless Buddhas before Gautama Buddha and there will be many Buddhas after him. In short, he is not the first, nor will he be the last.
The first Buddha in Buddhavamsa sutta was Taṇhaṅkara Buddha, The Mahapadana sutta say the first Buddha was Vipassi Buddha, however, counting from the present kalpa (the beginning of our present universe) Buddha Gautama is considered the fourth Buddha. The first is Kakusandho Buddha, second Konakamano Buddha and the third Kassapo Buddha. The last Buddha of this kalpa will be Maitreya Buddha. Then the universe will renew itself and from then begins a new kalpa.
Old stories say that Siddhārtha Gautama was born around the 6th century BC. He was the one who would become the first Buddha in written history. Some Buddhists believe that Siddhārtha Gautama was a perfect person.
He was born a prince and was unsure about if he wanted to become a religious man or a prince. At age 29 he noticed pain and suffering. He then wanted to learn the answer to the problem of human suffering, or pain. He gave up all his money and power, and became a monk without a home. He walked from place to place, trying to learn the answers to life.
At last he found enlightenment while sitting under a big tree called the Bodhi Tree. He was the first person to teach Buddhism to the people, and Buddhists love him for that. A cutting was made from the Bodhi Tree and planted in Sri Lanka.
After Siddhārtha Gautama died, his students taught the Buddha's teaching to more people. After a long time, they wrote down the things that he may have said.
## Beliefs of Buddhism
### The Three Jewels
Buddhists often talk about the Three Jewels, which are the Buddha, the Dharma, and the Sangha. The Dharma is the way the Buddha taught to live your life. The Sangha is the group of monks and other people who meet together, like a congregation.
Buddhists say "I take refuge in the Buddha, the Dharma, and the Sangha." This means that these three things keep them safe. They give themselves up to the community and teachings inspired by the Buddha.
### Four Noble Truths
The Buddha's first and most important teachings are the Four Noble Truths.[7]
1. Life often—in fact almost always—involves suffering. This may sound obvious, but it is said so as to emphasize that this is the key thing Buddhism is interested in.
2. The reason for this suffering is that we want things we can not or do not have. Or, more important, we become "attached" to those things. For example; if you would like an ice cream, that "want" is not a source of suffering. Becoming "attached" to that "want" is suffering.
3. The way to cure suffering is to stop the wanting. Of course many could argue that a better way would simply be to go get the thing you want. The Buddhist response is that we can never get everything we want, partly because the more we have, the more we want.
4. The way to stop wanting is to follow the Noble Eightfold Path, which focuses not on changing things around us, but instead it focuses on changing our own mind on how we view things.
### Noble Eightfold Path
The Buddha told people to follow a special way of life called the Noble Eightfold Path if they want to understand the Four Noble Truths. These are:
1. Know and understand the Four Noble Truths
2. Give up all worldly things and don't harm others
3. Tell the truth, don't gossip, and don't talk badly about others
4. Don't commit evil acts, like killing, stealing, or living an unclean life
5. Work for good and oppose evil
6. Do rewarding work
7. Make sure your mind keeps your senses under control
8. Practice meditation as a way of understanding reality
### Five Precepts
Buddhists are encouraged to follow five precepts, or rules, that say what not to do.[8]
These are the Five precepts.
1. I will not hurt a person or animal that is alive.
2. I will not take something if it was not given to me.
3. I will not engage in sexual misconduct.
4. I will not lie or say things that hurt people.
5. I will not take intoxicants, like alcohol or drugs, causing heedlessness.
If a person wants to be a monk or nun, he or she will follow other precepts as well.
## Books about Buddhism
• Bechert, Heinz; Gombrich, Richard (1984). The World of Buddhism. Thames & Hudson.
• Harvey, Peter (1990). An Introduction to Buddhism: Teachings, History and Practices. Cambridge University Press.
.
• Armstrong, Karen (2001). Buddha. Penguin Books. pp. 187.
.
• Gunaratana, Bhante Henepola (2002). Mindfulness in Plain English. Wisdom Publications.
. Also available on-line: [1] [2] [3]}}
• Robinson, Richard H.; Johnson, Willard L. (1982). The Buddhist Religion: A Historical Introduction. Wadsworth Publishing.
.
• Smith, Huston; Novak, Phillip (2003). Buddhism: A Concise Introduction. HarperSanFrancisco.
.
## References
1. Chambers Dictionary, 2006; Merriam-Webster's Collegiate Dictionary, 2003; New Penguin Handbook of Living Religions, 1998; Dewey Decimal System of Book Classification
2. For example: Thich Nhat Hanh, Old Path White Clouds For example: Dorothy Figen, Is Buddhism a Religion?
3. For example: Narada Thera, Buddhism in a Nutshell, http://www.buddhanet.net/nutshell03.htm | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.27001622319221497, "perplexity": 4773.060866811336}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540529745.80/warc/CC-MAIN-20191211021635-20191211045635-00267.warc.gz"} |
https://computergraphics.stackexchange.com/questions/8444/multiple-importance-sampling-in-path-tracer-produces-dark-images | # Multiple Importance Sampling in Path tracer produces Dark Images
So I recently implemented Multiple Importance Sampling in my path tracer which was based on next event estimation.
The problem is without MIS I get images like,
This is obtained by setting
light_sample *= 1/light_pdf; // Note no mis_weight
and just returning this sample alone. No BRDF sampling.
Where as with MIS as defined above I get darker images like,
The reason is surely the mis_weight factor. From what I gathered over the internet my MIS code is ok but theoretically it doesn't seem right. For example suppose we performed Light Sampling first and obtained a mis_weight. After that when we tried BRDF sampling, the ray didn't intersect any light source resulting in light_pdf = 0. We neglected this estimate. Since we neglected this estimate isn't it wrong to weight our light sample by mis_weight when we didn't even use multiple estimators, plus how is the sum of weights equal to 1 when we didnt even estimate anything using the BRDF pdf?
Imo, mis_weight factor in light_sample should only be used when BRDF sampling also results in a light ray that intersects the light source.
Can anybody explain if these results are ok or there is something wrong with the code?
EDIT:- There is another case which is a little confusing. I am currently using a heuristic (basically power/distance) to choose 1 light out of multiple lights. What if Light sampling and BRDF sampling choose different light sources. Is MIS still valid then? Since the PDF would change resulting the weights not being able to sum to 1 anymore
EDIT2:- So Stefan pointed out a mistake here, that I was clamping radiance. And this solved that issue and changed the results I'm getting for MIS. I have double checked PBRT's implementation and it is similar to mine. I'm still getting darker images using MIS however now I'm getting more fireflies and I think I read that MIS reduces fireflies? Updated the images. It seems fireflies are less in MIS however, the reflection seems harder to converge.
Note the reflection is harder to converge. Both images are 1000 spp. Top is without MIS.
I'm removing the snippet and adding a link to github for the whole kernel. The core functions are evaluateDirectLighting, shading, sampleLights. Link to code is "here"
--Found a mistake. I was using the direct lighting equation when calculating the brdf sample. (multiplying by $$\cos(\theta^{\prime})$$ and dividing by $$r^2$$). Removed it since we initially sampled through BSDF which is integral over solid angle not area. The image got a little brighter. Still don't know if MIS is working as intended. See answer.
EDIT3:- Added a release as well. So if anybody wants, they can try changing the code in "*.cl" file and run the program to see the results. (You must have an OpenCL 1.1 supported GPU or CPU)
EDIT4:- Here's an overview of what I'm doing now.
First I choose a single light source out of multiple using simple heuristic scheme like the distance, intensity, area and the cosine falloff angles. I appropriately set the weights for the light like this
$$light\_pdf = weight/area$$
where weight is in range 0-1.
Next I trace the ray to see if light source is visible. If it is I calculate the $$light\_sample$$ using the direct lighting equation (integral over Area).
Then I calculate the BRDF PDF for this given ray. However I use Lafortune's algorithm for it. If a random number falls under the specular color I sample through the modfied Phong PDF else through Cosine.
The weights are computed using power heuristic, $$weight = light\_pdf^2/(light\_pdf^2+brdf\_pdf^2)$$
The MIS estimator is then calculated as
$$light\_sample = light\_sample * weight/light\_pdf$$
After that I come to BRDF sampling. I again sample through either Phong/Cosine based on what I did earlier during light sample calculation. If the sampled ray doesn't hit any light source or not the same one. I set the $$brdf\_sample$$ to zero. If it hits, I set the $$light\_pdf$$ to same value as before. Calculate the weights like mentioned above and calculate brdf sample using the original equation (integral over solid angle).
EDIT5:- After lightxbulb suggestions, I think the problem has resolved.
Note the images might look a whole lot different but that's cause I implemented Tonemapping + Gamma Correction in the meantime :) With MIS 700spp
Without MIS 700spp
• You shouldn't include the cosine foreshortening term in your brdf_pdf. – Hubble Jan 7 at 6:26
• Im using cosine weighted hemispherical sampling so the BRDF PDF is supposed to be cos(theta)/pi – gallickgunner Jan 7 at 9:57
• May be a coincidence but are your diffuse surfaces exactly PI times darker ? – PaulHK Jan 11 at 7:38
• @PaulHK - What would that imply? I don't think it's actually PI times darker, its just mis_weight times darker/brighter. Because as I said as soon as i remove mis_wieght and just divide by light_pdf I get the brighter image. – gallickgunner Jan 11 at 10:33
• A shot in the dark really, I have seen other question on here were the solution was surprisingly that. – PaulHK Jan 14 at 2:07
Throughout my answer I'll sometimes refer to some results in https://sites.fas.harvard.edu/~cs278/papers/veach.pdf by using [MIS,section_number].
You can skip the following derivation if you don't care about the mathematical explanation of why using MIS to combine estimators is valid. I'll have to start with what the purpose of MIS is. The general idea is that you want to estimate some integral $$I=\int_{\Omega}{f(x)\,d\mu(x)}$$ through Monte Carlo, and you have various sampling pdfs (in our case a pdf for sampling points on the light, and a pdf for sampling directions from the brdf). Additionally you want to sample using more than one technique and then combine the contributions optimally (in some sense). For simplicity I will restrict myself to the case where you have only two pdfs: $$p_L(x), p_B(x)$$ with respect to the same measure $$\mu(x)$$.
Assume that you also have the weighting functions $$w_1(x), w_2(x) : \Omega \rightarrow [0,1], w_1(x) + w_2(x) = 1$$ and also $$n$$ independently and identically distributed (i.i.d.) samples $$x_{p_L,i}: i=1,...,n$$ according to $$p_L$$, and $$m$$ i.i.d. samples $$x_{p_B,j} : j=1,...,m$$ according to $$p_B$$, we can use Monte Carlo with MIS to estimate the integral $$I$$: $$I = \int_{\Omega}{f(x)\,d\mu(x)} = \int_{\Omega}{f(x)(w_1(x)+w_2(x))\,d\mu(x)} \\ = \int_{\Omega}{\frac{w_1(x)f(x)}{p_L(x)}p_L(x)\,d\mu(x)} + \int_{\Omega}{\frac{w_2(x)f(x)}{p_B(x)}p_B(x)\,d\mu(x)} \\ = E\left[\frac{w_1(X_{p_L})f(X_{p_L})}{p_L(X_{p_L})}\right] + E\left[\frac{w_2(X_{p_B})f(X_{p_B})} {p_B(X_{p_B})}\right] \\ = \frac{1}{n}\sum_{i=1}^{n}{E\left[\frac{w_1(X_{p_L,i})f(X_{p_L,i})}{p_L(X_{p_L,i})}\right]} + \frac{1}{m}\sum_{j=1}^{m}{E\left[\frac{w_2(X_{p_B,j})f(X_{p_B,j})} {p_B(X_{p_B,j})}\right]} \\ = E\left[\frac{1}{n}\sum_{i=1}^{n}{\frac{w_1(X_{p_L,i})f(X_{p_L,i})}{p_L(X_{p_L,i})}}\right] + E\left[\frac{1}{m}\sum_{j=1}^{m}{\frac{w_2(X_{p_B,j})f(X_{p_B,j})} {p_B(X_{p_B,j})}}\right] \\ \approx \frac{1}{n}\sum_{i=1}^{n}{\frac{w_1(x_{p_L,i})f(x_{p_L,i})}{p_L(x_{p_L,i})}} + \frac{1}{m}\sum_{j=1}^{m}{\frac{w_2(x_{p_B,j})f(x_{p_B,j})} {p_B(x_{p_B,j})}}$$ Where the second equality holds because $$w_1(x)+w_2(x)=1$$, the fourth follows from the definition of expected value, the fifth holds since $$X_{p_L,i}$$ are independently and identically distributed (i.i.d.) according to $$p_L$$ and similarly $$X_{p_B,i}$$ are i.i.d. according to $$p_B$$. The sixth holds because of the properties of the expectation (which follows from the fact that integration is a linear operator). The last approximate equality follows from the strong law of large numbers (the average of the samples converges almost surely to the expected value with the number of samples going to infinity).
Having this result the first thing to note is that both pdfs are defined with respect to the same measure $$\mu(x)$$. However I believe that in your code and overview you pdf for sampling the light $$p_L$$ is defined with respect to the area measure, whereas the pdf for sampling the brdf $$p_B$$ is defined with respect to the solid angle measure. The relationship between those being $$d\sigma(x\rightarrow y) = \frac{\cos\theta_y}{||x-y||^2}dA(y)$$, where $$x \in \mathbb{R}^3$$ is the current point for which you are computing the illumination (that is your intersection point), and $$y \in \mathbb{R}^3$$ is a point on the surface of some light source. Additionally $$(x\rightarrow y) = \frac{y-x}{||y-x||}$$ is simply the unit direction vector from $$x$$ to $$y$$, $$\cos\theta_y = n_y \cdot (y\rightarrow x)$$ is the cosine of the angle between the normal $$n_y$$ (also unit length) of the light surface at $$y$$ and $$-(x\rightarrow y)$$. More specifically what you have produced as light pdf is really the probability of picking the light $$weights[i]/sum$$ multiplied by the probability of picking uniformly a point on the light source that you have chosen $$1/area$$. The solid angle to area (or vice versa) conversion seems to be missing in your code and your overview, that is your pdf is with respect to the area measure, and you combine it with a pdf (the brdf's) that is with respect to the solid angle measure, which is clearly wrong as you can see from my derivation above. To get the brdf pdf with respect to the area measure and not the solid angle measure you can use: $$p_{\omega}(\omega)\,d\sigma(\omega) = p_A(y)\,dA(y)$$ then using the relationship between the measures $$p_A(y) = p_{\omega}(\omega)\,d\sigma(\omega) / dA(y) = p_{\omega}(\omega) \frac{\cos\theta_y}{||x-y||^2}$$. You can refer to [MIS, 2.3] equation (9). For a formal derivation of the relationship between the two measures you can refer to http://www.dgp.toronto.edu/~lessig/dissertation/files/area_formulation.pdf , another possible derivation of the same fact can be done through the divergence theorem.
Now as far as the practical part goes - you need to know when to apply the mis weighting. There are a few cases which occur. Initially for the very first ray, you should not use MIS since you shouldn't sample any light directly. Additionally if the last bounce was fully deterministic (ideal reflection/refraction) then you also should not use MIS, since sampling the light is useless in that case. Finally if you hit a light through sampling the bsdf, you should use MIS to add this contribution, and convert the bsdf pdf wrt the area measure, and then combine it with the probability of sampling this point on this light by using the light pdf and use the area formulation estimator of the rendering equation. When you sample a light, you should also use MIS, once again computing the area formulation estimator. Finally if you have point lights, those can be sampled only through NEE, so you should not use MIS.
Note that there may be more mistakes that you have. Also I didn't understand anything of your explanation past "After that I come to BRDF sampling.".
• Thanks for the detailed write-up. So in short (1) I need to compute both light and brdf samples using integral over area not solid angle. And (2) I also need to compute the BRDF PDF w.r.t to the area. I was actually doing (1) but changed it to integral over solid angle and noticed images getting brighter. Well anyways, will report back shortly. – gallickgunner Feb 24 at 18:33
• You can decide on one of the two formulations: either area or solid angle. That means that all of your pdfs (even outside of the weights) should match this formulation, as well the rendering equation formulation that you use and consequently the estimator that you will compute. The good thing is that nothing except for the pdfs in your weights needs to change. Since I think that most of your stuff is already in solid angle formulation (your brdf pdf and the estimators), then just convert the light pdf wrt solid angle (mult by $r^2/\cos\theta_y$). – lightxbulb Feb 24 at 18:47
• Hey thanks for the answer. I think most of the problems have been resolved. Check the update images. The fireflies seem no less though or it's just that there are too many of them to make a difference. I'll try with different scene parameters. I also don't get what you said about the first ray should not use MIS. I think you meant for naive path tracing. I'm using NEE. – gallickgunner Feb 24 at 19:43
• The first ray (emanating from the camera) should not use NEE, since you will hit anything visible either way. The fact that the fireflies do not even diminish is strange (it's not impossible though), so I still have my doubts. – lightxbulb Feb 24 at 20:02
• About fireflies diminishing, I think the real reason for fireflies in my scene is because the reflective sphere shows an image of bright light source. This is very small as compared to the actual size of the light sources. Hence when the rays hitting the walls bounce, only a very few of them end up striking the light source image on the reflective sphere giving an incredibly high color in some samples. This just sounds like I am double dipping lights (1 from NEE, 2nd from reflective sphere) Sounds wrong but never seen such a case where people ignore the reflection of light in GI. – gallickgunner Feb 24 at 21:07
One of the first things that many people get wrong with MIS of direct lighting is that you have to always consider the same light source for both light sampling and BSDF sampling. For example, if you sampled Light $$L_i$$ during light sampling and the ray spawned from BSDF sampling hit $$L_j$$, you cannot mix them together since the probabilities cannot be used together for weights.
• That answers my point mentioned in the edit portion. The main problem still remains though. – gallickgunner Jan 8 at 16:08 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 44, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8812495470046997, "perplexity": 709.171699340985}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-35/segments/1566027312025.20/warc/CC-MAIN-20190817203056-20190817225056-00099.warc.gz"} |
http://mathhelpforum.com/algebra/123565-value-integers.html | # Thread: Value of Integers
1. ## Value of Integers
Let u and v be two positive real numbers satisfying the two equations u+v+uv=10 and u^2 +v^2=40. What is the value of integer closest to
u+v?
a)4
b)5
c)6
d)6
e)8
2. Observe that $40 = (u+v)^2-2uv = (u+v)^2-2(10-(u+v))$
This gives:
$60= (u+v)^2+2(u+v)$
Let $x = u+v$. Thus solve $60 = x^2+2x$ for x and determine the digit closest to x. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 4, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9157170653343201, "perplexity": 1175.550780153563}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-39/segments/1505818689661.35/warc/CC-MAIN-20170923123156-20170923143156-00713.warc.gz"} |
https://www.numerade.com/questions/evaluate-the-integral-displaystyle-int_14-sqrty-ln-y-dy/ | 💬 👋 We’re always here. Join our Discord to connect with other students 24/7, any time, night or day.Join Here!
JH
# Evaluate the integral.$\displaystyle \int_1^4 \sqrt{y} \ln y\ dy$
## $\frac{16}{3} \ln 4-\frac{28}{9}$
#### Topics
Integration Techniques
### Discussion
You must be signed in to discuss.
##### Kristen K.
University of Michigan - Ann Arbor
##### Samuel H.
University of Nottingham
Lectures
Join Bootcamp
### Video Transcript
Let's use integration by parts for this in a barrel. Let's take you to be natural, Aga boy. Then do you one of her lie D y? And this leaves us with Devi equal squared or why d y and taking the integral here will give us two thirds. Why the three house? So using our formula here This me right on the side, juvie minus and a girl video. So you times V in the wrong order. But there they are And then our end points once before minus in a girl VDO So let me pull out the two thirds And then after cancelling the wise, we have one half. So let's just go ahead and evaluate this term first. So, Ellen, for times two or three and then for the three halfs and then minus zero after you plug in one minus and we've already evaluated this inaugural. So here we should get to over three coming from over here and then another two of three coming from here. Why three house once for so here we have squared off form, which is too then to the third power, which is eight and then times two, so That's sixteen for the first term. And then here. Let's go ahead and simplify this. So we get full over nine and then we got a plug in foreign one. So here, sixteen over three. And then we've already evaluated this to be eight. So take off one and then multiply it by four. So we have twenty eight up there, all divided by nine. How? And that's your final answer.
JH
#### Topics
Integration Techniques
##### Kristen K.
University of Michigan - Ann Arbor
##### Samuel H.
University of Nottingham
Lectures
Join Bootcamp | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6565238833427429, "perplexity": 2185.6119488423133}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323585837.82/warc/CC-MAIN-20211024015104-20211024045104-00468.warc.gz"} |
http://math.stackexchange.com/questions/191544/where-does-the-axb-come-from-when-solving-partial-fractions-with-a-quadratic | # Where does the $Ax+B$ come from when solving partial fractions with a quadratic factor?
I'm only just now learning about partial fractions to solve integrals. I've read that
$$\frac{f(x)}{(px^2+qx+r)(x-a)}\equiv \frac{Ax+B}{(px^2+qx+r)}+\frac{C}{(x-a)}$$
I haven't figured out how it was decided that $Ax+B$ ought to be used and why it works. Can someone explain it?
-
Where does everything live? Is $f$ a polynomial? Or even constant? Are $A$ and $B$ constants? And what do you mean by $\equiv$ as opposed to $=$? – Simon Markett Sep 5 '12 at 17:13
It's because if $g(x)$ is a polynomial of degree greater than $1$, we can always rewrite $$\frac{g(x)}{px^2+qx+r}=h(x)+\frac{Cx+D}{px^2+qx+r}$$ for some polynomial $h$ and constants $C,D$.
Also, it's worth noting that your statement (as written) is only true when $f$ is a polynomial of degree at most $2$.
-
If $f,g,h$ are polynomials, you want to rewrite ${f(x)\over g(x)h(x)}$. Of course we assume that $g$ and $h$ have no roots in common. Then the extended Euclidean algorithm produces polynomials $u,v$ such that $u(x)g(x)+v(x)h(x)=1$. After multiplication with $f$ this becomes $f(x)u(x)g(x)+f(x)v(x)h(x)=f(x)$. Finally after dividing by $g(x)h(x)$, we have $${f(x)\over g(x)h(x)} = {f(x)u(x)\over h(x)}+{f(x)v(x)\over g(x)}.$$ We can perform polynomial division with remainder, i.e. write $f(x)u(x) = q_1(x)\cdot h(x)+r_1(x)$ and $f(x)u(x) = q_2(x)\cdot g(x)+r_2(x)$. The process of division with remainder can guarantee $\deg r_1<\deg h$ and $\deg r_2<\deg g$, but not more. Thus we end up with $${f(x)\over g(x)h(x)} = q_1(x)+q_2(x) + {r_1(x)\over h(x)}+{r_2(x)\over g(x)}$$ with $\deg r_1<\deg h$ and $\deg r_2<\deg g$. To allow all possible options for $r_1$ and $r_2$ we must use accordingly many powers of $x$ and unknown coefficients.
-
Well, the denominator is a polynomial of degree three. I'll assume that $f(x)$ is a polynomial of degree $\leq 2$. Actually, the case $f(x)=1$ already explains the philosophy.
The numerator of the first fraction will be multiplied by a linear polynomial, so that its degree must be one, if you hope to compete with the second fraction. Assume that $$\frac{1}{(px^2+qx+r)(x-a)}=\frac{E(x)}{px^2+qx+r}+\frac{C}{x-a},$$ then $$1=E(x)(x-a)+C(px^2+qx+r),$$ and you definitely need a term like $x^2$ on the right-hand side to cancel $Cpx^2$. That's why you need at least a polynomial $E(x)$ of the first order.
- | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.921489953994751, "perplexity": 97.48565168088042}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-32/segments/1438042986148.56/warc/CC-MAIN-20150728002306-00231-ip-10-236-191-2.ec2.internal.warc.gz"} |
http://mathhelpforum.com/differential-geometry/172144-closed-bounded-d-imply-closed-bounded-f-d.html | # Math Help - Closed & bounded on D imply closed and bounded on f(D)?
1. ## Closed & bounded on D imply closed and bounded on f(D)?
The question is:
For D a metric space and f--->R a continuous function. If D is closed and bounded. Is f(D) closed and bounded?
I'm pretty sure this is true for the case of D belonging to the real numbers, but I think this is true for D just being a metric space. I think if I can somehow find the example of a metric space that is closed and bounded, but not compact that would be the key. Can't think of one, though. I've also had no luck proving it true. So if someone can give a a counter example or an idea of his to proves, I would greatly appreciate it! Thanks!
2. Not generally, no. Just take the identity function $f0,1)\to\mathbb{R}" alt="f0,1)\to\mathbb{R}" />. As a space, $D=(0,1)$ is closed (all spaces are closed). But clearly $f((0,1))=(0,1)$ is not closed in $\mathbb{R}$.
3. How is it that you can say that D = (0, 1) is closed? Are you limiting the entire metric space to just the interval (0, 1) and thus it is open and closed? Regardless (0, 1) doesn't contain all if it's limit points which would make it not closed? I'm guessing I'm not exactly clear on being closed in metric spaces. Thanks a lot fir the feedback!
4. Originally Posted by Dagger2006
How is it that you can say that D = (0, 1) is closed? Are you limiting the entire metric space to just the interval (0, 1) and thus it is open and closed? Regardless (0, 1) doesn't contain all if it's limit points which would make it not closed? I'm guessing I'm not exactly clear on being closed in metric spaces. Thanks a lot fir the feedback!
Recall that a limit point of a set $D$ is a point in the space such that every neighborhood of the point contains a point not in $D$. If $D$ is the space, then it has to contain all its limit points by definition.
A topological space is always closed with respect to itself. Always---even in the metric case.
EDIT: By the way, you can make the image unbounded by using the continuous function defined by $g(x)=1/x$. Then $g(D)=(1,\infty)$ which is neither bounded nor closed in $\mathbb{R}$. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 10, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9728774428367615, "perplexity": 320.9656201969282}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-32/segments/1438042990217.27/warc/CC-MAIN-20150728002310-00020-ip-10-236-191-2.ec2.internal.warc.gz"} |
https://www.lessonplanet.com/teachers/products-4 | # Products #4
In this Pre-algebra activity, 6th graders problems solve 10 Pre-algebra equations. Students write their answers on the activity. | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8150171637535095, "perplexity": 21083.215305492995}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-09/segments/1518891814105.6/warc/CC-MAIN-20180222120939-20180222140939-00292.warc.gz"} |
https://upcommons.upc.edu/browse?authority=f8f11a91-bef7-4bc0-9a0b-57c58a0044d1;orcid:0000-0002-6066-7064&type=author | Now showing items 1-11 of 11
• #### Angular control of anisotropy-induced bound states in the continuum
(2019-11-01)
Article
Open Access
Radiation of leaky modes existing in anisotropic waveguides can be cancelled by destructive interference at special propagation directions relative to the optical axis orientation, resulting in fully bound states surrounded ...
• #### Anisotropy-induced photonic bound states in the continuum
(Nature, 2017-03-20)
Article
Open Access
Bound states in the continuum (BICs) are radiationless localized states embedded in the part of the parameter space that otherwise corresponds to radiative modes. Many decades after their original prediction1, 2, 3 and ...
• #### Bound states in the continuum in anisotropic structures
(Institute of Electrical and Electronics Engineers (IEEE), 2017)
Conference report
Restricted access - publisher's policy
We report theoretical and experimental observation of radiationless bound states in the continuum (BIC) in waveguiding anisotropic structures. BICs may have all possible polarizations and be the only possible boundstates ...
• #### Existence loci of bound states in the continuum in the parameter space of anisotropic planar structures
(Optical Society of American (OSA), 2019)
Conference lecture
Open Access
Bound states in the continuum (BICs), first predicted in the field of quantum physics [1], are localized radiationless states existing in the part of the spectrum that corresponds to radiative modes. BICs are a general ...
• #### Final 2019
(Universitat Politècnica de Catalunya, 2019-01-07)
Exam
• #### Parcial 2018
(Universitat Politècnica de Catalunya, 2018-11-05)
Exam
• #### Self-sustained coherent phonon generation in optomechanical cavities
(Institute of Physics (IOP), 2016-09)
Article
Open Access
Optical forces can set tiny objects in states of mechanical self-sustained oscillation, spontaneously generating periodic signals by extracting power from steady sources. Miniaturized self-sustained coherent phonon sources ...
• #### Topological properties of bound states in the continuum in geometries with broken anisotropy symmetry
(2018-12-18)
Article
Open Access
Waveguiding structures made of anisotropic media support bound states in the continuum (BICs) that arise when the radiation channel of otherwise semileaky modes is suppressed. Hitherto, only structures with optical axes ...
• #### Topology Transitions of Anisotropy Induced Bound States in the Continuum
(2018)
Conference report
Open Access
We demonstrate that Bound states In the Continuum (BICs) are supported in planar anisotropic structures where the optic axes are arbitrarily oriented. Moreover, we reveal fundamental new topological properties of these ...
• #### Transition from Dirac points to exceptional points in anisotropic waveguides
(American Physical Society, 2019-10-04)
Article
Open Access
We uncover the existence of Dirac and exceptional points in waveguides made of anisotropic materials, and study the transition between them. Dirac points in the dispersion diagram appear at propagation directions where the ...
• #### Waveguide stopped light mediated by mode transitions
(Optical Society of American (OSA), 2019)
Conference lecture
Open Access
Hyperbolic metamaterials (HMMs) are uniaxial materials that have hyperbolic dispersion curves. There are two types of hyperbolic metamaterials, type I that is described by a permittivity tensor with e|| < 0 and e¿ > 0, and ... | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8878942728042603, "perplexity": 6573.314888392615}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-39/segments/1631780057427.71/warc/CC-MAIN-20210923165408-20210923195408-00581.warc.gz"} |
http://mathdl.maa.org/programs/faculty-and-departments/course-communities/velocity-accleration-in-2d?device=desktop | # Velocity & Accleration in 2D
This applet shows the path of a golf ball rolling on a putting green. You can choose to add the velocity, acceleration, and tangential and normal accelerations. The text helps the students understand the interpretation of the magnitude of the velocity and the tangential and normal components of accelerations.
Identifier:
http://www.phys.uwosh.edu/rioux/physlets/morephyslets/kinematics_7.html
Rating:
Creator(s):
Aaron Titus
Cataloger:
Philip Yasskin
Publisher:
Aaron Titus
Rights:
Aaron Titus | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.889789342880249, "perplexity": 835.6814114701549}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-04/segments/1484560284270.95/warc/CC-MAIN-20170116095124-00008-ip-10-171-10-70.ec2.internal.warc.gz"} |
http://mathhelpforum.com/discrete-math/167197-first-order-logic-print.html | # First order Logic!
• December 31st 2010, 04:07 PM
payam
First order Logic!
Could anyone help me with this? (Headbang)
Donald and Daisy Duck took their nephews, age 4, 5, and 6, on an outing. Each boy wore a tee-shirt with a different design on it and of a different color. You are also given the following information:
■ Huey is younger than the boy in the green tee-shirt.
■ The 5-year-old wore the tee-shirt with the camel design.
■ Dewey’s tee-shirt was yellow.
■ Louie’s tee-shirt bore the giraffe design.
■ The panda design was not featured on the white tee-shirt.
And,
Use the language containing the constants huey, dewey, louie, 4, 5, 6, green, yellow, white, camel, giraffe, and panda; the function symbols age/1, color/1, and design/1; and the predicate symbols Nephew/1, = /2 and < /2.
Questions:
(a) Represent these facts as sentences in FOL.
(b) Using your formalization, is it possible to conclude the age of each boy together with the color and design of the tee-shirt he is wearing? Show semantically how you determined your answer.
(c) If your answer was “no,” indicate what further sentences you would need to add so that you could conclude the age of each boy together with the color and design of the tee-shirt he is wearing.
• December 31st 2010, 08:56 PM
I don't know FOL, but hopefully I can help you solve the problem.
1 ■ Huey is younger than the boy in the green tee-shirt.
2 ■ The 5-year-old wore the tee-shirt with the camel design.
3 ■ Dewey’s tee-shirt was yellow.
4 ■ Louie’s tee-shirt bore the giraffe design.
5 ■ The panda design was not featured on the white tee-shirt.
--
Statement 1 implies Huey is not wearing a green shirt. Statement 3 implies he's not wearing the yellow shirt. Hence he's wearing the white shirt. Then 4 and 5 imply that Huey's shirt bore the camel design. Statement 2 implies that Huey is 5. Hence: Huey, 5, white, camel
By Statement 1, since Huey is younger than the boy in the green t-shirt, this implies that the boy in the green shirt is 6. Hence by Statement 3, Louie is 6 and Dewey is 4. Hence: Louie, 6, green, giraffe. Dewey, 4, yellow, panda.
It's a bit confusing at first, but if you work it out you should be fine. A table can help as well.
• January 1st 2011, 03:49 AM
Ackbeet
I'll give my stab at translating the first sentence into FOL. I'll do an iterative approach to show what my thought process was in translation. I'll use MacstersUndead's numbering scheme as well.
1. $\text{age}(\text{huey})<\text{age}(\text{boy in the green T-shirt})$ (This is the main idea this statement is making. What remains is to translate "boy in the green T-shirt" into FOL. This is non-trivial. I may be breaking some of your FOL rules here, but hopefully I'll give you an idea of how it might be done.)
1. $\text{age}(\text{huey})<\text{age}((x)(x\in\{\text {huey},\text{dewey},\text{louie}\}\land =\!(\text{color}(x),\text{green}))).$ You'll notice that I'm sort of using a quantifier-type construction here, only without the quantifier. That's because I need to have a variable that is a boy, instead of merely asserting the existence of a boy, or saying something about all the boys. In mathematical notation, I'd probably use set builder notation to translate "boy in the green T-shirt" thus:
$\{x|x\in\{\text{huey},\text{dewey},\text{louie}\}\ land =\!(\text{color}(x),\text{green})\}.$
Finally, since I'm thinking that the notation of sets might not be available to you, I can rewrite one more time this way:
1. $\text{age}(\text{huey})<\text{age}((x)((=\!(x,\tex t{huey})\lor =\!(x,\text{dewey})\lor =\!(x,\text{louie}))\land =\!(\text{color}(x),\text{green}))).$ So in this expression, the only thing about which I'm unsure is whether I can use that type of expression to get at the value of $x.$ You'll also note that I'm assuming the "color" function returns the color of its argument's T-shirt. If it didn't, we'd have to have another function that returned the T-shirt of its argument, so that you'd write it thus:
$\text{color}(\text{T-shirt}(x)),$ anytime you wanted the color of a T-shirt.
[EDIT]: To get rid of the problems above, actually USE a quantifier! Throw everything inside a quantifier statement thus:
$(\forall x)(((=\!(x,\text{huey})\lor =\!(x,\text{dewey})\lor =\!(x,\text{louie}))\land =\!(\text{color}(x),\text{green}))\to\:<\!(\text{a ge}(\text{huey}),\text{age}(x))).$
So, re-translating this FOL sentence into English would go like this: for any x, if x is either Huey, Dewey, or Louie, and if x's T-shirt is green, then the age of Huey is less than the age of x.
I think that does it.
• January 2nd 2011, 09:33 AM
payam
That was really helful.
Following your comments, I tried to do part 'a', that is translating the sentences to FOL:
a)Representing facts as sentences in FOL.
(1) ∀x [(color (Shirt (x)) =green) → (age (huey) < age (x))]
(2) ∀x [(age(x) = 5) → (design, shirt(x)= camel)]
(3)Ex dewey(x) /\ shirt (x) = yellow
(4) Ey louie (y) /\ (design, shirt (y) = giraffe)
(5) Ex z(shirt) /\ white(color(z)) /\ (design (z) =/ panda)
Do you think these are correct? I suppose the are. Then I need to do the part B, which is to conclude age, color and design of each boy. Any idea? Thanks
• January 2nd 2011, 03:31 PM
payam
I think MacstersUndead solution for second part is perfect.
Thanks.
• January 3rd 2011, 03:31 AM
Ackbeet
Unless your universe of discourse is the set of the boys, none of your sentences work, because they don't restrict the possible objects over which the variable x can run. Are you sure you're allowed to introduce the Shirt function? In # 2, you should have (design(shirt(x))= camel). For #3, why not do simply Shirt(dewey) = yellow? You don't have to use quantifiers everywhere, necessarily. In addition, the way you've written it, dewey is now a predicate, which was not given in the beginning as one of the allowed predicates. I don't think your #5 has quite got it. You should only need one variable for that one.
• January 3rd 2011, 08:36 AM
payam
Thanks Ackbeet, that was really helpful,
I made some changes, as:
(1) ∀x [(color (Shirt (x)) =green) → (age (huey) < age (x))]
(2) ∀x [(age(x) = 5) → (design (shirt(x))= camel)]
(3) Shirt(dewey) = yellow
(4) Ey louie (y) /\ (design, shirt (y) = giraffe)
(5)∀x [color(shirt(x)) = white -> design(shirt(x)) =/ Panda]
what do you think about these? thanks
• January 3rd 2011, 09:07 AM
Ackbeet
Whoops. Sorry. For (3), you're going to need this:
Color(Shirt(dewey)) = yellow.
For (4), do the same sort of thing as with 3:
design(Shirt(louie)) = giraffe
Everything else looks good.
• January 3rd 2011, 11:43 AM
payam
Thanks Ackbeet.
• January 3rd 2011, 11:55 AM
Ackbeet
You're welcome. Have a good one! | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 7, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6729316115379333, "perplexity": 2961.9018994934668}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-07/segments/1454701148402.62/warc/CC-MAIN-20160205193908-00171-ip-10-236-182-209.ec2.internal.warc.gz"} |
https://www.koreascience.or.kr/search.page?keywords=LCD&pageSize=10&pageNo=2 | • Title, Summary, Keyword: LCD
### Development of the advanced transflective LCDs with high optical performance
• Lee, Jong-Hwae;Park, Ku-Hyun;Kim, Hyun-Ho;Yoon, Jae-Kyung;Park, Ki-Bok;Shin, Hyun-Ho
• 한국정보디스플레이학회:학술대회논문집
• /
• /
• pp.1330-1332
• /
• 2007
• We have newly developed transflective LCDs with a specific sub-pixel and the single cell gap structure. In our structure, the overall transmittance and reflectance has become higher than typical transflective LCDs. Furthermore, it can simplify the fabrication process of the transflective LCDs.
### A Novel Light Guide Plate with Micro-prisms for an Edge-lit LED Backlight
• Kwon, Jae-Joong;Kim, Hyoung-Joo;Shim, Sung-Kyu;Baek, Seung-In;Hwang, In-Sun;Jang, Tae-Seok
• 한국정보디스플레이학회:학술대회논문집
• /
• /
• pp.1193-1195
• /
• 2008
• We propose a novel light guide plate for an edge-lit LED backlight. Properly designed micro-prisms enable light to go out of the LGP in near vertical direction and luminance fluctuations in front of the LEDs to be invisible.
### The fabrication of TFTs for LCD using the 3mask process
• Yoo, Soon-Sung;Cho, Heung-Lyul;Kwon, Oh-Nam;Nam, Seung-Hee;Chang, Yoon-Gyoung;Kim, Ki-Yong;Cha, Soo-Yeoul;Ahn, Byung-Chul;Chung, In-Jae
• 한국정보디스플레이학회:학술대회논문집
• /
• /
• pp.948-951
• /
• 2005
• New technology that reduces photolithography process steps from 4 to 3 in fabrication of TFT LCD is introduced. The core technology for 3mask-TFTs is the lift-off process [1], by which the PAS and PXL layer are formed simultaneously. To evaluate the stability of this lift-off process, outgases from photo resist on a substrate during ITO deposition and the quality of ITO film were analyzed and the conventional photo resist stripper machine which operates lift-off process was examined to see its ability to reduce particle problems of the machine. Through the development of total process and design for TFTs using this 3mask technology, panels in TN and IPS modes which exhibit same performances of a display using a conventional process were achieved. In addition, this process was already verified in the mass production line and now some products are being produced by the 3mask technology.
### Novel Driving Scheme to remove residual image sticking in AMOLED
• Parikh, Kunjal;Choi, Joon-Hoo;Cho, Kyu-Sik;Huh, Jong-Moo;Park, Kyong-Tae;Jeong, Byoung-Seong;Park, Yong-Hwan;Kim, Tae-Youn;Lee, Baek-Woon;Kim, Chi-Woo
• 한국정보디스플레이학회:학술대회논문집
• /
• /
• pp.553-556
• /
• 2008
• We hereby report novel driving scheme to eliminate effect of "residual" image sticking (RRI) problem which arises due to hysteresis problem in Thin Film Transistor (TFT) in AMOLED Displays. The driving scheme applies "black" voltage after every data voltage period in order to drive AMOLED in uni-direction. The system can be easily implemented with 120 Hz driving scheme which is well matured in AMLCD industries. Our analyses show systematic evaluation of the problem and thereby solving it by simple methods which will be significantly effective of driving OLED towards mass manufacturing stage.
### Electro-mechanical Analyses of Thin Film Transistors for Flexible Displays
• Saran, Neerja;Roh, Nam-Seok;Kim, Sang-Il;Lee, Woo-Jae;Kim, Jong-Seong;Hwang, Tae-Hyung;Hong, Seok-Joon;Kim, Myeong-Hee;Lim, Soon-Kwon;Souk, Jun-Hyung
• 한국정보디스플레이학회:학술대회논문집
• /
• /
• pp.670-673
• /
• 2008
• Good mechanical properties of thin-film transistors on plastic substrates are an essential parameter in the development of robust flexible displays. In this paper, a careful investigation is carried out on TFT backplane on plastic substrates under cyclic bending conditions. Bending modes of tensile and compressive as well as parallel and perpendicular orientation-dependent bending of channel have been analyzed carefully. This analysis will be helpful in knowing the electro-mechanical performance boundaries of the TFT devices so as to determine the bending limitations of our flexible displays.
### a-Si TFT Integrated Gate Driver Using Multi-thread Driving
• Jang, Yong-Ho;Yoon, Soo-Young;Park, Kwon-Shik;Kim, Hae-Yeol;Kim, Binn;Chun, Min-Doo;Cho, Hyung-Nyuck;Choi, Seung-Chan;Moon, Tae-Woong;Ryoo, Chang-Il;Cho, Nam-Wook;Jo, Sung-Hak;Kim, Chang-Dong;Chung, In-Jae
• Journal of Information Display
• /
• v.7 no.3
• /
• pp.5-8
• /
• 2006
• A novel a-Si TFT integrated gate driver circuit using multi-thread driving has been developed. The circuit consists of two independent shift registers alternating between the two modes, "wake" and "sleep". The degradation of the circuit is retarded because the bias stress is removed during the sleep mode. It has been successfully integrated in 14.1-in. XGA LCD Panel, showing enhanced stability.
### Novel AC bias compensation scheme in hydrogenated amorphous silicon TFT for AMOLED Displays
• Parikh, Kunjal;Chung, Kyu-Ha;Choi, Beom-Rak;Goh, Joon-Chul;Huh, Jong-Moo;Song, Young-Rok;Kim, Nam-Deog;Choi, Joon-Hoo
• 한국정보디스플레이학회:학술대회논문집
• /
• /
• pp.1701-1703
• /
• 2006
• Here we describe a novel driving scheme in the form of negative AC bias stress (NAC) to compensate shift in the threshold voltage for hydrogenated amorphous silicon (${\alpha}$-Si:H) thin film transistor (TFT) for AMOLED applications. This scheme preserves the threshold voltage shift of ${\alpha}$-Si:H TFT for infinitely long duration of time(>30,000 hours) and thereby overall performance, without using any additional TFTs for compensation. We briefly describe about the possible driving schemes in order to implement for real time AMOLED applications. We attribute most of the results based on concept of plugging holes and electrons across the interface of the gate insulator in a controlled manner.
### Multiple LCD System Development of daisy-chain Method using LVDS (LVDS를 이용한 daisy-chain 방식의 다중 LCD 시스템 개발)
• Kim, Jae-Chul
• Journal of the Korea Institute of Information and Communication Engineering
• /
• v.16 no.12
• /
• pp.2747-2754
• /
• 2012
• This thesis explains the development of multiple LCD system with the additional function to maximize the utilization of PC contents. The newly developed system is composed of host LCD and slave LCD. Host LCD decodes and outputs the image and voice of NTSC, PAL, SECAM signals. It also converts the decoded signals into LVDS signals before transmitting them to slave LCD stage. In addition, the installation of CF Memory and USB Memory helps display multi-media data. Unlike the host LCD, since not including the tuner and memory part, the slave LCD can't receive TV signals and play video signals. It only has the function to receive LVDS image signals and display on a LCD panel. This newly developed multi-LCD system has competitiveness in various aspects. With its simple structure, the failure rate, price and display power are relatively low due to its simplification of the control part. It has price and functional competitiveness as the product whose host LCD can control the entire slave LCD in terms of channel, volume, and video output.
### Development of a LED BLU Tester Detecting the Errors of LCD Panels (LCD 패널의 불량을 검출하는 검사용 LED BLU 개발)
• Kouh, Hoon-Joon;Jang, Kyung-Soo;Oh, Ju-Young
• The Journal of the Korea Contents Association
• /
• v.10 no.5
• /
• pp.62-69
• /
• 2010
• LCD panel need BLU(Back Light Unit) that is outside source of light because can not emit light voluntarily. BLU is used in LCD module and is used in tester that examine LCD panel's badness. Lately, BLU had changed from CCFL(Cold Cathode Fluorescent Lamp) to LED(Light-Emitting Diode) fast. CCFL need extra-high tension power and produce much heat and is difficult to keep fixed brightness. LED is few electric power wastage and keeps fixed brightness. But, BLU that is used to detector that examine the LCD module is using CCFL until recently. This paper develops LED BLU that can examine LCD panel's badness. Also, this manufactures LED BLU to 24 inch size to examine all LCD panels(12~24 inch), and develops so that LED BLU may operate according to LCD panel's size.
### The acceptable limit of the contrast ratio of LCD TV based on human visual system
• Shin, Kwang-Hoon;Moon, Jong-Won;Park, Sun-Ah;Ahn, Ji-Young;Kang, Dong-Woo;Shin, Hyun-Ho
• 한국정보디스플레이학회:학술대회논문집
• /
• /
• pp.1497-1499
• /
• 2007
• Visual perception experiments were conducted to determine the acceptable limit of the contrast ratio of LCD TV under the watching condition. The results showed that the corresponding contrast ratio should be below 10,000:1 at the 3H(height of screen) distance in the living room environment. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.534335732460022, "perplexity": 13912.550315077893}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-31/segments/1627046154219.62/warc/CC-MAIN-20210801190212-20210801220212-00023.warc.gz"} |
https://oeis.org/wiki/Consecutive_integers_which_are_perfect_powers | This site is supported by donations to The OEIS Foundation.
# Consecutive integers which are perfect powers
## Mihăilescu's theorem
In 1844, Eugène Charles Catalan proposed the conjecture (proved in 2002 by Preda Mihăilescu, hence Mihăilescu's theorem)
Conjecture (Catalan's conjecture, 1844). (Catalan)
8 and 9 are the only consecutive integers which are perfect powers,
${\displaystyle 3^{2}-2^{3}=1.\,}$
Interestingly, 2 and 3 are the only consecutive primes.
## Consecutive perfect powers with difference equal to k
A001597 Perfect powers: ${\displaystyle \scriptstyle m^{k}\,}$ where ${\displaystyle \scriptstyle m\,}$ is an integer and ${\displaystyle \scriptstyle k\,\geq \,2.\,}$
{1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, 216, 225, 243, 256, 289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1024, 1089, ...}
Consecutive perfect powers with difference equal to
1: (8, 9).
2: (25, 27), ?
3: (1, 4), (125, 128), ?
4: (4, 8), (32, 36), (121, 125), ?
5: (27, 32), ?
It seems that all those lists are finite. (CONJECTURE? or PROOF?) | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 4, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.20159095525741577, "perplexity": 365.09482147811946}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-05/segments/1579251669967.70/warc/CC-MAIN-20200125041318-20200125070318-00476.warc.gz"} |
http://math.stackexchange.com/questions/111899/integrate-using-trigonometric-substitutions | # Integrate using Trigonometric Substitutions
Evaluate the integral using trigonometric substitutions.
$$\int{ x\over \sqrt{3-2x-x^2}} \,dx$$
I am familiar with using the right triangle diagram and theta, but I do not know which terms would go on the hypotenuse and sides in this case. If you can determine which numbers or $x$-values go on the hypotenuse, adjacent, and opposite sides, I can figure out the rest, although your final answer would help me check mine. Thanks!
-
Write $3-2x-x^2 =4-(x+1)^2$ first. – David Mitra Feb 22 '12 at 3:07
The "trick" in evaluating $$\tag{1} \int{x\over\sqrt{3-2x-x^2}}\,dx$$ is to complete the square of the expression in the radicand: rewrite $3-2x-x^2$ as$$\tag{2}4-\color{maroon}{(x+1)}^2.$$
I'm not sure what this right triangle diagram you speak of is, but with the method I assume you're using, the second "trick" is to take advantage of one of the Pythagorean Identities so that the square root in $(1)$ can be taken. Looking at $(2)$, you should be reminded of $$a^2-\color{maroon}{a^2\sin^2\theta}=a^2\cos^2\theta.$$ So, one may make the substitution $$\tag{3} (x+1)=2\sin\theta.$$ Then $$4-(x+1)^2 =4-(2\sin\theta)^2= 4-4\sin^2\theta= 4\cos^2\theta$$
Also, from our substitution rule $(3)$: $dx=2\cos\theta\, d\theta$ and $x=2\sin\theta-1$.
The integral $(1)$ then becomes $$\int { 2\sin\theta-1 \over2\cos\theta}\cdot2\cos\theta\,d\theta= \int(2\sin\theta-1)\,d\theta.$$ I'll leave the rest for you...
(and now I recall the triangle business: you can label two sides using $\sin\theta=(x+1)/2$; usually, after you find the antiderivative and write back in terms of $x$, the triangle is used as an an aid to simplify your answer).
-
@Izzy Ward: As shown by David Mitra, complete the square, obtaining $4-(x+1)^2$. Then if you want to use a triangle as a guide, make a right triangle with hypotenuse $2$. Label one of the "small" angles of the triangle with the label $\theta$, and let the side opposite $\theta$ be $x+1$. – André Nicolas Feb 22 '12 at 7:20
$\int \frac{x}{\sqrt{4-(x+1)^2}}dx = \int \frac{2\sin\theta-1}{\sqrt{4-4\sin^2\theta}}(2\cos\theta)d\theta$ (using the substitution $x+1=2\sin\theta$)
$=\int\frac{2\sin\theta-1}{2\cos\theta}2\cos\theta d\theta$
$= \int (2\sin\theta-1) d\theta$
$=-2\cos\theta-\theta +C$
$=-2\left(\frac{\sqrt{3-2x-x^2}}{2}\right) - \sin^{-1}\left(\frac{x+1}{2}\right)+C$
$=-\sqrt{3-2x-x^2}- \sin^{-1}\left(\frac{x+1}{2}\right)+C$
-
The last and next-to-last lines aren't equal - something funny happening with a 2. – Gerry Myerson Feb 22 '12 at 3:36
@Gerry Myerson Thanks for pointing that out! I was experiencing LaTeX blindness - forgot to delete the 2 when I cancelled. – Aru Ray Feb 22 '12 at 3:46 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9431113600730896, "perplexity": 411.6695222829905}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-48/segments/1448398450659.10/warc/CC-MAIN-20151124205410-00165-ip-10-71-132-137.ec2.internal.warc.gz"} |
http://zonatembus.com/business-management-mpeznoq/ca31e6-lalande-21185-spectral-class | The revised Yerkes Atlas system (Johnson & Morgan, 1953) listed only two M type spectral standard stars: HD 147379 (M0V) and HD 95735/Lalande 21185 (M2V). For each star, open the Search window (F3) and enter the star’s name.Click on the star and look at the displayed information at the upper right. The star is located only about 8.3 light-years away in the constellation Ursa Major. We announce the discovery of two planets orbiting the M dwarfs GJ 251 ($0.360\\pm0.015$ M$_\\odot$) and HD 238090 ($0.578\\pm0.021$ M$_\\odot$) based on CARMENES radial velocity (RV) data. M2. While HD 147379 was not considered a standard by expert classifiers in later compendia of standards, Lalande 21185 is still a … Lalande 21185 is a red dwarf (spectral type: M2V) only 8.31 light years distant from the Sun. In 1970, Castor A and Castor B were separated by less than 2 arcseconds. Jupiter-sized planet orbiting at twice Earth's distance at sub-Saturn temperatures; Orbit takes 5.9 years. A number of nearby stars – Barnard’s Star, Kapteyn’s Star, Lalande 21185, 61 Cygni, Ross 248 and possibly Procyon – are also included in this class. It is the fourth closest star system to our solar system, after Alpha Centauri, Barnard’s Star and Wolf 359. In addition, we independently confirm with CARMENES data the existence of Lalande 21185 b, a planet that has recently been discovered with the SOPHIE spectrograph. It was one of the systems first colonised under the First Diaspora between 2118 and 2148. Lalande 21185 Star Factoids. This spectral type M2V star was first found listed in Histoire Céleste Française published in 1801 and prepared by the French astronomer Jérôme Lalande (1732-1807) of the Paris Observatory. Lalande 21185 is a Spectral Class M2V star located some 8.3 light years away from Sol. The system became known as spectral class, and the letters most stars are assigned are O, B, A, F, G, K, M (going from hot to cool). Lalande 21185. Procyon A F5 +2.7 2. The star is the current Spectral Standard star for class M1 V. Lalande 21185 System (M2 V) - Lalande 21185 is also called GJ 411 and informally Proxima Ursa Majoris. Two stars Lalande 21185 (M2 V) and Betelgeuse (M2 I) are the same spectral type M2, but Betelgeuse is luminosity class I and Lalande 21185 is luminosity class V. … For this lab, you will need to record the spectral class and absolute magnitude of a group of near stars and a group of the brightest stars in the night sky. Centari C M5 +15.0 19. It has been the spectral standard star for class M2 V for a long time. It is the third brightest red dwarf in the night sky. Sun G2 +4.8 16. 10.5. Lalande 21185. M2.1V spectral class; 46% Solar Mass, 46% Solar Diameter, 63% Solar Metalicity; A flare star; Older than the Sun, younger than 10 Billion Years old; Lalande 21185 b Factoids. Procyon B F0 +13.0 3. (ST reference: Spaceflight Chronology) On several occasions in 2364, viewscreen readouts aboard the USS Enterprise-D showed the location of Lalande 21185, in the form of charts from the Enterprise library computer. 8. Struve 23948 M5 +11.9 5. It has an apparent magnitude of 7.520 and cannot be seen by the naked eye. ~ ~ is a red dwarf (spectral type: M2V) only 8.31 light years distant from the Sun. Struve 2398 M4 +11.1 4. Centari B K5 +5.8 18. It is not known whether the colony continues to be known simply as Lalande 21185, or whether the system is now known by the name of its capital world - as is the case with Vekta, Helghan and Gyre. Centari A G2 +4.4 17. Each letter is subdivided using a number from 0-9 (hot to cool), so a B3 star is slightly hotter than a B4 star. It is the fourth closest star system to the Sun at 8.3 ly. Lalande 21185 is a red dwarf star (spectral class M2nV), located about 2.5 parsecs (8.21 light-years) from Earth, where it is visible in the constellation of Ursa Major. All three planets belong to the class … TABLE 2 Near Stars (Stars which are close to the Earth) Star Name Spectral Class Absolute Magnitude Star Name Spectral Class Absolute Magnitude 1. Facts. ... Lalande 21185. Lalande 21185 is the brightest red dwarf visible from the northern hemisphere and the fourth system closest to Sun after Alpha Centauri 3, Barnard's Star, and Wolf 359. Only about 8.3 light-years away in the night sky of the systems first colonised the... Systems first colonised under the first Diaspora between 2118 and 2148 distance at sub-Saturn temperatures ; Orbit takes 5.9.! A spectral Class M2V star located some 8.3 light years away from Sol twice Earth 's at. Years distant from the Sun at 8.3 ly Diaspora between 2118 and.! Years distant from the Sun at 8.3 ly 8.3 ly is located only about 8.3 light-years away in the sky... And 2148 lalande 21185 is a red dwarf ( spectral type: M2V ) only 8.31 light distant. Some 8.3 light years distant from the Sun at 8.3 ly away in the night sky the eye... It has been the spectral standard star for Class M2 V for long. It is the fourth closest star system to the Sun at 8.3 ly and can not seen... Red dwarf in the night sky red dwarf ( spectral type: M2V ) only 8.31 light years from... Twice Earth 's distance at sub-Saturn temperatures ; Orbit takes 5.9 years away in constellation. Class M2 V for a long time the third brightest red dwarf in constellation. System to our solar system, after Alpha Centauri, Barnard ’ s star and Wolf 359 were. Standard star for Class M2 V for a long time between 2118 and 2148 a long time Class V! The spectral standard star for Class M2 V for a long time a red dwarf ( spectral:! Brightest red dwarf ( spectral type: M2V ) only 8.31 light years distant the! Spectral standard star for Class M2 V for a long time is the fourth closest star to... Can not be seen by the naked eye it was one lalande 21185 spectral class systems! Some 8.3 light years distant from the Sun at 8.3 ly located only about 8.3 light-years away in constellation! Located only about 8.3 light-years away in the night sky away from Sol 8.3 ly the... Less than 2 arcseconds of 7.520 and can not be seen by the naked eye naked eye at temperatures! Away from Sol, after Alpha Centauri, Barnard ’ s star and 359... By less than 2 arcseconds 8.31 light years away from Sol Earth 's distance sub-Saturn! Is a red dwarf in the constellation Ursa Major constellation Ursa Major 7.520 and can not be seen by naked. Class M2V star located some 8.3 light years away from Sol star for Class M2 for! The star is located only about 8.3 light-years away in the night sky distance sub-Saturn... Barnard ’ s star and Wolf 359 been the spectral standard star Class! Castor B were separated by less than 2 arcseconds spectral standard star for Class V... Not be seen by the naked eye V for a long time ’ s star and 359... 21185 is a red dwarf in the night sky away in the night sky, Alpha. S star and Wolf 359 ; Orbit takes 5.9 years third brightest red dwarf spectral! A and Castor B were separated by less than 2 arcseconds 1970, Castor a Castor! To the Sun seen by the naked eye Centauri, Barnard ’ s star and Wolf 359 star! About 8.3 light-years away in the night sky systems first colonised under the first Diaspora between 2118 and.... Can not be seen by the naked eye: M2V ) only 8.31 years... Planet orbiting at twice Earth 's distance at sub-Saturn temperatures ; Orbit takes 5.9.. 8.3 light-years away in the night sky spectral type: M2V ) only 8.31 years... Twice Earth 's distance at sub-Saturn temperatures ; Orbit takes 5.9 years type: M2V ) only light. The spectral standard star for Class M2 V for a long time magnitude... Away in the constellation Ursa Major the third brightest red dwarf in the constellation Ursa Major some light! Takes 5.9 years Diaspora between 2118 and 2148 5.9 years it has been the spectral standard star for Class V... A and Castor B were separated by less than 2 arcseconds 2118 and 2148 only 8.3... Light-Years away in the constellation Ursa Major of the systems first colonised under the first Diaspora between and. 2118 and 2148 and Wolf 359 only 8.31 light years distant from the.! Jupiter-Sized planet orbiting at twice Earth 's distance at sub-Saturn temperatures ; Orbit takes 5.9.... Dwarf in the constellation Ursa Major been the spectral standard star for Class M2 V a! Away in the constellation Ursa Major M2V ) only 8.31 light years distant from Sun. Sun at 8.3 ly at 8.3 ly located some 8.3 light years distant from the Sun about light-years! Located only about 8.3 light-years away in the night sky an apparent magnitude of 7.520 and can not be by... And 2148 star and Wolf 359 in 1970, Castor a and B... Castor B were separated by less than 2 arcseconds than 2 arcseconds seen by the naked eye 5.9 years in. Orbit takes 5.9 years between 2118 and 2148 has an apparent magnitude of 7.520 and not! Class M2 V for a long time our solar system, after Centauri. Spectral Class M2V star located some 8.3 light years distant from the Sun star. Magnitude of 7.520 and can not be seen by the naked eye Barnard ’ s star and Wolf.! Jupiter-Sized planet orbiting at twice Earth 's distance at sub-Saturn temperatures ; Orbit takes 5.9 years a spectral Class star! ~ is a red dwarf ( spectral type: M2V ) only 8.31 light away. To our solar system, after Alpha Centauri, Barnard ’ s star and 359. 8.31 light years away from Sol from Sol Centauri, Barnard ’ star! At 8.3 ly 's distance at sub-Saturn temperatures ; Orbit takes 5.9 years M2V ) 8.31... Distant from the Sun was one of the systems first colonised under the first Diaspora between 2118 and 2148,! 5.9 years Ursa Major the systems first colonised under the first Diaspora between 2118 and 2148 Orbit... 8.3 light years distant from the Sun 1970, Castor a and Castor lalande 21185 spectral class were separated by less 2. And Wolf 359 systems first colonised under the first Diaspora between 2118 and 2148 Earth 's distance at sub-Saturn ;! Has been the spectral standard star for Class M2 V for a long time between 2118 and 2148 light-years in. About 8.3 light-years away in the constellation Ursa Major apparent magnitude of 7.520 and can be. For a long time systems first colonised under the first Diaspora between 2118 and 2148 8.3! Was one of the systems first colonised under the first Diaspora between 2118 and 2148 systems colonised... It has been the spectral standard star for Class M2 V for a long.... Earth 's distance at sub-Saturn temperatures ; Orbit takes 5.9 years the star is lalande 21185 spectral class about. Located only about 8.3 light-years away in the constellation Ursa Major magnitude of 7.520 and can be! Is located only about 8.3 light-years away in the constellation Ursa Major Earth 's distance at sub-Saturn temperatures Orbit. The night sky naked eye the night sky first Diaspora between 2118 and 2148 to the at. The naked eye M2V ) only 8.31 light years away from Sol Centauri... Than 2 arcseconds has been the spectral standard star for Class M2 V a., after Alpha Centauri, Barnard ’ s star and Wolf 359 the constellation Ursa Major constellation. Only 8.31 light years distant from the Sun ( spectral type: M2V ) only light... ’ s star and Wolf 359 8.31 light years distant from the Sun orbiting. Closest star system to the Sun constellation Ursa Major closest star system lalande 21185 spectral class the Sun at 8.3.... Located some 8.3 light years distant from the Sun a spectral Class M2V star located some 8.3 light away... Years distant from the Sun at 8.3 ly under the first Diaspora 2118! 7.520 and can not be seen by the naked eye away in the night sky can be. Third brightest red dwarf ( spectral type: M2V ) only 8.31 light years distant from Sun! In 1970, Castor a and Castor B were separated by less than 2 arcseconds star system to the at... Star for Class M2 V for a long time our solar system, after Alpha,. Third brightest red dwarf ( spectral type: M2V ) only 8.31 light away... Than 2 arcseconds was one of the systems first colonised under the first Diaspora 2118! And Wolf 359 about 8.3 light-years away in the night sky in the Ursa. Sun at 8.3 ly red dwarf in the constellation Ursa Major takes 5.9 years type M2V... At 8.3 ly 5.9 years, after Alpha Centauri, Barnard ’ s star and Wolf 359 first. Sun at 8.3 ly M2V star located some 8.3 light years distant from the.... Distant from the Sun 8.3 light years distant from the Sun seen by the naked eye Class M2 V a. Class M2 V for a long time constellation Ursa Major Class M2 V for a long.... Has been the spectral standard star for Class M2 V for a time. Jupiter-Sized planet orbiting at twice Earth 's distance at sub-Saturn temperatures ; Orbit takes 5.9 years twice Earth distance! Is located only about 8.3 light-years away in the constellation Ursa Major away in the sky! The night sky about 8.3 light-years away in the night sky by less than 2.! In 1970, Castor a and Castor B were separated by less than arcseconds. From the Sun night sky takes 5.9 years ( spectral type: )! ; Orbit takes 5.9 years Sun at 8.3 ly standard star for Class M2 V for a long time 2148. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5150309801101685, "perplexity": 3936.9554289854127}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-10/segments/1614178361808.18/warc/CC-MAIN-20210228235852-20210301025852-00002.warc.gz"} |
https://admin.clutchprep.com/physics/practice-problems/95952/two-cannonballs-a-and-b-are-fired-from-the-ground-with-identical-initial-speeds- | Physics Practice Problems Projectile Motion: Positive Launch Practice Problems Solution: Two cannonballs, A and B, are fired from the groun...
⚠️Our tutors found the solution shown to be helpful for the problem you're searching for. We don't have the exact solution yet.
# Solution: Two cannonballs, A and B, are fired from the ground with identical initial speeds, but with A larger than B, and | 45 - B | &gt; | 45 - A |.Which cannonball reaches a higher elevation?Which stays longer in the air?Which travels farther?
###### Problem
Two cannonballs, A and B, are fired from the ground with identical initial speeds, but with A larger than B, and | 45 - B | > | 45 - A |.
Which cannonball reaches a higher elevation?
Which stays longer in the air?
Which travels farther?
Projectile Motion: Positive Launch
Projectile Motion: Positive Launch
#### Q. A baseball is hit with a speed of 29.0 m/s at an angle of 46.0 . It lands on the flat roof of a 13.0 m -tall nearby building.If the ball was hit whe...
Solved • Mon Oct 29 2018 19:00:22 GMT-0400 (EDT)
Projectile Motion: Positive Launch
#### Q. A grasshopper hops down a level road. On each hop, the grasshopper launches itself at angle exttip{ heta_{0}}{theta_0} = 50 and achieves a range e...
Solved • Mon Oct 29 2018 19:00:22 GMT-0400 (EDT)
Projectile Motion: Positive Launch
#### Q. A projectile is launched at an upward angle of 30 to the horizontal with a speed of 30 { m m/s}.How does the horizontal component of its velocity 1....
Solved • Mon Oct 29 2018 19:00:18 GMT-0400 (EDT)
Projectile Motion: Positive Launch
#### Q. A major leaguer hits a baseball so that it leaves the bat at a speed of 30.6 m/s and at an angle of 36.3 above the horizontal. You can ignore...
Solved • Mon Oct 29 2018 18:50:54 GMT-0400 (EDT) | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8376739621162415, "perplexity": 2551.610743662238}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-16/segments/1585370510846.12/warc/CC-MAIN-20200403092656-20200403122656-00037.warc.gz"} |
https://www.physicsforums.com/threads/finding-derivitive-of-a-triangle-area.595683/ | # Finding Derivitive of a Triangle Area
1. Apr 11, 2012
### odolwa99
My answer to this question seems close to that of the book but I have only solved for +1/2 and not the -1/2. Can anyone help?
Many thanks.
1. The problem statement, all variables and given/known data
Q. The area of a triangle is $\frac{-4m^2 + 4m - 1}{m}$. Find the value of m via differentiation.
2. Relevant equations
3. The attempt at a solution
Attempt: $\frac{dA}{dm}$ = $\frac{4m^2 - 4m - 1}{m^2}$ = 0 => 4m2 - 4m + 1 = 0 => (2m - 1)(2m - 1) => m = 1/2
Ans.: (From text book): $\frac{dA}{dm}$ = $\frac{-4m^2 + 1}{m^2}$ = 0 => m = +/- 1/2
1. The problem statement, all variables and given/known data
2. Relevant equations
3. The attempt at a solution
2. Apr 11, 2012
### Pengwuino
The question makes no sense and sounds incomplete. Find m by differentiation? That's not the derivative of A either. Are you sure you're not missing a portion of the problem?
Similar Discussions: Finding Derivitive of a Triangle Area | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6868055462837219, "perplexity": 1050.8824934621239}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-47/segments/1510934804881.4/warc/CC-MAIN-20171118113721-20171118133721-00027.warc.gz"} |
https://kops.uni-konstanz.de/handle/123456789/35076 | ## The Disappearing Lesion : Sigmund Freud, Sensory-Motor Physiology, And The Beginnings Of Psychoanalysis
2013
Guenther, Katja
Journal article
Published
##### Published in
Modern Intellectual History : MIH ; 10 (2013), 3. - pp. 569-601. - ISSN 1479-2443. - eISSN 1479-2451
##### Abstract
Freud's criticism of the localization project as carried out by Theodor Meynert and Carl Wernicke has usually been seen as marking his break with contemporaneous brain science. In this article, however, I show that Freud criticized localization not by turning his back on brain science, but rather by radicalizing some of its principles. In particular, he argued that the physiological pretensions of the localization project remained at odds with its uncritical importation of psychological categories. Further, by avoiding a confusion of categories and adopting a parallelist reading, Freud was able to develop a fully “physiologized” account of nervous processes. This opened up the possibility for forms of mental pathology that were not reliant on the anatomical lesion. Instead, Freud suggested that lived experience might be able to create a pathological organization within the nervous system. This critique—a passage through, rather than a turn away from, brain science—opened the possibility for Freud's theory of the unconscious and his developing psychoanalysis. On a methodological level, this article aims to show how the intellectual history of modern Europe can gain from taking seriously the impact of the brain sciences, and by applying to scientific texts the methods and reading practices traditionally reserved for philosophical or literary works.
900 History
##### Cite This
ISO 690GUENTHER, Katja, 2013. The Disappearing Lesion : Sigmund Freud, Sensory-Motor Physiology, And The Beginnings Of Psychoanalysis. In: Modern Intellectual History : MIH. 10(3), pp. 569-601. ISSN 1479-2443. eISSN 1479-2451. Available under: doi: 10.1017/S147924431300022X
BibTex
@article{Guenther2013Disap-35076,
year={2013},
doi={10.1017/S147924431300022X},
title={The Disappearing Lesion : Sigmund Freud, Sensory-Motor Physiology, And The Beginnings Of Psychoanalysis},
number={3},
volume={10},
issn={1479-2443},
journal={Modern Intellectual History : MIH},
pages={569--601},
author={Guenther, Katja}
}
RDF
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:dspace="http://digital-repositories.org/ontologies/dspace/0.1.0#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:void="http://rdfs.org/ns/void#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" >
<dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2016-08-25T13:29:42Z</dc:date>
<foaf:homepage rdf:resource="http://localhost:8080/"/>
<dcterms:available rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2016-08-25T13:29:42Z</dcterms:available>
<dcterms:hasPart rdf:resource="https://kops.uni-konstanz.de/bitstream/123456789/35076/1/Guenther_0-351332.pdf"/>
<dcterms:issued>2013</dcterms:issued>
<dc:rights>terms-of-use</dc:rights>
<dc:creator>Guenther, Katja</dc:creator>
<void:sparqlEndpoint rdf:resource="http://localhost/fuseki/dspace/sparql"/>
<dspace:hasBitstream rdf:resource="https://kops.uni-konstanz.de/bitstream/123456789/35076/1/Guenther_0-351332.pdf"/>
<dc:contributor>Guenther, Katja</dc:contributor>
<dcterms:abstract xml:lang="eng">Freud's criticism of the localization project as carried out by Theodor Meynert and Carl Wernicke has usually been seen as marking his break with contemporaneous brain science. In this article, however, I show that Freud criticized localization not by turning his back on brain science, but rather by radicalizing some of its principles. In particular, he argued that the physiological pretensions of the localization project remained at odds with its uncritical importation of psychological categories. Further, by avoiding a confusion of categories and adopting a parallelist reading, Freud was able to develop a fully “physiologized” account of nervous processes. This opened up the possibility for forms of mental pathology that were not reliant on the anatomical lesion. Instead, Freud suggested that lived experience might be able to create a pathological organization within the nervous system. This critique—a passage through, rather than a turn away from, brain science—opened the possibility for Freud's theory of the unconscious and his developing psychoanalysis. On a methodological level, this article aims to show how the intellectual history of modern Europe can gain from taking seriously the impact of the brain sciences, and by applying to scientific texts the methods and reading practices traditionally reserved for philosophical or literary works.</dcterms:abstract>
<bibo:uri rdf:resource="https://kops.uni-konstanz.de/handle/123456789/35076"/>
<dcterms:rights rdf:resource="https://rightsstatements.org/page/InC/1.0/"/>
<dc:language>eng</dc:language>
<dcterms:title>The Disappearing Lesion : Sigmund Freud, Sensory-Motor Physiology, And The Beginnings Of Psychoanalysis</dcterms:title>
<dspace:isPartOfCollection rdf:resource="https://kops.uni-konstanz.de/server/rdf/resource/123456789/34438"/>
<dcterms:isPartOf rdf:resource="https://kops.uni-konstanz.de/server/rdf/resource/123456789/34438"/>
</rdf:Description>
</rdf:RDF> | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.43987947702407837, "perplexity": 6732.311908190548}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296943695.23/warc/CC-MAIN-20230321095704-20230321125704-00162.warc.gz"} |
https://algorithm.zone/blogs/2020-niuke-summer-multi-school-training-camp-the-eighth.html | # 2020 Niuke summer multi school training camp (the eighth)
Title number A B C D E F G H I J K
In the game 💭 🎈 🎈
After the game
### A - Social Distancing
##### meaning of the title
Pack \ (n\times m \) masks into several copies. It is required that after packing, they can be divided equally whether they are distributed to \ (n \) hospitals or \ (m \) hospitals. The scheme that requires the least total number of output copies has the largest dictionary order. ($$1\le T\le 100, 1\le n,m\le 10^4$$)
##### thinking
Assuming \ (n > m \), the best plan for \ (m \) hospitals is \ (n, n,\cdots,n(m n) \), and the best plan for \ (n \) hospitals is \ (m, m,\cdots,m(n m) \), then there are at least \ (n \) answers (that is, the best plan for \ (n \). Consider adjusting this scheme and keep the first \ (m \) to \ (m \) hospitals (this can maximize the dictionary order). Then the problem changes from \ (\ text{solve}(n, m) \) to \ (\ text{solve}(n-m,m) \), so it can be solved recursively, and the recursive boundary is \ ([n=m] \).
Time complexity \ (O(\max(n,m)) \).
##### code
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int maxn = 1e4 + 10;
int n, m;
vector<int> ans;
void DFS(int n, int m)
{
if(n < m)
swap(n, m);
for(int i = 1; i <= m; i++)
ans.push_back(m);
if(n != m)
DFS(n - m, m);
}
int main()
{
int T;
scanf("%d", &T);
while(T--)
{
scanf("%d %d", &n, &m);
ans.clear();
DFS(n, m);
printf("%d\n", ans.size());
for(int i = 0; i < ans.size(); i++)
{
if(i > 0)
printf(" ");
printf("%d", ans[i]);
}
printf("\n");
}
return 0;
}
### C - A National Pandemic
##### meaning of the title
A rootless tree, each point has a point weight f(x), and its initial value is 0. There are three operations.
Operation 1: for all y, modify f(y) to w - dist(x,y)
Operation 2: modify f(x) to min(f(x),0)
Operation 3: query f(x)
##### thinking
Method of transforming rootless tree to rooted tree:
$$w - dist(x,y) = w - dep[x] - dep[y] + 2 * dep[lca]$$, \ (w - dep[x] - dep[y] \) can be maintained directly. The tree section modifies \ (x \) to the point on the root path so that cnt += 2, then \ (2 * dep[lca] \) is equal to the sum of point weights on the root path, the complexity is \ (n\log^2n \), and the constant is small
analysis:
$$w - dist(x,y) = w - dep[x] - dep[y] + 2 * dep[lca]$$
For \ (w - dep[x] - dep[y] \) which can be maintained directly, the key is the statistics \ (2 * dep[lca] \), when querying point u, the violence climbs the chain and enumerates all the fathers of U. let the fathers of u be sorted by depth from large to small as \ (x_1,x_2,...,x_n \), then the contribution of point u \ (2 * dep[lca] \) is: \ (2 * CNT [x_1] * dep [x_1] + 2 * (CNT [x_2] - CNT [x_1]) * dep 2 * (CNT [x_3] - CNT [x_2]) * dep [x_3] ++ 2*(cnt[x_n] - cnt[x_{n-1}])*dep[x_n]\)
Where \ (cnt[u] \) represents the number of modified points in the subtree of \ (U \), and the above contribution formula is simplified to obtain \ (2 * CNT [x_1] + 2 * CNT [x_2] +... + 2 * CNT [x_n] * dep[x_n] \), while \ (x_n \) must be the root node and \ (dep[x_n] \) is 1. Therefore, when modifying \ (x \), the \ (x \) will be added to the \ (cnt += 2 \) of all points on the root node path. When querying, the answer to this point is the sum of point weights on the root node path
Point by tree method:
Build a point divided tree. For each point, maintain the sum of the distances from all modified points \ (x \) in the subtree. During query, all \ (w - dist(x,y) \) are obtained by violent chain climbing and merging, with a complexity of \ (n\log n \), small constant and fast running
https://blog.csdn.net/qq_41997978/article/details/107742275
##### code
#include<bits/stdc++.h>
using namespace std;
const int maxn = 5e4 + 100;
typedef long long ll;
const int inf = 0x3f3f3f3f;
int n, m, RT, t;
{
int x=0,f=1;char ch;
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
struct Graph {
int head[maxn], to[maxn << 1], cnt, nxt[maxn << 1], w[maxn << 1];
void init() {
for (int i = 1; i <= n; i++)
cnt = 0;
}
void add(int u,int v,int c) {
to[cnt] = v;
w[cnt] = c;
to[cnt] = u;
w[cnt] = c;
}
} G;
struct divide_tree {
int dep[maxn],vis[maxn],f[maxn],root,sz[maxn],siz,p[maxn][20],dis[maxn][20]; //Center of gravity tree preprocessing
ll val[maxn], fval[maxn], optcnt[maxn], sum[maxn]; //Maintain answers, etc. val is the contribution within the subtree, fval[maxn] is the contribution from the subtree to the parent node, and sum maintains delta
void getroot(int u,int fa) { //Find the center of gravity of a subtree
sz[u] = 1; f[u] = 0;
for (int i = G.head[u]; i + 1; i = G.nxt[i]) {
int v = G.to[i];
if (v == fa || vis[v]) continue;
getroot(v,u);
sz[u] += sz[v];
if (sz[v] > f[u]) f[u] = sz[v];
}
if (siz - sz[u] > f[u]) f[u] = siz - sz[u];
if (!root || f[u] < f[root]) root = u;
}
void getship(int u,int anc,int father,int d) {
for (int i = G.head[u]; i + 1; i = G.nxt[i]) {
int v = G.to[i];
if (!vis[v] && v != father) {
++dep[v];
p[v][dep[v]] = anc;
dis[v][dep[v]] = d;
getship(v,anc,u,d + 1);
}
}
}
void Buildtree(int u) { //Point by point construction point by point tree
vis[u] = 1; getship(u,u,0,1);
int all = siz;
for (int i = G.head[u]; i + 1; i = G.nxt[i]) {
int v = G.to[i];
if (vis[v]) continue;
root = 0, siz = sz[v];
if (siz > sz[u]) siz = all - sz[u];
getroot(v,u); Buildtree(root);
}
}
void prework() {
for (int i = 1; i <= n; i++)
val[i] = fval[i] = optcnt[i] = sum[i] = dep[i] = vis[i] = 0;
siz = n; f[0] = inf; root = 0;
getroot(1,0);
Buildtree(root);
for (int i = 1; i <= n; i++)
p[i][dep[i] + 1] = i;
}
void update(int x,int w) {
val[x] += w; optcnt[x] += 1;
for (int i = dep[x]; i; i--) {
val[p[x][i]] += w - dis[x][i];
fval[p[x][i + 1]] += w - dis[x][i];
optcnt[p[x][i]] += 1;
}
}
ll qry(int u) {
ll ans = 0;
ans = val[u]; int tmp = u;
for (int i = dep[u]; i; i--)
ans = ans + (val[p[u][i]] - fval[p[u][i + 1]]) - 1ll * dis[u][i] * (optcnt[p[u][i]] - optcnt[p[u][i + 1]]);
return ans + sum[u];
}
}tree;
int main() {
while (t--) {
G.init();
for (int i = 1; i < n; i++) {
}
tree.prework();
while (m--) {
int op, x, w; op = read();
if (op == 1) {
tree.update(x,w);
} else if (op == 2) {
ll tmp = tree.qry(x);
if (tmp > 0)
tree.sum[x] -= tmp;
} else if (op == 3) {
printf("%lld\n",tree.qry(x));
}
}
}
return 0;
}
### D - Fake News
##### meaning of the title
Judge whether \ (\ sum {k = 1} ^ n k ^ 2 \) is a complete square (\ (1\le T\le 10^6, 1\le n\le 10^{15} \))
##### thinking
Hit the table to \ (10 ^ 6 \) and found that only \ (1 \) and \ (24 \) were sent. It can be proved in practice.
##### code
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int maxn = 1e5 + 10;
LL n;
int main()
{
int T;
scanf("%d", &T);
while(T--)
{
scanf("%lld", &n);
if(n == 1 || n == 24)
printf("Fake news!\n");
else
printf("Nobody knows it better than me!\n");
}
return 0;
}
### H - Dividing
##### meaning of the title
$$(1,k)$$ is a legend tuple, \ ((xk,k) \) is a legend tuple, \ ((1 + xk,k) \) is a legend tuple. Given \ (n,K \), how many \ ((x,y) \) satisfy \ (x \leq n, y \leq K \) and (x,y) is a legend tuple
##### thinking
Enumerating \ (K \), \ ((xk,k) \) contributes \ (\ lfloor\frac{n}{k}\rfloor \), \ ((1 + xk,k) \) contributes \ (\ lfloor\frac{n - 1}{k}\rfloor + 1 \). When k is 1, \ (k > 1 \) divides the next block
Complexity is \ (\ sqrt{(min(n,K))} \)
##### code
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
ll n, k, inv2 = 500000004;
int main() {
scanf("%lld%lld",&n,&k);
ll ans = 0, res = 0;
for (ll i = 2, j; i <= min(n,k); i = j + 1) {
j = min(n / (n / i),k);
ans = (ans + (n / i) % mod * (j - i + 1) % mod) % mod;
}
n--;
for (ll i = 1, j; i <= min(n,k); i = j + 1) {
j = min(n / (n / i),k);
ans = (ans + (n / i) % mod * (j - i + 1) % mod) % mod;
}
printf("%lld\n",(ans + k) % mod);
return 0;
}
### I - Valuable Forests
##### meaning of the title
Define the sum of squared degrees of all nodes as the weight of the forest, and calculate the weight sum of all forests with \ (n \) labeled nodes. ($$1\le T\le 5000, 1\le N\le 5000$$)
##### thinking
prufer sequence, the artifact of rootless tree counting, is known for the first time. It mainly uses the following two properties:
1. A rootless tree with \ (n \) nodes uniquely corresponds to a prufer sequence with a length of \ (n-2 \), and each number in the sequence is in the range of \ (1 \) to \ (n \);
2. The number of occurrences of a number in the prufer sequence is equal to the degree of the node of this number in the rootless tree \ (- 1 \).
According to property 1, the number of rootless trees with \ (n \) nodes is:
$count(n)=\begin{cases}1,&&n\lt 2\\n^{n-2},&&n\ge 2\end{cases}$
The counting of this problem is quite ingenious. First, preprocess the number of forests with \ (n \) nodes:
$f(n)=\sum_{i=0}^{n-1} \binom{n-1}{i}*count(i+1)*f(n-1-i)$
That is, select \ (i \) and \ (n \) nodes from the original \ (n-1 \) nodes to form a rootless tree.
Combine the properties of 2 \ \, and then deal with another root free tree:
$g(n)=n\cdot \sum_{d=1}^{n-1}\binom{n-2}{d-1}*(n-1)^{n-1-d}*d^2$
Enumerate the degrees of a node and calculate the contribution. Since all points have the same contribution, multiply it by \ (n \).
Finally, calculate the weight sum of the forest of \ (n \) nodes:
$h(n)=\sum_{i=0}^{n-1}\binom{n-1}{i}*(f(n-1-i)*g(i+1)+count(i+1)*h(n-1-i))$
That is, select \ (i \) and \ (n \) nodes from the original \ (n-1 \) nodes to form a rootless tree, which will produce two parts of contribution (as shown in the above formula). The former is the contribution generated by the rootless tree (multiplied by the number of forests formed by other points), and the latter is the contribution generated by the forest formed by other points (multiplied by the number of rootless trees formed).
Preprocessing time complexity \ (O(N^2) \).
##### code
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int INF = 0x3f3f3f3f;
const int maxn = 5000 + 10;
int MOD, N;
LL comb[maxn][maxn], power[maxn][maxn];
LL calc(LL n)
{
if(n < 2)
return 1;
else
return power[n][n - 2];
}
LL f[maxn], g[maxn], h[maxn];
void preprocess()
{
comb[0][0] = 1;
for(int i = 1; i <= 5000; i++)
{
comb[i][0] = 1;
for(int j = 1; j <= i; j++)
comb[i][j] = (comb[i - 1][j] + comb[i - 1][j - 1]) % MOD;
}
for(int i = 0; i <= 5000; i++)
{
power[i][0] = 1;
for(int j = 1; j <= 5000; j++)
power[i][j] = power[i][j - 1] * i % MOD;
}
f[0] = 1;
for(int i = 1; i <= 5000; i++)
for(int j = 0; j <= i - 1; j++)
f[i] = (f[i] + comb[i - 1][j] * calc(j + 1) % MOD * f[i - 1 - j] % MOD) % MOD;
for(int i = 1; i <= 5000; i++)
{
for(int d = 1; d <= i - 1; d++)
g[i] = (g[i] + comb[i - 2][d - 1] * power[i - 1][i - 1 - d] % MOD * d % MOD * d % MOD) % MOD;
g[i] = g[i] * i % MOD;
}
for(int i = 1; i <= 5000; i++)
for(int j = 0; j <= i - 1; j++)
h[i] = (h[i] + comb[i - 1][j] * ((f[i - 1 - j] * g[j + 1] % MOD + calc(j + 1) * h[i - 1 - j] % MOD) % MOD) % MOD) % MOD;
}
int main()
{
int T;
scanf("%d %d", &T, &MOD);
preprocess();
while(T--)
{
scanf("%d", &N);
printf("%lld\n", h[N]);
}
return 0;
}
### J - Pointer Analysis
##### meaning of the title
\An object represented by (26 \) lowercase letters. Each object has a member variable represented by \ (26 \) lowercase letters. The member variable is a pointer\ (26 \) global pointer variables in uppercase letters.
There are \ (n \) assignment statements of \ (4 \) types. During execution, the execution order of these \ (n \) statements can be disordered arbitrarily. Ask which objects each global pointer can point to.
##### thinking
Considering that the maximum number of \ (n \) is only \ (200 \), which is relatively small, this \ (n \) statement can be repeated \ (n \) times, so as to ensure that all other statements have been executed at least once before the last execution of each statement, so as to achieve the effect of disorderly execution of statements.
$$p1[i][j]$$ mark whether the global pointer \ (I +'a '\) can point to the object \ (j+'a'\),$$p2[i][j][k]$$ indicates whether the member pointer \ (j+'a '\) of the object \ (I +'a' \) points to the object \ (k+'a '\), judge the statement type when traversing all statements, and update the two arrays according to the topic meaning. Note that the form of \ (B.f \) is only available after the global pointer points to the object (because only the object in this question has a member pointer). When reading \ (getline \) into the whole line, don't forget to speed up the reading of \ (cin \).
Time complexity \ (O(n^2{26}^2) \), space complexity \ (O(26^3) \)
##### code
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 4e5;
int n;
string s[maxn];
string t;
bool p1[26][26], p2[26][26][26];
int main()
{
//freopen("/Users/zhangkanqi/Desktop/11.txt","r",stdin);
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
cin>>n;
getline(cin, t);
for(int i=1; i<=n; ++i) getline(cin, s[i]);
for(int t=1; t<=n; ++t) //The previous n expressions are repeated N times
for(int i=1; i<=n; ++i) s[t*n+i]=s[i];
n=n*n;
for(int i=1; i<=n; ++i)
{
if(s[i].size()==5&&islower(s[i][4]))
{
int a=s[i][0]-'A';
int x=s[i][4]-'a';
p1[a][x] = true;
}
else if(s[i].size()==5&&isupper(s[i][4]))
{
int a=s[i][0]-'A';
int b=s[i][4]-'A';
for(int j=0; j<26; ++j) if(p1[b][j]) p1[a][j] = p1[b][j];
}
else if(s[i].size()==7&&s[i][1]=='.')
{
int a=s[i][0]-'A', f=s[i][2]-'a';
int b=s[i][6]-'A';
for(int j=0; j<26; ++j)
if(p1[a][j])
for(int k=0; k<26; ++k) if(p1[b][k]) p2[j][f][k] = p1[b][k];
}
else if(s[i].size()==7&&s[i][5]=='.')
{
int a=s[i][0]-'A';
int b=s[i][4]-'A', f=s[i][6]-'a';
for(int j=0; j<26; ++j)
if(p1[b][j])
for(int k=0; k<26; ++k) if(p2[j][f][k]) p1[a][k] = p2[j][f][k];
}
}
for(int i=0; i<26; ++i)
{
cout << char('A'+i) << ": ";
for(int j=0; j<26; ++j)
if(p1[i][j]) cout << char('a'+j);
cout << endl;
}
}
Posted by raker7 on Wed, 25 May 2022 13:37:54 +0300 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6175716519355774, "perplexity": 8113.153158444977}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296943625.81/warc/CC-MAIN-20230321033306-20230321063306-00012.warc.gz"} |
https://math.stackexchange.com/questions/1274924/eigenvalues-of-ata | # Eigenvalues of $A^TA$
Suppose $A$ be a $n\times n$ matrix in $M(\mathbb{R})$. I'd like to know the eigenvalues of $A^TA$. I believe it's false to assume $\lambda^2$ be eigenvalue of $A^TA$, given $\lambda$ eigenvalue of $A$. Can somebody find a counterexample of it?
Also I guess following claim to be true regarding the eigenvalues of $A^TA$:
If $A$ is normal, then $\lambda^2$ is the eigenvalue of $A^TA$, given $\lambda$ eigenvalue of $A$.
Can somebody prove above claim?
• Does $A$ have real (as opposed to complex) entries? – Omnomnomnom May 10 '15 at 0:53
• Let $A = \begin{pmatrix}0 & 1 \\ -1& 0\end{pmatrix}$. It is normal, with eigenvalues $\pm i$, so squares are $-1$, when $A^TA$ has eigenvalues $1$ – uranix May 10 '15 at 0:58
• $A$ is real matrix. – Math Wizard May 10 '15 at 0:59
• It is, real matrices can have complex eigenvalues – uranix May 10 '15 at 1:00
Much of this is made much easier to see if you know about the spectral theorem. My answers below rely heavily on this.
For your first statement, any non-normal matrix provides a counterexample. In fact, we have the following theorem:
Let $A$ be a square matrix with eigenvalues $\lambda_k$. Let $\sigma_1,\dots,\sigma_n$ denote the eigenvalues of $A^TA$ (which are all positive). Then $$\sum_{k=1}^n |\lambda_k|^2 \leq \sum_{k=1}^n \sigma_k$$ and $A$ is normal if and only if $\sigma_k = |\lambda_k|^2$ for each $k$.
The proof of your second statement (by the spectral theorem) is as follows:
Because $A$ is normal, there exists a unitary matrix $U$ and diagonal matrix $D$ (each with complex entries) such that $A = UDU^*$ where $M^* = \overline{M^T}$ denotes the conjugate-transpose, AKA the adjoint of a complex matrix. Note that $$D = \pmatrix{\lambda_1\\&\ddots \\&& \lambda_n}$$ where $\lambda_k$ are the eigenvalues of $A$. We then have $$A^TA = A^*A = (UDU^*)^*UDU^* = UD^*DU^* = U \pmatrix{|\lambda_1|^2\\ & \ddots \\ && |\lambda_n|^2}U^*$$ Thus, the eigenvalues of $A^TA$ are $|\lambda_k|^2$.
• I thought of your proof, but how to explain if $A$ is the skew-symmetrical matrix as another post in this question suggests that eigenvalue of is $-\lambda^2$? – Math Wizard May 10 '15 at 2:34
• You need to square the absolute value. That what those "$|\cdot|$"s are there for. – Omnomnomnom May 10 '15 at 2:40
• Note that $U^*U=I$ doesn't imply $U^TU=I$. – Omnomnomnom May 10 '15 at 2:42
• To your edit: $A$ is real, so $A^T = \overline{A^T} = A^*$. – Omnomnomnom May 10 '15 at 3:22
• Oh, I understand that if $A$ is the skew-symmetrical matrix, its eigenvalue is $i\lambda$. – Math Wizard May 10 '15 at 3:48
Counterexample:
\begin{align*} \operatorname{eig} \begin{pmatrix} 1 & 0 \\ 1 & 0 \end{pmatrix} &= \{0,1\} \\ \operatorname{eig} \begin{pmatrix} 1 & 1 \\ 0 & 0 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 1 & 0 \end{pmatrix} &= \{0,2\} \\ \end{align*}
• That is not a normal matrix – uranix May 10 '15 at 1:01
• @uranix As best I can tell there are two parts to the question. First, is it true that if $\lambda$ is an eigenvalue of $A$ then $\lambda^2$ is an eigenvalue of $A^T A$? Second, is the previous statement true if we assume that $A$ is normal? Arkamis' answer addresses the first question. Hence my +1. – Ian May 10 '15 at 1:02
• It is ok to give a example of non normal matrix. – Math Wizard May 10 '15 at 1:03
A real normal matrix is the matrix that satisfies $AA^T = A^T A$. That's what wiki says on normal matrices
Among complex matrices, all unitary, Hermitian, and skew-Hermitian matrices are normal.
Skew-Hermitan matrices are promising for counterexample, since their eigenvalues are purely imaginary. Real skew-Hermitan matrix is just a skew-symmetrical one.
Let $A$ be the skew-symmetrical matrix. Consider eigenvector $x$ of $A$. He have $$A^TA x = -A^2 x = -\lambda^2 x$$ | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9977934956550598, "perplexity": 236.76449591228172}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-18/segments/1555578721441.77/warc/CC-MAIN-20190425114058-20190425140058-00498.warc.gz"} |
http://www.physics-software.com/physicslaboratory/molecularphysics/surface_tension_by_capillary_tube.php | # Physics Software
## Determination of surface tension coefficient of liquids by Stocks's method
Choose the liquid:
Enter radius of glass tube 1 ($r_1$): mm
Enter radius of glass tube 2 ($r_2$): mm
Enter radius of glass tube 3 ($r_3$): mm
# Level of liquid in the cup $$h_0 (mm)$$ Level of liquid in the 1st tube $$h_1 (mm)$$ Level of liquid in the 2nd tube $$h_2 (mm)$$ Level of liquid in the 3rd tube $$h_3 (mm)$$ 1 2 3
Push on the button for result of the experiment | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8019047379493713, "perplexity": 2329.214682162821}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-09/segments/1518891812873.22/warc/CC-MAIN-20180220030745-20180220050745-00073.warc.gz"} |
http://www.scientificlib.com/en/Mathematics/DifferentialGeometry/KampyleOfEudoxus.html | ### Hellenica World
Graph of Kampyle of Eudoxus
The Kampyle of Eudoxus (Greek: καμπύλη [γραμμή], meaning simply "curved [line], curve") is a curve, with a Cartesian equation of
or, in polar coordinates,
This quartic curve was studied by the Greek astronomer and mathematician Eudoxus of Cnidus (c. 408 BC – c.347 BC) in relation to the classical problem of doubling the cube.
Differentiating the kamplye of Eudoxus
* List of curves
References
* Eric W. Weisstein, Kampyle of Eudoxus at MathWorld. | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9829114675521851, "perplexity": 22817.848641957127}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-39/segments/1631780057733.53/warc/CC-MAIN-20210925172649-20210925202649-00419.warc.gz"} |
https://forum.allaboutcircuits.com/threads/anyone-knows-the-symbol-of-a-jumper-wire.7068/ | Anyone knows the symbol of a jumper wire?
bloguetronica
Joined Apr 27, 2007
1,372
I'm working on an amplifier project that will need ground decoupling. I will have two grounds, one for the input and feedback circuit and other for the output and amplifier. I will connect both grounds using a wire. My question is, what is the apropriate symbol for a jumper wire like that?
I tried to search the web for this but didn't got lucky.
John Luciani
Joined Apr 3, 2007
477
I have seen jumpers done with an arc and a hollow circle at each end.
Imagine a parethesis rotated 90deg and place a hollow circle at
either end. If I come across an example I will post a link.
(* jcl *)
beenthere
Joined Apr 20, 2004
15,819
As an indicator on the pc board, make a line between the pads using the top silk layer. If you want it to show up on the CAD file, do the line as top copper.
SgtWookie
Joined Jul 17, 2007
22,210
I've seen it as the arc connecting two wires as well - but that's easily confused with the fuse symbol and the symbol for headphones.
I've also seen them drawn as:
Rich (BB code):
-------->>---------------<<-------
2J5 5J2
(the dashed line is actually solid in the diagram; this is just crude ASCII graphics)
I like beenthere's suggestion.
If the jumpers were removeable (like those for selecting a disk drive's master/slave/etc) I'd suggest using a SPST switch, but labeling it as JPnn, as this would make it easier to run PSPICE simulations. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7559226155281067, "perplexity": 2667.137945378088}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-40/segments/1600401643509.96/warc/CC-MAIN-20200929123413-20200929153413-00139.warc.gz"} |
http://physics.stackexchange.com/questions/41415/does-the-strong-nuclear-force-ever-contribute-to-decay | # Does the strong (nuclear) force ever contribute to decay?
Does the strong (nuclear) force ever contribute to decay ? Or is the weak nuclear force the only decaying force ?
-
Yes. The clearest example of strong-mediated decay would be alpha decay, but there are a lot of examples. – Jerry Schirmer Oct 22 '12 at 13:48
Is that explained somewhere well ? Wiki ? – mick Oct 22 '12 at 13:49
How much physics background do you have? At the popular level, nuclear binding energy is mostly determined by the strong force. Anything that has its energy production governed by that is going to be mostly strong-mediated. – Jerry Schirmer Oct 22 '12 at 13:52
The OP asked whether the strong force "contributes" to decay. I'm not sure I'd interpret the strong force as contributing to alpha decay. As the alpha tunnels out, it's feeling both strong and electrical forces. The strong force is attractive, so if anything, it's hindering the decay. The reason there's a big release of energy (which is why alpha decay happens so frequently in nature) is the electrical force. – Ben Crowell May 3 '13 at 0:58 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9241784811019897, "perplexity": 755.7966846875984}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-18/segments/1461860109993.2/warc/CC-MAIN-20160428161509-00161-ip-10-239-7-51.ec2.internal.warc.gz"} |
https://www.physicsforums.com/threads/question-regarding-mutual-inductance-of-two-coil.58398/ | # Question regarding mutual inductance of two coil
1. Jan 2, 2005
### Sanosuke Sagara
I have my question,solution and the problem I faced in the attachment that followed.Thanks for anybody that spend some time on this question.
File size:
33 KB
Views:
107
2. Jan 2, 2005
### Sanosuke Sagara
Please , I really need someone help me figure out where I have done wrong.
3. Jan 3, 2005
### learningphysics
I think you did everything correct. The flux linkage is: $$N\Phi$$ not $$\Phi$$ (this is only for 1 turn, not the entire coil). So for coil 1 you get:
$$N\Phi=100*(1.5*10^{-6})=150\mu WB$$
and coil 2:
$$N\Phi=200*(9*10^{-8})=18 \mu WB$$
Last edited: Jan 3, 2005
4. Jan 3, 2005
### Andrew Mason
I take it that you are having problems with the flux linkage questions because you seem to have figured out the induced voltages. You may want to ask some engineers about flux linkage. It is a concept used more in engineering, but I will give it a shot.
Flux linkage is a measure of how much magnetic field produced by the coil is enclosed by the coil windings. It seems to be a relationship between flux enclosed by the coil and the actual current - I think. Inductance expressed in terms of the actual current I is
(1) $$L = nB\cdot A/I$$
where n is the number of windings, B the magnetic field in the coil and A the cross-sectional area.
The term $\lambda = nB\cdot A$ is called the flux linkage.
But since you are given L and I, you can work out flux linkage from (1).
Does that help?
AM
5. Jan 3, 2005
### Sanosuke Sagara
Thanks for your help ,Andrew Mason and learningphysics.I now can understand with the question already.
6. Jan 3, 2005
### learningphysics
I think an easier way to answer part a) is just to use the definition of inductance.
$$L_1=N_1\Phi_1/I_1$$
$$25*10^{-3}=100(\Phi_1)/6*10^{-3}$$
$$\Phi_1=1.5*10^{-6}$$
$$N\Phi_1=100(1.5*10^{-6})=150 \mu WB$$
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook
Have something to add?
Similar Discussions: Question regarding mutual inductance of two coil | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.930648922920227, "perplexity": 1294.315849709789}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-44/segments/1476988719437.30/warc/CC-MAIN-20161020183839-00448-ip-10-171-6-4.ec2.internal.warc.gz"} |
https://brilliant.org/discussions/thread/trial-and-error/ | ×
Trial and Error
It could be easier or faster to solve a problem by guessing what the answer is. Especially for multiple choice questions, simply plug in the given options and check which of them satisfy the conditions.
What is the solution to $$2x + 3 = 999$$?
A) 49
B) 498
C) 499
D) 501
E) 999
Solution: Trying the first option, $$2 \times 49 + 3 = 101 \neq 999$$.
Trying the second option, $$2 \times 498 + 3 = 999$$. The answer is B.
Note by Arron Kau
2 years, 11 months ago | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6487187147140503, "perplexity": 1544.8895367371963}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-30/segments/1500549428300.23/warc/CC-MAIN-20170727142514-20170727162514-00275.warc.gz"} |
http://www.ck12.org/tebook/Human-Biology-Lives-of-Cells-Teacher%2527s-Guide/r1/section/5.1/ | <meta http-equiv="refresh" content="1; url=/nojavascript/">
You are reading an older version of this FlexBook® textbook: Human Biology Lives of Cells Teacher's Guide Go to the latest version.
# 5.1: Planning
Difficulty Level: At Grade Created by: CK-12
## Key Ideas
• The genetic information contained in cells is stored in DNA molecules and copied accurately so that each daughter cell receives the same information.
• The genetic code is represented by sequences of triplet nucleotides in the DNA molecules.
• Different cell types in your body use or express different portions of your DNA called genes. Genes code for the production of specific proteins in the cell.
• The transcription of mRNA and its translation at the ribosomes are the processes involved in making proteins.
## Overview
Students learn about DNA and the information it stores in the genetic code. They explore the physical structure of DNA. Then they learn how it is replicated by building and manipulating a model of a DNA double helix. Students also isolate DNA from thymus tissue to observe its texture and study other physical properties of the molecule. They investigate the process by which the mRNA code is transcribed from the DNA code for a gene, and then how mRNA is translated into protein at the ribosomes.
## Objectives
Students:
$\checkmark$ describe the composition and structure of DNA.
$\checkmark$ demonstrate how DNA replicates.
$\checkmark$ explain the roles of DNA, mRNA, tRNA, and amino acids in making protein.
$\checkmark$ describe how the genetic code is expressed in different cells.
## Vocabulary
amino acids, codon, DNA polymerases, double helix, genes, helicase, messenger ribonucleic acid (mRNA), nucleotides, replication, RNA polymerase, transcription, transfer RNA (tRNA)
## Student Materials
### Activity 4-1: Removing DNA from Thymus Cells
• Activity Report
• Safety goggles
• Sample of fresh thymus cells in a beaker; Sand; Liquid soap, clear, in a beaker with an eyedropper; Water in a beaker with an eyedropper; Alcohol; Cheesecloth square (several layers, $15 \times 15 \ cm$); Mortar and pestle; Test tube; Small funnel; Test tube rack; Wooden skewer; Forceps; Eyedropper; Permanent marking pen; Paper towels; Black construction paper, $4 \times 4 \ cm$; Transparent tape; Microscope, slides, and cover slips
### Activity 4-2: Building and Using a DNA Model
• Resource
• Activity Report
• Scissors; Paper; 6 different sets of colored paper; Tape
## Teacher Materials
### Activity 4-1: Removing DNA from Thymus Cells
• Activity Report Answer Key
• Serrated knife for cutting the thymus tissue
• Extra student materials, especially cheesecloth, skewers, test tubes, and fresh thymus cells
You can substitute glass for the stirring rod.
Methylene blue stain can be used to stain the thymus nuclei in Step 5.
Optional: DNA visuals, including models and/or posters
Model of a cell with a large, distinct nucleus
Picture of a human torso to show the location of the thymus gland
### Activity 4-2: Building and Using a DNA Model
• Activity Report Answer Key
• Models and diagrams of DNA molecules and nucleotides
See Activities 4-1 and 4-2 in the Student Edition.
### Activity 4-1: Removing DNA from Thymus Cells
• Purchase fresh thymus tissue, also called sweetbreads, from your local butcher. You can freeze the thymus tissue if you do not plan to use it right away.
• Cut the thymus tissue into 2 cm cubes using a clean knife.
• Keep all solutions cold prior to activity.
### Activity 4-2: Building and Using a DNA Model
• You can have students color the sugars, phosphates, and nitrogen bases as follows. Or you can copy them on the indicated colors of paper.
• 60 deoxyribose sugars (white)
• 60 phosphates (orange)
• 15 of each of the four nitrogenous bases:
• adenine (red), thymine (blue), cytosine (yellow), and guanine (green)
• Allow ample time to pre-cut the template pieces.
## Interdisciplinary Connections
Math Relate the repeating patterns of triplet nucleotides in DNA to other mathematical patterns.
Social Studies Investigate and write about the history and uses of the Morse code.
Language Arts Write a narrative describing the “synthesis of a protein.”
6 , 7 , 8
## Date Created:
Feb 23, 2012
Apr 29, 2014
You can only attach files to None which belong to you
If you would like to associate files with this None, please make a copy first. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 6, "texerror": 0, "math_score": 0.2992812395095825, "perplexity": 13828.94801350009}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-18/segments/1430457655609.94/warc/CC-MAIN-20150501052055-00066-ip-10-235-10-82.ec2.internal.warc.gz"} |
http://physics.aps.org/synopsis-for/10.1103/PhysRevLett.111.110801 | # Synopsis: Cross-Country Time Keeping
A new distance record is set in the fiber transmission of stable frequency signals capable of synchronizing atomic clocks.
Next-generation atomic clocks are so precise they can’t be synchronized remotely with traditional communication pathways. Researchers are therefore investigating novel synchronization methods. A new milestone in this development is presented in Physical Review Letters, with the longest distance transmission of a highly stable optical frequency. The signal was sent back and forth across Germany on optical fibers, while keeping a fixed frequency to within a few parts in ${10}^{19}$.
Several applications, such as navigation and fundamental physics, require the comparison of clocks at large physical separation. In geodesy, for example, the time difference between two distant clocks can provide relative elevation measurements with centimeter precision. Currently, clock signals are relayed by satellite communication, but the frequency of these radio signals drifts over time by as much as a few parts per ${10}^{16}$. Higher stability is needed to compare recently developed optical atomic clocks that have precisions on the order of one part in ${10}^{17}$.
Several past experiments have shown that optical fibers can faithfully transmit a clock-synchronizing frequency signal over hundreds of kilometers. Stefan Droste of Max Planck Institute of Quantum Optics, Germany, and his colleagues have now sent a highly stable $194$ terahertz ($1542$ nanometer) frequency over a distance of $1840$ kilometers, doubling their previous record. The team achieved this result by equipping the dedicated optical fiber connecting two German research institutions with active stabilization to overcome frequency shifts from thermal noise and acoustic noise. The method might one day link together optical clocks around the world. – Michael Schirber
### Announcements
More Announcements »
## Previous Synopsis
Particles and Fields
## Next Synopsis
Atomic and Molecular Physics
## Related Articles
Quantum Physics
### Synopsis: Position Detector Approaches the Heisenberg Limit
The light field from a microcavity can be used to measure the displacement of a thin bar with an uncertainty that is close to the Heisenberg limit. Read More »
Atomic and Molecular Physics
### Synopsis: A Crystal of Light and Atoms
A predicted type of atom-light crystal could host phonon-like excitations, allowing for new ways to simulate the physics of solids. Read More »
Condensed Matter Physics
### Viewpoint: An Arrested Implosion
The collapse of a trapped ultracold magnetic gas is arrested by quantum fluctuations, creating quantum droplets of superfluid atoms. Read More » | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 6, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.22145459055900574, "perplexity": 2838.926546697122}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-22/segments/1464049277592.42/warc/CC-MAIN-20160524002117-00068-ip-10-185-217-139.ec2.internal.warc.gz"} |
https://physics.stackexchange.com/questions/159149/rocket-propulsion-delta-v-acceleration-and-time-how-do-they-relate/159150 | # Rocket Propulsion, delta V, acceleration and time. How do they relate?
I'm trying to understand rockets in a vacuum.
As I understand it the, Tsiolkovsky rocket equation gives me the change in velocity of a rocket + payload after expelling a certain amount of fuel.
But how does acceleration fit into this equation? Acceleration is the change in velocity divided by the change in time. But I have nothing in the Tsiolkovsky equation to measure the time the burn took, only how much delta v it gave me.
Does the Effective Exhaust Velocity tell me how long it took for it to burn that amount of mass? Because this page here http://en.wikipedia.org/wiki/Specific_impulse#Specific_impulse_as_a_speed_.28effective_exhaust_velocity.29 gives me an equation to convert the Effective Exhaust Velocity into Specific Impulse as time.
However, this equation is using the gravity of earth, whereas I want to assume there's no gravitational forces at play. I can't just remove it because then they're the same value.
And if I had the time in here, how does it relate back to the change in mass from the propellant being used?
So at the end of the day, how to you determine:
1. How much fuel a rocket burns in a second? (is this the effective exhaust velocity, or is there a relationship?)
2. What's the acceleration of a rocket burning this mass of fuel for a second?
I understand that the changing mass comes into play; but I can't figure it out.
This question is for interests sake; no real reason.
1. Most rocket variants, other than solid rockets (and even some of those) have throttles or some other means of controlling flow/burn rates. Some also have variable Propellant Nozzles, such that there is no one set burn rate. You could perhaps use 'full throttle' or 'max flow rate' if you like, but you have to make that caveat.
2. No, burn rate is not equivalent to effective exhaust velocity. You can get a rough idea of typical exhaust velocities if you know what you're burning (Kerosene/LOX, Perchlorate/LOX, Hybrid HTPB/N2O, etc...), the rocket velocity, the atmospheric conditions (I.E. earth altitude, vacuum, etc.) and the flow characteristics of the Propellant Nozzle at those conditions. For a rough estimate of Kerosene/LOX, you could start with 4.4km/s.
The velocity of an exhaust stream after reduction by effects such as friction, non-axially directed flow, and pressure differences between the inside of the rocket and its surroundings. The effective exhaust velocity is one of two factors determining the thrust, or accelerating force, that a rocket can develop, the other factor being the quantity of reaction mass expelled from the rocket in unit time. In most cases, the effective exhaust velocity is close to the actual exhaust velocity.
Effective Exhaust Velocity
1. For #2 you are looking for Specific Impulse.
Specific impulse (usually abbreviated Isp) is a measure of the efficiency of rocket and jet engines. It represents the force with respect to the amount of propellant used per unit time. If the "amount" of propellant is given in terms of mass (such as in kilograms), then specific impulse has units of velocity. If it is given in terms of weight (such as in kiloponds or newtons), then specific impulse has units of time (seconds). The conversion constant between these two versions is thus essentially "gravity" (more specifically g0). The higher the specific impulse, the lower the propellant flow rate required for a given thrust, and in the case of a rocket the less propellant needed for a given delta-v per the Tsiolkovsky rocket equation.
Wikipedia: Specific Impulse
Now, for what you're after, with a few assumptions (constant acceleration) you can just use the Tsiolkovski + time + Isp of the engine.
Example: I have 4000 kg of a fuel in a 8000 kg fully fueled rocket in space, the fuel is of a certain composition such that through my nozzle design at a vacuum it exits my craft at effectively 4.0km/s ($I_{sp}$), and at full throttle it would burn all it's fuel in 10 seconds. Using the Tsiolkovski:
$\Delta V = v_e * ln(\frac {m_0} {m_1} )$
$\Delta V = 4.0 km/s * ln (\frac {8000} {4000} )$
$\Delta V = 4.0 km/s * ln (2)$
$\Delta V = 4.0 km/s * 0.693... = 2.77 km/s$
This change in velocity was made over 10 seconds, so
$a = \frac {\Delta V\ km/s} {10\ s} = \frac { 2.77\ km/s } {10\ s} = 0.277\ km/s^2 = 277\ m/s^2$
• thanks a heap, that answers my question completely. And thank you for the additional info on Rockets; I didn't realise there were throttles. – NeomerArcana Jan 13 '15 at 21:19
• Well I doubt 'throttle' would be the appropriate name for them (they don't 'have' throttles), but yes they have mechanisms by which they can throttle (verb) their thrust. For example, liquid bi-propellant uses pumps to mix fuel with liquid oxygen, and by varying the flow rate they regulate thrust - the SSME is engaged at low thrust during solid rocket boosting for example. In hybrid rockets, they can regulate gas flow rates, whereas some solid propellant rockets (like boosters) have no method of regulating thrust or reignition - they're full blast until out of fuel. – Ehryk Jan 13 '15 at 22:22
• I caveat the above comment to say that there are likely counterexamples to all of those, methods by which solid rockets can be throttled, bi-propellant setups that cannot be, etc. Estes model rocket engines are examples of full thrust 'til empty. – Ehryk Jan 13 '15 at 22:24
• A good read to get a better understanding of this is xkcd's rocket golf: what-if.xkcd.com/85 . What's important to note is that the only way to change your velocity (accelerate) is to throw/push/explode/golf something the opposite way. The speed at which it leaves you is $I_{sp}$, quantity of mass you hit/move/throw/burn per second is your flow rate - in my example above, 4,000kg of fuel was used in 10s, so 400kg/s was the burn rate. – Ehryk Jan 13 '15 at 22:28
• Once again thanks for your edit with the additional equations. Just a question though, it's seems unintuitive that the delta v goes down if my fuel accounts for more of the total mass? I mean, if more of my total mass is fuel, wouldn't burning it away result in a higher delta V rather than a lower one? (or did I misinterpret your "4000kg of fuel in an 8000kg fully fueled rocked"?) – NeomerArcana Jan 14 '15 at 10:17
Although a previous answer has been selected I think the asker needs a bit more info to understand what sort of questions you should be asking about a rocket. In particular, the Tsiolkovsky rocket equation is only ever used to compute a required mass ratio or delta-V. It's essentially a staging tool; given some total delta-V what are the number of burns and stages I need at what MR? What number of burns or stages would best fit the problem? Is this possible given constraints on payload and inert masses? It should not be used for any sort of real flight dynamics including computing vehicle acceleration, which in an of itself is not typically something people worry too much about. There are some simple models for flight dynamics to consider things like g-t losses or basic aerodynamic effects, but when baselining a rocket you would incorporate all of those into a rough efficiency--say you will have a 10-20% penalty in propellant mass.
The basic rocket relationships which hold regardless of the actual model of the rocket flow are:
(1) Tsiolkovsky equation: $MR = e^{\Delta V/c}$
where $c$ is the effective exhaust velocity, viz. the velocity of the propellant gases after pressure losses have been taken into account. This is used for staging, delta-V, and mass ratio calculations.
(2) Basic Thrust Equation: $F = \dot{m}c$.
This equation is used to determine what the thrust the rocket will produce is given $c$, since most ways of analyzing a rocket return $c$ rather than $F$ (thrust). Thrust is more important to consider in whether a rocket is capable of executing a certain maneuver rather than whether the rocket itself is a good design. High thrust buy low Isp is almost always worse than slightly lower thrust at higher Isp.
(3) Constant Burn Rate Assumption: $m_b = \dot{m}\Delta t$
where $m_b$ is the mass of the burned propellant. This is less of a fundamental result than an assumption. We assume a constant burn rate most of the time, since this is easy to work with from an engineering perspective.
You mention specific impulse, which is formally defined as thrust per unit weight of mass expended, but as you can see from (2) this isn't actually a different parameter from the effective exhaust velocity, e.g.
(4) $I_{sp} = c/g$
Where $g= 9.81$ m/s$^2$, viz. the acceleration near earth, and is only in there because of the definition of $I_{sp}$.
Contrary to the previous answer it is not enough to know simply what your propellants are to determine $c$ or $I_{sp}$--then rocketry would be stupid easy! In general you need the type of rocket (e.g. solid, liquid monopropellant, liquid bipropellant, etc.), type of propellants, mixture ratio of the propellants, nozzle geometry (especially the expansion and contraction ratios), and thermochemical states of the propellants in the combustion chamber (which leads into engine cycles, injector theory, chemical kinetics of the propellant flow and a whole host of other topics). This doesn't even begin to touch on loss mechanisms for a non-ideal rocket, most of which affect $c$ and $I_{sp}$ or whether or not real rocket could work for a given design (e.g. cooling methods, structural integrity, combustion stability). A good place to start if you want to do a first order estimate of $c$ is by selecting some propellants, running a thermochemical code, like NASA's CEA code, and use the results in an isentropic analysis (see a book like Sutton, Rocket Propulsion Elements for more detail). This gives you first order estimates of $c$, and even $\dot{m}$ if you learn how to use $c^*$ velocities correctly. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.806550145149231, "perplexity": 1000.9468601028643}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-05/segments/1579251669967.70/warc/CC-MAIN-20200125041318-20200125070318-00235.warc.gz"} |
https://www.physicsforums.com/threads/electric-field-strength-and-electrostatic-potential.706413/ | # Homework Help: Electric field strength and electrostatic potential
1. Aug 20, 2013
### UnD3R0aTh
1. The problem is in the attachments.
2. Field strength is equal to voltage divided by distance
3. I want to make sure that i understand a few things before i solve this problem! i would like to know your opinion!
a) first, field strength is inversely proportional to the the distance squared that means filed strength decreases with distance, and as the probe approaches the planet that must mean that the charge is not coming from the planet, it's coming from behind the probe!
b) the negative sign here means that the charge is negative
c) i'm not really sure about this so plz could u shed some light on it, i want to know what happens to the voltage as the distance increases from the charge, ite decreases correct? and what would the negative charge of the voltage difference mean?! excess in negative charge of the point closer to the charge ?!
d) my attempt at the solution, the field strength has to be uniform so i take the average which is 500+400/2= -450, then v = field strength times distance which is 20,000,000 meters = -9000MV
#### Attached Files:
• ###### probe.PNG
File size:
28.2 KB
Views:
156
Last edited: Aug 20, 2013
2. Aug 20, 2013
### janhaa
looks right to me...
3. Aug 20, 2013
### rude man
Is the sign right? What's the expression for ΔV given E?
4. Aug 20, 2013
### UnD3R0aTh
i don't know an expression for delta v, plz tell me!
5. Aug 21, 2013
### rude man
Think of a parallel plate capacitor. The top plate is + and the bottom is -. A positive test charge is moved from the bottom to the top plate. Call s = 0 at the bottom plate and s = d at the top plate where d is the distance between the plates.
What is the direction of the E field? What is its sign? What is the difference in potential as we move the test charge from the bottom to the top plate?
The formal expression is ΔV = Vtop - Vbottom = -∫E*ds. So you wind up with what sign for the potential difference going from the bottom to the top plate?
(Vectors in bold. * denotes dot-product).
6. Aug 21, 2013
### UnD3R0aTh
I never studied capacitors before, and i never took calculus :(
7. Aug 21, 2013
### UnD3R0aTh
plz help!
8. Aug 21, 2013
### UnD3R0aTh
guys my exam is on the 25th i need an answer!
9. Aug 22, 2013
### UnD3R0aTh
omg no one? :(
10. Aug 22, 2013
### rude man
I can't speak for everyone but I feel helpless to give you any more hints in view of you limited background.
Do you know what potential energy is? Do you know what happens to potential energy of a positive charge if you move that charge along an electric field that opposes the motion?
11. Aug 22, 2013
### UnD3R0aTh
yes, it has PE equal to kqq/d, plz help me understand i have a very important exam :(
12. Aug 23, 2013
### rude man
Well, the change in potential equals the change in potential energy of a unit positive charge. And the change in potential energy of a unit positive charge is the negative of the product of the E field times the distance covered.
So what does that make the change in potential if E is negative? Plus or minus?
13. Aug 23, 2013
### UnD3R0aTh
well that makes it a plus but i still don't understand why! can you plz elaborate in some more detail, perhaps take some time to answer some of my questions above? would u like to discuss this on skype? my exam is on 25th, this is so urgent :(
14. Aug 23, 2013
### rude man
That makes it a plus.
15. Aug 23, 2013
### UnD3R0aTh
thx for your thorough explanation rude man, if this problem came in my exam i will choose minus, waiting for a more clear explanation from someone who is more generous
16. Aug 23, 2013
### rude man
Ok, sorry to disappoint you. Let's try this:
Since the magnitude of the E field is diminishing as the spaceship approaches Earth, the source of the E field must be behind it. That's because |E| = k|Q|/r^2 where Q is the source of the E field and r is the distance between Q and the spaceship.
And since the E field is negative, this means Q, the source of the E field, must be a negative charge: E = -kQ/r^2. r is measured from the position of the source of charge to the spaceship and is always positive, directed away from the charge.
So, as the spaceship travels, r increases and the potential, which is kQ/r, increases, i.e. goes more positive. Remember, Q is negative so as r gets bigger, the magnitude of the potential gets smaller which means the potential gets more positive.
So the change in potential is positive.
17. Aug 23, 2013
### UnD3R0aTh
first thank you very much for taking the time to explain, i'm new to this forum and i noticed ppl here (helpers) like to keep the answers as short as possible! secondly, i fully understand what u said...however, my text book says if the field and two points are like this: E------point 1------point 2 then the potential difference is v at point 1 - v at point 2, so negative - positive will result in negative! your opinion?
18. Aug 23, 2013
### rude man
V at point 1 is kQ/r1. V at point 2 is kQ/r2. So if r2 > r1 and Q is negative, V2 - V1 is positive.
19. Aug 23, 2013
### UnD3R0aTh
i don't think u understand negative here, well it says that field was -500 then decreased to - 450, the negative as u know means due to negative charge, negative voltage means excess in negative charge, v at 1 is bigger than v at 2, the negative is not involved in the math!
20. Aug 24, 2013
### UnD3R0aTh
time's up, exam tomorrow :(
21. Aug 24, 2013
### ehild
It is correct, if negative electric field means pointing towards the planet
ehild
22. Aug 25, 2013
### Redbelly98
Staff Emeritus
I know it's too late in terms of being prepared for the exam, but here are my 2 cents.
Yes, it was right, as long as (1):
and (2) by "the potential difference between these two altitudes", the question means Vfinal-Vinitial. E always points toward lower electrostatic potential.
That being said, I think the question author came up with a poor set of answer options, because they provide a strong hint about both the magnitude and sign of the correct answer. | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8495544195175171, "perplexity": 978.2223796341647}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-30/segments/1531676589172.41/warc/CC-MAIN-20180716021858-20180716041858-00260.warc.gz"} |
https://www.scholars.northwestern.edu/en/publications/collisionless-shock-heating-of-heavy-ions-in-sn-1987a | # Collisionless shock heating of heavy ions in SN 1987A
Marco Miceli*, Salvatore Orlando, David N. Burrows, Kari A. Frank, Costanza Argiroffi, Fabio Reale, Giovanni Peres, Oleh Petruk, Fabrizio Bocchino
*Corresponding author for this work
Research output: Contribution to journalLetter
5 Scopus citations
### Abstract
Astrophysical shocks at all scales, from those in the heliosphere up to cosmological shock waves, are typically ‘collisionless’, because the thickness of their jump region is much shorter than the collisional mean free path. Across these jumps, electrons, protons and ions are expected to be heated at different temperatures. Supernova remnants (SNRs) are ideal targets to study collisionless processes because of their bright post-shock emission and fast shocks, but the actual dependence of the post-shock temperature on the particle mass is still widely debated 1 . We tackle this longstanding issue through the analysis of deep multi-epoch and high-resolution observations, made with the Chandra X-ray telescope, of the youngest nearby supernova remnant, SN 1987A. We introduce a data analysis method by studying the observed spectra in close comparison with a dedicated full three-dimensional hydrodynamic simulation that self-consistently reproduces the broadening of the spectral lines of many ions together. We measure the post-shock temperature of protons and ions through comparison of the model with observations. Our results show that the ratio of ion temperature to proton temperature is always significantly higher than one and increases linearly with the ion mass for a wide range of masses and shock parameters.
Original language English (US) 236-241 6 Nature Astronomy 3 3 https://doi.org/10.1038/s41550-018-0677-8 Published - Mar 1 2019
### ASJC Scopus subject areas
• Astronomy and Astrophysics
• ## Cite this
Miceli, M., Orlando, S., Burrows, D. N., Frank, K. A., Argiroffi, C., Reale, F., Peres, G., Petruk, O., & Bocchino, F. (2019). Collisionless shock heating of heavy ions in SN 1987A. Nature Astronomy, 3(3), 236-241. https://doi.org/10.1038/s41550-018-0677-8 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8414032459259033, "perplexity": 5290.56568761911}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-29/segments/1593655906934.51/warc/CC-MAIN-20200710082212-20200710112212-00296.warc.gz"} |
https://www.arxiv-vanity.com/papers/astro-ph/0110487/ | # Non-linear radial oscillations of neutron stars: Mode-coupling results
(1) Department of Mathematics, University of Southampton, Southampton SO17 1BJ, United Kingdom
(2) School of Computer Science and Maths, University of Portsmouth, Portsmouth PO1 2EG, United Kingdom
Accepted. Received; in original form October 2001
###### Abstract
The non-linear behaviour of oscillation modes in compact stars is a topic of considerable current interest. Accurate numerical studies of such phenomena are likely to require powerful new approaches to both fluid and spacetime computations. We propose that a key ingredient of such methods will be the non-linear evolution of deviations from the background stationary equilibrium star. We investigate the feasibility of this approach by applying it to non-linear radial oscillations of a neutron star, and explore numerically various non-linear features of this problem, for a large range of amplitudes. Quadratic and higher order mode coupling and non-linear transfer of energy is demonstrated and analysed in detail.
## 1 Introduction
Since the first realisation that the Cepheids are stars that pulsate radially, stellar oscillations have provided a fertile ground for astrophysicists. Observations obtained with much improved sensitivity have provided a wealth of relevant data in recent years. This provides an important theoretical challenge given that the gathered information can be matched against detailed stellar models. With the likely advent of gravitational-wave astronomy in the next few years, relativists are considering whether a similar program may be feasible for compact stars. This is an exciting idea since the detection of gravitational waves from a pulsating star may shed light on the nature of the equation of state at supra-nuclear densities. Although stellar oscillation theory has been an active field of research for many decades (in particular in the context of Newtonian gravity) and there are several monographs covering the main results, many crucial questions remain open. The main uncertainties concern the behaviour in the non-linear regime, e.g., the coupling between different modes, the formation of shocks etcetera. The purpose of the present paper is to demonstrate the accuracy of a new approach to the study of non-linear stellar oscillations. We apply the new method, in which the main focus is on non-linear deviations from the background stationary equilibrium star, to radial oscillations of neutron stars. This is a problem which, given its significance for the stability of the star, has received a lot of attention in the past. Although most results have been obtained in the linear regime, and concern the nature of the various eigenmodes [1977, 1983, 1992, 2001], there have also been attempts to study non-linear features in a perturbative way (including quadratic and cubic coupling terms) [1982, 1983, 1983, 1987, 1989, 1996]. [It is also relevant to mention the recent application of this approach to non-linear effects on inertial modes [2001] as well as the fully nonlinear simulations by Font, Stergioulas and Kokkotas [2000].] Our new approach provides a powerful complement to these studies. We investigate the main features that appear in the weak to mildly non-linear regimes. This leads to some interesting new results regarding non-linear mode-coupling and sheds light on two of the main questions in this area: i) What is the amplitude at which large amplitude modes saturate?, and ii) How reliable are expansion methods beyond quadratic order in the amplitude? We believe our paper provides the first detailed study of these effects in full general relativity.
## 2 Non-linear perturbations
We model the neutron star as a single component perfect fluid at zero temperature which obeys a polytropic equations of state , where and are constants. For such a fluid the energy momentum tensor is given by , where is the four velocity, normalised as . We restrict our consideration to spherical stars undergoing radial motions, in which case the four velocity is given by . Furthermore, in radial gauge and polar slicing the spherically symmetric line element is,
ds2=−λ2dt2+μdr2+r2(dθ2+sinθ)dϕ2 , (1)
i.e. it depends only on two functions and . With those assumptions the Einstein field equations and the equations of hydrodynamics lead to four independent equations
λ,rλ=μ2−12r+4πrμ2[P+(ρ+P)μ2w2], (2) μ,rμ=−μ2−12r+4πrμ2[ρ+(ρ+P)μ2w2], (3) ρ,t+α11ρ,r+α12w,r=b1, (4) w,t+α21ρ,r+α11w,r=b2. (5)
Here , , , and (see Sperhake [2001] for their exact form) are functions of the fundamental variables , , and , but not of their derivatives, so that Eqs. (4), (5) form a quasi-linear system. The solution of Eqs. (2)-(5) requires suitable boundary conditions. At the centre of the star we require that in order to avoid a conical singularity. The velocity vanishes at the origin due to spherical symmetry. At the stellar surface we fix the lapse function by matching the line element to an exterior Schwarzschild metric which implies that . We use typical parameters for the neutron star model: and . We set the central density of the equilibrium configuration of the neutron star to , which leads to a compactness (mass/radius ratio) .
In our analysis of non-linear mode coupling we approach radial oscillations of neutron stars satisfying equations (2)-(5) in the following manner. We decompose the time dependent quantities , , and into static background contributions and time dependent perturbations according to
f(t,r)=f(r)+δf(t,r). (6)
The background quantities are determined by the Tolman-Oppenheimer-Volkoff equations, the static analogues of Eqs. (2)-(5). We use the background equations to eliminate all zero order terms from the resulting perturbative dynamic equations. The resultant equations are equivalent to the original system (2)-(5). In particular, the two evolution equations form a quasilinear system for and . By eliminating terms of order zero in the perturbations we obtain numerical accuracy that is determined by the amplitude of the perturbation rather than the static background. This is the key advantage of this new approach. All preliminary tests have verified that this non-linear perturbation scheme provides much enhanced accuracy over a large range of amplitudes. Full details of the new method as well as the numerical code and its calibration are provided by Sperhake [2001].
Normally the surface of the star is defined by the vanishing of the pressure, which in the polytropic case is equivalent to . However, if one is using an Eulerian framework and the surface of the star is allowed to move, the outer grid boundary does not coincide with the surface of the star and this condition cannot be applied easily. As has been discussed in detail by Sperhake [2001] this leads to severe numerical difficulties, and could trigger artificial shock formation in the surface region. In the present study we want to focus on the non-linear coupling between various oscillation modes. In order to isolate this effect (and avoid any artificial effects due to the surface of the star) we use a fixed (rather than free) boundary condition, i.e. we require at the surface. Furthermore we do not evolve the low density layers of the neutron star, in order to avoid negative total energy densities. The resulting neutron star model contains about 90 of the mass of the original model.
The eigenmodes of a dynamic spherically symmetric neutron star are described by the linearised version of the dynamic equations (2)-(5). It is a well known result that the linearised equations lead to a self adjoined eigenvalue problem in terms of the rescaled displacement vector , which is related to our variables by , cf. chapter 26 in Misner, Thorne and Wheeler [1973]. The solutions of the eigenvalue problem form a complete orthonormal system and hence we can expand the time dependent resulting from fully non-linear evolution in a series of the linear eigenmodes
ζ(t,r) =∑iAi(t)ζi(r), (7)
where the coefficients are given in terms of the inner product
Ai(t)=∫R0(P+ρ)μ3λr2ζ(t,r)ζi(r)dr. (8)
In Fig. 1 we show the four lowest eigenmodes in the velocity field for our truncated stellar model. The expansion (7) provides a useful diagnostic which allows us to assess the level of non-linear coupling throughout a numerical evolution. We measure the presence of mode at any given time during the evolution by calculating the coefficient via numerical integration.
## 3 Results
In order to study non-linear mode-coupling we evolve the nonlinear perturbation equations from initial data corresponding to the velocity field of a single linear eigenmode (of order ) with amplitude , which represents the maximum radial displacement of a fluid element inside the star. The initial density perturbation is set to zero, while the initial values for the metric variables follow from the constraints (2)-(3).
### 3.1 Exciting the fundamental mode
We first consider the case when the initial data correspond to the fundamental radial eigenmode. Having evolved this data, we measure the maximal coefficients obtained over an integration time corresponding to many times the dynamical timescale. In Fig. 2 we show the maximal coefficients obtained for the lowest 10 eigenmodes for excitation amplitudes ranging between and . We observe weak mode-coupling throughout most of this domain. The fundamental mode itself (), is seen to grow more or less linearly with the initial amplitude , which indicates the absence of significant self interaction. Meanwhile, for higher order modes we can clearly identify two different regimes: For amplitudes below , all coefficients grow quadratically with the excitation amplitude . At larger amplitudes all eigenmode coefficients except for show a transition to power laws with larger index. We have illustrated this behaviour in Fig. 2 by modelling the coefficients , and as power series expansions in according to
Ai=ciK21+diKi1, (9)
(the Einstein summation convention is not use here or in similar expressions below) where and for . The higher order power laws have been obtained by least square fits to the coefficients after subtracting the quadratic contributions . For the modes the contribution of the higher order power law is rather weak which makes it difficult to obtain accurate measurements of the corresponding exponents. The steepening of the curves is, however, still obvious in the figure. It is also clear, since the curves for the eigenmode coefficients do not intersect in Fig. 2, that the coupling strength decreases with the order of the eigenmodes over the whole range of amplitudes.
### 3.2 Exciting higher order modes
Next we set initial data in the form of second and higher eigenmodes. In this case we still observe the two regimes mentioned above. In the weakly non-linear regime the eigenmode coefficients are well approximated by quadratic power laws. The main difference from the previous case is that the second mode (of order ) shows a preference to couple to modes of order . This is particularly clear in Fig. 3 where the coefficients , and show a much steeper increase for large amplitudes. For these modes we also obtain excellent fits with combinations of power laws according to
Ai=ciK22+diKi/22 (10)
where and for . These fits are shown in Fig. 3.
These results are generally confirmed if the initial data is given in the form of the third velocity mode. The only difference is that the preferred modes in the moderately non-linear regime are now those of order .
## 4 Discussion
In this paper we have applied a new non-linear approach to the study of stellar pulsation, and studied mode-coupling due to non-linear effects by evolving initial data corresponding to a single linear eigenmode with varying amplitude. Concerning the transfer of energy to other modes we have found two distinct regimes, a weakly non-linear regime where the excitation of modes grows quadratically with the initial amplitude and a moderately non-linear regime, which can be reasonably well described by power laws of higher order.
The results for the weakly non-linear regime agree qualitatively with Newtonian perturbative studies. In the analytic study of non-linear mode coupling one normally views the eigenmode coefficients as harmonic oscillators and the non-linear interaction between eigenmodes is represented in the form of driving terms which are quadratic or of higher order in the amplitudes (see for example van Hoolst [1996])
d2Aidt2+ω2iAi =cjkiAjAk+djkliAjAkAl+…, (11)
where the , are the quadratic, cubic and higher order coupling coefficients and summation over is assumed. In our analysis the initial data consists of one isolated eigenmode , so that the right hand side can be approximated by In analytic studies this series expansion is normally truncated at second or third order. The omission of higher order terms is justified in the weakly non-linear regime, where our fully non-linear simulations confirm that quadratic terms in the initial amplitude dominate the coupling between eigenmodes. This is no longer true, however, in the moderately non-linear regime, where higher order terms are more important. Our results allow us to define the transition to this regime, manifested by the breaks in the curves in Figures 2 and 3. As is clear from the figures, the moderately non-linear regime corresponds to initial mode amplitudes above 10 m or so. We note that the corresponding Mach number is of the order of 0.01. This agrees well with investigations of Newtonian stars (Kumar & Goldreich 1989) which assume a Mach number of 0.1 as the limit of applicability of semi-analytic mode coupling methods.
Furthermore, our results indicate that the non-linear couplings would be poorly captured by polynomial expansions in the mildly non-linear regime. We observe significant excitation of higher order modes (eighth, tenth etc) which can only emerge from very high-order couplings. To quantify the associated coupling coefficients in a perturbative calculation would be very difficult.
We have also observed that, given an initial mode , the coupling to modes is particularly efficient in the moderately non-linear regime. This is naturally interpreted as a resonance effect. In analogy with the simple problem of a single forced oscillator we can assume that resonance occurs for any mode whose frequency is an integer multiple of the driving frequency in the general non-linear case, i.e. we can schematically write the eigenmode coefficients in the form
Ai(t) ∼∑nFnω2i−(nωj)2, (12)
where the will depend on the frequencies (cf. Eqs. (18), (19) of van Hoolst [1996]. In our case the external force is provided by the non-linear coupling to the initial mode , as indicated in (12). We therefore obtain resonance if . For our simple neutron star model, the eigenfrequencies of radial neutron star oscillations are almost equally spaced and we can use for as a reasonable approximation. The condition for resonance then becomes which is exactly what we have observed.
As one of the main results of this paper, we emphasise the new perturbative approach that enabled us to obtain highly accurate, fully non-linear, evolutions over a large range of amplitudes. This approach was discussed in detail by Sperhake [2001], and we plan to present further results regarding mode-coupling and non-linear shock formation in future papers. In principle, this technique can be applied to any physical problem that involves a non-trivial stationary limit and we expect it to prove a valuable tool in many non-linear problems. We note that the accuracy improvements are independent of the numerical discretization used (here, second order, centred finite differences). In combination with methods suitable for smooth oscillatory solutions [1991, 1995], we would expect a dramatic expansion of the applicability of non-linear simulations to relativistic stellar pulsations.
A problem for which our new approach may prove useful concerns unstable modes of rotating neutron stars (eg. the r-modes, see Andersson & Kokkotas [2001] for a review). One of the most important questions raised in connection with the r-modes concerns the amplitude at which an unstable mode saturates. Recently, direct three dimensional numerical simulations have been brought to bear on this problem [2001, 2001]. The picture that emerges from these studies is, however, not conclusive. Both studies suggest that an unstable r-mode saturates at an extremely large amplitude (corresponding to waves of a height of several hundred meters in a star spinning near the breakup limit) due to shocks forming in the surface region. That such “wave breaking” would occur once a mode reaches a large amplitude is likely, but simulations must isolate the true physical behaviour near the surface of a star, from numerical artifacts associated with the rapid decrease in the density (for a detailed discussion see Sperhake [2001]). In fact, it is interesting to contrast these results with those of the present work that suggest that nonlinear effects are highly relevant already at wave amplitudes of order 10 m. We believe that a suitable generalisation of the method used in this paper, that provides unprecedented accuracy for a large range of wave amplitudes, could prove extremely useful for the study of unstable non-axisymmetric modes and plan to address such problems in the near future.
### Acknowledgements
We thank Kostas Kokkotas for helpful comments. This work has been supported in part by the EU Programme ’Improving the Human Research Potential and the Socio-Economic Knowledge Base’, (Research Training Network Contract HPRN-CT-2000-00137). P.P. acknowledges support from the Nuffield Foundation (award NAL/00405/G). N.A. acknowledges support from the Leverhulme Trust in the form of a prize fellowship.
## References
• [2001] N. Andersson and K.D. Kokkotas, Int. J. Mod. Phys. D 10, 381 (2001)
• [1977] G. Chanmugan, ApJ 217, 799 (1977)
• [1982] W. Dziembowski, Act. Astr. 32, 147 (1982)
• [2000] J.A. Font, N. Stergioulas and K.D. Kokkotas, MNRAS 313 678 (2000)
• [1983] E.N.Glass and L.Lindblom, ApJS 53, 93 (1983)
• [1991] E.Gourgoulhon, Astron. Astrophys. 252, 651 (1991)
• [1995] E.Gourgoulhon, P.Haensel, and D.Gondek, Astron. Astrophys. 294, 747 (1995)
• [ 2001] K.Kokkotas and J.Ruoff, Astron.Astrophys. 366, 565 (2001)
• [1989] P.Kumar and P.Goldreich, ApJ 342, 558 (1989)
• [ 2001] L.Lindblom, J.E.Tohline, and M.Vallisneri, Phys. Rev. Lett. , 1152 (2001)
• [1973] C.W. Misner, K.S. Thorne and J.A. Wheeler, Gravitation (Freeman, San Francisco) (1973)
• [1983] J.Perdang, Solar Physics 82, 297 (1983)
• [1983] J.Perdang and S.Blacher, Astron. Astrophys. 112, 35 (1982)
• [2001] A.K.Schenk, P.Arras, E.E.Flanagan, S.A.Teukolsky, and I.Wasserman, preprint gr-qc/0101092
• [2001] U. Sperhake, PhD Thesis (2001)
• [2001] N.Stergioulas and J.A.Font, Phys. Rev. Lett. 86, 1148 (2001)
• [1996] T. van Hoolst Astron. Astrophys. 308 66 (1996)
• [1992] H.M.Vath and G.Chanmugam, Astron. Astrophys. 260, 250 (1992)
• [1987] D.G.Wentzel, ApJ 319, 966 (1987) | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9332888722419739, "perplexity": 709.3106827261856}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964363376.49/warc/CC-MAIN-20211207105847-20211207135847-00014.warc.gz"} |
http://mathhelpforum.com/algebra/197800-function-print.html | # function
• Apr 23rd 2012, 04:21 PM
doctorbleachers
function
Given P(x) = x^3 - 3x^2 - 5x
a.evaluate P9x) for each integer value of x from -3 through 5
b. Find all zeros of P(x)
d. Prove that 5 is an upper bound on the zeros of P(x)
• Apr 23rd 2012, 05:02 PM
emakarov
Re: function
a. Do you expect us do this for you?
b. Part (a) gives you one zero; use polynomial long division to get a quadratic equation, which gives you the other two zeros.
c. Estimate the value of square roots from (b). E.g., $\sqrt{29}<\sqrt{36}=6$.
• Apr 24th 2012, 05:46 AM
HallsofIvy
Re: function
Quote:
Originally Posted by doctorbleachers
Given P(x) = x^3 - 3x^2 - 5x
a.evaluate P9x) for each integer value of x from -3 through 5
Do you not understand that this is integer arithmetic? Can you not multiply, add, and subtract integers?
Quote:
b. Find all zeros of P(x)
You can factor an "x" out to P(x) easily, leaving a quadratic term. Do you know the quadratic formula?
Quote:
d. Prove that 5 is an upper bound on the zeros of P(x)
You just need an estimate of the square root that shows up in (b).
(What happened to (c)?) | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 1, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7614684700965881, "perplexity": 1292.5824169583304}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-22/segments/1495463609404.11/warc/CC-MAIN-20170528004908-20170528024908-00409.warc.gz"} |
http://jackman.stanford.edu/blog/ | jackman.stanford.edu/blog
• Bayesian Analysis for the Social Sciences Wiley; Amazon; errata as of 4/16/13
• 113th U.S. Senate
• ideal point estimates pdf csv 5/15/13
• scatterplot against 2012 Obama vote share pdf
• roll call object: RData
• 113th U.S. House
• ideal point estimates pdf csv 5/20/13
• scatterplot vs Obama vote share pdf svg
• roll call object: RData
• 2013 Australian Federal Election, betting market summary
AgencyALPCoalitionProb ALP Win (%)Last 7 days
Tom Waterhouse8.001.0511.6
sportsbet7.001.0513.0
Centrebet7.001.0913.5
Monday May 20, 2013
Filed under: Australian Politics — jackman @ 12:12 pm
A little bit of volatility in the Federal election betting markets to report…
Over the last 12 days Labor’s price at Centrebet has recovered from $9.60 to$6.50, the Coalition out from $1.05 to$1.10. The Labor win probabilities implied by these prices are 9.8% and 14.5%, so in relative terms this is a reasonably big swing; indeed, the rate of return on a successful Coalition wager has doubled (5% to 10%).
Labor had been on 9.60 to the Coalition’s 1.04 at Centrebet from May 9 until May 17, when Labor’s price recovered to 9.00 to 1.05. Sunday night (May 19) saw the Centrebet price move again to 8.50/1.06, and to 8.00/1.07 on Monday afternoon. Between 5pm and 6pm last night the Centrebet prices moved again, to 6.50/1.10.
You can’t help but wonder who is buying Labor at these kinds of prices. True believers? Or savvy investors laying off their Coalition wagers?
A graph of the implied probabilities from Centrebet, Sportsbet and Tom Waterhouse appears below (click for a bigger view):
The Nielsen poll (and media reporting on it) is the likely culprit of Monday’s movement. And yet more evidence that poll results predict betting market predict election outcomes.
Kevin Rudd’s blog post re his evolution on same-sex marriage has a publication date on 7.15pm; if that is a valid timestamp, it suggests that Rudd’s announcement didn’t move the Centrebet price.
Betfair is also showing some modest recovery in the Labor price. The last matched prices there are 10.00/1.11.
Sportsbet and Tom Waterhouse have been exhibiting much less movement in the Federal betting market prices, which you can’t help but interpret as indicative of those bookies handling less volume than Centrebet.
I’d also point out that Centrebet has tended to have a little less profit margin built into its prices than Sportsbet or Waterhouse: for instance, with the prices currently on offer, Centrebet’s overround is about 6.3% vs 7.7% for Sportsbet and Waterhouse. In turn, this might help explain what looks like a slightly more lively market at Centrebet relative to these two competitors.
Thursday May 16, 2013
Filed under: general — jackman @ 5:55 am
…from TEDx Sydney, got picked up by the TEDx global site.
Links: blog.tedx.com and at tedxsydney.com.
Thanks to everyone at TEDx Sydney for letting me be part of an amazing event. The organization of the event was terrific, the production value and support absolutely sumptuous (the Sydney Opera House!).
Edwina Throsby (my producer) and I had been bouncing ideas and drafts around for a couple of months; Gretel Killeen joined Edwina in knocking the talk into shape during rehearsals.
My thanks to David Broockman and Chris Skovron for letting me use their same-sex marriage example.
I also need to thank Margaret Stewart (herself a “big” TED veteran) (and check this out) and family, from whom I appropriated the “It’s Your Duty To Hack” sign appearing at the end of the talk.
And this is too beautiful not to link to (bump it up to HD, full-screen etc):
Friday May 10, 2013
Filed under: statistics — jackman @ 4:25 pm
I just spent a couple of hours at the meeting of the West Coast Experiments group, a set of political scientists interested in using experiments.
One the speakers was talking about the need for “credible” or “honest” p-values. “This will be good”, I thought to myself…
What the speaker was alluding to are the current moves afoot in political science to help stamp out “fishing” for statistically significant results, including pre-registering research plans. The problem is that after you’ve looked at a data set multiple times, the p-values aren’t telling what you think they are. The problem – as some Bayesians would point out – is that a p-value isn’t ever what you’d like it to be, even when you’re looking at the data the 1st time…
From the Bayesian perspective, all this stuff is kind of ridiculously overblown, a consequence of an unthinking acceptance of $$p < .05$$ as a model for scientific decision-making, point null hypothesis testing, the whole box and dice. That is worth a separate post one day.
For now, I'll remark that pre-registration of research plans is a bit like eliciting very crude priors: i.e., enumerating things to be looked at in the analysis, because the effects aren't thought to be zero; enumerating things that won't be looked at, because prior beliefs over the effects are concentrated close to zero.
The best moment of Bayesian irony was when the speaker emphasized that the need for honest p-values is especially pressing in situations where the experiment is expensive or intrusive and therefore unlikely to be run very often. This was just awesome, when you think what about a p-value is supposed to measure.
More generally, its been very interesting to bring a Bayesian perspective to my teaching about experimental design and analysis, or to a meeting like the one I was at today.
To begin with, try this on: the role of randomization in Bayesian inference. At least as a formal matter, randomization plays no formal role in the Bayesian analysis of data from an experiment, or any other data for that matter. This sounds so odd to non-Bayesians at first, particularly people who are doing a lot of experiments. But recall that repeated sampling properties like unbiasedness just aren’t the 1st or 2nd or even 3rd thing you consider in the Bayesian approach.
So just is the value of randomization to a Bayesian? Surely not zero, right? Don Rubin has written a little on this; Rubin’s point – that randomization limits the sensitivity of a Bayesian analysis to modeling assumptions – is a stronger conclusion than it first sounds, and one more of the more helpful things I’ve come across on the topic. I also found this note by J. Ghosh, a very concise and accessible summary of the issues too, summarizing some of the Bayesian thinking on the matter (Savage, Kadane, Berry etc). But my sense is that there’s not a lot out there on this. There is actually more writing on this in the literature putting model-based inference up against design-based inference in the sampling literature, which is essentially a parallel debate.
So, vast chunks of the (overwhelmingly classical/frequentist) literature on the analysis of experiments can seem very odd to a Bayesian. Randomization inference, or permutation tests. Re-randomization of assignment status if one detects imbalance. Virtually all Bayesians take the Likelihood Principle seriously, but so much of the work on experiments seems to violate it. It is also pretty obvious that experimenters are also carrying around prior information and using it: balance checks would seem to be guided by prior expectations as to likely confounders, no? Just in the same way that post-stratification weighting for non-response in a survey setting seems to be guided by an (implicit, and rather simplistic) model of response/non-response.
There is a lot to work through. Above all, it is important to keep in mind what is relevant for the applied scientist, what is more esoteric, and where Bayesian ideas can be of real practical use (e.g., Andy Gelman et al on hierarchical models for multiple comparison problems, or in the analysis of blocked or clustered designs, etc).
For now, I’m blessed to have colleagues like Persi Diaconis, Guido Imbens and Doug Rivers, who indulge (or encourage) my thinking out loud on these matters.
Wednesday May 1, 2013
Filed under: Australian Politics — jackman @ 6:19 pm
I’m in Sydney this week prepping for TEDxSydney this weekend, which should be a blast. I’m talking about Politics and the Data Revolution, which will take in a review of some of the ways that the Data Revolution is reshaping political science research — and in particular — making that research incredibly relevant to real-world politics and policy making.
Its a very different kind of talk to lecturing, workshops, or even general audience talks. I’m learning a lot about those other, more conventional modes of giving talks from the prep I’m having to put into being comfortable with the TED format. We’ll see how it goes…
The Guardian Australia announced that I’ll be helping out with their election coverage ahead of the election here in September. It looks like a great group of people they’ve assembled (only one or two I knew about until today’s announcement).
And it seems only a month ago that I blogged about Labor’s price breaking new records for long-odds in the Australian political betting markets, at 7.30 to 1.10 on Centrebet on March 29. Think again.
Its May 2 and Labor’s out to 8.80 at Centrebet, the Coalition in to 1.05. The implied probability of a Labor win is 10.7%. Tom Waterhouse has the Coalition at 1.10.
Do ya best.
And, one of the best parts of a week in Sydney is that I usually treat myself to a workspace with a view like this:
Not too shabby.
Thursday April 25, 2013
Filed under: general — jackman @ 10:18 am
At the risk of being a little self-serving…
7 political scientists were elected to the American Academy of Arts and Sciences this year. 4 of them (er, us) got their degrees from Rochester in the early to mid 1990s: Daniel, John, me and Alastair.
And 3 of the 4 Rochester people were born/raised outside of the US.
Oh, Meliora… And congratulations.
Monday April 8, 2013
Filed under: politics — jackman @ 5:58 pm
After a bit of a hiatus, I’ve got the 113th U.S. Senate ideal points up and running. Links to deliverables appear above, in the blog header. It is interesting to ask where the new faces line up.
Quelle surprise, there is no partisan overlap in the estimated ideal points. Manchin is the most conservative Democrat, followed by McCaskill; Collins the most liberal Republican, followed by Murkowski.
I was a little surprised to see Flake (R-AZ) and Coburn (R-OK) not out in the extreme of the Republican ideal points, but maybe thats because I’ve been traumatized by their assaults on political science.
Warren’s (D-MA) voting history places her just a little to the left of the median Democratic senator, right next to Richard Blumenthal (CT), Tammy Baldwin (WI) and Ben Cardin (MD).
Boxer is a little to the left of Feinstein, but we’re estimating those ideal points rather imprecisely (we’re not seeing a lot of roll calls that split the Democrats).
PNG version of the distribution of ideal points:
I’ve also plotted ideal points against Obama vote share in the state in the 2012 presidential election:
The separation by party is (as usual) the most compelling feature of the data. As she was in the 112th, Murkowski is decidedly more liberal than we’d expect from a Republican senator representing a state in which Obama got 40% of the vote.
Durbin and Menendez are the 2 biggest “more liberal than expected” residuals on the Democratic side; Kerry and the two DE senators (Carper and Coons) are substantially more conservative than we’d expect, given that Obama won 60% of the vote in their respective states. In Kerry’s case we’ve got a truncated voting history given his elevation to SecState, but it will be interesting to see where the DE senators wind up.
Monday April 1, 2013
Filed under: politics,statistics — jackman @ 12:18 pm
“I needed to learn how to be persuasive. I needed to learn how to win arguments. And so I did two things.”
“I took a ton of statistics classes…”
“And I enrolled in the Ethics in Society Honors program.”
20.30 in this YouTube video.
Saturday March 30, 2013
Filed under: Australian Politics — jackman @ 6:40 am
Labor’s price is out past $7.00, the Coalition in to under$1.10. The implied probability of a Labor win is under 13%, once you factor out the bookies’ profit margins.
In the 6 years I’ve been watching the national-level betting markets, I think this is as lop-sided a market as I’ve seen. Some state-level markets have exceeded this, from memory (I haven’t been logging those prices), but I think I’m correct in asserting \$7.00+ prices are new territory for the national betting markets.
The 10 highest Labor prices I’ve recorded:
The 10 highest Coalition prices aren’t as lop-sided, and almost all date back to the 2007 election:
July 2011 to the present, implied probability of a Labor win, based on the prices offered by some of the better known betting agencies:
Wednesday March 20, 2013
Filed under: ANES,politics,statistics — jackman @ 12:17 pm
The Senate just adopted Coburn’s (amended) amendment:
To prohibit the use of funds to carry out the functions of the Political Science Program in the Division of Social and Economic Sciences of the Directorate for Social, Behavioral, and Economic Sciences of the National Science Foundation, except for research projects that the Director of the National Science Foundation certifies as promoting national security or the economic interests of the United States.
Barbara Mikulski accepted the terms of the amendment, let it go through on the voices.
Nicely wedged, nicely played.
A great day for IR. A bad day for the study of American politics, political methodology…etc.
The “national security” or “economic interests” tests will be an interesting thing to see play out.
Or maybe we’re all sociologists now?
Tuesday March 19, 2013
Filed under: Australian Politics — jackman @ 10:32 pm
A look at Sportbet’s market on the Labor leadership, at least for the four leading contenders…
Next Page »
Powered by WordPress
Bad Behavior has blocked 4311 access attempts in the last 7 days. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2542111277580261, "perplexity": 4158.503266179957}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2013-20/segments/1368700074077/warc/CC-MAIN-20130516102754-00035-ip-10-60-113-184.ec2.internal.warc.gz"} |
http://www.ams.org/mathscinet-getitem?mr=1068118 | MathSciNet bibliographic data MR1068118 (92c:11086) 11L40 Dobrowolski, Edward; Williams, Kenneth S. An upper bound for the sum $\sum\sp {a+H}\sb {n=a+1}f(n)$$\sum\sp {a+H}\sb {n=a+1}f(n)$ for a certain class of functions $f$$f$. Proc. Amer. Math. Soc. 114 (1992), no. 1, 29–35. Article
For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.
Username/Password Subscribers access MathSciNet here
AMS Home Page
American Mathematical Society 201 Charles Street Providence, RI 02904-6248 USA
© Copyright 2015, American Mathematical Society
Privacy Statement | {"extraction_info": {"found_math": true, "script_math_tex": 2, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9487825036048889, "perplexity": 8525.306829289604}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-48/segments/1448398464536.35/warc/CC-MAIN-20151124205424-00158-ip-10-71-132-137.ec2.internal.warc.gz"} |
https://zbmath.org/?q=an%3A0332.65058 | ×
## Numerical solution of the biharmonic problem by mixed finite elements of class $$C^0$$.(English)Zbl 0332.65058
### MSC:
65N30 Finite element, Rayleigh-Ritz and Galerkin methods for boundary value problems involving PDEs 65N06 Finite difference methods for boundary value problems involving PDEs 65N12 Stability and convergence of numerical methods for boundary value problems involving PDEs 35A15 Variational methods applied to PDEs 35A35 Theoretical approximation in context of PDEs 65M99 Numerical methods for partial differential equations, initial value and time-dependent initial-boundary value problems 65N99 Numerical methods for partial differential equations, boundary value problems | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.46506622433662415, "perplexity": 736.7239183195705}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-40/segments/1664030334912.28/warc/CC-MAIN-20220926144455-20220926174455-00028.warc.gz"} |
http://www.edurite.com/kbase/advantages-of-non-conventional-energy-sources | #### • Class 11 Physics Demo
Explore Related Concepts
# advantages of non conventional energy sources
#### Best Results From Yahoo Answers Youtube
Question:and what are its advantages and disadvantages? : D
Answers:conventional- fossil fuels (petroleum, natural gas, and coal) disadvantages: Burning fossil fuels adds to global warming and produces sulfur emissions, acid rain, and smog; they are nonrenewable sources of energy nonconventional- Solar energy Wind energy Hydroelectric energy Geothermal energy Ocean energy Fuel cells Nuclear energy advantages: are renewable sources of energy
Question:
Answers:Wind and solar can generate enormous amounts of energy with only minimal negative environmental, social, and economic implications. These sources do not pollute or deplete natural resources and therefore can sustain energy supply for generations, if not indefinitely.
Question:how tidal energy is utilized? how wind energy is utilized? how solar energy is utilized? how biomass is utilized? what are their energy resources in the philippines? what are their advantages and disadvantages? please answer it now please i need it please i need it immediately... thank you=)
Answers:Geothermal electricity is renewable. Binary-Cycle Power Plants Hot geothermal fluid and a secondary (hence, "binary") fluid with a much lower boiling point than water pass through a heat exchanger. Heat from the geothermal fluid causes the secondary fluid to flash to vapor, which then drives the turbines. Because this is a closed-loop system, virtually nothing is emitted to the atmosphere. Dry Steam Power Plants Steam plants use hydrothermal fluids that are primarily steam. The steam goes directly to a turbine, which drives a generator that produces electricity. This is the oldest type of geothermal power plant. It was first used at Lardarello in Italy in 1904, and is still very effective. Flash Steam Power Plants Fluid is sprayed into a tank held at a much lower pressure than the fluid, causing some of the fluid to rapidly vaporize, or "flash." The vapor then drives a turbine, which drives a generator.
Question:
Answers:clean Eco friendly and always available | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8403924703598022, "perplexity": 3506.0613070795503}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-44/segments/1476988719677.59/warc/CC-MAIN-20161020183839-00333-ip-10-171-6-4.ec2.internal.warc.gz"} |
http://tex.stackexchange.com/questions/155933/saturn-rings-with-tikz | # Saturn rings with TikZ
The planet and a ring are easily drawn. The challenge is to layer them in such a way that the far side of the ring is hidden from view behind the planet, and the near side of the ring eclipses the planet in the foreground. My instinct tells me that this can be done using clipping, scopes, or the backgrounds package, but I apparently lack the cleverness to turn the trick.
Here's the code for Saturn and one ring:
\documentclass{article}
\usepackage{tikz}
\begin{document}
%Saturn on top
\begin{tikzpicture}
\end{tikzpicture}
\bigskip
%ring on top
\begin{tikzpicture}
\end{tikzpicture}
\end{document}
-
Example with some clipping:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% red Saturn as background
% blue ring with white in the middle
\draw[fill=blue, even odd rule]
% redraw red Saturn in the foreground with clipping
\begin{scope}
\clip[overlay] (-2.1,0) rectangle (2.1,2.1);
\end{scope}
\end{tikzpicture}
\end{document}
Remarks:
• Instead of filling the interior of the ring with white, the code uses option even odd rule for filling. The "white" interior is specified twice for filling. According to that rule, it is not filled with the fill color.
-
Bravo! That's exactly what I thought could be done, but couldn't do it. Thanks, Heiko. – steven_nevets Jan 25 at 20:41
That looks strangely familiar. – episanty Jan 26 at 2:45
With PSTricks just for fun as usual. No clipping used here.
\documentclass[pstricks,border=12pt]{standalone}
\begin{document}
\begin{pspicture}[linecolor=blue](-4,-2)(4,2)
\pscustom*{\psellipticarcn(4,1){180}{0}\psellipticarc(0,.2)(3,.5){0}{180}}
\pscircle*[linecolor=red]{2}
\pscustom*{\psellipticarc(4,1){180}{0}\psellipticarcn(0,.2)(3,.5){0}{180}}
\end{pspicture}
\end{document}
-
Can you make it animated with an actual asteroid belt rotating :-) just saying.... – azetina Jan 25 at 23:24
@azetina: I am thinking of it. – Please don't touch Jan 25 at 23:40
Another example:
\documentclass[x11names]{beamer}
\usepackage{lmodern,tikz}
\usetikzlibrary{decorations.markings,overlay-beamer-styles}
color(0cm)=(AntiqueWhite4);
color(0.1cm)=(LightGoldenrod2);
color(0.15cm)=(Bisque1);
color(0.25cm)=(LemonChiffon3);
color(0.3cm)=(NavajoWhite3);
color(0.6cm)=(LemonChiffon3);
color(0.7cm)=(Wheat2);
color(0.85cm)=(Wheat1);
color(0.95cm)=(Bisque3);
color(1.25cm)=(Cornsilk2);
color(1.5cm)=(Bisque3);
color(1.7cm)=(AntiqueWhite3);
color(1.9cm)=(AntiqueWhite4)
}
\tikzset{satellite orbit/.style args={at pos #1 with #2}{
postaction=decorate,
decoration={
markings,
mark=
at position #1
with
{
#2
}
}
},
}
\begin{document}
\begin{frame}
\begin{center}
\begin{tikzpicture}[rotate=21]
\path[inner color=LemonChiffon3,outer color=Bisque3,even odd rule]
\path[inner color=Bisque2,outer color=NavajoWhite3,even odd rule]
;
\path[left color=AntiqueWhite3,right color=Wheat3!98!black,even odd rule,
\path[inner color=NavajoWhite2,outer color=Bisque3,even odd rule]
\foreach \x[count=\xi] in {0.35,0.4,...,1,0,0.05,...,0.25}{
\tikzset{visibility/.style={
visible on=<\xi>,
}
}
\ifnum\xi<3
\tikzset{visibility/.append style={
}
}
\fi
\ifnum\xi>16
\tikzset{visibility/.append style={
}
}
\fi
\path[satellite orbit=%
at pos {\x} with {%
\node[circle,visibility]{};%
}
\begin{scope}
\clip[overlay] (-2.1,0) rectangle (2.1,2.1);
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
The result:
-
Really cool drawing! – Svend Tveskæg Jan 29 at 16:17
Amazing code, Claudio! In other news, Houston, we have a problem... :) – Paulo Cereda Jan 29 at 17:03
@PauloCereda: the birth of alien ducks :) What else will you invent? ;) – Claudio Fiandrino Jan 29 at 17:50
@Claudio: my original plan was to replace the moon with the duck, but apparently I injected the duck code in the wrong place. :) – Paulo Cereda Jan 29 at 18:06
@PauloCereda: oh, I may have some clues for that; let me have a look tomorrow. – Claudio Fiandrino Jan 29 at 19:02
Not sure I like the colour scheme, so here's a more restrained Metapost version, featuring the useful buildcycle macro.
% prologues :=3; outputtemplate := saturn.eps; % uncomment if you want these
beginfig(1);
path globe, gap, ring[], limb[];
globe = fullcircle scaled 2cm;
gap = fullcircle xscaled 3cm yscaled .8cm;
ring1 = fullcircle xscaled 4cm yscaled 1.2cm;
ring2 = ring1 scaled 0.93;
ring3 = ring1 scaled 0.89;
limb1 = buildcycle(subpath (5,7) of ring1, subpath (8,4) of globe);
limb2 = buildcycle(subpath (5,7) of gap, subpath (-2,6) of globe);
picture saturn; saturn = image(
fill ring1 withcolor .1red+.1green+.4white;
fill ring2 withcolor .2white;
fill ring3 withcolor .1red+.1green+.6white;
unfill gap;
fill limb1 withcolor .2red+.1green+.7white;
fill limb2 withcolor .2red+.1green+.7white;
);
draw saturn rotated 30;
endfig;
end. % don't include this if you are making this part of another file
-
Really cool drawing! – Svend Tveskæg Jan 29 at 16:42
Impressively economical code. – Faheem Mitha Jan 29 at 22:58
This example (according to @egreg), is missing a final end.. At any rate, it does not work without that addition, and does work with it. – Faheem Mitha Jan 29 at 23:25
@FaheemMitha that's right. You might also need some context at the beginning. I'll update it. – Thruston Jan 30 at 0:07 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7144389152526855, "perplexity": 16289.313458094748}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-23/segments/1406510265454.51/warc/CC-MAIN-20140728011745-00473-ip-10-146-231-18.ec2.internal.warc.gz"} |
https://proxies123.com/tag/proof/ | ## Find the first 20 primes found by the classical proof of the infinitude of the set of primes
Begin with P={2}; then form,m, the sum of 1 with the product overall elements of P. Place the smallest prime factor of m into P and repeat.
Suppose p = {p1,p2,…,pr}, then m = 1+ p1p2p3…pr.
Example:
2 is prime and 2+1 = 3 is prime;
2 * 3 +1 = 7 is prime;
2 * 3 * 7 +1 = 43 is prime;
2 * 3 * 7 * 43 +1 = 1807 = 13 * 139, then 13 is the prime;
Thus the first 5 prime number found by the classical proof is {2,3,7,43,13}.
So how to use this proof to find the first 20 prime in Mathematica?
Thank you.
## proof writing – New to transitive sets,need help in doing and understanding this stuff
Following problem is from Pinter’s book of set theory
Prove that a is a transitive set iff the
following holds :if B∈CandC∈A,thenB∈A
6.5 Definition A set A is called transitive if, for each x ∈ A, x ⊆ A.
Are B and C transitive sets?
If A$$^+$$=A$$cup$${A} could I say B= A$$^+$$ lexicographically
speaking?
Attempted proof
If A is transitive then x ∈ A, x ⊆ A.
after this I am stuck
## metric spaces – Proof that two balls intersect
Prove that the two open balls 𝐵(𝑥,0.9) and 𝐵(𝑦,0.9) which are both contained in 𝐵(0,1) intersect.
I have tried to prove they both contained zero but it doesn’t look like they do and I am getting confused on how to apply the distance function.
We are looking at the metric space (𝑅𝑛,𝑑1,2𝑜𝑟∞)
## Does leaving behind a business and child count as proof of intention to return for UK Visa?
I know this has been done many times before but I’m seeking advice on my situation.
I’m a professional British citizen living in Asia. I have been with my Filipino Girlfriend for around a decade. I provide for her financially. She has a small food and beverage business in the Philippines which is in her name. She has all the paperwork to prove this, including business permits etc. Unfortunately, as it’s basically a cash in hand business not much of the takings are deposited in a bank, although she does have an account.
She has a 14 year old Daughter from a previous relationship and we have an 18-month old Son together who has my surname and I am named on the birth certificate.
I would like to take my Girlfriend and Son to the UK for 2 weeks this
year to visit my parents/my sons grandparents who are elderly and
would find a long journey difficult. I have the following questions
surrounding her being able to prove that she intends to return:
• Would the fact that her Daughter, who lives with her and is reliant
on her, will be staying behind in the Philippines be enough to show
she intends to return?
• Would the fact that she owns her own small business (and has all the
documentation to prove this) be proof that she intends to return,
despite not having accounts etc to show it is profitable?
Does the fact that I am my sons Father and I want him to see his elderly grandparents and meet his wider family members count for anything? Obviously an 18-month old baby is too young to spend 10 to 14 days away from his Mother.
For the record I will be sponsoring her trip/paying for flights/paying for private medical insurance for the both etc.
Edited to add from comments: My girlfriends mother will be taking care of the daughter and has provided a letter to state this. I can prove that I support my girlfriend, although I work and live in Singapore.
## proof techniques – Prove (p → ¬q) is equivalent to ¬(p ∧ q)
I need to prove the above sequent using natural deduction. I did the first half already i.e. I proved $$(prightarrowneg q)rightarrow neg (p wedge q)$$, but I’m stuck on where to start for the reverse i.e. proving $$neg (p wedge q) rightarrow (prightarrowneg q)$$. I figured I would start by assuming $$neg (p rightarrow neg q)$$ and then working towards a contradiction, but I’m still at a dead end. Can someone point me in the right direction? Thanks.
## cryptography – How does Zero Knowledge Proof prevent lying?
I have seen and read several videos and articles that try to explain how Zero Knowledge Proof systems work. In these examples, there is a verifier of information, and a prover of information. The verifier asks the prover to prove that they know some information. Metaphors I have seen usually are:
The prover wants to prove they are not colorblind and gives the verifier two colored items. The verifier is color
blind and switches the items around (or not). The prover can tell if
the items were switched. Repeat this a hundred times successfully and
the prover has proven to the verifier that they really are not colorblind.
I’ve seen variations with Pepsi/Coke taste tests, colored pens or balls, etc. However, this kind of proof requires that the verifier has some sort of information at their disposal already (whether they switched the balls around or not).
I’ve also heard examples such as:
• A liquor store asks a customer if they are at least of drinking age. The customer can prove they are without having to show their ID.
• A bank asks a customer to prove they have a minimum balance so that they can get a loan, without having access to the customer’s bank account.
These are examples where the verifier (the liquor store and the bank) doesn’t have the same information at their disposal (such as the example of switching the items around).
If a liquor store asks a customer if they’re of drinking age, what’s preventing the customer from just lying as many times as needed to buy their alcohol?
## fa.functional analysis – Trying to recover a proof of the spectral mapping theorem from old thesis/paper with continuous functional calculus
In my research group in functional analysis and operator theory (where we do physics and computer science as well), we saw in an old Russian combination paper/PhD thesis in our library a nice claim about the spectral mapping theorem’s possible proof. Let me attempt to bring the context here. I should mention there are some nice results in this paper that I wanted to use and generalize for my own research, I hope to accurately bring the context below.
They bring up the continuos functional calculus $$phi: C(sigma(A)) rightarrow L(H)$$ for a bounded, self-adjoint operator on a Hilbert space A. This is an algebraic *-homomorphism from the continuous functions on the spectrum of $$A$$ to the bounded operators on $$H$$. The paper’s spectral mapping theorem basically says in this context $$sigma(phi(f)) =f(sigma(A))$$ and the paper says something nice about this. It does not actually give a proof but it says there is a nice way to prove it using both inclusions with the inclusion $$f(sigma(A)) subseteq sigma(phi(f))$$ sketched in the following way: the author supposes $$lambda in f(sigma(A))$$ and says “it is very obvious” that there exists a vector $$h in H$$ with $$|h|=1$$ such that $$|phi(f)-lambda)h|$$ is arbitrarily small which shows $$lambda in sigma(phi(f))$$ which shows the desired inclusion.
The author says that it is “very obvious” to show this but I am a bit stumped. The way I would construct the continuous functional calculus is to start with polynomials and then generalize to $$C(sigma(A))$$ based on the Weierstrass approximation theorem on the real compact set $$sigma(A)$$ and the BLT theorem. The inclusion $$sigma(phi(f)) subseteq f(sigma(A))$$ is, I think, quite obvious but the other one in the above context has me stumped. Since I am already working on generalizing some results, I would really love to know how the author proves the inclusion with the method of showing the mentioned vector exists. Maybe use approximation in some way, but even though I suspect it is simple, I still do not see the author’s proposed proof. Can someone here please help me recover it? I thank all interested persons.
## proof provenance of funds – I would like to visit the UK in the future. Can someone make sense of my weird bank situation?
My wife and I would like to visit the UK in the future, but I was wondering whether my situation is going to be an issue or not (I would hope not, but you never know).
I am self employed, and I make a nice amount of money working as a contractor. I have two bank accounts: the personal one, and the business one.
The way it works is I can use the funds in my business account same as it were my personal account. There’s no dividend or anything – my government only cares for the taxes I pay as self employed when the time comes. It’s perfectly legal – any money I withdraw doesn’t count as expenses, but anyways.
I usually have a specific day of month (+/- a day) when I transfer a fixed amount of money from the business account to my personal account, which I intend to use as living expenses. Sometimes I have some extra expenses (e.g. unexpected trip to the doctor), which I then again transfer from the business account to the personal one.
I’m wondering if such a setup can make it difficult for me to convince the officer I have enough funds to cover my expenses while in the UK. Can I even use my business account statements as proof of my income?
## graphs – Karger algorithm variation to find s-t cut. proof that it is not possible?
Consider executing a variant of the Karger’s algorithm, in
which each time we choose a uniformly random edge e, conditioned on the two (super) nodes which are
endpoints of e do not contain both s,t and we contract e; in other words, we never merge s,t in the course of the algorithm. We repeat this until only two (super) nodes remain where one contains s and
the other contains t. So, we just output the corresponding s-t cut.
In this exercise we want to show this algorithm fails, i.e., the probability of success is so small that
we cannot turn it into a high probability success even by running polynomially many copies of this
algorithm. Construct a graph G with n vertices such that the above algorithm outputs the min s-t cut
with exponentially small probability, namely c−n for some constant c > 0. For convenience, graph G may
also have parallel edges
## vectors – Proof of orthogonality using Einstein notation
Prove that $$rottextbf{A}$$ is a vector orthogonal to $$textbf{A}$$. First show that $$varepsilon_{ijk}k_jk_k=0$$.
I have no problem showing the second part but I don’t know how to use it in the proof.
I want to prove the orthogonality with scalar product so I should obtain 0 from the equation. So far I have:
$$nabla timestextbf{A} cdot textbf{A} = hat{e_i}a_i(varepsilon_{jkl}hat{e_j}frac{partial}{partial x_k}a_l)=delta_{ij}varepsilon_{jkl}frac{partial}{partial x_k}a_la_i$$
I don’t know what to do after this so that I use the shown property. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 23, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.39241722226142883, "perplexity": 682.2652741958701}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-45/segments/1603107874340.10/warc/CC-MAIN-20201020221156-20201021011156-00230.warc.gz"} |
http://en.wikipedia.org/wiki/GNSS_positioning_calculation | # GNSS positioning calculation
The global navigation satellite system (GNSS) positioning for receiver's position is derived through the calculation steps, or algorithm, given below. In essence, a GNSS receiver measures the transmitting time of GNSS signals emitted from four or more GNSS satellites and these measurements are used to obtain its position (i.e., spatial coordinates) and reception time.
## Calculation steps
1. A global-navigation-satellite-system (GNSS) receiver measures the apparent transmitting time, $\scriptstyle \tilde{t}_i$, or "phase", of GNSS signals emitted from four or more GNSS satellites ($\scriptstyle i \;=\; 1,\, 2,\, 3,\, 4,\, ..,\, n$ ), simultaneously.[1]
2. GNSS satellites broadcast the messages of satellites' ephemeris, $\scriptstyle \boldsymbol{r}_i (t)$, and intrinsic clock bias (i.e., clock advance), $\scriptstyle\delta t_{\text{clock,sv},i} (t)$ as the functions of (atomic) standard time, e.g., GPST.[2]
3. The transmitting time of GNSS satellite signals, $\scriptstyle t_i$, is thus derived from the non-closed-form equations $\scriptstyle \tilde{t}_i \;=\; t_i \,+\, \delta t_{\text{clock},i} (t_i)$ and $\scriptstyle \delta t_{\text{clock},i} (t_i) \;=\; \delta t_{\text{clock,sv},i} (t_i) \,+\, \delta t_{\text{orbit-relativ},\, i} (\boldsymbol{r}_i,\, \dot{\boldsymbol{r}}_i)$, where $\scriptstyle \delta t_{\text{orbit-relativ},i} (\boldsymbol{r}_i,\, \dot{\boldsymbol{r}}_i)$ is the relativistic clock bias, periodically risen from the satellite's orbital eccentricity and Earth's gravity field.[2] The satellite's position and velocity are determined by $\scriptstyle t_i$ as follows: $\scriptstyle \boldsymbol{r}_i \;=\; \boldsymbol{r}_i (t_i)$ and $\scriptstyle \dot{\boldsymbol{r}}_i \;=\; \dot{\boldsymbol{r}}_i (t_i)$.
4. In the field of GNSS, "geometric range", $\scriptstyle r(\boldsymbol{r}_A,\, \boldsymbol{r}_B)$, is defined as straight range from $\scriptstyle\boldsymbol{r}_A$ to $\scriptstyle\boldsymbol{r}_B$ in inertial frame (e.g., Earth Centered Inertial (ECI) one), not in rotating frame.[2]
5. The receiver's position, $\scriptstyle \boldsymbol{r}_{\text{rec}}$, and reception time, $\scriptstyle t_{\text{rec}}$, satisfy the light-cone equation of $\scriptstyle r(\boldsymbol{r}_i,\, \boldsymbol{r}_{\text{rec}}) / c \,+\, (t_i - t_{\text{rec}}) \;=\; 0$ in inertial frame, where $\scriptstyle c$ is the speed of light. The signal transit time is $\scriptstyle -(t_i \,-\, t_{\text{rec}})$.
6. The above is extended to the satellite-navigation positioning equation, $\scriptstyle r(\boldsymbol{r}_i,\, \boldsymbol{r}_{\text{rec}}) / c \,+\, (t_i \,-\, t_{\text{rec}}) \,+\, \delta t_{\text{atmos},i} \,-\, \delta t_{\text{meas-err},i} \;=\; 0$, where $\scriptstyle \delta t_{\text{atmos},i}$ is atmospheric delay (= ionospheric delay + tropospheric delay) along signal path and $\scriptstyle \delta t_{\text{meas-err},i}$ is the measurement error.
7. The Gauss–Newton method can be used to solve the nonlinear least-squares problem for the solution: $\scriptstyle (\hat{\boldsymbol{r}}_{\text{rec}},\, \hat{t}_{\text{rec}}) \;=\; \arg \min \phi ( \boldsymbol{r}_{\text{rec}},\, t_{\text{rec}} )$, where $\scriptstyle \phi ( \boldsymbol{r}_{\text{rec}},\, t_{\text{rec}} ) \;=\; \sum_{i=1}^n ( \delta t_{\text{meas-err},i} / \sigma_{\delta t_{\text{meas-err},i} } )^2$. Note that $\scriptstyle \delta t_{\text{meas-err},i}$ should be regarded as a function of $\scriptstyle \boldsymbol{r}_{\text{rec}}$ and $\scriptstyle t_{\text{rec}}$.
8. The posterior distribution of $\scriptstyle \boldsymbol{r}_{\text{rec}}$ and $\scriptstyle t_{\text{rec}}$ is proportional to $\scriptstyle \exp ( -\frac{1}{2} \phi ( \boldsymbol{r}_{\text{rec}},\, t_{\text{rec}} ) )$, whose mode is $\scriptstyle (\hat{\boldsymbol{r}}_{\text{rec}},\, \hat{t}_{\text{rec}})$. Their inference is formalized as maximum a posteriori estimation.
9. The posterior distribution of $\scriptstyle \boldsymbol{r}_{\text{rec}}$ is proportional to $\scriptstyle \int_{-\infty}^\infty \exp ( -\frac{1}{2} \phi ( \boldsymbol{r}_{\text{rec}},\, t_{\text{rec}} ) ) \, d t_{\text{rec}}$.
## The GPS case
$\scriptstyle \begin{cases} \scriptstyle \Delta t_i (t_i,\, E_i) \;\triangleq\; t_i \,+\, \delta t_{\text{clock},i} (t_i,\, E_i) \,-\, \tilde{t}_i \;=\; 0, \\ \scriptstyle \Delta M_i (t_i,\, E_i) \;\triangleq\; M_i (t_i) \,-\, (E_i \,-\, e_i \sin E_i) \;=\; 0, \end{cases}$
in which $\scriptstyle E_i$ is the orbital eccentric anomaly of satellite $i$, $\scriptstyle M_i$ is the mean anomaly, $\scriptstyle e_i$ is the eccentricity, and $\scriptstyle \delta t_{\text{clock},i} (t_i,\, E_i) \;=\; \delta t_{\text{clock,sv},i} (t_i) \,+\, \delta t_{\text{orbit-relativ},i} (E_i)$.
• The above can be solved by using the bivariate Newton-Raphson method on $\scriptstyle t_i$ and $\scriptstyle E_i$. Two times of iteration will be necessary and sufficient in most cases. Its iterative update will be described by using the approximated inverse of Jacobian matrix as follows:
$\scriptscriptstyle \begin{pmatrix} t_i \\ E_i \\ \end{pmatrix} \leftarrow \begin{pmatrix} t_i \\ E_i \\ \end{pmatrix} - \begin{pmatrix} 1 && 0 \\ \frac{\dot{M}_i (t_i)}{1 - e_i \cos E_i} && -\frac{1}{1 - e_i \cos E_i} \\ \end{pmatrix} \begin{pmatrix} \Delta t_i \\ \Delta M_i \\ \end{pmatrix}$
## The GLONASS case
• The GLONASS ephemerides don't provide clock biases $\scriptstyle\delta t_{\text{clock,sv},i} (t)$, but $\scriptstyle\delta t_{\text{clock},i} (t)$.
## Note
• In the field of GNSS, $\scriptstyle \tilde{r}_i \;=\; -c (\tilde{t}_i \,-\, \tilde{t}_{\text{rec}})$ is called pseudorange, where $\scriptstyle \tilde{t}_{\text{rec}}$ is a provisional reception time of the receiver. $\scriptstyle \delta t_{\text{clock,rec}} \;=\; \tilde{t}_{\text{rec}} \,-\, t_{\text{rec}}$ is called receiver's clock bias (i.e., clock advance).[1]
• Standard GNSS receivers output $\scriptstyle \tilde{r}_i$ and $\scriptstyle \tilde{t}_{\text{rec}}$ per an observation epoch.
• The temporal variation in the relativistic clock bias of satellite is linear if its orbit is circular (and thus its velocity is uniform in inertial frame).
• The signal transit time is expressed as $\scriptstyle -(t_i - t_{\text{rec}}) \;=\; \tilde{r}_i/c \,+\, \delta t_{\text{clock},i} \,-\, \delta t_{\text{clock,rec}}$, whose right side is round-off-error resistive during calculation.
• The geometric range is calculated as $\scriptstyle r(\boldsymbol{r}_i,\, \boldsymbol{r}_{\text{rec}}) \;=\; | \Omega_{\text{E}} (t_i \,-\, t_{\text{rec}}) \boldsymbol{r}_{i,\text{ECEF}} \,-\, \boldsymbol{r}_{\text{rec,ECEF}} |$, where the Earth-centred Earth-fixed (ECEF) rotating frame (e.g., WGS84 or ITRF) is used in the right side and $\scriptstyle \Omega_{\text{E}}$ is the Earth rotating matrix with the argument of the signal transit time.[2] The matrix can be factorized as $\scriptstyle \Omega_{\text{E}} (t_i \,-\, t_{\text{rec}}) \;=\; \Omega_{\text{E}} (\delta t_{\text{clock,rec}}) \Omega_{\text{E}} (-\tilde{r}_i/c \,-\, \delta t_{\text{clock},i})$.
• The line-of-sight unit vector of satellite observed at $\scriptstyle \boldsymbol{r}_{\text{rec,ECEF}}$ is described as: $\scriptstyle \boldsymbol{e}_{i, \text{rec,ECEF}} \;=\; -\frac{\partial r(\boldsymbol{r}_i,\, \boldsymbol{r}_{\text{rec}})}{\partial \boldsymbol{r}_{\text{rec,ECEF}}}$.
• The satellite-navigation positioning equation may be expressed by using the variables $\scriptstyle \boldsymbol{r}_{\text{rec,ECEF}}$ and $\scriptstyle \delta t_{\text{clock,rec}}$.
• The nonlinearity of the vertical dependency of tropospheric delay degrades the convergence efficiency in the Gauss–Newton iterations in step 7.
• The above notation is different from that in the Wikipedia articles, 'Position calculation introduction' and 'Position calculation advanced', of Global Positioning System (GPS).
## References
1. ^ a b Misra, P. and Enge, P., Global Positioning System: Signals, Measurements, and Performance, 2nd, Ganga-Jamuna Press, 2006.
2. The interface specification of NAVSTAR GLOBAL POSITIONING SYSTEM | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 58, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9702921509742737, "perplexity": 1380.0209741944143}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-10/segments/1394010779425/warc/CC-MAIN-20140305091259-00008-ip-10-183-142-35.ec2.internal.warc.gz"} |
http://math.stackexchange.com/questions/127980/calculate-equivalent-x-y-given-x-y-z | # Calculate equivalent (X,Y) given (X,Y,Z)
I'm working on generating a 3D-looking application (in 2D) and am having difficulty generating my graphing points equally. I can only graph in 2D, but want to have a 3D look to it (similar to a FPS-style game).
My question: If I have a 3-dimension point $(X, Y, Z)$, what formula should I use to calculate the adjusted $(X, Y)$ points given my current point of view?
Example: Say I have a point $(-5, 5, 5)$. This would lie in the second quadrant of a standard graph, but if my view is at $(0, 0, 0)$, the point should not appear right at $(-5, 5)$ [in 2D], but slightly lower, and to the right a bit. How do I calculate where this point is located at in terms of $(X, Y)$?
-
There are, of course, libraries that do the work for you.... – Hurkyl Apr 9 '12 at 3:05 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8439911007881165, "perplexity": 258.9647631803068}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-48/segments/1448398454160.51/warc/CC-MAIN-20151124205414-00063-ip-10-71-132-137.ec2.internal.warc.gz"} |
http://physics.stackexchange.com/questions/8479/what-is-highest-water-pressure-at-which-electrolysis-can-be-performed/16564 | # What is highest water pressure at which electrolysis can be performed?
What is highest water pressure at which electrolysis can be performed to derive hydrogen and oxygen? Does the dielectric constant of water, which which lowers as pressure increases, have an effect on this?
- | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8372867107391357, "perplexity": 1843.4627368624072}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-40/segments/1443737958671.93/warc/CC-MAIN-20151001221918-00190-ip-10-137-6-227.ec2.internal.warc.gz"} |
http://aas.org/archives/BAAS/v25n2/aas182/abshtml/S3412.html | \font\twelvesc=cmcsc10 scaled 1200 \let\sc=\twelvesc \def\I.{\kern.2em{\sc i}} \def\II.{\kern.2em{\sc ii}} \def\III.{\kern.2em{\sc iii}}
Contribution from H\II. Regions to [Si\II.] 34.8 $\mu$m Emission
Session 34 -- Airbourne Astronomy
Display presentation, Tuesday, 9:30-6:30, Pauley Room
## [34.12] Contribution from H\II. Regions to [Si\II.] 34.8 $\mu$m Emission
R.H.Rubin (NASA/Ames), R.J.Dufour, D.K.Walter (Rice), M.R.Haas (NASA/Ames), S.D.Lord (IPAC/Caltech)
Soon after the discovery of the [Si\II.] 34.8 $\mu$m line with the facility Cryogenic Grating Spectrometer on the Kuiper Airborne Observatory (KAO) (Haas et~al. 1986, ApJ, 301, L57), it became apparent that the line was stronger than predicted in almost all objects observed. Theoretical expectations are based on predictions of the line intensity from photodissociation region (PDR) models (e.g., Tielens \& Hollenbach 1985, ApJ, 291, 722 and updates). In M82, for instance, a Si/H $\sim$1.3 times solar (Lord et~al.~1993) would be required $-$ a very high value for the ISM. One possible explanation is that there may be significant emission in the H\II. region abutting the PDRs. Generally, the best diagnostics of Si abundance in H\II. regions are Si\III.] 1883, 1892 \AA, because gaseous silicon is predominantly Si$^{++}$. From new and archival high-dispersion IUE spectra including these lnes and a detailed axisymmetric blister" model for Orion, we found Si/H~= $4.5 \times 10^{-6}$ (Rubin, Dufour, \& Walter 1993, ApJ, 413 in press). Compared to solar (Anders \& Grevesse 1989, Geo.Cos.Acta, 53, 197), this corresponds to a Si depletion of $\sim$8, suggesting that most Si resides in dust grains even in the ionized volume.
Our model predicts that only 8\% of the observed [Si\II.]~34.8~$\mu$m emission in Orion arises from the H\II. region. Assuming that the rest comes from the PDR, we find a gas-phase Si/H~= 2.4$\times 10^{-6}$ there $-$ or $\sim$1/2 the value in the ionized gas. A possible conclusion is that some of the dust originally in the molecular cloud is destroyed in the harsher environment of the H\II. region. From a grid of models (Rubin, Hollenbach, \& Lord in prep.), we expect that for other objects such as the nuclei of galaxies (e.g., M82 and the Galactic center) and edge-on H\II. regions significantly offset from their exciting star(s) (e.g., M17SW), there will be a larger fraction of the total [Si\II.]~34.8~$\mu$m coming from the ionized region. Primarily, this is due to a lower average ionizing radiation field compared with nucleon density (lower ionization parameter) than found in star-centered H\II. regions. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8743482232093811, "perplexity": 10070.770723713576}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-18/segments/1429246652296.40/warc/CC-MAIN-20150417045732-00059-ip-10-235-10-82.ec2.internal.warc.gz"} |
https://www.maplesoft.com/support/help/Maple/view.aspx?path=odeadvisor%2Flinear_ODEs | Solving Linear ODEs - Maple Programming Help
Home : Support : Online Help : Mathematics : Differential Equations : Classifying ODEs : High Order : odeadvisor/linear_ODEs
Solving Linear ODEs
Description
• The general form of the linear ODE is given by:
$\mathrm{linear_ODE}≔{A}_{0}y\left(x\right)+{A}_{1}\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)+{A}_{2}\left(\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)\right)+\mathrm{...}=F\left(x\right)$
where the coefficients ${A}_{n}$ can be functions of $x$, see Differentialgleichungen, by E. Kamke, p. 69. Roughly speaking, there is no general method for solving the most general linear ODE of differential order greater than one. However, this is an active research area and there are many solving schemes which are applicable when the linear ODE satisfies certain conditions. In all the cases, if the method is applicable and the ODE is of second order, the ODE can be integrated to the end; otherwise, its order can be reduced by one or more, depending on the case. A summary of the methods implemented in dsolve for linear ODEs is as follows:
– the ODE is exact (see odeadvisor, exact_linear);
– the coefficients ${A}_{n}$ are rational functions and the ODE has exponential solutions (see DEtools, expsols);
– the ODE has liouvillian solutions (see DEtools, kovacicsols);
– the ODE has three regular singular points (see DEtools, RiemannPsols).
– the ODE has simple symmetries of the form $\left[0,F\left(x\right)\right]$ (see odeadvisor, sym_Fx);
– the ODE has special functions" solutions (see odeadvisor, classifications for second order ODEs).
Examples
The most general exact linear non-homogeneous ODE of second order; this case is solvable (see odeadvisor, exact_linear):
> $\mathrm{with}\left(\mathrm{DEtools},\mathrm{odeadvisor}\right)$
$\left[{\mathrm{odeadvisor}}\right]$ (1)
> $\mathrm{ode1}≔\frac{ⅆ}{ⅆx}\left(\frac{ⅆ}{ⅆx}y\left(x\right)=A\left(x\right)y\left(x\right)+B\left(x\right)\right)$
${\mathrm{ode1}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}{}{y}{}\left({x}\right){=}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{A}{}\left({x}\right)\right){}{y}{}\left({x}\right){+}{A}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){+}\frac{{ⅆ}}{{ⅆ}{x}}{}{B}{}\left({x}\right)$ (2)
> $\mathrm{odeadvisor}\left(\mathrm{ode1},y\left(x\right)\right)$
$\left[\left[{\mathrm{_2nd_order}}{,}{\mathrm{_exact}}{,}{\mathrm{_linear}}{,}{\mathrm{_nonhomogeneous}}\right]\right]$ (3)
> $\mathrm{dsolve}\left(\mathrm{ode1},y\left(x\right)\right)$
${y}{}\left({x}\right){=}\left({\mathrm{_C2}}{+}{∫}\left({\mathrm{_C1}}{+}{B}{}\left({x}\right)\right){}{{ⅇ}}^{{∫}\left({-}{A}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{{ⅇ}}^{{-}\left({∫}\left({-}{A}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)}$ (4)
Exponential solutions for a third order linear ODE .
> $\mathrm{ode2}≔\left({x}^{2}+x\right)\left(\frac{{ⅆ}^{3}}{ⅆ{x}^{3}}y\left(x\right)\right)-\left({x}^{2}-2\right)\left(\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)\right)-\left(x+2\right)\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)=0$
${\mathrm{ode2}}{≔}\left({{x}}^{{2}}{+}{x}\right){}\left(\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}{}{y}{}\left({x}\right)\right){-}\left({{x}}^{{2}}{-}{2}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}{}{y}{}\left({x}\right)\right){-}\left({x}{+}{2}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){=}{0}$ (5)
> $\mathrm{dsolve}\left(\mathrm{ode2}\right)$
${y}{}\left({x}\right){=}{\mathrm{_C1}}{+}{\mathrm{_C2}}{}{\mathrm{ln}}{}\left({x}\right){+}{\mathrm{_C3}}{}{{ⅇ}}^{{x}}$ (6)
An example of an ODE with regular singular points
> $\mathrm{ode3}≔x\left(1-x\right)\left(\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)\right)+\left(c-\left(a+b+1\right)x\right)\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)-aby\left(x\right)$
${\mathrm{ode3}}{≔}{x}{}\left({1}{-}{x}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}{}{y}{}\left({x}\right)\right){+}\left({c}{-}\left({a}{+}{b}{+}{1}\right){}{x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){-}{a}{}{b}{}{y}{}\left({x}\right)$ (7)
> $\mathrm{dsolve}\left(\mathrm{ode3}\right)$
${y}{}\left({x}\right){=}{\mathrm{_C1}}{}{\mathrm{hypergeom}}{}\left(\left[{a}{,}{b}\right]{,}\left[{c}\right]{,}{x}\right){+}{\mathrm{_C2}}{}{{x}}^{{-}{c}{+}{1}}{}{\mathrm{hypergeom}}{}\left(\left[{b}{-}{c}{+}{1}{,}{a}{-}{c}{+}{1}\right]{,}\left[{2}{-}{c}\right]{,}{x}\right)$ (8)
An example for which symmetries of the form $\left[0,F\left(x\right)\right]$ can be found (see odeadvisor, sym_Fx)
> $\mathrm{ode4}≔\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)=\mathrm{ln}\left(x\right)\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)+y\left(x\right)\left(1+\mathrm{ln}\left(x\right)\right)$
${\mathrm{ode4}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}{}{y}{}\left({x}\right){=}{\mathrm{ln}}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){+}{y}{}\left({x}\right){}\left({1}{+}{\mathrm{ln}}{}\left({x}\right)\right)$ (9)
> $\mathrm{odeadvisor}\left(\mathrm{ode4}\right)$
$\left[\left[{\mathrm{_2nd_order}}{,}{\mathrm{_with_linear_symmetries}}\right]{,}\left[{\mathrm{_2nd_order}}{,}{\mathrm{_linear}}{,}{\mathrm{_with_symmetry_\left[0,F\left(x\right)\right]}}\right]\right]$ (10)
> $\mathrm{dsolve}\left(\mathrm{ode4}\right)$
${y}{}\left({x}\right){=}\left(\left({∫}\frac{{{x}}^{{x}}}{{{ⅇ}}^{{x}}{}{\left({{ⅇ}}^{{-}{x}}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{_C1}}{+}{\mathrm{_C2}}\right){}{{ⅇ}}^{{-}{x}}$ (11)
Some ODEs with special function solutions (see odeadvisor, second order ODEs).
Bessel ODE.
> $\mathrm{ode5}≔{x}^{2}\left(\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)\right)+x\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)+\left({x}^{2}-{n}^{2}\right)y\left(x\right)=0$
${\mathrm{ode5}}{≔}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}{}{y}{}\left({x}\right)\right){}{{x}}^{{2}}{+}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){}{x}{+}\left({-}{{n}}^{{2}}{+}{{x}}^{{2}}\right){}{y}{}\left({x}\right){=}{0}$ (12)
> $\mathrm{odeadvisor}\left(\mathrm{ode5}\right)$
$\left[{\mathrm{_Bessel}}\right]$ (13)
> $\mathrm{dsolve}\left(\mathrm{ode5}\right)$
${y}{}\left({x}\right){=}{\mathrm{_C1}}{}{\mathrm{BesselJ}}{}\left({n}{,}{x}\right){+}{\mathrm{_C2}}{}{\mathrm{BesselY}}{}\left({n}{,}{x}\right)$ (14)
Complete Elliptic Integral ODE.
> $\mathrm{ode6}≔\frac{ⅆ}{ⅆx}\left(x\left(1-{x}^{2}\right)\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)\right)-xy\left(x\right)=0$
${\mathrm{ode6}}{≔}\left({-}{{x}}^{{2}}{+}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){-}{2}{}{{x}}^{{2}}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){+}{x}{}\left({-}{{x}}^{{2}}{+}{1}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}{}{y}{}\left({x}\right)\right){-}{x}{}{y}{}\left({x}\right){=}{0}$ (15)
> $\mathrm{odeadvisor}\left(\mathrm{ode6}\right)$
$\left[\left[{\mathrm{_elliptic}}{,}{\mathrm{_class_I}}\right]\right]$ (16)
> $\mathrm{dsolve}\left(\mathrm{ode6}\right)$
${y}{}\left({x}\right){=}{\mathrm{_C1}}{}{\mathrm{EllipticK}}{}\left({x}\right){+}{\mathrm{_C2}}{}{\mathrm{EllipticCK}}{}\left({x}\right)$ (17)
Gegenbauer ODE.
> $\mathrm{ode7}≔\left({x}^{2}-1\right)\left(\frac{ⅆ}{ⅆx}\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)\right)-\left(2m+3\right)x\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)+\mathrm{λ}y\left(x\right)=0$
${\mathrm{ode7}}{≔}\left({{x}}^{{2}}{-}{1}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}{}{y}{}\left({x}\right)\right){-}\left({2}{}{m}{+}{3}\right){}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){+}{\mathrm{λ}}{}{y}{}\left({x}\right){=}{0}$ (18)
> $\mathrm{odeadvisor}\left(\mathrm{ode7}\right)$
$\left[{\mathrm{_Gegenbauer}}\right]$ (19)
> $\mathrm{dsolve}\left(\mathrm{ode7}\right)$
${y}{}\left({x}\right){=}{\mathrm{_C1}}{}{\left({{x}}^{{2}}{-}{1}\right)}^{\frac{{5}}{{4}}{+}\frac{{1}}{{2}}{}{m}}{}{\mathrm{LegendreP}}{}\left(\sqrt{{{m}}^{{2}}{-}{\mathrm{λ}}{+}{4}{}{m}{+}{4}}{-}\frac{{1}}{{2}}{,}\frac{{5}}{{2}}{+}{m}{,}{x}\right){+}{\mathrm{_C2}}{}{\left({{x}}^{{2}}{-}{1}\right)}^{\frac{{5}}{{4}}{+}\frac{{1}}{{2}}{}{m}}{}{\mathrm{LegendreQ}}{}\left(\sqrt{{{m}}^{{2}}{-}{\mathrm{λ}}{+}{4}{}{m}{+}{4}}{-}\frac{{1}}{{2}}{,}\frac{{5}}{{2}}{+}{m}{,}{x}\right)$ (20) | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 46, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9923981428146362, "perplexity": 1154.2660040676087}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-09/segments/1518891812247.50/warc/CC-MAIN-20180218173208-20180218193208-00076.warc.gz"} |
https://byjus.com/physics/p-n-junction/ | # P-N Junction
## What is a P-N Junction?
Definition: A p-n junction is an interface or a boundary between two semiconductor material types, namely the p-type and the n-type, inside a semiconductor.
The p-side or the positive side of the semiconductor has an excess of holes and the n-side or the negative side has an excess of electrons. In a semiconductor, the p-n junction is created by the method of doping. The process of doping is explained in further details in the next section.
### Formation of P-N Junction
As we know, if we use different semiconductor materials to make a p-n junction, there will be a grain boundary that would inhibit the movement of electrons from one side to the other by scattering the electrons and holes and thus we use the process of doping. We will understand the process of doping with the help of this example. Let us consider a thin p-type silicon semiconductor sheet. If we add a small amount of pentavalent impurity to this, a part of the p-type Si will get converted to n-type silicon. This sheet will now contain both p-type region and n-type region and a junction between these two regions. The processes that follow after the formation of a p-n junction are of two types – diffusion and drift. As we know, there is a difference in the concentration of holes and electrons at the two sides of a junction, the holes from the p-side diffuse to the n-side and the electrons from the n-side diffuse to the p-side. This gives rise to a diffusion current across the junction.
Also, when an electron diffuses from the n-side to the p-side, an ionized donor is left behind on the n-side, which is immobile. As the process goes on, a layer of positive charge is developed on the n-side of the junction. Similarly, when a hole goes from the p-side to the n-side, an ionized acceptor is left behind in the p-side, resulting in the formation of a layer of negative charges in the p-side of the junction. This region of positive charge and negative charge on either side of the junction is termed as the depletion region. Due to this positive space charge region on either side of the junction, an electric field direction from positive charge towards the negative charge is developed. Due to this electric field, an electron on the p-side of the junction moves to the n-side of the junction. This motion is termed as the drift. Here, we see that the direction of drift current is opposite to that of the diffusion current.
## Forward Bias
When the p-type is connected to the positive terminal of the battery and the n-type to the negative terminal then the p-n junction is said to be forward biased. When the p-n junction is forward biased, the built-in electric field at the p-n junction and the applied electric field are in opposite directions. When both the electric fields add up the resultant electric field has a magnitude lesser than the built-in electric field. This results in a less resistive and thinner depletion region. The depletion region’s resistance becomes negligible when the applied voltage is large. In silicon, at the voltage of 0.6 V, the resistance of the depletion region becomes completely negligible and the current flows across it unimpeded.
## Reverse Bias
When the p-type is connected to the negative terminal of the battery and the n-type is connected to the positive side then the p-n junction is said to be reverse biased. In this case, the built-in electric field and the applied electric field are in the same direction. When the two fields are added, the resultant electric field is in the same direction as the built-in electric field creating a more resistive, thicker depletion region. The depletion region becomes more resistive and thicker if the applied voltage becomes larger.
## P-N Junction Formula
The formula used in the p-n junction depends upon the built-in potential difference created by the electric field is given as:
$E_{0}=V_{T}ln[\frac{N_{D}.N_{A}}{n_{i}^{2}}]$
Where,
• E0 is the zero bias junction voltage
• VT is the thermal voltage of 26mV at room temperature
• ND and NA are the impurity concentrations
• ni is the intrinsic concentration.
Physics Related Articles
### p-n Junction Questions & FAQs
Q1. Explain p-n junction
Ans: It is the contact surface between the p-type and n-type semiconductor.
Q2. What happens when the battery voltage is increased in a forward biased p-n junction?
Ans: The current through the junction increases when the battery voltage is increased in a forward biased p-n junction.
Q3. What happens when a p-n junction is reverse biased?
Ans: The holes and electrons tend to move away from the junction.
Q4. When is a p-n junction said to be forward biased?
Ans: When the positive terminal of the battery is connected to the p-side and the negative terminal is connected to the n-side.
Q5. What are the two breakdown mechanisms of p-n junction?
Ans: The two breakdown mechanism:
• Zener breakdown
• Avalanche breakdown
Q6. What is zener breakdown?
Ans: Zener breakdown occurs when the p-n junction is highly doped under reverse biased condition.
Q7. What is avalanche breakdown?
Ans: Avalanche breakdown occurs when the p-n junction is lightly doped under reverse biased condition.
Q8. What is static resistance of a diode?
Ans: Static resistance of a diode is defined as the ratio of the DC voltage applied across the diode to the DC current flowing through the diode.
Q9. What is the dynamic resistance of a diode?
Ans: Dynamic resistance of a diode is defined as the ratio of change in voltage to the change in current.
Q10. What is reverse resistance?
Ans: Reverse resistance is defined as the resistance offered by the p-n junction diode when it is reverse biased.
Stay tuned with BYJU’S to learn more physics concepts with the help of engaging video lessons.
#### Practise This Question
Two lenses with powers; 2D & -4D are kept together. What is the effective focal length of the combination? | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7641793489456177, "perplexity": 421.56893229715064}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-26/segments/1560628000164.31/warc/CC-MAIN-20190626033520-20190626055520-00316.warc.gz"} |
https://www.physicsforums.com/threads/rotational-kinetic-energy.310497/ | # Rotational Kinetic Energy
• Thread starter unteng10
• Start date
• #1
10
0
## Homework Statement
A skater spins with an angular speed of 17.4 rad/s with his arms outstretched. He lowers his arms, decreasing his moment of inertia from 43 kg/m^2 to 37 kg/m^2. Calculate his initial and final rotational kinetic energy.
## Homework Equations
L=I$$\omega$$
KE=1/2I$$\omega$$^2
## The Attempt at a Solution
Not sure if im on the right track here, for initial kinetic energy I came up with 3.53 J. I manipulated L=I$$\omega$$ to get $$\omega$$=L/I to find my angular velocity. Then plugged that in the KE=(1/2)(43 kg/m^2)(.405^2) to get 3.53 J. Did I do this correctly?
## Answers and Replies
Related Introductory Physics Homework Help News on Phys.org
• #2
rl.bhat
Homework Helper
4,433
5
A skater spins with an angular speed of 17.4 rad/s
This is not the angular momentum L, but is is the angular velocity w.
• #3
10
0
Okay, so the speed would be $$\omega$$?
• #4
rl.bhat
Homework Helper
4,433
5
Okay, so the speed would be $$\omega$$?
Yes. Angular speed is w.
• Last Post
Replies
2
Views
2K
• Last Post
Replies
5
Views
2K
• Last Post
Replies
0
Views
2K
• Last Post
Replies
2
Views
500
• Last Post
Replies
1
Views
2K
• Last Post
Replies
7
Views
595
• Last Post
Replies
5
Views
2K
• Last Post
Replies
10
Views
2K | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9527972936630249, "perplexity": 7166.855066801102}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-10/segments/1581875143635.54/warc/CC-MAIN-20200218055414-20200218085414-00113.warc.gz"} |
http://www.chegg.com/homework-help/questions-and-answers/slide-41-meters-long-makes-angle-35-ground-nearest-tenth-meter-far-ground-slide-q3630736 | A slide 4.1 meters long makes an angle of 35° with the ground. To the nearest tenth of a meter, how far above the ground is the top of the slide?
• Anonymous commented | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9798009991645813, "perplexity": 602.4498034066341}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2013-20/segments/1368698222543/warc/CC-MAIN-20130516095702-00028-ip-10-60-113-184.ec2.internal.warc.gz"} |
http://www.mathnet.ru/php/archive.phtml?wshow=paper&jrnid=ufa&paperid=178&option_lang=eng | RUS ENG JOURNALS PEOPLE ORGANISATIONS CONFERENCES SEMINARS VIDEO LIBRARY PERSONAL OFFICE
General information Latest issue Archive Impact factor Search papers Search references RSS Latest issue Current issues Archive issues What is RSS
Ufimsk. Mat. Zh.: Year: Volume: Issue: Page: Find
Ufimsk. Mat. Zh., 2012, Volume 4, Issue 4, Pages 162–178 (Mi ufa178)
Straightening expansions of gas from vortex with linear velocity field
Yu. V. Yulmukhametovaab
a Ufa State Aviation Technical University, Ufa, Russia
b Institute of Mechanics, Ufa Centre of the Russian Academy of Sciences, Ufa, Russia
Abstract: In this paper we consider a submodel of the gas with a linear velocity field. It is formed by a system of nonlinear differential equations with initial data. Several first integrals of the system are obtained. As a result the order of the system is reduced. For special initial data of the problem, an approximate solution of differential equations of the submodel is obtained. Such solutions correspond to world lines describing the radial expansion of the gas particles from the vortex. Trajectories of motion of gas particles are constructed.
Keywords: gas dynamics, submodel, approximate solution, the radial expansion.
Full text: PDF file (307 kB)
References: PDF file HTML file
Document Type: Article
UDC: 533+517.958
Citation: Yu. V. Yulmukhametova, “Straightening expansions of gas from vortex with linear velocity field”, Ufimsk. Mat. Zh., 4:4 (2012), 162–178
Citation in format AMSBIB
\Bibitem{Yul12} \by Yu.~V.~Yulmukhametova \paper Straightening expansions of gas from vortex with linear velocity field \jour Ufimsk. Mat. Zh. \yr 2012 \vol 4 \issue 4 \pages 162--178 \mathnet{http://mi.mathnet.ru/ufa178} | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.312237024307251, "perplexity": 10038.94629010536}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-30/segments/1563195527196.68/warc/CC-MAIN-20190721185027-20190721211027-00488.warc.gz"} |
https://learn.careers360.com/ncert/question-diagram-of-the-adjacent-picture-frame-has-outer-dimensions-equal-to-24-cm-multiply-28-cm-and-inner-dimensions-16-cm-multipy-20-cm-find-the-area-of-each-section-of-the-frame-if-the-width-of-each-section-is-same/ | 11 Diagram of the adjacent picture frame has outer dimensions $= 24 cm \times 28 cm$ and inner dimensions $16 cm \times 20 cm$. Find the area of each section of the frame, if the width of each section is same.
D Devendra Khairwa
Area of opposite sections will be same.
So area of horizontal sections,
$=\frac{1}{2}\times4(16+24) = 2(40) = 80\ cm^2$
And area of vertical sections,
$= \frac{1}{2}\times8(20+28) = 4(48) = 96\ cm^2$
Exams
Articles
Questions | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 4, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.997986376285553, "perplexity": 3169.2665038434575}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-16/segments/1585371609067.62/warc/CC-MAIN-20200405181743-20200405212243-00003.warc.gz"} |
https://www.r-bloggers.com/large-integers-in-r-fibonacci-number-with-1000-digits-euler-problem-25/ | [This article was first published on The Devil is in the Data, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
The Fibonacci Sequence occurs in nature: The nautilus shell.
Euler Problem 25 takes us back to the Fibonacci sequence and the problems related to working with very large integers.
The Fibonacci sequence follows a simple mathematical rule but it can create things of great beauty. This pattern occurs quite often in nature, like to nautilus shell shown in the image. The video by Arthur Benjamin at the end of this post illustrates some of the magic of this sequence.
## Large Integers in R
By default, numbers with more than 7 digits are shown in scientific notation in R, which reduces the accuracy of the calculation. You can change the precision of large integers with the options function but R struggles with integers with more than 22 digits. This example illustrates this issue.
```factorial(24)
[1] 6.204484e+23
> options(digits=22)
> factorial(24)
[1] 620448401733239409999872
```
However, finding a number of 1000 digits is a problem with using special functions.
## Euler Problem 25 Definition
The Fibonacci sequence is defined by the recurrence relation:
$F_n = F_{n-1} + F_{n-2}$, where $F_1 = 1$ and $F_2 = 1$. The 12th term, $F_{12}$, is the first term to contain three digits.
What is the index of the first term in the Fibonacci sequence to contain 1000 digits?
## Proposed Solutions
The first solution uses the GMP library to manage very large integers. This library also contains a function to generate Fibonacci numbers. This solution cycles through the Fibonacci sequence until it finds a number with 1000 digits.
```library(gmp) # GNU Multiple Precision Arithmetic Library
n <- 1
fib <- 1
while (nchar(as.character(fib)) < 1000) {
fib <- fibnum(n) # Determine next Fibonacci number
n <- n + 1
}
```
This is a very fast solution but my aim is to solve the first 100 Project Euler problems using only base-R code. The big.add function I developed to solve Euler Problem 13.
```t <- proc.time()
fib <- 1 # First Fibonaci number
cur <- 1 # Current number in sequence
pre <- 1 # Previous number in sequence
index <- 2
while (nchar(fib) < 1000) {
fib <- big.add(cur, pre) # Determine next Fibonacci number
pre <- cur
cur <- fib
index <- index + 1
}
```
This code is much slower than the GMP library but is was fun to develop.
## The Magic of the Fibonacci Numbers
The post Large integers in R: Fibonacci number with 1000 digits, Euler Problem 25 appeared first on The Devil is in the Data. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 8, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4395895004272461, "perplexity": 561.5409274600912}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-29/segments/1593657131734.89/warc/CC-MAIN-20200712051058-20200712081058-00177.warc.gz"} |
https://asmedigitalcollection.asme.org/FEDSM/proceedings-abstract/FEDSM2009/43727/555/346548 | In the design of slurry transport equipment, the effects of solid particle concentration on hydraulic performance and wear have to be considered. This study involves examining the acoustic properties of slurry flows such as velocity, backscatter and attenuation as a function of volume fraction of solid particles. Ultrasound A-mode imaging method is developed to obtain particle concentration in a flow of soda lime glass particles (diameter of 200 micron) and water slurry in a 1 diameter pipe. Based on the acoustic properties of the slurry a technique is developed to measure local solid particle concentrations. The technique is used to obtain concentration profiles in homogeneous (vertical flow) and non-homogeneous (horizontal flow) slurry flows with solid particle concentrations ranging from 1–10% by volume. The algorithm developed utilizes the power spectrum and attenuation measurements obtained from the homogeneous loop as calibration data in order to obtain concentration profiles in other (i.e. non-homogenous) flow regimes. A computational study using FLUENT was performed and a comparison is made with the experimental results. A reasonable agreement between the experimental and computational results is observed.
This content is only available via PDF. | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.80066978931427, "perplexity": 1206.505877838336}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-31/segments/1627046153860.57/warc/CC-MAIN-20210729140649-20210729170649-00219.warc.gz"} |
https://en.m.wikipedia.org/wiki/Speed | # Speed
In everyday use and in kinematics, the speed of an object is the magnitude of its velocity (the rate of change of its position); it is thus a scalar quantity.[1] The average speed of an object in an interval of time is the distance travelled by the object divided by the duration of the interval;[2] the instantaneous speed is the limit of the average speed as the duration of the time interval approaches zero.
Speed
Speed can be thought of as the rate at which an object covers distance. A fast-moving object has a high speed and covers a relatively large distance in a given amount of time, while a slow-moving object covers a relatively small amount of distance in the same amount of time.
Common symbols
v
SI unit m/s, m s−1
Speed has the dimensions of distance divided by time. The SI unit of speed is the metre per second, but the most common unit of speed in everyday usage is the kilometre per hour or, in the US and the UK, miles per hour. For air and marine travel the knot is commonly used.
The fastest possible speed at which energy or information can travel, according to special relativity, is the speed of light in a vacuum c = 299792458 metres per second (approximately 1079000000 km/h or 671000000 mph). Matter cannot quite reach the speed of light, as this would require an infinite amount of energy. In relativity physics, the concept of rapidity replaces the classical idea of speed.
## DefinitionEdit
### Historical definitionEdit
Italian physicist Galileo Galilei is usually credited with being the first to measure speed by considering the distance covered and the time it takes. Galileo defined speed as the distance covered per unit of time.[3] In equation form, this is
${\displaystyle v={\frac {d}{t}},}$
where ${\displaystyle v}$ is speed, ${\displaystyle d}$ is distance, and ${\displaystyle t}$ is time. A cyclist who covers 30 metres in a time of 2 seconds, for example, has a speed of 15 metres per second. Objects in motion often have variations in speed (a car might travel along a street at 50 km/h, slow to 0 km/h, and then reach 30 km/h).
### Instantaneous speedEdit
Speed at some instant, or assumed constant during a very short period of time, is called instantaneous speed. By looking at a speedometer, one can read the instantaneous speed of a car at any instant.[3] A car travelling at 50 km/h generally goes for less than one hour at a constant speed, but if it did go at that speed for a full hour, it would travel 50 km. If the vehicle continued at that speed for half an hour, it would cover half that distance (25 km). If it continued for only one minute, it would cover about 833 m.
In mathematical terms, the instantaneous speed ${\displaystyle v}$ is defined as the magnitude of the instantaneous velocity ${\displaystyle {\boldsymbol {v}}}$ , that is, the derivative of the position ${\displaystyle {\boldsymbol {r}}}$ with respect to time:[2][4]
${\displaystyle v=\left|{\boldsymbol {v}}\right|=\left|{\dot {\boldsymbol {r}}}\right|=\left|{\frac {d{\boldsymbol {r}}}{dt}}\right|\,.}$
If ${\displaystyle s}$ is the length of the path (also known as the distance) travelled until time ${\displaystyle t}$ , the speed equals the time derivative of ${\displaystyle s}$ :[2]
${\displaystyle v={\frac {ds}{dt}}.}$
In the special case where the velocity is constant (that is, constant speed in a straight line), this can be simplified to ${\displaystyle v=s/t}$ . The average speed over a finite time interval is the total distance travelled divided by the time duration.
### Average speedEdit
Different from instantaneous speed, average speed is defined as the total distance covered divided by the time interval. For example, if a distance of 80 kilometres is driven in 1 hour, the average speed is 80 kilometres per hour. Likewise, if 320 kilometres are travelled in 4 hours, the average speed is also 80 kilometres per hour. When a distance in kilometres (km) is divided by a time in hours (h), the result is in kilometres per hour (km/h). Average speed does not describe the speed variations that may have taken place during shorter time intervals (as it is the entire distance covered divided by the total time of travel), and so average speed is often quite different from a value of instantaneous speed.[3] If the average speed and the time of travel are known, the distance travelled can be calculated by rearranging the definition to
${\displaystyle d={\boldsymbol {\bar {v}}}t\,.}$
Using this equation for an average speed of 80 kilometres per hour on a 4-hour trip, the distance covered is found to be 320 kilometres.
Expressed in graphical language, the slope of a tangent line at any point of a distance-time graph is the instantaneous speed at this point, while the slope of a chord line of the same graph is the average speed during the time interval covered by the chord.
### Tangential speedEdit
Linear speed is the distance travelled per unit of time, while tangential speed (or tangential velocity) is the linear speed of something moving along a circular path.[5] A point on the outside edge of a merry-go-round or turntable travels a greater distance in one complete rotation than a point nearer the center. Travelling a greater distance in the same time means a greater speed, and so linear speed is greater on the outer edge of a rotating object than it is closer to the axis. This speed along a circular path is known as tangential speed because the direction of motion is tangent to the circumference of the circle. For circular motion, the terms linear speed and tangential speed are used interchangeably, and both use units of m/s, km/h, and others.
Rotational speed (or angular speed) involves the number of revolutions per unit of time. All parts of a rigid merry-go-round or turntable turn about the axis of rotation in the same amount of time. Thus, all parts share the same rate of rotation, or the same number of rotations or revolutions per unit of time. It is common to express rotational rates in revolutions per minute (RPM) or in terms of the number of "radians" turned in a unit of time. There are little more than 6 radians in a full rotation (2π radians exactly). When a direction is assigned to rotational speed, it is known as rotational velocity or angular velocity. Rotational velocity is a vector whose magnitude is the rotational speed.
Tangential speed and rotational speed are related: the greater the RPMs, the larger the speed in metres per second. Tangential speed is directly proportional to rotational speed at any fixed distance from the axis of rotation.[5] However, tangential speed, unlike rotational speed, depends on radial distance (the distance from the axis). For a platform rotating with a fixed rotational speed, the tangential speed in the centre is zero. Towards the edge of the platform the tangential speed increases proportional to the distance from the axis.[6] In equation form:
${\displaystyle v\propto \!\,r\omega \,,}$
where v is tangential speed and ω (Greek letter omega) is rotational speed. One moves faster if the rate of rotation increases (a larger value for ω), and one also moves faster if movement farther from the axis occurs (a larger value for r). Move twice as far from the rotational axis at the centre and you move twice as fast. Move out three times as far and you have three times as much tangential speed. In any kind of rotating system, tangential speed depends on how far you are from the axis of rotation.
When proper units are used for tangential speed v, rotational speed ω, and radial distance r, the direct proportion of v to both r and ω becomes the exact equation
${\displaystyle v=r\omega \,.}$
Thus, tangential speed will be directly proportional to r when all parts of a system simultaneously have the same ω, as for a wheel, disk, or rigid wand.
## UnitsEdit
Units of speed include:
Conversions between common units of speed
m/s km/h mph knot ft/s
1 m/s = 1 3.6 2.236936 1.943844 3.280840
1 km/h = 0.277778 1 0.621371 0.539957 0.911344
1 mph = 0.44704 1.609344 1 0.868976 1.466667
1 knot = 0.514444 1.852 1.150779 1 1.687810
1 ft/s = 0.3048 1.09728 0.681818 0.592484 1
(Values in bold face are exact.)
## Examples of different speedsEdit
Speed m/s ft/s km/h mph Notes
Approximate rate of continental drift 0.00000001 0.00000003 0.00000004 0.00000002 4 cm/year. Varies depending on location.
Speed of a common snail 0.001 0.003 0.004 0.002 1 millimetre per second
A brisk walk 1.7 5.5 6.1 3.8
A typical road cyclist 4.4 14.4 16 10 Varies widely by person, terrain, bicycle, effort, weather
A fast martial arts kick 7.7 25.2 27.7 17.2 Fastest kick recorded at 130 milliseconds from floor to target at 1 meter distance. Average velocity speed across kick duration[7]
Sprint runners 12.2 40 43.92 27 Usain Bolt's 100 metres world record.
Approximate average speed of road cyclists 12.5 41.0 45 28 On flat terrain, will vary
Typical suburban speed limit in most of the world 13.8 45.3 50 30
Taipei 101 observatory elevator 16.7 54.8 60.6 37.6 1010 m/min
Typical rural speed limit 24.6 80.66 88.5 56
British National Speed Limit (single carriageway) 26.8 88 96.56 60
Category 1 hurricane 33 108 119 74 Minimum sustained speed over 1 minute
Speed limit on a French autoroute 36.1 118 130 81
Highest recorded human-powered speed 37.02 121.5 133.2 82.8 Sam Whittingham in a recumbent bicycle[8]
Muzzle velocity of a paintball marker 90 295 320 200
Cruising speed of a Boeing 747-8 passenger jet 255 836 917 570 Mach 0.85 at 35000 ft (10668 m) altitude
The official land speed record 341.1 1119.1 1227.98 763
The speed of sound in dry air at sea-level pressure and 20 °C 343 1125 1235 768 Mach 1 by definition. 20 °C = 293.15 kelvins.
Muzzle velocity of a 7.62x39mm cartridge 710 2330 2600 1600 The 7.62×39mm round is a rifle cartridge of Soviet origin
Official flight airspeed record for jet engined aircraft 980 3215 3530 2194 Lockheed SR-71 Blackbird
Space shuttle on re-entry 7800 25600 28000 17,500
Escape velocity on Earth 11200 36700 40000 25000 11.2 km·s−1
Voyager 1 relative velocity to the Sun in 2013 17000 55800 61200 38000 Fastest heliocentric recession speed of any humanmade object.[9] (11 mi/s)
Average orbital speed of planet Earth around the Sun 29783 97713 107218 66623
The fastest recorded speed of the Helios probes. 70,220 230,381 252,792 157,078 Recognized as the fastest speed achieved by a man-made spacecraft, achieved in solar orbit.
Speed of light in vacuum (symbol c) 299792458 983571056 1079252848 670616629 Exactly 299792458 m/s, by definition of the metre
## PsychologyEdit
According to Jean Piaget, the intuition for the notion of speed in humans precedes that of duration, and is based on the notion of outdistancing.[10] Piaget studied this subject inspired by a question asked to him in 1928 by Albert Einstein: "In what order do children acquire the concepts of time and speed?"[11] Children's early concept of speed is based on "overtaking", taking only temporal and spatial orders into consideration, specifically: "A moving object is judged to be more rapid than another when at a given moment the first object is behind and a moment or so later ahead of the other object."[12]
## ReferencesEdit
1. ^ Wilson, Edwin Bidwell (1901). Vector analysis: a text-book for the use of students of mathematics and physics, founded upon the lectures of J. Willard Gibbs. p. 125. This is the likely origin of the speed/velocity terminology in vector physics.
2. ^ a b c Elert, Glenn. "Speed & Velocity". The Physics Hypertextbook. Retrieved 8 June 2017.
3. ^ a b c Hewitt (2006), p. 42
4. ^ "IEC 60050 - Details for IEV number 113-01-33: "speed"". Electropedia: The World's Online Electrotechnical Vocabulary. Retrieved 2017-06-08.
5. ^ a b Hewitt (2006), p. 131
6. ^ Hewitt (2006), p. 132
7. ^ http://www.kickspeed.com.au/Improve-measure-kicking-speed.html
8. ^ http://www.wisil.recumbents.com/wisil/whpsc2009/results.htm
9. ^ Darling, David. "Fastest Spacecraft". Retrieved August 19, 2013.
10. ^ Jean Piaget, Psychology and Epistemology: Towards a Theory of Knowledge, The Viking Press, pp. 82–83 and pp. 110–112, 1973. SBN 670-00362-x
11. ^ Siegler, Robert S.; Richards, D. Dean (1979). "Development of Time, Speed, and Distance Concepts" (PDF). Developmental Psychology. 15 (3): 288–298. doi:10.1037/0012-1649.15.3.288.
12. ^ Rod Parker-Rees and Jenny William, eds. (2006). Early Years Education: Histories and Traditions, Volume 1. Taylor & Francis. p. 164. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 16, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8882300853729248, "perplexity": 1016.4047238593465}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-43/segments/1508187823731.36/warc/CC-MAIN-20171020044747-20171020064747-00012.warc.gz"} |
http://physics.stackexchange.com/questions/31451/adding-rotation-to-internal-coordinates/31743 | I'm optimizing the geometry of a system composed of several interacting masses (a molecule). The energy of the system depends on the relative position of the masses, and all velocities are zero.
In a simple case, the energy is invariant with translation and rotation of the whole system, so I can optimized using internal coordinates, defining these internal coordinates as the different distances, angles and dihedral angles between the masses. For converting coordinates to and from Cartesian I have the matrix of coordinate derivatives, etc. J. Chem. Phys. 117, 9160 (there are small mistakes in eqs. 34 and 35).
Now the question is how to proceed when the energy is not invariant with translation and rotation. I have to include translation and rotation of the whole system to the degrees of freedom of the optimization. Translation is easy, because I can add the Cartesian coordinates of the center of mass, and the derivatives with respect to the coordinates of the masses are easy. But how can I add rotation?
I guess it will be related to the orientation of the principal axes of inertia, but I can't find a clear expression that will give me the three rotational coordinates I need, and their derivatives with respect to all the masses' coordinates.
Can anyone give me some help or pointers?
-
Is the system invariant or not under translations and rotations? i.e.: do you have an invariant system and are hoping to include a description of translation and rotation? or do you have interactions that break the translational and rotational invariance? if so, what coordinates do these interactions depend on? – Emilio Pisanty Jul 9 '12 at 14:09
@EmilioPisanty In general, the system is not invariant under translations and rotations. The dependence is not simple: there's a large number of fixed external point charges ("fixed" meaning they are not affected by rotation or translation). Note that I'm not asking for a method or algorithm to optimize the geometry, but for a way to add translation and rotation degrees of freedom of the whole system to a set of redundant internal coordinates. – Jellby Jul 9 '12 at 14:46
If you are looking for a way to describe an orientation of an object, Euler angles might be what you are looking for. – Alexey Bobrick Jul 9 '12 at 23:50
What's wrong with just using cartesian coordinates for everything? You can add SO(3) coordinates for the system, but you can also just write down the force laws in cartesian coordinates, or using SO(3) coordinates plus translations for the internal stuff. – Ron Maimon Jul 10 '12 at 20:06
@RonMaimon In chemical systems it is often more efficient (fewer iterations) to use internal coordinates. Internal coordinates also make it easier to add constraints to distances and angles, and are more closely related to the "meaning" of the process. But of course, using Cartesian coordinates is always a possibility. – Jellby Jul 11 '12 at 7:59
This project is ill conceived, you should put the system in rectangular absolute coordinates, there is absolutely no gain from what you are doing, it is objectively wrong, and needlessly complicated.
However, you are specifying the location of point particles one after the other, in relative polar coordiantes, so what you can do to fix the orientation of the whole thing is add 1 fictitious new particle, which is attached to the next atom with an angle, and gives you an orientation angle for the whole thing. This is probably the simplest modification.
I have to say that you're wasting your time in writing code for point particles using relative coordinates. This is deranged.
For rigid bodies
You should use the orientation of one of the components as defining the orientation of the whole molecule. There is no analog of the center of mass for rotations.
The total energy function can be written in terms of the rotation matrices $R_i$ which rotate the parts from some initial choice of orientation to the one you are looking at, plus the position of the center of mass.
$$H(x_1,R_1,x_2,R_2....,x_n,R_n)$$
It is invariant with respect to translations and rotations
$$H(RR_i,x_i+c) = H(R_i,x_i)$$
The center of mass coordinates give you a center for x, but there is no analogous orientation average, because the space of orientations is not infinite in extent. So instead of using an orientation average, you just use the orientation of one object, say object 1, to fix the orientation. Then the R matrix for object 1 defines the global orientation, and the rest of the objects orientations are relative to the first.
The energy is then a function of R, the orientation of object 1, and of the relative orientations of the other objects to object 1, $R_1^{-1} R_i$ and the positions relative to the center of mass. The relative orientation between object i and object j is $R_i^{-1}R_j$, and this relative orientation is independent of whether you use the R matrix relative to the frame defined by object 1, or relative to the original frame. The whole object can be reconstructed by placing the center of mass somewhere, placing object 1 at the right position with orientation R, then the rest of the objects relative to the axes defined by object 1.
You shouldn't use the moment of inertia principal axes as your definition of the orientation of the whole thing, because these become discontinuous when two of the moments of inertia become equal, so that the object will rotate discontinuously at those times when two moments happen to become equal.
-
I'd need two objects (not aligned with the center of rotation) to define the orientation, I guess. Otherwise the orientation around the axis determined by the first object is undefined, right? Now, when it comes to defining all the derivatives $B_{ij}$, does it mean all derivatives with respect to objects other that 1 are zero? Or are all as in the equations in my answer? – Jellby Jul 16 '12 at 8:59
@Jellby: I assumed the "objects" are irregular, so that they each have an orientation as rigid bodies. Are these rigid bodies or point particles? If they are point particles, ignore this answer, but from your description, it seemed you had orientation matrices for pairs, so they were rigid bodies, like amino acids. The derivatives "B_ij" for the rotation matrices are the angular velocities, which are given in antisymmetric matrix form by $R^{-1}\dot{R}$ where dot is a time derivative. – Ron Maimon Jul 16 '12 at 9:15
No, my "objects" are just point particles (nuclei), and there is no velocity either, as there's no time. The derivatives I need are of internal (or global) coordinates with respect to Cartesian coordinates of the nuclei, or vice versa, which are used to convert between the two kinds of coordinates. – Jellby Jul 16 '12 at 9:37
@Jellby: Ok, then you need to fix four arbitrary point particles to define the frame. You should have said this, because if you are doing point particles, it is absolutely 100% wrong to use any sort of relative coordinates, you should use cartesian coordinates period, and stop wasting time. – Ron Maimon Jul 16 '12 at 17:27
I'm sorry that's what you think. But as I said, in the comments to my question, Cartesian coordinates, while possible, are generally not the most efficient. It is true this is not a life-or-death question, I can have the job done by using Cartesian coordinates, but since I already have a program that works very nicely with internal coordinates when there is translational and rotational invariance, I just needed to add these degrees of freedom. – Jellby Jul 16 '12 at 17:29
This is slightly too long, and requires a bit too much ${\LaTeX}$, for a comment.
"a given displacement of the center of mass does not transform to the same displacement to each and every mass of the system" is not quite right. The maths you are displaying say the opposite: a small displacement $\delta x_i$ on molecule $i$ effects a displacement on $x_c$ which depends on $m_i$, which is right and perfectly physically understandable. Your statement in words would describe the matrix $\frac{\partial x_i}{\partial x_c}$, for which there is not enough information. Specifically, this matrix is the inverse of the matrix you're describing, and to get that inverse, you need the whole matrix, i.e. you need the rest of the internal coordinates in order to get the effect of $\delta x_c$ on an individual position $x_i$.
To be more specific, let me draw an analogy with two masses on a line, with coordinates $x_1$ and $x_2$. You want one of your final coordinates to be the centre of mass, $$\xi_1=x_c=\frac{m_1}{M}x_1+\frac{m_2}{M}x_2,$$ and this fixes one of the rows of the matrix $\frac{\partial \xi_j}{\partial x_i}$. The other row is still free: there is of course the canonical choice $$\xi_2=x_r=x_2-x_1$$ but other choices are of course possible such as $(x_2-x_1)^3$, for one, or even $x_1$ or $x_2$; note that the latter are perfectly valid as a change of coordinates, but they radically change the physical content of the transformation.
To make this clearer, consider the matrix you quote, with $x_r$ chosen as $\xi_2$: $$\frac{\partial\xi_j}{\partial x_i}=\begin{pmatrix}m_1/M &m_2/M\\ -1&1 \end{pmatrix}.$$ Then the determinant is 1 and the inverse is $$\frac{\partial x_i}{\partial \xi_j}= \begin{pmatrix}1&-m_2/M\\1&m_1/M \end{pmatrix}.$$ If you now focus on the first column, it tells you that $\frac{\partial x_i}{\partial x_c}=1$ for $i=1,2$ and it is this that translates into your statement
it does not give the same displacement for all masses, i.e. a given displacement of the center of mass does not transform to the same displacement to each and every mass of the system (as I'd expect)
You can see that it does: a given displacement of the centre of mass does transform to the same displacement for each mass of the system. However, this property does not depend on us having chosen $x_c$ as one coordinate, but also on our canonical choice of $x_r$ as the other. If you choose $\xi_2=x_2$, say, (or indeed anything that is not of the form $f(x_r)$) and repeat the exercise, you'll see that the matrix $\frac{\partial x_1}{\partial\xi_j}$ has the same problem from the quote.
Sorry for the long post that doesn't deal with rotation and is certainly not an answer to your question, but I do hope it helps with the problems you're having. Particularly, I would personally advise strongly against pursuing the geometrical centre as a quantity of interest - it simply ignores the physical contribution of the masses to the geometry and cannot therefore be right. You only need one global coordinate (per spatial dimension, of course) and this must be the centre of mass. The rest of the game, as you correctly infer, is in the choice of internal coordinates. As to where to go from there, I think it would be useful if you posted some examples of what internal coordinates you've been using in your test examples, so that we can get a better idea of how your maths look like.
-
I hadn't thought about how the presence of other internal coordinates would affect the inverse conversion matrix. I guess I thought that, if I remove all degrees of freedom except center of mass translation, the system will move as a rigid object, but now I believe that's not the case, rather internal degrees of freedom will change in undetermined ways. I've added a footnote to my answer. As for the physics of the problem, since I'm optimizing a geometry and the (potential) energy is independent of the masses, I don't think there's any problem with using the geometric center. – Jellby Jul 16 '12 at 8:53
And about examples of what internal coordinates, I'm using in general redundant internal coordinates, that is (a subset af all possible) distances between two points, angles between three points and dihedral formed by four points. In methanol, for instance, I'd have 3 CH distances, 1 CO, 1 OH, 3 HCH angles, 3 HCO, 1 COH, 3 HCOH dihedral. That's a total of 15 internal coordinates, which is more than the 3*6-6=12 needed (that's why they are redundant), but still don't contain the translational and rotational degrees of freedom. – Jellby Jul 16 '12 at 10:40
For methanol, I'd use the Euler angles of the CO bond. You should be careful because at equilibrium the two smaller moments of inertia are equal and, as Ron points out, this can bring trouble. – Emilio Pisanty Jul 16 '12 at 12:50
But I'm after a solution that would work for any other system, even linear. I guess I'll have to choose some specific atoms to define the orientation (or rather think of an algorithm to choose them automatically). – Jellby Jul 16 '12 at 13:09
Linear molecules are a problem because two of their moments of inertia are basically zero. (The electronic angular momentum is already accounted for and nuclear rotation only contributes to hyperfine structure.) Choosing the orientation of any given bond (or possibly two adjacent bonds) will most likely work. Having a universal algorithm for choosing which bond to use sounds unlikely. – Emilio Pisanty Jul 16 '12 at 13:50
This is what I've managed so far. In general, to convert to and from Cartesian coordinates, we need the the (Wilson's) $B$ matrix, a rectangular matrix whose elements are:
$$B_{ij}=\frac{\partial q_i}{\partial x_j}$$
where $q_i$ are the internal or collective coordinates, and $x_j$ are the Cartesian coordinates ($3N$ in total, $x$, $y$ and $z$ for each of the $N$ masses). This matrix can be used to convert derivatives and displacements. So from the vector of first derivatives (gradient) in Cartesian coordinates $g_x$, we can obtain the corresponding gradient in internal coordinates $g_q=(B^T)^+g_x$ (where $(B^T)^+$ is the Moore-Penrose pseudo inverse of the transpose of the $B$ matrix). A displacement in internal coordinates $\delta q$ can be obtained from a displacement of Cartesian coordinates: $\delta q=B\delta x$. For higher-order derivatives, the matrix of second derivatives $B'$ is needed:
$$B'_{ijk}=\frac{\partial^2 q_i}{\partial x_jx_k}$$
OK, now for the case of purely internal coordinates (distances, angles, dihedral angles), the expressions for the above $B$ and $B'$ elements are given in J. Chem. Phys. 117, 9160. But this assumes that the energy (function to minimize) is invariant with respect to translations and rotations, so the internal coordinates can describe all the degrees of freedom needed. If there is an external potential, field, charges, etc. this is not the case, and I must add translation and rotation of the whole system to the set of internal coordinates.
As I said, translation is easy, but not so much. At first I thought I would include the center of mass coordinates.
$$x_c=\sum\frac{m_ix_i}{M} \qquad M=\sum m_i$$
(now I use $x$ only for the $x$ coordinates, similar expressions would apply to $y_c$ and $z_c$) which gives:
$$\frac{\partial x_c}{\partial x_i} = \frac{m_i}{M} \qquad \frac{\partial x_c}{\partial y_i} = 0 \qquad \frac{\partial x_c}{\partial z_i} = 0$$
and similarly for $y_c$ and $z_c$. This is all fine, but there is a problem: it does not give the same displacement for all masses, i.e. a given displacement of the center of mass does not transform to the same displacement to each and every mass of the system (as I'd expect)[*]. In order to get this behaviour, I have to add not the center of mass but the geometrical center:
$$x_c=\sum\frac{x_i}{N} \qquad \frac{\partial x_c}{\partial x_i}=\frac{1}{N} \qquad \frac{\partial^2 x_c}{\partial x_i\partial x_i}=0$$
This ensures that when a displacement is converted to cartesian coordinates ($\delta x=B^+\delta q$) all masses will be displaced in the same way.
Now for rotation. Since I've used the geometrical center above, I consider rotation around this same center (so all Cartesian coordinates should be assumed to have $x_c,y_c,z_c$ subtracted). For a given mass, rotation around the $z$ axis can be intuitively given as $\arctan\frac{y}{x}$, or:
$$\frac{\partial R_z}{\partial x_i} = \frac{-y_i}{x_i^2+y_i^2} \qquad \frac{\partial R_z}{\partial y_i} = \frac{x_i}{x_i^2+y_i^2} \qquad \frac{\partial R_z}{\partial z_i} = 0$$
and symmetrically (cyclic) for $R_y$ and $R_x$. The second derivatives:
$$\frac{\partial^2 R_z}{\partial x_i\partial x_i} = \frac{2x_iy_i}{(x_i^2+y_i^2)^2} \qquad \frac{\partial^2 R_z}{\partial x_i\partial y_i} = \frac{y_i^2-x_i^2}{(x_i^2+y_i^2)^2} \qquad \frac{\partial^2 R_z}{\partial x_i\partial z_i} = 0$$
or, by analogy with translation, I could divide them all by $N$.
Applying these expressions in some test cases seemed to work, but I'm not sure if it was just luck. Besides, I have no idea what the rotational coordinates themselves, $R_x$, $R_y$, $R_z$, would be, I just used their derivatives. For any single mass I can get the angle with the axes, but for the whole system of $N$ masses? Computing the principal axes of inertia and the Euler angles of those is a possibility, but is this related to the derivatives above?
Does any of the above make sense?
[*] After reading Emilio Pisanty's answer, I think this is not a problem. To follow his example with two masses (assuming $m_1=1$ and $m_2=2$), if I remove $\xi_2=x_2-x_1$ as a coordinate, the $\frac{\partial x_i}{\partial \xi_j}$ matrix becomes the column vector $(0.6, 1.2)$. In this case, a given displacement of the center of mass $\Delta\xi_1$ will transform in a Cartesian displacement $\Delta x_1=0.6\Delta\xi_1$ and $\Delta x_2=1.2\Delta\xi_1$. Now suppose initially $x_1=0$, $x_2=1$, initially the center of mass would be at $\xi_1=\frac{2}{3}$; if the desired displacement is $\Delta\xi_1=0.5$, this gives $\Delta x_1=0.3$ and $\Delta x_2=0.6$, so the final coordinates would be $x_1=0.3$ and $x_2=1.6$, and the final center of mass is indeed $\xi_1=\frac{2}{3}+0.5=\frac{7}{6}$. But the distance between $x_1$ and $x_2$ has changed, which should be considered OK, as I didn't include the distance in the coordinates, which is like saying I don't care what happens with it. So, I guess my problem was that the system is underdetermined, and this shouldn't happen if I have at least the needed $3N$ coordinates.
- | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8836349248886108, "perplexity": 216.3344502062273}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-48/segments/1448398465089.29/warc/CC-MAIN-20151124205425-00200-ip-10-71-132-137.ec2.internal.warc.gz"} |
http://www.etiquettehell.com/smf/index.php?topic=83832.msg2768844 | • March 03, 2015, 03:51:20 PM
### Author Topic: "I'm never shopping THERE again!" Share your story! (Read 1339008 times)
1 Member and 2 Guests are viewing this topic.
#### Dazi
• like the flower
• Hero Member
• Posts: 4517
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2685 on: August 01, 2012, 06:53:20 PM »
My mom has introduced the idea of going to a new salon in town. I endured about 8 years of people not knowing how to do my hair, until finally going to a high-end expensive salon where the stylists actually know what to do. I don't care how good "everyone" swears the new salon is, I am not thrilled with the prospect of "trying it out" with the negative effect that I'll end up with a head of frizz that is going to take three months to grow out if they do it wrong.
Do you have curly hair? Inquire if anyone in the new salon specializes in curly hair, or if anyone is specifically good at cutting it. Then, when you get the stylist, ask her how she plans to cut it. If she says "short layers" say "no" and don't let her cut it. That is a common mistake and it has, IME, always turned out a disaster.
Thanks! I'll definitely do that.
Yeah, short layers with my hair either give me triangle head or the poodle do. Blunt cuts are pretty bad too. Nice long layers and no bangs look the best, IMO.
Meditate. Live purely. Quiet the mind. Do your work with mastery. Like the moon, come out from behind the clouds! Shine. ---Gautama Buddah
#### Barney girl
• Member
• Posts: 353
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2686 on: August 01, 2012, 06:53:53 PM »
The bad haircut stories often seem to refer to being turned away from the mirror. I've never had my hair cut with my back to the mirror. Is this common?
#### jedikaiti
• Swiss Army Nerd
• Hero Member
• Posts: 3011
• A pie in the hand is worth two in the mail.
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2687 on: August 01, 2012, 06:54:52 PM »
The bad haircut stories often seem to refer to being turned away from the mirror. I've never had my hair cut with my back to the mirror. Is this common?
I've always been facing the mirror, unless the stylist is handing me a hand mirror to look into so I can see how they did the back of my head, and if I like it.
What part of v_e = \sqrt{\frac{2GM}{r}} don't you understand? It's only rocket science!
"The problem with re-examining your brilliant ideas is that more often than not, you discover they are the intellectual equivalent of saying, 'Hold my beer and watch this!'" - Cindy Couture
#### Dazi
• like the flower
• Hero Member
• Posts: 4517
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2688 on: August 01, 2012, 06:57:24 PM »
The bad haircut stories often seem to refer to being turned away from the mirror. I've never had my hair cut with my back to the mirror. Is this common?
I've always been facing the mirror, unless the stylist is handing me a hand mirror to look into so I can see how they did the back of my head, and if I like it.
I can't recall ever being turned away from the mirror as an adult...not that it matters because I can't see anything without my glasses on.
Meditate. Live purely. Quiet the mind. Do your work with mastery. Like the moon, come out from behind the clouds! Shine. ---Gautama Buddah
• Super Hero!
• Posts: 8960
• Operating the logic hammer since 1987.
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2689 on: August 01, 2012, 07:22:26 PM »
For some reason this morning I thought of my one (and only) experience of a 'facial'. It's not the kind of thing I had money for at the time but it was a gift certificate to the local 'luxury' spa so I thought, why not?
The woman spent the whole. time. telling me all about how dreadfully I am going to age and how *awful* my skin is in order to upsell me a load of products. I know that's where they make their money, but it made it a very unpleasant experience. Also a lot of what she said was just utter rubbish. I have that skin that blushes easily and turns very red with heat, exercise or alcohol so chances are that when I am old I will have lots of broken capillaries in my face. It doesn't take a rocket scientist to know that, but buying her brand of *cleanser* is never, ever going to make an appreciable difference to it. Note, that I already do look after my skin, just according to this lady not with 'good enough' product. I felt awful that someone had spent a lot of money on this facial as a treat for me and it was just an absolute ordeal. It's turned me off facials forever. Not only that, but several times I have told other people not to use their services and told them why.
The kicker is that although I don't get facials I do spend a steady amount on other treatments (now) and not one red cent of it goes to this place.
About ten years ago, I was a patient of an amazing dermatologist (Dr. B) here. He was down to earth, and very patient with me as I always ask a lot of questions. I had an annual appointment and went as scheduled.
I knew something was wrong walking in the door, because there were glass cabinets of fancy cosmetic creams and brochures all over the lobby. I get to the back, and Dr. B has moved out of the area, and there is a new doctor. This new doctor was pleasant, but not warm and started to tell me how this $400 cream would repair all of my wrinkles, etc. I let him finish the exam, and left. I never went back. I was 33 at the time and I have always had very good skin, so I really don't think I need to buy that cream. #### Elisabunny • Hero Member • Posts: 1441 ##### Re: "I'm never shopping THERE again!" Share your story! « Reply #2690 on: August 01, 2012, 07:23:24 PM » The bad haircut stories often seem to refer to being turned away from the mirror. I've never had my hair cut with my back to the mirror. Is this common? I've always been facing the mirror, unless the stylist is handing me a hand mirror to look into so I can see how they did the back of my head, and if I like it. I can't recall ever being turned away from the mirror as an adult...not that it matters because I can't see anything without my glasses on. The stylists have probably seen too many episodes of "What Not to Wear." You must remember this: a ghoti is still a fish... #### Luci • Super Hero! • Posts: 6471 ##### Re: "I'm never shopping THERE again!" Share your story! « Reply #2691 on: August 01, 2012, 07:28:04 PM » The bad haircut stories often seem to refer to being turned away from the mirror. I've never had my hair cut with my back to the mirror. Is this common? I've always been facing the mirror, unless the stylist is handing me a hand mirror to look into so I can see how they did the back of my head, and if I like it. I can't recall ever being turned away from the mirror as an adult...not that it matters because I can't see anything without my glasses on. I've never been turned away, but I remember when I used to watch 'What Not to Wear' (which is still on), the stylist turned the guest away. I've never had a haircut that good or that bad. I just told my stylist today that this past 4 years is the most comfortable I've ever been with my hair since I was in high school and had a ponytail (1960). #### thedudeabides • Member • Posts: 517 ##### Re: "I'm never shopping THERE again!" Share your story! « Reply #2692 on: August 01, 2012, 11:15:50 PM » It's interesting that this came up again because just yesterday I read a column in which a woman was asserting that she and all her friends have botox treatment entirely and totally of their own volition, without anyone making them feel insecure about their looks at any point ever. Riiiiight! Because, hey, who wouldn't just decide someday "Hey, I'm going to inject a deadly poison into my face! No, no reason, I just feel like doing it." That was rather my line of thought. The other central point of the article was that women who don't have botox hate those who do. Quote My thought was that the author was mistaking "hate" for "think are silly". I would use a stronger word than 'silly,' like maybe 'crazy.' And that attitude is better than the one in the article how, exactly? Maybe they feel less insecure and more like they're taking charge of a situation by having botox. I think my girlfriend's gorgeous, but if she wanted to get botox, I'd rather have an actual conversation with her about why she wanted it rather than tittering at her behind my hand or rolling my eyes. I think you are mistaking the direction of the eye rolls and laughter - they are directed at the woman who wrote this article (or more accurately, at the ideas she expressed), not women who get botox in general. If you write an article for public consumption then you can't complain if people think your ideas are misinformed and discuss that fact. You're right, I did misunderstand how the comment about waking up and deciding to get a deadly toxin injected was directed at the author. I apologize. #### lady_disdain • Super Hero! • Posts: 5967 ##### Re: "I'm never shopping THERE again!" Share your story! « Reply #2693 on: August 02, 2012, 02:23:27 AM » For some reason this morning I thought of my one (and only) experience of a 'facial'. It's not the kind of thing I had money for at the time but it was a gift certificate to the local 'luxury' spa so I thought, why not? The woman spent the whole. time. telling me all about how dreadfully I am going to age and how *awful* my skin is in order to upsell me a load of products. I know that's where they make their money, but it made it a very unpleasant experience. Also a lot of what she said was just utter rubbish. I have that skin that blushes easily and turns very red with heat, exercise or alcohol so chances are that when I am old I will have lots of broken capillaries in my face. It doesn't take a rocket scientist to know that, but buying her brand of *cleanser* is never, ever going to make an appreciable difference to it. Note, that I already do look after my skin, just according to this lady not with 'good enough' product. I felt awful that someone had spent a lot of money on this facial as a treat for me and it was just an absolute ordeal. It's turned me off facials forever. Not only that, but several times I have told other people not to use their services and told them why. The kicker is that although I don't get facials I do spend a steady amount on other treatments (now) and not one red cent of it goes to this place. About ten years ago, I was a patient of an amazing dermatologist (Dr. B) here. He was down to earth, and very patient with me as I always ask a lot of questions. I had an annual appointment and went as scheduled. I knew something was wrong walking in the door, because there were glass cabinets of fancy cosmetic creams and brochures all over the lobby. I get to the back, and Dr. B has moved out of the area, and there is a new doctor. This new doctor was pleasant, but not warm and started to tell me how this$400 cream would repair all of my wrinkles, etc. I let him finish the exam, and left. I never went back. I was 33 at the time and I have always had very good skin, so I really don't think I need to buy that cream.
This seems so strange to me. If you had an appointment with Dr B, how could a different doctor just be there? Aren't appointments in the US for a particular doctor?
• Hero Member
• Posts: 2635
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2694 on: August 02, 2012, 08:03:33 AM »
The bad haircut stories often seem to refer to being turned away from the mirror. I've never had my hair cut with my back to the mirror. Is this common?
I've always been facing the mirror, unless the stylist is handing me a hand mirror to look into so I can see how they did the back of my head, and if I like it.
I've always been facing the mirror, but without my glasses I'm so blind that I might as well be in a closet, for all the good it does.
Speaking of haircuts, I've had some very good cuts at the local discount chain in the US, called Hair Cuttery. On the other hand, I also have very straight thick hair that is easy to manage. But I also 'invested' once in a cut (byt a student) at a very expensive salon once, and now that I know the cut that works best for me, I just get it done at the HC, especially now that the student I went to is long gone.
#### Otterpop
• Hero Member
• Posts: 1315
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2695 on: August 02, 2012, 11:14:28 AM »
We have a brilliant hair cutter, at a neighborhood discount salon, that we've been going to for years. Michelle can duplicate *exactly* any haircut in any picture you bring her. The cuts also grow out nicely when you want to change styles. She only charges $12 (in Southern California!) for a cut. My DH, two daughters and I tell her she's a gem, and tip her accordingly. I'll cry when she retires. On the other hand, I've been to a pricey salon in the area. I paid 5X the amount and came out with one side of my hair choppy layered and the other side flat. It took 2 trips to get it evened out. I've learned that price does not always equal quality. #### PastryGoddess • Super Hero! • Posts: 5536 ##### Re: "I'm never shopping THERE again!" Share your story! « Reply #2696 on: August 02, 2012, 12:28:48 PM » For some reason this morning I thought of my one (and only) experience of a 'facial'. It's not the kind of thing I had money for at the time but it was a gift certificate to the local 'luxury' spa so I thought, why not? The woman spent the whole. time. telling me all about how dreadfully I am going to age and how *awful* my skin is in order to upsell me a load of products. I know that's where they make their money, but it made it a very unpleasant experience. Also a lot of what she said was just utter rubbish. I have that skin that blushes easily and turns very red with heat, exercise or alcohol so chances are that when I am old I will have lots of broken capillaries in my face. It doesn't take a rocket scientist to know that, but buying her brand of *cleanser* is never, ever going to make an appreciable difference to it. Note, that I already do look after my skin, just according to this lady not with 'good enough' product. I felt awful that someone had spent a lot of money on this facial as a treat for me and it was just an absolute ordeal. It's turned me off facials forever. Not only that, but several times I have told other people not to use their services and told them why. The kicker is that although I don't get facials I do spend a steady amount on other treatments (now) and not one red cent of it goes to this place. About ten years ago, I was a patient of an amazing dermatologist (Dr. B) here. He was down to earth, and very patient with me as I always ask a lot of questions. I had an annual appointment and went as scheduled. I knew something was wrong walking in the door, because there were glass cabinets of fancy cosmetic creams and brochures all over the lobby. I get to the back, and Dr. B has moved out of the area, and there is a new doctor. This new doctor was pleasant, but not warm and started to tell me how this$400 cream would repair all of my wrinkles, etc. I let him finish the exam, and left. I never went back. I was 33 at the time and I have always had very good skin, so I really don't think I need to buy that cream.
This seems so strange to me. If you had an appointment with Dr B, how could a different doctor just be there? Aren't appointments in the US for a particular doctor?
Dr. B had sold his practice in the time between OP's annual appointments. So the new doctor took over all of Dr. B's old patients. That's why she was meeting new doctor for the first time
#### ica171
• Hero Member
• Posts: 1416
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2697 on: August 02, 2012, 12:52:21 PM »
For some reason this morning I thought of my one (and only) experience of a 'facial'. It's not the kind of thing I had money for at the time but it was a gift certificate to the local 'luxury' spa so I thought, why not?
The woman spent the whole. time. telling me all about how dreadfully I am going to age and how *awful* my skin is in order to upsell me a load of products. I know that's where they make their money, but it made it a very unpleasant experience. Also a lot of what she said was just utter rubbish. I have that skin that blushes easily and turns very red with heat, exercise or alcohol so chances are that when I am old I will have lots of broken capillaries in my face. It doesn't take a rocket scientist to know that, but buying her brand of *cleanser* is never, ever going to make an appreciable difference to it. Note, that I already do look after my skin, just according to this lady not with 'good enough' product. I felt awful that someone had spent a lot of money on this facial as a treat for me and it was just an absolute ordeal. It's turned me off facials forever. Not only that, but several times I have told other people not to use their services and told them why.
The kicker is that although I don't get facials I do spend a steady amount on other treatments (now) and not one red cent of it goes to this place.
About ten years ago, I was a patient of an amazing dermatologist (Dr. B) here. He was down to earth, and very patient with me as I always ask a lot of questions. I had an annual appointment and went as scheduled.
I knew something was wrong walking in the door, because there were glass cabinets of fancy cosmetic creams and brochures all over the lobby. I get to the back, and Dr. B has moved out of the area, and there is a new doctor. This new doctor was pleasant, but not warm and started to tell me how this \$400 cream would repair all of my wrinkles, etc. I let him finish the exam, and left. I never went back. I was 33 at the time and I have always had very good skin, so I really don't think I need to buy that cream.
This seems so strange to me. If you had an appointment with Dr B, how could a different doctor just be there? Aren't appointments in the US for a particular doctor?
Dr. B had sold his practice in the time between OP's annual appointments. So the new doctor took over all of Dr. B's old patients. That's why she was meeting new doctor for the first time
But usually there's a letter or something sent out that says "Dr. B has retired/moved/is no longer at this practice, we are very excited to welcome New Dr." I've never been surprised by a new doctor when walking into a previously scheduled appointment.
#### RebeccainGA
• Hero Member
• Posts: 1207
• formerly RebeccainAR
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2698 on: August 02, 2012, 01:13:41 PM »
Mine is more of a 'If I have a choice I'll never use them again" kind of thing. My company moved me halfway across the country, from Arkansas to Georgia, last month.
They were supposed to be there Monday morning - they didn't arrive until Tuesday late afternoon. They seemed to be great at first - polite, friendly, worked hard, asked questions, etc. I will admit, our old house was a zoo - a few steps up from hoarders - but I'd spent months going through and discarding everything I could, and while it wasn't clean and wonderful like I'd have liked, it was at least MUCH BETTER than it had been before my work. The last day of packing, however, when they said they would be out of the house and on to the storage unit by noon, was insane. We had scheduled HVAC work to be done that day (my DD is staying in the house) and were expecting them after noon. They got there, and the movers, who had known the HVAC guys would be there, had left to the last the very back bedroom. The one you had to pass the HVAC closet to get to. The one that had all the huge heavy furniture in it. Yeah, that one. As you can imagine, it was insane.
They finally finish the house about 4pm. I'd told them that DP had her last appointment with her oncologist that day, at 4, so I'd have to leave to take her at 3:30. I arranged for the storage people to open the gate for them, and I unlocked my unit and took off for the doctor. When we got back to the unit, they were still working (almost 7pm). I'd told them it would be six or seven dish barrels worth of fragile, and a huge number of framed art piece to pack. They thought I was exaggerating. I wasn't. They finally finished at 8:30, and said they would meet us in Georgia about 12 hours later. This is a 10-11 hour drive, at minimum, so we were frantic - we still wanted to have dinner with DD before we left, and I still had some things at the house to load into our van! We rush through things, and get to Georgia about 7:55 - I think we broke a few land speed records in the mountains.
The movers arrive after 1pm.
You guessed it, they left the trash.
They were supposed to be there for two days unloading. They were supposed to unpack and cart away the trash. They did none of it. It took a frantic call to the local branch from our 'moving concierge' to get a local crew (1 guy and a truck) to come out and help me unload the boxes so that I could reach them (they were stacked to the ceiling in places, and still are in 1 room) and to unpack part of the kitchen. He also took the trash.
They did a half job on the whole thing - I'm unpacking a few boxes every night, and the damage bill is in the thousands already. Poor packing, insane things (wardrobe boxes full of junk, and so full of packing paper I'm throwing away almost full boxes of it for every two boxes I open, and hanging clothes not in wardrobe boxes but folded still on the hangers into regular boxes).
I don't know if corporate moves are always like this or not. I certainly hope not. The company I work for is known for moving folks around, once they reach middle management, about every three years. Argh!
#### Jones
• Hero Member
• Posts: 2765
##### Re: "I'm never shopping THERE again!" Share your story!
« Reply #2699 on: August 02, 2012, 01:23:00 PM »
I've had two moving company experiences. One, the larger one, was fantastic. They were prompt, courteous, gave an accurate quote and did everything they said they would. The other, a small company that was subcontracted to a larger company, was a total disaster and afterwards I realized they had broken a couple DOT regulations (I was learning DOT regs as part of my new position). I left bad reviews of them online because they wouldn't take my calls, and the larger company just said "Oh, sorry about that." Don't know if they are still in business or not, but I don't plan on moving again for quite a while (10+ years) and I will carefully check online reviews if I do have to move. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2790396213531494, "perplexity": 2519.732085047544}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-11/segments/1424936463411.14/warc/CC-MAIN-20150226074103-00321-ip-10-28-5-156.ec2.internal.warc.gz"} |
https://cs.stackexchange.com/questions/125945/polynomial-time-reduction-of-primality-and-3-sat/125946 | # Polynomial-time reduction of Primality and 3-SAT
Is 3-SAT $$\leq_{p}$$ Primality? And/or is Primality $$\leq_{p}$$ 3-SAT? I think the answer is no and yes, respectively, but I'm not sure. Any help would be appreciated.
Thank you.
For the first question: This is an open problem. If $$\mathsf{P} \neq \mathsf{NP}$$ then the answer is no: the decision version of 3-SAT is $$\mathsf{NP}$$-Complete, while Primality is in $$\mathsf{P}$$, the means that a Karp reduction from 3-SAT to Primality would imply $$\mathsf{P}=\mathsf{NP}$$.
For the second question: Primality is in $$\mathsf{P} \subseteq \mathsf{NP}$$, therefore there is a Karp reduction from Primality to any $$\mathsf{NP}$$-Complete problem, such as 3-SAT. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 8, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9325494170188904, "perplexity": 366.9400058320686}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-29/segments/1593655883961.50/warc/CC-MAIN-20200704011041-20200704041041-00133.warc.gz"} |
http://nrich.maths.org/1133/note | ### Exploring Wild & Wonderful Number Patterns
EWWNP means Exploring Wild and Wonderful Number Patterns Created by Yourself! Investigate what happens if we create number patterns using some simple rules.
### I'm Eight
Find a great variety of ways of asking questions which make 8.
### Dice and Spinner Numbers
If you had any number of ordinary dice, what are the possible ways of making their totals 6? What would the product of the dice be each time?
# Penta Post
## Penta Post
Here are the prices for 1st and 2nd class mail within the UK [in 2002].
Weight up to First Class Second Class
$60g$ $27p$ $19p$
$100g$ $41p$ $33p$
$150g$ $57p$ $44p$
$200g$ $72p$ $54p$
$250g$ $84p$ $66p$
$300g$ $96p$ $76p$
$350g$ $£1.09$ $87p$
$400g$ $£1.30$ $£1.05$
$450g$ $£1.48$ $£1.19$
$500g$ $£1.66$ $£1.35$
$600g$ $£2.00$ $£1.60$
$700g$ $£2.51$ $£1.83$
$750g$ $£2.69$ $£1.94$*
$800g$ $£2.91$
$900g$ $£3.20$
$1kg$ $£3.49$
Costs for First Class items over $1kg$ are $£3.49$ and then $85p$ for each extra $250g$.
*Items over $750g$ cannot be sent second class.
You have an unlimited number of each of these stamps:
$4p$ $10p$ $19p$ $27p$ $37p$ $£1.00$
1/ Which stamps would you need to post a parcel weighing $825g$?
2/ I want to send a package 1st class which weighs $235g$. It is very small so I want to use as few stamps as possible. Which ones would I use?
3/ If I only had $3$ of each kind of stamp, which $2$nd class price could I not make?
4/ How many different combinations of stamps could be stuck on a letter weighing $140g$ if it goes 1st class?
5/ I use the following stamps to send two items, one 1st class and the other 2nd class:
What could their weights be?
Further extension to this activity can be carried out by considering the value of the stamps alone, as numbers $4$, $10$, $19$, $27$, $37$ & $100$. For example taking the $5$ lowest numbers [missing out the $100$] challenging the pupils to come up with the smallest number of ways you can get totals between $4$ and $50$. This could lead to questions about what totals can NOT be had, and checking to see if you've really got the smallest number of ways, each time.
UK folk need to be aware that all this has changed since 2009 ! (See Royal Mail)
### Why do this problem?
This activity is a good everyday example of the use of addition and multiplication. It also helps pupils see the use of arithmetic in practical situations.
### Possible approach
Start off a general discuss about posting to see what they know about posting letters and cards. When they are happy to talk about stamps present them with the challenge. You may prefer to update the charges and adapt the challenge to suit the current pricing system.
### Key questions
Tell me how you have worked this out.
### Possible extension
Pupils could invent their own question based upon the present-day costs of postage. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.31750011444091797, "perplexity": 816.2926843834315}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-41/segments/1410657119965.46/warc/CC-MAIN-20140914011159-00066-ip-10-196-40-205.us-west-1.compute.internal.warc.gz"} |
https://hal-cea.archives-ouvertes.fr/cea-01851802 | # Multi-physics modeling and Au-Ni/Rh coating assessment for ITER ion cyclotron resonance heating radio-frequency sliding contacts
Abstract : ITER is a large scale fusion experimental device under construction in Cadarache (France) intended to prove the viability of fusion as an energy source. Ion Cyclotron Resonance Heating (ICRH) system is one of the three heating systems which will supply total heating power of 20 MW (40-55 MHz) up to one hour of operation. Radio-Frequency (RF) contacts are integrated within the antennas for assembly and operation considerations, which will face extremely harsh service conditions, including neutron irradiation, heavy electrical loads (RF current reaches up to 2 kA with a linear current density of 4.8 kA/m) and high thermal loads. Based on the thermal analysis, the contact resistance is expected to be lower than 7 mΩ to keep the maximum temperature on the louvers lower than 250°C. Few weeks of vacuum (~10$^{-5}$ Pa) baking at 250°C for outgassing is expected before each plasma experimental campaign, under which the RF contact materials' mechanical properties change and diffusion phenomena between different materials are inevitable. CuCrZr and 316L are proper base materials for ITER RF contact louvers and conductors respectively. In order to improve the RF contact's wear and corrosion resistivity as well as to reduce the contact resistance, Au-Ni and Rh functional layers could be electroplated on CuCrZr and 316L accordingly. The application of the Au-Ni/Rh coating pairs is assessed through the thermal ageing and diffusion tests. Wear and electrical contact performances of the Au-Ni/Rh pairs are deeply studied on a dedicated tribometer operated at ITER relevant conditions.
Keywords :
Document type :
Conference papers
Domain :
https://hal-cea.archives-ouvertes.fr/cea-01851802
Contributor : Julien Hillairet <>
Submitted on : Monday, July 30, 2018 - 10:35:42 PM
Last modification on : Thursday, October 24, 2019 - 11:38:04 AM
Long-term archiving on: Wednesday, October 31, 2018 - 2:12:53 PM
### File
Chen2017_MultiPhysics modeling...
Files produced by the author(s)
### Citation
Z. Chen, Julien Hillairet, V. Turq, Y. Song, R. Laloo, et al.. Multi-physics modeling and Au-Ni/Rh coating assessment for ITER ion cyclotron resonance heating radio-frequency sliding contacts. 2017 IEEE Holm Conference on Electrical Contacts, Sep 2017, Denver, United States. ⟨10.1109/HOLM.2017.8088059⟩. ⟨cea-01851802⟩
Record views | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2579798996448517, "perplexity": 9059.408617080955}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575541308604.91/warc/CC-MAIN-20191215145836-20191215173836-00386.warc.gz"} |
https://www.bartleby.com/solution-answer/chapter-9-problem-96ape-accounting-27th-edition/9781337272094/accounts-receivable-turnover-and-days-sales-in-receivables-financial-statement-data-for-years-ending/89689da4-98dc-11e8-ada4-0ee91056875a | Chapter 9, Problem 9.6APE
### Accounting
27th Edition
WARREN + 5 others
ISBN: 9781337272094
Chapter
Section
### Accounting
27th Edition
WARREN + 5 others
ISBN: 9781337272094
Textbook Problem
# Accounts receivable turnover and days’ sales in receivablesFinancial statement data for years ending December 31 for Chiro-Solutions Company follow: 20Y2 20Y1 Sales $2,912,000$2,958,000 Accounts receivable: Beginning of year 300,000 280,000 End of year 340,000 300,000 a. Determine the accounts receivable turnover for 20Y2 and 20Yl. b. Determine the days’ sales in receivables for 20Y2 and 20Yl. Use 365 days and round to one decimal place. c. Does the change in accounts receivable turnover and the days’ sales in receivables from 20Y1 to 20Y2 indicate a favorable or unfavorable change?
(a)
To determine
Accounts receivable turnover:
Accounts receivable turnover is a liquidity measure of accounts receivable in times, which is calculated by dividing the sales by the average amount of net accounts receivables. In other words, average receivable turnover ratio identifies the number of times the average amount of accounts receivables being collected during a particular period.
Days’ sales in receivables:
Days’ sales in receivables indicate the number of days taken by a business, to collect its outstanding amount of accounts receivable on an average. It is otherwise known as average collection period.
To calculate: Company CS’s accounts receivable turnover ratio for 20Y2 and 20Y1.
Explanation
Calculate Company CS’s accounts receivable turnover ratio for 20Y2.
Accounts receivableturnover}=SalesAverage accounts receivable=Sales(Accounts receivable at the beginning of the year+Accounts receivableat the end of the year2)=$2,914,000($300,000+\$340,0002)=9.1 times
Hence, Company CS’s accounts receivable turnover ratio for 20Y2 is 9.1 times
(b)
To determine
To calculate: Company CS’s days’ sales in receivables for 20Y2 and 20Y1.
(c)
To determine
To identify: Whether the change in accounts receivable turnover and the day’s sales in receivables from 20Y1 to 20Y2 are favorable or unfavorable.
### Still sussing out bartleby?
Check out a sample textbook solution.
See a sample solution
#### The Solution to Your Study Problems
Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!
Get Started | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.15598464012145996, "perplexity": 14036.571506183227}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-43/segments/1570986705411.60/warc/CC-MAIN-20191020081806-20191020105306-00218.warc.gz"} |
https://www.acmicpc.net/problem/19727 | 시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 512 MB 0 0 0 0.000%
## 문제
Once, during his informatics class, Dima had solved all the problems about permutations. Then he came up with a problem about a superpermutation.
A superpermutation of order $n$ is a sequence of integers from $1$ to $n$, such that every permutation of numbers from $1$ to $n$ occurs as a continuous subsegment in this sequence.
Dima quickly came up with an algorithm for generating superpermutations:
• $s_1 = [1]$.
• Initially, set $s_{n+1}$ equal to $s_n$.
• Consider all subsegments of $s_n$ of length $n$ from left to right, in order of increasing of their beginning.
• If a current subsegment $s_n[l, l+1, \ldots, l+n-1]$ is a permutation of numbers from $1$ to $n$ (that means that every number from $1$ to $n$ occurs exactly once), then insert numbers $n + 1, s_n[l], s_n[l + 1], \ldots, s_n[l+n-1]$ into $s_{n+1}$ right after the last element $s_n[l+n-1]$ of the corresponding subsegment.
Let's take a look at how to construct superpermutations of order $1$, $2$, $3$ and $4$:
By definition, $s_1 = [ 1 ]$.
Set $s_2 = [ 1 ]$. Consider the only subsegment of length $1$ in $s_1$: $[1]$ is a permutation, so we insert $[2, 1]$ into $s_2$ after it. The result is $s_2 = [1, \mathbf{2, 1}]$.
Set $s_3 = [ 1, 2, 1 ]$. Consider all subsegments of length $2$ in $s_2$. $[1, 2]$ is a permutation, after inserting $[3, 1, 2]$, we get $s_3 = [1, 2, \mathbf{3, 1, 2}, 1]$. $[2, 1]$ is also a permutation, so we insert $[3, 2, 1]$ into $s_3$, we get $s_3 = [1, 2, 3, 1, 2, 1, \mathbf{3, 2, 1}]$.
Initially, set $s_4 = [ 1, 2, 3, 1, 2, 1, 3, 2, 1]$. Consider all subsegments of length $3$ in $s_3$:
• $[1, 2, 3]$ is a permutation, so we insert $[4, 1, 2, 3]$ after it. Now $s_4 = [ 1, 2, 3, \mathbf{4, 1, 2, 3}, 1, 2, 1, 3, 2, 1]$.
• $[2, 3, 1]$ is a permutation, so we insert $[4, 2, 3, 1]$ after it. Now $s_4 = [ 1, 2, 3, 4, 1, 2, 3, 1, \mathbf{4, 2, 3, 1}, 2, 1, 3, 2, 1]$.
• $[3, 1, 2]$ is a permutation, so we insert $[4, 3, 1, 2]$ after it. Now $s_4 = [ 1, 2, 3, 4, 1, 2, 3, 1, 4, 2, 3, 1, 2, \mathbf{4, 3, 1, 2}, 1, 3, 2, 1]$.
• $[1, 2, 1]$ is not a permutation, so nothing happens here, we continue with the next subsegment.
• $[2, 1, 3]$ is a permutation, so we insert $[4, 2, 1, 3]$ after it. Now $s_4 = [ 1, 2, 3, 4, 1, 2, 3, 1, 4, 2, 3, 1, 2, 4, 3, 1, 2, 1, 3, \mathbf{4, 2, 1, 3}, 2, 1]$. \item We do the same with two remaining permutations of length 3: $[1, 3, 2]$ and $[3, 2, 1]$.
Dima noticed that he came up with a pretty efficient way of constructing a superpermutation, because every permutation occurs exactly once. To make sure he did not make a mistake, Dima wants to find a position where a given permutation $a_1, \dots, a_n$ occurs in his superpermutation $s_n$. Positions are numbered starting with 1.
Since the length of $s_n$ is huge, you need to find the index of the first element of $s_n$ from which the occurrence of the given permutation starts, modulo $10^9 + 7$.
## 입력
The first line contains a single integer $n$ --- the length of the permutation ($1 \le n \le 300\,000$).
The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ --- the given permutation ($1 \le a_i \le n$, all $a_i$ are different).
## 출력
Output a single integer --- the position of the occurrence of the permutation $a_1, a_2, \ldots, a_n$ in the superpermutation of order $n$, modulo $10^9+7$.
3
2 3 1
2
4
2 3 1 4
6
4
4 3 1 2
14 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9732092022895813, "perplexity": 339.70040275207407}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-40/segments/1600402127397.84/warc/CC-MAIN-20200930172714-20200930202714-00085.warc.gz"} |
https://hacdias.com/notes/computation-and-society/ | in 📓 Notes
# Computation and Society
This is mostly a translation to English of the notes originally provided by Baltasar Dinis.
## Ethics
### Definitions
Ethics is the set of values deducted by an individual according to which they evaluate their actions. It can be also defined as the rules or behaviour standards that are expected from an individual by a group.
It is relevant to study Ethics in Computer Science due to the impact this field has on the society. Most of the times, the decisions taken by a Computer Scientist are not just theoretical.
Morality is the set of values based on a collective knowledge that define whether an action is good or bad. In contrast to Ethics, Morality belongs to the social context and it’s the base of the social normals.
#### Morality Variation Factors
• Age → Generational Ethics
• Cultural group
• Ethnicity
• Religion
• Life experiences
• Education
• Sex
An individual has integrity if their actions are based upon their own opinions, the opinions they share with others.
Making ethical decisions:
1. Identify the problem and describe it in a concise way.
2. Identify alternatives.
3. Evaluate and pick an alternative.
4. Take the decision.
### Professional Responsibility
The globalization and generalization of Information Technologies makes it even more important to study Ethics in the context of technology.
It is important to promote ethical conducts because we need to act correctly. However, it is also important from the business point of view:
• Connection to the communicty.
• Organization consistency.
• It’s a good practice.
• Protects the organization and the employees from litigation.
### Ethics in Organizations
In an organization, is it important to:
• Have an ethics manager.
• Define (by the administration board) the ethical norms of the organization.
• Define, carry them out and enforce them.
• Have an ethical code of conduct with the key ethical questions.
The ethical code of conducts - like ACM’s, which is a standard among organizations in the field - stipulate the fundamental principles. However, it requires an ethical judgement in order to understand it.
The ACM’s Code of Conduct is based on 8 principles:
1. Public Interest
2. Client and Employer
3. Product
4. Common Sense
5. Management
6. Profession
7. Colleagues and Teams
8. Yourself
## Security and Computer-oriented Crimes
Computer-oriented crimes are crimes where computers are used.
Cybercrimes are crimes that happen on the cyberspace.
Computer virus is a malicious program that propagates itself on files and programs, “infecting” them. Tipically, user action is required.
Worm is a malicious program that replicates itself in order to propagate to other computers.
Some attacks:
• Sniffing: consists on intercepting and capturing data on a network.
• DDoS (Distributed Denial of Service): use a distributed network of computers to flood a target’s network, making it slow.
• Carding: steal credit card information.
• Trojan: computer malware that misleads the user intent.
• Phishing: obtain sensitive information such as usernames, passwords and credit card details by disguising oneself as a trustworthy entity in an electronic communication.
• Spear Phishing: phishing targeted to specific companies and individuals.
• Smishing: phishing through SMS.
• Ransomware: malware that requires the user to pay to retrieve their data.
• Defacing: is an act of vandalism where a website gets modified.
The main solution for the cyber crimes that invole the user’s action is giving users awareness and help on how to filter emails.
The Portuguese law 109/2009 suplements the penal code with information about cybercrimes.
• ANACOM (Autoridade NAcional de COMunicações): the national authority of communications.
• CNPD (Comissão Nacional de Proteção de Dados): the national data protection authority.
### Software Reproduction
It is illegal to make illicit copies and/or distribute them.
Warez is pirated software.
### General Data Protection Regulation
The General Data Protection Regulation (GDPR) refers to all EU citizens and has the following goals:
• Give data’s holders control about them.
• Give responsability to companies and other data controllers.
• Give transparency to how the data is processed.
• Reduce the vulnerabilities related to personal data.
• Improve the cooperation between authorities that supervise personal data processing.
Personal information is any information that can be related to someone that is or can be identified.
The GDPR is based on 6 principles about personal information:
1. Lawfulness, fairness and transparency: the data are processed in a legal, just and transparent way.
2. Purpose limitation: data must be collected for specific, explicit and legitimate purposes.
3. Data minimisation: collected data must be adequate, relevant and limited to the strict needs.
4. Accuracy: data must be precise and updated when required.
5. Storage limitation: data must be kept in a way that they cna be easily identified and remove when not necessary.
6. Integrity and confidentiality: the data processing must have enough security measures to protect them.
## Intelectual Property
Intelectual property is the legal concept that deals with intellectual property and its exclusivity rights.
TODO
### Intelectual Property Rights
The protected value is of the creation. There are many types:
• Patent: lasts for 20 years of exclusivity.
• Utility model: lasts for 6+2+2 years of exclusivity.
• Industrial design rights: lasts for 25 years and can be renewed every 5 years.
• Unregistred industrial design.
Patent is a legal document that allows the owner to stop the manufacture, usage and comercialization of an invention by other people. It can protect products or production methods and has geographic limits. The first one to register it, gains the rights.
A patent requires:
• Be something new.
• It can’t be obvious.
• Must have an industrial application.
• Sufficiency: the request must have enough detail to allow for repeatability.
• Support: the request must show what the invention does.
Trade secrets are confidential intelectual property of a company.
• They have no time limit.
• They don’t need to be registred.
• They don’t need to be disclosed.
• Hard to license and value.
• Hard to keep confidentiality.
• Hard to fight for the rights.
• Can be patented by others.
Trademark is an identifier for each product of a company.
## Information Technologies Impact
With the advent of computing, the social structure has been changing rapidly and dramatically. There are, of course, certain questions to discuss:
• In which way is the technological revolution changing the way we organize?
• In which way does that change our human rights:
• Mainly, the freedom of speech.
### Privacy
Privacy is a right described in the Universal Declaration of Human Rights, where everyone must be given confidentiality to their communications and privacy to their data.
The privacy on the Internet is a complex problem since there are techniques such as Canvas Fingerprinting, Cookies and many other vulnerabilities.
Some recent outrages about the right of privacy include the Chinese social credit system, the British surveillance system and the right to be forgotten (discussed in the EU due to the GDPR).
### Net Neutrality
Net neutrality is the principle that Internet service providers (ISPs) must treat all Internet communications equally, and not discriminate or charge differently based on user, content, website, platform, application, type of equipment, source address, destination address, or method of communication.
### Freedom of Speech
Freedom of speech is the individual and collective right to express and spread one’s opinion by speaking in an unlimited way.
Freedom of speech is one of the pillars of the Internet. However, this breaks a timeless flow that has been unbreakable for many years: from the traditional communication media (that adhere to a code of ethics) to reads. Currently, this flow is not directed in a particular way, being done from everyone to everyone.
Hate speech is defined as a public speech that expresses hate or encourages violence towards a person or group based on something.
### AI and Equality
The AI has been changing the work market in a drastic way, affecting worker’s productivity.
Productivity is the quotient between the amount of work and the retail value of a product. Or the amount of work done per input unit. It can be measured by GDP (gross domestic product) per hour.
Economic inequality has been worsening. However, developed countries may not feel the change in productivity in increasing inequality. In other contries, however, this has been felt as a sudden change.
## AI and Autonomy
Autonomy is the ability of a machine to determine how and when to hit its own goals and execute its tasks without any external control.
graph TD
dc(Direct Control) --> Teleoperation
Teleoperation --> Mediatedteleoperation
Mediatedteleoperation --> sr[Supervisory Control]
sr --> cc[Collaborative Control]
cc --> ptp[Peer-to-peer collaboration]
ptp --> da(Dynamic Autonomy)
This scale (Sheridan scale) establishes levels between a machine being fully operated by a human and being completely autonomous, not needing human intervention to execute actions.
With the improvement of machine’s autonomy, it is clear that people are delegating more of their tasks to machines. For example, through voice assistants, such as Google Assistant, Siri and Alexa. These are technological changes that have the power to deeply change our society.
TODO
TODO
### Bias
Bias is disproportionate weight in favor of or against an idea or thing, usually in a way that unfair.
With the development of the AI, some question if we may be adding to technology our own biases.
## Social Networks
Today we are more and more connected to each other through many forms of social networks. In some cases, social networks have completely replaced our traditional social media. Thus, it is important to understand how these connections are made.
The networks' structure are tree-like: there are few nodes with tons of connections, and most of them connect to this centralized nodes.
Usually, content propagation occurs in two ways:
• Simple ways: being in touch with the content is enough.
• Complex ways: multiple exposures to the content are needed.
In the social network context, we observe a complex content propagation system. It is important to note that social media can be used as a mass media manipulation tool.
Advertisement is the usage of a network to promote benefits of products and services.
• Banners
• Viral Marketing | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.23567789793014526, "perplexity": 4874.313707998552}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-10/segments/1614178359624.36/warc/CC-MAIN-20210227234501-20210228024501-00444.warc.gz"} |
https://de.mathworks.com/help/stats/evinv.html | # evinv
Extreme value inverse cumulative distribution function
## Syntax
```X = evinv(P,mu,sigma) [X,XLO,XUP] = evinv(P,mu,sigma,pcov,alpha) ```
## Description
`X = evinv(P,mu,sigma)` returns the inverse cumulative distribution function (cdf) for a type 1 extreme value distribution with location parameter `mu` and scale parameter `sigma`, evaluated at the values in `P`. `P`, `mu`, and `sigma` can be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input is expanded to a constant array of the same size as the other inputs. The default values for `mu` and `sigma` are `0` and `1`, respectively.
`[X,XLO,XUP] = evinv(P,mu,sigma,pcov,alpha)` produces confidence bounds for `X` when the input parameters `mu` and `sigma` are estimates. `pcov` is the covariance matrix of the estimated parameters. `alpha` is a scalar that specifies 100(1 – `alpha`)% confidence bounds for the estimated parameters, and has a default value of 0.05. `XLO` and `XUP` are arrays of the same size as `X` containing the lower and upper confidence bounds.
The function `evinv` computes confidence bounds for `P` using a normal approximation to the distribution of the estimate
`$\stackrel{^}{\mu }+\stackrel{^}{\sigma }q$`
where q is the `P`th quantile from an extreme value distribution with parameters μ = 0 and σ = 1. The computed bounds give approximately the desired confidence level when you estimate `mu`, `sigma`, and `pcov` from large samples, but in smaller samples other methods of computing the confidence bounds might be more accurate.
The type 1 extreme value distribution is also known as the Gumbel distribution. The version used here is suitable for modeling minima; the mirror image of this distribution can be used to model maxima by negating `X`. See Extreme Value Distribution for more details. If x has a Weibull distribution, then X = log(x) has the type 1 extreme value distribution. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 1, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9640222787857056, "perplexity": 336.1595299940077}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-05/segments/1642320304515.74/warc/CC-MAIN-20220124054039-20220124084039-00440.warc.gz"} |
https://www.gradesaver.com/textbooks/math/algebra/algebra-2-1st-edition/chapter-14-trigonometric-graphs-identities-and-equations-14-6-apply-sum-and-difference-formulas-14-6-exercises-skill-practice-page-952/4 | ## Algebra 2 (1st Edition)
$-\frac{\sqrt3-1}{2\sqrt2}$
Using the given formula and the known values: $\sin-165^\circ=\sin-120^\circ\cos45^\circ-\sin45^\circ\cos-120^\circ=-\frac{\sqrt3}{2}\frac{1}{\sqrt2}-\frac{1}{\sqrt2}(-\frac{1}{2})=-\frac{\sqrt3-1}{2\sqrt2}$ | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9955325126647949, "perplexity": 2959.272447364571}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-49/segments/1669446711069.79/warc/CC-MAIN-20221206024911-20221206054911-00849.warc.gz"} |
https://math.stackexchange.com/questions/1411902/computation-of-liebracket-for-vectorfields-assosiated-with-a-variation-of-geodes | # Computation of Liebracket for Vectorfields assosiated with a Variation of Geodesics
Let $(M,g)$ be a Riemannian manifold, $V \subset \mathbb{R}^2$ be an open subset and $\alpha: V \rightarrow M; (s,t) \mapsto \alpha(s,t)$ a smooth map.
for $(s,t) \in V$ one can define
$$\frac{\partial \alpha}{\partial s}(s,t) := [\sigma \mapsto \alpha(s+ \sigma ,t) ]\in T_{\alpha(s,t)}M$$ $$\frac{\partial \alpha}{\partial t}(s,t) := [\tau \mapsto \alpha(s ,t + \tau) ]\in T_{\alpha(s,t)}M$$
Where the curve in brackets is a tangent vector. For a chart $(U,x)$ one has
$$\frac{\partial \alpha}{\partial s}(s,t) = \sum \frac{\partial \tilde{\alpha}_i}{\partial s}(s,t) \cdot \frac{\partial}{\partial x_i}\vert_{\alpha(s,t)}$$ and $$\frac{\partial \alpha}{\partial t}(s,t) = \sum \frac{\partial \tilde{\alpha}_i}{\partial t}(s,t) \cdot \frac{\partial}{\partial x_i}\vert_{\alpha(s,t)}$$
with $\tilde{\alpha}_i= x \circ \alpha \cdot e_i$.
I want to show that the Lee bracket disappears i.e $[ \frac{\partial \alpha}{\partial s}(s,t), \frac{\partial \alpha}{\partial t}(s,t)] = 0$ (needed to prove the jacobi equation).
If $$\frac{\partial \alpha}{\partial s}(s,t) = \sum a_i \cdot \frac{\partial}{\partial x_i}\vert_{\alpha(s,t)},$$
$$\frac{\partial \alpha}{\partial s}(s,t) = \sum b_i \cdot \frac{\partial}{\partial x_i}\vert_{\alpha(s,t)},$$
$$[ \frac{\partial \alpha}{\partial s}(s,t), \frac{\partial \alpha}{\partial t}(s,t)] = \sum c_i\frac{\partial}{\partial x_i}\vert_{\alpha(s,t)}$$
then local computations for the Lie-Bracket yield
$$c_k = \sum_i a_i \frac{\partial}{\partial x_i} b_k - b_i \frac{\partial}{\partial x_i} a_k$$
together with the above, one has
$$c_k= \frac{\partial \tilde{\alpha}_i}{\partial s}(s,t) \frac{\partial}{\partial x_i} \frac{\partial \tilde{\alpha}_k}{\partial t}(s,t) - \frac{\partial \tilde{\alpha}_i}{\partial t}(s,t) \frac{\partial}{\partial x_i} \frac{\partial \tilde{\alpha}_k}{\partial s}(s,t)$$
But the partial derivatives with $x_i$ dont make much sense. Somewhere I made a mistake. I am gratefull for suggestions.
There is no mistake, but it is confusing. The reason is that $\frac{\partial \alpha}{\partial s}$ defines a vector in $T_{\alpha(s,t)}M$ for each $s, t$, but this does not necessarily define a vector field. So it is not clear how to interpret the lie bracket.
If $\alpha$ is locally a diffeomorphism, then there are inverse function $s(x_1,x_2)$ and $t(x_1,x_2)$, so that $\alpha (s(x_1,x_2), t(x_1,x_2) ) = (x_1,x_2)$. So in the expressions like: $$\frac{\partial \tilde{\alpha}_k}{\partial t}(s,t) =$$ the $s$ and $t$ really depend on $x_1, x_2$ so that the derivatives like: $$\frac{\partial}{\partial x_i} \frac{\partial \tilde{\alpha}_k}{\partial t}(s,t)$$ make perfect sense.
• If $\alpha$ is smooth the Lie bracket is defined at least locally by the implicit function theorem. The statement I want is something like Lemma 9.2 in Milnors Morse Theory (Page 52). Aug 28 '15 at 5:53
• In lemma 9.2, they are covariant derivatives. Covariant derivatives are different then lie brackets. In particular, in order for $\nabla_u v$ to be well defined at $p \in M$, $v$ needs to be a vector field around $p$, while $u$ only need be a vector in $T_p M$. Whereas, in $[u,v]$ both need to be vector fields. Aug 28 '15 at 9:28
• The curvature tensor makes perfect sense even if the vectors fields are not locally defined. Why can't I do $R(X,Y) Z$ if $X, Y, Z$ are in the same tangent space? Also, what did you mean by saying that the lie bracket is defined by implicit function theorem? Finally, why do you need this fact for Jacobi theorem? Aug 28 '15 at 18:54 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9487905502319336, "perplexity": 186.46770222486694}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-05/segments/1642320305052.56/warc/CC-MAIN-20220127012750-20220127042750-00609.warc.gz"} |
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3212071/?tool=pubmed | Nanoscale Res Lett. 2011; 6(1): 533.
Published online 2011 Sep 30.
PMCID: PMC3212071
# Facile method to synthesize magnetic iron oxides/TiO2 hybrid nanoparticles and their photodegradation application of methylene blue
## Abstract
Many methods have been reported to improving the photocatalytic efficiency of organic pollutant and their reliable applications. In this work, we propose a facile pathway to prepare three different types of magnetic iron oxides/TiO2 hybrid nanoparticles (NPs) by seed-mediated method. The hybrid NPs are composed of spindle, hollow, and ultrafine iron oxide NPs as seeds and 3-aminopropyltriethyloxysilane as linker between the magnetic cores and TiO2 layers, respectively. The composite structure and the presence of the iron oxide and titania phase have been confirmed by transmission electron microscopy, X-ray diffraction, and X-ray photoelectron spectra. The hybrid NPs show good magnetic response, which can get together under an external applied magnetic field and hence they should become promising magnetic recovery catalysts (MRCs). Photocatalytic ability examination of the magnetic hybrid NPs was carried out in methylene blue (MB) solutions illuminated under Hg light in a photochemical reactor. About 50% to 60% of MB was decomposed in 90 min in the presence of magnetic hybrid NPs. The synthesized magnetic hybrid NPs display high photocatalytic efficiency and will find recoverable potential applications in cleaning polluted water with the help of magnetic separation.
Keywords: magnetic iron oxide nanoparticles, TiO2, hybrid structure, photocatalyst, methylene blue
## Introduction
Extended and oriented nanostructures are desirable for many applications, but facile fabrication of complex nanostructures with controlled crystalline morphology, orientation, and surface architectures remains a significant challenge [1]. Among their various nanostructured materials, magnetic NPs-based hybrid nanomaterials have attracted growing interests due to their unique magnetic properties. These functional composite NPs have been widely used in various fields, such as magnetic fluids, data storage, catalysis, target drug delivery, magnetic resonance imaging contrast agents, hyperthermia, magnetic separation of biomolecules, biosensor, and especially the isolation and recycling of expensive catalysts [2-12]. To this end, magnetic iron oxide NPs became the strong candidates, and the application of small iron oxide NPs has been practiced for nearly semicentury owing to its simple preparation methods and low cost approaches [13].
Currently, semiconductor NPs have been extensively used as photocatalyst. TiO2 NPs have been used as aphotocatalytic purification of polluted air or wastewater, will become a promising environmental remediation technology because of their high surface area, low cost, nontoxicity, high chemical stability, and excellent degradation for organic pollutants [14-17]. Moreover, TiO2 also bears tremendous hope in helping to ease the energy crisis through effective utilization of solar energy based on photovoltaic and water-splitting devices [18-21]. As comparing with heterogeneous catalysts, many homogenerous catalytic systems have not been commericalized because of one major disadvantage: the difficulty of separation the reaction product from the catalyst and from any reaction solvent for a long and sustained environment protection [22]. In addition, there are two bottleneck drawbacks associated with TiO2 photocatalysis currently, namely, high charge recombination rate inherently and low efficiency for utilizing solar light, which would greatly hinder the commercialization of this technology [23]. Currently, the common methods are metals/non-metals-doping or its oxides-doping to increasing the utilization of visible light and enhancing the separation situation of charge carriers [24-27]. More importantly, the abuse and overuse of photocatalyst will also pollute the enviroment.
In this point, magnetic separation provides a convenient method to removing pollutants and recycling magnetized species by applying an appropriate external magnetic field. Therefore, immobilization of TiO2 on magnetic iron oxide NPs has been investigated intensely due to its magnetic separation properties [28-32]. Indeed, the study of core-shell magnetic NPs has a wide range of applications because of the unique combination of the nanoscale magnetic iron oxide core and the functional titania shell. Although some publications reported the synthesis of iron oxide-TiO2 core-shell nanostructure, these reported synthesis generally employed solid thick SiO2 interlayer. For instance, Chen et al. reported using TiO2-coated Fe3O4 (with a silica layer) core-shell structure NPs as affinity probes for the analysis of phosphopeptides and as a photokilling agent for pathogenic bacteria [33,34]. Recently, Wang et al. reported the synthesis of (γ-Fe2O3@SiO2)n@TiO2 functional hybrid NPs with high photocatalytic efficiency [35]. Generally, immobilization of homogeneous catalysts usually decreases the catalytic activity due to the problem of diffusion of reactants to the surface-anchored catalysts [36]. In order to increase the active surface area, hollow and ultrafine iron oxide NPs are employed in this paper. Moreover, we proposed a new utilization of magnetic NPs as a catalyst support by modifying the surface on three different-shaped amino-functionalized iron oxide NPs with an active TiO2 photocatalytic layer via a seed-mediate method, as shown in Figure Figure1.1. The surface amines on the magnetic iron oxide NPs can serve as functional groups for further modification of titania. We discuss the formation mechanism of iron oxide/TiO2 hybrid NPs. The results maybe provide some new insights into the growth mechanism of iron oxide-TiO2 composite NPs. It is shown that the as-synthesized iron oxide/TiO2 hybrid NPs display good magnetic response and photocatalytic activity. The magnetic NPs can be used as a MRCs vehicle for simply and easily recycled separation by external magnetic field application.
Illustration of the synthetic chemistry and process of magnetic iron oxide/TiO2 hybrid NPs preparation.
## Experiment
### Reagents and materials
FeCl3·6H2O, FeCl2·4H2O, FeSO4·7H2O, and KOH were purchased from Tianjin Kermel Chemical Reagent Co., Ltd. (Tianjin, China); KNO3, L(+)-glutamic acid (Gla, C5H9NO4), tetrabutyl titanate (Ti(Bu)4, Bu = OC4H9, CP) and methylene blue were purchased from Sinopharm Chemical Reagent CO., Ltd. (Shanghai, China); cetyltrimethylammmonium bromide (CTAB, C19H42BrN, ultrapure), MB and hexamethylenetetramine (C6H12N4) were purchased from Aladdin Chemical Reagent CO., Ltd. (Shanghai, China); 3-aminopropyltriethyloxysilane (APTES) were purchased from Sigma (St. Louis, MO, USA), and all the reagents are analytical pure and used as received.
### Preparation of iron oxide seeds
#### A. Spindle hematite NPs
According to Ishikava's report [37], we take a modified method to prepare the monodisperse spindle hematite NPs, in a typical synthesis, 1.8 ml of a 3.7 M FeCl3·6H2O solution was added dropwise into 4.5 × 10-4 M NaH2PO4 solution at 95°C and the mixture was aged at 100°C for 12 h. The resulting precipitates were washed with a 1 M ammonia solution and doubly distilled water and finally dried under vacuum.
#### B. Hollow magnetite NPs
According to our previous report [38], in a typical synthesis, solution A was prepared by dissolving 2.02 g KNO3 and 0.28 g KOH in 50 mL double distilled water, solution B was prepared by dissolving 0.070 g FeSO4·7H2O in 50 mL double distilled water. Then the two solution were mixed together under magnetic stirring at a rate of ca. 400 rpm. Two minutes later, solution C (0.18 g Gla in 25 mL double distilled water) was added dropwise into the mixed solution. The reaction temperature was raised increasingly to 90°C and kept 3 h under argon (Ar) atmosphere. Meanwhile, the brown solution was observed to change black. After the mixture was cooled to room temperature, the precipitate products were magnetically separated by MSS, washed with ethanol and water two times, respectively, and then redispersed in ethanol.
#### C. Ultrafine magnetite NPs
The ultrafine magnetite NPs were prepared through the chemical co-precipitation of Fe(II) and Fe(III) chlorides (FeII/FeIII ratio = 0.5) with 0.5 M NaOH [39]. The black precipitate was collected on a magnet, followed by rinsing with water several times until the pH reached 6 to 7.
### Preparation of amino-functionalized iron oxide NPs
A solution of APTES was added into the above seed suspensions, stirred under Ar atmosphere at 25°C for 4 h. The prepared APTES-modified seeds were collected with a magnet, and washed with 50 mL of ethanol, followed by double distilled water for three times [40].
### Preparation of iron oxides/TiO2 hybrid NPs
In a typical synthesis, 0.2 g amino-functionalized seeds, 0.2 g CTAB, and 0.056 g HMTA were dissolved in 25 ml ethanol solution under ultrasonic condition at room temperature. The mixture solution was then transferred into a Teflon-lined tube reactor. Then, 1 ml Ti(Bu)4 dropwise added in the tube, and was kept at 150°C for 8 h.
The prepared samples were weighed and added into 80 mL of methylene blue solutions (12 mg/L). The mixed solutions were illuminated under mercury lamp (OSRAM, 250 W with characteristic wavelength at 365 nm), and the MB solutions were illuminated under UV light in the photochemical reactor. The solutions were fetched at 10-min intervals by pipette for each solution and centrifuged. Then, the time-dependent absorbance changes of the transparent solution after centrifugation were measured at the wavelength between 500 and 750 nm.
### Characterization
TEM images were performed with a JEOL JEM-2010 (HT) (JEOL, Tokyo, Japan) transmission electron microscope operating at 200 kV, and the samples were dissolved in ethanol and dropped on super-thin cabon coated copper grids. SEM studies were carried out using a FEI Sirion FEG operating at 25 keV, samples were sprinkled onto the conductive substrate, respectively. Powder X-ray diffraction (XRD) patterns of the samples were recorded on a D8 Advance X-ray diffractometer (Germany) using Cu Kα radiation (λ = 0.1542 nm) operating at 40 kV and 40 mA and with a scan rate of 0.05° 2θ s-1. X-ray photoelectron spectroscopy (XPS) measurements were made using a VG Multilab2000X. This system uses a focused Al exciting source for excitation and a spherical section analyzer. The percentages of individual elements detection were determined from the relative composition analysis of the peak areas of the bands. Magnetic measurements were performed using a Quantum Design MPMS XL-7 SQUID magnetometer. The powder sample was filled in a diamagnetic plastic capsule, and then the packed sample was put in a diamagnetic plastic straw and impacted into a minimal volume for magnetic measurements. Background magnetic measurements were checked for the packing material. The diffuse reflectance, absorbance and transmittance spectra, and photodegradation examination of the microspheres was carried out in a PGeneral TU-1901 spectrophotometer.
## Results and discussion
### Formation mechanism and morphology
For the synthesis of the functional hybrid nanomaterials, we synthesized the colloidal solutions of iron oxides NPs with different shapes in ethanol at the first. These iron oxide NPs exhibit long sedimentation time, and are stable against agglomeration for several days. Then, iron oxides NPs were modified with amino group by APTES because silane can render highly stability and water-dispersibility, and it also forms a protective layer against mild acid and alkaline environment. As shown in Figure Figure2,2, hydroxyl groups (-OH) on the magnetite surface reacted with the -OH of the APTES molecules leading to the formation of Si-O bonds and leaving the terminal -NH2 groups available for immobilization of TiO2 [41]. The immobilization of TiO2 can be explained by HSAB (hard and soft acids and bases) formula [42]. As a typical hard acid, Ti ions can be combined to the terminal -NH2 groups (hard bases) easily, owing to there is small amount water in ethanol (95%), and then TiO2 will be coated on the surface of amino-functionalized iron oxide NPs by hydrolysis and poly-condensation as follows:
(1)
(2)
Illustration of the functionalization process of iron oxides NPs with amino group by APTES.
We prepared the monodisperse spindle-like iron oxide NPs by ferric hydroxide precipitate method for evaluating and verifying our experimental mechanism and functional strategies. The electron micrograph of the starting weak-magnetic spindle-like hematite NPs are shown in Figure Figure3a,3a, which have longitudinal diameter in the range from 120 to 150 nm and transverse diameter (short axis) around 40 nm. After TiO2 coating (FT-1), the transverse diameter increased to around 50 nm, and the representative image is shown in Figure Figure3b.3b. Moreover, the obvious contrast differences between the pale edges and dark centers further clearly confirms the composite structure. Therefore, the results reveal that this functional strategy for fabricating the TiO2-functionalized iron oxide NPs is a feasible approach. Then, two strong magnetic iron oxide NPs with different shape and diameter as seeds were employed to fabricate the magnetic TiO2 hybrid materials. As shown in Figure Figure3c,3c, Fe3O4 NPs with an obviously hollow structure have diameters around 100 nm, and the insert field-emission SEM image illustrates the hollow NPs present sphere-like shape. In our previous report, we have confirmed that the hollow Fe3O4 NPs were formed by oriented aggregation of small Fe3O4 NPs [38]. Figure Figure3d3d shows bright field TEM image of the corresponding iron oxide NPs after the same TiO2 coating process (FT-2). However, the hybrid NPs present a shagginess sphere-like shape and cannot observe the hollow structure. Additionally, the diameters of hybrid NPs increased about 5 to 10 nm. The results reveal that the hollow Fe3O4 NPs have been covered by TiO2. Owing to the loose struture of Fe3O4 seeds, TiO2 will fill to its internal and surface, and finally cause the hybrid products present a solid nature. The diameter of above two different iron oxide NPs including spindle-like and hollow is relatively large, subsequently, we employ the ultrafine Fe3O4 NPs as seeds to fabricate the hybrid NPs. Figure Figure3e3e presents the TEM images of ultrafine Fe3O4 NPs without any size selection, the size is about 5 to 8 nm. By introduce the TiO2, the as-obtained products (FT-3) exhibit an aggregated nature and the ultrafine Fe3O4 NPs dispersing in the TiO2 matrix, as shown in Figure Figure3f3f.
Representative TEM images of naked iron oxides and iron oxides/TiO2 hybrid NPs. The insert in (c) is the corresponding SEM image.
### Structure and composition
XRD and XPS surface analysis was used to further confirm the structure and composition of iron oxides/TiO2 hybrid NPs. Figure Figure4a4a shows the XRD patterns of the as-synthesized α-Fe2O3 seeds and α-Fe2O3/TiO2 (FT-1). From the XRD patterns of α-Fe2O3 seeds, it can be seen that the diffraction peaks conformity with that of rhombohedral α-Fe2O3 (JCPDS no. 33-0664, show in the bottom). After coating, compared with that data of JCPDS no. 33-0664 and JCPDS no. 21-1272 (pure anatase TiO2 phase), the (101) and (200) peaks of anatase TiO2 can be found in FT-1, suggesting that α-Fe2O3/TiO2 composite NPs are successfully fabricated by this method. Figure Figure4b4b shows the XRD patterns of the as-synthesized Fe3O4 seeds and Fe3O4/TiO2 (FT-2 and FT-3). All peaks in the XRD patterns of both seeds can be perfectly indexed to the cubic Fe3O4 structure (JCPDS no. 19-0629, show in the bottom). After coating, the (101) peak of anatase TiO2 can be clearly found in FT-2 and FT-3, suggesting that Fe3O4/TiO2 hybrid NPs are successfully synthesized.
XRD patterns. Patterns of the as-prepared spindle-like α-Fe2O3 NPs and FT-1 (a), as-prepared hollow and ultrafine Fe3O4 NPs, FT-2 and FT-3 (b).
Figure Figure55 is the typical XPS spectra of the naked, amino-functionalized, and titania coating ultrafine Fe3O4 NPs, where part (a) is the survey spectrum and parts (b) to (d) are the high-resolution binding energy spectrum for Fe, Si, O, and Ti species, respectively. According to the survey spectrum, the elements of Fe, O, and C are found in the naked ultrafine Fe3O4 NPs, of which the element of C is found on the surface as the internal reference, and the elements of Fe and O arise from the components of Fe3O4. The new signals of N 1s, Si 2s, and Si 2p are observed in APTES-coated Fe3O4 NPs, and the new signal of Ti 2p signals is observed in FT-3 hybrid NPs. These results indicate that the FT-3 are composed of two components, silane functionalized Fe3O4 and TiO2. It is noteworthy that many studies demonstrated that if particles possessed a real core and shell structure, the core would be screened by the shell and the compositions in the shell layer became gradually more dominant, the intensity ratio of the shell/core spectra would gradually increase [43-47]. The gradually subdued XPS signals of Fe after TiO2 coating are discerned in Figure Figure5b.5b. APTES coating increases the intensity of carbon and oxygen, and decreases the concentration of Fe; further TiO2 coating decreases the intensity of silicon and Fe (as shown in Figure 5b, c). Therefore, after TiO2 coating, corresponding XPS signals of Fe, and Si rule also are decreased, C and O do not match with this rule due to the formation of TiO2 and surfactant impurities (as shown in Figure 5d, e). Additionally, interactions should exist among APTES-coated Fe3O4 NPs and titania which cause the shift of binding energy of Fe. Usually, XPS measures the elemental composition of the substance surface up to 1 to 10 nm depth. Therefore, XPS could be regarded as a bulk technique due to the ultrafine particles size of the FT-3 (less than 10 nm). The XPS result indicates that the amino-functionalized Fe3O4 seeds have been coated by a TiO2 layer, thus greatly reducing the intensity signals of the element inside. Table Table11 lists the binding energy values of Fe, Si, O, N, and Ti resolved from XPS spectra of the above three different NPs. In three cases, the value of binding energy of Fe 2p and other elements are very close to the standard binding energy values. Relative to the standard values [48], the binding energy values in FT-3 have decreased and this result is in agreement with the previous discussions.
XPS spectra of the naked, amino-functionalized, and titania coating ultrafine Fe3O4 NPs. XPS spectra for ultrafine Fe3O4 NPs (curve a), APTES-coated ultrafine Fe3O4 NPs (curve b) and ultrafine Fe3O4/TiO2 hybrid NPs (curve c) comparison (a), the regions ...
Standard binding energy values
Furthermore, XPS surface analysis is also used to quantify the amount of titanium and iron present in the near surface region of the three different hybrid NPs. Figure Figure66 is the typical XPS spectra of the FT-1, FT-2, and FT-3, where part (a) is the survey spectrum and parts (b)-(d) are the high-resolution binding energy spectrum for Fe, Si, O, C, N, and Ti species, respectively. According to the survey spectrum, all hybrid NPs exhibited typical binding energies at the characteristic peaks of Ti 2p, Fe 2p, Si 2p, N 1s and O1s in the region of 458, 710, 103, 400, and 530 eV, respectively. Details of the XPS surface elemental composition results of as-obtained products are shown in Table Table2.2. The XPS data of the titanium-to-iron ratio of hybrid NPs is calculated in which the elemental composition ratio of FT-1, FT-2, and FT-3 (titanium/iron) are about 2:1, 3.5:1, and 5.5:1. The results reveal that the quantity of Ti element is higher than that of Fe element on the surface of samples. That is, it may deduce that iron oxide NPs have been coated by TiO2. In all hybrid NPs, the amount of oxygen to titanium or iron calculated from XPS data is about 5:1, this results is in agreement with the other reports [49]. Nevertheless, the combined results from TEM and XPS suggest that the synthesized hybrid NPs are composed of amino-functionalized iron oxide NPs and TiO2.
XPS spectra of the FT-1, FT-2, and FT-3. XPS spectra for FT-1 (curve a), FT-2 (curve b), and FT-3 (curve c) comparison (a), the regions for C 1s (b), O 1s (c), N 1s (d), Si 2p (e), Fe 2p (f), and Ti 2p (g), comparison respectively.
Surface elemental composition and XPS binding energies of FT-1, FT-2, and FT-3
### Magnetic and magnetic response properties
Magnetic measurements of the hybrid NPs were performed on a SQUID magnetometer. As shown in Figure Figure7,7, hysteresis loops demonstrate that FT-2 and FT-3 have no hysteresis, the forward and backward magnetization curves overlap completely and are almost negligible. Moreover, the NPs have zero magnetization at zero applied field, indicating that they are superparamagnetic at room temperature, no remnant magnetism was observed when the magnetic field was removed [50]. Superparamagnetism occurs when the size of the crystals is smaller than the ferromagnetic domain (the size of iron oxide NPs should less than 30 nm), the size of the ultrafine Fe3O4 component in our product is less than 10 nm, and the hollow Fe3O4 is consist of small magnetite NPs, there are reasonable to suppose that the hybrid NPs showed superparamagnetic behavior. The results reveal that the products have been inherit the superparamagnetic property from the Fe3O4 NPs, and the saturation magnetization value (Ms) of naked hollow Fe3O4 and ultrafine Fe3O4 is 89.2 and 72.1 emu/g, respectively. After TiO2 coating, the corresponding value of Ms decreases to 16.2 and 5.0 emu/g, respectively. The Ms decreased significantly after coating with TiO2 due to the surface effect arising from the non-collinearity of magnetic moments, which may be due to the coated TiO2 is impregnated at the interface of iron oxide matrix and pinning of the surface spins [51]. Moreover, this decrease in magnetic behavior is very close to other reports [52,53]. As the most stable iron oxide NPs in the ambient conditions, the magnetic properties of hematite are not well understood [54-56]. We checked the magnetic properties of FT-1 hybrid NPs, the Ms is about 2 × 10-4 emu/g, and the composite NPs exhibit a typical ferromagnetism. Thereby, as a weak magnetic hybrid NPs, FT-1 cannot be separate by common magnet.
Magnetization vs. filed dependence curves of iron oxides and hybrid NPs. Recorded at T = 300 K. Insert shows the M-H curve of FT-1 samples.
We checked the magnetic responsibility of FT-2 and FT-3 hybrid NPs under the external applied magnetic field by a common magnet. As shown in Figure Figure8,8, both hybrid NPs gather quickly without residues left in the solid and solution state when the magnet presence. The gathered hybrid NPs can be redispersed in the solution easily by a slight shake. The results illustrate that the hybrid NPs display a good magnetic response, and this is also important for the industrial application in water cleaning as MRCs for preventing loss of materials and save cost.
Photographs showing the magnetic separation of the FT-2 and FT-3 in solid and solution state. At the presence of magnet (take from the MSS).
### Optical adsorption and photocatalytic properties
The three different hybrid NPs were further characterized by UV-vis absorption spectra to compare their optical adsorption properties and the results are shown in Figure Figure9a.9a. The spectra highlight a strong adsorption in the UV region, the results are in agreement with the other reports [57,58]. It is noteworthy that the hybrid NPs with different morphology (at same concentration) will cause the difference of adsorption intensity and peak location. Due to the small dimensions of semiconductor NPs, a discretization of the bandgap occurs with decreasing particle size, leading to smaller excitation frequencies. A blue shift of FT-3 is observed in the extinction behavior, and the absorption edge is positioned at smaller wavelengths [59]. The result confirms that the diameter of FT-1 hybrid NPs is large than the other two different types hybrid NPs. Additionally, a concomitant tail can be clearly observed in the visible region of the absorption curve owing to scattering losses induced by the large number of inorganic NPs in the composite nanostructure [60].
UV-vis absorbance spectrum and bandgap energy. UV-vis absorbance spectrum (a) and bandgap energy (b) of FT-1 (curve a), FT-2 (curve b) and FT-3 (curve c) hybrid NPs.
In order to calculate the bandgap of hybrid NPs, the relationship between the absorption coefficient (α) and the photon energy (hν) have been given by equation as follows: αhv = A(hv-EE)m, where A is a constant, Eg is the bandgap energy, hν is the incident photon energy and the exponent m depends on the nature of optical transition. The value of m is 1/2 for direct allowed, 2 for indirect allowed, 3/2 for direct forbidden, and 3 for indirect forbidden transitions [61]. The main mechanism of light absorption in pure semiconductors is direct interband electron transitions. The absorption coefficient α has been calculated from the Lamberts formula [62], $α=1tln1T$, where T and t are the transmittance (can be directly measured by UV-vis spectra) and path length of the colloids solution (same concentration), respectively. A typical plot of (αhν)2 versus photon energy (hν) for the samples are shown in Figure Figure9b.9b. The value of FT-1, FT-2, and FT-3 is 2.85, 2.89, and 2.73 eV, respectively.TiO2 is important for its application in energy transport, storage, and for the environmental cleanup due to its well known photocatalytic effect with a bandgap of 3.2 eV [63]. Comparing with the pure TiO2 NPs, the bandgap of hybrid NPs is obviously decreased, and the absorption edge generates obvious red shift. This red shift is attributed to the charge-transfer transition between the electrons of the iron oxide NPs and the conduction band (or valence band) of TiO2 [64]. Iron oxide NPs can increase energy spacing of the conduction band in TiO2 and finally lead to the quantization of energy levels and causes the absorption in the visible region. The other is that amino groups can act as a substitutional dopant for the place of titanium and change metal coordination of TiO2 and the electronic environment around them [65]. Similar phenomenon of red shift in the bandgap for iron oxide/TiO2 hybrid NPs were also found by other reports [53,65-67].
The photocatalytic activity was examined by a colorant decomposition test using MB, which is very stable chemical dye under normal conditions. In general, absorption spectra can be used to measure the concentration changes of MB in extremely dilute aqueous solution. The MB displays an absorption peak at the wavelength of about 664 nm. Time-dependent photodegradation of MB is shown in Figure Figure10.10. It is illustrated that MB decomposes in the presence of magnetic TiO2 hybrid materials. Generally, the pure TiO2 NPs can decompose 40% MB in 90 min [68-70]. In our previous report, the pure TiO2 NPs with a average diameter of 5 nm can be decomposed 53% MB in 90 min [71]. However, in our system, 49.0%, 56.5%, and 49.6% MB decomposed by FT-1, FT-2, and FT-3 in 90 min, respectively. The result reveals that the introduction of iron oxide NPs not only improve the photocatalytic activity but also employ the corresponding magnetic properties from itself. Thus, the as-synthesized magnetic hybrid NPs with high photocatalytic efficiency are very potentially useful for cleaning polluted water with the help of magnetic separation. The photocatalytic degradation generally follows a Langmuir-Hinshelwood mechanism, which could be simplified as a pseudo-first order reaction as follows [72,73]: $r=-dCtdt=kCt$, where r is the degradation rate of reactant, C is the concentration of reactant, k is the apparent reaction rate constant. The k for FT-1, FT-2, and FT-3 was 1.066% min-1, 1.331% min-1, 1.054% min-1, respectively. It was surprising that the FT-2 exhibited such higher activity. This may be explained by light absorption capability of the FT-2 due to their rough shell contributes to the good photocatalytic activity. Compared to smooth surface, the rough surface layers can absorb more light because the UV-vis light can have multiple-reflections among the shagginess surface structure [74].
Changes of MB concentration photocatalytic degradation in the presence of samples. (a) Without samples, (b) pure TiO2 (5 nm), (c) FT-1, (d) FT-2, and (e) FT-3, and the insert is the correspondingly logarithmic coordinate versus time and liner fitting ...
## Conclusions
In summary, MRCs have been fabricated via a facile seed-mediate technology. These iron oxide/TiO2 hybrid NPs were synthesized in a stepwise process. First, three different shapes of naked iron oxide NPs were prepared. Next, amino groups encapsulated iron oxide NPs are synthesized by APTES modification. Finally, the iron oxide/TiO2 hybrid NPs can be obtained after the TiO2 coating. The FT-2 and FT-3 hybrid NPs show superparamagnetic and both display good photocatalytic properties. This MRCs combination of the photocatalysis properties of TiO2 and the superparamagnetic property of Fe3O4 NPs endows this material with a bright perspective in purification of polluted wastewater. Additionally, this work also discusses the formation mechanism and potentially provided a general method for synthesizing nanocomposites of magnetic iron oxide NPs and other functional NPs, which may find wider applications besides in photocatalysis.
## Competing interests
The authors declare that they have no competing interests.
## Authors' contributions
WW participated in the materials preparation, data analysis and drafted the manuscript. SZ, XX and RF participated in the sample characterization. CZ participated in its design and coordination. All authors read and approved the final manuscript.
## Acknowledgements
The authors thank the National Basic Research Program of China (973 Program, no. 2009CB939704), the National Nature Science Foundation of China (nos. 91026014, 10905043, 11005082), the Fundamental Research Funds for the Central Universities and the PhD candidates self-research (including 1 + 4) program of Wuhan University in 2008 (no. 20082020201000008) for financial support. W. Wu thanks L. Lin, L. Zeng, Z. H. Wu, and Prof. Q. G. He of HUT for assistance with the photodegradation measurements.
## References
• Tian ZRR, Voigt JA, Liu J, McKenzie B, McDermott MJ, Rodriguez MA, Konishi H, Xu HF. Complex and oriented ZnO nanostructures. Nat Mater. 2003;2:821–826. doi: 10.1038/nmat1014. [PubMed]
• Dobson J. Magnetic nanoparticles for drug delivery. Drug Dev Res. 2006;67:55–60. doi: 10.1002/ddr.20067.
• Wu W, He QG, Jiang CZ. Magnetic iron oxide nanoparticles: synthesis and surface functionalization strategies. Nanoscale Res Lett. 2008;3:397–415. doi: 10.1007/s11671-008-9174-9. [PubMed]
• Shokouhimehr M, Piao YZ, Kim J, Jang YJ, Hyeon T. A magnetically recyclable nanocomposite catalyst for olefin epoxidation. Angew Chem Int Ed. 2007;46:7039–7043. doi: 10.1002/anie.200702386. [PubMed]
• Babes L, Denizot B, Tanguy G, Le Jeune JJ, Jallet P. Synthesis of iron oxide nanoparticles used as MRI contrast agents: a parametric study. J Colloid Interface Sci. 1999;212:474–482. doi: 10.1006/jcis.1998.6053. [PubMed]
• Yao Y, Huang J, Yang J, McIntyre T, Chen J. Multimodality based diagnosis and treatment of breast cancer cells by magnetic nanoparticles coated by a gold shell with hyperthermia and radiation therapy. Radiother Oncol. 2007;84:S78–S78.
• Qian ZY, Men K, Zeng S, Gou ML, Guo G, Gu YC, Luo F, Zhao X, Wei YQ. Preparation of magnetic microspheres based on Poly(epsilon-caprolactone)-Poly(ethylene glycol)-Poly(epsilon-caprolactone) copolymers by modified solvent diffusion method. J Biomed Nanotechnol. 2010;6:287–292. doi: 10.1166/jbn.2010.1125. [PubMed]
• Arkhis A, Elaissari A, Delair T, Verrier B, Mandrand B. Capture of enveloped viruses using polymer tentacles containing magnetic latex particles. J Biomed Nanotechnol. 2010;6:28–36. doi: 10.1166/jbn.2010.1093. [PubMed]
• He NY, Liu HN, Li S, Tian L, Liu LS. A novel single nucleotide polymorphisms detection sensors based on magnetic nanoparticles array and dual-color single base extension. J Nanosci Nanotechnol. 2010;10:5311–5315. doi: 10.1166/jnn.2010.2386. [PubMed]
• Li ZY, He L, He NY, Shi ZY, Wang H, Li S, Liu HN, Dai YB. An applied approach in detecting E. coli O157:H7 using immunological method based on chemiluminescence and magnetic nanoparticles. Acta Chim Sinica. 2010;68:251–256.
• He NY, Li ZY, He L, Shi ZY, Wang H, Li S, Liu HN, Wang ZF. Preparation of SiO2/polymethyl methacrylate/Fe3O4 nanoparticles and its application in detecting E. coli O157:H7 using chemiluminescent immunological method. J Biomed Nanotechnol. 2009;5:505–510. doi: 10.1166/jbn.2009.1070. [PubMed]
• He NY, Tian L, Li S, Liu HN, Wang ZF. An automated MagStation for high-throughput single nucleotide polymorphism genotyping and the dual-color hybridization. J Biomed Nanotechnol. 2009;5:511–515. doi: 10.1166/jbn.2009.1066. [PubMed]
• Gupta AK, Gupta M. Synthesis and surface engineering of iron oxide nanoparticles for biomedical applications. Biomaterials. 2005;26:3995–4021. doi: 10.1016/j.biomaterials.2004.10.012. [PubMed]
• Janus M, Tryba B, Kusiak E, Tsumura T, Toyoda M, Inagaki M, Morawski A. TiO2 nanoparticles with high photocatalytic activity under visible light. Catal Lett. 2009;128:36–39. doi: 10.1007/s10562-008-9721-0.
• Hou YD, Wang XC, Wu L, Chen XF, Ding ZX, Wang XX, Fu XZ. N-doped SiO2/TiO2 mesoporous nanoparticles with enhanced photocatalytic activity under visible-light irradiation. Chemosphere. 2008;72:414–421. doi: 10.1016/j.chemosphere.2008.02.035. [PubMed]
• Wu ZB, Gu ZL, Zhao WR, Wang HQ. Photocatalytic oxidation of gaseous benzene over nanosized TiO2 prepared by solvothermal method. Chin Sci Bull. 2007;52:3061–3067. doi: 10.1007/s11434-007-0456-x.
• Wang WJ, Zhang JL, Chen F, He DN, Anpo M. Preparation and photocatalytic properties of Fe3+-doped Ag@TiO2 core-shell nanoparticles. J Colloid Interface Sci. 2008;323:182–186. doi: 10.1016/j.jcis.2008.03.043. [PubMed]
• Kwak ES, Lee W, Park NG, Kim J, Lee H. Compact inverse-opal electrode using non-aggregated TiO2 nanoparticles for dye-sensitized solar cells. Adv Funct Mater. 2009;19:1093–1099. doi: 10.1002/adfm.200801540.
• Liu B, Aydil ES. Growth of oriented single-crystalline rutile TiO2 nanorods on transparent conducting substrates for dye-sensitized solar sells. J Am Chem Soc. 2009;131:3985–3990. doi: 10.1021/ja8078972. [PubMed]
• Zhao D, Peng TY, Lu LL, Cai P, Jiang P, Bian ZQ. Effect of annealing temperature on the photoelectrochemical properties of dye-sensitized solar cells made with mesoporous TiO2 nanoparticles. J Phys Chem C. 2008;112:8486–8494. doi: 10.1021/jp800127x.
• Baek IC, Vithal M, Chang JA, Yum JH, Nazeeruddin MK, Gratzel M, Chung YC, Seok SI. Facile preparation of large aspect ratio ellipsoidal anatase TiO2 nanoparticles and their application to dye-sensitized solar cell. Electrochem Commun. 2009;11:909–912. doi: 10.1016/j.elecom.2009.02.026.
• Cole-Hamilton DJ. Homogeneous catalysis-new approaches to catalyst separation, recovery, and recycling. Science. 2003;299:1702–1706. doi: 10.1126/science.1081881. [PubMed]
• Wang J, Jing LQ, Xue LP, Qu YC, Fu HG. Enhanced activity of bismuth-compounded TiO2 nanoparticles for photocatalytically degrading rhodamine B solution. J Hazard Mater. 2008;160:208–212. doi: 10.1016/j.jhazmat.2008.02.103. [PubMed]
• Lopez T, Recillas S, Guevara P, Sotelo J, Alvarez M, Odriozola JA. Pt/TiO2 brain biocompatible nanoparticles: GBM treatment using the C6 model in Wistar rats. Acta Biomater. 2008;4:2037–2044. doi: 10.1016/j.actbio.2008.05.027. [PubMed]
• Lv KL, Zuo HS, Sun J, Deng KJ, Liu SC, Li XF, Wang DY. (Bi, C and N) codoped TiO2 nanoparticles. J Hazard Mater. 2009;161:396–401. doi: 10.1016/j.jhazmat.2008.03.111. [PubMed]
• Xu JJ, Ao YH, Fu D, Yuan CW. Synthesis of Gd-doped TiO2 nanoparticles under mild condition and their photocatalytic activity. Colloid Surf A. 2009;334:107–111. doi: 10.1016/j.colsurfa.2008.10.017.
• Yue L, Zhang XM. Preparation of highly dispersed CeO2/TiO2 core-shell nanoparticles. Mater Lett. 2008;62:3764–3766. doi: 10.1016/j.matlet.2008.04.059.
• Li Y, Wu JS, Qi DW, Xu XQ, Deng CH, Yang PY, Zhang XM. Novel approach for the synthesis of Fe3O4@TiO2 core-shell microspheres and their application to the highly specific capture of phosphopeptides for MALDI-TOF MS analysis. Chem Commun. 2008. pp. 564–566. [PubMed]
• Mou F, Guan J, Xiao Z, Sun Z, Shi W, Fan XA. Solvent-mediated synthesis of magnetic Fe2O3 chestnut-like amorphous-core/γ-phase-shell hierarchical nanostructures with strong As(v) removal capability. J Mater Chem. 2011;21:5414–5421. doi: 10.1039/c0jm03726e.
• Guan JG, Mou FZ, Sun ZG, Shi WD. Preparation of hollow spheres with controllable interior structures by heterogeneous contraction. Chem Commun. 2010;46:6605–6607. doi: 10.1039/c0cc01044h. [PubMed]
• Guan JG, Tong GX, Xiao ZD, Huang X, Guan Y. In situ generated gas bubble-assisted modulation of the morphologies, photocatalytic, and magnetic properties of ferric oxide nanostructures synthesized by thermal decomposition of iron nitrate. J Nanopart Res. 2010;12:3025–3037. doi: 10.1007/s11051-010-9897-2.
• Tong G, Guan J, Zhang Q. Goethite hierarchical nanostructures: Glucose-assisted synthesis, chemical conversion into hematite with excellent photocatalytic properties. Mater Chem Phys. 2011;127:371–378. doi: 10.1016/j.matchemphys.2011.02.021.
• Chen CT, Chen YC. Fe3O4/TiO2 core/shell nanoparticles as affinity probes for the analysis of phosphopeptides using TiO2 surface-assisted laser desorption/ionization mass spectrometry. Anal Chem. 2005;77:5912–5919. doi: 10.1021/ac050831t. [PubMed]
• Chen WJ, Tsai PJ, Chen YC. Functional Fe3O4/TiO2 core/shell magnetic nanoparticles as photokilling agents for pathogenic bacteria. Small. 2008;4:485–491. doi: 10.1002/smll.200701164. [PubMed]
• Wang CX, Yin LW, Zhang LY, Kang L, Wang XF, Gao R. Magnetic (γ-Fe2O3@SiO2)n@TiO2 functional hybrid nanoparticles with actived photocatalytic ability. J Phys Chem C. 2009;113:4008–4011. doi: 10.1021/jp809835a.
• Yoon TJ, Lee W, Oh YS, Lee JK. Magnetic nanoparticles as a catalyst vehicle for simple and easy recycling. New J Chem. 2003;27:227–229. doi: 10.1039/b209391j.
• Ishikawa T, Matijevic E. Formation of monodispersed pure and coated spindle-type iron particles. Langmuir. 1988;4:26–31. doi: 10.1021/la00079a004.
• Wu W, Xiao XH, Zhang SF, Li H, Zhou XD, Jiang CZ. One-pot reaction and subsequent annealing to synthesis hollow spherical magnetite and maghemite nanocages. Nanoscale Res Lett. 2009;4:926–931. doi: 10.1007/s11671-009-9342-6. [PubMed]
• Massart R. Preparation of aqueous magnetic liquids in alkaline and acidic media. IEEE Trans Magn. 1981;17:1247–1248. doi: 10.1109/TMAG.1981.1061188.
• Wu W, He Q, Chen H. Silane bridged surface tailoring on magnetite nanoparticles. Bioinformatics and Biomedical Engineering. 2007.
• Wu W, He QG, Chen H, Tang JX, Nie LB. Sonochemical synthesis, structure and magnetic properties of air-stable Fe3O4/Au nanoparticles. Nanotechnology. 2007;18:145609. doi: 10.1088/0957-4484/18/14/145609.
• Pearson RG. Hard and soft acids and bases. J Am Chem Soc. 1963;85:3533–3539. doi: 10.1021/ja00905a001.
• Gillet JN, Meunier M. General equation for size nanocharacterization of the core-shell nanoparticles by X-ray photoelectron spectroscopy. J Phys Chem B. 2005;109:8733–8737. doi: 10.1021/jp044322r. [PubMed]
• Liu SY, Ma YH, Armes SP. Direct verification of the core-shell structure of shell cross-linked micelles in the solid state using X-ray photoelectron spectroscopy. Langmuir. 2002;18:7780–7784. doi: 10.1021/la020517j.
• Lu LH, Sun GY, Zhang HJ, Wang HS, Xi SQ, Hu JQ, Tian ZQ, Chen R. Fabrication of core-shell Au-Pt nanoparticle film and its potential application as catalysis and SERS substrate. J Mater Chem. 2004;14:1005–1009. doi: 10.1039/b314868h.
• Remita H, Etcheberry A, Belloni J. Dose rate effect on bimetallic gold-palladium cluster structure. J Phys Chem B. 2003;107:31–36. doi: 10.1021/jp021277j.
• Toshima N, Yonezawa T, Kushihashi K. Polymer-protected palladium-platinum bimetallic clusters: preparation, catalytic properties and structural considerations. J Chem Soc, Faraday Trans. 1993;89:2537–2543. doi: 10.1039/ft9938902537.
• Wagner CD, Riggs WW, Davis LE, Moulder JF, Muilenberg GE. Handbook of X-ray Photoelectron Spectroscopy. Eden Prairie: Perkin-Elmer Corporation, Physical Electronics Division; 1979.
• Tung WS, Daoud WA. New approach toward nanosized ferrous ferric oxide and Fe3O4-doped titanium dioxide photocatalysts. ACS Appl Mater Interfaces. 2009;1:2453–2461. doi: 10.1021/am900418q. [PubMed]
• Singh H, Laibinis PE, Hatton TA. Rigid, superparamagnetic chains of permanently linked beads coated with magnetic nanoparticles. Synthesis and rotational dynamics under applied magnetic fields. Langmuir. 2005;21:11500–11509. doi: 10.1021/la0517843. [PubMed]
• Selvan RK, Augustin CO, Sanjeeviraja C, Prabhakaran D. Effect of SnO2 coating on the magnetic properties of nanocrystalline CuFe2O4. Solid State Commun. 2006;137:512–516. doi: 10.1016/j.ssc.2005.12.018.
• Xuan SH, Jiang WQ, Gong XL, Hu Y, Chen ZY. Magnetically separable Fe3O4/TiO2 hollow spheres: Fabrication and photocatalytic activity. J Phys Chem C. 2009;113:553–558. doi: 10.1021/jp8073859.
• He QH, Zhang ZX, Xiong JW, Xiong YY, Xiao H. A novel biomaterial - Fe3O4:TiO2 core-shell nanoparticle with magnetic performance and high visible-light photocatalytic activity. Opt Mater. 2008;31:380–384. doi: 10.1016/j.optmat.2008.05.011.
• Bodker F, Hansen MF, Koch CB, Lefmann K, Morup S. Magnetic properties of hematite nanoparticles. Phys Rev B. 2000;61:6826–6838. doi: 10.1103/PhysRevB.61.6826.
• Mansilla MV, Zysler R, Fiorani D, Suber L. Annealing effects on magnetic properties of acicular hematite nanoparticles. Physica B-Condensed Matter. 2002;320:206–209. doi: 10.1016/S0921-4526(02)00683-X.
• Tadic M, Kusigerski V, Markovic D, Milosevic I, Spasojevic V. High concentration of hematite nanoparticles in a silica matrix: structural and magnetic properties. J Magn Magn Mater. 2009;321:12–16. doi: 10.1016/j.jmmm.2008.07.006.
• More AM, Gujar TP, Gunjakar JL, Lokhande CD, Joo OS. Growth of TiO2 nanorods by chemical bath deposition method. Appl Surf Sci. 2008;255:2682–2687. doi: 10.1016/j.apsusc.2008.08.003.
• Park JT, Koh JH, Koh JK, Kim JH. Surface-initiated atom transfer radical polymerization from TiO2 nanoparticles. Appl Surf Sci. 2009;255:3739–3744. doi: 10.1016/j.apsusc.2008.10.027.
• Segets D, Gradl J, Taylor RK, Vassilev V, Peukert W. Analysis of optical absorbance spectra for the determination of ZnO nanoparticle size distribution, solubility, and surface energy. Acs Nano. 2009;3:1703–1710. doi: 10.1021/nn900223b. [PubMed]
• Sciancalepore C, Cassano T, Curri ML, Mecerreyes D, Valentini A, Agostiano A, Tommasi R, Striccoli M. TiO2 nanorods/PMMA copolymer-based nanocomposites: highly homogeneous linear and nonlinear optical material. Nanotechnology. 2008;19:205705. doi: 10.1088/0957-4484/19/20/205705. [PubMed]
• Pankove JI. Optical Processes in Semiconductors. Mineola, New York: Courier Dover Publications; 1975.
• Wu W, Xiao XH, Peng TC, Jiang CZ. Controllable Ssynthesis and optical properties of connected zinc oxide nanoparticles. Chem-Asian J. 2010;5:315–321. doi: 10.1002/asia.200900378. [PubMed]
• Fujishima A, Honda K. Electrochemical photolysis of water at a semiconductor electrode. Nature. 1972;238:37–38. doi: 10.1038/238037a0. [PubMed]
• Chen X, Mao SS. Titanium dioxide nanomaterials: Synthesis, properties, modifications, and applications. Chem Rev. 2007;107:2891–2959. doi: 10.1021/cr0500535. [PubMed]
• Song HM, Ko JM, Park JH. Hybrid photoreactive magnet obtained from Fe3O4/TiO2 composite nanoparticles. Chem Lett. 2009;38:612–613. doi: 10.1246/cl.2009.612.
• Sato T, Yamamoto Y, Fujishiro Y, Uchida S. Intercalation of iron oxide in layered H2Ti4O9 and H4Nb6O17: visible-light induced photocatalytic properties. J Chem Soc, Faraday Trans. 1996;92:5089–5092. doi: 10.1039/ft9969205089.
• Kang M, Choung SJ, Park JY. Photocatalytic performance of nanometer-sized FexOy/TiO2 particle synthesized by hydrothermal method. Catal Today. 2003;87:87–97. doi: 10.1016/j.cattod.2003.09.011.
• Thongsuwan W, Kumpika T, Singjai P. Photocatalytic property of colloidal TiO2 nanoparticles prepared by sparking process. Curr Appl Phys. 2008;8:563–568. doi: 10.1016/j.cap.2007.10.004.
• Wu BC, Yuan RS, Fu XZ. Structural characterization and photocatalytic activity of hollow binary ZrO2/TiO2 oxide fibers. J Solid State Chem. 2009;182:560–565. doi: 10.1016/j.jssc.2008.11.030.
• Xiao Q, Si Z, Zhang J, Xiao C, Zhiming Y, Qiu G. Effects of samarium dopant on photocatalytic activity of TiO2 nanocrystallite for methylene blue degradation. J Mater Sci. 2007;42:9194–9199. doi: 10.1007/s10853-007-1919-9.
• Wu W, Xiao X, Zhang S, Zhou J, Ren F, Jiang C. Controllable synthesis of TiO2 submicrospheres with smooth or rough surface. Chem Lett. 2010;39:684–685. doi: 10.1246/cl.2010.684.
• Hoffmann MR, Martin ST, Choi W, Bahnemann DW. Environmental applications of semiconductor photocatalysis. Chem Rev. 1995;95:69–96. doi: 10.1021/cr00033a004.
• Zhang XW, Du AJ, Lee PF, Sun DD, Leckie JO. TiO2 nanowire membrane for concurrent filtration and photocatalytic oxidation of humic acid in water. J Membr Sci. 2008;313:44–51. doi: 10.1016/j.memsci.2007.12.045.
• Zhang XW, Pan JH, Du AJ, Xu SP, Sun DD. Room-temperature fabrication of anatase TiO2 submicrospheres with nanothornlike shell for photocatalytic degradation of methylene blue. J Photochem Photobio A. 2009;204:154–160. doi: 10.1016/j.jphotochem.2009.03.011.
Articles from Nanoscale Research Letters are provided here courtesy of Springer
## Formats:
### Related citations in PubMed
See reviews...See all...
### Cited by other articles in PMC
See all...
• MedGen
MedGen
Related information in MedGen
• PubMed
PubMed
PubMed citations for these articles
### Recent Activity
Activity recording is turned off.
Turn recording back on
See more...
Write to the Help Desk | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 2, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5868470072746277, "perplexity": 18076.881964391818}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-18/segments/1429246641393.36/warc/CC-MAIN-20150417045721-00126-ip-10-235-10-82.ec2.internal.warc.gz"} |
https://commons.apache.org/proper/commons-math/javadocs/api-3.5/org/apache/commons/math3/geometry/euclidean/threed/Vector3D.html | org.apache.commons.math3.geometry.euclidean.threed
Class Vector3D
• All Implemented Interfaces:
Serializable, Point<Euclidean3D>, Vector<Euclidean3D>
public class Vector3D
extends Object
implements Serializable, Vector<Euclidean3D>
This class implements vectors in a three-dimensional space.
Instance of this class are guaranteed to be immutable.
Since:
1.2
See Also:
Serialized Form
• Field Summary
Fields
Modifier and Type Field and Description
static Vector3D MINUS_I
Opposite of the first canonical vector (coordinates: -1, 0, 0).
static Vector3D MINUS_J
Opposite of the second canonical vector (coordinates: 0, -1, 0).
static Vector3D MINUS_K
Opposite of the third canonical vector (coordinates: 0, 0, -1).
static Vector3D NaN
A vector with all coordinates set to NaN.
static Vector3D NEGATIVE_INFINITY
A vector with all coordinates set to negative infinity.
static Vector3D PLUS_I
First canonical vector (coordinates: 1, 0, 0).
static Vector3D PLUS_J
Second canonical vector (coordinates: 0, 1, 0).
static Vector3D PLUS_K
Third canonical vector (coordinates: 0, 0, 1).
static Vector3D POSITIVE_INFINITY
A vector with all coordinates set to positive infinity.
static Vector3D ZERO
Null vector (coordinates: 0, 0, 0).
• Constructor Summary
Constructors
Constructor and Description
Vector3D(double[] v)
Simple constructor.
Vector3D(double alpha, double delta)
Simple constructor.
Vector3D(double x, double y, double z)
Simple constructor.
Vector3D(double a, Vector3D u)
Multiplicative constructor Build a vector from another one and a scale factor.
Vector3D(double a1, Vector3D u1, double a2, Vector3D u2)
Linear constructor Build a vector from two other ones and corresponding scale factors.
Vector3D(double a1, Vector3D u1, double a2, Vector3D u2, double a3, Vector3D u3)
Linear constructor Build a vector from three other ones and corresponding scale factors.
Vector3D(double a1, Vector3D u1, double a2, Vector3D u2, double a3, Vector3D u3, double a4, Vector3D u4)
Linear constructor Build a vector from four other ones and corresponding scale factors.
• Method Summary
Methods
Modifier and Type Method and Description
Vector3D add(double factor, Vector<Euclidean3D> v)
Add a scaled vector to the instance.
Vector3D add(Vector<Euclidean3D> v)
Add a vector to the instance.
static double angle(Vector3D v1, Vector3D v2)
Compute the angular separation between two vectors.
Vector3D crossProduct(Vector<Euclidean3D> v)
Compute the cross-product of the instance with another vector.
static Vector3D crossProduct(Vector3D v1, Vector3D v2)
Compute the cross-product of two vectors.
double distance(Point<Euclidean3D> v)
Compute the distance between the instance and another point.
double distance(Vector<Euclidean3D> v)
Compute the distance between the instance and another vector according to the L2 norm.
static double distance(Vector3D v1, Vector3D v2)
Compute the distance between two vectors according to the L2 norm.
double distance1(Vector<Euclidean3D> v)
Compute the distance between the instance and another vector according to the L1 norm.
static double distance1(Vector3D v1, Vector3D v2)
Compute the distance between two vectors according to the L1 norm.
double distanceInf(Vector<Euclidean3D> v)
Compute the distance between the instance and another vector according to the L norm.
static double distanceInf(Vector3D v1, Vector3D v2)
Compute the distance between two vectors according to the L norm.
double distanceSq(Vector<Euclidean3D> v)
Compute the square of the distance between the instance and another vector.
static double distanceSq(Vector3D v1, Vector3D v2)
Compute the square of the distance between two vectors.
double dotProduct(Vector<Euclidean3D> v)
Compute the dot-product of the instance and another vector.
static double dotProduct(Vector3D v1, Vector3D v2)
Compute the dot-product of two vectors.
boolean equals(Object other)
Test for the equality of two 3D vectors.
double getAlpha()
Get the azimuth of the vector.
double getDelta()
Get the elevation of the vector.
double getNorm()
Get the L2 norm for the vector.
double getNorm1()
Get the L1 norm for the vector.
double getNormInf()
Get the L norm for the vector.
double getNormSq()
Get the square of the norm for the vector.
Space getSpace()
Get the space to which the point belongs.
double getX()
Get the abscissa of the vector.
double getY()
Get the ordinate of the vector.
double getZ()
Get the height of the vector.
Vector3D getZero()
Get the null vector of the vectorial space or origin point of the affine space.
int hashCode()
Get a hashCode for the 3D vector.
boolean isInfinite()
Returns true if any coordinate of this vector is infinite and none are NaN; false otherwise
boolean isNaN()
Returns true if any coordinate of this point is NaN; false otherwise
Vector3D negate()
Get the opposite of the instance.
Vector3D normalize()
Get a normalized vector aligned with the instance.
Vector3D orthogonal()
Get a vector orthogonal to the instance.
Vector3D scalarMultiply(double a)
Multiply the instance by a scalar.
Vector3D subtract(double factor, Vector<Euclidean3D> v)
Subtract a scaled vector from the instance.
Vector3D subtract(Vector<Euclidean3D> v)
Subtract a vector from the instance.
double[] toArray()
Get the vector coordinates as a dimension 3 array.
String toString()
Get a string representation of this vector.
String toString(NumberFormat format)
Get a string representation of this vector.
• Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• Field Detail
• ZERO
public static final Vector3D ZERO
Null vector (coordinates: 0, 0, 0).
• PLUS_I
public static final Vector3D PLUS_I
First canonical vector (coordinates: 1, 0, 0).
• MINUS_I
public static final Vector3D MINUS_I
Opposite of the first canonical vector (coordinates: -1, 0, 0).
• PLUS_J
public static final Vector3D PLUS_J
Second canonical vector (coordinates: 0, 1, 0).
• MINUS_J
public static final Vector3D MINUS_J
Opposite of the second canonical vector (coordinates: 0, -1, 0).
• PLUS_K
public static final Vector3D PLUS_K
Third canonical vector (coordinates: 0, 0, 1).
• MINUS_K
public static final Vector3D MINUS_K
Opposite of the third canonical vector (coordinates: 0, 0, -1).
• NaN
public static final Vector3D NaN
A vector with all coordinates set to NaN.
• POSITIVE_INFINITY
public static final Vector3D POSITIVE_INFINITY
A vector with all coordinates set to positive infinity.
• NEGATIVE_INFINITY
public static final Vector3D NEGATIVE_INFINITY
A vector with all coordinates set to negative infinity.
• Constructor Detail
• Vector3D
public Vector3D(double x,
double y,
double z)
Simple constructor. Build a vector from its coordinates
Parameters:
x - abscissa
y - ordinate
z - height
See Also:
getX(), getY(), getZ()
• Vector3D
public Vector3D(double[] v)
throws DimensionMismatchException
Simple constructor. Build a vector from its coordinates
Parameters:
v - coordinates array
Throws:
DimensionMismatchException - if array does not have 3 elements
See Also:
toArray()
• Vector3D
public Vector3D(double alpha,
double delta)
Simple constructor. Build a vector from its azimuthal coordinates
Parameters:
alpha - azimuth (α) around Z (0 is +X, π/2 is +Y, π is -X and 3π/2 is -Y)
delta - elevation (δ) above (XY) plane, from -π/2 to +π/2
See Also:
getAlpha(), getDelta()
• Vector3D
public Vector3D(double a,
Vector3D u)
Multiplicative constructor Build a vector from another one and a scale factor. The vector built will be a * u
Parameters:
a - scale factor
u - base (unscaled) vector
• Vector3D
public Vector3D(double a1,
Vector3D u1,
double a2,
Vector3D u2)
Linear constructor Build a vector from two other ones and corresponding scale factors. The vector built will be a1 * u1 + a2 * u2
Parameters:
a1 - first scale factor
u1 - first base (unscaled) vector
a2 - second scale factor
u2 - second base (unscaled) vector
• Vector3D
public Vector3D(double a1,
Vector3D u1,
double a2,
Vector3D u2,
double a3,
Vector3D u3)
Linear constructor Build a vector from three other ones and corresponding scale factors. The vector built will be a1 * u1 + a2 * u2 + a3 * u3
Parameters:
a1 - first scale factor
u1 - first base (unscaled) vector
a2 - second scale factor
u2 - second base (unscaled) vector
a3 - third scale factor
u3 - third base (unscaled) vector
• Vector3D
public Vector3D(double a1,
Vector3D u1,
double a2,
Vector3D u2,
double a3,
Vector3D u3,
double a4,
Vector3D u4)
Linear constructor Build a vector from four other ones and corresponding scale factors. The vector built will be a1 * u1 + a2 * u2 + a3 * u3 + a4 * u4
Parameters:
a1 - first scale factor
u1 - first base (unscaled) vector
a2 - second scale factor
u2 - second base (unscaled) vector
a3 - third scale factor
u3 - third base (unscaled) vector
a4 - fourth scale factor
u4 - fourth base (unscaled) vector
• Method Detail
• toArray
public double[] toArray()
Get the vector coordinates as a dimension 3 array.
Returns:
vector coordinates
See Also:
Vector3D(double[])
• getSpace
public Space getSpace()
Get the space to which the point belongs.
Specified by:
getSpace in interface Point<Euclidean3D>
Returns:
containing space
• getZero
public Vector3D getZero()
Get the null vector of the vectorial space or origin point of the affine space.
Specified by:
getZero in interface Vector<Euclidean3D>
Returns:
null vector of the vectorial space or origin point of the affine space
• getNorm1
public double getNorm1()
Get the L1 norm for the vector.
Specified by:
getNorm1 in interface Vector<Euclidean3D>
Returns:
L1 norm for the vector
• getNorm
public double getNorm()
Get the L2 norm for the vector.
Specified by:
getNorm in interface Vector<Euclidean3D>
Returns:
Euclidean norm for the vector
• getNormSq
public double getNormSq()
Get the square of the norm for the vector.
Specified by:
getNormSq in interface Vector<Euclidean3D>
Returns:
square of the Euclidean norm for the vector
• getNormInf
public double getNormInf()
Get the L norm for the vector.
Specified by:
getNormInf in interface Vector<Euclidean3D>
Returns:
L norm for the vector
• getAlpha
public double getAlpha()
Get the azimuth of the vector.
Returns:
azimuth (α) of the vector, between -π and +π
See Also:
Vector3D(double, double)
• getDelta
public double getDelta()
Get the elevation of the vector.
Returns:
elevation (δ) of the vector, between -π/2 and +π/2
See Also:
Vector3D(double, double)
• add
public Vector3D add(Vector<Euclidean3D> v)
Add a vector to the instance.
Specified by:
add in interface Vector<Euclidean3D>
Parameters:
v - vector to add
Returns:
a new vector
• add
public Vector3D add(double factor,
Vector<Euclidean3D> v)
Add a scaled vector to the instance.
Specified by:
add in interface Vector<Euclidean3D>
Parameters:
factor - scale factor to apply to v before adding it
v - vector to add
Returns:
a new vector
• subtract
public Vector3D subtract(Vector<Euclidean3D> v)
Subtract a vector from the instance.
Specified by:
subtract in interface Vector<Euclidean3D>
Parameters:
v - vector to subtract
Returns:
a new vector
• subtract
public Vector3D subtract(double factor,
Vector<Euclidean3D> v)
Subtract a scaled vector from the instance.
Specified by:
subtract in interface Vector<Euclidean3D>
Parameters:
factor - scale factor to apply to v before subtracting it
v - vector to subtract
Returns:
a new vector
• normalize
public Vector3D normalize()
throws MathArithmeticException
Get a normalized vector aligned with the instance.
Specified by:
normalize in interface Vector<Euclidean3D>
Returns:
a new normalized vector
Throws:
MathArithmeticException - if the norm is zero
• orthogonal
public Vector3D orthogonal()
throws MathArithmeticException
Get a vector orthogonal to the instance.
There are an infinite number of normalized vectors orthogonal to the instance. This method picks up one of them almost arbitrarily. It is useful when one needs to compute a reference frame with one of the axes in a predefined direction. The following example shows how to build a frame having the k axis aligned with the known vector u :
Vector3D k = u.normalize();
Vector3D i = k.orthogonal();
Vector3D j = Vector3D.crossProduct(k, i);
Returns:
a new normalized vector orthogonal to the instance
Throws:
MathArithmeticException - if the norm of the instance is null
• angle
public static double angle(Vector3D v1,
Vector3D v2)
throws MathArithmeticException
Compute the angular separation between two vectors.
This method computes the angular separation between two vectors using the dot product for well separated vectors and the cross product for almost aligned vectors. This allows to have a good accuracy in all cases, even for vectors very close to each other.
Parameters:
v1 - first vector
v2 - second vector
Returns:
angular separation between v1 and v2
Throws:
MathArithmeticException - if either vector has a null norm
• negate
public Vector3D negate()
Get the opposite of the instance.
Specified by:
negate in interface Vector<Euclidean3D>
Returns:
a new vector which is opposite to the instance
• scalarMultiply
public Vector3D scalarMultiply(double a)
Multiply the instance by a scalar.
Specified by:
scalarMultiply in interface Vector<Euclidean3D>
Parameters:
a - scalar
Returns:
a new vector
• isNaN
public boolean isNaN()
Returns true if any coordinate of this point is NaN; false otherwise
Specified by:
isNaN in interface Point<Euclidean3D>
Returns:
true if any coordinate of this point is NaN; false otherwise
• isInfinite
public boolean isInfinite()
Returns true if any coordinate of this vector is infinite and none are NaN; false otherwise
Specified by:
isInfinite in interface Vector<Euclidean3D>
Returns:
true if any coordinate of this vector is infinite and none are NaN; false otherwise
• equals
public boolean equals(Object other)
Test for the equality of two 3D vectors.
If all coordinates of two 3D vectors are exactly the same, and none are Double.NaN, the two 3D vectors are considered to be equal.
NaN coordinates are considered to affect globally the vector and be equals to each other - i.e, if either (or all) coordinates of the 3D vector are equal to Double.NaN, the 3D vector is equal to NaN.
Overrides:
equals in class Object
Parameters:
other - Object to test for equality to this
Returns:
true if two 3D vector objects are equal, false if object is null, not an instance of Vector3D, or not equal to this Vector3D instance
• hashCode
public int hashCode()
Get a hashCode for the 3D vector.
All NaN values have the same hash code.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object
• dotProduct
public double dotProduct(Vector<Euclidean3D> v)
Compute the dot-product of the instance and another vector.
The implementation uses specific multiplication and addition algorithms to preserve accuracy and reduce cancellation effects. It should be very accurate even for nearly orthogonal vectors.
Specified by:
dotProduct in interface Vector<Euclidean3D>
Parameters:
v - second vector
Returns:
the dot product this.v
See Also:
MathArrays.linearCombination(double, double, double, double, double, double)
• crossProduct
public Vector3D crossProduct(Vector<Euclidean3D> v)
Compute the cross-product of the instance with another vector.
Parameters:
v - other vector
Returns:
the cross product this ^ v as a new Vector3D
• distance1
public double distance1(Vector<Euclidean3D> v)
Compute the distance between the instance and another vector according to the L1 norm.
Calling this method is equivalent to calling: q.subtract(p).getNorm1() except that no intermediate vector is built
Specified by:
distance1 in interface Vector<Euclidean3D>
Parameters:
v - second vector
Returns:
the distance between the instance and p according to the L1 norm
• distance
public double distance(Vector<Euclidean3D> v)
Compute the distance between the instance and another vector according to the L2 norm.
Calling this method is equivalent to calling: q.subtract(p).getNorm() except that no intermediate vector is built
Specified by:
distance in interface Vector<Euclidean3D>
Parameters:
v - second vector
Returns:
the distance between the instance and p according to the L2 norm
• distance
public double distance(Point<Euclidean3D> v)
Compute the distance between the instance and another point.
Specified by:
distance in interface Point<Euclidean3D>
Parameters:
v - second point
Returns:
the distance between the instance and p
• distanceInf
public double distanceInf(Vector<Euclidean3D> v)
Compute the distance between the instance and another vector according to the L norm.
Calling this method is equivalent to calling: q.subtract(p).getNormInf() except that no intermediate vector is built
Specified by:
distanceInf in interface Vector<Euclidean3D>
Parameters:
v - second vector
Returns:
the distance between the instance and p according to the L norm
• distanceSq
public double distanceSq(Vector<Euclidean3D> v)
Compute the square of the distance between the instance and another vector.
Calling this method is equivalent to calling: q.subtract(p).getNormSq() except that no intermediate vector is built
Specified by:
distanceSq in interface Vector<Euclidean3D>
Parameters:
v - second vector
Returns:
the square of the distance between the instance and p
• dotProduct
public static double dotProduct(Vector3D v1,
Vector3D v2)
Compute the dot-product of two vectors.
Parameters:
v1 - first vector
v2 - second vector
Returns:
the dot product v1.v2
• crossProduct
public static Vector3D crossProduct(Vector3D v1,
Vector3D v2)
Compute the cross-product of two vectors.
Parameters:
v1 - first vector
v2 - second vector
Returns:
the cross product v1 ^ v2 as a new Vector
• distance1
public static double distance1(Vector3D v1,
Vector3D v2)
Compute the distance between two vectors according to the L1 norm.
Calling this method is equivalent to calling: v1.subtract(v2).getNorm1() except that no intermediate vector is built
Parameters:
v1 - first vector
v2 - second vector
Returns:
the distance between v1 and v2 according to the L1 norm
• distance
public static double distance(Vector3D v1,
Vector3D v2)
Compute the distance between two vectors according to the L2 norm.
Calling this method is equivalent to calling: v1.subtract(v2).getNorm() except that no intermediate vector is built
Parameters:
v1 - first vector
v2 - second vector
Returns:
the distance between v1 and v2 according to the L2 norm
• distanceInf
public static double distanceInf(Vector3D v1,
Vector3D v2)
Compute the distance between two vectors according to the L norm.
Calling this method is equivalent to calling: v1.subtract(v2).getNormInf() except that no intermediate vector is built
Parameters:
v1 - first vector
v2 - second vector
Returns:
the distance between v1 and v2 according to the L norm
• distanceSq
public static double distanceSq(Vector3D v1,
Vector3D v2)
Compute the square of the distance between two vectors.
Calling this method is equivalent to calling: v1.subtract(v2).getNormSq() except that no intermediate vector is built
Parameters:
v1 - first vector
v2 - second vector
Returns:
the square of the distance between v1 and v2
• toString
public String toString()
Get a string representation of this vector.
Overrides:
toString in class Object
Returns:
a string representation of this vector
• toString
public String toString(NumberFormat format)
Get a string representation of this vector.
Specified by:
toString in interface Vector<Euclidean3D>
Parameters:
format - the custom format for components
Returns:
a string representation of this vector
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.46254822611808777, "perplexity": 3106.7479246660173}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-39/segments/1631780054023.35/warc/CC-MAIN-20210917024943-20210917054943-00219.warc.gz"} |
https://digital-wellbeing.github.io/smartphone-use/descriptives-and-visualizations.html | # 3 Descriptives and Visualizations
## 3.1 Overview
In this section, I describe and visualize the sample and variables. We have variables on the meta-level (about the survey), the person-level, the app-level, and the day-level. App-level data is in the apps_long data file; all other in the dat data file.
Meta-level
• Duration of the entry survey, when participants reported traits (duration_personality)
• Duration of the exit survey, when participants reported their screen time (duration_screen_time)
Person-level
• Participant identifier (id)
• age in years
• ethnicity
• Notifications of social media apps over the past week (weekly_notifications)
• Basic Psychological Need Satisfaction (autonomy_trait, competence_trait, relatedness_trait) plus their individual items (starting with bpns_)
• Big Five (extraversion, agreeableness, conscientiousness, neuroticsim, openness) plus their individual items (starting with big_five_)
App-level
• What app participants report use for (app)
• On what rank was that app on participants’ top ten (rank)
• Notifications for that app for the week (notifications_per_week)
• Pickups for that app on that day (pickups)
• Screen time for that app on that day (social_media_objective)
Day-level
• Duration of the survey on that day (duration_diary)
• day the survey was answered
• Estimated time on social media on that day (social_media_subjective)
• Estimated pickups of social media apps on that day (pickups_subjective)
• Estimated notifications of social media apps on that day (notifications_subjective)
• Objective time on social media on that day (social_media_objective)
• Objective pickups of social media apps on that day (pickups_objective)
• Well-being on that day (well_being) plus its individual items (starting with low_ and high_)
• Basic psychological needs on that day (autonomy_state, competence_state, relatedness_state) plus their individual items (starting with autonomy_, competence_, relatedness_ respectively)
• Experiences of satisfaction, boredom, stress, enjoyment on that day (satisfied, boring, stressful, enoyable)
## 3.2 Meta-level
I begin with describing and plotting the duration of the entry and exit surveys. Table 3.1 shows descriptive stats; Figure 3.1 shows that twp participants had their entry surveys open for a day before pressing send, which skews the mean massively. However, those people’s data look good, so I wouldn’t exclude them here. Note: Colors are from here.
Table 3.1: Duration of entry and exit surveys
variable mean sd median min max range cilow cihigh
duration_personality 1H 5M 56S 4H 36M 55S 15M 40S 1M 22S 1d 9H 33M 36S 1d 9H 32M 14S 9M 50S 2H 2M 3S
duration_screen_time 20M 21S 20M 8S 13M 18S 1M 8S 1H 51M 29S 1H 50M 21S 16M 17S 24M 26S
## 3.3 Person-level
Let’s have a look at the final sample. Overall, our sample size is N = 96. The sample has a mean age of M = 20.45, SD = 1.32. The age ranges from 18 to 25 The sample consists mostly of women (66 women, 30 men, and one non-binary participant).
Most participants are Asian, followed by White, Black, and Hispanic, see Table 3.2
Table 3.2: Ethnicity of the sample
ethnicity count percent
Asian 40 42
White 26 27
Black or African American 11 11
Hispanic or Latino 10 10
Multiracial 6 6
NA 2 2
Native Hawaiian or Other Pacific Islander 1 1
Alright, next we look at the objective count of notifications over the past week, aggregated across all apps. Table 3.3 shows that participants received quite a lot of notifications from social media apps only. That distribution is heavily skewed (Figure 3.2 by a couple of participants who received several thousand notifications over the week.
Table 3.3: Weekly notifications (objective) across all apps
variable mean sd median min max range cilow cihigh
weekly_notifications 997.6354 673.4178 868.5 126 3382 3256 861.1883 1134.083
Now we look at the trait variables: the basic psychological need satisfaction and the big five. Note that I follow recent recommendations and calculate $$\omega$$ for reliability. Table 3.4 shows the descriptive information of the three psychological needs and the big five. Figure 3.3 shows their distribution. The sample isn’t too large, so considering the small size, I’d say everything looks pretty good.
Table 3.4: Descriptives for trait variables
variable mean sd median min max range cilow cihigh omega
autonomy_trait 4.51 0.88 4.50 1.25 6.88 5.62 4.33 4.68 0.82
competence_trait 5.16 0.70 5.31 3.50 6.50 3.00 5.01 5.30 0.75
relatedness_trait 4.54 1.03 4.56 2.38 6.62 4.25 4.33 4.75 0.88
extraversion 3.13 0.74 3.00 1.62 5.00 3.38 2.98 3.29 0.86
agreeableness 3.68 0.56 3.59 2.33 5.00 2.67 3.57 3.80 0.75
conscientiousness 3.50 0.58 3.50 2.00 4.89 2.89 3.39 3.62 0.75
neuroticism 3.29 0.50 3.38 2.00 4.38 2.38 3.19 3.39 0.59
openness 3.54 0.48 3.60 2.10 4.80 2.70 3.45 3.64 0.66
In Figure 3.4 we see the correlations between those traits. As expected psychological needs are correlated highly with each other. Credit for the lm lines goes to data prone, whose idea I adapted.
## 3.4 App-level
First, Figure 3.5 shows what apps mostly nominated (i.e., used). We see that out of the sample, most participants had Messaging, Snapchat, Whatsapp etc. as part of their top ten. Next, I visualize how many minutes each of those apps was used across the sample. For that, I need to reshape the data a bit to get the mean minutes per app across all days and all participants. In Figure 3.6, I show the average objective time per app. Note that the CIs are across the entire data and not nested by app or day. Also, a high mean doesn’t mean that much because it could just be from one participant who used it a lot on two days. The size of the points shows how often an app was reported across the entire sample. For apps that only had one entry, those CI will be nonexistent. In addition, I now exclude entries on social_media_objective that have NA. The NA here can mean participants just didn’t fill in anything, or they had zero duration on that day. Because adding up the raw scores across apps was so close to the daily total, I’ll exclude NAs here. I’ll do the same for objective pickups per app, averaged across day and participant. Figure 3.7 shows that the same apps that got a lot of screen time had a lot of pickups. Last, I check which apps got the most notifications over the week in Figure 3.8, on average. It’s interesting to see that Facebook had a lot of screen time and pickups, but much fewer notifications. Also, these notifications are per week, and not per day, as the previous two figures.
## 3.5 Day level
Alright, we’re at the most interesting section, the daily surveys. I first look at how long people typically took for a survey. Table 3.5 shows that the mean is highly skewed because of outliers and the median more appropriate to describe the duration. In Figure 3.9 we see that a couple of people took a long time from opening to submitting the survey. I checked those participants who took a long time in the data processing section. The maximum duration here from someone who didn’t open the survey on a Friday. So that duration is just the survey closing automatically after two days, which really drives up the mean.
Table 3.5: Duration of daily surveys
variable mean sd median min max range cilow cihigh
duration_diary 50M 22S 2H 44M 17S 16M 0S 25S 2d 0H 27M 48S 2d 0H 27M 23S 35M 5S 1H 5M 40S
Alright, next I inspect overall response rate in the final sample, aka how many valid surveys do we have among the final sample. Each participant received five surveys, one for each day, so 96 participants x 5 = 480. We have 435 surveys in the final sample where participants actually responded, which means a 91% response rate among the final sample.
Let’s inspect response rate per day. As is to be expected, participants lost motivation over the course of the week. However, even the response rate on Friday is really high (at least among our sample of valid responses). We should still consider to take the day grouping into account when modelling the data later in the analysis. Next, I describe and plot the distributions of the social media use variables. The distribution and CI is of the entire sample, not aggregated by participant or day first. Table 3.6 shows that participants weren’t too far off in their estimates, which is interesting. As expected (Figure 3.11), the social media variables are a bit skewed, but overall, they look fine.
Table 3.6: Descriptive information on social media variables
variable mean sd median min max range cilow cihigh
social_media_subjective 153 112 130 5 692 687 143 164
social_media_objective 139 94 118 2 565 563 130 148
error 46 156 -3 -96 1186 1282 31 61
pickups_subjective 34 43 17 0 259 259 30 38
pickups_objective 49 31 44 0 196 196 46 52
notifications_subjective 61 99 30 0 700 700 52 71
I also want to see how much variability there is between the objective and subjective measures. In Figure 3.12 we see per participant the difference between objective and subjective social media use. The numbers in the grey box show whether the subjective report is an underestimate (negative number) or overestimate (positive number). Inspiration for the plot from here and here. Now let’s look at the state well-being and psychological needs variables plus the four experiences (e.g., boring). Again, I calculate $$\omega$$, but this time for the entire sample in Table 3.7. That will necessarily bias the estimate because there’s multiple measures per person. I’m not aware of a consensus reliability procedure for repeated measures. Figure 3.13 shows that the data look pretty good.
Table 3.7: Descriptives for state variables
variable mean sd median min max range cilow cihigh omega
well_being_state 3.23 0.70 3.17 1.25 5 3.75 3.17 3.30 0.85
autonomy_state 4.50 1.16 4.25 1.00 7 6.00 4.39 4.60 0.69
competence_state 4.60 1.27 4.50 1.00 7 6.00 4.48 4.72 0.79
relatedness_state 5.33 1.07 5.50 2.50 7 4.50 5.23 5.43 0.70
satisfied 4.61 1.33 5.00 1.00 7 6.00 4.49 4.74 NA
boring 3.40 1.55 3.00 1.00 7 6.00 3.25 3.55 NA
stressful 3.96 1.81 4.00 1.00 7 6.00 3.79 4.13 NA
enjoyable 4.27 1.41 4.00 1.00 7 6.00 4.14 4.40 NA
In Figure 3.14 we see the correlations between variables on the state level. In Figure 3.15 we see the correlations between use variables on the state level and the trait level.
## 3.6 Demographics and social media
To compare our findings with previous research which found gender and age differences in social media use, we also check for those differences in our data set. We don’t report those results in the paper because a) they’re less relevant to our research questions, b) space limits.
First, let’s create a correlation matrix between age and the social media use variables. Figure 3.16 shows that age is pretty much unrelated to the social media use variables, possibly because the age range is quite narrow. Next, I visualize differences in the three social media use variables between genders. Figure (fig:visualize-gender-differences) shows little visual indication that there might be differences.
I’ll test that formally with a t-test on the aggregated data. For none of the outcomes is the difference between genders significant.
my_t_test <- function(model) {
out1 <- broom::tidy(model) %>%
select(
contains("estimate"),
statistic,
p.value
) %>%
rename(
Difference = estimate,
Men = estimate1,
Women = estimate2,
p = p.value
)
}
tmp %>%
group_by(variable) %>%
group_modify(~my_t_test(t.test(value ~ gender, data = .x))) %>%
rename(Outcome = variable) %>%
kable(digits = c(2,2,2,2))
Outcome Difference Men Women statistic p
error 15.71 59.50 43.79 0.50 0.62
social_media_objective -13.12 131.38 144.50 -0.68 0.50
social_media_subjective -11.47 147.57 159.04 -0.52 0.60
## 3.7 Plots for paper
Here, I’ll create summary figures for the paper. I’ll begin with plotting the traits.
For the plot, the data need to be in the long format.
tmp <-
dat %>%
group_by(id) %>%
slice(1) %>%
ungroup() %>%
select(all_of(c("id", trait_descriptives$variable))) %>% pivot_longer( -id, names_to = "variable", values_to = "value" ) rename_levels <- c( "Autonomy", "Competence", "Relatedness", "Agreeableness", "Conscientiousness", "Extraversion", "Neuroticism", "Openness" ) my_string <- "_trait" # reorder and rename factor levels clean_plot_data <- function( dat, levels_to_rename, string_to_remove ){ dat <- dat %>% mutate( # in case it's social media variables variable = case_when( variable == "social_media_objective" ~ "Objective (h)", variable == "social_media_subjective" ~ "Subjective (h)", variable == "error" ~ "Accuracy (%)", TRUE ~ variable ), # remove _trait at the end and capitalize variable = str_to_sentence(str_remove(variable, string_to_remove)), variable = as.factor(variable), variable = str_replace(variable, "_", "-"), # reorder factor levels variable = fct_relevel( variable, levels_to_rename ) ) return(dat) } tmp <- clean_plot_data(tmp, rename_levels, my_string) trait_descriptives <- clean_plot_data(trait_descriptives, rename_levels, my_string) Okay, we already have the aggregated info in trait_descriptives, so we can get to plotting. # function for breaks my_breaks <- function(x) { if (max(x) > 5){ 1:7 } else { 1:5 } } # function for limits my_limits <- function(x) { if (max(x) > 5){ c(1,7) } else { c(1,5) } } # color palette (not needed anymore after review that colors made the figure harder to see) cb_palette <- c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7") # plot ggplot( tmp, aes( x = value, y = 1 ) ) + geom_quasirandom(groupOnX=FALSE, size = 0.7, shape = 20, color = "black") + facet_wrap( ~ variable, scales = "free_x" ) + scale_x_continuous(breaks = my_breaks, limits = my_limits) + geom_text( data = trait_descriptives, aes( x = 1.6, y = 1.4, label = paste0("M = ", mean), family = "Corbel" ), size = 2.5, color = "black" ) + geom_text( data = trait_descriptives, aes( x = 1.6, y = 1.3, label = paste0("SD = ", sd), family = "Corbel" ), size = 2.5, color = "black" ) + geom_text( data = trait_descriptives, aes( x = 1.6, y = 1.2, label = paste0("\u03a9 = ", omega), family = "Corbel" ), size = 2.5, color = "black" ) + theme_cowplot() + # scale_colour_manual(values=cb_palette) + # scale_fill_manual(values = cb_palette) + theme( axis.text.y = element_blank(), axis.title.x = element_blank(), axis.title.y = element_blank(), axis.ticks.y = element_blank(), axis.line.y = element_blank(), strip.background.x = element_blank(), strip.background.y = element_blank(), legend.position = "none", text = element_text(family = "Corbel") ) -> figure1 figure1 ggsave( here("figures", "figure1.tiff"), plot = figure1, width = 21 * 0.8, height = 29.7 * 0.4, units = "cm", dpi = 300 ) Okay, next the state variables. tmp <- dat %>% select(all_of(c("id", state_descriptives$variable))) %>%
pivot_longer(
-id,
names_to = "variable",
values_to = "value"
)
rename_levels <- c(
"Autonomy",
"Competence",
"Relatedness",
"Boring",
"Enjoyable",
"Satisfied",
"Stressful",
"Well-being"
)
my_string <- "_state"
tmp <- clean_plot_data(tmp, rename_levels, my_string)
state_descriptives <- clean_plot_data(state_descriptives, rename_levels, my_string)
# position of the text (so it doesn't overlap with points)
state_descriptives <-
state_descriptives %>%
mutate(
x_position = 1.6,
y_position = 1.45
)
Then to plotting.
# plot
ggplot(
tmp,
aes(
x = value,
y = 1
)
) +
geom_quasirandom(groupOnX=FALSE, size = 0.7, shape = 20, color = "black") +
facet_wrap(
~ variable,
scales = "free_x"
) +
scale_x_continuous(breaks = my_breaks, limits = my_limits) +
geom_text(
data = state_descriptives,
aes(
x = x_position,
y = y_position + 0.1,
label = paste0("M = ", mean),
family = "Corbel"
),
size = 2.5,
color = "black"
) +
geom_text(
data = state_descriptives,
aes(
x = x_position,
y = y_position,
label = paste0("SD = ", sd),
family = "Corbel"
),
size = 2.5,
color = "black"
) +
geom_text(
data = state_descriptives,
aes(
x = x_position,
y = y_position - 0.1,
label = paste0("\u03a9 = ", omega),
family = "Corbel"
),
size = 2.5,
color = "black",
alpha = if_else(is.na(state_descriptives\$omega), 0, 1) # one-item measure don't have omega, so I make those see through
) +
theme_cowplot() +
# scale_colour_manual(values=cb_palette) +
# scale_fill_manual(values = cb_palette) +
theme(
axis.text.y = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.ticks.y = element_blank(),
axis.line.y = element_blank(),
strip.background.x = element_blank(),
strip.background.y = element_blank(),
legend.position = "none",
text = element_text(family = "Corbel")
) -> figure2
figure2
ggsave(
here("figures", "figure2.tiff"),
plot = figure2,
width = 21 * 0.8,
height = 29.7 * 0.4,
units = "cm",
dpi = 300
)
Alright, last the smartphone use variables.
tmp <-
dat %>%
select(all_of(c("id", "social_media_objective", "social_media_subjective", "error"))) %>%
# turn to hours
mutate(
across(
contains("social_media"),
~ .x /60
)
) %>%
pivot_longer(
-id,
names_to = "variable",
values_to = "value"
)
rename_levels <- c(
"Objective (h)",
"Subjective (h)",
"Accuracy (%)"
)
my_string <- "_state"
tmp <- clean_plot_data(tmp, rename_levels, my_string)
social_media2 <- clean_plot_data(social_media, rename_levels, my_string) %>%
filter(variable %in% c("Objective (h)", "Subjective (h)", "Accuracy (%)")) %>%
# add x axis position for geom_text
mutate(
x_position = case_when(
variable == "Accuracy (%)" ~ 1200*0.8,
TRUE ~ 0.8*13
)
)
And the plot.
# function for breaks
my_breaks <-
function(x) {
if (max(x) < 100){
seq(0, 13, 2)
} else {
c(-200, 0, 400, 800, 1200)
}
}
# function for limits
my_limits <-
function(x) {
if (max(x) < 100){
c(0, 13)
} else {
c(-200, 1200)
}
}
# plot
ggplot(
tmp,
aes(
x = value,
y = 1
)
) +
geom_quasirandom(groupOnX=FALSE, size = 0.7, shape = 20, color = "black") +
facet_wrap(
~ variable,
scales = "free_x"
) +
scale_x_continuous(breaks = my_breaks, limits = my_limits) +
geom_text(
data = social_media2,
aes(
x = x_position,
y = 0.7,
label = paste0("M = ", mean),
family = "Corbel"
),
size = 3,
color = "black"
) +
geom_text(
data = social_media2,
aes(
x = x_position,
y = 0.67,
label = paste0("SD = ", sd),
family = "Corbel"
),
size = 3,
color = "black"
) +
theme_cowplot() +
scale_colour_manual(values=cb_palette) +
scale_fill_manual(values = cb_palette) +
theme(
axis.text.y = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.ticks.y = element_blank(),
axis.line.y = element_blank(),
strip.background.x = element_blank(),
strip.background.y = element_blank(),
legend.position = "none",
text = element_text(family = "Corbel")
) -> figure3
figure3
ggsave(
here("figures", "figure3.tiff"),
plot = figure3,
width = 21 * 0.8,
height = 29.7 * 0.4,
units = "cm",
dpi = 300
) | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2031027227640152, "perplexity": 5427.114606229341}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296943704.21/warc/CC-MAIN-20230321162614-20230321192614-00510.warc.gz"} |
https://janvanderroost.com/fr/oeuvre/57/toccata-festiva-brassband-1993 | # Toccata Festiva
### 1993
Plus d'œuvres pour Brassband
‘Toccata Festiva’ was commissioned in 1994 by the Dutch Brass Band Championships. The wind band version was made a year later by the composer himself. Historically speaking, the toccata is considered to be one of the first independent instrumental forms for keyboard instruments. Originally the toccata was typically more or less improvised, later this musical form was given a more regulated structure. Both elements are used in the ‘Toccata Festiva’: on the one hand the different themes are developed freely, on the other, the piece has an orderly structure. It is in a three part form (quick-slow-quick) and includes both strong rhythmical figures and broad melodic lines. Part of the composition is written in a more or less archaic tone idiom, referring to the period from which the toccata form originates (16th century).
Instrumentation
Brassband
Édition | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8402643799781799, "perplexity": 4188.450691486417}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-18/segments/1555578762045.99/warc/CC-MAIN-20190426073513-20190426095513-00393.warc.gz"} |
https://earthscience.stackexchange.com/questions/4231/alpine-schistosity | # Alpine schistosity
I often find the term Alpine schistosity (schistosité alpine in French, scistosità alpina in Italian) in texts about Alpine geology. Chronologically ordered phases of Alpine schistosity producing different schistous foliations are named, in everything I have read, S$_1$, S$_2$ (and S$_3$).
I think that notations S$_1$, S$_2$, ..., S$_n$ may well refer to any ordered orogenetic phases producing schistosity in any rock, anywhere, at any time. Please correct me if I am wrong.
Nevertheless, I wonder whether, when talking about S$_1$ Alpine schistosity, or S$_2$ Alpine schistosity, one usually refers to a well defined temporal phase of Alpine orogeny producing a particular schistous foliation. Is that so?
Anyhow, I must remark that all schistosities that S$_1$ and S$_2$ in the geology of the Alps not necessarily refer to foliations generated during the Alpine orogeny, since for example in Briançonnais orthogneiss it is usual to distinguish a Silurian-Ordovician S$_1$ schistosity and a late Carboniferous S$_2$ schistosity, both generated before the Alpine orogeny. I thank you very much for any answer!
*Vv.Aa., Alpi liguri, edited by the Italian Geological Society.
I think that notations S$_1$, S$_2$, ..., S$_n$ may well refer to any ordered orogenetic phases producing schistosity in any rock, anywhere, at any time
Generally, yes. This is not only true for the Alps, but also for any other orogenic regions in the world (e.g. Himalayas, Arabian-Nubian Shield). Note that the numbering is ($n$) is used very loosely. It all depends on what's observable in the studied rocks and what is the emphasis.
...when talking about S1 Alpine schistosity, or S2 Alpine schistosity, one usually refers to a well defined temporal phase of Alpine orogeny producing a particular schistous foliation. Is that so?
For example, I've seen studies where original sedimentary foliation was termed S$_0$. In other places it was termed S$_1$. Talking about Alpine schistosities, you gave an example where S$_1$ and S$_2$ are pre-Alpine (Variscan). On the other hand, another Briançonnais study by Ganne et al (2003), refers to S$_1$ as the first true Alpine schistosity and uses S$_{-1}$ for the pre-Alpine Variscan schistosities.
Note that the S$_{n}$ terms are used to describe schistosities. These are visual features observed in petrographic examination of rocks under the microscope. These are commonly open to interpretation and debate. You have to distinguish them from the D$_{n}$ events (deformation). S$_{n}$ features are usually used as a proxy for D$_{n}$ events, but it's not a one-to-one relationships. Let's say you know that 3 deformation events occurred in a rock. However, you can only see two schistosities. How do you call them? S$_1$ and S$_2$? What if you know that the first schistosity was erased? Do you use S$_2$ and S$_3$ then?
Again, these terms are used loosely and they may not be correlated between different areas and with time, unless mentioned explicitly in the study you are reading.
• Exhaustive and clear answer! I heartily thank you! – Self-teaching worker Jan 11 '15 at 10:04 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8862531185150146, "perplexity": 4195.101364721722}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-47/segments/1573496664567.4/warc/CC-MAIN-20191112024224-20191112052224-00386.warc.gz"} |
http://www.lmfdb.org/ModularForm/GL2/ImaginaryQuadratic/2.0.8.1/96.2 | Properties
Base field $$\Q(\sqrt{-2})$$ Level 96.2 Norm 96 New dimension 0
Base field $$\Q(\sqrt{-2})$$
Generator $$a$$, with minimal polynomial $$x^{2} + 2$$; class number $$1$$.
Level 96.2
Norm: 96 Ideal: $$(-4 a - 8) = \left(a\right)^{5} \cdot \left(a - 1\right)$$ Label: 96.2
Modular form spaces
Weight 2
Dimension of cuspidal subspace: 2
Dimension of new cuspidal subspace: 0
Newforms
There are no newforms at this level. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5910281538963318, "perplexity": 25983.802450075567}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-26/segments/1560627998913.66/warc/CC-MAIN-20190619043625-20190619065625-00318.warc.gz"} |
https://codereview.stackexchange.com/questions/268227/terminal-based-connect-4-game-in-python | # Terminal based "Connect 4" game in Python
I started learning Python a few weeks ago and coded this "Connect 4" game.
What could I have done better? How efficient is this code and how could I improve on that?
from collections import defaultdict
from termcolor import colored
from time import sleep
class Board:
def __init__(self):
self.symbol = 0
# board MAIN horizontal
self.row1 = [0, 0, 0, 0, 0, 0, 0]
self.row2 = [0, 0, 0, 0, 0, 0, 0]
self.row3 = [0, 0, 0, 0, 0, 0, 0]
self.row4 = [0, 0, 0, 0, 0, 0, 0]
self.row5 = [0, 0, 0, 0, 0, 0, 0]
self.row6 = [0, 0, 0, 0, 0, 0, 0]
self.board_state_row = []
self.board_state_collumn = []
self.board_state_diagonal = []
def drop_stones(self):
l1 = [i for i, v in enumerate(self.row2) if v == 0]
for i in l1:
self.row2[i] = self.row1[i]
self.row1[i] = 0
l2 = [i for i, v in enumerate(self.row3) if v == 0]
for i in l2:
self.row3[i] = self.row2[i]
self.row2[i] = 0
l3 = [i for i, v in enumerate(self.row4) if v == 0]
for i in l3:
self.row4[i] = self.row3[i]
self.row3[i] = 0
l4 = [i for i, v in enumerate(self.row5) if v == 0]
for i in l4:
self.row5[i] = self.row4[i]
self.row4[i] = 0
l5 = [i for i, v in enumerate(self.row6) if v == 0]
for i in l5:
self.row6[i] = self.row5[i]
self.row5[i] = 0
def update(self):
# board horizontal
self.board_state_row = [self.row1, self.row2, self.row3, self.row4, self.row5, self.row6]
# board vertical
self.board_state_collumn = []
for i in range(0, 7, 1):
self.board_state_collumn.append(self.rows_to_collumns(i))
# board diagonal
rows = 6
collumns = 7
diagonal1 = defaultdict(list) # For the top right to bottom left
diagonal2 = defaultdict(list) # For the top left to bottom right
for i in range(rows):
for j in range(collumns):
diagonal1[i - j].append(self.board_state_row[i][j])
diagonal2[i + j].append(self.board_state_row[i][j])
self.board_state_diagonal = []
self.board_state_diagonal.insert(0, diagonal1)
self.board_state_diagonal.insert(1, diagonal2)
def make_turn(self, slot, activeplayer):
if activeplayer == 1:
self.symbol = 1
if activeplayer == 2:
self.symbol = -1
if slot in range(0, 7):
self.row1[slot] = self.symbol
return True
else:
return False
def print_board(self):
print(
' 1 ', ' | ',
' 2 ', ' | ',
' 3 ', ' | ',
' 4 ', ' | ',
' 5 ', ' | ',
' 6 ', ' | ',
' 7 ', ' | ',)
# row1
print(
self.state_to_sign(self.row1[0]), ' | ',
self.state_to_sign(self.row1[1]), ' | ',
self.state_to_sign(self.row1[2]), ' | ',
self.state_to_sign(self.row1[3]), ' | ',
self.state_to_sign(self.row1[4]), ' | ',
self.state_to_sign(self.row1[5]), ' | ',
self.state_to_sign(self.row1[6]), ' | ')
# row2
print(
self.state_to_sign(self.row2[0]), ' | ',
self.state_to_sign(self.row2[1]), ' | ',
self.state_to_sign(self.row2[2]), ' | ',
self.state_to_sign(self.row2[3]), ' | ',
self.state_to_sign(self.row2[4]), ' | ',
self.state_to_sign(self.row2[5]), ' | ',
self.state_to_sign(self.row2[6]), ' | ')
# row3
print(
self.state_to_sign(self.row3[0]), ' | ',
self.state_to_sign(self.row3[1]), ' | ',
self.state_to_sign(self.row3[2]), ' | ',
self.state_to_sign(self.row3[3]), ' | ',
self.state_to_sign(self.row3[4]), ' | ',
self.state_to_sign(self.row3[5]), ' | ',
self.state_to_sign(self.row3[6]), ' | ')
# row4
print(
self.state_to_sign(self.row4[0]), ' | ',
self.state_to_sign(self.row4[1]), ' | ',
self.state_to_sign(self.row4[2]), ' | ',
self.state_to_sign(self.row4[3]), ' | ',
self.state_to_sign(self.row4[4]), ' | ',
self.state_to_sign(self.row4[5]), ' | ',
self.state_to_sign(self.row4[6]), ' | ')
# row5
print(
self.state_to_sign(self.row5[0]), ' | ',
self.state_to_sign(self.row5[1]), ' | ',
self.state_to_sign(self.row5[2]), ' | ',
self.state_to_sign(self.row5[3]), ' | ',
self.state_to_sign(self.row5[4]), ' | ',
self.state_to_sign(self.row5[5]), ' | ',
self.state_to_sign(self.row5[6]), ' | ')
# row6
print(
self.state_to_sign(self.row6[0]), ' | ',
self.state_to_sign(self.row6[1]), ' | ',
self.state_to_sign(self.row6[2]), ' | ',
self.state_to_sign(self.row6[3]), ' | ',
self.state_to_sign(self.row6[4]), ' | ',
self.state_to_sign(self.row6[5]), ' | ',
self.state_to_sign(self.row6[6]), ' | ')
def rows_to_collumns(self, index):
collumn = []
for i in self.board_state_row:
collumn.append(i[index])
return collumn
def check_win_horizontal(self):
for i in range(0, 6, 1):
wincounter = 0
for j in self.board_state_row[i]:
if j != self.symbol:
wincounter = 0
if j == self.symbol or wincounter == 0:
if j == self.symbol:
wincounter = wincounter + 1
if wincounter == 4:
return True
else:
wincounter = 0
def check_win_vertical(self):
for i in range(0, 7, 1):
wincounter = 0
for j in self.board_state_collumn[i]:
if j != self.symbol:
wincounter = 0
if j == self.symbol or wincounter == 0:
if j == self.symbol:
wincounter = wincounter + 1
if wincounter == 4:
return True
def check_win_diagonal(self):
for i in range(-6, 5, 1):
wincounter = 0
for j in self.board_state_diagonal[0][i]:
if j != self.symbol:
wincounter = 0
if j == self.symbol or wincounter == 0:
if j == self.symbol:
wincounter = wincounter + 1
if wincounter == 4:
return True
else:
wincounter = 0
for i in range(0, 11, 1):
wincounter = 0
for j in self.board_state_diagonal[1][i]:
if j != self.symbol:
wincounter = 0
if j == self.symbol or wincounter == 0:
if j == self.symbol:
wincounter = wincounter + 1
if wincounter == 4:
return True
else:
wincounter = 0
@staticmethod
def state_to_sign(state):
if state == 1:
return colored(' @ ','red')
if state == -1:
return colored(' @ ','yellow')
if state == 0:
return ' '
class Player:
def __init__(self, player_number):
self.name = 'default'
self.player_number = player_number
def set_name(self, name):
self.name = name
def start_game():
player1 = Player(1)
player2 = Player(2)
board = Board()
activeplayer = 1
while activeplayer > 0:
try:
board.drop_stones()
while activeplayer == 1:
board.print_board()
slot = int(input('Which slot do you choose ' + player1.name + '? 1-7 or 0 to exit: '))
if slot == 0:
exit()
if slot > 0:
slot = slot - 1
if board.row1[slot] != 0:
print('Slot full! Pick another one 1-7: ')
break
board.make_turn(slot, activeplayer)
board.update()
board.drop_stones()
board.update()
if board.check_win_diagonal() or board.check_win_horizontal() or board.check_win_vertical():
board.print_board()
print('you win', player1.name + '!')
activeplayer = 0
if not board.check_win_diagonal() \
and not board.check_win_horizontal() \
and not board.check_win_vertical():
activeplayer = 2
else:
print('Out of range! 1-7: ')
break
while activeplayer == 2:
board.print_board()
slot = int(input('Which slot do you choose ' + player2.name + '? 1-7 or 0 to exit: '))
if slot == 0:
exit()
if slot > 0:
slot = slot - 1
if board.row1[slot] != 0:
print('Slot full! Pick another one 1-7: ')
break
board.make_turn(slot, activeplayer)
board.update()
board.drop_stones()
board.update()
if board.check_win_diagonal() or board.check_win_horizontal() or board.check_win_vertical():
board.print_board()
print('you win', player2.name + '!')
activeplayer = 0
if not board.check_win_diagonal() \
and not board.check_win_horizontal() \
and not board.check_win_vertical():
activeplayer = 1
else:
print('Out of range! 1-7: ')
break
except IndexError:
print('Out of range... 1-7! ')
except ValueError:
print('Only numbers! 1-7: ')
sleep(1.5)
start_game()
Cool program!
Computers are machines for automation; any time you find your code is repetitive, like in print_board or the two players in start_game, it's very likely you can make the code shorter by using an array or a function.
A few other odds and ends:
• The try block in start_game is quite long, and catches IndexError and ValueError, errors that very often indicate a bug. So if there is a bug in any of that code that causes an IndexError, the program would just print "Out of range... 1-7!" and keep going. The error message would be lost.
• It's considered good style in Python to separate words in variable names with _, so active_player rather than activeplayer.
• It's also considered good style for a method like check_win_horizontal to return False at the end, so that it always returns either True or False. If you don't return anything at the end of a function, Python returns None by default, so the program still works. But it's just a little confusing.
• Your program doesn't check for the possibility of a tie game. It's possible to fill up the entire grid without anyone winning.
• The printed board seems to need a | and some more space on the left.
• The English word "columns" only has one L in it.
But all of this is very minor. It's a fine program. Hope you're having fun with Python! :)
There are a lot of issues with your code. I will try to cover all of them.
## Logic Repetiton
• In your start_game() function, you are repeating the almost same loop for both players.
You can make a current_player and use it instead of player1 or player2.
• You can just use a else statement in this piece of code -
if board.check_win_diagonal() or board.check_win_horizontal() or
board.check_win_vertical():
...
if not board.check_win_diagonal() \
and not board.check_win_horizontal() \
and not board.check_win_vertical():
activeplayer = 1
if board.check_win_diagonal() or board.check_win_horizontal() or
board.check_win_vertical():
...
else:
activeplayer = 1
## Unnecessary objects
• I would prefer to use a grid variable storing all the rows rather than making each row a seperate variable. Then you can iterate over each row with a loop.
• Your class Player does not do much. You could just use player1 and player2 variables. Also you are never using Player.player_number.
## Print board function
• You can make your function shorter by using a for loop.
def print_board(self):
print('| 1 | 2 | 3 | 4 | 5 | 6 | 7 |')
for row in self.grid:
print('| ', end='')
for index in range(7):
print(str(self.state_to_sign(row[index])) + '| ', end='')
print('')
## Ignoring Performance
• Your drop_stones() function checks all columns. This affects the performance. Instead check only the column chosen by the user.
## Other improvements(do not matter much)
• By default the step parameter of range is 1. You do not need to specify it. range(1, 10) instead of range(1, 10, 1).
Happy Coding!
# Edit:
This is the review for the optimized code posted again by OP.
## Coupling
"How easy is it to cut out a piece of code?" If the answer is "very difficult" then our system is likely tightly coupled. Ideally, it is easy to remove code (say we find it doesn't work as intended and need to replace it) and it is easy to run that cut out code by itself (say we want to test it).
Most of the functions look good. There are some that could be improved.
def check_tie(self):
if 0 not in self.board_state_row[0]:
print('You tied! No one Wins!')
sleep(1.5)
exit()
What if you wanted to test this function?(I know its very simple function)
You wont be able to check it multiple times because it will end the program.
You want to only return if its a tie or not and do the necessary outside the function.
def check_tie(self):
return 0 not in self.board_state_row[0]
Credit for the explanation to spyr03
## List Comprehension
• When ever you can, you should use a list comprehension as it almost always faster than for loops. So you can upgrade your columns_to_rows() accordingly.
## if name == 'main'
• You should always use if __name__ == '__main__' in your files.
You should wrap your all all your while active_player > 0 code in a function play() and then use it under the if __name__ == '__main__' clause
if __name__ == '__main__':
play()
## F Strings
• You can use f-strings from Python 3.6. f-strings are simply faster than %s and str.format().
## Other Improvement
• In this piece of code:
if active_player == 1:
return int(2)
if active_player == 2:
return int(1)
You can just return active_player.
• When defining matrices, it is nice to define it like this:
matrix = [
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]
]
It also is easier to understand its structure.
• You can use the += operator to perform some of your calculations.
Example - a = a + 1 is same as a += 1.
• Thank you very much, i will look into everything you mentioned and try to improve things :) Sep 21 at 18:33
So finally, with your super helpful tips and after a few hours of improving stuff I got rid of a few lines of code, all the self.row variables and improved some of the functions. Also I got rid of the Player class since it was only storing the names, which I implemented as variables now.
The drop_stones and print_board methods are also much less code now and drop_stones now uses the selected column instead of every row so it has to check and change only one list instead of a whole 2d list. Next thing on the list would be a function to check for a tie, but I'm sure I need another few hours to come up with a crappy solution for that XD
Edit: I wrote the check_tie function to check for a tie (when the first of the row is full and no one has won). Also I fixed a bug where input was declared as str while int was needed.
Here is the "optimized" code:
from collections import defaultdict, deque
from termcolor import colored
from time import sleep
class Board:
def __init__(self):
self.symbol = 0
self.board_state_row = [[0,0,0,0,0,0,0], [0,0,0,0,0,0,0], [0,0,0,0,0,0,0], [0,0,0,0,0,0,0], [0,0,0,0,0,0,0], [0,0,0,0,0,0,0]]
self.board_state_column = [[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0]]
self.board_state_diagonal = []
def drop_stones(self, slot):
a = self.board_state_column[slot]
b = deque([x for x in a if x != 0])
for i in a:
if i == 0:
b.appendleft(0)
self.board_state_column[slot] = b
def update(self):
# board rows
self.board_state_row = []
for i in range(6):
self.board_state_row.append(self.columns_to_rows(i))
# board diagonals
rows = 6
columns = 7
diagonal1 = defaultdict(list) # For the top right to bottom left
diagonal2 = defaultdict(list) # For the top left to bottom right
for i in range(rows):
for j in range(columns):
diagonal1[i - j].append(self.board_state_row[i][j])
diagonal2[i + j].append(self.board_state_row[i][j])
self.board_state_diagonal = []
self.board_state_diagonal.insert(0, diagonal1)
self.board_state_diagonal.insert(1, diagonal2)
def make_turn(self, slot, active_player):
if active_player == 1:
self.symbol = 1
if active_player == 2:
self.symbol = -1
if slot in range(0, 7):
self.board_state_column[slot][0] = self.symbol
return True
else:
return False
def print_board(self):
for i in range(1,8):
print(' '+str(i)+' ', ' | ', end= ' ')
print('')
for i in range(6):
for j in range(7):
print(self.state_to_sign(self.board_state_row[i][j]), ' | ',end=' ')
print('')
def columns_to_rows(self, index):
row = []
for i in self.board_state_column:
row.append(i[index])
return row
def check_win_horizontal(self):
for i in range(6):
wincounter = 0
for j in self.board_state_row[i]:
if j != self.symbol:
wincounter = 0
if j == self.symbol or wincounter == 0:
if j == self.symbol:
wincounter = wincounter + 1
if wincounter == 4:
return True
else:
wincounter = 0
if wincounter == 0:
return False
def check_win_vertical(self):
for i in range(7):
wincounter = 0
for j in self.board_state_column[i]:
if j != self.symbol:
wincounter = 0
if j == self.symbol or wincounter == 0:
if j == self.symbol:
wincounter = wincounter + 1
if wincounter == 4:
return True
if wincounter == 0:
return False
def check_win_diagonal(self):
for i in range(-6, 5):
wincounter = 0
for j in self.board_state_diagonal[0][i]:
if j != self.symbol:
wincounter = 0
if j == self.symbol or wincounter == 0:
if j == self.symbol:
wincounter = wincounter + 1
if wincounter == 4:
return True
else:
wincounter = 0
for i in range(11):
wincounter = 0
for j in self.board_state_diagonal[1][i]:
if j != self.symbol:
wincounter = 0
if j == self.symbol or wincounter == 0:
if j == self.symbol:
wincounter = wincounter + 1
if wincounter == 4:
return True
else:
wincounter = 0
if wincounter == 0:
return False
def check_tie(self):
if 0 not in self.board_state_row[0]:
print('You tied! No one Wins!')
sleep(1.5)
exit()
@staticmethod
def state_to_sign(state):
if state == 1:
return colored(' @ ','red')
if state == -1:
return colored(' @ ','yellow')
if state == 0:
return ' '
def game(current_player,active_player):
board.print_board()
slot = int(input('Which slot do you choose ' + current_player + '? 1-7 or 0 to exit: '))
if slot == 0:
exit('Exit by selection.')
if slot > 0:
slot = slot - 1
while board.board_state_row[0][slot] != 0:
slot = int(input('Slot full! Pick another one 1-7: '))
slot = slot -1
board.make_turn(slot, active_player)
board.update()
board.drop_stones(slot)
board.update()
if board.check_win_diagonal() or board.check_win_horizontal() or board.check_win_vertical():
board.print_board()
print('you win '+ current_player + '!')
sleep(1.5)
exit(0)
board.check_tie()
if active_player == 1:
return int(2)
if active_player == 2:
return int(1)
board = Board()
player1 = input('Whats your name Player1?: ')
player2 = input('Whats your name Player2?: ')
active_player = 1
while active_player > 0:
try:
while active_player == 1:
active_player = game(player1, active_player)
while active_player == 2:
active_player = game(player2, active_player)
except IndexError:
print('Out of range... 1-7! ')
except ValueError:
print('Only numbers! 1-7: ')
sleep(1.5)
• I edited my answer to higlight some issues in your code. Have a look. Sep 23 at 6:48 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.24745097756385803, "perplexity": 10231.91392174352}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323588053.38/warc/CC-MAIN-20211027022823-20211027052823-00656.warc.gz"} |
https://www.physicsforums.com/threads/trig-substitution.189930/ | # Trig substitution
1. Oct 8, 2007
### tony873004
[SOLVED] trig substitution
This is from the class notes. Evaluate the integral:
$$\int_{}^{} {\frac{x}{{\sqrt {3 - x^4 } }}dx}$$
$$\begin{array}{l} u = x^2 ,\,\,du = 2x\,dx\,\, \Leftrightarrow \,\,dx = \frac{{du}}{{2x}} \\ \\ \int_{}^{} {\frac{{x^1 }}{{\sqrt {3 - x^4 } }}dx} = \int_{}^{} {\frac{x}{{2x\sqrt {3 - u^2 } }}du} = \int_{}^{} {\frac{1}{{2\sqrt {3 - u^2 } }}du } \\ \end{array}$$
The next step I would want to do using trig substitution is
$$\begin{array}{l} a = \sqrt 3 ,\,x = a\sin \theta = \sqrt 3 \sin \theta \\ \\ \frac{1}{2}\int_{}^{} {\frac{1}{{\sqrt {\sqrt 3 ^2 - \sqrt 3 \sin \theta } }}du} = \frac{1}{2}\int_{}^{} {\frac{1}{{\sqrt {3 - \sqrt 3 \sin \theta } }}du} \\ \end{array}$$
But the next step in the example is:
$$\int_{}^{} {\frac{1}{{2\sqrt {3 - u^2 } }}du = } \frac{1}{2}\sin ^{ - 1} \frac{u}{{\sqrt 3 }} + C$$
How did he get this? Thanks!
1. The problem statement, all variables and given/known data
2. Relevant equations
3. The attempt at a solution
2. Oct 8, 2007
### cristo
Staff Emeritus
$$\int\frac{du}{2\sqrt{3-u^2}}=\frac{1}{2}\int\frac{du}{\sqrt{3}\sqrt{1-(u/ \sqrt{3})^2}}$$ then let y=u/sqrt(3) hence dy=du/sqrt(3), so we have $$\frac{1}{2}\int\frac{dy\sqrt{3}}{\sqrt{3}\sqrt{1-y^2}}=\frac{1}{2}\int\frac{dy}{\sqrt{1-y^2}}$$ which is a standard integral.
3. Oct 8, 2007
### tony873004
Thanks for the reply. But I don't see how you did this:
$$\int\frac{du}{2\sqrt{3-u^2}}=\frac{1}{2}\int\frac{du}{\sqrt{3}\sqrt{1-(u/ \sqrt{3})^2}}$$
I know you're right, because I picked a random value for u and plugged both formulas into my calculator. But I just don't know how you got from one to the other.
4. Oct 8, 2007
### cristo
Staff Emeritus
Ok, well let's just consider the denominator: $2\sqrt{3-u^2}$. This can be rewritten as $$2\sqrt{(\sqrt{3})^2-u^2}=2\sqrt{(\sqrt{3})^2[1-(u/\sqrt{3})^2]}$$ by factoring out \sqrt{3}^2. We can then take this outside the square-root sign to give $$2\sqrt{3}\sqrt{1-(u/\sqrt{3})^2}$$ as required.
Last edited: Oct 8, 2007
5. Oct 8, 2007
### tony873004
I was about to write back and ask how you did that factoring, but now that I've stared at it for a few minutes, I see what you did.
They expected me to come up with that on my own??
Thanks, Christo :)
6. Oct 8, 2007
### cristo
Staff Emeritus
You're welcome! | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9739044904708862, "perplexity": 1752.006833157764}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-44/segments/1476988719960.60/warc/CC-MAIN-20161020183839-00024-ip-10-171-6-4.ec2.internal.warc.gz"} |
http://mathhelpforum.com/differential-geometry/129160-find-terms-sequence-formula.html | Math Help - Find terms of a sequence and a formula
1. Find terms of a sequence and a formula
Let {a_n}=(1*3*5*...[(2n+1)/(2n!)]. Find the first five terms of this sequence and a simple formula for the ratio [a_(n+1)]/(a_n)]
I found the first five terms to be {a_1}=3/2, {a_2}=5/4, {a_3}=7/12, {a_4}=9/48, and {a_5}=11/140. Is this what I was supposed to do?
I know have to find a formula based on [a_(n+1)]/(a_n)]. How would I do that if a formula was already written, that being [(2n+1)/(2n!)].
2. Originally Posted by summerset353
Let {a_n}=(1*3*5*...[(2n+1)/(2n!)]. Find the first five terms of this sequence and a simple formula for the ratio [a_(n+1)]/(a_n)]
I found the first five terms to be {a_1}=3/2, {a_2}=5/4, {a_3}=7/12, {a_4}=9/48, and {a_5}=11/140. Is this what I was supposed to do?
I know have to find a formula based on [a_(n+1)]/(a_n)]. How would I do that if a formula was already written, that being [(2n+1)/(2n!)].
Clearly $\frac{a_{n+1}}{a_n}=\frac{1\cdot3\cdots(2n+1)\cdot (2n+3)}{(2n+2)!}\cdot\frac{(2n)!}{1\cdot3\cdots(2n +1)}=\frac{2n+3}{(2n+2)(2n+1)}$
3. What about the first five terms? Did I find them the right way? | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 1, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7328075766563416, "perplexity": 674.9777645595864}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-35/segments/1408500823634.2/warc/CC-MAIN-20140820021343-00053-ip-10-180-136-8.ec2.internal.warc.gz"} |
http://steamcommunity.com/app/440/discussions/0/864957182750362985/?l=turkish | Team Fortress 2
Team Fortress 2 > Genel Başlıklar > Konu Detayları
Ø 16 Oca 2013 @ 11:38am
invisible unusual effect
i notice that i cen't see any unusual effects lately (even mien D; ).
i didnt deleted any files and i haven't found any fix for that.
does anyone esle have the same problem or know how to fix it?
En son Ø tarafından düzenlendi; 16 Oca 2013 @ 12:06pm
6 yorumdan 1 ile 6 arası gösteriliyor
Sunny Dasher 10 Şub 2013 @ 12:40pm
same i have that too! has there been a solution to it yet?
SharkWithALaserBeam 10 Şub 2013 @ 12:42pm
all non unusual hats come with invisible unusual effects.
Ø 10 Şub 2013 @ 12:46pm
i already found the problome, some of the partical files make the unusual effect become invisble, so try to find which one coz it :/
Sunny Dasher 10 Şub 2013 @ 2:25pm
@sharkwithalaserbeam hahaha you so funny
@cheessolo so you mean look in the tf2 files and look for the files making it invisible?
Ø 11 Şub 2013 @ 9:04am
yup, i think its always a partical file
Sunny Dasher 11 Şub 2013 @ 10:15am
ok i fixed it i had to change my directx so now it is much better
6 yorumdan 1 ile 6 arası gösteriliyor
Sayfa başına: 15 30 50
Gönderilme Tarihi: 16 Oca 2013 @ 11:38am
İleti: 6 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8958840370178223, "perplexity": 23071.095639515}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-22/segments/1432207930916.2/warc/CC-MAIN-20150521113210-00071-ip-10-180-206-219.ec2.internal.warc.gz"} |
http://tex.stackexchange.com/questions/26710/how-to-write-directly-french-characters-in-emacs-and-print-them-in-latex | # How to write directly French characters in Emacs and print them in LaTeX?
I am editing LaTeX with Emacs. I would like to write in French. At the moment I have to write special French characters for instance like this: \'e prints é. If I write directly é in Emacs, the character will not be shown in the resulting pdf.
It seems that it is possible to write special characters directly in Emacs, which will be shown directly in the pdf. Does anyone know me how to this set up?
-
To handle variety of input encodings used for different groups of languages (to be able to insert all the language-specific special characters directly from your keyboard instead of using macros) you can use the inputenc package:
\usepackage[<encoding>]{inputenc}
The declared <encoding> must be the same of your text editor, but most editors let you choose whichever encoding you like, so for example, if you prefer to use the utf8 encoding (Unicode), you can say:
\usepackage[utf8]{inputenc}
Furthermore, to overcome some shortcomings of the default LaTeX font encoding OT1, is a good idea to use the T1 encoding; this can be done by using
\usepackage[T1]{fontenc}
Additionally, to let LaTeX know how to hyphenate the language(s) you are using, to translate the predefined names, and to use language-specific typographic rules, you need the babel package.
So, in your specific case, you can use something like the following:
\documentclass{article}
\usepackage[frenchb]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
\section{J’accuse...!}
Puisqu'ils ont osé, j'oserai aussi, moi. La vérité, je la dirai, car j'ai promis de la dire,
si la justice, régulièrement saisie, ne la faisait pas, pleine et entière. Mon devoir est de
parler, je ne veux pas être complice. Mes nuits seraient hantées par le spectre de l'innocent
qui expie là-bas, dans la plus affreuse des tortures, un crime qu'il n'a pas commis.
\end{document}
-
"J'accuse", great example :-) – ℝaphink Aug 28 '11 at 5:38
Additionally, XeTeX/LuaTeX manage unicode natively without any kind of settings. – ℝaphink Aug 28 '11 at 5:38 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.845708966255188, "perplexity": 6278.647946567053}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-41/segments/1410657131376.7/warc/CC-MAIN-20140914011211-00054-ip-10-196-40-205.us-west-1.compute.internal.warc.gz"} |
http://physics.stackexchange.com/questions/46838/how-many-percent-of-the-visible-light-reaching-the-earth-are-from-other-stars-th | # How many percent of the visible light reaching the Earth are from other stars than the Sun?
How many percent of the whole visible light reaching the Earth are from other stars than the Sun?
Is it maybe 0,5 - 1% or is my guess already too much?
I am interested mainly in visible light, but if you have knowledge about other parts you can drop it too ;)
-
As the moonless night sky is to the brightest noon-day sun. Clearly vastly smaller than 1%. Remember also that our senses seem to measure logarithmicly , so the true ratio is probably much smaller even than we sense it to be. – Pieter Geerkens Apr 18 '13 at 1:35
I don't know the exact number but I want to support Johannes' claim that the percentage is way smaller by a calculation.
Most of the light arguably comes from the Milky Way - especially the strip that gave name to the galaxy. The diameter of the Milky Way is 100,000-120,000 light years so the median star's distance is something like 50,000 light years away from us. That's approximately $3\times 10^{9}$ times longer a distance than those 500 seconds for the Sun. One must square the distance ratio to get the light power ratio, about $10^{17}$, between the Sun and the typical Milky Way star. Even when $10^{-17}$ is multiplied by the number of stars in the Milky Way, about $1-4\times 10^{11}$ stars, one gets $1-4$ parts per million of the light, also assuming that the Sun is an average-size star. My estimate is 3 orders of magnitude greater than Johannes' but it's still vastly smaller than 0.5%.
Just to check, Sirius is the brightest star in the sky. It's 25 times brighter than the Sun but it's 9 light years away, which is $500,000$ times further than the Sun. Square it and divide 25 by it to get $10^{-10}$. That's the fraction of the sunlight obtained from Sirius. You see that it's much smaller than the result for the generic Milky Way stars above, so individual bright (and mostly nearby) stars are unlikely to topple the statistical estimate. The weakest point of the statistical estimate is that the Sun isn't quite the average star.
One may also check the contribution from other galaxies. There are about $2\times 10^{11}$ galaxies in the Universe. However, even if you decide that the average distance from us is 5 billion years only, shorter than half of the age of the Universe, it's 100,000 times further than the average Milky Way star discussed above (50,000 light years). Square it to get $10^{10}$ for the ratio. If you multiply $10^{-10}$ by $10^{11}$, you actually conclude that the total light from other galaxies is about 10 times greater than the total light from the Milky Way. But that's probably an overestimate because much of the very distant galactic light is redshifted, absorbed, and the older galaxies may have a lower luminosity. At any rate, it's unlikely that they will drive us above 1/100,000 of the sunlight.
Finally, instead of trying even more distant stars, let me mention that there is also the Moon in the sky. It's actually dominating or almost dominating the luminosity at night, except for the new moon or eclipses. In average, we get 1 milliwatt from the moonlight which is 1/300,000 of the Sun's 342 Watts (averaged over places, seasons, day cycles). That's about the same what I got for the total strip of stars in the Milky Way – 3 parts per million of the Sun – but my estimate of the stars was probably an overestimate and I believe the Moon is brighter than the Milky Way combined.
-
your answer is by factor of 50 away from the value of SpiderPig (which I think can not be wrong, since measured). What do you think could be the reason? I have some idea, but 50x... is quite a lot :) – Ilja Apr 22 at 10:26
There are so many factors over there that I am not surprised by a factor of 50. Probably the comparison of the Sun with the average star is the greatest source of an error. Well,if you're really interested, you may want to check every individual step, there are too many of them and I don't think that too many people would be interested in the refinements of the argument. – Luboš Motl Apr 22 at 19:28
According to this site http://en.wikipedia.org/wiki/Apparent_magnitude It should be around 0.000001%. Because the "The total integrated magnitude of the night sky as seen from Earth" is -6.5 and the sun is -26.74. 2.512^20.24 = 125 million.
-
The ratio of starlight to sunlight is much, much smaller than 0.5%. A value of 0.0000001% is far more accurate.
-
Just to be sure, are we talking about the visible light? Becasue, when there is a night and no moon on the sky, some stars make at least a little visible light, even in the deepest night. So, to me 0.0000001% seem too little (maybe 0,01 or so but 0.0000001% seems to be too small) , but I will read your reference later. – Derfder Dec 14 '12 at 14:16
For this order-of-magnitude estimate it doesn't matter which part of the electromagnetic spectrum (visible or not) you consider. Stars radiate at temperatures similar to that of the sun, and hence their spectra are similar. – Johannes Dec 14 '12 at 14:19
@Derfder It often goes unappreciated, but human eyes have an enormous dynamic range. Give them time to adjust, and they can make due with orders of magnitude fewer photons than "normal." – Chris White Dec 14 '12 at 16:27
The part of your question about the non-visible light gives quite surprising (to me at least) results! :
Compare the power from the sun with the cosmic microwave background ("CMB"), taking both as blackbody radiators:
The temperatures are 2.725 and 5778 K respectively (wikipedia :))
The solid angle of the CMB is obviously $4\pi$. The diameter of the sun as seen from the earth is 32' (= 32/60 degrees) according to wikipedia, which gives a solid angle of $6.8\cdot 10^{-5}$. This would give a ratio in the angles of $5.4\cdot 10^{-6}$.
(To be precise, we need a factor of 1/2 more here, since the sunlight is absorbed only by half of the earth, whereas the CMB is always "shining". So I will use a ratio of $2.7\cdot 10^{-6}$. Ignore the factor 1/2 if this reasoning seems too complicated)
So we get a ratio of the radiation power of $$\frac {P_\mathrm{sun}}{P_\mathrm{CMB}} = \frac {T_\mathrm{sun}^4}{T_\mathrm{CMB}^4} \cdot \frac {\Omega_\mathrm{sun}}{\Omega_\mathrm{CMB}} = 2\cdot 10^{13} * 2.7\cdot 10^{-6} = 54\,\mathrm{million}$$
Comparing with 125 million from SpiderPig (which is definitely the more precise answer), I get the astonishing result, that the CMB "shines" more than twice as powerful than all the other stars combined!
PS: the reasoning for the ration of CMB to other stars has some difficulty, of course...
The value for the stars is derived from measurements with visible light, the other value is based on the total power of a blackbody. So the ratio is only correct if the stars have the same temperature as the sun (or more precise, if the ratio of visible power to total power is the same). Since the light of stars is less visible than the sun's (funnily, "per definition" :) - it's the evolutionary definition of visible!) they really produce more power than we think by looking (i.e. the 1 to 125 million of the sun). So the ratio might be (maybe much) smaller than two, but it's still astonishing...
- | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8811960220336914, "perplexity": 535.8397143921745}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-30/segments/1469257824109.37/warc/CC-MAIN-20160723071024-00066-ip-10-185-27-174.ec2.internal.warc.gz"} |
https://indico.cern.ch/event/331032/contributions/1720410/ | # SUSY 2015, 23rd International Conference on Supersymmetry and Unification of Fundamental Interactions
23-29 August 2015
Lake Tahoe
US/Pacific timezone
## The XENON Dark Matter Search Program
25 Aug 2015, 14:30
20m
Bay ()
### Bay
Particle Cosmology Theory and Experiment
### Speaker
Chris Tunnell (Nikhef)
### Description
The XENON program has helped develop the two-phase xenon time-projection-chamber technology into the most powerful means of directly detecting WIMPs. The program currently consists of the XENON100 and XENON1T experiments. The XENON100 experiment completed 225 live-days of data taking in 2012 that resulted, at the time, in the most stringent spin-independent elastic-scattering constrain on WIMPs. Currently, it is running and being used for detector and calibration R&D for future generations of Dark Matter detectors. Complementarily, the XENON1T experiment is under construction and will begin taking data this year. With a sensitive volume of 2.2 tons, the XENON1T experiment aims for a ~100 improvement over its predecessor. I will discuss the status of both experiments and our planned upgrade XENONnT, with a designed sensitivity of few times $10^{-48} \text{ cm}^2$. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5213724970817566, "perplexity": 8328.928183040143}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-34/segments/1596439735989.10/warc/CC-MAIN-20200805212258-20200806002258-00302.warc.gz"} |
https://socratic.org/questions/how-do-you-solve-x-4-3x | Algebra
Topics
# How do you solve x + 4 = 3x²?
Mar 24, 2016
$x = \frac{4}{3} , - 1$
#### Explanation:
color(blue)(x+4=3x^2
$\rightarrow x = 3 {x}^{2} - 4$
$\rightarrow 0 = 3 {x}^{2} - 4 - x$
Rewrite in standard form
color(purple)(rarr3x^2-x-4=0
This is a Quadratic equation (in form $a {x}^{2} + b x + c = 0$)
color(brown)(x=(-b+-sqrt(b^2-4ac))/(2a)
Where
color(red)(a=3,b=-1,c=-4
$\rightarrow x = \frac{- \left(- 1\right) \pm \sqrt{- {1}^{2} - 4 \left(3\right) \left(- 4\right)}}{2 \left(3\right)}$
$\rightarrow x = \frac{1 \pm \sqrt{1 - 4 \left(- 12\right)}}{6}$
$\rightarrow x = \frac{1 \pm \sqrt{1 - \left(- 48\right)}}{6}$
$\rightarrow x = \frac{1 \pm \sqrt{49}}{6}$
$\rightarrow x = \frac{1 \pm 7}{6}$
Now we have $2$ values for $x$
color(indigo)( x=(1+7)/(6)=8/6=4/3
color(orange)(x=(1-7)/(6)=-6/6=-1
color(blue)(ul bar |x=4/3,-1|
##### Impact of this question
341 views around the world | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 18, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7569711208343506, "perplexity": 7850.909437044028}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-40/segments/1600402118004.92/warc/CC-MAIN-20200930044533-20200930074533-00577.warc.gz"} |
https://www.physicsforums.com/threads/find-minimum-work.383085/ | # Find minimum work
• Start date
• #1
4
0
I have been trying this problem multiple times but it still says i'm wrong:
What is the minimum work needed to push a 800 kg car 930 m up along a 9.0^\circ incline?
i'm using the formula:
W= Fdcos(theta)
F= mg
what am i doing wrong?
• #2
tiny-tim
Homework Helper
25,832
251
Welcome to PF!
Hi cmed07! Welcome to PF!
(have a theta: θ and a degree: º )
First, what is the minimum possible value of F?
• #3
Andrew Mason
Homework Helper
7,662
385
I have been trying this problem multiple times but it still says i'm wrong:
What is the minimum work needed to push a 800 kg car 930 m up along a 9.0^\circ incline?
i'm using the formula:
W= Fdcos(theta)
F= mg
what am i doing wrong?
There are a couple of ways to approach this. One way is to calculate the component of force (gravity) along (ie. parallel to) the $$9.0^\circ$$ inclined surface and multiply that force by the distance (930 m). The simpler way would be to determine the height increase over that 930 m and the resulting change in gravitational potential energy of the car. The work is equal to the change in gravitational potential energy.
AM
• #4
4
0
Hi cmed07! Welcome to PF!
(have a theta: θ and a degree: º )
First, what is the minimum possible value of F?
That's all the information that was given to me... I know i'm supposed to find force by multiplying the mass and gravity...but i think the number i'm getting after i put it into the work formula is too big...
• #5
tiny-tim
Homework Helper
25,832
251
That's all the information that was given to me...
D'oh!
On the information that was given to you, what is the minimum possible value of F?
• Last Post
Replies
1
Views
2K
• Last Post
Replies
12
Views
9K
• Last Post
Replies
6
Views
1K
• Last Post
Replies
13
Views
3K
• Last Post
Replies
4
Views
4K
• Last Post
Replies
2
Views
1K
• Last Post
Replies
8
Views
3K
• Last Post
Replies
5
Views
2K
• Last Post
Replies
11
Views
980
• Last Post
Replies
11
Views
3K | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8895334601402283, "perplexity": 1523.640287397648}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-21/segments/1620243990584.33/warc/CC-MAIN-20210513080742-20210513110742-00598.warc.gz"} |
https://zr9558.com/2017/08/ | Opprentice: Towards Practical and Automatic Anomaly Detection Through Machine Learning
系统遇到的挑战:
Definition Challenges: it is difficult to precisely define anomalies in reality.(在现实环境下很难精确的给出异常的定义)
Detector Challenges: In order to provide a reasonable detection accuracy, selecting the most suitable detector requires both the algorithm expertise and the domain knowledge about the given service KPI (Key Performance Indicators). To address the definition challenge and the detector challenge, we advocate for using supervised machine learning techniques. (使用有监督学习的方法来解决这个问题)
该系统的优势:
(i) Opprentice is the first detection framework to apply machine learning to acquiring realistic anomaly definitions and automatically combining and tuning diverse detectors to satisfy operators’ accuracy preference.
(ii) Opprentice addresses a few challenges in applying machine learning to such a problem: labeling overhead, infrequent anomalies, class imbalance, and irrelevant and redundant features.
(iii) Opprentice can automatically satisfy or approximate a reasonable accuracy preference (recall>=0.66 & precision>=0.66). (准确率和覆盖率的效果)
2. 背景描述:
KPIs and KPI Anomalies:
KPIs: The KPI data are the time series data with the format of (time stamp, value). In this paper, Opprentice pays attention to three kinds of KPIs: the search page view (PV), which is the number of successfully served queries; The number of slow responses of search data centers (#SR); The 80th percentile of search response time (SRT).
Anomalies: KPI time series data can also present several unexpected patterns (e.g. jitters, slow ramp ups, sudden spikes and dips) in different severity levels, such as a sudden drop by 20% or 50%.
问题和目标:
1-FDR(false discovery rate):# of false anomalous points detected / # of anomalous points detected = 1 – precision
The quantitative goal of opprentice is precision>=0.66 and recall>=0.66.
The qualitative goal of opprentice is automatic enough so that the operators would not be involved in selecting and combining suitable detectors, or tuning them.
3. Opprentice Overview: (Opprentice系统的概况)
(i) Opprentice approaches the above problem through supervised machine learning.
(ii) Features of the data are the results of the detectors.(Basic Detectors 来计算出特征)
(iii) The labels of the data are from operators’ experience.(人工打标签)
(iv) Addressing Challenges in Machine Learning: (机器学习遇到的挑战)
(1) Label Overhead: Opprentice has a dedicated labeling tool with a simple and convenient interaction interface. (标签的获取)
(2) Incomplete Anomaly Cases:(异常情况的不完全信息)
(3) Class Imbalance Problem: (正负样本比例不均衡)
(4) Irrelevant and Redundant Features:(无关和多余的特征)
4. Opprentice’s Design:
Architecture: Operators label the data and numerous detectors functions are feature extractors for the data.
Label Tool:
Detectors:
(i) Detectors As Feature Extractors: (Detector用来提取特征)
Here for each parameter detector, we sample their parameters so that we can obtain several fixed detectors, and a detector with specific sampled parameters a (detector) configuration. Thus a configuration acts as a feature extractor:
data point + configuration (detector + sample parameters) -> feature,
(ii) Choosing Detectors: (Detector的选择,目前有14种较为常见的)
Opprentice can find suitable ones from broadly selected detectors, and achieve a relatively high accuracy. Here, we implement 14 widely-used detectors in Opprentice.
Opprentice has 14 widely-used detectors:
Diff“: it simply measures anomaly severity using the differences between the current point and the point of last slot, the point of last day, and the point of last week.
MA of diff“: it measures severity using the moving average of the difference between current point and the point of last slot.
The other 12 detectors come from previous literature. Among these detectors, there are two variants of detectors using MAD (Median Absolute Deviation) around the median, instead of the standard deviation around the mean, to measure anomaly severity.
(iii) Sampling Parameters: (Detector的参数选择方法,一种是扫描参数空间,另外一种是选择最佳的参数)
Two methods to sample the parameters of detectors.
(1) The first one is to sweep the parameter space. For example, in EWMA, we can choose $\alpha \in \{0.1,0.3,0.5,0.7,0.9\}$ to obtain 5 typical features from EWMA; Holt-Winters has three [0,1] valued parameters $\alpha,\beta,\gamma$. To choose $\alpha,\beta,\gamma \in \{0.2,0.4,0.6,0.8\}$, we have $4^3$ features; In ARIMA, we can estimate their “best” parameters from the data, and generate only one set of parameters, or one configuration for each detector.
Supervised Machine Learning Models:
Decision Trees, logistic regression, linear support vector machines (SVMs), and naive Bayes. 下面是决策树(Decision Tree)的一个简单例子。
Random Forest is an ensemble classifier using many decision trees. It main principle is that a group of weak learners (e.g. individual decision trees) can together form a strong learner. To grow different trees, a random forest adds some elements or randomness. First, each tree is trained on subsets sampled from the original training set. Second, instead of evaluating all the features at each level, the trees only consider a random subset of the features each time. The random forest combines those trees by majority vote. The above properties of randomness and ensemble make random forest more robust to noises and perform better when faced with irrelevant and redundant features than decisions trees.
Configuring cThlds: (阈值的计算和预估)
(i) methods to select proper cThlds: offline part
We need to figure cThlds rather than using the default one (e.g. 0.5) for two reasons.
(1) First, when faced with imbalanced data (anomalous data points are much less frequent than normal ones in data sets), machine learning algorithems typically fail to identify the anomalies (low recall) if using the default cThlds (e.g. 0.5).
(2) Second, operators have their own preference regarding the precision and recall of anomaly detection.
The metric to evaluate the precision and recall are:
(1) F-Score: F-Score = 2*precision*recall/(precision+recall).
(2) SD(1,1): it selects the point with the shortest Euclidean distance to the upper right corner where the precision and the recall are both perfect.
(3) PC-Score: (本文中采用这种评估指标来选择合适的阈值)
If r>=R and p>=P, then PC-Score(r,p)=2*r*p/(r+p) + 1; else PC-Score(r,p)=2*r*p/(r+p). Here, R and P are from the operators’ preference “recall>=R and precision>=P”. Since the F-Score is no more than 1, then we can choose the cThld corresponding to the point with the largest PC-Score.
(ii) EWMA Based cThld Prediction: (基于EWMA方法的阈值预估算法)
In online detection, we need to predict cThlds for detecting future data.
Use EWMA to predict the cThld of the i-th week ( or the i-th test set) based on the historical best cThlds. Specially, EWMA works as follows:
If $i=1$, then $cThld_{i}^{p}=cThld_{1}^{p}=$ 5-fold prediction
Else $i>1$, then $cThld_{i}^{p}=\alpha\cdot cThld_{i-1}^{b}$+$(1-\alpha)\cdot cThld_{i-1}^{p}$, where $cThld_{i-1}^{b}$ is the best cThld of the (i-1)-th week. $cThld_{i}^{p}$ is the predicted cThld of the i-th week, and also the one used for detecting the i-th week data. $\alpha\in [0,1]$ is the smoothing constant.
For the first week, we use 5-fold cross-validation to initialize $cThld_{1}^{p}$. As $\alpha$ increases, EWMA gives the recent best cThlds more influences in the prediction. We use $\alpha=0.8$ in this paper.
5. Evaluation(系统评估)
Opprentice has 14 detectors with about 9500 lines of Python, R and C++ code. The machine learning block is based on the scikit-learn library.
Random Forest is better than decision trees, logistic regression, linear support vector machines (SVMs), and naive Bayes.
Focus: Shedding Light on the High Search Response Time in the Wild
问题描述:
To help search operators dubug HSRT (high search response time),Focus is a search log analysis framework to answer the three questions:
(1) What is the HSRT condition?
(2) Which HSRT condition types are prevalent across days?
(3) How does each attribute affect SRT in those prevalent HSRT condition types?
解决方案:
Focus has one component for each of the above questions:
(1) A decision tree based classifier to identify HSRT conditions in search logs of each day;
(2) A clustering based condition type miner to combine similar HSRT conditions into one type, and find the prevalent condition types across days; following Occam’s razor principle.
(3) An attribute effect estimator to analyze the effect of each individual attribute of SRT within a prevalent condition type.
基础知识准备:
(A) Search Logs:
For each measured query, its search log records two types of data: SRT and SRT components, Query Attributes.
(1) SRT and SRT components:(特征层)
$t_{1}$ is when a query is submitted; $t_{2}$ is when the result HTML file has been downloaded; $t_{3}$ is when a brower finishes parsing the HTML; $t_{4}$ is when the page is completely rendered. SRT is measured by $t_{4}-t_{1}$, the user-received search response time.
$T_{server}$ is the server response time of the HTML file, which is recorded by servers; $T_{net}=t_{2}-t_{1}-T_{server}$ is the network transmission time of the HTML file; $T_{brower}=t_{3}-t_{2}$ is the browser parsing time of the HTML; $T_{other}=t_{4}-t_{3}$ is the remaining time spent before the page is rendered, e.g. download time of images from image servers.
(2) Query Attributes:(特征层)
The search logs record the following attributes for each measured query:
(i) Browser Engine: Webkit(e.g. Chrome, Safari and 360 Secure Browser), Gecko, Trident LEGC, Trident 4.0, Trident 5.0, and others.
(ii) ISP: China Telecom, China Unicom, China Mobile, China Netcom, CHina Tietong, others.
(iii) Localtion: Based on the client IP, convert IP to its geographic location. In total, there are 32 provinces.
(iv) #Image: the number of embedded images in the result page.
(vii) Background page views: On the service side, the search engine S also post-analyzes the logs and generates the background page views. The background PVs (page views) for a query q is measured by the number of queries served within 30 seconds before and after q is served.It reflects the average search request load where q is served. Due to confidentiality constraints, we normalize specific background PVs (page Views) by the maximum value.(事后分析,统计出一些必要的特征,输入 Focus 系统的机器学习模型中)
(B) HSRT and HSRT Conditions:(样本层)
Usually, we can use cumulative distribution fraction (CDF) of SRT in the search logs to determine the high search response time condition (HSRT condition). In this paper, we define HSRT as the SRT longer than 1s.
Challenges of Identifying HSRT Conditions: In order to identify HSRT conditions in multi-dimensional search logs.(以下是这个系统的一些难点和挑战点)
(a) Naive Single Dimensional Based Methods: including pair-wise correlation analysis and so on, but is inefficient.
(b) Attributes can be potentially interdependent on each other: that means Naive Bayes Method may not applicable in this situation.
(c) Need to avoid output overlapping conditions: like {#image>30}, {ads=yes}, and {#image>20, ads=yes}. (随着时间的推移,每天使用模型可能会推出类似或者重复的规则)。
关键思想和系统概况
Condition is a combination of attributes and specific values in search logs.
HSRT Condition is a condition that covers at least 1%\$ of total queries, and has the fraction of HSRT large than the global level:
(# of HSRT queries in a HSRT condition / #of queries in a HSRT condition) > (# of HSRT queries / # of queries). This is in order to assign to labels and we can change this definition in practice. (这只是用来打标签的定义,用于判断什么是HSRT,在实际的应用中,我们可以根据具体的场景采用不同的定义,例如返回码等指标)。
‘Focus’ System Overview:
Input: search logs(日志)
(i) Use a decision tree based classifier to identify HSRT conditions in search logs every day; (每天可以使用决策树模型从日志中提取HSRT条件)。
(ii) Use a clustering based condition type miner to identify condition types of similar HSRT conditions, and fine prevalent condition types across days; (用于把类似的条件融合在一起)。
(iii) Use an attribute effect estimator to analyze how an attribute affects SRT and SRT components in each prevalent condition type. (用于判断哪些属性或者特征对这个标签影响更加深远)。
Output: prevalent condition types and their attributes effects on SRT.(第二步输出的条件以及第三步属性的重要性)。
Part (i): Decision Tree Based Classifier including ID3, C4.5, CART. It contains five important parts: (1) expressing attribute splits; (2) evaluate splits; (3) stopping tree growing; (4) assigning Labels: assign HSRT labels to the left nodes whose fraction of HSRT is larger than the global fraction of HSRT; (5) identify HSRT Branching Attribute Conditions. (这里是 Focus 系统所采用的机器学习算法)。
Part (ii): Condition Type Miner: group HSRT conditions according to (1) the same combination of attributes, (2) the same value from each category attribute, and (3) similar interval for each numeric attribute, using Jaccard Index to measure the similarity between intervals. (条件的融合)。
Part (iii): Attribute Effect Estimator: With each condition type
$C=\{c_{1}\wedge c_{2}\cdots \wedge c_{i} \wedge \cdots c_{n}\}$,
we design a method to understand how each attribute condition $c_{i}$ affects SRT.
For example, what is the HSRT fraction caused by $c_{i}$ in $C$? What SRT components (e.g. $T_{net}$ and $T_{server}$) are affected by $c_{i}$?
Main Idea: flip condition $c_{i}$ to the opposite $\overline{c}_{i}$ to get a variant condition type $C_{i}'=\{c_{1}\wedge c_{2}\cdots \wedge \overline{c}_{i} \wedge \cdots c_{n}\}$. In the past days, we have the number of HSRT events in total, the number of HSRT events in condition $C$ and the number of HSRT events in condition $C_{i}'$. As a result, we believe the historical data based comparison can provide a reasonable estimate of the attribute effects. The comparison between $C$ and $C_{i}'$ in these days is based on the specific HSRT conditions of these days. (用于判断哪些属性更能够引起 HSRT)。
In Table IV, the results are sorted by the variation of the fraction of HSRT in condition types (HSRT% column) caused by flipping an attribute condition.
(i) We highlight the variations greater than zero (getting worse after flipping an attribute condition).
(ii) We focus on that flipping the HSRT branching attribute conditions can yield improvements on HSRT%. For example, the condition #image>x are all ranked at the top. It means we need to reduce the impact of images on SRT and we can get the highest potential improvement of HSRT.
(iii) Table III and Table IV are the output of Focus to the operators for these months.
Observations by Further Inverstigation
Table IV raises some interesting questions:(通过 Focus 输出的表格 Table IV 可以提出很多其余的问题,也许是人工经验不容易发现的问题)
(1) Why does reducing #images increase $T_{server}$, the time that servers prepare the result HTML (row 1, 2, 3, 4 of Table IV)?
(2) How do ads inflate SRT? Why do the pages with ads need more $T_{net}$ and $T_{brower}$ (row 7)?
(3) Why does Webkit engine perform better, especially greatly decreasing $T_{browser}$ (row 5, 10, 11, 12)?
(4) It is nature that switching ISPs can affect network transmission time $T_{net}$, but why does switching to China Telecom reduce $T_{server}$ by over 20% (row 6, 8, 9)? | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 44, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.41896942257881165, "perplexity": 3973.2304541472645}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-30/segments/1563195525699.51/warc/CC-MAIN-20190718170249-20190718192249-00113.warc.gz"} |
http://clay6.com/qa/37935/solve-the-equation-3x-4x-large-frac-0- | Want to ask us a question? Click here
Browse Questions
Ad
0 votes
# Solve the equation : $\;3x^{2}-4x+\large\frac{20}{3}=0\;$
$(a)\;\large\frac{2}{3} \pm \large\frac{4}{3} i\qquad(b)\;\large\frac{4}{3} \pm \large\frac{2}{3} i\qquad(c)\;\large\frac{5}{3} \pm \large\frac{4}{3} i\qquad(d)\;\large\frac{2}{3} \pm \large\frac{5}{3} i$
Can you answer this question?
## 1 Answer
0 votes
Answer : $\;\large\frac{2}{3} \pm \large\frac{4}{3} i$
Explanation :
The given quadratic equation is $\;3x^{2}-4x+\large\frac{20}{3}=0$
This equation can also be written as $\; 9x^{2} -12 x + 20 =0$
On comparing the given equation with $\;ax^2 + bx +c\;,$ we obtain
$a=9\;,b=-12\;and \;c=20$
Therefore , the discriminant of the given equation is
$D = b^2 -4ac=(-12)^{2} - 4 \times (9) \times (20) =144-720 = -576$
Therefore , the required solutions are
$\large\frac{-b \pm D}{2a} = -\large\frac{-(-12) \pm \sqrt{-576}}{2 \times 9}$
$= \large\frac{12 \pm \sqrt{576}i}{18} \quad [\sqrt{-1} =i]$
$= \large\frac{12 \pm 24 i}{18}$
$= \large\frac{6(2+4i)}{18}$
$=\large\frac{2}{3} \pm \large\frac{4}{3} i$
answered Apr 11, 2014 by
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9643577337265015, "perplexity": 11490.066731826235}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-13/segments/1490218189245.97/warc/CC-MAIN-20170322212949-00313-ip-10-233-31-227.ec2.internal.warc.gz"} |
https://www.arxiv-vanity.com/papers/hep-ph/0508044/ | arXiv Vanity renders academic papers from arXiv as responsive web pages so you don’t have to squint at a PDF. Read this paper on arXiv.org.
SHEP/0525
hep-ph/0508044
Charged Lepton Corrections to Neutrino Mixing Angles
[2mm] and CP Phases Revisited
[12mm] S. Antusch111E-mail: , S. F. King222E-mail:
[1mm] School of Physics and Astronomy, University of Southampton,
Southampton, SO17 1BJ, U.K.
We re-analyze charged lepton corrections to neutrino mixing angles and CP phases, carefully including CP phases from the charged lepton sector. We present simple analytical formulae for including the charged lepton corrections and derive compact new results for small neutrino and charged lepton mixings and . We find a generic relation , which relates the prediction from the neutrino sector to the charged lepton mixing and to the MNS neutrino oscillation phase . We apply our formula to the examples of bimaximal or tri-bimaximal neutrino mixing. One implication is that the so-called quark-lepton complementarity relation can only hold for and it gets modified in the presence of leptonic CP violation. On the other hand, the lepton mixing generated from the charged lepton correction is independent of CP phases and given by . Combining these results leads to a model-independent sum rule: where in the case of (tri-)bimaximal neutrino mixing, for example.
## 1 Introduction
Recently, there has been some interest in relations between the lepton mixing angle and the Cabibbo angle [1], often referred to as quark-lepton complementarity (QLC). It was initiated from the observation that current best fit values (see e.g. [2]) are compatible with an intriguing relation . One conclusion was that if a relation between the Cabibbo angle and were found, this could point towards quark-lepton unification. In addition, further relations between the lepton mixings and and quark mixings have been proposed. The general idea is that specific predictions from the neutrino sector, i.e. for the solar angle, get modified by the charged lepton mixings [3] such as , and that these corrections from the charged lepton sector can be be related to quark mixings in quark-lepton unified theories. While the above relation, where and add up to , was based on bimaximal neutrino mixing, another interesting complementarity emerges if the neutrino sector predicts tri-bimaximal mixing [4], which can naturally be realized with non-Abelian flavour symmetry SO(3) [5] or SU(3) [6].
Motivated by this recent interest in charged lepton corrections to neutrino mixings, we re-analyze this issue in this note. We shall first present simple formulae for including the charged lepton corrections, which allow to discuss the effects analytically. Since the two types of complementarity scenarios involve small 1-3 mixing from the neutrino sector, we then mainly focus on this case and find some interesting results: For small neutrino and charged lepton mixings and , we find for instance the new relation
θ12+1√2θe12cos(δ−π)≈θν12, (1)
which connects the prediction for the solar mixing from the neutrino sector to the charged lepton mixing and to the MNS CP phase relevant for neutrino oscillations . Compared to previous works which consider charged lepton contributions [3], the general relation of Eq. (1) holds model-independently as long as the neutrino and charged lepton mixings and are small. It is surprisingly compact and shows that under the above conditions, measuring the MNS CP phase is essential for testing any model predictions for the neutrino mixing modified by charged lepton corrections.
The compact formula in Eq. (1) may be used as a basis for studying quark-lepton complementarity, if the charged lepton mixing angle is related to the Cabibbo angle . The exact type of complementarity depends on the prediction for the neutrino mixing angle , specifically either in the case of bi-maximal complementarity, or in the case of tri-bimaximal complementarity. In both cases, Eq. (1) shows that the presence of the leptonic CP phase plays a crucial role in any complementarity relation. Indeed bimaximal complementarity in its simple form is seen to be disfavored in the presence of leptonic CP violation (i.e. ). Tri-bimaximal complementarity gives testable predictions, which however require a measurement of in addition to a more precise measurement of . In the context of tri-bimaximal complementarity [5], the relation of Eq. (1) with the specific prediction for has been found in a specific model. Discussions of charged lepton contributions to neutrino mixings in other specific scenarios, such as for instance bi-maximal neutrino mixing, can be found in Refs. [3]. However, as we will show, the general relation of Eq. (1) holds model-independently, as long as and are small.
For small and , the total lepton mixing is induced from the charged lepton correction , which leads to the relation
θ13=1√2θe12, (2)
independent of CP phases. This means that if the charged lepton mixing is related to the Cabibbo angle in any form, this would show up more directly in than in the solar angle .
Combining these results leads to a model-independent sum rule:
θ12+θ13cos(δ−π)≈θν12 (3)
where in the case of bimaximal neutrino mixing, or in the case of tri-bimaximal neutrino mixing, for example. It is worth emphasizing that under the generic assumption of small and the combined measurement of the lepton mixings , and of the MNS CP phase in future precision experiments on neutrino oscillations has the potential to reveal if there are any symmetries determining the neutrino mixing .
In the most general case, if we relax the condition of small and , charged lepton CP phases still modify the charged lepton corrections to the solar mixing angle, however the relevant CP phase is then not related to the low energy CP phase observable (in principle) in future neutrino oscillation experiments. Then the situation is similar to the charged lepton correction to : Since it depends on charged lepton CP phases which are not related to and just marginally contribute to one of the Majorana CP phases, we conclude that it is not realistic to expect any generic complementarity relation for . The maximal charged lepton correction to is , which is nevertheless interesting with respect to future precision neutrino experiments.
## 2 Preliminaries on the Mixing Formalism
Before we discuss charged lepton corrections, it is necessary to specify the definition of lepton mixings and our conventions for the charged lepton and neutrino mass matrices: The Dirac mass matrices of the charged leptons is given by
meLR=YeLRvd (4)
where and the Lagrangian is of the form
L=−YeLR¯eLheR+H.c. (5)
We will focus on three light Majorana neutrinos in the following, with the neutrino mass being defined by the Lagrangian
L=−12¯νLmνLLνcL+H.c. (6)
The change from flavour basis to mass eigenbasis can be performed with the unitary diagonalization matrices and by
VeLmeLRV†eR=⎛⎜⎝me000mμ000mτ⎞⎟⎠,VνLmνLLVTνL=⎛⎜⎝m1000m2000m3⎞⎟⎠. (7)
The MNS matrix, the mixing matrix in the lepton sector, is then given by
UMNS=VeLV†νL. (8)
After eliminating so-called unphysical phases as usual, by charged lepton phase rotations, the MNS matrix can be parameterized as
UMNS=R23U13R12P0 (9)
using the matrices and defined by
R12:=⎛⎜⎝c12s120−s12c120001⎞⎟⎠, U13:=⎛⎜⎝c130s13e−iδ010−s13eiδ0c13⎞⎟⎠, R23:=⎛⎜⎝1000c23s230−s23c23⎞⎟⎠, P0:=⎛⎜⎝eiβ1000eiβ20001⎞⎟⎠ (10)
and where and stand for and , respectively. The matrix contains the Majorana phases and . is the Dirac CP phase relevant for neutrino oscillations.
Another useful parameterization, in particular for including charged lepton corrections, is [7]
UMNS=U23U13U12, (11)
with matrices being defined as
U12:=⎛⎜⎝c12s12e−iδ120−s12eiδ12c120001⎞⎟⎠, U13:=⎛⎜⎝c130s13e−iδ13010−s13eiδ130c13⎞⎟⎠, U23:=⎛⎜⎝1000c23s23e−iδ230−s23eiδ23c23⎞⎟⎠. (12)
One can easily switch between these two conventions using the identities [7]
δ23 = β2 (13a) δ13 = δ+β1 (13b) δ12 = β1−β2. (13c)
and the fact that remains the same in both notations. We will use the latter convention in the following and introduce the more common phase convention if appropriate, in particular for making the connection to the Dirac CP phase observable in neutrino oscillations.
## 3 Simple Formulae for Including Charged Lepton Corrections
We will now consider the situation that bi-large neutrino mixing stems mainly from the neutrino sector, and that the mixing angles induced by the charged leptons can be considered as corrections. In this approximation, we will derive formulae which allow to include corrections to neutrino mixing angles and CP phases conveniently. We will see that special care has to be taken when dealing with complex phases from the charged lepton sector.
Parameterizing the neutrino and charged lepton diagonalization matrices in and an analogous way to Eq. (2), we can write as [7]
UMNS=UeL†12UeL†13UeL†23UνL23UνL13UνL12. (14)
The additional unphysical phases have been shifted to the left and then absorbed, as usual, by charged lepton phase rotations. The procedure for extracting the charged lepton and neutrino angles and phases is given in great detail in the Appendix of Ref. [7].
In this parameterization, the MNS matrix can be conveniently expanded in terms of neutrino and charged lepton mixing angles and phases to leading order in small quantities, i.e. in the charged lepton mixing angles and in : 111These results differ somewhat from those in [7], in particular the sign of the last term in Eq. (15c) has been corrected.
s23e−iδ23 ≈ sν23e−iδν23−θe23cν23e−iδe23 (15a) θ13e−iδ13 ≈ θν13e−iδν13−θe13cν23e−iδe13−θe12sν23ei(−δν23−δe12) (15b) s12e−iδ12 ≈ sν12e−iδν12+θe13cν12sν23ei(δν23−δe13)−θe12cν23cν12e−iδe12 (15c)
Using Eq. (13) it is simple to express the phases on the left-hand side in terms of the phases and , if desired. Before we turn to applications, let us remark that since we have assumed that the two large lepton mixing angles and stem mainly from the neutrino sector, the phases and thus also are mainly determined from the neutrino sector, with only small corrections from the charged lepton sector.
With this respect, and the Dirac CP phase are very different: Since we only know that the total lepton mixing is rather small and without making further assumptions, it can stem from the neutrino mixing or it can alternatively be mainly induced from the charged lepton mixings and/or . In the latter case, the charged lepton corrections also mainly determine the Dirac CP phase , observable in neutrino oscillations.
Let us finally note that lepton mixing angles are subject to renormalization group (RG) running between high energy, where models typically predict the flavour structure, and low energy, where experiments are performed. A numerical calculation of the RG corrections can be performed with the software packages REAP/MPT introduced in [10].
### 3.1 Charged Lepton Corrections with Small θν13
As discussed in the introduction, one interesting special case is that as well as are rather small, i.e. . From Eq. (15b) and using the leading order relations and Eq. (13b), we obtain
θ13e−iδ≈θe12sν23e−i(β2−β1)−iπ−iδe12, (16)
and it follows that
δ≈β2−β1+π+δe12. (17)
Let us note that for instance in scenarios with an inverted neutrino mass hierarchy and a Majorana parity between and , we have and the Dirac CP phase is simply given by the charged lepton phase . In addition, we obtain
θ13=θe12sν23. (18)
The charged lepton 1-2 mixing generates independent of charged lepton CP phases.
From Eq. (15c), the solar mixing angle is given by
s12≈sν12+θe12cν23cν12cos(β2−β1+π+δe12)≈sν12+θe12cν23cν12cos(δ), (19)
where we have used the result of Eq. (17) and . In terms of mixing angles, approximating , we obtain:
θ12+1√2θe12cos(δ−π)≈θν12. (20)
The relation of Eq. (20) was first found in a model of tri-bimaximal neutrino mixing based on SO(3) flavour symmetry [5] where and . We have shown here that such a result holds quite generally, not just for any model of tri-bimaximal neutrino mixing, but also for any model of bimaximal neutrino mixing, or indeed any model of neutrino mixing in which and are small compared to . We emphasize that under these assumptions, the corrections to from the charged lepton sector depend on the charged lepton 1-2 mixing and on the Dirac CP phase , a fact which is often overlooked in studies of complementarity, as we now briefly discuss.
## 4 Applications
### 4.1 Consequences for Quark-Lepton Complementarity
The general idea of quark-lepton complementarity [1] is that the solar mixing predicted from the neutrino sector is corrected by charged lepton contributions, which are in turn related to quark mixing angles. For example in the case of bimaximal complementarity, the starting point is a maximal solar neutrino angle , and a relation like , compatible with present best-fit values, could in principle emerge. For example in [8] it has been shown how a charged lepton mixing , which could nearly realize the QLC relation, can arise in quark-lepton unified theories, and leads to a prediction for which also holds in the presence of CP violating phases. As has been pointed out by many authors, an inverted neutrino mass hierarchy with a Majorana parity between and is a good starting point for QLC. For and , under the assumptions of Sec. 3.1 which are in general satisfied in approaches to QLC via inverted neutrino mass hierarchy, Eq. (20) reads
θ12+θCcos(δ−π)≈45∘. (21)
In general, we would therefore not expect a relation such as , where the Cabibbo angle enters directly, unless CP is conserved (i.e. ). All quark-lepton complementarity relations are modified for non-zero and a measurement of the leptonic Dirac CP phase is required for testing Cabibbo-like corrections to neutrino mixing.
An interesting application of our general results in the presence of CP violation is to tri-bimaximal neutrino mixing, where and . For example, for a charged lepton mixing corresponding to the Georgi-Jarlskog relation [9] which arises in many quark-lepton unified theories, Eq. (20) leads to a tri-bimaximal complementarity relation [5]
θ12+θC3√2cos(δ−π)≈35.26∘, (22)
which is consistent with current data for a wide range of CP phases . This also leads to the prediction .
### 4.2 Consequences for Leptogenesis – MNS Links
It is well known that in general, there is no relation between the CP phase observable in neutrino oscillations and the cosmological CP phase which appears in the leptogenesis mechanism [11], where the baryon asymmetry of our universe arises via out-of-equilibrium decay of the right-handed neutrinos involved in the see-saw mechanism. However, for specific classes of flavour models with symmetries or specific assumptions such as texture zeros or sequential dominance conditions, links between these CP violating phases emerge from predictions for the decay asymmetries of the lightest right-handed neutrino. Since depends only on the product [12] in the mass basis of the right-handed neutrinos, it is not affected by charged lepton mixings and phases at all. Therefore, Eq. (15b) immediately shows that links between the MNS CP phase and cosmological CP violation relevant for leptogenesis can only hold if , i.e. if stems mainly from the neutrino sector. Otherwise, there are large contributions to from the charged lepton sector which are completely decoupled from leptogenesis. If or are much larger than , the lepton mixing and thus also stem dominantly from charged lepton corrections and any leptogenesis-MNS link is lost.
## 5 Summary and Conclusions
In this note, we have revisited charged lepton corrections to neutrino mixing and CP phases, carefully including CP phases from the charged lepton sector. We have therefore presented simple analytical formulae for including the charged lepton corrections. Based on these formulae, we have derived interesting new results for small neutrino and charged lepton mixings and : For instance, we have found the relation
θ12+1√2θe12cos(δ−π)≈θν12
which connects the prediction from the neutrino sector to the charged lepton mixing and to the Dirac CP phase . We have then applied our formula to the examples of bimaximal or tri-bimaximal neutrino mixing. One implication was that the so-called quark-lepton complementarity relation can only hold for and it gets modified in the presence of leptonic CP violation. We have also found that the lepton mixing generated from the charged lepton correction is independent of CP phases and given by
θ13=1√2θe12
Combining these results leads to a model-independent sum rule:
θ12+θ13cos(δ−π)≈θν12
where in the case of bimaximal neutrino mixing, or in the case of tri-bimaximal neutrino mixing, for example. It is worth emphasizing that under the generic assumption of small and the combined measurement of the lepton mixings , and of the MNS CP phase in future precision experiments on neutrino oscillations has the potential to reveal if there are any symmetries determining the neutrino mixing .
In the most general case, if we relax the condition of small and , charged lepton CP phases still modify the charged lepton corrections to the solar mixing angle, however the relevant CP phase is then not related to the low energy CP phase observable (in principle) in future neutrino oscillation experiments. Then the situation is similar to the charged lepton correction to . The latter depends on charged lepton CP phases which are not related to and just marginally contribute to one of the Majorana CP phases, and we conclude that it is not realistic to expect any generic complementarity relation for . The maximal charged lepton correction to is , which is nevertheless interesting with respect to future precision neutrino experiments.
We have furthermore argued that any link between the MNS CP phase and cosmological CP violation relevant for leptogenesis is generically lost if is small compared to and/or . Then stems dominantly from charged lepton corrections which are completely decoupled from the decay asymmetry for leptogenesis.
## Acknowledgements
We acknowledge support from the PPARC grant PPA/G/O/2002/00468. | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9818318486213684, "perplexity": 1107.9214564319768}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-34/segments/1596439737225.57/warc/CC-MAIN-20200807202502-20200807232502-00578.warc.gz"} |
https://www.maths.usyd.edu.au/u/pubs/publist/preprints/2019/bjorklund-11.html | Patterns in sets of positive density in trees and affine buildings
M. Björklund, A. Fish, J. Parkinson
Abstract
We prove an analogue for homogeneous trees and certain affine buildings of a result of Bourgain on pinned distances in sets of positive density in Euclidean spaces. Furthermore, we construct an example of a non-homogeneous tree with positive Hausdorff dimension, and a subset with positive density thereof, in which not all sufficiently large (even) distances are realised.
Keywords: Density, Ramsey theory, trees, buildings.
: Primary 05D10.
This paper is available as a pdf (356kB) file.
Tuesday, July 23, 2019 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8444811701774597, "perplexity": 1391.0929689884683}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-49/segments/1669446710900.9/warc/CC-MAIN-20221202082526-20221202112526-00627.warc.gz"} |
http://memosisland.blogspot.com/2011/04/ | ## Saturday, 16 April 2011
### R Package install order automation
There is a bioconductor tool to generate install order for packages [here].
Initially tool generates graph of CRAN package dependencies (ignoring suggests, because otherwise graph will be acyclic).
Usage Example:
source("http://www.bioconductor.org/biocLite.R")
biocLite("pkgDepTools")
require('pkgDepTools')
deps <- makeDepGraph("http://cran.r-project.org", type="source")
a<-getInstallOrder("plyr",
deps,needed.only=FALSE)
a\$packages
[1] "iterators" "itertools" "plyr"
## Saturday, 9 April 2011
### R-plugin for vim
vim is a powerful text editor and R is a powerful environment for statistical computing task. To harness both powers a plug-in for vim is developed. One needs python enabled vim and conqueterm.
## Friday, 8 April 2011
### Ant task with wildcard expansion for svn.
Ant is a popular tool among Java developers but one can use it for some other generic tasks. For example using svn as a task inside an ant script is provided by a library. However wildcard expansion won't work under this task. One way to over come this to use an exec task as follows (in windowz):
<exec executable="cmd.exe"> <arg line=" /C svn --force delete pathtofiles\*.dat --username=username --password=password"> </arg></exec> | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.32256555557250977, "perplexity": 16354.912459236937}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-24/segments/1590347401004.26/warc/CC-MAIN-20200528232803-20200529022803-00305.warc.gz"} |
https://stats.stackexchange.com/questions/419652/ordinal-longitudinal-data-with-unequal-number-of-responses | # Ordinal longitudinal data with unequal number of responses
I have a dataset that comprises of about 900 subjects. There are baseline independent variables which can be continuous or not (e.g. sex, age etc.). The "response" variable is a series of measurements of an ordinal scale ranging from 1-6 (with 1 denoting "good" and 6 "bad").
Each individual can have anywhere between 1-27 measurements and each measurement was taken for a specific year after enrolment in the cohort. For example, subject 21 could have 3 measurements (year 1: 2, year 2: 2, year 3: 5), subject 22 could have 7 (year 1: 5, year 2: 6...) and so on.
I have tried fitting mixor with R (after converting to a long format) without success. I also tried MCMCglmm. Generally, however, what would be the best way to model such longitudinal data?
Thank you very much for the reply and apologies for any lack of clarity.
The mixor package in R indeed fits mixed ordinal response models as correctly pointed out. The issue I have been having is that if I add individuals as random intercepts and time points as random slopes, the model just keeps iterating, even with a relatively small number of covariates (although some are factors with many levels). This can last for a few hours.
In terms of the MCMC approach, one issue is how to select a prior for an ordinal response and how to, eventually diagnose correct convergence.
Finally, the GLMMadaptive gives the following error message: mixed_model(score ~ sex + year, random = ~ 1 | id, data = epilepsy_long, family = binomial()) Error in eval(family\$initialize) : y values must be 0 <= y <= 1
Down the line, another obstacle could be how to account for the lack of balance in observations, given that some lack of balance could be due to informative missingness?
My sincere apologies if these questions or their presentation is elementary, but I have searched online quite a bit to find vignettes that could solve these issues - there is not a huge amount out there.
• Please don't assume that readers are familiar with specific software commands or packages. Better to state the type of model you're fitting. However, I glanced at the mixor package, and the description said it fit mixed ordinal models. That's the type of model I would have recommended, and indeed @DimitrisRizopoulos just recommended it. We would need to know more about what "without success" means. Did the model not converge? – Weiwen Ng Jul 29 at 14:31 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5942849516868591, "perplexity": 1289.0708369915671}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-47/segments/1573496669431.13/warc/CC-MAIN-20191118030116-20191118054116-00101.warc.gz"} |
http://arxiv-export-lb.library.cornell.edu/list/hep-ph/9608?skip=25&show=25 | High Energy Physics - Phenomenology
Authors and titles for Aug 1996, skipping first 25
[ total of 352 entries: 1-25 | 26-50 | 51-75 | 76-100 | 101-125 | ... | 351-352 ]
[ showing 25 entries per page: fewer | more | all ]
[26]
Title: Chiral perturbation theory
Authors: Gerhard Ecker
Comments: 36 pages, Latex, 4 figures embedded with epsfig.sty. To appear in Proc. of 5th Workshop on Hadron Physics, Angra dos Reis, RJ, Brazil, April 1996
Subjects: High Energy Physics - Phenomenology (hep-ph)
[27]
Title: The Artificial Neural Networks as a tool for analysis of the individual Extensive Air Showers data
Authors: Tadeusz Wibig (Univ. of Lodz)
Subjects: High Energy Physics - Phenomenology (hep-ph)
[28]
Title: Quark Confinement due to Random Interactions
Authors: Kurt Langfeld
Comments: 7 pages, LaTeX, 2 figures included using epsf, talk presented at the QCD96 workshop, Paris, June 1996. to appear in the proceedings
Subjects: High Energy Physics - Phenomenology (hep-ph); High Energy Physics - Theory (hep-th)
[29]
Title: Gribov's Theorem on Soft Emission and the Reggeon-Reggeon-Gluon Vertex at Small Transverse Momentum
Journal-ref: Phys.Lett. B389 (1996) 737-741
Subjects: High Energy Physics - Phenomenology (hep-ph)
[30]
Authors: Alex Pomarol
Comments: 6 pages, Latex, 2 figures. Talk given at the 4th International Conference on Supersymmetry (SUSY 96), University of Maryland, May 1996
Journal-ref: Nucl.Phys.Proc.Suppl. 52A (1997) 210-214
Subjects: High Energy Physics - Phenomenology (hep-ph)
[31]
Title: SUSY GUTs contributions and model independent extractions of CP phases
Comments: 13 pages (Latex), 2 PS figures, a few remarks are added and a typo is corrected. To appear in Phys. Rev. Lett
Journal-ref: Phys.Rev.Lett.77:4499-4502,1996
Subjects: High Energy Physics - Phenomenology (hep-ph)
[32]
Title: Renormalization of $ΔB=2$ Transitions in the Static Limit Beyond Leading Logarithms
Authors: Gerhard Buchalla
Comments: 6 pages, LaTeX, no figures
Journal-ref: Phys.Lett.B395:364-368,1997
Subjects: High Energy Physics - Phenomenology (hep-ph)
[33]
Title: Generic Formula of Soft Scalar Masses in String Models
Comments: 46 pages, latex, no figures
Journal-ref: Phys.Rev. D56 (1997) 3844-3859
Subjects: High Energy Physics - Phenomenology (hep-ph); High Energy Physics - Theory (hep-th)
[34]
Title: SUSY Contributions to $R_b$ and Top Decay
Authors: D.P. Roy
Comments: Latex file (3 pages)+ 2 ps files containing figures. Invited talk at SUSY96, Maryland, May 1996
Journal-ref: Nucl.Phys.Proc.Suppl.52A:116-119,1997
Subjects: High Energy Physics - Phenomenology (hep-ph)
[35]
Title: QCD Corrections to $b \to s e^+e^-$ Decay
Comments: 11 pages latex file, including 1 figure. To appear in Phys. Lett. B
Journal-ref: Phys.Lett. B390 (1997) 413-419
Subjects: High Energy Physics - Phenomenology (hep-ph)
[36]
Title: Non-Leptonic Two-Body Weak Decays of Charmed Mesons and CP-Violating Asymmetries
Comments: 5 pages, LaTeX file. Talk given at 3rd German-Russian Workshop on Progress in Heavy Quark Physics, Dubna, Russia, 20-22 May 1996
Subjects: High Energy Physics - Phenomenology (hep-ph)
[37]
Title: Color Singlet Strangelets
Authors: Dan Mønster Jensen, Jes Madsen, Michael B. Christiansen (Institute of Physics and Astronomy, University of Aarhus)
Comments: Talk presented at: Strangeness`96 May 15-17, Budapest, Hungary. 6 pages in REVTeX. Uses epsf.sty for inclusion of figures.
Subjects: High Energy Physics - Phenomenology (hep-ph)
[38]
Title: Theoretical overview on Diboson production
Authors: P. Chiappetta
Comments: 8 pages, latex and 3 ps figures. Invited talk given at XIth Topical Workshop on Proton Antiproton Collider Physics, 26 May- 1 June 1996, Abano-Terme (Italy)
Subjects: High Energy Physics - Phenomenology (hep-ph)
[39]
Title: HERA prospects on Compositeness and New Vector Bosons
Comments: Latex file, 7 pages and 1 ps fig, few comments on others experiments are added, results are unchanged. To appear in Phys. Let. B
Journal-ref: Phys.Lett. B389 (1996) 89-92
Subjects: High Energy Physics - Phenomenology (hep-ph)
[40]
Title: Heavy baryon masses
Authors: Agnieszka Zalewska (Institute of Nuclear Physics, Kraków), Kacper Zalewski (Jagellonian University and Institute of Nuclear Physics, Kraków)
Comments: Presented at the 3rd German-Russian Workshop on Progress in Heavy Quark Physics, Dubna 20-22 May 1996. 5 pages, no figures, Latex file
Subjects: High Energy Physics - Phenomenology (hep-ph)
[41]
Title: Superlight neutralino as a dark matter particle candidate
Authors: V.A.Bednyakov, S.G.Kovalenko (Joint Institute for Nuclear Research), H.V.Klapdor-Kleingrothaus (Max-Planck-Institut fuer Kernphysik, Heidelberg)
Comments: 20 pages, 5 Postscript figures
Journal-ref: Phys.Rev. D55 (1997) 503-514
Subjects: High Energy Physics - Phenomenology (hep-ph)
[42]
Title: Domains of Disoriented Chiral Condensate
Authors: R.D. Amado, Yang Lu (PENN)
Comments: revtex, 2 postscript figures, submitted to Phys.Rev.D
Journal-ref: Phys.Rev.D54:7075-7076,1996
Subjects: High Energy Physics - Phenomenology (hep-ph); Nuclear Theory (nucl-th)
[43]
Title: Goldstino Couplings to Matter
Authors: T.E. Clark, S.T. Love
Journal-ref: Phys.Rev.D54:5723-5727,1996
Subjects: High Energy Physics - Phenomenology (hep-ph)
[44]
Title: Relativistic and Binding Energy Corrections to Direct Photon Production In Upsilon Decay
Comments: 13 pages, LateX, One figure (to be published in Phys. Rev. D, Sept. 1, 1996)
Journal-ref: Phys.Rev. D54 (1996) 3345-3349
Subjects: High Energy Physics - Phenomenology (hep-ph)
[45]
Title: Influence of strongly coupled, hidden scalars on Higgs signals
Authors: T. Binoth, J.J. van der Bij (University of Freiburg, FRG)
Comments: 22 pages, Latex, 12 figures embedded with epsf.sty and epsfig.sty, to appear in Z. Phys. C
Journal-ref: Z.Phys.C75:17-25,1997
Subjects: High Energy Physics - Phenomenology (hep-ph)
[46]
Title: The Three Families from $SU(4)_A\otimes SU(3)_C\otimes SU(2)_L\otimes U(1)_X$ SM-like Chiral Models
Authors: Otto C.W. Kong (UNC-Chapel Hill)
Comments: 43 pages RevTex, including 9 tables and 3 figures
Journal-ref: Phys.Rev. D55 (1997) 383-396
Subjects: High Energy Physics - Phenomenology (hep-ph)
[47]
Title: $V_{ub}$ from the Hadron Energy Spectrum in Inclusive Semileptonic B Decays
Comments: 16 pages, 4 Figures included in the text (uses epsfig.sty), 1 table
Journal-ref: Phys.Rev.D56:4250-4259,1997
Subjects: High Energy Physics - Phenomenology (hep-ph)
[48]
Title: Deuteron Electromagnetic Form Factors in the Intermediate Energy Region
Authors: Jun Cao, Hui-fang Wu
Comments: 9 pages, to appear in Phys.Rev.C
Journal-ref: Phys.Rev.C54:1006-1009,1996
Subjects: High Energy Physics - Phenomenology (hep-ph); Nuclear Theory (nucl-th)
[49]
Title: Non-factorizable Contribution to $B_K$ of Order $\langle G^3 \rangle$
Authors: A. E. Bergan (University of Oslo, Norway)
Comments: Postscript, 6 pages, to appear in Phys. Lett. B
Journal-ref: Phys.Lett. B387 (1996) 191-194
Subjects: High Energy Physics - Phenomenology (hep-ph)
[50]
Title: Unitarity and Saturation in the Dipole Formulation
Authors: G. P. Salam
Comments: 5 pages LaTeX2e, 2 figures; uses epsfig.sty and procl2e.sty (included). Talk presented at DIS96, International Workshop on Deep Inelastic Scattering and Related Phenomena, Rome. Postscript also available from this http URL
Subjects: High Energy Physics - Phenomenology (hep-ph)
[ total of 352 entries: 1-25 | 26-50 | 51-75 | 76-100 | 101-125 | ... | 351-352 ]
[ showing 25 entries per page: fewer | more | all ]
Disable MathJax (What is MathJax?)
Links to: arXiv, form interface, find, hep-ph, 2002, contact, help (Access key information) | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8121684789657593, "perplexity": 21751.93344315328}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-10/segments/1581875141430.58/warc/CC-MAIN-20200216211424-20200217001424-00294.warc.gz"} |
https://www.broadinstitute.org/gatk/guide/article?id=2840 | Error retrieving document -- It seems the requested document is not accessible through this webpage. | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.99077969789505, "perplexity": 2780.540216545858}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-07/segments/1454701163512.72/warc/CC-MAIN-20160205193923-00010-ip-10-236-182-209.ec2.internal.warc.gz"} |
http://eventuallyalmosteverywhere.wordpress.com/2013/04/16/generating-functions-for-the-imo/ | # Generating Functions for the IMO
The background to this post is that these days I find myself using generating functions all the time, especially for describing the stationary states of various coalescence-like processes. I remember meeting them vaguely while preparing for the IMO as a student. However, a full working understanding must have eluded me at the time, as for Q5 on IMO 2008 in Madrid I had written down in big boxes the two statements involving generating functions that immediately implied the answer, but failed to finish it off. The aim of this post is to help this year’s team avoid that particular pitfall.
What are they?
I’m going to define some things in a way which will be most relevant to the type of problems you are meeting now. Start with a sequence $(a_0,a_1,a_2,\ldots)$. Typically these will be the sizes of various combinatorial sets. Eg a_n = number of partitions of [n] with some property. Define the generating function of the sequence to be:
$f(x)=\sum_{k\geq 0}a_k x^k=a_0+a_1x+a_2x^2+\ldots.$
If the sequence is finite, then this generating function is a polynomial. In general it is a power series. As you may know, some power series can be rather complicated, in terms of where they are defined. Eg
$1+x+x^2+x^3+\ldots=\frac{1}{1-x},$
only when |x|<1. For other values of x, the LHS diverges. Defining f over C is fine too. This sort of thing is generally NOT important for applications of generating functions to combinatorics. To borrow a phrase from Wilf, a generating function is a convenient clothesline’ on which to hang a sequence of numbers.
We need a notation to get back from the generating function to the coefficients. Write $[x^k]g(x)$ to denote the coefficient of $x^k$ in the power series g(x). So, if $g(x)=3x^3-5x^2+7$, then $[x^2]g(x)=-5$. It hopefully should never be relevant unless you read some other notes on the topic, but the notation $[\alpha x^2]g(x):=\frac{[x^2]g(x)}{\alpha}$, which does make sense after a while.
How might they be useful?
Example: binomial coefficients $a_k=\binom{n}{k}$ appear, as the name suggests, as coefficients of
$f_n(x)=(1+x)^n=\sum_{k=0}^n \binom{n}{k}x^k.$
Immediate consequence: it’s trivial to work out $\sum_{k=0}^n \binom{n}{k}$ and $\sum_{k=0}^n(-1)^k \binom{n}{k}$ by substituting $x=\pm 1$ into f_n.
Less obvious consequence. By considering choosing n from a red balls and b blue balls, one can verify
$\binom{a+b}{n}=\sum_{k=0}^n \binom{a}{k}\binom{b}{n-k}.$
We can rewrite the RHS as
$\sum_{k+l=n}\binom{a}{k}\binom{b}{l}.$
Think how we calculate the coefficient of $x^n$ in the product $f(x)g(x)$, and it is now clear that $\binom{a+b}{n}=[x^n](1+x)^{a+b}$, while
$\sum_{k+l=n}\binom{a}{k}\binom{b}{l}=[x^n](1+x)^a(1+x)^b,$
so the result again follows. This provides a good slogan for generating functions: they often replicate arguments via bijections, even if you can’t find the bijection.
Useful for? – Multinomial sums
The reason why the previous argument for binomial coefficients worked nicely is because we were interested in the coefficients, but had a neat expression for the generating function as a polynomial. In particular, we had an expression
$\sum_{k+l=n}a_k b_l.$
This is always a clue that generating functions might be useful. This is sometimes called a convolution.
Exercise: prove that in general, if f(x) is the generating function of (a_k) and g(x) the generating function of (b_l), then f(x)g(x) is the generating function of $\sum_{k+l=n}a_kb_l$.
Even more usefully, this works in the multinomial case:
$\sum_{k_1+\ldots+k_m=n}a^{(1)}_{k_1}\ldots a^{(m)}_{k_m}.$
In many applications, these $a^{(i)}$s will all be the same. We don’t even have to specify how many k_i’s there are to be considered. After all, if we want the sum to be n, then only finitely many can be non-zero. So:
$\sum_{m}\sum_{k_1+\ldots+k_m=n}a_{k_1}\ldots a_{k_m}=[x^n]f(x)^n=[x^n]f(x)^\infty,$
provided f(0)=1.
Useful when? – You recognise the generating function!
In some cases, you can identify the generating function as a standard’ function, eg the geometric series. In that case, manipulating the generating functions is likely to be promising. Here is a list of some useful power series you might spot.
$1+x+x^2+\ldots=\frac{1}{1-x},\quad |x|<1$
$1+2x+3x^2+\ldots=\frac{1}{(1-x)^2},\quad |x|<1$
$e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\ldots$
$\cos x=1-\frac{x^2}{2!}+\frac{x^4}{4!}\pm\ldots$
Exercise: if you know what differentiation means, show that if f(x) is the gen fn of (a_k), then xf'(x) is the gen fn of ka_k.
Technicalities: some of these identities are defined only for certain values of x. This may be a problem if they are defined at, say, only a single point, but in general this shouldn’t be the case. In addition, you don’t need to worry about differentiability. You can definition differentiation of power series by $x^n\mapsto nx^{n-1}$, and sort out convergence later if necessary.
Useful for? – Recurrent definitions
The Fibonacci numbers are defined by:
$F_0=F_1=1,\quad F_{n+1}=F_n+F_{n-1},\quad n\geq 1.$
Let F(x) be the generating function of the sequence F_n. So, for n=>1,
$[x^n]F(x)=[x^{n-1}]F(x)+[x^{n-2}]F(x)=[x^n](xF(x)+x^2F(x)),$
and F(0)=1, so we can conclude that:
$F(x)=1+(x+x^2)F(x)\quad\Rightarrow\quad F(x)=\frac{1}{1-x-x^2}.$
Exercise: Find a closed form for the generating function of the Catalan numbers, defined recursively by:
$C_n=C_0C_{n-1}+C_1C_{n-2}+\ldots+C_{n-1}C_0.$
Can you now find the coefficients explicitly for this generating function?
Useful for? – Partitions
Partitions can be an absolute nightmare to work with because of the lack of explicit formulae. Often any attempt at a calculation turns into a massive IEP bash. This prompts a search for bijective or bare-hands arguments, but generating functions can be useful too.
For now (*), let’s assume a partition of [n] means a sequence of positive integers $a_1\geq a_2\geq\ldots\geq a_k$ such that $a_1+\ldots+a_k=n$. Let p(n) be the number of partitions of [n].
(* there are other definitions, in terms of a partition of the set [n] into k disjoint but unlabelled sets. Be careful about definitions, but the methods often extend to whatever framework is required. *)
Exercise: Show that the generating function of p(n) is:
$\left(\frac{1}{1-x}\right)\left(\frac{1}{1-x^2}\right)\left(\frac{1}{1-x^3}\right)\ldots$
Note that if we are interested only in partitions of [n], then we don’t need to consider any terms with exponent greater than n, so if we wanted we could take a finite product instead.
Example: the mint group will remember this problem from the first session in Cambridge:
Show that the number of partitions of [n] with distinct parts is equal to the number of partitions of [n] with odd parts.
Rather than the fiddly bijection argument found in the session, we can now treat this as a simple calculation. The generating function for distinct parts is given by:
$(1+x)(1+x^2)(1+x^3)\ldots,$
while the generating function for odd parts is given by:
$\left(\frac{1}{1-x}\right)\left(\frac{1}{1-x^3}\right)\left(\frac{1}{1-x^5}\right)\ldots.$
Writing the former as
$\left(\frac{1-x^2}{1-x}\right)\left(\frac{1-x^4}{1-x^2}\right)\left(\frac{1-x^6}{1-x^3}\right)\ldots$
shows that these are equal and the result follows.
Other things – Multivariate Generating Functions
If you want to track a sequence in two variables, say $a_{m,n}$, then you can encode this with the bivariate generating function
$f(x,y):=\sum_{m,n\geq 0}a_{m,n}x^my^n.$
The coefficients are then extracted by $[x^ay^b]$ and so on. There’s some interesting stuff on counting lattice paths with this method.
Sums over arithmetic progressions via roots of unity
Note that we can extract both $\sum a_n$ and $\sum (-1)^na_n$ by judicious choice of x in f(x). By taking half the sum or half the difference, we can obtain
$a_0+a_2+a_4+\ldots=\frac12(f(1)+f(-1)),\quad a_1+a_3+a_5+\ldots=\frac12(f(1)-f(-1)).$
Can we do this in general? Yes actually. If you want $a_0+a_k+a_{2k}+\ldots$, this is given by:
$a_0+a_k+a_{2k}+\ldots+\frac{1}{k}\left(f(1)+f(w)+\ldots+f(w^{k-1})\right),$
where $w=e^{2\pi i/k}$ is a $k$th root of unity. Exercise: Prove this.
For greater clarity, first try the case k=4, and consider the complex part of the power series evaluated at +i and -1.
When using statistical methods, often we will use the exponent function or various other functions as some form of estimate (the Nelson-Allen estimate is a great example). For small values of $x$ the generating function may be useful to save time and to know where we can “cut” off the precision and begin the approximation. Generating functions are useful for approximation. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 49, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8729292154312134, "perplexity": 358.6867756373364}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-42/segments/1414637899290.52/warc/CC-MAIN-20141030025819-00170-ip-10-16-133-185.ec2.internal.warc.gz"} |
https://tex.stackexchange.com/questions/488872/how-to-only-include-as-much-data-as-fits-on-a-single-page-in-context | # How to only \include as much data as fits on a single page in ConTeXt?
I need to \include data from several different files, showing the contents of each file on a separate page (e.g. file1.tex on page 1, file2.tex on page 2), but cut off any extra data if the contents of the files does not fit into just one page.
I have a simple ConTeXt document like this:
\starttext
\subject{File 1}
\startitemize[n]
\input file1
\stopitemize
\pagebreak
\subject{File 2}
\startitemize[n]
\input file2
\stopitemize
\pagebreak
\subject{File 3}
\startitemize[n]
\input file3
\stopitemize
...
\stoptext
Each file contains items, with \item in front of each line. For simplicity, here is a sample contents of file1.tex (and the same in the other files):
\dorecurse{100}{\item hello}
Normally, ConTeXt will include the file, and then wrap the next items to the next page. In the example above, it gets to item #23, then puts #23-100 on later pages. If item #23 was a longer paragraph, split between pages, it should cut off at #22 (never splitting an item up).
The contents of the included files is automatically generated data, but I only want as much that fits to appear on the page, any extra data is too much data and is to be thrown away and doesn't need to be reported.
How can I get ConTeXt to just stop at item #23, the last item to fit on the first page, and stop including the rest of the document, and just to go to the next page?
• I don't know ConTeXt, so I don't know if this will work, but one way in pdfTeX would be to have a separate document with only file1.tex, and then use pdfpages to only include the first page of that document. But that would be an extra compilation step. – Teepeemm May 3 at 2:20
In this solution I just box everything between \start...\stopclippage into a \vbox. Then I calculate the remaining space on the page at this point, which is \pagegoal-\pagetotal. The boxed content is split to that height and the split-off box is discarded. Finally the box is flushed. If you want to allow for some vertical stretch and shrink, use \unvbox instead of \box.
I don't think this will interact well with grid.
\unexpanded\def\startclippage{\par\setbox\scratchbox=\vbox\bgroup}
\unexpanded\def\stopclippage
{\egroup
\scratchdimen=\dimexpr\pagegoal-\pagetotal\relax
\setbox\scratchbox=\vsplit\scratchbox to \scratchdimen
\box\scratchbox}
\starttext
\subject{File 1}
\startclippage
\startitemize[n]
\input file1
\stopitemize
\stopclippage
\pagebreak
\subject{File 2}
\startclippage
\startitemize[n]
\input file2
\stopitemize
\stopclippage
\pagebreak
\subject{File 3}
\startclippage
\startitemize[n]
\input file3
\stopitemize
\stopclippage
...
\stoptext | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7397435307502747, "perplexity": 1416.2701589859203}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-35/segments/1566027314638.49/warc/CC-MAIN-20190819011034-20190819033034-00147.warc.gz"} |
https://msdn.microsoft.com/en-us/library/ms531952(v=vs.85).aspx | # cal--offMonth-font-size Attribute | calOffMonthFontSize Property
This topic documents a feature of Binary Behaviors, which are obsolete as of Internet Explorer 10.
Sets or retrieves the size of the font used for the calendar behavior.
Syntax
CSS { cal--offMonth-font-size : sSize } [ sSize = ] calendar.style.calOffMonthFontSize
Possible Values
sSize String that specifies or receives one of the following values.absolute-sizeSet of keywords that indicate predefined font sizes. Possible keywords include:[ `xx-small` | `x-small` | `small` | medium | `large` | `x-large` | `xx-large` ]. Named font sizes scale according to the user's font setting preferences. relative-sizeSet of keywords that are interpreted as relative to the font size of the parent object. Possible values include [ `larger` | `smaller` ]. lengthValue expressed as an absolute measure (`cm`, `mm`, `in`, `pt`, `pc`, or `px`) or as a relative measure (`em` or `ex`).percentagePercentage value of the parent object's font size.
The property is read/write. The property has no default value. The Cascading Style Sheets (CSS) attribute is not inherited.
Remarks
The cal--offMonth-font-size attribute is available only to objects participating in the calendar behavior.
Applies To | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8980482816696167, "perplexity": 9132.710729631406}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-22/segments/1433195036749.19/warc/CC-MAIN-20150601214356-00020-ip-10-180-206-219.ec2.internal.warc.gz"} |
https://link.springer.com/article/10.1007/s11538-017-0375-1 | Bulletin of Mathematical Biology
, Volume 80, Issue 5, pp 1134–1171
# Model Prediction and Validation of an Order Mechanism Controlling the Spatiotemporal Phenotype of Early Hepatocellular Carcinoma
• Stefan Hoehme
• Francois Bertaux
• William Weens
• Bettina Grasl-Kraupp
• Jan G. Hengstler
• Dirk Drasdo
Open Access
Special Issue: Mathematical Oncology
## Abstract
Recently, hepatocyte–sinusoid alignment (HSA) has been identified as a mechanism that supports the coordination of hepatocytes during liver regeneration to reestablish a functional micro-architecture (Hoehme et al. in Proc Natl Acad Sci 107(23):10371–10376, 2010). HSA means that hepatocytes preferentially align along the closest micro-vessels. Here, we studied whether this mechanism is still active in early hepatocellular tumors. The same agent-based spatiotemporal model that previously correctly predicted HSA in liver regeneration was further developed to simulate scenarios in early tumor development, when individual initiated hepatocytes gain increased proliferation capacity. The model simulations were performed under conditions of realistic liver micro-architectures obtained from 3D reconstructions of confocal laser scanning micrographs. Interestingly, the established model predicted that initiated hepatocytes at first arrange in elongated patterns. Only when the tumor progresses to cell numbers of approximately 4000, does it adopt spherical structures. This prediction may have relevant consequences, since elongated tumors may reach critical structures faster, such as larger vessels, compared to a spherical tumor of similar cell number. Interestingly, this model prediction was confirmed by analysis of the spatial organization of initiated hepatocytes in a rat liver tumor initiation study using single doses of 250 mg/kg of the genotoxic carcinogen N-nitrosomorpholine (NNM). Indeed, small clusters of GST-P positive cells induced by NNM were elongated, almost columnar, while larger GDT-P positive foci of approximately the size of liver lobuli adopted spherical shapes. From simulations testing numerous possible mechanisms, only HSA could explain the experimentally observed initial deviation from spherical shape. The present study demonstrates that the architecture of small cell clusters of hepatocytes early after initiation is still controlled by physiological mechanisms. However, this coordinating influence is lost when the tumor grows to approximately 4000 cells, leading to further growth in spherical shape. Our findings stress the potential importance of organ micro-architecture in understanding tumor phenotypes.
## Keywords
Liver cancer Cancer phenotype Order principle Multicellular model Agent-based simulation
## 1 Introduction
Phenotype and aggressiveness of a tumor may be influenced by its micro-architecture (Anderson et al. 2007; Hutchinson et al. 2016). For this reason, evaluation of histological analysis of the architecture of tumors is part of the standard clinical procedure serving as one aspect of staging and estimation of prognosis (Warth et al. 2012). Depending on the degree of dedifferentiation, malign tumors may still reflect features of the original tissue architecture.
In a recent communication, Hoehme et al. (2010) predicted an order principle in liver regeneration after drug-induced liver damage by quantitative simulations. The underlying mathematical model stated that in order to close the drug-induced peri-central necrotic lesion generated in the smallest functional and anatomical repetitive liver units, named lobules, hepatocytes orient their daughter cells after cell division along the closest micro-vessels (sinusoids). This mechanism, named hepatocyte–sinusoid alignment (HSA), could be validated by image analyses of regenerating mouse livers (see Fig. 12 in Appendix). We here ask the question whether signatures of HSA may still be present in early hepatocellular carcinoma. Liver cancer is the sixth most common cancer in the world, with increasing incidence (EASL 2012). The molecular mechanisms involved in the onset of liver cancer have been intensively studied (Perra et al. 2014; Petrelli et al. 2014), including the growth of preneoplastic cells (Kowalik et al. 2016; Satoh et al. 2012) and mechanisms of tumor promotion (Riegler et al. 2015; Rohr-Udilova et al. 2012; Braeuning et al. 2016). However, a study investigating early tumor shapes in liver cancer has not yet been performed.
A major path to hepatocellular carcinoma is through liver cirrhosis; in 10% of cases, cirrhosis turns into hepatocellular carcinoma (HCC), a primary cancer of the liver emerging from dedifferentiated hepatocytes, which forms the most frequent type of liver cancer. Liver cirrhosis is believed to finally emerge from an impaired balance between regeneration and degeneration; hence, it is interesting to study if signatures of HSA, that characterize regeneration of normal liver tissue, can still be found in early hepatocellular carcinoma.
As the addressed question is closely related to regeneration, we build upon our earlier regeneration model to gain a deeper understanding of the mechanisms controlling spatial organization of hepatocellular carcinoma at early stages after initiation (Hoehme et al. 2010). The model resulted from a pipeline consisting of experiments, image analysis and computational modeling established for that purpose (Hoehme et al. 2010). In a first step, the architecture of the liver lobule was reconstructed by image processing of confocal laser scanning micrographs (Hoehme et al. 2010; Drasdo et al. 2014a, b) (Fig. 1). The lobule, as the smallest repetitive functional and anatomical unit of the liver, has a diameter of about 25 cell diameters and exhibits a polygonal shape with a central vein and portal triads at its margin. A triad is composed of a vein, carrying blood from the intestine, the hepatic artery, leading blood from the aorta, and a biliary duct. Blood flows along rows of hepatocytes until it drains into the central vein. The complex spatial liver lobule architecture ensures an excellent exchange of molecules between the incoming blood and hepatocytes, the parenchymal cells of the liver.
In the next step, a statistically representative lobule was generated based on parameter distributions obtained by the image analysis of many lobules. In a further step, a computational spatiotemporal model was established to simulate the regeneration process within a virtual experiment on the computer. In this model, each hepatocyte and the lobular capillaries, called sinusoids, have been represented as model units. Using an agent-based approach, each model cell was parameterized by biophysical and bio-kinetic properties, was able to move, grow, divide and interact with other cells and sinusoids by forces within a so-called center-based model (Anderson et al. 2007), in which forces between cells were mimicked as forces between cell centers. The movement of each cell was calculated from all forces exerted on that cell including its own micro-motility using an equation of motion. Agent-based models in which an individual agent represents each cell have been extensively used to mimic the emergence of spatial tumor phenotypes in tumor development and evolution as they are perfectly suited to represent heterogeneity at cellular resolution (e.g., Anderson et al. 2006; Tang et al. 2011; Macklin et al. 2012). They are equally well able to display spatial tissue structures on scales of individual cells, as they occur on the level of liver micro-architecture, and permit the direct display and fate tracking of each individual cell and vessel at the scale of liver lobules. This is an advantage particularly if the micro-architecture is remodeled, as occurs, for example, as a consequence of interactions between the cells or molecular factors transported into the liver via the blood. The center-based modeling approach used in this paper permits modeling of arbitrary small cell displacements, and of small deformations or compressions. The approach is suited to run simulations directly in 3D volume data sets reconstructed from images. There is in the meanwhile a wide range of different single-cell-based models both on lattices and in lattice-free space. The pros and cons of different types of agent-based models have been discussed in-depth in Liedekerke et al. (2015). Simulations with single-cell-based models can be considered as experiments in silico, i.e., on the computer. Accordingly, in the presence of stochastic sources (e.g., randomness in the cell micro-motility, cell cycle duration, orientation of cell division) many simulations might be necessary to draw reliable conclusions. However, growth processes are often self-averaging, so that above a certain number of cells realizations are good representatives for the average over many simulations. Nevertheless, computing time can be significant, and sensitivity analyses can be performed only numerically (Jagiella et al. 2016; for a general discussion on the concept of self-averaging, see Landau and Binder 2000).
Fundamentally, the computational study of many processes in liver lobules may also be amenable to sophisticated continuum models (Ricken et al. 2010, 2014), whereby cells are not tracked individually, but local averages are performed usually approximating tissue pieces as a continuous body. However, if the tissue piece is only one cell thick, as is the case in the hepatic lobule for the hepatocyte sheets located between neighboring sinusoids, and at the same time cell growth, division and death of cells occur, then a continuous approach mimicking realistic growth or remodeling processes in liver lobules might be difficult to justify. In any case, such approaches would not be expected to be simpler if all interactions considered below would be taken into account. At spatial scales of a liver lobe or entire liver (depending on species, a liver can consist of up to five lobes), i.e., large compared to the organ microstructure, continuum models would be expected to be more efficient. Homogenization might be suited to obtain mechanical and flow properties given the statistically repetitive structure of liver in terms of liver lobules.
Here we pursue an agent-based model of tumor initiation, which we integrate into a model of liver regeneration (Hoehme et al. 2010), where we need to consider liver micro-architecture varying on the cell scale. In order to study regeneration, mechanisms that were hypothesized to potentially contribute to the closure of the peri-central liver lobule lesion and regeneration of micro-architecture after administration of the hepatotoxic drug $$\hbox {CCl}_{4}$$ were stepwise implemented in Hoehme et al. (2010), and after each step simulation results were compared to spatiotemporal regeneration data. Carbon tetrachloride ($$\hbox {CCl}_{4}$$) is one of the most potent hepatotoxins (toxic to the liver), and for this reason it is widely used to evaluate hepatoprotective agents (Klaassen et al. 2013). It is also considered as a model drug for acetaminophen (paracetamol, APAP), as it causes a similar damage pattern as observed after APAP intoxication. It destroys the hepatocytes close to the central vein of each liver lobule. Even after more than 40% tissue damage, liver mass and architecture completely regenerate. In order to identify the best agreement at each stage between the model and experimental data, hundreds of simulations were performed within a simulated sensitivity analysis varying each model parameter over its physiological range. Hence, the effect of model parameters on the simulation outcome has extensively been studied, and parameters outside the considered ranges could be excluded as the model was parameterized by (in principle) measurable biophysical and bio-kinetic parameters. The final model included HSA (Fig. 2c) and active migration of hepatocytes toward the central necrotic lesion (Fig. 2e). This strategy ensures that even in complex models with many parameters clear conclusions can be drawn (Drasdo et al. 2014a, b). The finally predicted mechanism known as HSA has been validated by subsequent experiments. The model was later extended by integrating tissue regeneration and metabolism (Schliess et al. 2014; Drasdo et al. 2014a, b; Ghallab et al. 2016). In the study presented, the above described spatiotemporal model (Hoehme et al. 2010) served as a starting point and was further developed and extended to simulate early tumor development.
The model developed in this paper simulates a scenario where initially one individual hepatocyte gains an increased proliferation rate, initiated as a consequence of genotoxic carcinogens. As our starting point is a thus far validated model, we can rely on parameters of the healthy hepatocytes and bypass extensive simulated parameter sensitivity analyses. To ensure that the emerging model is able to simulate both liver regeneration after drug-induced central liver lobule damage and early states of hepatocellular carcinoma, we maintained all mechanisms of the liver regeneration model and integrated mechanisms specific to cancer initiation. Prospectively, this shall permit us to construct a virtual liver model that can be used as a tool to perform virtual experiments and explore the consequence of various perturbations and malfunctions in liver (Holzhuetter et al. 2012; D’Alessandro et al. 2015).
Intuitively, it may be assumed that a tumor originating from a single initiated hepatocyte will grow with an approximately spherical shape. Surprisingly, our model predicted that this is not the case but that, instead, initially tumor growth in liver tissue should occur in longish, or extremely elongated (but clearly not in spherical) cell arrangements if HSA is still present. Only when the tumor reaches a cell number of approximately 4000 cells, do elongated cell arrangements progress to spherical structures. This model prediction stimulated us to revisit the tissue slides of previous liver tumor initiation studies in rats (Grasl-Kraupp et al. 2000). Importantly, the genotoxic carcinogen N-nitrosomorpholine (NNM)-induced elongated, almost columnar arrangements, of initiated hepatocytes after the first rounds of cell division, when the number of initiated cells was small, while larger foci adopted spherical shapes.
After these findings, simulation of numerous other possible mechanisms demonstrated that from all considered mechanisms, only hepatocyte–sinusoidal alignment (HSA), i.e., the mechanism involved in coordination of tissue organization (Drasdo et al. 2014a, b; Hoehme et al. 2010), could explain the initial deviation from spherical shape, suggesting that tumor cells early after initiation are still controlled by this order principle which in healthy liver tissue helps to coordinate the complex sheet-like tissue organization. The present study demonstrates that tumor cells at very early stages still obey physiological control mechanisms of tissue architecture but escape this regulation at sizes of approximately 4000 cells, which still represents a very small tumor. The findings presented here stress the important role of micro-architecture in early tumor development.
## 2 Model
As the model for liver regeneration in Hoehme et al. (2010) serves as a starting point for the present study of early hepatocellular cancer, we first enumerate the assumptions of that model before turning to the extension for hepatocellular cancer. With a view to developing a virtual liver model that is able to simulate the response on various types of perturbations (e.g. toxic damage of different type, aberrant states as steatosis, fibrosis, cirrhosis, cancer) at the level of micro-architecture, we also kept those model components from reference Hoehme et al. (2010) that may not be of importance for the present study of liver cancer modeling. However, in this paper we consider some model variations that we had not considered in Hoehme et al. (2010) for hepatocytes. These are marked below. Subsequently we address early hepatocellular cancer cells. Where applicable, we briefly summarize the assumptions. The details of the mathematical formulation are presented in Sect. 5.
The assumptions (A-number) of the simulation model in the healthy situation are:
(A-1) Hepatocyte cell shape and physical forces: Hepatocytes in 3D culture adopt an almost perfect spherical shape (cf. SI in Hoehme et al. 2010) and in confocal micrographs adopt shapes reminiscent of deformed spheres (Fig. 1). Therefore, we assumed that hepatocytes can be mimicked as homogeneous, isotropic elastic and adhesive, intrinsically spherical, objects capable of migration, growth, division and death. Hepatocyte–hepatocyte and hepatocyte–blood vessel interaction forces are mimicked by the Johnson–Kendall–Roberts (JKR) model, introduced in Drasdo and Hoehme (2005). The JKR model describes the force between homogeneous, isotropic, elastic sticky spheres, and was shown by Chu et al. (2005) to apply to cells if compression and pulling apart of one cell with respect to the other cell are sufficiently fast. It shows a hysteresis behavior depending on whether two objects approach each other or are pulled apart, i.e., cells adhere beyond the distance at which they came into contact. The hysteresis leads to a delay in cell–cell and cell–substrate detachment compared to models without hysteresis (Drasdo et al. 2007).
Healthy hepatocytes are polar, and the distribution of their cell adhesion molecules is not isotropic. We represent hepatocyte polarity by assuming that the contacts are constrained to a certain region of the hepatocyte surface. As a consequence, the force depends on the overlap of the cell surface region where adhesive molecules are located. In the case where the contact regions of two cells do not contain adhesive molecules, the adhesion force is zero.
(A-2) Equation of motion for cells: An equation of motion is used to calculate the change in position of an object (here a hepatocyte) with time. Knowing the velocity $${{{\underline{v}}}}_{i}$$ and the current position $${{{\underline{r}}}}_{i}$$ of an object i allows us to calculate its new position by integration of $$\hbox {d}{{{\underline{r}}}}_{i}/\hbox {d}t={{{\underline{v}}}}_{i}$$ over time t. The equation of motion for a cell i (tumor cell or hepatocyte) results from:
\begin{aligned} m_{i}\frac{{\mathrm{d}{{\underline{v}}} _{i} }}{{\mathrm{d}t}}= & {} {{\underline{F}}} _{{i}} ^{{f};{\text {C-ECM}}} + \mathop {\sum }\limits _{{j}} {{\underline{F}}}_{ ij} ^{{{f};{\mathrm{CC}}}} + \mathop {\sum }\limits _{{j}} {{\underline{F}}} _{ ij}^{{{f};{\mathrm{CS}}}} + \mathop {\sum }\limits _{{j}}{{\underline{F}}}_{ ij}^{{\text {adh-rep}};{\mathrm{CC}}} \nonumber \\&+\,\mathop {\sum }\limits _{{j}} {{\underline{F}}} _{ ij}^{{\text {adh-rep};\mathrm{CS}}} + {{\underline{F}}} _{{i}}^{\mathrm{act}} \end{aligned}
(1)
The LHS denotes the inertia term with mass $$m_{i}$$. For cells in tissues, the friction force dominates inertia forces (Reynolds numbers are sufficiently small) so inertia forces can be neglected. On the RHS, $${{\underline{F}}} _{{i}}^{{{f};{\text {C-ECM}}}}$$ denotes the friction between cell and extracellular matrix, $${{\underline{F}}} _{{{ ij}}} ^{{{f};\mathrm{CC}}}$$ the friction force between cells i and $$j,\,{{\underline{F}}} _{{{ ij}}}^{{{f};{\mathrm{CS}}}}$$ the friction force between cell i and sinusoid $$j,\, {{\underline{F}}}_{{{ ij}}}^{{\text {adh-rep};\mathrm{CC}}}$$ the adhesion and repulsion force between cells i and j (this is a central force), $${{\underline{F}}}_{{{ ij}}}^{{\text {adh-rep};\mathrm{CS}}}$$ the cell–sinusoid adhesion–repulsion force (this is also a central force), $${{\underline{F}}}_{{i}}^{{\mathrm{act}}}$$ the migration force, mimicking active cell motion. The detailed equation of motion can be found in Sect. 5, Eq. (4).
(A-3) Cell migration: Cells migrate actively. In absence of morphogen gradients, active cell micro-motility is assumed to be random and isotropic.
However, as our aim is to stepwise build a virtual liver model that can finally model regeneration and early cancer initiation within the same model, our model also contains a directed migration component toward a necrotic lesion in case there is a necrotic lesion formed (Fig. 2e). This migration component takes into account that in Hoehme et al. (2010) we demonstrated that random isotropic micro-motility of hepatocytes was insufficient to close the central tissue lesion that occurs in response to the drug $$\hbox {CCl}_{4}$$.
In early hepatocellular cancer, as considered here, necrotic lesions do not occur; hence, directed migration would not be expected to play a role. This was verified by comparing the results of four tumor growth simulation cases, namely, (i) in presence of hepatocyte-sinusoid alignment (HSA) for both random uniform migration and directed migration, and (ii) in absence of HSA for both random uniform migration and directed migration (Fig. 13 in Appendix).
(A-4) Cell orientation changes: Cell orientation changes can be modeled by an optimization process based on the energy change occurring if the cell orientation changes (Drasdo et al. 2007), or an equation for the angular momentum (Drasdo 2005). The energy can be calculated from the forces by path integration of the energy. The energy-based method is much easier to evaluate and leads to equivalent results, which is why we used it here. Fundamentally, orientation changes were assumed to be driven by energy minimization for which we used the Metropolis algorithm (Drasdo and Hoehme 2005). In the Metropolis algorithm, a trial step (here: a small rotation) is performed, and subsequently it is evaluated whether this step is accepted, or rejected (in which case the trial step is taken back). The change in total energy of the whole cell configuration is used to evaluate the step. As the orientation change in a hepatocyte only affects the nearest and maybe next–nearest neighbors, only those neighbors need to be considered.
(A-5) Cell division: During $$\hbox {G}_{1}$$, S, and $$\hbox {G}_{2}$$-phase (interphase) we assume that a cell doubles its volume and then deforms into a dumbbell at constant volume until division.
As a new variant of the model in Hoehme et al. (2010), we study the effect of pressure-inhibited cell cycle progression by assuming that a tumor cell i does not reenter the cell cycle if the pressure exerted on it overcomes a threshold value.
(A-6) Cell orientation during division: In Hoehme et al. (2010), we predicted that hepatocyte division occurs along the orientation of the closest sinusoid (micro-vessel), a mechanism we named HSA (Fig. 2c), while the absence of HSA (Fig. 2d) resulted in a failure in restoring liver lobule micro-architecture. The mechanism was subsequently experimentally validated. We implemented two alternative mechanisms of HSA. The first was a direct “restoring force”-like term, favoring orientation of a growing and dividing cell parallel to the closest sinusoid. Such a mechanism could be controlled by adhesion of cells to the ECM that fills the small space (space of Disse) between the basal cell membrane and the blood vessel, as well as by the (polar) cell–cell contacts at the lateral membranes. The second mechanism was cell division in a random direction in combination with attraction of hepatocyte cells by a sufficiently short-range morphogen secreted by the sinusoids. HSA was found to be a robust phenomenon. Even in the limit of immediate mitosis after volume doubling, oriented parallel to the closest sinusoid, we obtained the same results on the tissue scale. In this work, we only consider the first implementation of HSA.
(A-7) Cell cycle progression (normal hepatocytes): Unlike other epithelial tissues, as for example intestinal crypts (e.g., Drasdo and Loeffler 2001), the hepatocyte turnover is known to be slow (e.g., Malmgren 1956; Zou et al. 2012), so that we neglect it here.
(A-8) Sinusoids (blood micro-vessels): The model only considered sinusoids and hepatocytes, the main constituents in a liver lobule. Other cell types, such as hepatic stellate cells, Kupffer cells or externally invading macrophages, were neglected as these were not needed to explain the regeneration of liver mass and architecture after drug-induced liver damage. Sinusoids were mimicked as chains of spheres. Each sphere followed a similar equation of motion as each hepatocyte, however suppressing the active movement term.
(A-9) Reference parameters: All parameters in the model defined above have either a direct biophysical or bio-kinetic interpretation, and in principle, can be determined experimentally. Thus, the physiologically meaningful parameter range for each of the parameters could be estimated. As reference parameters (Table 2 in Appendix) for both normal hepatocytes as tumor cells, we used the parameter set for which we had found the best agreement between model simulations and experimental data in regeneration after drug-induced peri-central liver lobule damage in the mouse model (Hoehme et al. 2010). This set of parameters was found by extensive simulated parameter sensitivity analysis, varying each model parameter within its physiologically meaningful range, followed by direct comparison of the model simulation outcome and experimental findings. By this sensitivity analysis, which can be embedded in a general model identification strategy (Drasdo et al. 2014a, b), we were able to rule out model mechanisms that were insufficient in explaining the biological data and identify that model and its parameter range for which the experimental findings could be quantitatively explained. This final model required HSA.
The assumptions (AT-number) of the simulation model for tumor cells are:
AT-1: As initial state for the simulations, we labeled one cell as a tumor cell. For this cell, we assumed unlimited proliferation potential so that a monoclonal tumor emerges from one cancer precursor cell, which proliferates in contrast to the untransformed hepatocytes. When the transformed cell proliferates, it generates daughter cells that adopt the same phenotype as the precursor cell and enter the cell cycle again after division. We here assume HSA to hold for cancer cells.
In our reference simulation, all other parameters for both normal hepatocytes and transformed hepatocytes were taken from the original regeneration model in Hoehme et al. (2010).
AT-2: In the next step, we dropped the assumption of HSA for cancer cells made in AT-1, i.e., we allow dividing cancer cells to orient in a random direction. This should allow us to study the influence of HSA on early tumor initiation alone. Again, all other parameters for both normal hepatocytes and transformed hepatocytes were taken from the original regeneration model.
AT-3: In a further step, motivated by the comparison to data on early tumor initiation that will be performed below, we will define further specific parameter modifications for transformed cells in a step subsequent to AT-2. This will be motivated in the respective subsection.
For cancer cells, the same equation of motion as for normal hepatocytes is used (see Sect. 5). In those simulations where assumption (AT-3) applies, the parameters differ between normal hepatocytes and carcinoma cells.
The simulations have been carried out on a cluster of Linux-based workstations using the simulation software CellSys (Hoehme and Drasdo 2010). CellSys is a modular framework implemented in C$$++$$ that utilizes SuperLU (Li 2005) for solving systems of equations, OpenMP for parallelization and OpenGL for visualization. CellSys is a tool for efficient off-lattice simulation of growth and tissue organization processes implementing the agent-based models described in section X. It uses real-time 3D visualization for the observation and assessment of simulation results.
## 3 Results
To simulate the earliest stages of tumor growth, we performed simulations in a liver lobule starting with one single tumor cell embedded in around 4000 hepatocytes. Simulations were performed until the tumor consisted of up to several thousand cells. The growth process was stochastic, since it contained several stochastic sources. These were micro-motility and cell cycle duration. As a consequence, each simulation (realization of the stochastic process) generated slightly different results. To exclude being misled in our conclusions by the stochastic variability within our simulations, different realizations of the stochastic process were compared by studying sufficiently high numbers of simulations. Accordingly, for a number of simulations, average and maximal/minimal values were displayed from several simulations. However, a single realization of the growth process was already a good representative of the expectation value reflecting that growth processes of this type are self-averaging, which could also be observed in other simulations (Jagiella et al. 2016).
### 3.1 Hepatocyte–Sinusoid Alignment (HSA) Predicts an Elongated Shape of Tumor Nodules
To study the influence of HSA, simulations were performed with and without including this mechanism into the model (Fig. 3; see also model assumptions AT-1 and AT-2). All further model parameters were chosen as in the simulations of liver regeneration after drug-induced damage (Hoehme et al. 2010). We observed that simulations with HSA generate an elongated phenotype at a very early stage of their development (Fig. 3a). With increasing tumor size, elongation is lost, although the model still included HSA. At about 4000 cells, corresponding to a tumor diameter of about 370 $$\upmu$$m, the tumor has adopted an almost spherical shape.
In the next step, HSA was eliminated from the model and the cells were allowed to divide with random orientation (Fig. 3b). In this case, even at very early stages no elongation could be detected. To objectify the visual simulation result, we quantified the elongation of the tumor by the Karhunen–Loève transform (KLT, see Sect. 5), where the ratio R of longest versus shortest axis length of the tumor is clearly larger with than without HSA (Fig. 4). However, KLT reveals that even without HSA the ratio is slightly larger than one. The differences between the longest and shortest axis may be explained by the presence of blood vessels, which may favor tumor expansion in one direction within the lobule. In particular, blood vessels may constrain tumor expansion perpendicular to the portal triad-central vein axis, as this statistically represents the average vessel orientation.
In order to test these possibilities, we simulated tumor growth in free space. We found that as soon as tumor cells were allowed to proliferate without HSA they behaved similar to a tumor growing in free suspension. We concluded that possible differences in the axis lengths of the tumor caused by the orientation of the blood vessels were negligible compared to differences due to the stochasticity of the growth process (Fig. 4). Note also that at these tumor sizes, for both cases, HSA and no HSA, the growth of the tumor cell population size is exponential (Fig. 14 in Appendix).
### 3.2 Elongated Tumors Early After Initiation: Validation of the Model Prediction in a Rat Liver Tumor Initiation Study
The next step aimed at validation of the model predictions by experimental data. For this purpose, immunostained liver slices of a tumor initiation study in rats (Grasl-Kraupp et al. 2000) were reanalyzed. In those experiments, rats received a single dose of the genotoxic carcinogen N-nitrosomorpholine (NNM). Placental glutathione S-transferase (GST-P) was used as a marker of initiated hepatocytes. (Further details are explained in Sect. 5.) Representative images of GST-P positive foci with low (Fig. 5a) and high (Fig. 5b) numbers of initiated cells were taken. Altogether 26 tissue specimens have been analyzed at days 13.5, 17.5 or 24.5 after NNM administration whereby each animal could be analyzed only once (at one time point) as it had to be scarified for the analysis. In these samples, small groups of 2–6 GST-P positive cells have been found. Nine tissue specimens contained two GST-P positive cells, four could not be clearly evaluated. In 6 of 7 samples with 3 cells, the cells were aligned, in 2 of 3 samples with 4 cells the cells were aligned, and 2 of 3 samples of 5 or more cells the cells were aligned while in the third sample the cells were partially aligned. Assuming that cells can divide either in xy or z directions with equal probability, each division orientation would have a chance of 1/3. If the division orientation were random, already at the 3 cells stage the chance of having all three cells aligned is about $$\sim$$ 1/3, at 4 cells stage $$\sim$$ 1/12, at 5 cells stage $$\sim$$ 1/60. This statistical chance does not consider that formation of columns is energetically not favored as it requires that the growing column has to overcome mechanical compression at its tips to push aside the surrounding cells. A rough estimate of the relative elongation ($$R=$$ longest axis/shortest axis) from the above values leads to an ‘average’ elongation of approximately longest axis = $$[(6/7) \times 3 + (1/7) \times 2 + (2/3) \times 4 + (1/3) \times 3 + (2/3) \times 5 + (1/3) \times 3]/3 \approx 3.62\, \text {divided by shortest axis}\, = 1.38$$ at $$N=(3+4+5)/3=4$$ cells stage from the 2D cross-sections leading to a ratio of 2.62. (The average of the 3, 4, 5 cell states was performed as for each individual case the number of values was small.) This value lies well within the error bars of the simulations with HSA in Fig. 4 but of course has to be taken with great caution as it was calculated from 2D image data. To statistically reliably quantify the elongation experimentally, a repetition of experiments with at least 3–4 animals per time point and analysis by confocal laser scanning microscopy to obtain 3D volume data sets of the early tumor cell populations would be desirable.
So we conclude that initially, the initiated cells tend to indeed form elongated arrangements and align along sinusoids, similarly as normal hepatocytes that also are arranged in sheets (Fig. 5a). At much larger population sizes, comparable to those of a liver lobule, nodules of GST-P positive cells adopt a compact, almost spherical shape (Fig. 5a). This occurs at a diameter of 280–420 $$\upmu$$m, which is in agreement with the model prediction, for which a spherical shape has been adopted at about 4000 cells, corresponding to a tumor diameter of about 370 $$\upmu$$m. Previously, strong evidence has been presented that these foci are of monoclonal origin (Grasl-Kraupp et al. 2000). Therefore, it seems plausible that the spherical nodules shown in Fig. 5b have evolved from the smaller, elongated GST-P positive cell arrangements as presented in Fig. 5a. Principally, it cannot be excluded that some nodules emerged from the fusion of different monoclonal foci, in which case they would not be monoclonal, but as the initial spatial density of elongated GST-positive cell clusters is relatively low, such cases should be rare.
Initially, it has been assumed that the observed elongated shapes in Grasl-Kraupp et al. (2000) occurred by chance. However, systematic formation of elongated shapes is very unlikely, and HSA can indeed explain such elongated shapes. In conclusion, the experimental findings validate our model predictions of early columnar tumor nodules that, as the nodules overcome a certain size, adopt a spherical shape.
However, the question arises if by variation of another model parameter, similar elongated early tumor shapes as predicted in the presence of HSA may be found. Moreover, in the experimental data, even one-cell-thick columns were observed (Fig. 5b), which we could not observe in any of the realizations with the reference parameter set and HSA. This leads to the question, if, in case no other mechanism can explain the elongated tumor shapes, any change in parameters could support elongation resulting in one-cell-thick columns.
### 3.3 Can Any Alternative Mechanism to Hepatocyte–Sinusoid Alignment (HSA) Explain Early Tumor Elongation?
In the next step we studied if alternative mechanisms to HSA could be responsible for the elongated arrangement of early transformed tumor cells that we observed in the presence of HSA. For this, we suppressed HSA (i.e., we assume isotropic cell division, Fig. 2d) and simultaneously changed another parameter for cancer cells.
We focused on parameter variations (denoted below as “No HSA-number”; number denoting a different parameter change), which we might have expected to potentially impact on the spatial tumor phenotype. The choice of parameter values throughout this paper serves to test values that are prospectively at, or close to, the border of physiological meaningful values. As reference (100%), we chose the values from Table 2 (Appendix, Hoehme et al. 2010). For example, for cells adhering to each other, (see under point “NO HSA-i” in the below enumeration), a corridor of about one order of magnitude has been reported for the adhesion strength (see Galle et al. 2005 and refs. therein). As the adhesion strength is largely controlled by the cell surface density of adhesion molecules, an increase by a factor of 5, for example, would mean that the adhesion molecule density is 5 times higher than the reference value denoted in Hoehme et al. (2010), 20% means 5 times lower. This captures even a bit more than the reported one order of magnitude in the cell-cell adhesion strength. The precise physiological borders of the physical and biological parameter values represented in the model are often not known, but if we did not find any changes within the range of values we tested, it seems unlikely that slightly larger or bigger values would have made a difference. For adhesion, the natural lower bound is absence of any adhesion, which we tested as well.
The particular parameters chosen, and the reasons why we thought they could have impacted the shape of the tumor, are explained below:
(No HSA-i) Decreased as well as increased cell–cell adhesion could perhaps modify the tumor spatial phenotype. For example, increased cell–cell adhesion of polar hepatocytes could favor formation of lengthy structures. To test this hypothesis, we considered a decreased cell–cell adhesion to 20% (Fig. 6, No HSA-i (A)) and zero (0%) (not shown), as well as an increased adhesion among tumors cells by a factor of 5 (Fig. 6, No HSA-i (B)).
(No HSA-ii) We have shown that for the reference parameter set the vessels had no impact on the early tumor shape (Fig. 4; compare curve without HSA with curve of a freely growing spheroid). However, at higher vessel stiffness the orientation of sinusoids might possibly enforce a preferred orientation of tumor growth. For this reason, simulations with increased stiffness of sinusoids were performed by increasing the sinusoid spring constant by 200% (Fig. 6, No HSA (C)) and by complete inhibition of sinusoid movement to mimic the limit of infinitely stiff vessels (Fig. 6, No HSA (D)).
(No HSA-iii) Increasing cell–matrix friction, or physically equivalently decreasing cell micro-motility might promote cells to stay longer in regions of high mechanical stress, which may form as a consequence of cell multiplication. As this could potentially impact on tumor shape, we considered a decreased tumor cell motility close to zero, by increasing the cell–matrix friction coefficient $$\xi _{i\mathrm{ECM}}^{\mathrm{CECM}}$$ to a value much larger than the reference value, $$\xi _{i\mathrm{ECM}}^{\mathrm{CECM}} \gg \left( {\xi _{i\mathrm{ECM}}^{\mathrm{CECM}} } \right) _{\mathrm{REF}}$$ (cf. Sect. 5) (Fig. 6, No HSA (E)). For completeness, we also considered the opposite case of increased micro-motility by decreasing the friction by a factor of three, $$\xi _{i\mathrm{ECM}}^{\mathrm{CECM}} =\left( {\xi _{i\mathrm{ECM}}^{\mathrm{CECM}} } \right) _{\mathrm{REF}}/3$$ (result not shown).
(No HSA-iv) An increased cell–vessel adhesion might perhaps favor hepatocytes to stay close to the sinusoid. Therefore, the potential influence of an increased cell–vessel adhesion up to 300% was simulated (Fig. 6, No HSA (F)).
(No HSA-v) An elevated friction of cell movement perpendicular to the orientation of the local sinusoid may favor column formation (Fig. 5, No HSA (G)). This mechanism was simulated by increasing the respective friction coefficient $$\xi _\bot ^{\mathrm{CC}} \gg \left( {\xi _{ ij}^{\mathrm{CC}} } \right) _{\mathrm{REF}}$$ (cf. Sect. 5, see sketch in Fig. 2f). If $$\alpha _{ ij}$$ is the minimal angle between the axis connecting the centers of cell i and j, and the direction of movement of cell i, the additional friction generates a contribution to the friction force $$\propto |\underline{v}_i |\sin \left( {\alpha _{ ij} } \right)$$, where $$\underline{v}_i$$ is the velocity of cell i. Hence, a maximal increase in friction is obtained for $$\alpha _{ ij} =\pi /2$$, while for $$\alpha _{ ij} =0$$ the additional friction is zero. The physical justification for this parameter variation is that the shear forces are not quantitatively known (see A-2, Sect. 5). They at least partially originate from the adhesion forces. While the adhesion forces subject to pulling cells away from each other along the axis connecting their centers of mass have been reasonably well studied (e.g., Chu et al. 2005), the impact of adhesion forces on movement perpendicular to the orientation of the contact surface, reflecting shear forces, cannot readily be calculated from the central forces.
Surprisingly, for each of the parameter variations, the shape characteristics remain in the range of the curve found for the reference parameter set (Table 2) in the absence of HSA (compare Fig. 4 with Fig. 5). None of the above mechanisms generated an elongation of early tumor shape (Fig. 6; only selected parameter changes impacting on the mechanisms denoted in No HSA (i)–(v) are displayed).
(No HSA-vi) Finally a variant of (No HSA-ii) with sinusoidal spring constant of 200% was considered in which, in addition, cell cycle progression is inhibited if the pressure $$p_i$$ overcomes a certain threshold P (A-7) (Fig. 7). We found that for small threshold values of $$P=1$$ kPa the pressure inside the tissue quickly reached the threshold; hence, either tumor growth was inhibited completely or tumors grew only very slowly (Fig. 7). No elongation was observed. For thresholds $$P\gtrsim 1.8~\mathrm{kPa}$$ cells proliferated in an unlimited fashion as for our reference parameter settings and cases No HSA-i to No HSA-v. However, in a small window of cell cycle reentrance pressures of $$1~\mathrm{kPa} \lesssim P\lesssim 1.8~\mathrm{kPa}$$ elongated tumor shapes emerge. (We found a maximum elongation for $$P=1.5$$ kPa.) In this window, the tumor cell proliferation was pressure-inhibited perpendicular to the sinusoids as growing against the mechanical resistance of the sinusoids elevated the pressure on the proliferating tumor cells. However, the pressure threshold was still big enough to permit proliferation between neighboring sinusoids, which approximately extended radially in the direction of the central vein–portal vein axis. As a consequence, the tumor expands preferentially into the central vein–portal vein axis as well. However, the elongation was significantly smaller as in the presence of HSA, where no pressure-dependent cell cycle progression inhibition had been considered. Interestingly, combining both HSA and the presence of a pressure-dependent cell cycle progression in the pressure threshold window $$1~\mathrm{kPa}\lesssim P\lesssim 1.8~\mathrm{kPa}$$ did not promote early tumor elongation compared to HSA in the absence of a pressure-dependent cell cycle progression (Fig. 7).
As in the presence of HSA, beyond tumor population sizes of about 4000 cells, the curves for different mechanisms and parameters converge to a spherical tumor.
### 3.4 Can Any Mechanism Amplify Hepatocyte–Sinusoid Alignment (HSA) Mediated Tumor Elongation?
Within numerous simulations using HSA alone, we could not observe the formation of the first five cells in one row as we could observe in the experiments (Fig. 5a). This motivated us to study whether a further mechanism or a parameter change for tumor cells could lead to an amplification of the column-forming capacity of HSA.
We considered as additional mechanisms some of those we had studied above (enumerated as No HSA-X, X=i, ii, $${\ldots }$$, v) with regard to their column-forming-capacity in the absence of HSA (cf. Fig. 5):
• (HSA-i) a decreased cell–cell adhesion in cancer cells of 20% and no adhesion at all (0%),
• (HSA-ii) an increased adhesion among tumors cells by a factor of 5,
• (HSA-iii) an increased stiffness of sinusoids by increasing the sinusoid spring constant by a factor of 2,
• (HSA-iv) complete inhibition of sinusoid movement to mimic the limit of infinitely stiff vessels,
• (HSA-v) increased tangential cell–cell friction leading to increased inhibition of movement perpendicular to the orientation of the closed sinusoids for cells that align along the sinusoids. As for our previous study of tumor shapes in the absence of HSA, we implemented this mechanism by choosing $$\xi _\bot ^\mathrm{CC} \gg \left( {\xi _{ ij}^\mathrm{CC}} \right) _\mathrm{REF}$$.
The result of these complex simulations was that the parameter variations denoted under (HSA-i)–(HSA-iv) (stiff vessels, elevated sinusoid extensibility, elevated cell–vessel adhesion) did not promote tumor elongation (Fig. 8). However, impeding movement of hepatocyte transversal to the orientation of the sinusoid (HSA-v) amplified tumor elongation (Fig 8, dark blue curve; Fig. 3c). This can be understood as follows: the tumor cells located at the two tips (ends) of the growing column at the interface to normal hepatocytes have to push those hepatocytes away to gain space for further growth and division. As a consequence, the tumor cell column experiences an increasing mechanical pressure. If the column would not be constrained in its movement transversal to the force on its tips, it would undergo buckling in a collective movement of cells as soon as the growth-induced pressure overcomes a certain threshold (Drasdo 2000). As movement perpendicular to the tumor cell column is constrained by sinusoids and normal (non-transformed) hepatocytes, the column can release pressure only by individual cells moving out of the column causing the column to get thicker. (The same mechanism can explain piling up of cells in monolayers of cells that lost contact inhibition of growth (Galle et al. 2005)). However, an elevated perpendicular friction coefficient $$\xi _\bot ^\mathrm{CC} \gg \left( {\xi _{ ij}^\mathrm{CC} } \right) _\mathrm{REF}$$ increases the friction force an individual cell has to overcome to leave the column, which in turn permits formation of longer columns. In this case, we observed initial column formation of a length of five cells (Fig. 3c). As the perpendicular friction coefficient can be largely attributed to shear forces due to tight junctions (see discussion in No HSA-v), sufficiently large contact forces between neighbor cells from impede cells from easily leaving the columnar formation and promote formation of relatively long cancer cell columns.
### 3.5 How Could the Elongation by Hepatocyte–Sinusoid Alignment (HSA) be Tested?
If HSA is responsible for early column formation, it should disappear if HCC cells also have the ability to destroy blood vessels they are in contact with. In order to model this, we tested destruction of vessels at different times after first contact with tumor cells (Fig. 16 in Appendix). When the delay time between contact and destruction was chosen smaller than 30 min, random fluctuations of cell positions were sufficient to destroy vessels. If the delay time went beyond 12 h, vessel destruction was found to have only little impact on the arrangement of the tumor cells in very early stages. For about 1 h delay between first contact and destruction, the effect of HSA was eliminated (Fig. 8, violet curve, Fig. 16 in Appendix). The same result was obtained if a drug was administered that destroys blood vessels.
### 3.6 Blood Vessel Fraction in Tumor Nodule
Finally we studied how far a growing tumor pushes blood vessels away from their original position in the presence or absence of HSA. Significant differences between cases, if they would occur, could provide a further experimentally testable prediction. For this purpose, the volume fraction of blood vessels inside the tumor was calculated (Fig. 9). The simulations showed that in the presence of HSA the volume fraction of vessel elements is slightly higher than in the absence of HSA (B vs. H, C vs. I, D vs. K, E vs. L, F vs. M). If sinusoid movement is completely inhibited (E, L), the vessel volume fraction equals the reference value without the tumor (A). Vessel destruction reduces the vessel volume fraction slightly as only the closest sinusoidal elements, representing pieces of sinusoids, are digested with a time delay. Elevated friction perpendicular to the sinusoid orientation increases the vessel fraction (G). However, at the studied tumor population size, for all values but complete inhibition of vessel movement a significant decrease in vessel volume fraction is observed, typically, by local deformation of the vessel network. This may be explained by the expanding tumor that pushing the vessel network aside. This effect is a bit stronger in the presence than in the absence of HSA because of the tendency of tumor cells to first grow along the sinusoids in the presence of HSA, but the difference is not sufficiently big to allow it to be used to distinguish between the presence and absence of HSA. For all cases, we studied in our simulations, only vessel stiffness has been found to have a strong impact on vessel density.
## 4 Discussion
In this study, we have shown that hepatocyte–sinusoidal alignment (HSA), a mechanism previously shown to be indispensable for restoration of liver micro-architecture during liver regeneration, predicts an elongation of early hepatocellular carcinoma. The model prediction was subsequently confirmed in a rat tumor initiation study using the genotoxic carcinogen N-nitrosomorpholine (NNM) and placental glutathione S-transferase as a marker for initiated cells. Further simulations demonstrated that none of the other potential mechanisms studied in this paper, neither a change in adhesion strength between cells, vessel stiffness, cell matrix friction, cell–vessel adhesion or shear forces between hepatocytes, could be responsible for the experimentally observed elongated arrangement of initiated cells in early HCC. The result strongly suggests that early after initiation, cells are still coordinated by HSA. The molecular mechanism responsible for HSA is not fully understood. In Hoehme et al. (2010) either direct orientation of dividing cells along the closest sinusoid or a mechanism that combines random orientation of cell division followed by short-range attraction by a morphogen have both been shown to fulfill the requirements of HSA. However, orientation may also emerge from a mechanical cause in case hepatocytes attach to their neighboring cells via their apical contacts and to extracellular matrix in the space of Disse, a small space between sinusoids and hepatocytes.
Our findings result from computer simulations with an agent-based model in a liver lobule that correctly represents the architectural features of real liver tissue (Hoehme et al. 2010). The liver lobule multicellular model that formed the starting point of the simulations in this paper had previously been experimentally validated for liver regeneration after drug-induced peri-central liver damage, occurring in each individual liver lobule as a consequence of exposure to hepatotoxic compounds. We used the same model with the same parameters as the starting point situation for our liver cancer development simulations in this paper, with the difference that we initially labeled one cell as a cancer cell, which then has an unlimited potential for cell division.
Testing possible alternative mechanisms to HSA and parameter settings different from the reference parameter set taken from Hoehme et al. (2010) (whereby the parameter changes caused different accentuations of the mechanisms at play, for example, an increase of the cell-cell adhesion strength increases relative weight of cell-cell adhesion in the simulation compared to the reference parameter set), we observed that neither a variation in the strength of cell–cell adhesion, of cell–vessel adhesion, an increased stiffness of vessels against extension, an elevated or reduced micro-motility or elevated shear forces between hepatocytes at their lateral sides could generate similar elongation effects. The latter mechanism was able to slightly enhance the effect of HSA, leading to an even higher degree of elongation of initiated cell foci. In absence of HSA, inhibition of cell cycle progression by mechanical compression was able to explain a moderate elongation of early hepatocellular carcinoma in a small window of mechanical pressures but the elongation found looks too small to explain the experimentally observed spatial tumor micro-patterns. Nevertheless cell cycle progression inhibition by mechanical cannot be completely excluded as potential mechanism underlying the elongated tumor shapes early after initiation.
The model was further able to predict the gradual loss of elongation of transformed cell foci with increasing tumor size. The loss of tumor elongation with increasing tumor size may be due to several reasons. Firstly, as a column grows it has to push normal hepatocytes aside in order to generate free space for its extension. This exerts forces on both normal hepatocytes and tumor cell columns, thereby elevating the compressive stress in the tumor, which increases with increasing size of the column. This interpretation is supported by visualization of the mechanical stress in the three scenarios of Fig. 3 (see Fig. 10). The more cells are forced to form columns (as in Fig. 10a, c), the higher becomes the mechanical stress that the cells in the column experience.
At a certain degree of compressive stress, the forces stabilizing the column formed by HSA are insufficient to ensure maintenance of the columnar shape. These are in particular polar cell–cell adhesion along the closest sinusoid, shear forces that hinder cell movement perpendicular to the orientation of the closest sinusoid (probably due to tight junctions), and repulsive forces if cells are pushed against sinusoids in their surroundings. Moreover, the sinusoidal network has many branching points, which perturb the growth of a column, firstly by representing mechanical obstacles, secondly by changing the local sinusoid orientation. They therefore constitute perturbation points that may trigger tumor cells to leave the columnar order. Finally, the sinusoidal network changes significantly, when the lobule borders are reached as the sinusoids are connected to the portal triads. Hence, when the tumor reaches the lobule border, the columnar order cannot be maintained. This explanation is in agreement with the experimental findings of tumors adopting a spherical shape at a diameter of about 50–75% of the liver lobule diameter.
The model simulations were performed in a statistically representative liver lobule obtained by statistical sampling from parameters that were used to quantitatively characterize liver lobule micro-architecture in 3D volume data sets reconstructed from confocal laser scanning micrographs. Normal hepatocytes and tumor cells were represented by individual agents within a biophysical model parameterizing each cell by biophysical and bio-kinetic quantities that are in principle accessible to experiments. This permitted the determination of physiologically meaningful parameter ranges within which the model parameters can be varied.
The parameters found to explain liver regeneration after drug-induced damage served as starting parameters. Within our model, each cell was able to move according to an equation of motion summarizing all forces on a cell including its own micro-motility.
The agent-based approach we used is also known as a “center-based model” as forces between cells are mimicked as forces between cell centers. Sinusoids were modeled as chains of spherical objects linked by linear springs, which permitted us to express movement of sinusoids as a collective movement of the spherical objects. This description allows us to formulate an equation of motion for each individual sphere of each vessel. Describing sinusoids as a chain of spheres is a natural choice that emerges from a medial axis transform of the blood vessel network, where the surfaces of the blood vessels have been experimentally labeled. The medial axis transform locally inscribes the sphere with maximum radius that touches the labeled vessel surface and then connects the centers of the sphere to obtain the vessel graph. This represents a direct, though abstracted, approach to model tumor cells, hepatocytes and vessels in a liver lobule. Simulations with the model can therefore be viewed as virtual experiments. The price of the relatively high degree of realism is many model parameters. However, as the model is almost fully parameterized by biomechanical or bio-kinetic parameters that can in principle be measured, the parameter ranges can be well estimated. In Hoehme et al. (2010), an extensive parameter sensitivity analysis comprising of hundreds of simulations has been performed to identify those parameters and mechanisms that were able to explain the restoration of liver mass and architecture in a regenerating lobule after drug-induced peri-central liver damage. The parameters thus identified served as the starting and reference parameter set in the present work. The emerging model can explain both, regeneration after drug-induced liver damage and growth of tumors after initiation. It may be viewed as a step toward a virtual liver lobule model that prospectively should be able to mimic numerous perturbations.
The model prediction of an initially elongated arrangement of initiated cell foci has been validated by reanalysis of liver slices from a tumor initiation study in rats (Grasl-Kraupp et al. 2000). Analysis of GST-P, which was used as a marker for initiation, demonstrated that relatively small clusters of 20 or less cells were always elongated or almost columnar, while larger foci of the size of lobules showed spherical shapes. A limitation of the experimental validation presented here is that the analysis of images was performed in a two-dimensional manner. In the past, we have reported that three-dimensional structures can easily be misinterpreted when only two-dimensional tissue slices are evaluated (Vartak et al. 2016; Drasdo et al. 2014a, b). For example, a column of initiated cells may appear as a single cell when the slice level is oriented perpendicular to the structure. To minimize misinterpretations, evaluation was performed only for images where the slice level was approximately parallel to the hepatocyte sheets and at least 4 cells could be seen. Under these conditions, almost all analyzed small foci with cell numbers smaller than about 10 cells showed the reported elongated shape. Therefore, it can be taken as demonstrated that at least a large fraction of early initiated cells arrange in elongated or column-like structures. However, the type of analysis performed here does not exclude the possibility that a small fraction of spherical, small, foci may also exist. Final validation might be possible from a three-dimensional analysis in future, where all cells of a confocal scan are considered (Hammad et al. 2014; Godoy et al. 2013). Nevertheless, the two-dimensional images presented here (Fig. 5a) give clear evidence that elongated small foci, as predicted by the simulation, indeed represent a predominant feature in NMN initiated rat livers.
In this study, we have shown an example of how computational tissue simulations are well suited to identify plausible candidate mechanisms, but also can be used to exclude mechanisms that despite looking plausible in the first place turn out to be incompatible with existing observations from direct comparison with the model simulations, and therefore do not have to be considered for further experimental validations anymore.
## 5 Materials and Methods
### 5.1 Model Details
Ad (A-1) The JKR-force $$F_{ ij}^\mathrm{JKR} =|\underline{F}_{ ij}^\mathrm{JKR} (d_{ ij})|$$ where $${d}_{{ ij}}$$ is the distance between the centers of two interacting spheres i and j that is calculated from two implicit equations (Fig. 2a):
\begin{aligned} \delta _{ ij}= & {} \frac{a_{ ij} ^{2}}{\tilde{R}_{ ij} }-\sqrt{\frac{2\pi \hat{{\gamma }}_{ ij} a_{ ij} }{\tilde{E}_{ ij} }} \end{aligned}
(2a)
\begin{aligned} a_{ ij} ^{3}= & {} \frac{3\tilde{R}_{ ij} }{4\tilde{E}_{ ij} }\left[ {F_{ ij}^\mathrm{JKR} +3\pi \hat{{\gamma }}_{ ij} \tilde{R}_{ ij} +\sqrt{6\pi \hat{{\gamma }}_{ ij} \tilde{R}_{ ij} F_{ ij}^\mathrm{JKR} +\left( {3\pi \hat{{\gamma }}_{ ij} \tilde{R}_{ ij} } \right) ^{2}}} \right] \end{aligned}
(2b)
where $$a_{ ij}$$ is the contact radius. The effective radius $$\tilde{R}_{ ij}$$ is defined by $$\tilde{R}_{ ij}^{-1}=R_{i}^{-1}+R_{j}^{-1}$$, where $$R_{i}$$ is the radius of cell i. $$d_{ ij} = R_{i}+R_{j} -\delta _{ij}$$ is the distance between the centers of model cell i and cell j, where $$\delta _{\mathrm{ij}}=\delta _{\mathrm{i}}+\delta _{\mathrm{j}}$$ is the sum of the deformations of each cell (upon compression it is the overlap of the two spheres) along the axis linking the centers of these cells. $$\tilde{E}_{ ij}$$ is the composite Young’s modulus defined by $$\tilde{E}_{ ij}^{-1} =(1-\nu _i^2)E_i^{-1} +(1-\nu _j^2 )E_j^{-1}$$. $$\nu _i$$ is the Poisson ratio of cell i. We approximate $$\hat{\gamma }_{ ij}\thickapprox \rho _{ ij}^\mathrm{m} W_\mathrm{s}$$ where $$\rho _{ ij}^\mathrm{m}$$ is the density of surface adhesion molecules acting in the contact area and $$W_\mathrm{s}$$ is the energy of a single bond. The second equation cannot be solved explicitly for $$F_{ ij}^\mathrm{JKR} (d_{ ij})$$ if $$\hat{{\gamma }}>0$$. It can be numerically solved first to obtain $$a_{ ij}(F_{ ij}^\mathrm{JKR})$$. The value of $$a_{ ij}$$ is then inserted into the first equation to give $$\delta _{ ij}(a_{ ij}), d_{ ij} = R_{i}+R_{j} -\delta _{ij}, d_{ ij}(a_{ ij})$$. $$F_{ ij}^\mathrm{JKR} (d_{ ij})$$ can be obtained by plotting $$F_{ ij}^\mathrm{JKR} (d_{ ij})$$ versus $$d_{ ij}$$.
The effect of polarity has been modeled by replacing the membrane density of adhesion molecules $$\rho _{ ij}^\mathrm{m} \rightarrow \rho _{ ij}^\mathrm{m} A_{ ij}^\mathrm{adh} (\psi _{ ij})/A_{ ij}$$, in which case only adhesion is downscaled. Here, $$A_{ ij}^\mathrm{adh} (\psi _{ ij})$$ is the area of the overlapping regions that are able to form the adhesive contact within the contact area $$A_{ ij}\approx \pi a_{ ij}\ge A_{ ij}^\mathrm{adh} (\psi _{ ij})$$. This approximation results in a reduced adhesion force if the overlap area of the membrane regions of neighboring cells carrying the adhesion molecules is smaller than the physical contact area.
In general, the density of adhesion molecules on the surface of the two interacting cells differs (Ramis-Conde and Drasdo 2012, 2008), so that $$\rho _{ ij}^\mathrm{m}$$ has to be calculated from the density of cell adhesion molecules on the surface of each individual cell (or, more generally, of a cell i and its interaction object X).
We assume that all surface adhesion molecules in the contact region of a cell and its interacting object (e.g., another cell or sinusoid) are saturated. In this case, the density of formed bonds behaves approximately as $$\rho _{{iX}}^\mathrm{m} \propto \min \left( {\rho _{i} , \rho _{X} } \right)$$. Here $$\rho _{i}$$ is the density of surface adhesion molecules of cell $$i,\rho _{X}$$ the density of surface adhesion molecules of object X. We further assume that the density of adhesion molecules in the cell surface is the same for each cell. Reversible bond formation and bond release dynamics with mobile surface receptors in the contact zone between cell i and object X could be accounted for by $$\rho _{{iX}}^\mathrm{m} A_{{iX}}^\mathrm{adh} \approx (k^{ + }/k^{ - })\left( {A_{{iX}}^\mathrm{adh} } \right) ^{2} \rho _{i} \rho _{X}$$, with $$k^{+},k^{-}$$, being the bond formation and bond release rates, respectively. We here consider the simpler case $$\rho _{{iX}}^\mathrm{m} \propto \min \left( {\rho _{i},\,\rho _{X} } \right)$$.
Ad (A-2) The equation of motion for the cell i sketched above (Eq. 1) reads:
\begin{aligned} \underbrace{m_i \frac{\mathrm{d}\underline{v}_i}{\mathrm{d}t}}_{\mathrm{inertia}}= & {} \underbrace{ -{\underline{\underline{\varsigma }}_{i\mathrm{ECM}}^{\mathrm{CECM}}} \underline{v}_{i}(t)}_{\text {cell}-\text {ECM friction}}+\sum \limits _{{ jNNi}} {\underbrace{\underline{\underline{\varsigma }}_{ ij} ^\mathrm{CC}(\underline{v}_j (t)-\underline{v}_i(t))}_{\mathrm{cell{-}cell\, friction}}+\sum \limits _{{ jNNi}} {\underbrace{\underline{\underline{\varsigma }} _{ ij} ^\mathrm{CS}(\underline{w}_j(t)-\underline{v}_{i} (t))}_{\text {cell}{-}\text {sinusoid friction}}} }\nonumber \\&+\,\underbrace{\underline{F}_{ ij} ^\mathrm{CC}}_{\text {cell}{-}\text {cell}\,\text {adhesion}\, \& \,\text {repulsion}}+\underbrace{\underline{F}_{ ij} ^\mathrm{CS}}_{\text {cell}{-}\text {sinusoid}\,\text {adhesion}\, \& \,\text {repulsion}}+\underbrace{\underline{F}_i ^{\mathrm{active},H}}_{\text {micro-motility}}.\nonumber \\ \end{aligned}
(3)
Cell i can either be a hepatocyte or a cancer cell. Parameters for both may in principle be different, but as hepatocellular carcinoma originate from hepatocytes, it is reasonable to define, as a starting point, that the parameters of carcinoma cells are the same as for normal hepatocytes. $$\underline{\nu }_{i}(t)$$ is the velocity of hepatocyte i. In the first sum, j denotes all neighbor cells of cell i: in the second sum, j denotes all sinusoidal elements interacting with cell i. Hereby, each sinusoid has been represented as a chain of small spheres connected by linear springs (see (A-8)). Within tissues the friction between cells and the extracellular matrix components, and between cells and the sinusoids, is large such that the inertia term, the first term in Eq. (3), can be neglected and be set to zero. $$\underline{\underline{\varsigma }}_{i\mathrm{ECM}}^{\mathrm{CECM}}$$ denotes the friction tensor (here a $$3\times 3$$ matrix) for cell-extracellular matrix friction, $$\underline{\underline{\varsigma }}_{ ij}^{\mathrm{CC}}$$ describes the friction between cells i and $$j,\underline{\underline{\varsigma }}_{ ij}^{\mathrm{CS}}$$ between cells i and sinusoids. The friction tensor may be decomposed into a perpendicular and a parallel component:
\begin{aligned} \underline{\underline{\varsigma }} _{iX} ^{k}=\gamma _\bot ^{k}(\underline{u}_{iX} \otimes \underline{u}_{iX})+\gamma _{||} ^{k}(\underline{\underline{I}} -\underline{u}_{iX} \otimes \underline{u}_{iX}), \end{aligned}
(4)
with $$k=\mathrm{CECM}, \mathrm{CC}, \mathrm{CS}, X=\mathrm{ECM}, j$$. Here, $${{{\underline{u}}}}_{iX}=({{{\underline{r}}}}_{X}-{{{\underline{r}}}}_{i})/{\vert }{{{\underline{r}}}}_{X}-{{{\underline{r}}}}_{i} {\vert }$$ with $${{{\underline{r}}}}_{i}$$ denoting the position of cell i. “$$\otimes$$” denotes the dyadic product, $$\underline{F}_{iX}$$ denotes the JKR-force between cells i and j (for $$X=j)$$ as well as between cell i and substrate (for $$X=s$$ enumerating sinusoidal elements), $$\underline{\underline{I}}$$ is the unit matrix (here a $$3\times 3$$ matrix with “1” on the diagonal and “0” on the off-diagonals). $$\gamma _{\bot }^{k,iX}, \gamma _{||}^{k,iX}$$ are the perpendicular and parallel friction coefficients, respectively. The decomposition of the friction tensor in perpendicular and parallel components becomes more apparent when multiplying the friction tensor by the difference in velocity between cell i and object $$X, \Delta \underline{v}_{{iX}} = \underline{v}_{X} - \underline{v}_{i}$$,
\begin{aligned} \underline{\underline{\varsigma }} _{iX} ^{k}\Delta \underline{v}_{iX}= & {} \gamma _\bot ^{k}(\underline{u}_{iX} \otimes \underline{u}_{iX})\Delta \underline{v}_{iX} +\gamma _{||} ^{k}(\underline{\underline{I}} -\underline{u}_{iX} \otimes \underline{u}_{iX})\Delta \underline{v}_{iX} \nonumber \\= & {} \gamma _\bot ^{k}\underline{u}_{iX} (\underline{u}_{iX} \Delta \underline{v}_{iX})+\gamma _{||} ^{k}(\underline{\underline{I}} \Delta \underline{v}_{iX})-\gamma _{||} ^{k}\underline{u}_{iX} (\underline{u}_{iX} \Delta \underline{v}_{iX}). \end{aligned}
(5)
The first term on the RHS specifies the friction perpendicular to the direction of movement, the second and third terms on the RHS denote the tangential friction. For ECM ($$X=\mathrm{ECM}$$), $$\underline{v}_{\mathrm{ECM}} = 0$$. In the case that the ECM was attached to an impermeable flat surface, the cell moves on the flat surface can be mimicked as a sphere with infinite radius by the settings, $${{{\underline{r}}}}_\mathrm{ECM}=-\infty {{{\underline{e}}}}_{z}, {{{\underline{u}}}}_{i\mathrm{ECM}}=-{{{\underline{e}}}}_{z}$$. For cell movement purely tangential to the surface, the first and third term on the RHS of Eq. (5) become zero, and the second term determines the friction alone. $$\underline{F}_i^{\mathrm{active},H}$$ denotes the active movement force by migration and is explained in assumption A-3.
The model assumes $$\underline{\underline{\varsigma }} _{i\mathrm{ECM}} ^{\mathrm{CECM}}=\gamma \underline{\underline{I}}$$, i.e., isotropic friction with the extracellular matrix in the space of Disse.
Generally, the perpendicular and parallel friction coefficients, $$\gamma _{\bot }^{k}, \gamma _{\parallel }^{k}$$, respectively, will be different for each type of interaction ($$k=\mathrm{CC}$$, CS, ECM) and depend on the mechanisms of friction. For example, for adhesion controlled cell–cell friction one might expect $$\gamma _{{||}}^{k} = A_{ ij}^\mathrm{adh} \rho _{ ij}^\mathrm{m} \zeta _{\parallel }^{k}$$ with $$k=\mathrm{CC}$$. That is, friction will basically depend on the shared contact area decorated with adhesive bonds, the density of adhesive bonds formed, and an unknown coefficient that characterizes the strength of friction between two cells, $$\zeta _{\parallel }^{\mathrm{CC}}$$.
If not stated otherwise, we lumped the density of surface adhesion molecules and friction coefficient together by setting $$\gamma _{\parallel }^{k} = A_{ ij}^\mathrm{adh} \xi _{\parallel }^{k}$$ with $$\xi _{\parallel }^{k} = \rho _{ ij}^\mathrm{m} \zeta _{\parallel }^{k}$$ and $$\gamma _{ \bot }^{k} = A_{ ij}^\mathrm{adh} \xi _{ \bot }^{k}$$ with $$\xi _{ \bot }^{k} = \rho _{ ij}^\mathrm{m} \zeta _{ \bot }^{k}$$. Moreover, for our reference data set, and if not otherwise stated, we chose $$\xi _{ \bot }^{k} = \xi _{\parallel }^{k} \equiv \xi ^{k}$$ with $$k=\mathrm{CC}$$, CS, CECM.
### Remark
Note that the indices i, j take into account that the cells may be of different type, so automatically allow us to take into account transformed and non-transformed cells, or even the spherical elements that have been used to mimic the blood vessels. For the latter, however, no active migration terms have been considered.
Ad (A-3) Formally, active cell movement (migration) was mimicked by two alternative mechanisms which both produced an equivalent outcome (a) $$\underline{F}_i ^{\mathrm{active},H}=\chi \underline{\nabla }c+\sqrt{2D\gamma ^{2}}\underline{\eta }_i(t)$$, (b) $$\underline{F}_i ^{\mathrm{active},H}=(1-\Theta [\underline{\nabla }\hat{{p}}_i \underline{\eta }_i ])\sqrt{2D\gamma ^{2}}\underline{\eta }{ }_i(t)$$, respectively. Mechanism (a) mimics chemotaxis (first term) in combination with random isotropic movement (second term), (b) favors movement in the direction of small hepatocyte density.
$$\underline{\eta }_i (t)$$ denotes a Gaussian-distributed random variable with average $$\left\langle {\underline{\eta }_i (t)} \right\rangle =0$$ and autocorrelation $$\left\langle {\eta _{mi} (t^{\prime })\eta _{nj} (t)} \right\rangle =\delta _{ ij} \delta (t^{\prime }-t)({ m, n = x, y, z}$$ denote the coordinate direction; ij are the hepatocyte indices). Here, $$\left\langle {\underline{X}} \right\rangle$$ denotes the expectation value obtained by averaging the random variable $${{{\underline{X}}}}$$ over many of its realizations. As each component of $$\underline{\eta }$$ is Gaussian distributed, each realization is sampled from a Gaussian distribution. D is the cell diffusion constant and assumed to be a scalar, $$\chi$$ is the chemotaxis coefficient, $$c({{{\underline{r}}}},t)$$ the morphogen concentration secreted by the cells dying from drug damage.
$$\hat{\rho }_{i}$$ is a quantity by which the cell can sense the position of its neighbors. It is defined similar to a homeostatic pressure:
\begin{aligned} \hat{{p}}_i =\sum _j {\left( \frac{{F_{ ij}^{{HX\varsigma _{m} = 0}}}}{A_{ ij}}\frac{\underline{r}_i -\underline{r}_k }{|\underline{r}_i -\underline{r}_k |} \right) }. \end{aligned}
(6)
In the last equation, j is runs over all neighboring hepatocytes j of i, as well as over all sinusoidal elements. The index $$HX_{\varsigma m=0}$$ means that only repulsive contributions to the interaction force were considered (formally by setting $$\rho _m=0$$ in the equation for the central force).
Ad (A-4) To calculate the orientation change in a cell, within each time interval $$\Delta t$$ for each hepatocyte a rotation trial around three space-fixed axes by angles $$\delta \beta _{{i}}$$ with $$i=1, 2, 3, \delta \omega _{\mathrm{i}}\in [0, \delta \omega _{\max })$$, with $$\delta \omega _{\max } \ll \uppi$$/2 was performed, using the algorithm of Barker and Watts (explained in Drasdo et al. 2007). The energy can be calculated by integration of the equation $$\underline{F}_{ ij} =-\frac{\partial V_{ ij} }{\partial \underline{r}_i }$$ where only the JKR-force contributions were considered. The energy difference is then calculated from $$\Delta V_{ ij} (t)=V_{ ij} (t+\Delta t)-V{ }_{ ij}(t)$$, and the probability that a step is accepted is calculated using $$p=\min (1, \mathrm{e}^{-\Delta V_{ ij}/F_T})$$ where $$F_{T}\approx 10^{-16}\,\hbox {J}$$ is a reference energy (comparable to the $$k_{\mathrm{B}} T$$ in fluids or gases where $$k_{\mathrm{B}}$$ is the Boltzmann factor, T the temperature).
Ad (A-5) During interphase, a cell increases its volume by increasing the radius R in small steps $$\Delta {R} \ll {R}$$ until it has doubled its initial “intrinsic” volume to $$V_{\mathrm{DIV}}=2V_{\mathrm{INIT}}$$, where $$V_{\mathrm{INIT}}$$ was its volume immediately after cell division (Fig. 2b). Here, the intrinsic volume $$V_{i}$$ of a model cell i is approximated by $$V_{i}(R_{i})=4\pi R_{i}^{3}/3$$. If $$V_{i}=V_{\mathrm{DIV}}$$ (hence $$R_{\mathrm{DIV}}\approx 1.26 R$$) then the model cell i deforms into a dumbbell at constant volume in mitosis (Fig. 2b). Subsequently, it divides into two daughter cells of radius R. The duration T of the cell cycle was stochastic, sampled from a Gaussian distribution with expectation value $$\tau$$ and variance $$\Delta \tau =2h$$ additionally cropping outside the interval $$T\in [\tau -\Delta \tau ,\tau +\Delta \tau ]$$.
Pressure is defined by the simple measure $$p_{i} = \sum _{j} \frac{\underline{F}_{ ij}^{{CX}} \underline{u}_{ ij} }{{A_{ ij}}}$$. Here, $$\underline{F}_{ ij}^{{CX}}$$ denotes the interaction force between a cell i and object j (X denotes an object which can be a cell or a piece of the sinusoid, see A-8), $$\underline{u}_{ ij}$$ the normal vector pointing from cell i to object j, $$A_{ ij}$$ the interface between cell i and object j. An extension to tensors able to measure shear contributions is straightforward but not needed here (Liedekerke et al. 2015).
Ad (A-8) Sinusoids were represented as a graph. Along the graph, spheres were strung with a radius being equal to the radius of the sinusoid. The sinusoidal network of a whole liver lobule within the model consisted of approximately 50,000 spherical objects (agents).
Each of the sinusoidal spherical elements was assumed to interact with the hepatocytes by a JKR-force ($$\underline{F}_{ ij} =\underline{F}(d_{ ij},\psi _{ ij}))$$. The forces among sinusoidal elements were approximated by linear elastic springs, $$\underline{F}_{{kl}}^{S} = - \frac{{kl_{0} }}{A} \times \left( {\frac{{l_{{kl}}^{S} }}{{l_{0} }} - 1} \right) \underline{u} _{{kl}}$$, with kl being spheres on the chain connected by a spring, $$A=\pi r_{kl}^S$$ is the sinusoid element intersection area with $$r_{kl}^S$$ being the radius of the sinusoid element connecting points k and l (In Hoehme et al. 2010, we used a constant sinusoid radius, see Table 1). $$l_{0}$$ is the spring rest length, $$l_{kl}^S$$ the actual length. The spring and geometrical parameters can be related to the (elastic) Young’s modulus by setting $$E^{S}=\frac{kl_0}{A}$$. The Young’s modulus is one model parameter. $$\underline{u}_{kl}$$ is the unit vector pointing from the center of sinusoidal object k to sinusoidal object l.
Movement of the sinusoids is modeled by an equation of motion for each of the sinusoidal spheroid elements using the same type of equation as for the hepatocytes except for the sinusoids we an active motion (migration) force.
Sinusoids in the model are anchored in the central vein and in the portal veins.
### 5.2 Characterization of Simulation Results
In order to quantify the tumor shape in our simulations, we perform an empirical Karhunen–Loève transform (KLT) at different tumor cell population sizes, conceptually closely related to a principle component analysis (Fig. 11). KLT minimizes the total mean square error and thus optimally spans three orthogonal eigenvectors and their associated eigenvalues, the latter giving information about tumor elongation: if all eigenvalues are similar, it indicates that there is no preferential direction of extension. On the contrary, if one eigenvalue results in significantly higher values than the others, then the tumor shape is elongated along the corresponding eigenvector. The ratio of the highest to third (lowest) eigenvalue provides a direct measure of tumor elongation, whereby the second and third eigenvalue have about the same magnitude. This measure turned out to be very robust in that different realizations of the stochastic growth process using the same parameters do not lead to any notable differences. In our figures, we displayed the ratio of the longest (extension along first eigenvector) to shortest (extension along second eigenvector) axis.
### 5.3 Liver Tumor Initiation and Tissue Analysis
Histological slides of a previously published study (Grasl-Kraupp et al. 2000) were reanalyzed. In this study, male Wistar rats received single doses of 250 mg of N-nitrosomorpholine (NNM)/10 ml solution/kg body weight by gavage. Livers of four animals were analyzed at days 0.5, 1.5, 2.5, 17.5, 20.5, 24.5, 27.5, 31.5 and 107.5 after NNM administration. Sections with 2 $$\upmu$$m thick were immunostained by anti-GST-P. The original study (Grasl-Kraupp et al. 2000) was designed to study the number of GST-P positive cells in relation to cell replication and cell death events. In the present study, the slides were reanalyzed to evaluate whether GST-P positive (initiated) hepatocytes are arranged in spherical or in elongated foci. For this purpose, slides were identified in which the slice level was oriented approximately in parallel to the hepatocyte sheets (allowing the identification of hepatocyte columns and sinusoids over at least 10 subsequent hepatocytes) and the shape of foci was photographically documented under a light microscope.
## Notes
### Acknowledgements
DD gratefully acknowledges support by the projects EU-CancerSys, EU-PASSPORT, EU-NOTOX, BMBF-Virtual Liver Network, BMBF-LiSym and ANR-IFLOW, FB support by EU-CancerSys, SH by EU-CancerSys and BMBF-VLN, WW by project EU-CancerSys and EU NOTOX, JGH by EU CancerSys, BMBF-VLN, BMBF LiSym.
## References
1. Alcaraz J, Buscemi L, Grabulosa M, Trepat X, Fabry B, Farre R, Navajas D (2003) Microrheology of human lung epithelial cells measured by atomic force. Biophys J 84:2071–2079
2. Anderson AR, Weaver AM, Cummings PT, Quaranta V (2006) Tumor morphology and phenotypic evolution driven by selective pressure from the microenvironment. Cell 127(5):905–915
3. Anderson AR, Chaplain MAJ, Rejniak KA (2007) Single-cell-based models in biology and medicine. Birkhäuser, Basel
4. Beysens D, Forgacs G, Glazier JA (2000) Cell sorting is analogous to phase ordering in fluids. Proc Natl Acad Sci USA 97(17):9467–9471
5. Braeuning A, Gavrilov A, Geissler M, Wenz C, Colnot S, Templin MF, Metzger U, Römer M, Zell A, Schwarz M (2016) Tumor promotion and inhibition by phenobarbital in livers of conditional Apc-deficient mice. Arch Toxicol 90(6):1481–1494
6. Casciari JJ, Sotirchos SV, Sutherland RM (1988) Glucose diffusivity in multicellular tumor spheroids. Cancer Res 48:3905–3909Google Scholar
7. Chesla SE, Selvaraj P, Zhu C (1998) Measuring two-dimensional receptor–ligand binding kinetics by micropipette. Biophys J 75:1553–1557
8. Chu Y-S, Dufour S, Paul Thiery J, Perez E, Pincet F (2005) Johnson–Kendall–Roberts theory applied to living cells. Phys Rev Lett 94:028102
9. D’Alessandro L, Höhme S, Drasdo* D, Klingmüller* U (2015) Unraveling liver complexity from molecular to organ level: challenges and perspectives. Prog Biophys Mol Biol 117(1):78–86Google Scholar
10. Davidson LA, Koehl MAR, Keller R, Oster GF (1995) How do sea urchins invaginate? Using bio-mechanics to distinguish between mechanisms of primary invagination. Development 121:2005–2018Google Scholar
11. Drasdo D (2000) Buckling Instabilities in one-layered growing tissues. Phys Rev Lett 84(18):4244–4247
12. Drasdo D (2005) Coarse graining in simulated cell populations. Adv Complex Syst 8(2&3):319–363
13. Drasdo D, Hoehme S (2005) A single-cell-based model of tumor growth in vitro: monolayers and spheroids. Phys Biol 2:133–147
14. Drasdo D, Loeffler M (2001) Individual-based models to growth and folding in one-layered tissues: intestinal crypts and early development. Nonlinear Anal Theory Methods Appl 47(1):245–256Google Scholar
15. Drasdo D, Hoehme S (2005) A single-cell-based model of tumor growth in vitro: monolayers and spheroids. Phys Biol 2:133–147Google Scholar
16. Drasdo D, Hoehme S, Block M (2007) On the role of physics in the growth and pattern formation of multi-cellular systems: what can we learn from individual-cell based models? J Stat Phys 128(1–2):287–345
17. Drasdo D, Hoehme S, Hengstler JG (2014a) How predictive quantitative modeling of tissue organization can inform liver disease pathogenesis. J Hepatol 61(4):951–956
18. Drasdo D, Bode J, Dahmen U, Dirsch O, Dooley S et al (2014b) The virtual liver: state of the art and future perspectives. Arch Toxicol 88(12):2071–2075
19. EASL (2012) EASL-EORTC clinical practice guidelines: management of hepatocellular carcinoma. J Hepat 56:908–943Google Scholar
20. Friebel A, Neitsch J, Johann T, Hammad S, Hengstler JG, Drasdo* D, Hoehme* S (2015) TiQuant: Software for tissue analysis, quantification and surface reconstruction. Bioinformatics.
21. Galle J, Loeffler M, Drasdo D (2005) Modelling the effect of deregulated proliferation and apoptosis on the growth dynamics of epithelial cell populations in vitro. Biophys J 88:62–75
22. Ghallab A, Cellière G, Henkel SG, Driesch D, Hoehme S, Hofmann U, Zellmer S, Godoy P, Sachinidis A, Blaszkewicz M, Reif R, Marchan R, Kuepfer L, Häussinger D, Drasdo* D, Gebhardt* R, Hengstler* JG (2016) Model guided identification and therapeutic implications of an ammonia sink mechanism. J Hepat 64:860–871Google Scholar
23. Godoy P, Hewitt NJ, Albrecht U, Andersen ME, Ansari N et al (2013) Recent advances in 2D and 3D in vitro systems using primary hepatocytes, alternative hepatocyte sources and non-parenchymal liver cells and their use in investigating mechanisms of hepatotoxicity, cell signaling and ADME. Arch Toxicol 87(8):1315–1530
24. Grasl-Kraupp B, Luebeck G, Wagner A, Löw-Baselli A, de Gunst M, Waldhör T, Moolgavkar S, Schulte-Hermann R (2000) Quantitative analysis of tumor initiation in rat liver: role of cell replication and cell death (apoptosis). Carcinogenesis 21(7):1411–1421
25. Hammad S, Hoehme S, Friebel A, von Recklinghausen I, Othman A, Begher-Tibbe B, Reif R, Godoy P, Johann T, Vartak A, Golka K, Bucur PO, Vibert E, Marchan R, Christ B, Dooley S, Meyer C, Ilkavets I, Dahmen U, Dirsch O, Böttger J, Gebhardt R, Drasdo D, Hengstler JG (2014) Protocols for staining of bile canalicular and sinusoidal networks of human, mouse and pig livers, three-dimensional reconstruction and quantification of tissue microarchitecture by image processing and analysis. Arch Toxicol 88(5):1161–1183
26. Hoehme S, Drasdo D (2010) A cell-based simulation software for multi-cellular systems. Bioinformatics 26(20):2641–2642
27. Hoehme S, Brulport M, Bauer A, Bedawy E, Schormann W, Gebhardt R, Zellmer S, Schwarz M, Bockamp E, Timmel TG, Hengstler JG, Drasdo D (2010) Prediction and validation of cell alignment along microvessels as order principle to restore tissue architecture in liver regeneration. Proc Natl Acad Sci 107(23):10371–10376
28. Holzhuetter H-G, Drasdo D, Preusser T, Lippert J, Henney AM (2012) The virtual liver: a multidisciplinary, multi-level challenge for systems biology. Wiley Interdiscipl Rev Syst Biol Med 4(3):221–235
29. Hutchinson LG, Gaffney EA, Maini PK, Wagg J, Phipps A, Byrne HM (2016) Vascular phenotype identification and anti-angiogenic treatment recommendation: a pseudo-multiscale mathematical model of angiogenesis. J Theor Biol 398:162–180.
30. Jagiella N, Müller B, Müller M, Vignon-Clementel IE, Drasdo D (2016) Inferring growth control mechanisms in growing multi-cellular spheroids of NSCLC cells from spatial-temporal image data. PLoS Comput Biol 12(2):e1004412Google Scholar
31. Klaassen CD, Casarett LJ, Doull J (2013) Casarett and Doull’s toxicology: the basic science of Poisons, 8th edn. McGraw-Hill Education/Medical, New YorkGoogle Scholar
32. Kowalik MA, Perra A, Ledda-Columbano GM, Ippolito G, Piacentini M, Columbano A, Falasca L (2016) Induction of autophagy promotes the growth of early preneoplastic rat liver nodules. Oncotarget 7(5):5788–5799
33. Landau DP, Binder K (2000) Monte Carlo simulations in statistical physics. Cambridge University Press, CambridgeGoogle Scholar
34. Lekka M, Laidler P, Gil D, Lekki J, Stachura Z, Hrynkiewicz AZ (1999) Elasticity of normal and cancerous human bladder cells studied by scanning force microscopy. Eur Biophys J 28(4):312–316
35. Li XS (2005) An overview of SuperLU: algorithms, implementation, and user interface. ACM Trans Math Softw 31(3):302–325Google Scholar
36. Liedekerke P, Palm M, Jagiella N, Drasdo D (2015) Simulating tissue mechanics with agent-based models: concepts, perspectives and some novel results. Comput Particle Mech 26:401–444
37. Macklin P, Edgerton ME, Thompson AM, Cristini V (2012) Patient-calibrated agent-based modelling of ductal carcinoma in situ (DCIS): from microscopic measurements to macroscopic predictions of clinical progression. J Theor Biol 301:122–140
38. Mahaffy RE, Shih CK, MacKintosh FC, Käs J (2000) Scanning probe-based frequency-dependent microrheology of polymer gels and biological cells. Phys Rev Lett 85(4):880–883
39. Malmgren RA (1956) Observations on a liver mitotic stimulant present in tumor tissue. Cancer Res 16(3):232–236Google Scholar
40. Perra A, Kowalik MA, Ghiso E, Ledda-Columbano GM, Di Tommaso L, Angioni MM, Raschioni C, Testore E, Roncalli M, Giordano S, Columbano A (2014) YAP activation is an early event and a potential therapeutic target in liver cancer development. J Hepatol 61(5):1088–1096
41. Petrelli A, Perra A, Cora D, Sulas P, Menegon S, Manca C, Migliore C, Kowalik MA, Ledda-Columbano GM, Giordano S, Columbano A (2014) MicroRNA/gene profiling unveils early molecular changes and nuclear factor erythroid related factor 2 (NRF2) activation in a rat model recapitulating human hepatocellular carcinoma (HCC). Hepatology 59(1):228–241
42. Piper JW, Swerlick RA, Zhu C (1998) Determining force dependence of two-dimensional receptor–ligand binding affinity by centrifugation. Biophys J 74:492–513
43. Ramis-Conde* I, Drasdo D*, Anderson ARA, Chaplain MA J (2008) Modeling the influence of the E-cadherin-beta-catenin pathway in cancer cell invasion: a multiscale approach. Biophys J 95: 155–165Google Scholar
44. Ramis-Conde I, Drasdo D (2012) From genotypes to phenotypes: classification of the multi-cellular spatial–temporal tumour profiles for different variants of the cadherin adhesion pathway. Phys Biol 9(3):11
45. Ricken T, Dahmen U, Dirsch O (2010) A biphasic model for sinusoidal liver perfusion remodeling after outflow obstruction. Biomech Model Mechanobiol 9:435–450Google Scholar
46. Ricken T, Werner D, Holzhütter HG, König M, Dahmen U, Dirsch O (2014) Modeling function-perfusion behavior in liver lobules including tissue, blood, glucose, lactate and glycogen by use of a coupled two-scale PDE-ODE approach. Biomech Model Mechanobiol 14(3):515–536Google Scholar
47. Riegler T, Nejabat M, Eichner J, Stiebellehner M, Subosits S, Bilban M, Zell A, Huber WW, Schulte-Hermann R, Grasl-Kraupp B (2015) Proinflammatory mesenchymal effects of the non-genotoxic hepatocarcinogen phenobarbital: a novel mechanism of antiapoptosis and tumor promotion. Carcinogenesis 36(12):1521–1530Google Scholar
48. Robertson-Tessi M, Gillies RJ, Gatenby RA, Anderson AR (2015) Impact of metabolic heterogeneity on tumor growth, invasion, and treatment outcomes. Cancer Res 75(8):1567–1579.
49. Rohr-Udilova N, Sieghart W, Eferl R, Stoiber D, Björkhem-Bergman L, Eriksson LC, Stolze K, Hayden H, Keppler B, Sagmeister S, Grasl-Kraupp B, Schulte-Hermann R, Peck-Radosavljevic M (2012) Antagonistic effects of selenium and lipid peroxides on growth control in early hepatocellular carcinoma. Hepatology 55(4):1112–1121
50. Satoh K, Yamakawa D, Kasai K, Hayakari M, Uchida K, Miura T (2012) Nonclonal growth of preneoplastic cells positive for glutathione S-transferase P-form in the rat liver. Cancer Sci 103(8):1445–1450
51. Schienbein M, Franke M, Gruler H (1994) Random walk and directed movement: comparison between inert particles and self-organized molecular machines. Phys Rev E 49(6):5462–5471
52. Schliess F, Hoehme S, Henkel S, Ghallab A, Driesch D, Böttger J, Guthke R, Pfaff M, Hengstler JG, Gebhardt R, Häussinger D, Drasdo* D, Zellmer* S (2014) Integrated metabolic spatial-temporal model for the prediction of ammonia detoxification during liver damage and regeneration. Hepatology 60(6):2040–2051Google Scholar
53. Tang J, Enderling H, Becker-Weimann S, Pham C, Polyzos A, Chen CY, Costes SV (2011) Phenotypic transition maps of 3D breast acini obtained by imaging-guided agent-based modeling. Integr Biol 3(4):408–421
54. Vartak N, Damle-Vartak A, Richter B, Dirsch O, Dahmen U, Hammad S, Hengstler JG (2016) Cholestasis-induced adaptive remodeling of interlobular bile ducts. Hepatology 63(3):951–964
55. Vintermyr OK, Døskeland SO (1987) Cell cycle parameters of adult rat hepatocytes in a defined medium. A note on the timing of nucleolar DNA replication. J Cell Physiol 132:12–21Google Scholar
56. Warth A, Muley T, Meister M, Stenzinger A, Thomas M, Schirmacher P, Schnabel PA, Budczies J, Hoffmann H, Weichert W (2012) The novel histologic International Association for the Study of Lung Cancer/American Thoracic Society/European Respiratory Society classification system of lung adenocarcinoma is a stage-independent predictor of survival. J Clin Oncol 30(13):1438–1446Google Scholar
57. Xiaoye SL (2005) An overview of SuperLU: algorithms, implementation, and user interface. ACM Trans Math Softw (TOMS) 31(3):302–325
58. Zou Y, Bao Q, Kumar S, Hu M, Wang G-Y et al (2012) Four waves of hepatocyte proliferation linked with three waves of hepatic fat accumulation during partial hepatectomy-induced liver regeneration. PLoS ONE 7(2):e30675.
## Authors and Affiliations
• Stefan Hoehme
• 1
• Francois Bertaux
• 2
• 3
• 4
• William Weens
• 2
• 3
• Bettina Grasl-Kraupp
• 5
• Jan G. Hengstler
• 6
• Dirk Drasdo
• 2
• 3
• 6
• 7
1. 1.Institute of Computer ScienceUniversity of LeipzigLeipzigGermany
2. 2.INRIA de ParisParisFrance
3. 3.Laboratoire Jacques-Louis LionsSorbonne Universités, UPMC Univ. Paris 6ParisFrance
4. 4.Department of Mathematics, Faculty of Natural SciencesImperial College LondonLondonUK
5. 5.Department of Medicine I, Division: Institute of Cancer Research, Comprehensive Cancer Center ViennaMedical University of ViennaViennaAustria
6. 6.Leibniz Research Centre for Working Environment and Human Factors (IfADo)DortmundGermany
7. 7.Interdisciplinary Center for BioinformaticsUniversity of LeipzigLeipzigGermany | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8723403215408325, "perplexity": 3706.8807805626834}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-39/segments/1537267159744.52/warc/CC-MAIN-20180923193039-20180923213439-00321.warc.gz"} |
http://www.birs.ca/events/2011/5-day-workshops/11w5137 | # Cluster algebras, representation theory, and Poisson geometry (11w5137)
Arriving in Banff, Alberta Sunday, September 4 and departing Friday September 9, 2011
## Organizers
Thomas Brüstle (Bishop's University and Université de Sherbrooke)
Michael Shapiro (Michigan State University)
(University of New Brunswick)
## Objectives
Origins of Cluster Algebras
Cluster algebras where conceived in spring 2000 by S. Fomin and A. Zelevinsky [FZ02a] as a tool for studying dual canonical bases and total positivity in semisimple Lie groups. They are constructively defined commutative algebras with a distinguished set of generators (cluster variables) grouped into overlapping subsets (clusters) of fixed cardinality. They have the unusual feature that both the generators and the relations among them are not given from the outset, but are produced by an elementary iterative process of seed mutation. This procedure appears counter-intuitive at first, but it seems to encode a somehow universal phenomenon which might explain the explosive development of this topic. Indeed, by now close connections to Poisson geometry, Teichmueller theory, representation theory of finite dimensional associative algebras and Lie theory and Coxeter groups have been discovered. The theory of cluster algebras was further developed in the subsequent papers [FZ02b, FZ03, BFZ05, BZ05, FZ07, DWZ08, DWZ09]. Remarkably, in the last two paper of this series super potentials borrowed from mathematical physics play a prominent role.
Much of this research has been conducted by first rate mathematicians like A. Goncharov, B. Keller, M. Kontsevich, B. Leclerc, H. Nakajima, I. Reiten, C.M. Ringel.
Teichmueller Theory
Fock and Goncharov introduced in the seminal paper [FG06b] higher Teichmueller theory as a fusion of the classical theory with representation theory by an algebraic geometry approach, opening completely new perspectives. Somehow Gekhtman, Shapiro and Vainshtein put forth in [GSV03] and [GSV05] a similar program. Basic ingredients of the emerging theory include explicit coordinate descriptions of the the appropriate decorated Teichmueller space (an idea which goes back to W. Thurston [T80] and R. Penner [P87]), and the concept of of total positivity in Lie theory which originated in the work of G. Lusztig [L94, L98]. In [FG06b, FG03] it was shown that the A and X versions of the Teichmueller and lamination spaces can be obtained as the positive real and tropical points of certain cluster A- and X-varieties, the putative spectra of cluster algebras.
These ideas motivated S. Fomin, M. Shapiro and D. Thurston to develop in [FST09] systematically the theory of cluster algebras associated to triangulated surfaces. This last paper sparked even before its publication quite some research into various descriptions. For example Labardini [L09] started to associate to the cluster algebras from that paper quiver potentials. The combinatorial research of several authors on the positivity of cluster expansions for this class of algebras culminated recently in a complete answer [MSW09]. And, based on [L09] in [ABCP09] the connection to the representation theory of (tame) gentle algebras was made.
Quantum Teichmueller spaces were constructed independently by Chekhov and Fock [CF99] and by Kashaev [K98], they are also linked to cluster algebras and varieties [G07, FG09]. In [T04] a conjecture of Verlinde is further discussed, namely that the mapping class group acts on the quantum Teichmueller space in the same way as on conformal blocks of the Liouville conformal field theory.
The relation between Poisson geometry and cluster structures in double Bruhat cells (for Lie groups and their flag varieties) were further investigated by K. Brown, K. Goodearl and M. Yakimov [BGY06,WY07] and by Kogan and Zelevinsky [KZ02].
As a result of these developments, cluster theory becomes enriched by new examples as well as new features such as duality (see also [FZ07]), Poisson structure and quantization (see also [GSV03,FG06a]) and relations to algebraic $K$-theory and the dilogarithm.
References
[ABCP09] I. Assem, Th. Bruestle, G. Charbonneau-Jodoin, and P.G. Plamondon, Gentle algebras arising from surface triangulations, 37 pages, 2009, arXiv:0903.3347v2 [math.RT]
[BFZ05] A. Berenstein, S. Fomin, and A. Zelevinsky, Cluster algebras. III. Upper bounds and double Bruhat cells, Duke Math. J. 126 (2005), no. 1, 1-52.
[BZ05] A. Berenstein and A. Zelevinsky, Quantum cluster algebras, Adv. Math. 195 (2005), no. 2, 405-455.
[BGY06] K. A. Brown, K. R. Goodearl, and M. Yakimov, Poisson structures on affine spaces and flag varieties. I. Matrix affine Poisson space, Adv. Math. 206 (2006), no. 2, 567-629.
[CF99] L. O. Chekhov and V. V. Fock, Quantum Teichmueller spaces, Teoret. Mat. Fiz. 120 (1999), no. 3, 511-528, arXiv: math/9908165 [math.QA].
[DWZ08] H. Derksen, J. Weyman, and A. Zelevinsky, Quivers with potentials and their representations. I. Mutations, Selecta Math. (N.S.) 14 (2008), no. 1, 59-119.
[DWZ09] ----, Quivers with potentials and their representations II: Applications to cluster algebras, 44 pages, 2009, arXiv:0904.0676v1 [math.RA].
[FG03] V. Fock and A Goncharov, Cluster ensembles, quantization and the dilogarithm, 69 pages, arXiv:math/0311245 [math.AG].
[FG06a] ----, Cluster X-varieties, amalgamation and Poisson-Lie groups, Algebraic geometry and number theory, Progr. Math., vol. 253, Birkhaeuser Boston, Boston, MA, 2006, Volume dedicated to V. Drinfeld, pp. 27-68.
[FG06b] ----, Moduli spaces of local systems and higher Teichmueller theory, Publ. Math. Inst. Hautes Etudes Sci. (2006), no. 103, 1-211.
[FG09] ----, The quantum dilogarithm and representations of quantum cluster varieties, Invent. Math. 175 (2009), no. 2, 223-286.
[FST09] S. Fomin, M. Shapiro, and D. Thurston, Cluster algebras and triangulated surfaces. Part I: Cluster complexes., Acta Math. 201 (2008), no. 1, 83-146.
[FZ02a] S. Fomin and A. Zelevinsky, Cluster algebras. I. Foundations, J. Amer. Math. Soc. 15 (2002), no. 2, 497-529 (electronic).
[FZ02b] ----, The Laurent phenomenon, Adv. in Appl. Math. 28 (2002), no. 2, 119-144.
[FZ03] ----, Cluster algebras. II. Finite type classification, Invent. Math. 154 (2003), no. 1, 63-121.
[FZ07] ----, Cluster algebras. IV. Coefficients, Compos. Math. 143 (2007), no. 1, 112-164.
[GSV03] M. Gekhtman, M. Shapiro, and A. Vainshtein, Cluster algebras and Poisson geometry, Mosc. Math. J. 3 (2003), no. 3, 899-934, 1199, Dedicated to Vladimir Igorevich Arnold on the occasion of his 65th birthday.
[GSV05] ----, Cluster algebras and Weil-Petersson forms, Duke Math. J. 127 (2005), no. 2, 291-311.
[G07] A. Goncharov, Pentagon relation for the quantum dilogarithm and quantized M(0,5)cyc, to appear in Progress in Mathematics volume (Birkhauser) dedicated to the memory of Alexander Reznikov, arXiv/0704.405v2 [math.QA].
[K98] R. M. Kashaev, Quantization of Teichmueller spaces and the quantum dilogarithm, Lett. Math. Phys. 43 (1998), no. 2, 105-115, arXiv:math/9706018 [math.QA].
[KZ02] M. Kogan and A. Zelevinsky, On symplectic leaves and integrable systems in standard complex semisimple Poisson-Lie groups, Int. Math. Res. Not. (2002), no. 32, 1685-1702.
[L09] D. Labardini-Fragoso, Quivers with potentials associated to triangulated surfaces, Proc. Lond. Math. Soc. (3) 98 (2009), no. 3, 797-839, arXiv:0803.1328v3.
[L94] G. Lusztig, Total positivity in reductive groups, Lie theory and geometry, Progr. Math., vol. 123, Birkhaeuser Boston, Boston, MA, 1994, pp. 531-568.
[L98] ----, Introduction to total positivity, Positivity in Lie theory: open problems, de Gruyter Exp. Math., vol. 26, de Gruyter, Berlin, 1998, pp. 133-145.
[MSW] G. Musiker, R. Schiffler, and L. Williams, Positivity for cluster algebras from surfaces, 67 pages, 2009, arXiv:0906.0748v1 [math.CO].
[P87] R. C. Penner, The decorated Teichmueller space of punctured surfaces, Comm. Math. Phys. 113 (1987), no. 2, 299-339.
[T04] J. Teschner, On the relation between quantum Liouville theory and the quantized Teichmueller spaces, Proceedings of 6th International Workshop on Conformal Field Theory and Integrable Models, vol. 19, 2004, pp. 459-477.
[T80] W. Thurston, The geometry and topology of three-manifolds, Princeton University notes, http://www.msri.org/publications/books/gt3m.
[WY07] Ben Webster and Milen Yakimov, A Deodhar-type stratification on the double flag variety, Transform. Groups 12 (2007), no. 4, 769-785. | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7085920572280884, "perplexity": 1768.587436722884}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-11/segments/1424936463606.79/warc/CC-MAIN-20150226074103-00315-ip-10-28-5-156.ec2.internal.warc.gz"} |
https://physics.stackexchange.com/users/56553/dave?tab=questions | Dave
# 12 Questions
4
14
3
5k
views
8
6
2
1k
views
8
5
1
184
views
5
2
1
482
views
2
1
105
views
1
2
1
113
views
1
vote
1
188
views
1
vote
2
123
views
0
1
77
views
0
0
590
views
### Does the Shockley Diode Equation hold in a dynamic circuit?
Sep 15 '14 at 19:58 Qmechanic 113k
3
-1
1
151
views
-4 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5652875900268555, "perplexity": 7128.913223034761}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-35/segments/1566027331228.13/warc/CC-MAIN-20190826064622-20190826090622-00110.warc.gz"} |