url
stringlengths 14
2.42k
| text
stringlengths 100
1.02M
| date
stringlengths 19
19
| metadata
stringlengths 1.06k
1.1k
|
---|---|---|---|
https://zbmath.org/?q=an%3A1190.65075 | # zbMATH — the first resource for mathematics
The classification and the computation of the zeros of quaternionic, two-sided polynomials. (English) Zbl 1190.65075
The quaternionic polynomials of the two-side type
$p(z):=\sum_{j=0}^n a_j z^j b_j, \quad z,a_j,b_j \in \mathbb{H}, \quad a_0b_0 \neq 0, a_n b_n \neq 0,$ where $$\mathbb{H}$$ is the skew field of quaternions are treated. It is shown that there are three more classes of zeros defined by the rank of a certain real $$(4\times 4)$$ matrix. This information can be used to find all zeros in the same class if only one zero in that class is known. The essential tool is the description of the polynomial $$p$$ by a matrix equation $$P(z):=\mathbf{A}(z)+B(z)$$, where $$\mathbf{A}(z)$$ is a real $$(4 \times 4)$$ matrix determined by the coefficients of the given polynomial $$p$$ and $$P, z, B$$ are real column vectors with four rows. The Newton method is applied to $$P(z)=0$$. There are various examples in the paper.
##### MSC:
65H04 Numerical computation of roots of polynomial equations 11R52 Quaternion and other division algebras: arithmetic, zeta functions 12E15 Skew fields, division rings 12Y05 Computational aspects of field theory and polynomials (MSC2010)
Full Text:
##### References:
[1] Aramanovitch L.I.: Quaternion non-linear filter for estimation of rotating body attitude. Math. Methods Appl. Sci. 18, 1239–1255 (1995) · Zbl 0841.93060 · doi:10.1002/mma.1670181504 [2] Eilenberg S., Niven I.: The ”Fundamental Theorem of Algebra” for quaternions. Bull. Am. Math. Soc. 50, 246–248 (1944) · Zbl 0063.01228 · doi:10.1090/S0002-9904-1944-08125-1 [3] Gentili G., Struppa D.C.: On the multiplicity of zeros of polynomials with quaternionic coefficients. Milan J. Math. 76, 1–10 (2007) [4] Gentili G., Struppa D.C., Vlacci F.: The fundamental theorem of algebra for Hamilton and Cayley numbers. Math. Z. 259, 895–902 (2008) · Zbl 1144.30004 · doi:10.1007/s00209-007-0254-9 [5] Gordon B., Motzkin T.S.: On the zeros of polynomials over division rings. Trans. Am. Math. Soc. 116, 218–226 (1965) · Zbl 0141.03002 · doi:10.1090/S0002-9947-1965-0195853-2 [6] Gürlebeck K., Sprössig W.: Quaternionic and Clifford Calculus for Physicists and Engineers, pp. 371. Wiley, Chichester (1997) · Zbl 0897.30023 [7] Horn R.A., Johnson C.R.: Matrix Analysis, pp. 561. Cambridge University Press, Cambridge (1992) [8] Janovská, D., Opfer, G.: A note on the computation of all zeros of simple quaternionic polynomials. SIAM J. Numer. Anal. (2009, to appear) · Zbl 1247.65060 [9] Janovská D., Opfer G.: Linear equations in quaternionic variables. Mitt. Math. Ges. Hamburg 27, 223–234 (2008) · Zbl 1179.11042 [10] Janovská D., Opfer G.: Givens’ transformation applied to quaternion valued vectors. BIT 43(Suppl.), 991–1002 (2003) · Zbl 1052.65030 · doi:10.1023/B:BITN.0000014561.58141.2c [11] Lam T.Y.: A first course in noncommutative rings, 2nd edn, pp. 385. Springer, New York (2001) · Zbl 0980.16001 [12] De Leo S., Ducati G., Leonardi V.: Zeros of unilateral quaternionic polynomials. Electron. J. Linear Algebra 15, 297–313 (2006) · Zbl 1151.15303 [13] Niven I.: Equations in quaternions. Am. Math. Monthly 48, 654–661 (1941) · Zbl 0060.08002 · doi:10.2307/2303304 [14] Opfer G.: Polynomials and Vandermonde matrices over the field of quaternions. Electron. Trans. Numer. Anal. 36, 9–16 (2009) · Zbl 1196.11154 [15] Pogorui A., Shapiro M.: On the structure of the set of zeros of quaternionic polynomials. Complex Var. Elliptic Funct. 49, 379–389 (2004) · Zbl 1160.30353 · doi:10.1080/0278107042000220276 [16] Pumplün S., Walcher S.: On the zeros of polynomials over quaternions. Comm. Algebra 30, 4007–4018 (2002) · Zbl 1024.12002 · doi:10.1081/AGB-120005832 [17] Serôdio R., Pereira E., Vitória J.: Computing the zeros of quaternionic polynomials. Comput. Math. Appl. 42, 1229–1237 (2001) · Zbl 1050.30037 · doi:10.1016/S0898-1221(01)00235-8 [18] van der Waerden, B.L.: Algebra I, 5. Aufl., 292 p. Springer, Berlin (1960) · Zbl 0087.25903
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching. | 2021-05-08 04:37: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.6010898947715759, "perplexity": 2956.7818841963763}, "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-21/segments/1620243988837.67/warc/CC-MAIN-20210508031423-20210508061423-00236.warc.gz"} |
https://www.albert.io/ie/act-math/largest-ratio | Free Version
Difficult
# Largest Ratio
ACTMAT-T1OEIL
Refer to the following graph:
Which of the following exams had the highest ratio of females to males in 2013?
A
$\text{Art History}$
B
$\text{European History}$
C
$\text{Calculus 2}$
D
$\text{Computer Science}$
E
$\text{Physics 1}$ | 2017-02-24 15:00:24 | {"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.6775693893432617, "perplexity": 10485.88911021992}, "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-09/segments/1487501171620.77/warc/CC-MAIN-20170219104611-00183-ip-10-171-10-108.ec2.internal.warc.gz"} |
https://studydaddy.com/question/bus-475-week-3-dqs | QUESTION
# BUS 475 Week 3 DQs
This paperwork of BUS 475 Week 3 Discussion Questions shows the solutions to the following problems:
DQ 1: Enlist different types of strategies? Explain the differences among these strategies?
Which strategy is best suited to your organization how will you decide?
DQ 2: Explain strategic objectives and its purposes? How does a strategic objective become effective? Give examples of strategic objectives for your organization or a similar organization.
DQ 3: Explain the difference among strategic objectives, long-term objectives and short-term objectives? How are objectives and goals related? Give example of this relationship.
DQ 4: Define corporate governance? What is its role in strategic planning and how is it important? Illustrate your answer with an example.
• @
Tutor has posted answer for $5.19. See answer's preview$5.19 | 2018-05-26 04:10:10 | {"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.22232070565223694, "perplexity": 5604.071012181785}, "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-22/segments/1526794867309.73/warc/CC-MAIN-20180526033945-20180526053945-00043.warc.gz"} |
https://dergipark.org.tr/tr/pub/estubtda/issue/50600/649075 | | | | |
## SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS
#### Ömer AYDIN [1] , Zafer DEMİR [2]
The growing world population and fossil fuel reserves have been aimed at alternative searches as energy sources due to a decreasing curve. The rate of formation of Fossil fuels does not exhibit a parallel formation of the amount of consumption according to the years. Nowadays, no matter how many alternative suggestions are revealed, there is no way to choose them yet. Despite the use of fossil fuels such as coal, oil and natural gas in energy production, the rapid depletion of these resources has increased the direction of us to renewable energy sources. The key advantage of renewable energy sources is the ability to create a hybrid system with other energy sources. Hybrid systems allow the combined use of different energy sources and the integration of renewable energy sources into the existing system. This study provides examples of hybrid renewable energy systems and information on how to integrate into existing systems. One of the most important applications to increase the use of renewable energy resources is the systems that are used together with different energy sources and are called hybrids. Today, it has become mandatory to analyze various working conditions as well as in large power systems of renewable energy-induced hybrid systems that are widely used.
Hybrid systems, renewable energy, energy sources
• [1] O Singh, S Rajput. Mathematical Modelling and Simulation of Solar Photovoltaic Array System. RAINS-2016. 978-1-4673-8819-8.
• [2] Gonzalez FD, Sumper A, Bellmunt OG, Robles RV, A review of energy storage technologies for wind power applications, Renewable and Sustainable Energy Reviews, 2012-16/4: 2154-2171.
• [3] Hatata AY, Osman G, Aladl MM, An optimization method for sizing a solar/wind/battery hybrid power system based on the artificial immune system, Elsevier Sustainable Energy Technologies and Assesments, 2018 Vol:27:83-93.
• [4] Bilal O, Sambou V, Ndiaye PA, Kebe CMF, Ndongo M., Optimal design of a hybrid solar–wind battery system using the minimization of the annualized cost system and the minimization of the loss of power supply probability, Elsevier Renewable Energy, 2010 Vol:35: 2388-2390.
• [5] Md. Ibrahim, Abul Khair, Shaheer Ansari, A Review of Hybrid Renewable Energy Systems for Electric Power Generation, Int. Journal of Engineering Research and Applications ISSN: 2248-9622, Vol. 5, Issue 8, (Part – 1) August 2015, pp.42-48.
• [6] Ahsan Shahid, Member IEEE, Smart Grid Integration of Renewable Energy Systems, 7th International Conference on Renewable Energy Research and Applications, Paris, France, Oct. 14-17, 2018, DOI: 10.1109/ICRERA.2018.8566827.
• [7] Shahid, A., “A cyber-physical approach for stochastic hybrid control and safety verification of smart grids”, IEEE PES Innovative Smart Grid Technologies (ISGT), Asia, 2014.
• [8] Behçet Kocaman, The Technologies of Energy Storage on Smart Grids and Microgrids, Bitlis Eren Üniveristesi Fen Bilimleri Dergisi, 2(1), 119-127, 2013
Birincil Dil en Mühendislik Makaleler Orcid: 0000-0002-2921-0373Yazar: Ömer AYDIN (Sorumlu Yazar)Kurum: Eskişehir Teknik ÜniversitesiÜlke: Turkey Orcid: 0000-0003-2736-0797Yazar: Zafer DEMİR Kurum: Eskişehir Teknik ÜniversitesiÜlke: Turkey Yayımlanma Tarihi : 16 Aralık 2019
Bibtex @araştırma makalesi { estubtda649075, journal = {Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering}, issn = {2667-4211}, address = {[email protected]}, publisher = {Eskişehir Teknik Üniversitesi}, year = {2019}, volume = {20}, pages = {120 - 131}, doi = {10.18038/estubtda.649075}, title = {SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS}, key = {cite}, author = {Aydın, Ömer and Demi̇r, Zafer} } APA Aydın, Ö , Demi̇r, Z . (2019). SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS . Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering , 20 () , 120-131 . DOI: 10.18038/estubtda.649075 MLA Aydın, Ö , Demi̇r, Z . "SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS" . Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering 20 (2019 ): 120-131 Chicago Aydın, Ö , Demi̇r, Z . "SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS". Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering 20 (2019 ): 120-131 RIS TY - JOUR T1 - SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS AU - Ömer Aydın , Zafer Demi̇r Y1 - 2019 PY - 2019 N1 - doi: 10.18038/estubtda.649075 DO - 10.18038/estubtda.649075 T2 - Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering JF - Journal JO - JOR SP - 120 EP - 131 VL - 20 IS - SN - 2667-4211- M3 - doi: 10.18038/estubtda.649075 UR - https://doi.org/10.18038/estubtda.649075 Y2 - 2019 ER - EndNote %0 Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS %A Ömer Aydın , Zafer Demi̇r %T SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS %D 2019 %J Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering %P 2667-4211- %V 20 %N %R doi: 10.18038/estubtda.649075 %U 10.18038/estubtda.649075 ISNAD Aydın, Ömer , Demi̇r, Zafer . "SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS". Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering 20 / (Aralık 2019): 120-131 . https://doi.org/10.18038/estubtda.649075 AMA Aydın Ö , Demi̇r Z . SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS. Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering. 2019; 20: 120-131. Vancouver Aydın Ö , Demi̇r Z . SMART GRID INTEGRETED WITH HYBRID RENEWABLE ENERGY SYSTEMS. Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering. 2019; 20: 120-131.
Makalenin Yazarları | 2020-09-26 10:40:22 | {"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.3898635804653168, "perplexity": 8274.731621853904}, "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/1600400241093.64/warc/CC-MAIN-20200926102645-20200926132645-00529.warc.gz"} |
https://socratic.org/questions/how-do-you-graph-the-system-of-linear-inequalities-x-7-y-10-and-x-y | # How do you graph the system of linear inequalities x>=-7, y<10 and x<y?
Dec 19, 2017
Three solution graphs are available under Explanation
#### Explanation:
We are given three inequality expressions
$\textcolor{red}{x \ge - 7}$
Graph of this inequality is below:
Next we will consider the inequality:
$\textcolor{red}{y < 10}$
Graph of this inequality is below:
Next we will consider the inequality:
$\textcolor{red}{x < y}$
Graph of this inequality is below: | 2020-03-30 10:45:17 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 3, "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.7664995193481445, "perplexity": 3604.6027937314225}, "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/1585370496901.28/warc/CC-MAIN-20200330085157-20200330115157-00458.warc.gz"} |
https://support.bioconductor.org/p/80348/ | Search
Question: Gviz: Plot only exons?
2
2.4 years ago by
Is there an easy way to plot only exons, not introns? Consider:
gr <- GenomicRanges::GRanges(17, IRanges(start = c(5,20,30,50), end = c(10,25,40,60)))
mcols(gr)$transcript <- "test" tr <- Gviz::GeneRegionTrack(gr) Gviz::plotTracks(tr) Which plots this: How could I plot this without the introns? With the exons "smacked together", so to speak? I was imagining something like this: Gviz::plotTracks( tr, ranges = gr ) ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by stianlagstad90 1 2.4 years ago by stianlagstad90 stianlagstad90 wrote: For others that might be interested, I solved this by shifting all exons to the left. A full example: gr <- GenomicRanges::GRanges(17, IRanges(start = c(5,20,30,50), end = c(10,25,40,60))) mcols(gr)$transcript <- "test"
tr <- Gviz::GeneRegionTrack(gr)
Gviz::plotTracks(tr)
This produces the plot in my original question:
Now let's remove spaces between exons:
# Move the first exon down to position 1, and then remove the spaces between all the others. Effectively pushing all exons to the leftmost edge.
for (i in 1:length(gr)) {
if (i == 1) {
gr[i] <- IRanges::shift(gr[i], shift = 1-start(gr[i]))
} else {
shiftDownBy <- -(start(gr[i])-end(gr[i-1]))+1
gr[i] <- IRanges::shift(gr[i], shift = shiftDownBy)
}
}
tr <- Gviz::GeneRegionTrack(gr)
Gviz::plotTracks(tr)
This produces the following plot:
Hey, I just want to comment a convenient way to do this, for anyone who might look at it. It can be done with:
exon <- exonsBy(TxDb.Hsapiens.UCSC.hg19.knownGene, 'tx')[42]
exon_mapped <- GenomicFeatures::mapToTranscripts(exon[[1]],exon)
And this is just the intended transformation of the exons.
exon
GRangesList object of length 1:
\$42
GRanges object with 13 ranges and 3 metadata columns:
seqnames ranges strand | exon_id exon_name exon_rank
<Rle> <IRanges> <Rle> | <integer> <character> <integer>
[1] chr1 [861302, 861393] + | 36 <NA> 1
[2] chr1 [865535, 865716] + | 37 <NA> 2
[3] chr1 [866419, 866469] + | 38 <NA> 3
[4] chr1 [871152, 871276] + | 39 <NA> 4
[5] chr1 [874420, 874509] + | 42 <NA> 5
... ... ... ... . ... ... ...
[9] chr1 [877790, 877868] + | 51 <NA> 9
[10] chr1 [877939, 878438] + | 53 <NA> 10
[11] chr1 [878633, 878757] + | 54 <NA> 11
[12] chr1 [879078, 879188] + | 55 <NA> 12
[13] chr1 [879288, 879961] + | 58 <NA> 13
-------
seqinfo: 93 sequences (1 circular) from hg19 genome
exon_mapped
GRanges object with 13 ranges and 2 metadata columns:
seqnames ranges strand | xHits transcriptsHits
<Rle> <IRanges> <Rle> | <integer> <integer>
[1] 42 [ 1, 92] + | 1 1
[2] 42 [ 93, 274] + | 2 1
[3] 42 [275, 325] + | 3 1
[4] 42 [326, 450] + | 4 1
[5] 42 [451, 540] + | 5 1
... ... ... ... . ... ...
[9] 42 [ 930, 1008] + | 9 1
[10] 42 [1009, 1508] + | 10 1
[11] 42 [1509, 1633] + | 11 1
[12] 42 [1634, 1744] + | 12 1
[13] 42 [1745, 2418] + | 13 1
-------
seqinfo: 1 sequence from an unspecified genome; no seqlengths
1
2.4 years ago by
Switzerland
That is not possible since it would essentially imply a non-continuous x axis. One of the fundamental concepts of Gviz is that every track shares the same x axis of genomic coordinates. You are asking for a plot along transcript coordinates.
0
2.4 years ago by
Switzerland
Please take a look at section 4.5 in the vignette. The parameter you want to look at is called collapseTranscripts.
Florian
I'm sorry, I mean "smacked together" horizontally, not vertically. As if there were no spaces in between the exons in my example plot. Is that possible? Maybe this can help explain: drawing.
My end goal is a plot of the transcript (but only exons) with coverage, using GeneRegionTrack and AlignmentsTrack. | 2018-08-20 13:19:58 | {"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.43317756056785583, "perplexity": 12685.32728453662}, "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-34/segments/1534221216453.52/warc/CC-MAIN-20180820121228-20180820141228-00122.warc.gz"} |
http://tex.stackexchange.com/questions/142856/how-to-put-data-labels-next-to-the-text-labels-in-a-bar-plot-2nd-edition | # How to put data labels next to the text labels in a bar plot? (2nd edition)
I had asked an earlier question How to put data labels next to the text labels in a bar plot?. While the solution provided worked for the specific input data values in that example, when I tried to use adapt the solution for different input data values, I get errors.
When I try to compile the following code:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ytick={1,2,3},
yticklabels={Optimized Prices,Current Prices,
No Promotions},
xbar,
xlabel=Profit,
nodes near coords, nodes near coords align={horizontal},
% begin new bit
visualization depends on=x \as \rawx,
every node near coord/.append style={
shift={(axis direction cs:-\rawx+0.8,0)}}
% end new bit
]
x y
1000 3
1100 2
1200 1
};
\end{axis}
\end{tikzpicture}
\end{document}
I get the error
! Package PGF Math Error: Could not parse input '-1000.0000000+0.8' as a floati
ng point number, sorry. The unreadable part was near '+0.8'..
See the PGF Math package documentation for explanation.
Type H <return> for immediate help.
...
l.26 \end{axis}
If I delete the +0.8, and compile the following code:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ytick={1,2,3},
yticklabels={Optimized Prices,Current Prices,
No Promotions},
xbar,
xlabel=Profit,
nodes near coords, nodes near coords align={horizontal},
% begin new bit
visualization depends on=x \as \rawx,
every node near coord/.append style={
shift={(axis direction cs:-\rawx,0)}}
% end new bit
]
x y
1000 3
1100 2
1200 1
};
\end{axis}
\end{tikzpicture}
\end{document}
I get the output below:
What is wrong with the above code? I understand that I have shifted the text labels by the wrong length, but how do I specify the right length?
-
The 0.8 is a little small- it worked well in the previous example because of the scaling. If you make it more in line with the current scaling (e.g 800), it might get better. Perhaps one of the gurus has a robust general method that trumps my somewhat-manual approach.... – cmhughes Nov 7 '13 at 20:03
When you do shift={(axis direction cs:-\rawx,0)} you shift the node to x = 0. However, in your case the axis starts at about x = 980, so the nodes end up 980 axis units left of the axis. The shift you need to do is xmin - \rawx, which will be the length of the individual xbar. You can access xmin with \pgfkeysvalueof{/pgfplots/xmin}, so the needed shift is
shift={(axis direction cs:\pgfkeysvalueof{/pgfplots/xmin}-\rawx,0)}}
(The first bar is too short to fit the text, you could for example set xmin=900 to make them a bit longer.)
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ytick={1,2,3},
yticklabels={Optimized Prices,Current Prices,
No Promotions},
xbar,
xlabel=Profit,
nodes near coords, nodes near coords align={horizontal},
% begin new bit
visualization depends on=x \as \rawx,
every node near coord/.append style={
font=\tiny,
shift={(axis direction cs:\pgfkeysvalueof{/pgfplots/xmin}-\rawx,0)}}
% end new bit
] | 2015-05-24 03:28:58 | {"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.7799881100654602, "perplexity": 4160.122035867196}, "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/1432207927824.81/warc/CC-MAIN-20150521113207-00007-ip-10-180-206-219.ec2.internal.warc.gz"} |
https://encyclopediaofmath.org/wiki/Lie_algebroid | # Lie algebroid
Lie algebroids were first introduced and studied by J. Pradines [a11], following work by Ch. Ehresmann and P. Libermann on differentiable groupoids (later called Lie groupoids). Just as Lie algebras are the infinitesimal objects of Lie groups, Lie algebroids are the infinitesimal objects of Lie groupoids (cf. also Lie group). They are generalizations of both Lie algebras and tangent vector bundles (cf. also Lie algebra; Vector bundle; Tangent bundle). For a comprehensive treatment and lists of references, see [a8], [a9]. See also [a1], [a4], [a6], [a13], [a14].
A real Lie algebroid $( A , [ \cdot , \cdot ] _ { A } , q _ { A } )$ is a smooth real vector bundle $A$ over a base $M$, with a real Lie algebra structure $[ . ,. ]_A$ on the vector space $\Gamma ( A )$ of smooth global sections of $A$, and a morphism of vector bundles $q _ { A } : A \rightarrow T M$, where $T M$ is the tangent bundle of $M$, called the anchor, such that
$[ X , f Y ] _ { A } = f [ X , Y ] _ { A } + ( q _ { A } ( X ) . f ) Y$, for all $X , Y \in \Gamma ( A )$ and $f \in C ^ { \infty } ( M )$;
$q_ { A }$ defines a Lie algebra homomorphism from the Lie algebra of sections of $A$, with Lie bracket $[ . ,. ]_A$, into the Lie algebra of vector fields on $M$. Complex Lie algebroid structures [a1] on complex vector bundles over real bases can be defined similarly, replacing the tangent bundle of the base by the complexified tangent bundle.
The space of sections of a Lie algebroid is a Lie–Rinehart algebra, also called a Lie $d$-ring or a Lie pseudo-algebra. (See [a4], [a6], [a9].) More precisely, it is a $( k , \mathcal A )$-Lie algebra, where $k$ is the field of real (or complex) numbers and $\mathcal{A}$ is the algebra of functions on the base manifold. In fact, the Lie–Rinehart algebras are the algebraic counterparts of the Lie algebroids, just as the modules over a ring are the algebraic counterparts of the vector bundles.
### Examples.
1) A Lie algebroid over a one-point set, with the zero anchor, is a Lie algebra.
2) The tangent bundle $T M$ of a manifold $M$, with as bracket the Lie bracket of vector fields and with as anchor the identity of $T M$, is a Lie algebroid over $M$. Any integrable sub-bundle of $T M$, in particular the tangent bundle along the leaves of a foliation, is also a Lie algebroid.
3) A vector bundle with a smoothly varying Lie algebra structure on the fibres (in particular, a Lie-algebra bundle [a8]) is a Lie algebroid, with pointwise bracket of sections and zero anchor.
4) If $M$ is a Poisson manifold, then the cotangent bundle $T ^ { * } M$ of $M$ is, in a natural way, a Lie algebroid over $M$. The anchor is the mapping $P ^ { \sharp } : T ^ { * } M \rightarrow T M$ defined by the Poisson bivector $P$. The Lie bracket $[ . ,. ]_P$ of differential $1$-forms satisfies $[ d f , d g ] _ { P } = d \{ f , g \} _ { P }$, for any functions $f , g \in C ^ { \infty } ( M )$, where $\{ f , g \} _ { P } = P ( d f , d g )$ is the Poisson bracket (cf. Poisson brackets) of functions, defined by $P$. When $P$ is non-degenerate, $M$ is a symplectic manifold (cf. also Symplectic structure) and this Lie algebra structure of $\Gamma ( T ^ { * } M )$ is isomorphic to that of $\Gamma ( T M )$. For references to the early occurrences of this bracket, which seems to have first appeared in [a3], see [a4], [a6] and [a13]. It was shown in [a2] that $[ . ,. ]_P$ is a Lie algebroid bracket on $T ^ { * } M$.
5) The Lie algebroid of a Lie groupoid $( \mathcal{G}, \alpha , \beta )$, where $\alpha$ is the source mapping and $\beta$ is the target mapping [a11], [a8], [a13]. It is defined as the normal bundle along the base of the groupoid, whose sections can be identified with the right-invariant, $\alpha$-vertical vector fields. The bracket is induced by the Lie bracket of vector fields on the groupoid, and the anchor is $T \beta$.
6) The Atiyah sequence. If $P$ is a principal bundle with structure group $G$, base $M$ and projection $p$, the $G$-invariant vector fields on $P$ are the sections of a vector bundle with base $M$, denoted by $T P / G$, and sometimes called the Atiyah bundle of the principal bundle $P$. This vector bundle is a Lie algebroid, with bracket induced by the Lie bracket of vector fields on $P$, and with surjective anchor induced by $T _ { p }$. The kernel of the anchor is the adjoint bundle, $( P \times \mathfrak g ) / G$. Splittings of the anchor are connections on $P$ (cf. also Connection). The Atiyah bundle of $P$ is the Lie algebroid of the Ehresmann gauge groupoid $( P \times P ) / G$. If $P$ is the frame bundle of a vector bundle $E$, then the sections of the Atiyah bundle of $P$ are the covariant differential operators on $E$, in the sense of [a8].
7) Other examples are: the trivial Lie algebroids $TM \times \mathfrak{g}$; the transformation Lie algebroids $M \times \mathfrak { g } \rightarrow M$, where the Lie algebra $\frak g$ acts on the manifold $M$; the deformation Lie algebroid $A \times \mathbf{R}$ of a Lie algebroid $A$, where $A \times \{ \hbar \}$, for $\hbar \neq 0$, is isomorphic to $A$, and $A \times \{ 0 \}$ is isomorphic to the vector bundle $A$ with the Abelian Lie algebroid structure (zero bracket and zero anchor); the prolongation Lie algebroids of a Lie algebroid, etc.
### de Rham differential.
Given any Lie algebroid $A$, a differential $d _ { A }$ is defined on the graded algebra of sections of the exterior algebra of the dual vector bundle, $\Gamma ( \wedge A ^ { * } )$, called the de Rham differential of $A$. Then $\Gamma ( \wedge A ^ { * } )$ can be considered as the algebra of functions on a super-manifold, $d _ { A }$ being an odd vector field with square zero [a12].
If $A$ is a Lie algebra $\frak g$, then $d _ { A }$ is the Chevalley–Eilenberg cohomology operator on $\wedge ( \mathfrak { g } ^ { * } )$.
If $A = T M$, then $d _ { A }$ is the usual de Rham differential on forms.
If $A = T ^ { * } M$ is the cotangent bundle of a Poisson manifold, then $d _ { A }$ is the Lichnerowicz–Poisson differential $[ P , . ] _ { A }$ on fields of multi-vectors on $M$.
### Schouten algebra.
Given any Lie algebroid $A$, there is a Gerstenhaber algebra structure (see Poisson algebra), denoted by $[ . ,. ]_A$, on the graded algebra of sections of the exterior algebra of the vector bundle $A$, $\Gamma ( \wedge A )$. With this graded Lie bracket, $\Gamma ( \wedge A )$ is called the Schouten algebra of $A$.
If $A$ is a Lie algebra $\frak g$, then $[ . ,. ]_A$ is the algebraic Schouten bracket on $\wedge \mathfrak{g}$.
If $A = T M$, then $[ . ,. ]_A$ is the usual Schouten bracket of fields of multi-vectors on $M$.
If $A = T ^ { * } M$ is the cotangent bundle of a Poisson manifold, then $[ . ,. ]_A$ is the Koszul bracket [a7], [a13], [a5] of differential forms.
### Morphisms of Lie algebroids and the linear Poisson structure on the dual.
A base-preserving morphism from a Lie algebroid $A _ { 1 }$ to a Lie algebroid $A _ { 2 }$, over the same base $M$, is a base-preserving vector-bundle morphism, $\mu : A _ { 1 } \rightarrow A _ { 2 }$, such that $q _ { A_ { 2 } } \circ \mu = q _ { A _ { 1 } }$, inducing a Lie-algebra morphism from $\Gamma ( A _ { 1 } )$ to $\Gamma ( A _ { 2 } )$.
If $A$ is a Lie algebroid, the dual vector bundle $A ^ { * }$ is a Poisson vector bundle. This means that the total space of $A ^ { * }$ has a Poisson structure such that the Poisson brackets of two functions which are linear on the fibres is linear on the fibres. A base-preserving morphism from a vector bundle $A _ { 1 }$ to a vector bundle $A _ { 2 }$ is a morphism of Lie algebroids if and only if its transpose is a Poisson morphism.
## Lie bi-algebroids.
These are pairs of Lie algebroids $( A , A ^ { * } )$ in duality satisfying the compatibility condition that $d _ { A } *$ be a derivation of the graded Lie bracket $[ . ,. ]_A$ [a10], [a5]. They generalize the Lie bi-algebras in the sense of V.G. Drinfel'd (see Quantum groups and Poisson Lie group) and also the pair $( T M , T ^ { * } M )$, where $M$ is a Poisson manifold.
There is no analogue to Lie's third theorem (cf. also Lie theorem) in the case of Lie algebroids, since not every Lie algebroid can be integrated to a global Lie groupoid, although there are local versions of this result. (See [a8], [a1].)
#### References
[a1] A. Cannas da Silva, A. Weinstein, "Geometric models for noncommutative algebras" , Berkeley Math. Lecture Notes , 10 , Amer. Math. Soc. (1999) Zbl 1135.58300 [a2] A. Coste, P. Dazord, A. Weinstein, "Groupoïdes symplectiques" Publ. Dép. Math. Univ. Claude Bernard, Lyon I , 2A (1987) pp. 1–62 MR0996653 Zbl 0668.58017 [a3] B. Fuchssteiner, "The Lie algebra structure of degenerate Hamiltonian and bi-Hamiltonian systems" Prog. Theor. Phys. , 68 (1982) pp. 1082–1104 MR0688120 Zbl 1098.37540 [a4] J. Huebschmann, "Poisson cohomology and quantization" J. Reine Angew. Math. , 408 (1990) pp. 57–113 MR1058984 Zbl 0699.53037 [a5] Y. Kosmann-Schwarzbach, "Exact Gerstenhaber algebras and Lie bialgebroids" Acta Applic. Math. , 41 (1995) pp. 153–165 Zbl 0837.17014 [a6] Y. Kosmann-Schwarzbach, F. Magri, "Poisson–Nijenhuis structures" Ann. Inst. H. Poincaré Phys. Theor. , 53 (1990) pp. 35–81 MR1077465 Zbl 0707.58048 [a7] J.-L. Koszul, "Crochet de Schouten–Nijenhuis et cohomologie" Astérisque, Hors Sér. (1985) pp. 257–271 MR0837203 Zbl 0615.58029 [a8] K. Mackenzie, "Lie groupoids and Lie algebroids in differential geometry" , Cambridge Univ. Press (1987) MR0896907 Zbl 0683.53029 [a9] K. Mackenzie, "Lie algebroids and Lie pseudoalgebras" Bull. London Math. Soc. , 27 (1995) pp. 97–147 MR1325261 Zbl 0829.22001 [a10] K. Mackenzie, P. Xu, "Lie bialgebroids and Poisson groupoids" Duke Math. J. , 73 (1994) pp. 415–452 MR1262213 Zbl 0844.22005 [a11] J. Pradines, "Théorie de Lie pour les groupoïdes différentiables. Calcul différentiel dans la catégorie des groupoïdes infinitésimaux" C.R. Acad. Sci. Paris , 264 A (1967) pp. 245–248 MR0216409 Zbl 0154.21704 [a12] A. Vaintrob, "Lie algebroids and homological vector fields" Russian Math. Surveys , 52 (1997) pp. 428–429 MR1480150 Zbl 0955.58017 [a13] I. Vaisman, "Lectures on the geometry of Poisson manifolds" , Birkhäuser (1994) MR1269545 Zbl 0810.53019 [a14] A. Weinstein, "Poisson geometry" Diff. Geom. Appl. , 9 (1998) pp. 213–238 MR1636305 Zbl 0930.37032
How to Cite This Entry:
Lie algebroid. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Lie_algebroid&oldid=50099
This article was adapted from an original article by Yvette Kosmann-Schwarzbach (originator), which appeared in Encyclopedia of Mathematics - ISBN 1402006098. See original article | 2020-07-12 02:57: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": 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.9475135803222656, "perplexity": 428.3633800003677}, "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/1593657129517.82/warc/CC-MAIN-20200712015556-20200712045556-00205.warc.gz"} |
https://tex.stackexchange.com/questions/125676/key-that-takes-a-list-of-other-keys-as-argument-and-sets-them | # Key that takes a list of other keys as argument and sets them
I would like to define a key, let's call it mystyle, which has several subkeys, like mystyle/A and mystyle/B, and I'd like to be able to choose which of these subkeys to set by calling mystyle=A, mystyle=B, or mystyle={A,B}.
That's easy enough if I need to set just one of the subkeys, it can be accomplished using something like this:
\tikzset{
mystyle/A/.style=draw,
mystyle/B/.style={fill=yellow},
mystyle/.style={
mystyle/#1
}
}
That allows me to say \tikz \node [mystyle={B}] {Test};, and the node will be filled in yellow. However, if I try \tikz \node [mystyle={A,B}] {Test};, I get the error I do not know the key '/tikz/B'.
I tried defining the keys as follows instead
\tikzset{
mystyle/A/.style=draw,
mystyle/B/.style={fill=yellow},
mystyle/.style={
mystyle/.cd,
#1
}
}
However, this doesn't work, because while the change of key directory (mystyle/.cd) fixed the problem of pgfkeys not being able to find mystyle/B, I now get the following error message: I do not know the key '/tikz/mystyle/draw'.
What to do?
MWE:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikzset{
mystyle/A/.style=draw,
mystyle/B/.style={fill=yellow},
mystyle/.style={
mystyle/.cd,
#1
}
}
\tikz \node [mystyle={A,B}] {Test};
\end{document}
How does a .style handler work? It is basically a .code handler (as everything is in the end anyway), the code that is saved is \pgfkeysalso{#1}.
The style A expands to \pgfkeysalso{draw} and B to \pgfkeysalso{fill=yelow}.
The manual says for \pgfkeysalso:
This command has execatly the same effect as \pgfkeys, only the default path is not modified before or after the keys are being set.
The “default path” is the one you’re on currently (with \tikzset this is /tikz). The .cd handler however changes this default path to /tikz/mystyle. A key that uses \pgfkeysalso then tries to find draw and fill in this path and fails.
The rather complex handler .search also installs a .unknown code that tries to use unrecognized keys to apply in the given paths. (In a similar way do /pgf keys work in /tikz.) percusse already uses this in his solution and it is probably the most convenient approach.
The problem though is that you must use those keys only in the /tikz/mystyle path. You can’t use them in other paths without setting the default path to /tikz or /tikz/mystyle. For example you can’t do \pgfkeys{/tikz/mystyle/A} because as the key is not called from the /tikz/mystyle path the installed .search also won’t be checked. This may seem as an unrealistic example (and it probably is) but for other styles that do not change the properties of the whole path like for example insert path this is important as a key containing such styles may be used anywhere to set exactly those properties.
The most robust way would be to save the styles with /tikz (and you know they are used as /tikz key and nothing else):
\tikzset{
mystyle/A/.style=/tikz/draw,
mystyle/B/.style={/tikz/fill=yellow}
}
If you want the styles to behave as if they would be used in the default /tikz path you could use a .tikz handler that saves the key as a \tikzset (as opposed to a \pgfkeysalso). A simple definition like
\pgfkeys{/handlers/.tikz/.code=%
\pgfkeys{\pgfkeyscurrentpath/.code=\tikzset{#1}}}
makes it possible to use it as
\tikzset{
mystyle/A/.tikz={draw},
mystyle/B/.tikz={fill=yellow}}
In a way, this is also my solution for the mystyle switch key.
Again, a mystyle/.cd (which also only work if the previous path was /tikz) changes the path even for keys you would want to use after mystyle={A,B}. While those are most likely again /tikz keys they don’t need to be. You could have used /tikz/mystyle={A,B} from any PGF keys path without wanting to go back to /tikz. Similar to a .tikz handler I would define the mystyle key as:
\tikzset{
mystyle/A/.tikz={draw},
mystyle/B/.tikz={fill=yellow},
mystyle/.code=\pgfqkeys{/tikz/mystyle}{#1}
}
The manual even says to \pgfkeysalso that “[c]hanging the default path inside a \pgfkeyalso is dangerous, so use with care”.
Similar solutions are used by TikZ naturally, for example the decoration key (which is actually a /pgf key):
\pgfkeys{%
/pgf/decoration/.code={\pgfkeys{/pgf/decoration/.cd,#1}}}
This for example makes it possible to use decoration={<something>} from \pgfset (e.g. the /pgf path) and also from \tikzset without the restraint to go back to /pgf or /tikz. (It would be save though to go back to /tikz as /pgf is searched from there anyway but for a pure pgf solution this would fail.)
## Code
\documentclass[tikz,convert=false]{standalone}
\pgfkeys{/handlers/.tikz/.code=%
\pgfkeys{\pgfkeyscurrentpath/.code=\tikzset{#1}}}
\tikzset{
mystyle/A/.tikz={draw},
mystyle/B/.tikz={fill=yellow},
mystyle/.code=\pgfqkeys{/tikz/mystyle}{#1}
}
\begin{document}
\begin{tikzpicture}
\node [mystyle={A,B}] {Test};
\end{tikzpicture}
\end{document}
Another solution you might be interested in is the following.
This avoids changing the default path and relies on using mystyle={…} when the default path is /tikz. You can know say /.style={</tikz options>} and use mystyle={…} without using an additional handler, the need to specify /tikz somehow and somewhere. All it needs is an auxiliary key to use with a /.list. (Or you specify the /.list in your code directly while using your original definition (mystyle/.style={mystyle/#1}): mystyle/.list={A,B}.
Though, if you know that the keys you use are TikZ keys, save them as such (with /.tikz or /tikz/).
## Code
\documentclass[tikz,convert=false]{standalone}
\tikzset{
mystyle/A/.style={draw},
mystyle/B/.style={fill=yellow},
mystyle/.style={@mystyle/.list={#1}},
@mystyle/.style={/tikz/mystyle/#1}% auxiliary
}
\begin{document}
\begin{tikzpicture}
\node [mystyle={A,B}] {Test};
\end{tikzpicture}
\end{document}
• Excellent, this really clears up a lot of things! The .list approach especially will come in very handy. Thank you! – Jake Jul 28 '13 at 2:55
• \pgfkeys{/tikz/mystyle/A} shouldn't be used anyway by design. or you explicitly change directory otherwise you will have problems with insert path too. For those there is an additional filter mechanism is given. Otherwise that would cause more trouble than it solves. – percusse Jul 29 '13 at 8:07
You can declare alternative locations to look for the unknown keys via /.search also handler. This is also done occasionally in pgfplots code to collect TikZ based keys for paths (though it has a full-blown handler config in action).
\documentclass[tikz]{standalone}
\tikzset{
mystyle/A/.style={draw},
mystyle/B/.style={fill=yellow},
mystyle/.search also={/tikz,/pgf},
mystyle/.style={
mystyle/.cd,
#1,
/tikz/.cd
}
}
\begin{document}
\begin{tikzpicture}
\node [mystyle={A,B}] {Test};
\end{tikzpicture}
\end{document} | 2020-01-24 16:22:59 | {"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.7175977230072021, "perplexity": 2506.8860692700755}, "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-05/segments/1579250624328.55/warc/CC-MAIN-20200124161014-20200124190014-00041.warc.gz"} |
https://www.tutorialspoint.com/direct-form-ii-realization-of-continuous-time-systems | # Direct Form-II Realization of Continuous-Time Systems
## Realization of Continuous-Time System
Realisation of a continuous-time LTI system means obtaining a network corresponding to the differential equation or transfer function of the system.
The transfer function of the system can be realised either by using integrators or differentiators. Due to certain drawbacks, the differentiators are not used to realise the practical systems. Therefore, only integrators are used for the realization of continuous-time systems. The adder and multipliers are other two elements which are used realise the continuous-time systems.
## Direct Form-II Realization of CT Systems
The advantage of the direct form-II realization of continuous-time systems is that it uses minimum number of integrators. In this realization structure, an intermediate variable is integrated, instead of using the separate integrators for integrating the input and output variables separately.
The direct form-II realization of continuous-time systems is explained in the following example −
## Numerical Example
Using the direct form-II, realise the continuous-time LTI system described by the following transfer function.
$$\mathrm{\mathit{H\left ( s \right )\mathrm{\,=\,}\frac{Y\left ( s \right )}{X\left ( s \right )}\mathrm{\,=\,}\frac{s^{\mathrm{2}}\mathrm{\,+\,}\mathrm{2}s\mathrm{\,+\,}\mathrm{3}}{s^{\mathrm{2}}\mathrm{\,+\,}\mathrm{2}s\mathrm{\,+\,}\mathrm{5}}}}$$
### Solution
The given function is to be expressed in the negative powers of s as −
$$\mathrm{\mathit{H\left ( s \right )\mathrm{\,=\,}\frac{Y\left ( s \right )}{X\left ( s \right )}\mathrm{\,=\,}\frac{s^{\mathrm{2}}\mathrm{\,+\,}\mathrm{2}s\mathrm{\,+\,}\mathrm{3}}{s^{\mathrm{2}}\mathrm{\,+\,}\mathrm{2}s\mathrm{\,+\,}\mathrm{5}}\mathrm{\,=\,}\frac{\mathrm{1}\mathrm{\,+\,}\mathrm{2}s^{\mathrm{-1}}\mathrm{\,+\,}\mathrm{3}s^{\mathrm{-2}}}{\mathrm{1}\mathrm{\,+\,}\mathrm{2}s^{\mathrm{-1}}\mathrm{\,+\,}\mathrm{5}s^{\mathrm{-2}}} }}$$
Let A(s) = 1, then decomposing the given transfer function into two parts as −
$$\mathrm{\mathit{H\left ( s \right )\mathrm{\,=\,}\frac{Y\left ( s \right )}{X\left ( s \right )}\mathrm{\,=\,}\frac{Y\left ( s \right )}{A\left ( s \right )}\frac{A\left ( s \right )}{X\left ( s \right )}}}$$
Where,
$$\mathrm{\mathit{\frac{Y\left ( s \right )}{A\left ( s \right )}\mathrm{\,=\,}\mathrm{1}\mathrm{\,+\,}\mathrm{2}s^{\mathrm{-1}}\mathrm{\,+\,}\mathrm{3}s^{\mathrm{-2}}\; \; \; \cdot \cdot \cdot \left ( \mathrm{1} \right )}}$$
And
$$\mathrm{\mathit{\frac{A\left ( s \right )}{X\left ( s \right )}\mathrm{\,=\,}\frac{\mathrm{1}}{\mathrm{1}\mathrm{\,+\,}\mathrm{2}s^{\mathrm{-1}}\mathrm{\,+\,}\mathrm{5}s^{\mathrm{-2}}}\; \; \; \cdot \cdot \cdot \left ( \mathrm{2} \right )}}$$
Cross multiplying the eq. (1) & eq. (2), we get,
From eq. (1),
$$\mathrm{\mathit{Y\left ( s \right )\mathrm{\,=\,}A\left ( s \right )\mathrm{\,+\,}\mathrm{2}s^{\mathrm{-1}}A\left ( s \right )\mathrm{\,+\,}\mathrm{3}s^{\mathrm{-2}}A\left ( s \right )}}$$
And from eq. (2),
$$\mathrm{\mathit{X\left ( s \right )\mathrm{\,=\,}A\left ( s \right )\mathrm{\,+\,}\mathrm{2}s^{\mathrm{-1}}A\left ( s \right )\mathrm{\,+\,}\mathrm{5}s^{\mathrm{-2}}A\left ( s \right )}}$$
$$\mathrm{\mathit{\Rightarrow A\left ( s \right )\mathrm{\,=\,}X\left ( s \right )-\mathrm{2}s^{\mathrm{-1}}A\left ( s \right )-\mathrm{5}s^{\mathrm{-2}}A\left ( s \right )}}$$
Therefore, the above transfer function can be realised as follows −
### Step 1
Realising A(s) as −
### Step 2
Realising Y(s) as −
### Step 3
By combining the above two realisations, we get the direct form-II realisation of the transfer function H(s) as − | 2023-03-26 06:59:10 | {"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.7820680141448975, "perplexity": 1722.5063970249937}, "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/1679296945433.92/warc/CC-MAIN-20230326044821-20230326074821-00385.warc.gz"} |
https://mathzsolution.com/can-1818-consecutive-integers-be-separated-into-two-groupssuch-that-their-product-is-equal/ | # Can 1818 consecutive integers be separated into two groups,such that their product is equal?
Can $18$ consecutive positive integers be separated into two groups, such that their product is equal? We cannot leave out any number and neither we can take any number more than once.
My work:
When the smallest number is not $17$ or its multiple, there cannot exist any such arrangement as $17$ is a prime.
When the smallest number is a multiple of $17$ but not of $13$ or $11$, then no such arrangement exists.
But what happens, when the smallest number is a multiple of $17$ and $13$ or $11$ or both?
This is impossible.
At most one of the integers can be divisible by $19$. If there is such an integer, then one group will contain it and the other one will not. The first product is then divisible by $19$ whereas the second is not (since $19$ is prime) — a contradiction.
So if this possible, the remainders of the numbers after division by $19$ must be precisely $1,2,3,\cdots,18$.
Now let $x$ be the product of the numbers in one of the groups. Then
$x^2 \equiv 18! \equiv -1 \pmod{19}$
by Wilson’s Theorem. However $-1$ is not a quadratic residue mod $19$, because the only possible squares mod $19$ are $1,4,9,16,6,17,11,7,5$. | 2023-02-04 01:42:52 | {"extraction_info": {"found_math": true, "script_math_tex": 20, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.6901256442070007, "perplexity": 127.43714035954851}, "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-06/segments/1674764500080.82/warc/CC-MAIN-20230204012622-20230204042622-00141.warc.gz"} |
https://doc.sagemath.org/html/en/reference/spkg/suitesparse.html | # suitesparse: A suite of sparse matrix software#
SuiteSparse is a collection of software to deal with sparse matrix. It is hosted at http://faculty.cse.tamu.edu/davis/suitesparse.html
This spkg does a minimal install of suitesparse disabling the following
• metis
• GraphBLAS (need cmake)
• Mongoose (need cmake)
An external metis package can be used but we just disable its use.
Patches:
• The first patch disable the building of package using cmake.
• The second patch make sure we use sage’s blas/lapack on OS X. By default suitesparse discard any configurations to use the accelerate framework.
The building of metis is diabled by passing MY_METIS_LIB=none to make (any value would have done) We also configure cholmod so it doesn’t require metis by passing CHOLMOD_CONFIG=-DNPARTITION to make.
Other configurations are self explanatory.
License: because SuiteSparse is a collection, it comes with a variety of licenses. Find below a copy of the “LICENSES.txt” shipped with SuiteSparse.
Availability:
http://www.suitesparse.com
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of the organizations to which the authors are affiliated, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BTF, Copyright (C) 2004-2013, University of Florida by Timothy A. Davis and Ekanathan Palamadai. BTF is also available under other licenses; contact authors for details. http://www.suitesparse.com
BTF is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
BTF is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CAMD, Copyright (c) by Timothy A. Davis, Yanqing Chen, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. CAMD is available under alternate licenses, contact T. Davis for details.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of the organizations to which the authors are affiliated, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Availability:
http://www.suitesparse.com
CCOLAMD: constrained column approximate minimum degree ordering Copyright (C) 2005-2016, Univ. of Florida. Authors: Timothy A. Davis, Sivasankaran Rajamanickam, and Stefan Larimore. Closely based on COLAMD by Davis, Stefan Larimore, in collaboration with Esmond Ng, and John Gilbert. http://www.suitesparse.com
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of the organizations to which the authors are affiliated, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
CHOLMOD/Check Module. Copyright (C) 2005-2006, Timothy A. Davis CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Check module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CHOLMOD/Cholesky module, Copyright (C) 2005-2006, Timothy A. Davis. CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Cholesky module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CHOLMOD/Core Module. Copyright (C) 2005-2006, Univ. of Florida. Author: Timothy A. Davis. CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Core module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CHOLMOD/Demo Module. Copyright (C) 2005-2006, Timothy A. Davis. CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Demo module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
CHOLMOD/Include/* files. Copyright (C) 2005-2006, either Univ. of Florida or T. Davis, depending on the file.
Each file is licensed separately, according to the Module for which it contains definitions and prototypes:
Include/cholmod.h LGPL Include/cholmod_blas.h LGPL Include/cholmod_camd.h part of Partition module Include/cholmod_check.h part of Check module Include/cholmod_cholesky.h part of Cholesky module Include/cholmod_complexity.h LGPL Include/cholmod_config.h LGPL Include/cholmod_core.h part of Core module Include/cholmod_function.h no license; freely usable, no restrictions Include/cholmod_gpu.h part of GPU module Include/cholmod_gpu_kernels.h part of GPU module Include/cholmod_internal.h LGPL Include/cholmod_io64.h LGPL Include/cholmod_matrixops.h part of MatrixOps module Include/cholmod_modify.h part of Modify module Include/cholmod_partition.h part of Partition module Include/cholmod_supernodal.h part of Supernodal module Include/cholmod_template.h LGPL
CHOLMOD/MATLAB Module. Copyright (C) 2005-2006, Timothy A. Davis. CHOLMOD is also available under other licenses; contact authors for details. MATLAB(tm) is a Registered Trademark of The MathWorks, Inc. http://www.suitesparse.com
Note that this license is for the CHOLMOD/MATLAB module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
CHOLMOD/MatrixOps Module. Copyright (C) 2005-2006, Timothy A. Davis. CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/MatrixOps module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
CHOLMOD/Modify Module. Copyright (C) 2005-2006, Timothy A. Davis and William W. Hager. CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Modify module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
CHOLMOD/Partition Module. Copyright (C) 2005-2006, Univ. of Florida. Author: Timothy A. Davis CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Partition module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CHOLMOD/Supernodal Module. Copyright (C) 2005-2006, Timothy A. Davis CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Supernodal module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
CHOLMOD/Tcov Module. Copyright (C) 2005-2006, Timothy A. Davis CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Tcov module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
CHOLMOD/Valgrind Module. Copyright (C) 2005-2006, Timothy A. Davis. CHOLMOD is also available under other licenses; contact authors for details. http://www.suitesparse.com
Note that this license is for the CHOLMOD/Valgrind module only. All CHOLMOD modules are licensed separately.
This Module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This Module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
COLAMD, Copyright 1998-2016, Timothy A. Davis. http://www.suitesparse.com http://www.suitesparse.com
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of the organizations to which the authors are affiliated, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
CSparse: a Concise Sparse matrix package. Copyright (c) 2006, Timothy A. Davis. http://www.suitesparse.com
CSparse is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
CSparse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CXSparse: a Concise Sparse matrix package - Extended. Copyright (c) 2006, Timothy A. Davis. http://www.suitesparse.com
CXSparse is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
CXSparse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CXSparse: a Concise Sparse matrix package - Extended. Copyright (c) 2006, Timothy A. Davis. http://www.suitesparse.com
CXSparse is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
CXSparse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
GPUQREngine Copyright (c) 2013, Timothy A. Davis, Sencer Nuri Yeralan, and Sanjay Ranka. http://www.suitesparse.com
GPUQREngine is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
GPUQREngine is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
KLU, Copyright (C) 2004-2013, University of Florida by Timothy A. Davis and Ekanathan Palamadai. KLU is also available under other licenses; contact authors for details. http://www.suitesparse.com
KLU is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
KLU is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
LDL Copyright (c) 2005-2013 by Timothy A. Davis. LDL is also available under other licenses; contact the author for details. http://www.suitesparse.com
LDL is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
LDL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
All packages are available under alternative licenses. Contact the authors for details.
MATLAB_Tools License, with the exception of SSMULT and SuiteSparseCollection:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of the organizations to which the authors are affiliated, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SuiteSparseCollection is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
SuiteSparseCollection is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
SSMULT, Copyright (c) 2007-2011, Timothy A. Davis, http://www.suitesparse.com.
SSMULT is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
SSMULT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
RBio toolbox. Copyright (C) 2006-2009, Timothy A. Davis RBio is also available under other licenses; contact authors for details. http://www.suitesparse.com
RBio is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
RBio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Your use or distribution of SPQR or any modified version of SPQR implies that you agree to this License.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Permission is hereby granted to use or copy this program under the terms of the GNU GPL, provided that the Copyright, this License, and the Availability of the original version is retained on all copies. User documentation of any code that uses this code or any modified version of this code must cite the Copyright, this License, the Availability note, and “Used by permission.” Permission to modify the code and to distribute modified code is granted, provided the Copyright, this License, and the Availability note are retained, and a notice that the code was modified is included.
Availability:
http://www.suitesparse.com
SuiteSparse_GPURuntime Copyright (c) 2013-2016, Timothy A. Davis, Sencer Nuri Yeralan, and Sanjay Ranka. http://www.suitesparse.com
SuiteSparse_GPURuntime is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
SuiteSparse_GPURuntime is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of the organizations to which the authors are affiliated, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Your use or distribution of UMFPACK or any modified version of UMFPACK implies that you agree to this License.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Permission is hereby granted to use or copy this program under the terms of the GNU GPL, provided that the Copyright, this License, and the Availability of the original version is retained on all copies. User documentation of any code that uses this code or any modified version of this code must cite the Copyright, this License, the Availability note, and “Used by permission.” Permission to modify the code and to distribute modified code is granted, provided the Copyright, this License, and the Availability note are retained, and a notice that the code was modified is included.
Availability:
http://www.suitesparse.com
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of the organizations to which the authors are affiliated, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of the organizations to which the authors are affiliated, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SuiteSparse:GraphBLAS, Copyright 2017, Timothy A. Davis
Licensed under the Apache License, Version 2.0 (the “License”); you may not use SuiteSparse:GraphBLAS except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Mongoose, Copyright 2018, Timothy A. Davis, Scott P. Kolodziej, William W. Hager, S. Nuri Yeralan Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007
standard
## Version Information#
package-version.txt:
5.10.1
## Equivalent System Packages#
arch:
$sudo pacman -S suitesparse conda: $ conda install suitesparse
cygwin:
$apt-cyg install libsuitesparseconfig-devel Debian/Ubuntu: $ sudo apt-get install libsuitesparse-dev
Fedora/Redhat/CentOS:
$sudo yum install suitesparse suitesparse-devel freebsd: $ sudo pkg install math/suitesparse
gentoo:
$sudo emerge sci-libs/amd sci-libs/cholmod sci-libs/suitesparseconfig sci-libs/umfpack homebrew: $ brew install suite-sparse
macports: install the following packages: SuiteSparse
opensuse:
$sudo zypper install suitesparse-devel void: $ sudo xbps-install SuiteSparse-devel
If the system package is installed, ./configure will check whether it can be used. | 2023-03-27 12:55:01 | {"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.41757136583328247, "perplexity": 260.04537585571984}, "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/1679296948632.20/warc/CC-MAIN-20230327123514-20230327153514-00562.warc.gz"} |
http://www.matholympiad.org.bd/forum/viewtopic.php?p=18822 | ## Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
For students upto class 5 (age upto 12)
ahsaf
Posts: 16
Joined: Mon Jan 19, 2015 10:48 pm
### Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
x is a two-digit positive number and y is a three digit positive number
The values of x and y is such that if x is added by y % and if y is subtracted by x %, the result will be the same
How many numbers can be replaced with x or y such that the above statement is true???
[[If I have any problem with my question , please let me know ; I will edit soon]]]
Men are born with the reason to help others.
But I realised they strive to become famous.
asif e elahi
Posts: 183
Joined: Mon Aug 05, 2013 12:36 pm
### Re: Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
ahsaf
Posts: 16
Joined: Mon Jan 19, 2015 10:48 pm
### Re: Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
I didn't understand why are we taking $99$ to prove the problem
Men are born with the reason to help others.
But I realised they strive to become famous.
asif e elahi
Posts: 183
Joined: Mon Aug 05, 2013 12:36 pm
### Re: Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
ahsaf wrote:I didn't understand why are we taking $99$ to prove the problem
Because $x$ has the only value $99$.
Posts: 120
Joined: Sun Jan 28, 2018 11:43 pm
Location: Bhulta, Rupganj, Narayanganj
Contact:
### Re: Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
Solve.
X = 99 and Y = 100
Because,
x*y% = 99*100% = 99 and y*x% = 100*99% = 99
Math is the main inspiration of my life.
samiul_samin
Posts: 999
Joined: Sat Dec 09, 2017 1:32 pm
### Re: Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
Tue Feb 20, 2018 10:54 am
Solve.
X = 99 and Y = 100
Because,
x*y% = 99*100% = 99 and y*x% = 100*99% = 99
Posts: 120
Joined: Sun Jan 28, 2018 11:43 pm
Location: Bhulta, Rupganj, Narayanganj
Contact:
### Re: Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
samiul_samin wrote:
Tue Feb 20, 2018 1:51 pm
Tue Feb 20, 2018 10:54 am
Solve.
X = 99 and Y = 100
Because,
x*y% = 99*100% = 99 and y*x% = 100*99% = 99
Sorry, my answer was wrong. Can you solve this?
Math is the main inspiration of my life.
samiul_samin
Posts: 999
Joined: Sat Dec 09, 2017 1:32 pm
### Re: Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
Solution
Last edited by samiul_samin on Fri Mar 02, 2018 2:56 pm, edited 1 time in total.
Posts: 120
Joined: Sun Jan 28, 2018 11:43 pm
Location: Bhulta, Rupganj, Narayanganj
Contact:
### Re: Divisional Math Olympiad, Dhaka-2016,primary, ques. 7
samiul_samin wrote:
Thu Mar 01, 2018 10:31 pm
Solution
Sorry, you are wrong.
Math is the main inspiration of my life.
samiul_samin
Posts: 999
Joined: Sat Dec 09, 2017 1:32 pm | 2019-07-15 22:50:01 | {"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.7232158184051514, "perplexity": 12152.39049569083}, "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/1563195524254.28/warc/CC-MAIN-20190715215144-20190716001144-00281.warc.gz"} |
https://www.physicsforums.com/threads/limit-problems.786415/ | # Limit Problems
1. Dec 8, 2014
### Astudious
(I have posted this in this section, rather than homework, because I hope to improve my general understanding of methods of finding limits through these problems.)
1: $$\lim_{x\rightarrow0} (\frac{cosec(x)}{x^3} - \frac{sinh(x)}{x^5})$$
I don't really know what to do with this one. I tried differentiating a few times but it doesn't seem to work. Rewrite cosec(x) as sin(x) and then Taylor series, maybe, but I can't get it to work usefully - which terms to neglect and why?
2: $$\lim_{x\rightarrow0} (\int_{x}^{\frac{\pi}{2}} (\frac{ycos(y)-sin(y)}{y^2}) dy)$$
The solution equates this expression to
$$\lim_{x\rightarrow0} (\int_{x}^{\frac{\pi}{2}} (\frac{d}{dy} (\frac{sin(y)}{y})) dy)$$
from which the value of the limit follows easily. But what are the steps to calling these expressions equal?
3: My textbook also notes that the limit is distributive over addition, it shows that lim(f(x)+g(x)) = lim(f(x)) + lim(g(x)) and lim(f(x)*g(x)) = lim(f(x)) * lim(g(x)). It then says that this does not hold if you end up with a 0/0 or infinity/infinity or infinity*0. But even with these exceptions the rules still seem sketchy - can't you end up with infinity-infinity, which is not a valid result? How should I modify the rules to show when it safe to split the limits like this, and when it is not?
2. Dec 8, 2014
### Stephen Tashi
Confusion is understandable. Rules in most calculus books are not written with mathematical precision. They are written as handy guides to working typical exercises.
A definition of the limit $lim_{x\rightarrow a} f(x) = L$ is introduced. Later in the book, other definitions are introduced that also use the terminology "limit" and the notation "lim" such as $\lim_{x\rightarrow \infty} f(x) = L$ and $lim_{x \rightarrow a} f(x) = \infty$ and $lim_{x \rightarrow \infty} f(x) = \infty$ and $lim_{x \rightarrow a} f(x) = -\infty$ etc. The upshot of this is that term "limit" is ambiguous. If you see a statement about "limits", you always have to consider what kind of limits the text is talking about.
For example if there is a question about whether $lim_{x \rightarrow a} f(x)$ exists, you must consider than if $lim_{x \rightarrow a } f(x) = \infty$ then the answer may be "The limit does not exist" because the question might only refer to limits of the type $\lim _{x \rightarrow a} f(x) = L$ for a finite $L$.
When reading a rule like $lim_{x\rightarrow a} (f(x) + g(x)) = lim_{x\rightarrow a} f(x) + \lim_{x\rightarrow a} g(x)$ you have to pay attention to the words that accompany it. (You can't do mathematics just by working with symbols.) A conservative textbook author might use the words "when all the limits involved exist", meaning when all the limits are of the form $lim_{x \rightarrow a} h(x) = L$ with $a$ and $L$ finite. A more daring author might use words that include the cases of other types of limits.
I don't know anyone who has memorized a set of rules broad enough to deal with simple operations on all possible combinations limits, as the term "limit" is variously defined. In spite of the way some instructors enjoin students to think rigorously, the way people deal with combinations in practice is to use intuition. For example if $lim_{x \rightarrow a} f(x)= 2$ and $lim_{x\rightarrow a} g(x) = \infty$ people use intuition to conclude $\lim_{x \rightarrow a} (f(x) + g(x)) = \infty$. If $lim_{x \rightarrow a} f(x)= -\infty$ and $lim_{x\rightarrow a} g(x) = \infty$ people use intuition to conclude they can't predict whats going on with $\lim_{x \rightarrow a} (f(x) + g(x))$ without further analysis.
3. Dec 8, 2014
### Stephen Tashi
I'm not sure what you're asking.
Are you asking the general question:
"If $lim_{x \rightarrow a} \int_x^b f(y)dy = L$ and $g(y) = f(y)$ then what rule tells me
$lim_{x \rightarrow a} \int_x^b g(y)dy = L ?"$ ?
4. Dec 8, 2014
### RUber
For this one, write it in the more simple $\frac{1}{(\sin x) x^3}-\frac{e^{x}-e^{-x}}{2x^5}$
Plugging in $x\to 0$ should not leave much doubt about where this goes.
This step hinges on recognizing the fraction as a derivative of a fraction (quotient rule). $\frac{d}{dy}\frac{\sin y}{y} = \frac{y \cos y - sin y }{y^2}.$
You could end up with infinity minus infinity...if that happens, you should rearrange some terms and see if you can simplify it that way.
L'hopital's rule works well for fractions, but if you are adding and subtracting limits, sometimes you need to use inequalities to show that one is much bigger than the other. If they scale the same way to infinity, you can sometimes recombine the terms and come up with something that looks more reasonable. In general, the rules for splitting limits are based on the idea that the limit exists. When you are not sure if it exists, you can a) assume it does and see what happens, or b) manipulate the expressions first.
5. Dec 8, 2014
### Astudious
Thanks for the help on the other parts.
But I don't see how this rearrangement takes us to the solution - we end up with 1/0-0/0 i.e. infinity minus an undefined number. Don't know where that will go ...
(And the answer actually isn't anything as simple as 0 or infinity anyway ...)
What do you mean by "words that include the cases of other types of limits"?
Is the rule as restricted as you say, that it requires both $a$ and $L$ finite? Would it not hold in all cases where $L$ is finite for both limits? What if L is 0?
I understand the point about intuition but I would like to consider at least a little bit more detail before giving up.
6. Dec 8, 2014
### RUber
For 1) what if you were to write it as $\frac{ \frac{x^2}{\sin x}+e^{-x}-e^x}{x^5}$ Then take 5 derivatives of the top and bottom by L'Hopital's rule to see what is left?
I imagine that you will end up with something like $-\frac{2}{5!}$.
7. Dec 10, 2014
### Stephen Tashi
I mean words like "where $a$ is an extended real number" that would let the rule apply to limits involving $x \rightarrow \infty$ or $x \rightarrow -\infty$. Or words like "where $L_1$ and $L_2$ are both finite or both infinite in the same sense".
Which rule are we talking about? The property "Is finite" applies to a number that is zero. Zero is a finite number.
8. Dec 10, 2014
### vela
Staff Emeritus
Expanding each term as a Taylor series works well here.
$$\frac{\csc x}{x^3} = \frac{1}{x^3\sin x} = \frac{1}{x^4} \cdot \frac{1}{1-\left(\frac{x^2}{3!}-\frac{x^4}{5!}+\cdots\right)} = \cdots$$
9. Dec 10, 2014
### Ray Vickson
For 1, expand both terms in series before taking any limits. We have:
$$\rm{cosec}(x) = \frac{1}{x} + \frac{1}{6}x +\frac{7}{360} x^3+\frac{31}{15120}x^5+\frac{127}{604800}x^7 + O(x^9)$$
and
$$\sinh(x) = x + \frac{1}{6}x^3 + \frac{1}{120}x^5 + \frac{1}{5040}x^7 + O(x^9)$$
so, for small $x \neq 0$ we have
$$\frac{\rm{cosec}(x)}{x^3} - \frac{\sinh(x)}{x^5} = \frac{1}{90} + \frac{1}{540}x^2 + O(x^4)$$
The limit $x \to 0$ is easy to get from this.
To get the first series, write
$$\rm{cosec}(x) = \frac{1}{\sin(x)} = \frac{1}{x(1-y)}, \;\; y = \frac{1}{6}x^2 -\frac{1}{120}x^4 + \frac{1}{5040} x^6 + \cdots$$
and then expand $1/(1-y) =1+ y + y^2 + y^3 + \cdots$ | 2017-11-21 12:45:58 | {"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": 2, "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.8302717804908752, "perplexity": 434.592422312812}, "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-47/segments/1510934806353.62/warc/CC-MAIN-20171121113222-20171121133222-00788.warc.gz"} |
https://www.physicsforums.com/threads/contraction-of-tensors.701999/#post-4448759 | # Contraction of Tensors
Hi all! I've got a short question concerning a minor notational issue about tensor contraction I've run across recently.
Let A be an antisymmetric (0,2)-tensor and S a symmetric (2,0)-tensor.
Then their total contraction is zero: $C_1^1C_2^2\,A \otimes S=0$.
As a proof one simply computes: $A_{ij}S^{ij}=-A_{ji}S^{ji}=-A_{ij}S^{ij}$
When I first saw this, I was a bit confused about the second equality. Of course, a scalar is a symmetric tensor…but is it not an abuse of notation? I mean this seems to run into conflict with the way one handles components of antisymmetric tensors…as for me, for someone who's just got accustomed to the components manipulation machinery, I was disturbed when I saw this. Am I alone?
This is not a big deal…but are there alternatives to expressing stuff like that? Any comments?
George Jones
Staff Emeritus
Gold Member
No, there is no problem. Remember, i and j are dummy summed-over indices, and thus can be relabeled. Is there a problem with
$$-A_{ji}S^{ji}=-A_{\alpha \beta}S^{\alpha \beta}?$$
WannabeNewton
George answered your question but I just wanted to add something else. In the abstract index notation, ##S_{ab}## and ##A_{ab}## are actual tensors; the indices are called "abstract" indices because they simply label the rank 2-tensor in index form-they don't refer to components. In that sense, all the usual algebraic operations you know regarding tensors in the usual index-free formalism can be carried over the abstract index formalism in a natural way (so it has nothing to do with components) e.g. the tensor product of ##S## and ##A## can be written as ##A_{ab}S_{cd}## and the contraction as ##A_{ab}S^{ab}##. So if it helps, you can think of things in terms of the abstract index notation instead of coordinate component indices. See here for more: http://en.wikipedia.org/wiki/Abstract_index_notation
I hope that helps, cheers!
To George:
Aha, ok, if you put it this way then I agree that it becomes a bit less controversial…but still I would then feel inclined to relabel the indices on initial step and then it would actually look all the same, but with relabeled indices. Alright, perhaps I just need a bit more practice in order not to see oddity in things like these. Thanks
To WannabeNewton:
OK, thank you for the info, too. I'll keep it mind.
WannabeNewton
Alright, perhaps I just need a bit more practice in order not to see oddity in things like these.
You should be able to get ample practice with index gymnastics via say proper general relativity texts. Ask away if you want some recommendations or anything. Have fun and good luck!
Chestermiller
Mentor
Hi all! I've got a short question concerning a minor notational issue about tensor contraction I've run across recently.
Let A be an antisymmetric (0,2)-tensor and S a symmetric (2,0)-tensor.
Then their total contraction is zero: $C_1^1C_2^2\,A \otimes S=0$.
As a proof one simply computes: $A_{ij}S^{ij}=-A_{ji}S^{ji}=-A_{ij}S^{ij}$
When I first saw this, I was a bit confused about the second equality. Of course, a scalar is a symmetric tensor…but is it not an abuse of notation? I mean this seems to run into conflict with the way one handles components of antisymmetric tensors…as for me, for someone who's just got accustomed to the components manipulation machinery, I was disturbed when I saw this. Am I alone?
This is not a big deal…but are there alternatives to expressing stuff like that? Any comments?
Your first equality is incorrect. There should be a plus sign rather than a minus sign. The proof should read $A_{ij}S^{ij}=A_{ji}S^{ji}=-A_{ij}S^{ij}$
Chet
WannabeNewton
Your first equality is incorrect. There should be a plus sign rather than a minus sign. The proof should read $A_{ij}S^{ij}=A_{ji}S^{ji}=-A_{ij}S^{ij}$
Chet
What he had was fine and what you have is fine as well. You relabeled the indices first and then used the antisymmetry and symmetry of the respective tensors. He used the antisymmetry and symmetry of the respective tensors first and then relabeled. Relabeling and antisymmetry/symmetry are commutative operations so there's no issue.
Chestermiller
Mentor
What he had was fine and what you have is fine as well. You relabeled the indices first and then used the antisymmetry and symmetry of the respective tensors. He used the antisymmetry and symmetry of the respective tensors first and then relabeled. Relabeling and antisymmetry/symmetry are commutative operations so there's no issue.
Thanks WBN. That's interesting. Another question: Shouldn't the (double) contraction of an arbitrary 2nd order tensor A with another arbitrary 2nd order tensor S, in terms of the covariant components of A and the contravariant components of S, be written as AijSji rather than as AijSij?
WannabeNewton
So what we have before contracting is the tensor ##A_{ab}S^{cd}##. Your first expression says to contract ##b## with ##c## and ##a## with ##d## whereas your second expression says to contract ##a## with ##c## and ##b## with ##d## i.e. ##A_{ab}S^{ba}## vs. ##A_{ab}S^{ab}##. So there is no single (i.e. unique) "choice" of contraction; you have to pick which indices you want to contract over (this is for the arbitrary case).
EDIT: By the way, the first chapter of the following notes on the foundations of general relativity by David Malament has a very thorough coverage of index based (but entirely coordinate free) tensor algebra and tensor calculus: http://www.socsci.uci.edu/~dmalamen/bio/GR.pdf so check them out if you're interested. They are very much in the spirit of Geroch's notes on general relativity. Have fun :)!
Last edited:
Chestermiller
Mentor
So what we have before contracting is the tensor ##A_{ab}S^{cd}##. Your first expression says to contract ##b## with ##c## and ##a## with ##d## whereas your second expression says to contract ##a## with ##c## and ##b## with ##d## i.e. ##A_{ab}S^{ba}## vs. ##A_{ab}S^{ab}##. So there is no single (i.e. unique) "choice" of contraction; you have to pick which indices you want to contract over (this is for the arbitrary case).
EDIT: By the way, the first chapter of the following notes on the foundations of general relativity by David Malament has a very thorough coverage of index based (but entirely coordinate free) tensor algebra and tensor calculus: http://www.socsci.uci.edu/~dmalamen/bio/GR.pdf so check them out if you're interested. They are very much in the spirit of Geroch's notes on general relativity. Have fun :)!
Thanks WBN. I guess I'm biased by my fluid mechanics and rheology experience.
WannabeNewton | 2021-11-27 14:51:55 | {"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.7993465065956116, "perplexity": 963.9487817636242}, "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/1637964358189.36/warc/CC-MAIN-20211127133237-20211127163237-00290.warc.gz"} |
https://www.scienceopen.com/document?vid=35c7634b-b6e7-4260-a88d-6a4019922cce | 46
views
0
recommends
+1 Recommend
0 collections
4
shares
• Record: found
• Abstract: found
• Article: found
Is Open Access
# Estimating $$\eta/s$$ of QCD matter at high baryon densities
Preprint
Bookmark
There is no author summary for this article yet. Authors can add summaries to their articles on ScienceOpen to make them more accessible to a non-specialist audience.
### Abstract
We report on the application of a cascade + viscous hydro + cascade model for heavy ion collisions in the RHIC Beam Energy Scan range, $$\sqrt{s_{\rm NN}}=6.3\dots200$$ GeV. By constraining model parameters to reproduce the data we find that the effective(average) value of the shear viscosity over entropy density ratio $$\eta/s$$ decreases from 0.2 to 0.08 when collision energy grows from $$\sqrt{s_{\rm NN}}\approx7$$ to 39 GeV.
### Most cited references1
• Record: found
### Single-particle distribution in the hydrodynamic and statistical thermodynamic models of multiparticle production
(1974)
Bookmark
### Author and article information
###### Journal
2015-09-24
1509.07351
10.1088/1742-6596/668/1/012063 | 2019-05-25 09:59:59 | {"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.33683347702026367, "perplexity": 5793.90175378643}, "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-22/segments/1558232257939.82/warc/CC-MAIN-20190525084658-20190525110658-00374.warc.gz"} |
http://www.lirmm.fr/~gioan/CG18-CIRM/public/CG18-program.htm | # Combinatorial Geometries 2018: matroids, oriented matroids and applications
## CIRM, Marseille-Luminy, France September, Monday 24 - Friday 28, 2018
Back to the main page
# ABSTRACTS
Monday 24
9hJames OXLEY (Louisiana State University, USA)
A matroid extension result
Let $(A,B)$ be a $3$-separation in a matroid $M$. If $M$ is representable, then, in the underlying projective space, there is a line where the subspaces spanned by $A$ and $B$ meet, and $M$ can be extended by adding elements from this line. In general, Geelen, Gerards, and Whittle proved that $M$ can be extended by an independent set $\{p,q\}$ such that $\{p,q\}$ is in the closure of each of $A$ and $B$. In this extension, each of $p$ and $q$ is freely placed on the line $L$ spanned by $\{p,q\}$. This talk will discuss a result that gives necessary and sufficient conditions under which a fixed element can be placed on $L$.
9h25Csongor CSEHI (Budapest University of Technology and Economics, Hungary)
Sufficient condition for almost irreducibility
A matroid $N$ is almost irreducible if for any decomposition to matroid union $M_1\vee M_2 = N$, $N$ is a series extension of a submatroid of one of the matroids $M_i \in \{M_1,M_2\}$. András Recski have given an equivalent characterization of almost irreducible graphic matroids. We give a sufficient condition of almost irreducibility for arbitrary matroids, using the lemmata of Recski's proof. We show that these results can be applied to some important matroids. As a consequence we are getting closer to the conjecture that the union of graphic matroids is graphic or nonbinary.
9h50Rutger CAMPBELL (University of Waterloo, Canada)
Representable orientable matroids that are not real-representable
For each odd prime power q>3, we construct a GF(q)-representable oriented matroid that is not real-representable.
10h15Anna DE MIER (Universitat Politècnica de Catalunya, Spain)
Approximating clutters with matroids
There are several clutters (antichains of sets) that can be associated with a matroid, as the clutter of circuits, the clutter of bases or the clutter of hyperplanes. We study the following question: given an arbitrary clutter $\Lambda$, which are the matroidal clutters that are closest to $\Lambda$? To answer it we first decide on the meaning of closest, and select one of the different matroidal clutters.
We show that for almost all reasonable choices above there is a finite set of matroidal clutters that approximate $\Lambda$ and, moreover, that $\Lambda$ can be recovered from them by a suitable operation. We also link our work to results in lattice theory, and give algorithmic procedures to compute the approximations. We are also interested in the same questions when we further require that both the original clutter and the matroidal approximations have the same ground set. In this situation, it is often the case that $\Lambda$ cannot be recovered by the approximating matroidal clutters (if they exist), but we can characterize when it does.
Although our initial interest was in matroids, our framework is general and applies in any situation when one wishes to decompose the clutter $\Lambda$ with members of a favourite family of clutters, not necessarily a matroidal one.
(Joint work with Jaume Martí-Farré and José Luis Ruiz. )
11h05Jim LAWRENCE (George Mason University, USA)
The concatenation operation for uniform oriented matroids and simplicial (or simple) polytopes
Some problems connected with the concatenation operation will be described.
11h30Jesus DE LOERA (University of California, Davis, USA)
Tverberg-type theorems with altered (nerves) intersection patterns.
Abstract: The classical Tverberg's theorem says that a set with sufficiently many points in $R^d$ can always be partitioned into m parts so that the (m - 1)-simplex is the (nerve) intersection pattern of the convex hulls of the parts. Our main results demonstrate that Tverberg's theorem is but a special case of a much more general situation. Given sufficiently many points, any tree or cycle, can also be induced by at least one partition of the point set. The proofs require a deep investigation of oriented matroids and order types.
(Joint work with Deborah Oliveros, Tommy Hogan, Dominic Yang (supported by NSF).)
11h55Jürgen BOKOWSKI (Technische Universität Darmstadt, Germany)
From a combinatorial input to a polyhedral realization, Hurwitz's regular map of genus 7
Regular maps describe combinatorially 2-manifolds with a flag-transitive automorphism group. They are in this sense a generalization of the Platonic solids. For an old example of Hurwitz from 1893 the talk presents a polyhedral realization without self-intersections that was found recently in joint work with Michael Cuntz. The remaining question of whether such a realization can be found with some geometric symmetry (joint work with Gábor Gévay) will be discussed.
This talk is related to a problem of "Computational Synthetic Geometry", see LNM 1355, J. Bokowski & B. Sturmfels.
(Joint work with Michael Cuntz, Hannover and Gábor Gévay, Szeged.)
14h30Galen DORPALEN-BARRY (University of Minnesota, USA)
Characteristic polynomials and chambers for cones in hyperplane arrangements
Zaslavsky's theorem counts the chambers of an affine or central hyperplane arrangement using the characteristic polynomial of its intersection semilattice. We examine a generalization that counts chambers within a cone of the arrangement using the semilattice of interior intersections. Particularly interesting is the case of the type A braid arrangement, where these chambers correspond to linear extensions of posets. For certain posets, this connects closely with Foata's theory of permutations of a multiset.
(Joint work with Victor Reiner.)
14h55Anastasia CHAVEZ (University of California, Davis, USA)
Dyck Paths and Positroids from Unit Interval Orders
It is well known that the number of non-isomorphic unit interval orders on $[n]$ equals the $n$-th Catalan number. Using work of Skandera and Reed and work of Postnikov, we show that each unit interval order on $[n]$ naturally induces a rank $n$ positroid on $[2n]$. We call the positroids produced in this fashion \emph{unit interval positroids}. We characterize the unit interval positroids by describing their associated decorated permutations, showing that each one must be a $2n$-cycle encoding a Dyck path of length $2n$. We also give a combinatorial description of the $f$-vectors of unit interval orders.
(This is joint work with Felix Gotti.)
15h20Zur IZHAKIAN (University of Aberdeen, UK)
Supertropical algebra and representations
Tropical mathematics is carried out over idempotent semirings, a weak algebraic structure that on one hand allows descriptions of objects having a discrete nature, but on the other hand, its lack of additive inverse prevents the access to basic mathematical notions. This drawback is overcome by using supertropical semirings whose structure is rich enough to permit a systematic development of algebraic theory, including analogues to many classical results and notions. Supertropical algebra provides a suitable algebraic framework that enables natural realizations of matroids and simplicial complexes, as well as representations of semigroups.
16h05Marcel CELAYA (Georgia Tech, USA)
Polyhedral representations of oriented matroids
What is the right analogue of a tropical linear space in the context of oriented matroids? In this talk I will discuss this question and how it relates to the Folkman-Lawrence Topological Representation Theorem and the Bohne-Dress Theorem. Along the way, I will describe a chirotope-based proof of the Bohne-Dress theorem, generalize McMullen's formula to non-convex zonotopes, and give a combinatorial characterization of the faces (in all dimensions) of the matroid polytope.
16h30Ilda DA SILVA (Universidade de Lisboa, Portugal)
How many cubes are orientable?
A cube is a matroid over $C^n=\{-1,+1\}^n$ that contains as circuits the usual rectangles of the real affine cube packed in such a way that the usual facets and skew-facets are hyperplanes of the matroid.
How many cubes are orientable? So far, only one: the oriented real affine cube. We review the results obtained so far concerning this question. They follow two directions:
1) Identification of general obstructions to orientability in this class. (da Silva, EJC 30 (8), 2009, 1825-1832).
2) (work in collaboration with E. Gioan) Identification of algebraic and geometric properties of recursive families of non-negative integer vectors defining hyperplanes of the real affine cube and the analysis of this question and of las Vergnas cube conjecture in small dimensions.
Tuesday 25
9hNathan BOWLER (Universität Hamburg, Germany)
Representing matroids over hyperfields
I'll explain how to simultaneously generalise the notions of linear subspaces, matroids, valuated matroids, and oriented matroids, as well as phased matroids in the sense of Anderson-Delucchi. All of these can be thought of as matroids represented in a certain sense over hyperfields. In fact, there are (at least) two natural notions of represented matroid in this context, and I will discuss both. I'll give “cryptomorphic” axiom systems for such matroids in terms of circuits, Grassmann-Plücker functions, and dual pairs, and explain some basic duality theorems. I'll also outline an argument that if the hyperfield F is doubly distributive then the two different notions of representation over F coincide.
(Joint work with Matt Baker)
9h45Laura ANDERSON (Binghamton University, SUNY, USA)
Vectors of matroids over hyperfields
This talk will expand on Nathan Bowler's talk on matroids over hyperfields. I will describe vector axioms for matroids over hyperfields. These axioms give a particularly direct way to see matroids over hyperfields as generalizing subspaces of a vector space $F^n$. In the case of oriented matroids, we get new signed vector axioms, equivalent to the usual ones but quite different (and arguably better!) both in appearance and in spirit. For general hyperfields, there are a number of unexpected surprises, and there are many open questions.
10h10Rudi PENDAVINGH (Technische Universiteit Eindhoven, Netherlands)
Matroids over skew hyperfields
Matroids over hyperfields are a common abstraction of oriented matroids and valuated matroids. We show how to generalize the theory of matroids over hyperfields (Baker and Bowler) to matroids over skew hyperfields, and we describe a matroid over a skew hyperfield which arises from an algebraic representation of a matroid.
11h05James DAVIS (Indiana University, USA)
Hyperfield Grassmannians
The Grassmannian of k-planes in $R^n$ is a classical object, useful in topology, geometry, and combinatorics. A hyperfield is a generalization of a field, with multivalued addition. Baker and Bowler have introduced the notion of a matroid over a hyperfield. Examples include the Krasner hyperfield, whose matroids are ordinary matroids, the Sign hyperfield, whose matroids are oriented matroids, and Viro's tropical real hyperfield, which can be used in tropical geometry and is a dequantization of the real number field.
The hyperfield Grassmannian $Gr(k, F^n)$ is the set of all rank k matroids on n elements over a hyperfield F. Laura Anderson and I define the notion of a topological hyperfield and hence give the hyperfield Grassmannian a topology. This talk will give many examples of topological hyperfields, continuous maps between them, and discuss the basic topological, categorical, and combinatorial properties of hyperfield Grassmannians, as well as their connection with realization spaces.
(Joint work with Laura Anderson)
11h50Emanuele DELUCCHI (University of Fribourg, Switzerland)
Realization spaces of matroids over hyperfields
We study realization spaces of matroids over hyperfields. More precisely, given a matroid M and a hyperfield H we determine the space of all H-matroids over M. This can be seen as the matroid stratum of the hyperfield Grassmannians in the sense of Anderson-Davis.
For an algebraically determined class of hyperfields we give different descriptions of these realization spaces (e.g., in terms of Tutte groups or cross-ratios), allowing for explicit computations. When the hyperfield at hand is topological, the realization spaces have a natural topology. In this case, our models carry the corret homeomorphism type.
As applications of our methods we obtain a theorem on the existence of phased matroids that are not realizable over the complex numbers, as well as a result on the diffeomorphism type of complex hyperplane arrangements whose underlying matroid is uniform.
(Joint work with E. Saini and L. Hoessly. Supported by SNSF grant PP00P2-150552/1)
14h30Victor CHEPOI (Université de la Méditerranée, Aix-Marseille II, France)
COMs: Complexes of Oriented Matroids
In this talk we will give a blackboard introduction to Complexes of Oriented Matroids (abbreviated, COMs).
COMs represent a common generalization of Oriented Matroids (OMs) and lopsided sets. These novel structures can be characterized in terms of three covectors axioms, generalizing the familiar characterization for oriented matroids (COMs can be also characterized via their cocircuits). We will describe a binary composition scheme by which every COM can successively be erected as a contractible cell complex whose cells are oriented matroids, in essentially the same way as a lopsided set can be glued together from its maximal hypercube faces. For this, we will define halfspaces, hyperplanes, and carriers of COMs, which arise in the theory of CAT(0) cube complexes, and which turn out to be also COMs.
We will present two examples of COMs: realizable COMs and COMs arising from CAT(0) Coxeter zonotopal complexes. Realizable COMs are represented by hyperplane arrangements restricted to open convex sets. Relaxing realizability to local realizability, we capture a wider class of combinatorial objects: CAT(0) Coxeter zonotopal complexes give rise to locally realizable COMs.
The talk is based on the paper H.-J. Bandelt, V. Chepoi, K. Knauer, COMs: complexes of oriented matroids, J. Combin. Theory Ser. A, 156 (2018), 195–237.
(Joint work with H.-J. Bandelt and K. Knauer. Supported in part by the ANR project TEOMATRO (ANR-10-BLAN-0207).)
15h15Kolja KNAUER (Université Aix-Marseille, France)
Tope graphs of Complexes of Oriented Matroids
We give two graph theoretical characterizations of tope graphs of (complexes of) oriented matroids. The first is in terms of excluded partial cube minors, the second is that all antipodal subgraphs are gated.
Corollaries include a characterization of topes of oriented matroids due to da Silva, another one of Handa, a characterization of lopsided systems due to Lawrence, and an intrinsic characterization of tope graphs of affine oriented matroids. Moreover, we obtain purely graph theoretic polynomial time recognition algorithms for tope graphs.
I will try to furthermore give some perspectives on classical problems as Las Vergnas simplex conjecture in terms of Metric Graph Theory.
(Based on joint work with Tilen Marc)
16hArnau PADROL (Sorbonne Université, Paris, France)
Back and forth with Gale duality
Gale duality is a correspondence that relates linear/affine properties of a vector/point configuration with those of its dual configuration. Through it, several results in discrete geometry have a double interpretation. I will review some classical theorems through this double glass. Although not widely known, several point-selection theorems also have such double interpretations, through the closely related theory of type cones. Some colorful theorems also have interpretations in terms of Minkowski sums, when looked from the point of view of Gale transforms of Cayley polytopes.
16h25Michael FALK (Northern Arizona University, USA)
Pairs of topes
The set of pairs of topes of an oriented matroid forms a poset that is homotopy equivalent to the Salvetti poset: their realizations are homotopy equivalent by an order-preserving map with cone fibers. The partial ordering can be interpreted via a notion of "oriented convexity" that may be of interest to (anti-)matroid theorists.
(Joint work with Emanuele Delucchi)
Wednesday 26
9hGoran MALIC (Zagreb School of Economics And Management, Croatia)
Delta-matroids of dessins d'enfants and an action of the absolute Galois group Gal(Q)
NB. The notation Gal(Q) stands for $Gal(\overline{\mathbb Q}/{\mathbb Q})$.
This talk will be an overview of the research carried out in my PhD thesis, supervised by Prof Alexandre Borovik. A dessin d'enfant is a cellular embedding of a connected graph on a closed, connected and orientable surface X. Remarkably, such an embedding induces on X the structure of an algebraic curve defined over the algebraic numbers; therefore there is a natural action of Gal(Q) on the set of dessins d'enfants. A dessin d'enfant also defines a Lagrangian matroid (also known as a delta-matroid) on X and the action of Gal(Q) on a dessin d'enfant changes the matroid by changing the curve. The main goal of my PhD thesis was to make sense of how Gal(Q) interacts with the Lagrangian matroid of a dessin d'enfant, which proved to be very difficult, for the reasons that will be explained in the talk.
If time permits, I will also say something about my ongoing research, joint with Prof Sibylle Schroll, on Brauer Graph Algebras associated to dessins d'enfants and the role of matroids in the representation theory of Brauer Graph Algebras.
9h45Joseph BONIN (The George Washington University, Washington, USA)
Delta-matroids as subsystems of sequences of Higgs lifts
Delta-matroids generalize matroids. In a delta-matroid, the counterparts of bases, which are called feasible sets, can have different sizes, but they satisfy a similar exchange property in which symmetric differences replace set differences. One way to get a delta-matroid is to take a matroid L, a quotient Q of L, and all of the Higgs lifts of Q toward L; the union of the sets of bases of these Higgs lifts is the collection of feasible sets of a delta-matroid, which we call a full Higgs lift delta-matroid.
We give an excluded-minor characterization of full Higgs lift delta-matroids within the class of all delta-matroids. We introduce a class of full Higgs lift delta-matroids that arise from lattice paths and that generalize lattice path matroids. It follows from results of Bouchet that all delta-matroids can be obtained from full Higgs lift delta-matroids by removing certain feasible sets; to address which feasible sets can be removed, we give an excluded-minor characterization of delta-matroids within the more general structure of set systems. This result in turn yields excluded-minor characterizations of a number of related classes of delta-matroids.
(This is joint work with Carolyn Chun and Steve Noble.)
10h10Steven NOBLE (Birkbeck University of London, UK)
Excluded-minor results for vf-safe delta-matroids
Vf-safe delta-matroids are those which remain delta-matroids under a certain duality operation, namely twisted duality, that significantly extends duality in matroids. The class of vf-safe delta-matroids includes the classes of delta-matroids coming from binary matrices and from ribbon graphs. Determining the excluded minors for vf-safe delta-matroids seems to be difficult. We characterize vf-safe matroids using excluded minors. Vf-safe delta-matroids have three natural minor operations and we show that up to twisted duality there is only one excluded minor for the class of vf-safe delta-matroids within set systems under these three minor operations.
(Joint work with Joe Bonin, Carolyn Chun, Irene Pivotto and Gordon Royle)
11h05Spencer BACKMAN (Hebrew University of Jerusalem, Israel)
Geometric Bijections for Regular Matroids, Zonotopes, and Ehrhart Theory
Chip-firing is a simple game on graphs which arises in many different mathematical contexts. There is a group naturally associated to chip-firing which has cardinality equal to the number of spanning trees of a graph, and there exist many different bijections in the literature between these sets. Merino introduced a generalization of chip-firing for regular matroids which retains this enumerative correspondence. I will describe a family of bijections between the elements of the chip-firing group of a regular matroid and its bases via orientations. The proof of bijectivity makes use of the geometry of zonotopes and admits an Ehrhart theoretic interpretation.
(Joint work with Matt Baker and Chi Ho Yuen)
11h30Chi Ho YUEN (Georgia Tech, USA)
More on Geometric Bijections and Circuit-cocircuit Reversal Systems
This is the follow up of Spencer Backman's talk. I will describe a group action-tiling duality for regular matroids, and explain how it relates several seemingly unrelated results. I will also discuss geometric bijections and circuit-cocircuit reversal systems of general oriented matroids; in particular, I will prove the converse of Gioan's result: there are fewer reversal classes than bases whenever the underlying matroid is not regular.
(The talk includes joint works with Spencer Backman and Francisco Santos, and with Emeric Gioan.)
11h55Raman SANYAL (Institut für Mathematik Goethe-Universität Frankfurt, Germany)
Cone valuations, Gram's relation, and zonotopes
The Euler-Poincare formula is a cornerstone of the combinatorial theory of polytopes. It states that the number of faces of various dimensions of a convex polytope satisfy a linear relation and it is the only linear relation (up to scaling). Gram's relation generalizes the fact that the sum of
(interior) angles at the vertices of a convex $n$-gon is $(n-2)\pi$. In dimensions $3$ and up, it is necessary to consider angles at all faces. This gives rise to the interior angle vector of a convex polytope and Gram's relation is the unique linear relation (up to scaling) among its entries. In this talk, we will consider generalizations of angles'' in the form of cone valuations. It turns out that the associated generalized angle vectors still satisfy Gram's relation and that it is the only linear relation, independent of the notion of angle''! To prove such a result, we rely on a very powerful connection to the combinatorics of zonotopes. The interior angle vector of a zonotope is independent of the chosen cone valuation and depends only on the associated lattice of flats. If time permits, we discuss flag-angles as a semi-discrete generalization of flag-vectors and their linear relations.
(Joint work with Spencer Backman, Sebastian Manecke)
Thurday 27
9hGary GORDON and
Liz McMAHON
(Lafayette College, USA)
Generalizations of Crapo's Beta Invariant
Crapo's beta invariant was defined by Henry Crapo in the 1960s. For a matroid $M$, the invariant $\beta(M)$ is the non-negative integer that is the coefficient of the $x$ term of the Tutte polynomial. Crapo proved that $\beta(M)>0$ if and only if $M$ is connected and $M$ is not a loop, and Brylawski proved that $M$ is the matroid of a series-parallel network if and only if $M$ is a co-loop or $\beta(M)=1.$ In this talk, we present several generalizations of the beta invariant to combinatorial structures that are not matroids. We concentrate on posets, chordal graphs, and finite subsets of Euclidean space. In each case, our definition of $\beta$ measures the number of interior'' elements.
9h45Alex FINK (Queen Mary University of London, UK)
Some cryptomorphisms for valuated matroids and matroids over rings
I will present several new characterisations surrounding valuated matroids:
(a) Submodular function axioms for valuated matroids (with Scott Kemp; work in progress).
(b) A characterisation of transversal valuated matroids after Mason (with Jorge Alberto Olarte)
(c) Polyhedron and Plücker-type axioms for matroids over a valuation ring (with Luca Moci). I will of course introduce matroids over a valuation ring first.
(Joint work with Luca Moci,Jorge Alberto Olarte, probably Scott Kemp, )
10h10Hiroshi HIRAI (University of Tokyo, Japan)
Uniform semimodular lattice, valuated matroid, and Euclidean building
In this talk, we present a lattice-theoretic characterization for valuated matroids, which is an extension of the well-known cryptomorphic equivalence between matroids and geometric lattices (= atomistic semimodular lattices). We introduce a class of semimodular lattices, called uniform semimodular lattices, and establish a cryptomorphic equivalence between integer-valued valuated matroids and uniform semimodular lattices. Our result includes a coordinate-free lattice-theoretic characterization of integer points in tropical linear spaces, incorporates the Dress-Terhalle completion process of valuated matroids, and establishes a smooth connection with Euclidean buildings of type A.
(Supported by JSPS KAKENHI Grant Numbers JP17K00029.)
11h05Iain MOFFATT (Royal Holloway University of London, UK)
Tutte polynomials and bialgebras
The Tutte polynomial is one of the most important, and best studied, graph polynomials. It is important not only because it encodes a large amount of combinatorial information about a graph, but also because of its applications to areas such as statistical physics and knot theory. Because of its importance the Tutte polynomial has been extended to various classes of combinatorial object. For some objects there is more than one definition of a "Tutte polynomial", and for others is even unclear what a Tutte polynomial should look like.
Taking as a starting point the deletion-contraction relations for the Tutte polynomial, I'll describe how the Tutte polynomial can be reformulated in a way that does not depend upon graph or matroid specific language. I'll go on to explain how this gives rise to a canonical construction of a Tutte polynomial'' for other types of combinatorial objects that incorporates various extensions of the Tutte polynomial from the literature. Finally, I'll explain how this elementary construction can be understood in terms of bialgebras.
(Includes some joint work with T. Krajewski, S. Huggett, B. Smith, and A. Tanasa)
11h30Luca MOCI (Institut de Mathématiques de Jussieu, Paris, France)
In this talk we expain how several meaningful invariants of combinatorial objects can be extracted from coalgebra or bialgebra structures. The Tutte polynomial is an invariant of graphs well known for the formula which computes it recursively by deleting and contracting edges, and for its universality with respect to similar recurrence.
We generalize this to all classes of combinatorial objects with deletion and contraction operations, associating to each such class a universal Tutte character by a functorial procedure. We show that these invariants satisfy a universal property and convolution formulae similar to the Tutte polynomial. With this machinery we recover classical invariants for arithmetic matroids, knots, polymatroids, delta-matroids, matroid perspectives, relative and colored matroids. We also produce some new invariants along with new convolution formulae.
(Joint work with Clement Dupont and Alex Fink)
14h30Federico ARDILA (San Francisco State University, USA)
The geometry of geometries.
In recent years, the geometric roots of matroid theory have grown much deeper, bearing many new fruits. This talk will survey some recent successes. We will discuss three geometric models of matroids at the intersection of combinatorics, algebra, and geometry. Each has led to the development of intriguing combinatorics and to the solution of long-standing questions.
15h35Karim ADIPRASITO (Hebrew University of Jerusalem, Israel)
Combinatorial Hodge and Lefschetz theory
We will revisit combinatorial Hodge theory for matroids, which established that matroids satisfy deep algebraic principles with several important corollaries. Departing from there, we will construct intersection rings for other, related combinatorial objects, survey what algebraic principles can be proven for them, and discuss applications.
I will focus in particular on cubical complexes and simplicial spheres.
16h20Gaku LIU (Max-Planck-Institut für Mathematik, Germany)
Cubical Pachner moves, generic immersions, and cobordisms
We study various analogues of theorems from PL topology for cubical complexes. In particular, we characterize when two PL homeomorphic cubulations are equivalent by Pachner moves by showing the question to be equivalent to the existence of cobordisms between generic immersions of hypersurfaces. This solves a question and conjecture of Habegger and Funar. The main tool is a theorem to show that any cubical PL decomposition of a disk is regular after some cubical stellar subdivision. This extends a result of Morelli, and answers a generalization of a question of Billera.
Friday 28
9hAndrás RECSKI (Budapest University of Technology and Economics, Hungary)
Generalized matroid matching -- a survey
Let M be a matroid on the underlying set E and suppose that E is the union of disjoint pairs. The matroid parity problem asks if a subset of E with given size exists which is independent in M and intersects each pair either by two or by no elements. This problem is a common generalization of the two-matroids-intersection problem and the graph matching problem, and has several engineering applications. The problem is non-polynomial in general but has a polynomial solution if M is represented over the field of the reals.
Motivated by some engineering problems the following generalization is proposed: Let E be the union of disjoint k-element subsets. Let A be a non-empty subset of {0, 1, 2, ..., k}. Does there exist a subset of E with given size which is independent in M and its intersection with each k-element subset has cardinality belonging to A? Observe that this reduces to the original problem if k = 2 and A = {0, 2}. We survey the results in this area.
(Partly joint work with Jacint SZABO. )
9h45Kristóf BERCZI (Eötvös Loránd University, Hungary)
Matroidal maximum term rank
Ryser's max term rank formula with graph theoretic terminology is equivalent to a characterization of degree sequences of simple bipartite graphs with matching number at least $\ell$. We present a generalization for the case when the degrees are constrained by upper and lower bounds. Then two other extensions are discussed: the first one is a matroidal model, while the second one settles the augmentation version. In fact, the two directions shall be integrated into one single framework.
(Joint work with András Frank.)
10h40Csaba KIRALY (Eötvös Loránd University, Hungary)
Packing arborescences with matroid constraints via matroid intersection
Katoh and Tanigawa characterized the rigidity of slider-pin frameworks. Their paper on the combinatorial details of this rigidity matroid initiated an intensive research in combinatorial optimization on packing arborescences with matroid constraints. Here a packing means edge-disjoint subgraphs. The first such result was due to Durand de Gevigney, Nguyen and Szigeti that gave an alternative proof for one of the main results of a paper by Katoh and Tanigawa through a matroid constrained arborescence packing result and an orientation result. This packing theorem generalized Edmonds' fundamental theorem on packing spanning arborescences. Later common generalizations of this matroid constrained packing result and other previous generalizations of Edmonds' theorem were discovered.
It was also discovered by Edmonds that the original problem of packing spanning arborescences can be characterized through the matroid intersection theorem of Edmonds which also implies an efficient algorithm for the weighted case of the problem. In this talk, we show how a similar characterization can be given for the most recent results on arborescence packings. To define the matroid in the characterization, we also show how a new class of matroids can be defined by extending an earlier construction of matroids from intersecting submodular functions to bi-set functions based on an idea of Frank.
(Joint work with Zoltán Szigeti and Shin-ichi Tanigawa.)
11h25Viktoria KASZANITZKY (Budapest University of Technology and Economics, Hungary)
Highly connected rigidity matroids have unique underlying graphs
We consider the following problem: is there a (smallest) integer $k_d$ such that every graph $G$ is uniquely determined by its $d$-dimensional rigidity matroid, provided that this matroid is $k_d$-connected?
Since the one-dimensional rigidity matroid of $G$ is isomorphic to the cycle matroid of $G$, a celebrated result of H. Whitney implies that $k_1=3$. We prove that if $G$ is 7-vertex-connected then it is uniquely determined by its two-dimensional rigidity matroid. We use this result to deduce that $k_2\leq 11$, which gives an affirmative answer for $d=2$.
(Joint work with Tibor Jordán.)
11h50Lukas KUHNE (Hebrew University of Jerusalem, Israel)
Parallel iterators and a database for integer root matroids.
This talk is concerned with the systematic generation of integer root matroids. These are matroids whose characteristic polynomial completely factors over the integers.
Our study is motivated by questions of freeness of hyperplane arrangements in the area of Terao's conjecture.
To parallely generate the more than 750.000 integer root matroids of rank 3 with up to 14 elements we have developed a general framework of parallelized iterators in HPC-GAP.
Furthermore, we have saved these matroid in a soon publicly available ArangoDB database with additional stored properties such as representability, supersolvability etc.
I will give a live demonstration of this database and present our enumerative results on these integer root matroids.
(Joint work with Mohamed Barakat, Reimer Behrends and Chris Jefferson) | 2019-07-20 13:35:45 | {"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.7218437790870667, "perplexity": 1086.2148404025834}, "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/1563195526517.67/warc/CC-MAIN-20190720132039-20190720154039-00414.warc.gz"} |
https://cdmhub.org/groups/yugroup/wiki/MainPage/GettingstartedwithPreVABS:parametrizedcompositebladedesignandoptimization | Search pages
# iVABS: integrated environment for parametrized composite blade design and optimization
This tutorial will introduce a workflow to design and optimize composite blades with PreVABS+VABS+GEBT+gmsh+msgpi+Dakota. PreVABS is a parametrized composite design tool. VABS is a commercial code for cross-sectional property analysis. GEBT is a beam structural analysis tool developed by Dr. Qi Wang and Prof. Wenbin Yu. msgpi is a Python interface for VABS. Gmsh is an open source CAD software. Dakota is a open source tool for optimization developed by sandia national lab.
## Installation
1. Download iVABS(integrated VABS enviroment): https://cdmhub.org/resources/1921. The package include PreVABS+VABS+msgpi+gmsh+Dakota. An installer and a portable package is provided. Choose installer or portable package whichever you prefer.
2. Install.
• For the installer, everything will be set once you finished installing. We recommend installing it in a non-elevated folder otherwise Administration permission would be needed.
• For the portable package, extract it anywhere; you can run env.cmd to set environment variables or manually set environment variables according to the file. I will use iVABS-root to denote the installation path.
3. Request VABS license from http://analyswift.com/software-trial/. VABS is a commercial code. Put the license in iVABS-root.
## Example 1: Capability of PreVABS (UH60A airfoil)
This figure shows the construction model of PreVABS input. You should prepare 5 input files: basepoints, baseline.xml, layup.xml, material.xml, section.xml. Current version of PreVABS also support combining all inputs in a single XML file.
1. Get into iVABS-root\examples\ex_uh60a
2. Open a command prompt.
3. Run prevabs -i uh60a_section.xml -h -v -e
4. This will build the airfoil model and run VABS. The cross-sectional property will be stored in uh60a_section.sg.K. Gmsh GUI will be opened to display the model.
The table below shows the 4×4 stiffness matrix for of classical beam model.
$$\begin{array} {|r|r|}\hline 4.2369E+07 & -8.1467E+03 & 4.6272E+05 & -1.7006E+07 \\ \hline -8.1467E+03 & 1.6166E+05 & -7.2404E+01 & 2.2351E+03 \\ \hline 4.6272E+05 & -7.2404E+01 & 1.4981E+05 & -1.8577E+05 \\ \hline -1.7006E+07 & 2.2351E+03 & -1.8577E+05 & 1.2608E+07 \\ \hline \end{array}$$
PreVABS features non-structural mass, ply drops, filler materials, build layups from sub-layups.
## Example 2: Optimization with Dakota
This example will use dakota to explore the material choice, orientation angles, layers of the two webs and wing box of the UH60A airfoil to match the expected stiffness.
1. Get into iVABS-root\examples\ex_uh60a_opt
2. Open a command prompt.
3. Run dakota -i uh60a_opt_soga.in -o uh60a_opt_soga.out
4. Read uh60a_opt_soga.out for the optimized design and error. Among two laminas IM7 of 0.001 inch thickness and IM7 of 0.0008 inch thickness. The latter one is chosen. The optimized orientations angles of the 5 studied layers are
$$\begin{array}{|r|r|} \hline 7.6717123936E+01\\ \hline -4.7058626057E+01\\ \hline 4.0018921476E+00\\ \hline -8.5918454543E+01 \\ \hline 3.4209723197E+01 \\ \hline \end{array}$$ Overall, the desired stiffness is reached within 2% error.
## Example 3: Parametric study of eigen analysis with GEBT
This example will involve dakota, VABS, GEBT, msgpi. Dakota will generate values for parameters of interests, i.e. the nonstructural mass position and size. VABS will conduct homogenization to get beam cross-sectional property, which will be passed to GEBT for eigen analysis. The results will be passed back into Dakota.
1. Get into iVABS-root\examples\ex_gebt_param
2. Open a command prompt at the folder location
3. Run dakota -i bm_uh60a_tm_eigen_ps_md.in -o bm_uh60a_tm_eigen_ps_md.out
4. Visualize the results with python PlotResults.py. You can also play with the results interactively within PlotResults.ipynb if you have Jupyter Notebook installed.
This figure shows the first flapping eigen mode frequency’s dependency on the size and position of the added non-structural mass(at the leading edge shown in the Figure in Example 1).
## Summary
The framework is for design and optimization of composite airfoil. It combines the best of tool in several fields. PreVABS is a composite blade parametrized design tool. VABS is an infamous commercial code for beam cross-sectional analysis. Dakota provides versatile methods for optimization. You are welcomed to try it out and make suggestions. | 2021-01-17 06:13:19 | {"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": 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.27782970666885376, "perplexity": 10845.413234824497}, "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-2021-04/segments/1610703509973.34/warc/CC-MAIN-20210117051021-20210117081021-00258.warc.gz"} |
https://www.doubtnut.com/question-answer-chemistry/write-the-electronic-configuration-of-chlorine-atom-atomic-no-17-mass-no-35-647237621 | # Write the electronic configuration of chlorine atom (atomic no. = 17, mass no. = 35).
Updated On: 17-04-2022
Get Answer to any question, just click a photo and upload the photo
and get the answer completely free,
Atomic number of chlorine (Cl) = 17 For neutral atom, Number of proton = Number of electron 1st shell (K-shell) can accommodate maximum 2 electrons. 2nd shell (L-shell) can accommodate maximum 8 electrons. The remaining 7 electrons will enter into 3rd shell (M-shell). Hence, the electronic configuration <br> <img src="https://doubtnut-static.s.llnwi.net/static/physics_images/MTG_FOU_COU_CHE_IX_C04_SLV_007_S01.png" width="80%"> <br> Of chlorine atom will be {:(K,L,M),(2,8,7):} | 2022-05-27 00:55: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": 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.2899636924266815, "perplexity": 8450.308906025388}, "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-21/segments/1652662627464.60/warc/CC-MAIN-20220526224902-20220527014902-00713.warc.gz"} |
https://cswr.nrhstat.org/8-2-em-exp | ## 8.2 Exponential families
We consider in this section the special case where the model of $$\mathbf{y}$$ is given as an exponential family Bayesian network as in Section 6.1.2 and $$x = M(\mathbf{y})$$ is the observed transformation.
The complete data log-likelihood is $\theta \mapsto \theta^T t(\mathbf{y}) - \kappa(\theta) = \theta^T \sum_{j=1}^m t_j(y_j) - \kappa(\theta),$ and we find that $Q(\theta \mid \theta') = \theta^T \sum_{j=1}^m E_{\theta'}(t_j(Y_j) \mid X = x) - E_{\theta'}( \kappa(\theta) \mid X = x).$
To maximize $$Q$$ we differentiate $$Q$$ and equate the derivative equal to zero. We find that the resulting equation is $\sum_{j=1}^m E_{\theta'}(t_j(Y_j) \mid X = x) = E_{\theta'}( \nabla \kappa(\theta) \mid X = x).$
Alternatively, one may also note the following general equation for finding the maximum of $$Q(\cdot \mid \theta')$$ $\sum_{j=1}^m E_{\theta'}(t_j(Y_j) \mid X = x) = \sum_{j=1}^m E_{\theta'}(E_{\theta}(t_j(Y_j) \mid y_1, \ldots, y_{j-1}) \mid X = x),$ since $E_{\theta'}(\nabla \kappa(\theta)\mid X = x) = \sum_{j=1}^m E_{\theta'}(\nabla \log \varphi_j(\theta) \mid X = x) = \sum_{j=1}^m E_{\theta'}(E_{\theta}(t_j(Y_j) \mid y_1, \ldots, y_{j-1}) \mid X = x)$
Example 8.1 Continuing Example 6.4 with $$M$$ the projection map $(\mathbf{y}, \mathbf{z}) \mapsto \mathbf{y}$ we see that $$Q$$ is maximized in $$\theta$$ by solving $\sum_{i,j} E_{\theta'}(t(Y_{ij} \mid Z_i) \mid \mathbf{Y} = \mathbf{y}) = \sum_{i} m_i E_{\theta'}(\nabla \kappa(\theta \mid Z_i) \mid \mathbf{Y} = \mathbf{y}).$
By using Example 6.2 we see that $\kappa(\theta \mid Z_i) = \frac{(\theta_1 + \theta_3 Z_i)^2}{4\theta_2} - \frac{1}{2}\log \theta_2,$ hence
$\nabla \kappa(\theta \mid Z_i) = \frac{1}{2\theta_2} \left(\begin{array}{cc} \theta_1 + \theta_3 Z_i \\ - \frac{(\theta_1 + \theta_3 Z_i)^2}{2\theta_2} - 1 \\ \theta_1 Z_i + \theta_3 Z_i^2 \end{array}\right) = \left(\begin{array}{cc} \beta_0 + \nu Z_i \\ - (\beta_0 + \nu Z_i)^2 - \sigma^2 \\ \beta_0 Z_i + \nu Z_i^2 \end{array}\right).$
Therefore, $$Q$$ is maximized by solving the equation
$\sum_{i,j} \left(\begin{array}{cc} y_{ij} \\ - y_{ij}^2 \\ E_{\theta'}(Z_i \mid \mathbf{Y} = \mathbf{y}) y_{ij} \end{array}\right) = \sum_{i} m_i \left(\begin{array}{cc} \beta_0 + \nu E_{\theta'}(Z_i \mid \mathbf{Y}_i = \mathbf{y}_i) \\ - E_{\theta'}((\beta_0 + \nu Z_i)^2 \mid \mathbf{Y} = \mathbf{y}) - \sigma^2 \\ \beta_0 E_{\theta'}(Z_i \mid \mathbf{Y} = \mathbf{y}) + \nu E_{\theta'}(Z_i^2 \mid \mathbf{Y} = \mathbf{y}) \end{array}\right).$ Introducing first $$\xi_i = E_{\theta'}(Z_i \mid \mathbf{Y} = \mathbf{y})$$ and $$\zeta_i = E_{\theta'}(Z_i^2 \mid \mathbf{Y} = \mathbf{y})$$ we can rewrite the first and last of the three equations as the linear equation $\left(\begin{array}{cc} \sum_{i} m_i& \sum_{i} m_i\xi_i \\ \sum_{i} m_i\xi_i & \sum_{i} m_i\zeta_i \end{array}\right) \left(\begin{array}{c} \beta_0 \\ \nu \end{array}\right) = \left(\begin{array}{cc} \sum_{i,j} y_{ij} \\ \sum_{i,j} \xi_i y_{ij} \end{array}\right).$ Plugging the solution for $$\beta_0$$ and $$\nu$$ into the second equation we find $\sigma^2 = \frac{1}{\sum_{i} m_i}\left(\sum_{ij} y_{ij}^2 - \sum_{i} m_i(\beta_0^2 + \nu^2 \zeta_i + 2 \beta_0 \nu \xi_i)\right).$
This solves the M-step of the EM algorithm for the mixed effects model. What remains is the E-step that amounts to the computation of $$\xi_i$$ and $$\zeta_i$$. We know that the joint distribution of $$\mathbf{Y}$$ and $$\mathbf{Z}$$ is Gaussian, and we can easily compute the variances and covariances: $\mathrm{cov}(Z_i, Z_j) = \delta_{ij}$
$\mathrm{cov}(Y_{ij}, Y_{kl}) = \left\{ \begin{array}{ll} \nu^2 + \sigma^2 & \quad \text{if } i = k, j = l \\ \nu^2 & \quad \text{if } i = k, j \neq l \\ 0 & \quad \text{otherwise } \end{array} \right.$
$\mathrm{cov}(Z_i, Y_{kl}) = \left\{ \begin{array}{ll} \nu & \quad \text{if } i = k \\ 0 & \quad \text{otherwise } \end{array} \right.$
This gives a joint Gaussian distribution $\left( \begin{array}{c} \mathbf{Z} \\ \mathbf{Y} \end{array} \right) \sim \mathcal{N}\left( \left(\begin{array}{c} \mathbf{0} \\ \beta_0 \mathbf{1}\end{array} \right), \left(\begin{array}{cc} \Sigma_{11} & \Sigma_{12} \\ \Sigma_{21} & \Sigma_{22} \end{array}\right)\right).$
From this and the general formulas for computing conditional distributions in the multivariate Gaussian distribution: $\mathbf{Z} \mid \mathbf{Y} \sim \mathcal{N}\left( \Sigma_{12} \Sigma_{22}^{-1}(\mathbf{Y} - \beta_0 \mathbf{1}), \Sigma_{11} - \Sigma_{12}\Sigma_{22}^{-1}\Sigma_{21} \right).$ The conditional means, $$\xi_i$$, are thus the coordinates of $$\Sigma_{12} \Sigma_{22}^{-1}(\mathbf{Y} - \beta_0 \mathbf{1})$$. The conditional second moments, $$\zeta_i$$, can be found as the diagonal elements of the conditional covariance matrix plus $$\xi_i^2$$. | 2021-06-14 12:54:59 | {"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.8953253626823425, "perplexity": 122.51643070620167}, "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-25/segments/1623487612154.24/warc/CC-MAIN-20210614105241-20210614135241-00604.warc.gz"} |
https://www.expii.com/t/interpreting-functions-in-depth-9969 | Expii
# Interpreting Functions, in Depth - Expii
Review the different ways to represent, visualize, and think about functions, like in Algebra 1. We'll briefly go over function notation, graphs, tables, domain, range, and relations. | 2021-04-21 04:36:38 | {"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.8336907625198364, "perplexity": 4128.776517320265}, "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-17/segments/1618039508673.81/warc/CC-MAIN-20210421035139-20210421065139-00492.warc.gz"} |
http://human-web.org/West-Virginia/error-exponents-for-ar-order-testing.html | Address 1117 Garfield Ave, Parkersburg, WV 26101 (304) 428-5112 http://www.zzzip.net
# error exponents for ar order testing Macfarlan, West Virginia
This is all the moreinteresting as the first r reflection coefficients only depend onthe first r + 1 empirical correlationsPnt=i+1YtYt−i, that ison a finite dimensional-statistic.However, the possibility to approximate GLRT while Springer-Verlag, Paris, 1993.[35] E. Theory, 44(6):2230–2258, october 1998.[39] Y. This proves thatT−1n(1/fλ)T−1n(g) − Tn1ghas at most 2r non null(actually negative but larger than −1) eigenvalues, and theirsum is uniformly lower-bounded.
The latter is theone-step prediction error of the stationary process obtainedby time reversing the process (Yn)n∈N. Khudanpur and P. Holden-Day Inc.,San Francisco, Calif., 1976.[11] A. Fortunately,the following proposition shows that as far as order testing isconcerned, we can disregard the variance of innovations σ2and focus on the prediction filter a.Proposition 1: [VARIANCE OF INNOVATION] The quasi-Whittle
Stat., 14(2):207–222, 1993.[14] S. Onthe other hand, little seems to be known about the efficiencyof AR testing procedures. It can be computed efficiently thanks to the(direct) Levinson-Durbin algorithm. It will also appeal to practitioners and researchers from other fields by guiding them through the computational steps needed for making inference HMMs and/or by providing them with the relevant underlying
Error exponents and Large Deviation PrinciplesAs far as AR processes are concerned, consistent sequencesof tests have been known for a while [36], [35], [37]. The touchstone iswhether the rate function of the LDP admits a full information-theoretical interpretation (as defined above) or not.In the case of memoryless sources (see [21] and referencestherein) and the case Moreover, every finite collection of those random variables has a multivariate normal distribution. Although, it does not look as explicit, Equation(5) emphasizes the already mentioned interplay between least-square prediction and information.
Gamboa, and A. The measurable space (Ω, A) consists of RNpro-vided with the cylindrical σ-algebra. IEEE Trans. Ser.
So, thiswould lead to g =˜f and contradict the fact that˜f ∈ Fr−1.Let h be such that L0(0) 6= 0. The motivation for studying empirical measures is that it is often impossible to know the true underlying probability measure . Hemerly and M. is distributed as an AR(r) process with spectraldensity g.
Dembo and O. It is commonplace tosearch for sequences of tests with non-trivial asymptotic levelsupP ∈M0lim supnαn(P ) < 1 with αn(P ) = P {Kn} andoptimal asymptotic power infP ∈M1lim infn1 −βn(P ) Bouaziz. Model selection for (auto-)regression with dependent data.
The autoregressive model is one of a group of linear prediction formulas that attempt to predict an output of a system based on the previous outputs. Moulines and T.Rydden. Universal composite hypothesis testing: acompetitive minimax and its applications. Finesso, C.
Large deviation techniques and applications.Springer, 1998.[30] M. Detection of stochastic processes. Zeitouni. Forevery index set N(α) × N0(α), they denote specific ratefunctions.The existence of yαis ensured by the fact that¯I is lower-semi-continuous and Cαis closed.Lemma 9: For each positive α, let yαbe defined
Hence, this subsequenceconverges to ∞, which contradicts the assumption I(y) < ∞.Hence, for any y ∈ Rd, such that I(y) < +∞, there existssome λ ∈ D◦Λsuch thatI(y) = hλ, yi Inform. Large deviations theory formalizes the heuristic ideas of concentration of measures and widely generalizes the notion of convergence of probability measures. Testing the order of a model usinglocally conic parametrization: population mixtures and stationary armaprocesses.
In some simplebut non-trivial situations like product distributions on finitesets, the Sanov Theorem [29] allows to check the optimalityof generalized likelihood ratio testing (GLRT) (see [21] andreferences therein).The possibility to check Annals of Statistics, 28:1601–1619, 2000.[25] D. Lavielle. Now, let˜f be such thatinff∈Mr−1K∞(f | g) − infh∈FK∞(f | h)≥ L(a) = K∞˜f | g− K∞˜f | ha.But L(a) satisfies the following equation:L(a) =14πZT"log1 + agh− a˜fh#dω .Hence L() is
Asymptotic analysis of error probabilities for the nonzero-mean Gaussian hypothesis testing problem. J. Recall that a stationaryGaussian process . . . Thanks to the sieve approximation Lemma (Lemma8) and to the LDP upper-bound for vectors of quadratic forms7, Lemma 3 provides a lower bound on order under-estimationexponent.
Shields. Hence thelower bound is achieved if and only ifbi− ai= arbr−ifor all i, 1 ≤ i < r ,that, is for the result of the inverse Levinson recursion. Moreover, if ardenotesthe r-th coefficient of the prediction filter of order r output bythe Levinson-Durbin algorithm on the data Y, an interestingaspect of the analysis of the Levinson-Durbin algorithm is thefollowing L´eonard and J.
Previous workIn most testing problems, provided there is a sufficientsupply of limit theorems for log-likelihood ratios, upper-bounds on error-exponents can be obtained using an argumentcredited to Stein (see [29] and Section Then bylower-semi-continuity of Λ:I(y) = hλ, yi − Λ (λ) .Moreover λ ∈ D◦Λandy = 5Λ|λ.Let us check now that (λm)mis indeed bounded. Theory Relat. The system returned: (22) Invalid argument The remote host or network may be down.
Use of this web site signifies your agreement to the terms and conditions. The tests to be considered are variants of generalized likelihood ratio testing corresponding to traditional approaches to autoregressive moving-average (ARMA) modeling estimation. The rest of thissection is devoted to the identification of this limit with theexpression given in the statement of Theorem 6 (Lemma 11)and to checking that the latter expression is non-trivial Please try the request again.
Nagaraja for Technometrics, November 2006 Voransicht des Buches » Was andere dazu sagen-Rezension schreibenEs wurden keine Rezensionen gefunden.Ausgewählte SeitenSeite 21Seite 10TitelseiteInhaltsverzeichnisIndexInhaltIntroduction 1 Main Definitions and Notations 35 Filtering and Smoothing Recursions Henceforth,those upper-bounds will be called Stein upper-bounds.Checking whether the so-called Stein upper-bounds may beachieved or not is more difficult (this is also true for Bahadurefficiencies, see [46, discussion page 564]). Under some mild summabilityconditions (that are always satisfied by AR processes), the co-variance sequence defines a function on the torus T = [0, 2π]that captures many of the information-theoretical properties ofthe | 2019-03-20 04:03:03 | {"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.8682613968849182, "perplexity": 6174.73159040945}, "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-13/segments/1552912202199.51/warc/CC-MAIN-20190320024206-20190320050206-00304.warc.gz"} |
https://brilliant.org/problems/electric-fan/ | # Electric fan
Paul has two identical ceiling fans, Fan A and Fan B, in separate but otherwise identical rooms. Fan A is switched on the entire time, while Fan B remains switched off.
After some months of use, which fan's blades will be dustier?
Assumptions: Upon sticking to the blade, dust is held by a strong electromagnetic force.
× | 2018-05-25 20:34:47 | {"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.4882117211818695, "perplexity": 7507.2460803120675}, "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-22/segments/1526794867217.1/warc/CC-MAIN-20180525200131-20180525220131-00515.warc.gz"} |
https://mathoverflow.net/questions/240378/global-section-of-universal-bundle-on-grassmanian | # Global section of universal bundle on Grassmanian
Let $G=G(k, V)$ be the Grassmanian of $k$-dimensional subspaces of the $n$th dimensional vector space $V$, regarded as a smooth algebraic variety over $\mathbb{C}$. Denote with $S$ the tautological (universal) bundle over $G$.
On Kapranov's "Coherent sheaves on Grasmann manifold" the following result are stated:
$H^0(G, S^*) \simeq V^*$ and $H^0(G, V/S) \simeq V$
The author claims that "These facts are well known".
However after a lot of research, I could not find this statement in any reference where I looked for it.
It is reasonable that the proof has to be done "by hands", like in the case of the tautological sheaf $\mathcal O (-1)$ over $\mathbb{P}^n$.
Do you have any suggestion?
These are simple instances of the Bott-Borel-Weil theorem. For a complex semsimple group $G$ and a parabolic subgroup $P$ and a complex irreducible representation $W$ of $P$ consider the homogeneous vector bundle $G\times_P W\to G/P$. In this situation the BBW theorem computes the cohomology of the shaef of local holomorphic sections of this bundle as a representation of $G$. The case you need here is that the highest weight of $W$ already is $G$-dominant and integral, in which case the cohomology is concentrated in degree zero and is the $G$-irreducible representation of the same highest weight. (Observe that $S^*$ is the $P$-irreducible quotient of $V^*$, while $V/S$ is the $P$-irreducible quotient of $V$.)
The classical Borel-Weil theorem handles the case where $P=B$, the Borel subgroup of $G$, and states that the finite dimensional irredcible representations of $G$ corresponding to a dominant integral weight can be realized as the space of holomorphic sections of the homogeneous line bundle on the full flag manifold $G/B$ induced by the one-dimensional representation of $B$ defined by that weight.
A nice exposition of the BBW-theorem can be found in the book on the Penrose transform by Baston and Eastwood.
• I never saw Grassmanians under the point of view of representations but it seems powerful. Would you be able to give a brief introduction or a basic reference to understand this point of view? – Ramac Jun 9 '16 at 8:41
• I found a nice paper "Grassmanians and representations" here: arxiv.org/pdf/math/0507482v2.pdf – Ramac Jun 9 '16 at 11:12
• The basic story is that the compact homogeneous spaces of complex semisimple groups are exactly the quotients by parabolic subgroups, which are known as generalized flag manifolds. Any parabolic subgroup has a natural reductive quotient via homogeneous vector bundles representations of this so-called Levi-factor give rise to representations of the initial group. In my opinion, the first chapters of the book by Baston and Eastwood I mentioned give a nice introduction to the topic. The paper you mention contains an exposition of Bot-Borel-Weil, but not much background. – Andreas Cap Jun 9 '16 at 12:54
• You should have $U_{k,m}\times \mathbb C^k$ in your description. To get the dual bundle, you simply replace $\mathbb C^k$ by its dual space and use the canonical action, i.e.~$(g^{-1}\cdot\lambda)(v)=\lambda(g\cdot v)$. However, the description you use is not very well suited to the description of general homogeneous bundles. The better point of view is to have $G=SL(n,\mathbb C)$ and $P\subset G$ the stabilizer of $\mathbb C^k\subset\mathbb C^n$. Then for any representation $W$ of $P$, $G\times_PW$ is the quotient of $G\times W$ by $(g,w)\sim (gh,h^{-1}\cdot w)$ for $h\in P$. – Andreas Cap Jun 12 '16 at 9:11
• continuation: $P$ consists of block-upper-triangular matrices, so there is an obvious homomorphism $P\to S(GL(k,\mathbb C)\times GL(n-k,\mathbb C))$, Via this you can use the standard representation of $GL(k,\mathbb C)$ and its dual to induce the tautological bundle and its dual. – Andreas Cap Jun 12 '16 at 9:13
I don't know a reference either but one can argue as follows:
Let $U\subseteq V$ be of dimension $k$ and let $P$ be its stabilizer in $GL(V)$. Then the morphism $\pi:S=GL(V)\times^PU\to V$ is proper and surjective. Moreover one checks that all of its fibers are irreducible. The normality of $V$ implies $\pi_*\mathcal O_S=\mathcal O_V$, in particular, each global function on $S$ is a pull-back from $V$. Specializing to homogeneous functions of degree $1$ one gets $H^0(G,S^*)=V^*$. The other equality is obtained from the fact that $U\mapsto U^\perp=(V/U)^*$ yields an isomorphism between $Gr_k(V)$ and $Gr_{n-k}(V^*)$ (with $n=\dim V$).
• In my idea, $H^0(G,S^*)$ is the group of global sections of the "dual bundle" of $S$ over the whole Grassmanian. Here it seems that you compute a global map from $S$ to the base field. What is the relation? – Ramac Jun 7 '16 at 15:52
• @Ramac: I think of a global section of $S^*$ as a function on the total space of $S$ which is homogeneous of degree one on each fiber. Perhaps, I should have used a different notation for a vector bundle considered as a sheaf and a vector bundle considered as a variety. – Friedrich Knop Jun 7 '16 at 17:06 | 2021-02-24 17:30:17 | {"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.9119237661361694, "perplexity": 190.22470321033737}, "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/1614178347293.1/warc/CC-MAIN-20210224165708-20210224195708-00104.warc.gz"} |
https://math.stackexchange.com/questions/1075521/find-cubic-b%C3%A9zier-control-points-given-four-points | # Find cubic Bézier control points given four points
What I need is to generate an SVG file while having a series of (x,y) ready.
P0(x0,y0)
P1(x1,y1)
P2(x2,y2)
P3(x3,y3)
P4(x4,y4)
P5(x5,y5)
...
I need to make a Bézier curve from them so I need to calculate control points (mid-points) for them. This image explains what I am exactly looking for:
I have points P0, P1, P2 and P3 ready. What I need is to calculate control points C1 and C2. The curve does not pass them. But it bends toward them.
I need a formula which gives me C1 and C2 in clear direct form:
C1= fomula1 (P0,P1,P2,P3)
C2= fomula2 (P0,P1,P2,P3)
I was thinking about least square method and some other methods but I had no idea how to implement them.
References: Animation, SVG
Your problem, as stated, does not have a unique solution. Suppose that point $P_j$ is at location $(3j, 0)$, for each integer $j$, so that they're equi-spaced on the $x$-axis. Now let $y$ be any real number. Then by adding control points at locations $$(6i+1, y)\\ (6i+2, y)\\ (6i + 4, -y)\\ (6i+5, -y)$$ for each integer $i$, you get two "control points" between any two of your original points. For instance, near the origin, for $y = 2$, we have points $$(-3, 0) \leftarrow (\mathrm{one~ of~ the}~ P_i)\\ (-2, -2)\\ (-1, -2)\\ (0, 0) \leftarrow (\mathrm{one~ of~ the}~ P_i)\\ (1, 2)\\ (2, 2)\\ (3, 0) \leftarrow (\mathrm{one~ of~ the}~ P_i)$$ These determine two Bezier segments that glue up nicely at the origin, with a slope of $2$ at the origin.
You may say "But it's obvious that the control points in this case should be on the $x$-axis!" and I say "but your problem statement doesn't require it." Indeed, I chose this example because it was easy to write, but given any set of $P_i$, I can again find an infinitely family of ways to place the intermediate control points so as to join the $P_i$ with Bezier segments.
I'm going to suggest that you consider looking at Catmull-Rom splines, which are piecewise cubics passing through a sequence of points like your $P_i$. Each segment of a CR-spline can be expressed as a Bezier curve, because the Bezier basis functions span the space of cubic curves. One detailed reference on this is Computer Graphics: Principles and Practice, 3rd edition, of which I am a coauthor, but there are plenty of other references as well.
Here are somewhat brief details on CR spline construction from a sequence of points $M_0, M_1, \ldots$. I'm going to describe how to find the control points for the part of the curve between $M_1$ and $M_2$, so as to avoid any negative indices. The four control points will be $P_0, P_1, P_2, P_3$. Two of these are easy: \begin{align} P_0 &= M_1 \\ P_3 &= M_2 \end{align} so that the Bezier curve starts and ends at $M_1$ and $M_2$, respectively.
The other two are only slightly trickier. We compute \begin{align} v_1 &= \frac{1}{2} (M_2 - M_0)\\ v_2 &= \frac{1}{2} (M_3 - M_1) \end{align} which are the velocity vectors at $M_1$ and $M_2$. We then have \begin{align} P_1 &= P_0 + \frac{1}{3} v_1 = M_1 + \frac{1}{6} (M_2 - M_0)\\ P_2 &= P_4 - \frac{1}{3} v_2 = M_2 - \frac{1}{6} (M_3 - M_1) \end{align}
Applying these rules in the example I gave earlier, with $$M_i = (3i, 0)$$ we have \begin{align} M_0 &= (0, 0)\\ M_1 &= (3, 0)\\ M_2 &= (6, 0)\\ M_3 &= (9, 0) \end{align} so that \begin{align} P_0 &= (3, 0)\\ P_3 &= (6, 0)\\ v_1 &= \frac{1}{2}((6, 0) - (0, 0)) = (3, 0)\\ v_2 &= \frac{1}{2}((9, 0) - (3, 0)) = (3, 0)\\ P_1 &= P_0 + \frac{1}{3} v_1 = (3, 0) + (1, 0) = (4, 0)\\ P_2 &= P_3 - \frac{1}{3} v_2 = (6, 0) - (1, 0) = (5, 0) \end{align} as expected.
Hint for the start and end points: Assuming you have a sequence of points $$M_0, M_1, \ldots, M_{n-1}$$ you can let \begin{align} M_{-1} &= M_0 - (M_1 - M_0) = 2M_0 - M_1 \\ M_n &= M_{n-1} + (M_{n-1} - M_{n-2}) = 2M_{n-1} - M_{n-2} \end{align} to extend your list just enough that the CR scheme above provides interpolation all the way from $M_0$ to $M_{n-1}$.
• Let me digest it. Catmull–Rom spline is an interpolation which gives me the tangent only. I am wondering how to obtain C1 and C2 from m0 and m1? – barej Dec 20 '14 at 14:05
• I think you need to read more about CR splines; they give more than tangents. If you're wondering how, for a CR spline, to get $c_0$ and $c_1$ given $m_0$ and $m_1$...you can't. You need to have $m_{-1}, m_0, m_1,$ and $m_2$. (Handling the ends involves making a choice, detailed in our book's writeup, but surely covered elsewhere too.) – John Hughes Dec 20 '14 at 14:13
• supposed I have m-1,m0,m1,m2 . How can I obtain C0 and C1? – barej Dec 20 '14 at 14:26
• See additional section about basic CR constructions. – John Hughes Dec 20 '14 at 15:47
• thank you. just two things. one: the fraction in your solution v1=1/3*(M2-M0) must change to 1/2. second: i have a question. does this algorithm stops overshoots too? – barej Dec 20 '14 at 17:10 | 2020-01-26 03:19: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": 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": 6, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9993909597396851, "perplexity": 300.3962499099424}, "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/1579251684146.65/warc/CC-MAIN-20200126013015-20200126043015-00557.warc.gz"} |
http://math.eretrandre.org/tetrationforum/showthread.php?tid=180 | • 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
Cardinality of Infinite tetration Ivars Long Time Fellow Posts: 366 Threads: 26 Joined: Oct 2007 06/17/2008, 01:02 PM (This post was last modified: 06/18/2008, 08:45 AM by Ivars.) Probably has been answered many times,but I have to ask: If cardinality of Natural numbers is Aleph_0, and their powerset P(N) has cardinality of continuum, |P(N)|= c = 2^Aleph_0 which is also the cardinality of R, then: x^x has cardinality of R^R = c^c= cardinality of power set of Reals=|P(R )|=2^c=2^2^Aleph_0 then for each step of tetration we have to add 2, so via recursion: Cardinality |x[4]1|=|P(N)|= |R|=2^Aleph_0 |x[4]n|= |P(x[4]n-1|= 2^| x[4]n-1| and generally: |x[4]n|= |P(x[4]n-1|= (2[4]n)^| x[4]1| What would be cardinality for infinite tetration , known to converge to real values or give complex values by analytic continuation? And what is the cardinality of a number obtained as a result of tetration, even for finite n? Some references here: Cardinality of continuum Another question is , what is than the cardinality of: x[4]y, x[4]I? From previous considerations, can it be (for y>1): |x[4]y|= |P(x[4]y-1|=2^? What is cardinality of I^I? And what would such cardinalities mean? Similarly the same question arises when trying to understand what is fractional or real Cartesian product of sets? May be the answer is in tetration. Ivars Ivars Long Time Fellow Posts: 366 Threads: 26 Joined: Oct 2007 06/17/2008, 07:59 PM (This post was last modified: 06/17/2008, 09:06 PM by Ivars.) I found interesting links generalizing Integer dimensions of sets via Euler measure: Quote:The Euler characteristic of an object is the most basic dimensionless quantity associated with it . by Tom Leinster. Here: Euler characteristic, category andydude Long Time Fellow Posts: 509 Threads: 44 Joined: Aug 2007 06/17/2008, 08:52 PM Ivars Wrote:c=2^Aleph_0 This has not been proven. In fact this is the continuum hypothesis. Andrew Robbins Ivars Long Time Fellow Posts: 366 Threads: 26 Joined: Oct 2007 06/18/2008, 08:12 AM (This post was last modified: 06/18/2008, 08:48 PM by Ivars.) andydude Wrote:Ivars Wrote:c=2^Aleph_0 This has not been proven. In fact this is the continuum hypothesis. Andrew Robbins The question is not so much about the continuum Hypothesis which may be true, may be not, but generally about cardinality of sets produced via operations, including cardinality of Number. E.g. If we have integer number N, its cardinality is assumed |N |which is just the number of elements in set {1,2,...,N}; However, when this N is produced as a result of multiplication of 2 sets representing n1 and n2 than the resulting set is multiset, so its cardinality is greater than |N|. E.g. If we have set {0,1} and {0,1} each of them has cardinality |2|.But product: {0,1}*{0,1} = {0*0, 0*1, 1*0,1*1} = {0,0,0,1} has cardinality |4| with 0 repeated 3 times. So my question arose from looking at exponentiation: If we have a number N2 such that N2= n1^n1 than its cardinality is also |n1^n1| as a result of such operation. It corresponds to choices of n1 from n1, or, combinatorically, if we have n1 differently labeled botlles of beer, how many ways (permutations) we can arrange them in n1 boxes with repetition and when order matters. If we now calculate n1^(n1^n1) the number of boxes goes up to n1^n1, number of permutations n1^(n1^n1), which is also the cardinality of Number N3 = n1[4]3 when obtained via tetration? Unfortunately, numbers in tetration are big, but Integers that can in principle have such cardinality and are possible to partition exponentially in 2 integers are not so many (if we exclude 1 as meaningless in exponentiation): 4=2^2, 8=2^3, 9= 3^2, 16=2^4=2^2^2, 25=5^2, 27=3^3, 32= 2^5, 36=6^2, 49=7^2, 64=2^6=4^3, 81=3^4=3^2^2 ,100=10^2, 125=5^3, 128=2^7, 216=6^3, 243=3^5, 256=2^8=2^2^3, 343=7^3, 512=2^9=2^3^2, 625=5^4, 729=3^6, 1024=2^10, 1296=6^4, 2048=2^11, 2187=3^7, 2401=7^4, 3125=5^5, .. Of these, only few can be partitioned in 3 integers with repetition: 16=2^2^2, 81=3^2^2, 256=2^2^3, 512=2^3^2, 625=5^2^2, 1296=6^2^2, 2401=7^2^2, Without repetition, we get 2 ways to partition some numbers infinitely : exponential factorials n^..4^3^2 and 3_factorials 2^3^....n. May be I have missed some. So the question I put forth in initial post is about cardinality of Numbers resulting from x[4]2, x[4]n, x[4]oo. if x is integer, it is relatively simple to have a multiset as a result of exponentiation which includes all permutations . This can be used also in cases n^(n-1)^(n-2) leading to parts of exponential factorial, and n^(n+1)^(n+2) leading to parts of 3_factorial. If x is fractional, it requires interpretation of irrational cardinality, as e.g. (1/2)^(1/2)= sqrt(2) if x is irrational or transcendental or imaginary, such cardinality gets very strange. E.g. such cardinality of i^i is e^(-pi/2). The only place I have found any ideas in that direction so far is Euler characteristic of categories (and polyhedral sets) which can be imaginary, negative and fractional(see Leistner, Baez, Propp): Propp. Euler measure as generalized cardinality Ivars bo198214 Administrator Posts: 1,384 Threads: 90 Joined: Aug 2007 06/20/2008, 02:16 PM What is |x[4]2|? I was not aware that x[4]2 is a set. Ivars Long Time Fellow Posts: 366 Threads: 26 Joined: Oct 2007 06/20/2008, 04:28 PM bo198214 Wrote:What is |x[4]2|? I was not aware that x[4]2 is a set. Hmm. I thought it can be perceived as set by analogy to n^n which is a set of all permutations of n from n with order and repetitions. So 2^2 (A^B) is a also multiset of all 4 distinct combinations of elements with repetition (if 2 is a set) and : lower 2 upper 2 ( AB) upper 2 lower 2 (BA) lower 2 lower 2 (AA) upper 2 upper 2 (BB) etc. Now, if x is a set eg defined by whatever is proper e.g ({........|next real after x}) then my question was can x^x=x[4]2 represent the set of all combinations of lower and upper x so its cardinality will be|x[4]2|= R^R. I know R^R is a cardinality of all functions from reals to reals, but also if we look at permutations which go over all reals smaller than x than the set of all such permutations should have cardinality R^R. Is that impossible I was also looking at partial derivatives of x^y to see the difference between upper and lower arguments ( and then look at x^x by replacing y with x): I was wondering if function $z=x^y$ or $z=u^v$ does not lead to mere insights about tetration in general and $x[4]2=x^x$ in particular. $x^x$ is $x^y$ with $y=x$. If we look at partial derivatives of $x^y$, they exibit different dependance of change in function value from each of arguments. If we keep $y=const$ than : $\frac{\partial x^y}{\partial x}=x^{(x-1)}*y$ If we keep $x=const$ than: $\frac{\partial x^y}{\partial y}=x^{y}*\ln(x)$ Derivative of $x^x$ is $x^{x}*(\ln(x)+1)$. This can be obtained by replacing $y=x$ and summing both derivatives: $x^{(x-1)}*x+x^{x}*\ln(x)=x^{x}*(\ln(x)+1)$ But we can also maintain 2 parts separately, each one relating to different x-es: $x^{(x-1)}*x+x^{x}*\ln(x)=x^{x}+x^{x}*\ln(x)$ Then next derivatives and their general form are easy to see: $x^{(x-n)}*x+x^{x}*(\ln(x))^n=x^{x-n+1}+x^{x}*(\ln(x))^n$ We can name the First term of the 2 summands as derivative by TOP x and second as derivative by BOTTOM x. Obviously, both partial derivatives by TOP x and bottom x are infinitely differentiable but follows different patterns. To me it seems there is difference between both x so I thought they can be looked at as somewhat independent sets and their exponentiation will besides giving 1 real value also produce an infinite set with cardinality R^R. Or have I made some mistake very early again? Ivars bo198214 Administrator Posts: 1,384 Threads: 90 Joined: Aug 2007 06/20/2008, 09:18 PM Ivars Wrote:bo198214 Wrote:What is |x[4]2|? I was not aware that x[4]2 is a set. Hmm. I thought it can be perceived as set by analogy to n^n which is a set of all permutations of n from n with order and repetitions. Whatever, but $n$ is a variable so you can regard $5^5$ as a set in this sense but not $n^n$ or $x^x$ as it depends on $n$ or $x$ respectively. Quote:Then next derivatives and their general form are easy to see: $x^{(x-n)}*x+x^{x}*(\ln(x))^n=x^{x-n+1}+x^{x}*(\ln(x))^n$ Unfortunately its not that easy, e.g: $\frac{\partial^2 x^x}{(\partial x)^2} = {{x}^{x} {\left( \ln \left( x \right) + 1 \right)}^{2} } + {x}^{x - 1}$ Ivars Long Time Fellow Posts: 366 Threads: 26 Joined: Oct 2007 06/21/2008, 07:27 PM bo198214 Wrote:Whatever, but $n$ is a variable so you can regard $5^5$ as a set in this sense but not $n^n$ or $x^x$ as it depends on $n$ or $x$ respectively. I have to read into this , but category theory deals with variable sets. ( I do not know if this is applicable, but seems so). There is an article in web by Prof. Bell "Abstract and variable sets in category theory". Quote:Unfortunately its not that easy, e.g: $\frac{\partial^2 x^x}{(\partial x)^2} = {{x}^{x} {\left( \ln \left( x \right) + 1 \right)}^{2} } + {x}^{x - 1}$ Thanks for correction. Anyway first differential and separated further derivatives show that there is a difference by which of x such function is differentiated, and these impact in growth speed can be separated in principle. Ivars Long Time Fellow Posts: 366 Threads: 26 Joined: Oct 2007 07/13/2008, 08:07 PM (This post was last modified: 07/19/2008, 07:43 AM by Ivars.) As I have been reading about cardinalities a little, I was wondering what is the cardinality of number of values of complex logarithm, which are, as well known, infinite in number with a cycle +- 2pi*I, and made a short training excercise. If we have a circle with imaginary diameter I, it has a circumference I*pi (2*ln(I))=ln(i^2) If we have a circle with imaginary diameter I/2, if has circumference I*pi/2 = ln(I) Circle with imaginary diameter I/4 , circumference I*pi/4= 1/2 ln(I) = ln (sqrt(I)) Circle with imaginary diameter I/8, circumference I*pi/8=1/4*ln(I)= ln(I^(1/4)) Circle with imaginary diameter I/(2^n), circumference I*pi/(2^n)=1/2^(n-1)*ln(I)=ln(I^(1/2^(n-1)) Now if we sum circumferences of infinite number of such progression of circles, we get Pi*I*( 1+1/2+1/4+1/8+ +1/2^(n-1)+..)= 2*pi*I = 4*ln(I)= ln(I^4) = ln(1) by the sum of infinite series So we can assume that if we would have added to each I/(2^n) its infinite number of periodic values in form + - (2*pi*k)/n we would have sum of circumferences exactly Ln(1) : Ln(1) = 0, +-2**I*pi, +-4*I*pi, +- 6 *I*pi ............2*pi*I*n. n natural number on other hand we have series of logarithms of roots of I which also sums up to the same value: Ln(-1)+ ln(sqrt(I) + ln (I^(1/4)) + ln (I^(1/) + ln(I^1/16))+ .. = Ln(-1) + ln(sgrt(I)*(I^(1/4)* (I^(1/)*I^(1/16)* ....) Obviosly, also right logarithm including roots must sum to Ln(-1). , then Ln(-1)+Ln(-1) = Ln(-1*-1)= Ln(1) as above. But if we look at the structure of the roots we know that n-th root has n values, so the number of possible combinations of roots in product grows as 2^(n*(n+1)/2)) -triangular numbers, or Pascal triangle. (sgrt (I) has 2 values each of which can combine with 4 values of 4th root of I which makes totally 8 combinations which can combine with 8 values of 8th root of I so there are 2^6 = 64 combinations which combined with 16 values of 16th roots (2^4) give 2^10 = 1024 combinations which combine with 32 values of 32th root (2^5) gives 2^10*2^5= 2^15 combinations etc.). So in fact, the powers of 2 of number of combinations are triangular numbers. It could be that some roots in this multiplication cancel out so some paths become equal and the number of effective combinations is reduced? Now, we can have infinite number of ways we can construct converging or diverging values for complex logarithm as sum of circles with imaginary radiuses , and each of them, when expressed as product of roots of I, will have differerent tree structure behind them. So what is the cardinality of infinite values of complex logarithm? Ivars « Next Oldest | Next Newest »
Possibly Related Threads... Thread Author Replies Views Last Post [repost] A nowhere analytic infinite sum for tetration. tommy1729 0 840 03/20/2018, 12:16 AM Last Post: tommy1729 [MO] Is there a tetration for infinite cardinalities? (Question in MO) Gottfried 10 10,399 12/28/2014, 10:22 PM Last Post: MphLee Remark on Gottfried's "problem with an infinite product" power tower variation tommy1729 4 4,497 05/06/2014, 09:47 PM Last Post: tommy1729 Problem with infinite product of a function: exp(x) = x * f(x)*f(f(x))*... Gottfried 5 6,032 07/17/2013, 09:46 AM Last Post: Gottfried Wonderful new form of infinite series; easy solve tetration JmsNxn 1 3,959 09/06/2012, 02:01 AM Last Post: JmsNxn the infinite operator, is there any research into this? JmsNxn 2 4,962 07/15/2011, 02:23 AM Last Post: JmsNxn Infinite tetration of the imaginary unit GFR 40 48,426 06/26/2011, 08:06 AM Last Post: bo198214 Infinite Pentation (and x-srt-x) andydude 20 23,451 05/31/2011, 10:29 PM Last Post: bo198214 Infinite tetration fractal pictures bo198214 15 20,692 07/02/2010, 07:22 AM Last Post: bo198214 Infinite towers & solutions to Lambert W-function brangelito 1 3,413 06/16/2010, 02:50 PM Last Post: bo198214
Users browsing this thread: 1 Guest(s) | 2019-07-17 05:29: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": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 32, "/images/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.8749791383743286, "perplexity": 2320.3524455190854}, "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/1563195525046.5/warc/CC-MAIN-20190717041500-20190717063500-00113.warc.gz"} |
http://mathhelpforum.com/advanced-math-topics/65570-solved-hermite-interpolating-polynomial.html | # Math Help - [SOLVED] Hermite Interpolating Polynomial
1. ## [SOLVED] Hermite Interpolating Polynomial
I saw a previous thread that was related, but it seemed to be missing some information, and it was never solved.
I know that for Hermite interpolation, every textbook has
$
K_{2n+1}(x) = \sum_{j=0}^n f(x_j) H_{n,j}(x) + \sum_{j=0}^n f'(x_j) \hat H_{n,j}(x)
$
where
$
H_{n,j}(x) = [1 - 2(x-x_j)L'_{n,j}(x_j)]L^2_{n,j}(x)
$
and
$
\hat H_{n,j}(x) = (x-x_j)L^2_{n,j}(x)
$
But how do I make it to the next step? What's the 3rd term, if I'm looking for $\tilde H_{n,j}(x)$ such that
$
\tilde H''_{n,j}(x_i) = \begin{cases}
1 &\text{ if } i=j\\
0 &\text{ otherwise}
\end{cases}
$
I would love to know if you could offer any help. I'm stumped...
2. Well, found my answer here.
I'll get back to you with any more questions plaguing me. | 2015-07-06 03:24:45 | {"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": 5, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.17869381606578827, "perplexity": 843.7174900242688}, "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-27/segments/1435375097861.54/warc/CC-MAIN-20150627031817-00055-ip-10-179-60-89.ec2.internal.warc.gz"} |
http://www.woodbetween.world/2012/06/ | ## Friday, June 29, 2012
### "Magic Isn't Supposed to Make Sense!"
I wrote a post a while ago that, really, was supposed to be about the plausible impossibility of interacting with any sort of "parallel universe", if one were to exist and going there were possible. So if you found a passage in to Narnia in some old professor's mansion, likely you'd find Narnia very much the way Digory and Polly found it - empty, lightless, and with nothing in it (not even the singing Lion).
However, while going there, I stopped to comment on fantasy fiction, which is how the thought struck me. Parallel worlds are pretty common, after all. Sort of in the vein if The Gods Themselves by Asimov (or more like it The Ring of Truth by Lake) I tried to think of a parallel universe that had an entirely different set of physical laws. Where things behaved totally differently. I guess it would have been a sort of partial ingress into Level IV multiverse theory? I don't assert such a universe would actually exist, just that modeling one would be neat. The goal was that the emergent behavior of these laws would make magic work. Or something so totally different that we would see it as magic... whereas the inhabitants therein would look at a light bulb from our world and cross themselves to ward off evil spirits.
So contained therein was this idea of "hard magic", analogous to "hard science" fiction.
## Wednesday, June 27, 2012
### Kingkiller Chronicles Speculation: Copper
I am going to continue posting my own speculation about the Kingkiller Chronicles. In a spasm of fanboy insanity, I had written up some twenty or so pages detailing everything I think I had deduced from the text. Recently, in his own blog, Patrick Rothfuss brought up a totally awesome copper knife a fan had made him, noting that it would be good in a fight against a Namer. Rothfuss said this showed the fans had been paying attention. I was glad to see that apparently I had been paying attention too, and that others (in the comments) had noted things similar to me on the use and possible function of copper in the books.
## Monday, June 25, 2012
### Zeno's Paradox and Why It Annoys Me
I have always been greatly annoyed by Zeno's paradoxes.
The reason why is due mostly to my stubborn pride at being ignored when I'm right. When I was in 10th grade trig, we learned Zeno's paradox of Achilles and the Tortoise. The problem so presented is an extremely simple algebraic equation, immediately solvable to anyone who has finished high school.
So in grade school, when I was taught this "paradox", I did solve it algebraically, almost before my teacher had finished reading it from the book, and I told her the answer, and she sort of gave me this exasperated smile and said "Yes, I know, but don't think about it that way." And ever since, mention of this paradox as anything other than an ancient Greek misunderstanding of mathematics has infuriated me.
Basically, Zeno's paradox amounts to asserting that the geometric series cannot be summed. Which is absurd; Archimedes was quite proficient at it, even in terms that Greeks would accept. Some examples are below. In terms of modern algebra, let $S$ be the sum of a geometric series; then
$$S = \sum_{n=0}^\infty a^n = 1+a+a^2+\cdots = 1+a\left(1+a+a^2+\cdots\right)=1+aS,$$
and rearranging, $S = \frac{1}{1-a},$ the formula you hopefully learned in high school.
## Friday, June 22, 2012
### Why Harry Potter is a Terrible Series
In modern fantasy fiction, there are essentially two prototypes of approach; that of Lord of the Rings and that of Narnia. Not that every work will copy one of these or be like one or the other or any other generalization that pedants will feel the need to scold me for, but that there's two basic, classic approaches to fantasy worlds.
The Narnian approach is simple, and usually followed by children's books. There's some hidden land of fantasy magic, it gets discovered, and you go on a fun tour through your imagination. It's almost an extended dream sequence. There's trolls and goblins and witches and elves and fairies and satyrs and... and it goes on. The magical creatures are there because they are magical creatures and this is a magical world. Nothing is really supposed to make sense, so much as present a fun escape from boring reality. The narrative space of the story is just a big bag for holding mythical creatures. It's fun. You're supposed to feel wonder at all the incredible surroundings, and not really think about why Medusa moved to New England and why no one has called the cops for missing persons.
It's pleasant, and there's nothing wrong with it.
## Wednesday, June 20, 2012
### Kingkiller Chronicles Speculation: Denna and Her Patron
This is the first in what may be a series of posts speculating on characters and events in the Kingkiller Chronicles.
SPOILER DENSE! Contains tons of things from the first two books in the series. Please don't read unless you've read both books carefully yourself.
As has been noted, the Kingkiller Chronicles leave open the unique opportunity of an unfinished epic fantasy series with a solid and fixed resolution. We know that whatever happens in the third book will bring us to the Waystone Inn. We know that Kvothe will trick a demon and kill an angel, and then kill a king, and somehow start the entire war with the Penitent King. We know that something is going to happen to unleash fairy creatures in to the world. The whole series has already been written (and is just being revised), so there are definite hints and foreshadows and the material can be trusted to lead somewhere. It's like a murder mystery in that regard.
Seeing the unique opportunity, I decided to wildly speculate, as have so many other fans.
In this post, I will focus on Denna. It is long.
## Monday, June 18, 2012
### To Stand on Charn
Since C.S. Lewis showed us a world on the other side of a wardrobe (and perhaps before), fantasy and science-fiction stories have abounded with this idea of traveling to parallel universes and experiencing strange new worlds. It's almost iconic: awkward teenager struggling in school and with bullies, gets sucked in to an alternate magical world, meets fascinating elves and confronts evil, and finds confidence to face real-world issues on his or her return.
Typical example
So here's my question: how do they interact with matter in the alternate universe?
## Friday, June 15, 2012
### Virtual Aristotelian Physics
I spent several hours the other day looking up some sort of reference to a computer simulation of Aristotelian physics.
The thought came to me in connection to fantasy worlds. Good fantasy authors will create their own fictional worlds with different histories, cultures, languages, and religions, similar to Tolkien's Lord of the Rings. Lately authors have started going kind of crazy, and have been experimenting with alternative physics, like flat earths and sentient quanta.
I was thinking, why not Aristotelian physics? Is it that impossible? A professor of an old friend of mine, remarking to a room of Thomistic philosophy students, asked why they were so enamored with Aristotle when you couldn't make your car run on Aristotelian physics. Maybe not their cars, but any car? Can a car run in a world of Aristotelian physics?
Aristotle with impetus
## Wednesday, June 13, 2012
### Smoke Rings
Last night it dawned on me that I consider the ability to blow smoke rings an essential part of fatherhood. There is of course financial stability, emotional support, supportive family structure. If I found out I would soon become a father, I would worry about these things. And I would also worry about being able to blow smoke rings.
I just would not feel ready to bring a child in to the world before I could blow smoke rings.
Maybe that sounds silly?
When I grew up, my favorite book was the Hobbit, by Tolkien. This was my favorite book because it was my dad's favorite book. (I don't know how many times I have watched the Rankin/Bass animated version of the Hobbit, and I don't care how much spectacular CGI Peter Jackson uses, Rankin/Bass' the Hobbit is THE movie version of the Hobbit. Forever.) My dad was a huge fan of all of Tolkien's work. And in addition to gripping fiction and overly-detailed world building, Tolkien was also really good at pipe smoking.
9/10ths of all Tolkien photos in existence
(Seriously. Do a Google image search for "Tolkien". Nine out of ten photos, he is smoking a pipe.)
So my dad smoked a pipe, too.
On the back of our old house, my dad had built what we all called the "bonzai porch". It was screened in, with a built-in water hose. In the winter we'd cover it in plastic and set out space heaters to keep the plants from dying. In the summer, my dad would sit on the back porch and smoke an old pipe and blow smoke rings, and my sister and I would play with them. We'd chase them around as the wind pulled them, or poke our fingers through them, or try to grab them like doughnuts.
And there is something magical about it. About smoke rings. The way they float out spinning in to the air, and then pause, hovering, then spread out like a lasso. It's mesmerizing to watch.
I don't know why that's such an ingrained memory of mine. When I think of my early childhood with my dad, I think of playing chess and smoke rings.
I sat on my back porch last night, pulled out an old paperback copy of the Hobbit I got at a used bookstore, lit up my pipe, and practiced my smoke rings. I'm not very good at it yet, but luckily I still have plenty of time to perfect the art.
### Why Blog?
I recently decided to start a blog. This blog.
There's some amount of self-consciousness that goes in to that decision. Am I doing this because I think I'm so important and brilliant that my thoughts matter to anyone? Is it conceit? Is it desperation? Are people going to see me as self-important and conceited and desperate?
The idea has been rattling in my head for a while to start a new blog. I say "a new blog" because I have an old blog. The old blog I started to express theological and apologetic ideas I was exploring at that time. It was really thick and heavy, and sometimes uncomfortable. And sometimes mean.
And I wanted to talk about different things, sometimes.
Currently, I am a graduate student in physics. Going on my third year. I have been in my research for about a semester and am still learning the ropes. The research isn't anything sexy, like dark energy or string theory; I use some computer algorithms to calculate electronic properties of crystalline solids. It's useful. (I have not even begun thinking about what a thesis might possibly cover, so please do not ask when I graduate.)
Sometimes I have ideas pertaining to physics, or science more generally, or to math (I majored in math), and will want to share it. Nothing groundbreaking or even researched - just thoughts I have. I might use math to express those thoughts, and if you don't understand mathematical notation then you might just learn something. I 'm still learning, a lot.
I enjoy reading. Mostly I read fantasy literature (knights and dragons and wizards). If I get in to a book, I will cease all activity until I finish it. Like, I will cut out eating and sleeping. I got a "B" in second semester quantum mechanics (angular momentum and perturbation) because I started reading George Martin's Song of Ice and Fire series the week before finals and ended up not studying and barely sleeping. If left to my own devices I would just read constantly.
It happens when reading that something in a story strikes me, or that there's an unfinished series and fans are speculating on how it will end (I'm thinking of Song of Ice and Fire and Kingkiller Chronicles in particular at the moment). I'd like to share that sort of stuff, with whoever would read it.
I'm also an evangelical Christian. To some of you, that means "embodiment of pure evil". Fine. I used to be worried other people in the physics community would think less of me if they learned that, and that it might affect my employment prospects, but I have ceased caring. If you find me less intelligent because of my religion, all the problem there is on your end. But sometimes Christian overtones will come out in things I say, when I'm being good.
Anyway, the reason I want to start a blog, is because I want to. I enjoy talking about certain things and I want a place to talk about them. I would like as many people as possible to be able to agree or disagree with the things I say, beyond just the usual people that I talk to. So there. I started a blog. | 2017-11-19 04:55: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": 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.38379356265068054, "perplexity": 3086.4296451406162}, "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/1510934805362.48/warc/CC-MAIN-20171119042717-20171119062717-00241.warc.gz"} |
https://tex.stackexchange.com/questions/301374/using-the-symbol-in-equations | # Using the # symbol in equations
I want to use the # symbol in Latex equations. I already tried \#, but it is not working: When the # symbol appears in an equation, then the rest becomes a $ sign instead of #. Here is my code: ({12#-3-4\div 5#3\%}) • \# should be what you need – egreg Mar 29 '16 at 10:45 • If \# isn't working, you must be loading other font package which is replacing it. – John Kormylo Mar 29 '16 at 14:27 ## 1 Answer In LaTeX #$ % & ~ _ ^ \ { } are treated as reserved characters. If we need to print these characters, we must add backslash before them. This works for
\#
\\$
\%
\&
\_
\{
\}
(not for ^, ~ and \).
For instance, % (percent symbol) is used to comment any content in a document or in a template. To print percent symbol we should type \%
For your problem the solution is to type \#.
• @DavidCarlisle -- since when does \^ print only the circumflex? last time i looked, this was a text accent (and must be put over something), and triggered an error in math. – barbara beeton Mar 29 '16 at 12:39
• sorry meant to say # and % I point but it doesn't work for ^ later in same line:-) I'll delete and re-add – David Carlisle Mar 29 '16 at 12:41
• This answer happens to work for # and % but is wrong for \\ , \^, \~ – David Carlisle Mar 29 '16 at 12:42 | 2019-08-22 18:55: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": 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.9615059494972229, "perplexity": 2651.4279486191863}, "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-35/segments/1566027317339.12/warc/CC-MAIN-20190822172901-20190822194901-00246.warc.gz"} |
http://en.wikipedia.org/wiki/Clifton%e2%80%93Pohl_torus | # Clifton–Pohl torus
In geometry, the Clifton–Pohl torus is an example of a compact Lorentzian manifold that is not geodesically complete. While every compact Riemannian manifold is also geodesically complete (by the Hopf–Rinow theorem), this space shows that the same implication does not generalize to pseudo-Riemannian manifolds.[1] It is named after Yeaton H. Clifton and William F. Pohl, who described it in 1962 but did not publish their result.[2]
## Definition
Consider the manifold $\mathrm{M} = \mathbb{R}^2 - \{0\}$ with the metric
$g= \frac{dx \otimes dy + dy \otimes dx}{x^2+y^2}$
Multiplication by any real number is an isometry of $M$, in particular including the map:
$\lambda(x,y)=(2x,2y)$
Let $\Gamma$ be the subgroup of the isometry group generated by $\lambda$. Then $\Gamma$ has a proper, discontinuous action on $M$. Hence the quotient $T = M/\Gamma$, which is topologically the torus, is a Lorentz surface.[1]
## Geodesic incompleteness
It can be verified that the curve
$\sigma(t) = \left(\frac{1}{1-t},0\right)$
is a geodesic of M that is not complete (since it is not defined at $t=1$).[1] Consequently, $M$ (hence also $T$) is geodesically incomplete, despite the fact that $T$ is compact. Similarly, the curve
$\sigma(t) = (\tan t, 1)$
is a null geodesic that is incomplete. In fact, every null geodesic on $M$ or $T$ is incomplete.
## References
1. ^ a b c O'Neill, Barrett (1983), Semi-Riemannian Geometry With Applications to Relativity, Pure and Applied Mathematics 103, Academic Press, p. 193, ISBN 9780080570570.
2. ^ Wolf, Joseph A. (2011), Spaces of constant curvature (6th ed.), AMS Chelsea Publishing, Providence, RI, p. 95, ISBN 978-0-8218-5282-8, MR 2742530. | 2015-04-21 05:26:30 | {"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": 17, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.8879698514938354, "perplexity": 499.95856043623724}, "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/1429246640124.22/warc/CC-MAIN-20150417045720-00056-ip-10-235-10-82.ec2.internal.warc.gz"} |
https://centront.com/5rq9g/hall-coefficient-formula-a4f3a4 | The Hall coefficient is the ratio of the induced electric field to the product of the current density and the applied magnetic field. It is a characteristic of the material from which the conductor is made. It is represented by R H. Mathematical expression for Hall Coefficient (R H) is 1/(qn). A digital multimeter was connected across the sample (for measuring the sample voltage) using the lower set of sockets. J. Hall Coefficient. A direct formula for the Hall coefficient is derived by using the non‐equilibrium statistical operator formalism of Zubarev‐McLennan. The Hall coefficient (or hall constant) is defined as the ratio of the induced electric field to the product of the current density and the applied magnetic field. The Hall coefficient R H is the factor multiplying the product of the current density and the magnetic field to get the Hall field. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share … Hall … Apparatus: Two solenoids, Constant current supply, Four probe, Digital gauss meter, Hall effect apparatus (which consist of Constant Current Generator (CCG), digital milli voltmeter and Hall probe). The value of Hall coefficient depends on the type, number, and properties of the charge carriers that constitute the current. Click hereto get an answer to your question ️ The dimensional formula of the Hall coefficient is? The Hall effect is due to the nature of the current in a conductor. Hall coefficients may be determined experimentally and may vary with temperature. B is the magnetic Field Strength . Thermodynamics formulas list online. Hall effect formula enables one to determine whether a material serves as a semiconductor or an insulator. It is a characteristic of the material from which the conductor is made, since its value depends on the type, number, and properties of the charge carriers that constitute the current. Hall Voltage formula. The Hall coefficient in the low-temperature tetragonal phase and the midtemperature orthorhombic phase of (formula presented) single crystals is measured under high magnetic fields up to 9 T in order to investigate the detailed behavior of the transport properties at low temperatures in the stripe phase. E. H. Hall, "On a New Action of the Magnet on Electrical Current," Amer. (a) Electrons move to the left in this flat conductor (conventional current to the right). Formula. q is the charge. The motivation for compiling this table is the existence of conflicting values in the " popular" literature in which tables of Hall coefficients are given. EXPERIMENTAL SETUP AND PROCEDURE A. Hall Effect Sensors consist basically of a thin piece of rectangular p-type semiconductor material such as gallium arsenide (GaAs), indium antimonide (InSb) or indium arsenide (InAs) passing a continuous current through itself. The Drude model thus predicts nq RH 1 = . Hall Co-efficient: The hall coefficient can be defined as the Hall’s field per unit current density per unit magnetic field. Hall effect measurements using van der Pauw sample configuration allows determination of: •Charge carrier type (n or p) •Charge carrier density (#/cm3) •Relevant Hall mobility (cm2/V-s) •Investigations of carrier scattering, transport phenomena as f(T) and other variables. The Hall correlation is based on laboratory data and is considered reasonable for normally pressured sandstones. Variables. R is Hall resistance; Hall Effect Derivation in Semiconductors. 2, 287-292 (1879). The Hall effect studies also assumed importance because of an anomaly observed between the sign of the charge carriers indicated by Hall coefficient and S in amorphous semiconductors. Mathematically it can be given as:-In extrinsic semiconductor the current carrying charge carriers are of one type either electrons or hole, like in N-type semiconductor the charge carriers are electrons and in P-type semiconductor the charge carriers are holes. d is the thickness of the sensor. Physics is filled with equations and formulas that deal with angular motion, Carnot engines, fluids, forces, moments of inertia, linear motion, simple harmonic motion, thermodynamics, and work and energy. The Hall Coefficient (R H) is positive if the number of positive charge Holes are more than the number of negative charge Electrons. Current consists of the movement of many small charge carriers, typically electrons, holes, ions or all three. Here’s a list of some important physics formulas and equations to keep on hand — arranged by topic — so you don’t have to go searching […] 10.05 (2000). In reality, the probability of collision depends in a complicated way on both the initial and final states. By analogy with the conventional Hall coefficient, ... To this end, the field dependence of R A = R A [ν H (B), ν(B)] originates from changes in both longitudinal and Hall viscosities. The band gap energy of (undoped) germanium An undoped germanium sample was placed into a Hall effect module (HEM) connected to a 12 V AC power supply. Related formulas. Bei der Messung des Hall-Effekts bestimmt sie als Proportionalitätsfaktor die Hall-Spannung $U_\mathrm{H}$ gemäß $U_\mathrm{H} = A_\mathrm{H} \frac{IB_z}d,$ wenn die untersuchte Schicht die Dicke $d$ hat. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share … This is most evident in a thin flat conductor as illustrated. In order to determine how strong the relationship is between two variables, a formula must be followed to produce what is referred to as the coefficient value. The Editors of Encyclopaedia Britannica This article was most recently revised and updated by Adam Augustyn, Managing Editor, Reference Content. The most well-known and used correlation for formation compressibility was developed by Hall, and is a function only of porosity. In semiconductors, electrons and holes contribute to different concentrations and mobilities which makes it difficult for the explanation of the Hall coefficient given above. With a brief light shed on its applications, let us move on to how you can make the Hall effect derivation from scratch. On … The formula for the Hall coefficient expressed by correlation functions is discussed in the weak scattering limit, and the equivalence to the Kubo expression for the Hall coefficient is shown. The Hall coefficient can be calculated from the measured current, I x, and measured voltage, V H: W tL I B V x z H R H = (2.7.40) A measurement of the Hall voltage is often used to determine the type of semiconductor (n-type or p-type) the free carrier density and the carrier mobility. Hall coefficient of the sample in question have been found. Figure 1. The two most widely used units for the Hall coefficients are SI units, m 3 /A-sec = m 3 /C, and the hybrid unit Ohm-cm/G (which combines the practical quantities volt and amp with the cgs quantities centimeter and Gauss). The Hall voltage represented as V H is given by the formula: $$V_H=\frac{IB}{qnd}$$ Here, I is the current flowing through the sensor. We can derive a useful expression by equating the magnetic and electric forces: qvB = qE. The full formula for ν(B) is given above, whereas the same semiclassical consideration (16, 24) for the Hall viscosity yields ν H (B) = ν 0 B B 0 B 2 + B 0 2. The Hall constant thus gives a direct indication of the sign of the charge carriers; it is negative for electrons (q =−e) and positive for holes (q =+e). Hall Effect. "Standard Test Methods for Measuring Resistivity and Hall Coefficient and Determining Hall Mobility in Single-Crystal Semiconductors," ASTM Designation F76, Annual Book of ASTM Standards, Vol. Hall Coefficient Calculator. The Hall effect is the production of a voltage difference (the Hall voltage) across an electrical conductor, transverse to an electric current in the conductor and a magnetic field perpendicular to the current. But in fact equation 4 is a very simplified view of the system which involves many simplifying assumptions regarding the collisions of the electrons. Formula: V h = R h B z I z / w Where, V h = Hall Voltage in a Rectangular Strip R h = Hall Coefficient B z = Magnetic Flux Density I z = Applied Current w = Strip Thickness Related Calculator: It tends to under-predict formation compressibility under high pressure conditions. The Hall Coefficient (or Constant) RH is officially defined as this proportionality constant: Ey =RH JB. The Hall effect. Hall effect definition finds immense application in integrated circuits (ICs) in the form of Hall effect sensors. The Hall coefficient is defined as the ratio of the induced electric field to the product of the current density and the applied magnetic field. The Hall coefficient, R H, is in units of 10-4 cm 3 /C = 10-10 m 3 /C = 10-12 V.cm/A/Oe = 10-12. ohm.cm/G. The magnetic field is directly out of the page, represented by circled dots; it exerts a force on the moving charges, causing a voltage ε, the Hall emf, across the conductor. It is a characteristic of the material from which the conductor is made, since its value depends on the type, number, and properties of the charge carriers that constitute the current. n is the number of charge carriers per unit volume. If an electric current flows through a conductor in a magnetic field, the magnetic field exerts a transverse force on the moving charge carriers which tends to push them to one side of the conductor. Die Hall-Konstante $A_\mathrm{H}$, die auch Hall-Koeffizient genannt wird, ist eine (temperaturabhängige) Materialkonstante, die in Kubikmeter pro Coulomb angegeben wird. Therefore, for the simple explanation of a moderate magnetic field, the following is the Hall coefficient: Abstract. Hall effect is another important transport phenomenon and has been extensively studied in amorphous semiconductors. 20 III. Hall. Math. To calculate the Hall coefficient and the carrier concentration of the sample material. formula for the Hall Coefficient, already stated in equation 4, in terms of the charge of the carrier, and the charge density. Hall coefficient. The Hall coefficient R H is given by, Hall Coefficient. Sure, you can get a more "general" formula for the Hall coefficient if instead of q (the electron charge) you put the charge of the specific carrier, and instead of n or p you put the concentration of the specific carrier. The Hall Effect 1 Background In this experiment, the Hall Effect will be used to study some of the physics of charge transport in metal and semiconductor samples. The Magnet on Electrical current, '' Amer the right ) is based on laboratory data and is a of... The right ) product of the current on its applications, let us move on to you! Has been extensively studied in amorphous Semiconductors as this proportionality Constant: Ey =RH JB by... Current to the right ) characteristic of the current density and the applied field. Coefficient R H is the ratio of the material hall coefficient formula which the conductor is made a very simplified view the... '' Amer a New Action of the system which involves many simplifying assumptions regarding the collisions the! Coefficient and the applied magnetic field to the product of the system which involves many simplifying assumptions regarding the of. Applications, let us move on to how you can make the Hall coefficient of the Magnet Electrical!: qvB = qE application in integrated circuits ( ICs ) in the form Hall! Number of charge carriers, typically electrons, holes, ions or all three movement of many charge! Which involves many simplifying assumptions regarding the collisions of the Magnet on hall coefficient formula current, '' Amer to... Material from hall coefficient formula the conductor is made expression for Hall coefficient ( R H ) is (! Is the ratio of the induced electric field to the nature of the current density and the magnetic to. By Adam Augustyn, Managing Editor, Reference Content the Magnet on Electrical current, '' Amer temperature... Coefficient of the electrons the most well-known and used correlation for formation compressibility under high conditions... R is Hall resistance ; Hall effect Derivation in Semiconductors depends in complicated... On … Hall coefficient of the Magnet on Electrical current, ''.! Carriers that constitute the current density and the carrier concentration of hall coefficient formula charge carriers typically... Multiplying the product of the induced electric field to the nature of the induced electric to... Magnetic field both the initial and final states given by, Hall coefficient is function only of.! Been found it is represented by R H. Mathematical expression for Hall coefficient the! Given by, Hall coefficient R H is the factor multiplying the product of the carriers. Hall coefficient and the carrier concentration of the sample ( for measuring the (! The induced electric field to the right ) the value of Hall coefficient and the magnetic field a complicated on. Shed on its applications, let us move on to how you can make the Hall coefficient and carrier! Reference Content current in a conductor the ratio of the material from the... Brief light shed on its applications, let us move on to how you make... Get an answer to your question ️ the dimensional formula of the induced electric to! Is most evident in a thin flat conductor as illustrated Managing Editor, Reference Content calculate Hall! To the left in this flat conductor ( conventional current to the of... ) electrons move to the left in this flat conductor ( conventional current to product! The right ) the dimensional formula of the charge carriers hall coefficient formula typically electrons holes! The non‐equilibrium statistical operator formalism of Zubarev‐McLennan Drude model thus predicts nq RH 1 = have., and properties of the Hall coefficient R H is the ratio of the sample )., on a New Action of the sample in question have been found, the probability of collision in. By Adam Augustyn, Managing Editor, Reference Content on both the initial and final states lower of! Forces: qvB = qE expression for Hall coefficient Calculator is Hall resistance ; Hall effect Derivation from scratch Action. Type, number, and is considered reasonable for normally pressured sandstones R is. Its applications, let us move on to how you can make the Hall coefficient ( H! Only of porosity H ) is 1/ ( qn ), holes, ions or all three and... The Magnet on Electrical current, '' Amer this flat conductor as.... Formula of the charge carriers, typically electrons, holes, ions or all three the current and... Coefficient of the material from which the conductor is made the sample question... H ) is 1/ ( qn ) Adam Augustyn, Managing Editor, Reference Content Drude model thus predicts RH! Immense application in integrated circuits ( ICs ) in the form of Hall coefficient is the of! This article was most recently revised and updated by Adam Augustyn, Managing Editor, Reference...., number, and properties of the charge carriers that constitute the current and is reasonable... By Hall, on a New Action of the current in a conductor ''.... Model thus predicts nq RH 1 = answer to your question ️ dimensional. Of Encyclopaedia Britannica this article was most recently revised and updated by Adam Augustyn, Managing,! Function only of porosity formula for the Hall field the type, number, and is a simplified... Predicts nq RH 1 = dimensional formula of the electrons 1/ ( qn ) get. The applied magnetic field that constitute the current density and the magnetic and electric forces: =... Effect sensors the most well-known and used correlation for formation compressibility was developed Hall! ) using the lower set of sockets it is a function only of porosity definition finds immense in! A brief light shed on its applications, let us move on to how can... Involves many simplifying assumptions regarding the collisions of the Magnet on Electrical current, '' Amer value Hall... Electrons, holes, ions or all three the initial and final states is made Constant ) RH is defined! By using the lower set of sockets e. H. Hall, on a New Action of electrons... Assumptions regarding the collisions of the current in a conductor it tends to under-predict formation compressibility was developed by,! Under high pressure conditions, Managing Editor, Reference Content a digital multimeter was connected the... Of many small charge carriers that constitute the current density and the carrier concentration of the sample ( measuring. Derive a useful expression by equating the magnetic field to the right ) Encyclopaedia Britannica this was! Correlation is based on laboratory data and is a characteristic of the current in a thin conductor... How you can make the Hall field which the conductor is made Reference Content is considered reasonable for pressured. For formation compressibility under high pressure conditions reasonable for normally pressured sandstones sample ( for the! Derived by using the non‐equilibrium statistical operator formalism of Zubarev‐McLennan coefficient R H is. on a New Action of the charge carriers that constitute the current density and the magnetic electric. Click hereto get an answer to your question ️ the dimensional formula of the current density and the concentration. Derive a useful expression by equating the magnetic field product of the carriers... Per unit volume type, number, and is considered reasonable for normally pressured sandstones move on to you. The non‐equilibrium statistical operator formalism of Zubarev‐McLennan the nature of the electrons very simplified view of the sample voltage using... Britannica this article was most recently revised and updated by Adam Augustyn, Managing Editor Reference. Coefficient and the magnetic and electric forces: qvB = qE, coefficient. Is the factor multiplying the product of the Hall effect is due to the left this... In a conductor electrons move to the nature of the sample ( for measuring the sample voltage ) using non‐equilibrium! Managing Editor, Reference Content voltage ) using the lower set of sockets to formation! And is a function only of porosity the Hall coefficient ( R H is the multiplying. Or Constant ) RH is officially hall coefficient formula as this proportionality Constant: Ey =RH JB a flat... Mathematical expression for Hall coefficient R H ) is 1/ ( qn.! Is made material from which the conductor is made the probability of collision depends in a thin flat as. Of the current hall coefficient formula measuring the sample in question have been found the initial and final states is! The Drude model thus predicts nq RH 1 = the ratio of the current density and the magnetic! Simplifying assumptions regarding the collisions of the movement of many small charge that. Finds immense application in integrated circuits ( ICs ) in the form Hall. The left in this flat conductor ( conventional current to the left in flat! Material from which the conductor is made shed on its applications, us... On … Hall coefficient R H is given by, Hall coefficient is derived by the... The movement of many small charge carriers per unit volume digital multimeter was connected the... A brief light shed on its applications, let us move on to how you can make the field! On laboratory data and is considered reasonable for normally pressured sandstones the induced electric field to the product the! Sample voltage ) using the non‐equilibrium statistical operator formalism of Zubarev‐McLennan induced electric field to get the Hall coefficient derived..., '' Amer 1/ ( qn ) circuits ( ICs ) in the form of Hall effect definition immense..., '' Amer officially defined as this proportionality Constant: Ey =RH JB in integrated (! The Magnet on Electrical current, '' Amer many simplifying assumptions regarding the collisions of the Hall correlation is on. A ) electrons move to the product of the Magnet on Electrical current, '' Amer amorphous.. Is made the lower set of sockets considered reasonable for normally pressured sandstones nq RH 1 = electric! Direct formula for the Hall coefficient ( R H ) is 1/ ( qn ) simplified view the! Conductor as illustrated the Magnet on Electrical current, '' Amer hall coefficient formula pressured sandstones typically electrons holes! Hall resistance ; Hall effect is due to the product of the system which involves simplifying!
Wall Mount Farmhouse Trough Sink, Land For Sale With Fresh Water Spring, Genetic Testing For Cancer Treatment, Where Did The Irish Settle In Canada, Rubber Curb Ramps, Gold Roses Animal Crossing, What Is The Music Id For Renegade, Pay Council Tax Bournemouth Online, Nsa Mathematician Job, Cisco Security Case Study, Embassy Suites Beaverton, | 2021-07-27 09:19:28 | {"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.7242128252983093, "perplexity": 1286.5649916763969}, "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-31/segments/1627046153223.30/warc/CC-MAIN-20210727072531-20210727102531-00520.warc.gz"} |
http://gradestack.com/CBSE-Class-10th-Course/Quadratic-Equation/Introduction/15042-3000-5163-study-wtw | # Introduction
The Babylonians around 1800 BC, displayed on tablets that they could solve equations of the form,
this actually reduces to the form,
, which is a quadratic equation.
Sulba sutras, in ancient India, had explored quadratic equations of the form ax2 = c and ax2 + bx = c, using geometric methods. Babylonian mathematicians circa and Chinese mathematicians had used the method of completing the square to solve quadratic equations with positive roots, but had failed to generate a general formula. It was Euclid, the Greek mathematician, who gave a more abstract geometrical method. Then, Brahmagupta tried to give more explicit general solution to
quadratic equation as, which is not in practice though.
Mohammad bin Musa Al-kwarismi gave a working rule for positive solutions based on Brahmagupta's findings. It was, Bhāskara II, an Indian mathematician and astronomer, who gave the first general solution to the quadratic equation with two roots. | 2017-01-17 15:35:08 | {"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.8709888458251953, "perplexity": 1445.4366540786325}, "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/1484560279923.28/warc/CC-MAIN-20170116095119-00155-ip-10-171-10-70.ec2.internal.warc.gz"} |
https://kullabs.com/classes/subjects/units/lessons/notes/note-detail/8231 | Notes on Circular, Restricted permutation | Grade 12 > Mathematics > Permutation and combination | KULLABS.COM
Notes, Exercises, Videos, Tests and Things to Remember on Circular, Restricted permutation
Please scroll down to get to the study materials.
• Note
• Things to remember
#### Circular Permutations:
If the arrangements of objects are taken in circular order instead of a line then it is known as a circular permutation. For example, the arrangements of people in a round table. In such case
Example:In how many ways can 8 students be seated in a circle and in a line?
Solution:
The 8 students can be seated in a circle in (8-1)! = 7! =5070 ways
The 8 students can be seated in a line in 8! = 40320 ways
Restricted Permutation:
A Restricted permutation is a special type of permutation in which certain types of objects or data are always included or excluded and if they can come together or always stay apart.
(a)Number of permutations of ‘n’ things, taken ‘r’ at a time, when a particular thing is to be always included in each arrangement
= r n-1 Pr-1
(b)Number of permutations of ‘n’ things, taken ‘r’ at a time, when a particular thing is fixed: = n-1 Pr-1
(c) TheNumber of permutations of ‘n’ things, taken ‘r’ at a time when a particular thing is never taken: = n-1 Pr.
(d) TheNumber of permutations of ‘n’ things, taken ‘r’ at a time, when ‘m’ specified things always come together = m! x ( n-m+1) !
(e) TheNumber of permutations of ‘n’ things, taken all at a time, when ‘m’ specified things always come together = n ! - [ m! x (n-m+1)! ]
Example: How many words can be formed with the letters of the word ‘NOTES’ when:
(i)‘N’ and ‘S’ occupying end places.
(ii)‘E’ being always in the middle
(iii)Vowels occupying odd-places
(iv)Vowels being never together.
Ans.
(i) When ‘N’ and ‘S’ occupying end-places
O.T.S (NS)
Here (NS) are fixed, hence O, T, S can be arranged in 3! ways
But (NS or SN) can be arranged themselves is 2! ways.
Total number of words = 3! x 2! = 12 ways.
(ii)When ‘E’ is fixed in the middle N.O.(E),T.S.
Hence four-letter N.O.T.S can be arranged in 4! i.e 24 ways.
(iii)Two vowels (O,E,) can be arranged in the odd places (1st, 3rd)OR (3rd,5th) or (1st,5th)= 2! x 2! x 2! ways = 8 ways
And three consonants (N,T,S) can be arranged in the even place (2nd, 4th) = 2 ! ways
The total number of ways=8 x2!=16 ways.
(iv)Total number of words = 5! = 120!
If all the vowels come together, then we have: (O.E.),N,T,S
These can be arranged in 4! ways.
But (O,E.) can be arranged themselves in 2! ways.
Number of ways, when vowels come together = 4! x 2!= 28 ways
The number of ways, when vowels being never-together= 120-28 = 92 ways.
Misclleceneous Problem of Circular and Restricted permutation:
Example:Find the number of ways in which 5 people A,B,C,D,E can be seated at a round table, such that
(i) A and B must always sit together.
(ii) C and D must not sit together.
Soln. (i) If we wish to set A and B together in all arrangements, we can consider these two as one unit, along with 3 others. So effectively we’ve to arrange 4 people in a circle, the number of ways being (4 – 1)! or 6.
But in each of these arrangements, A and B can themselves interchange places in 2 ways.
Therefore, the total number of ways will be 6 x 2 = 12.
(ii) The number of ways, in this case would be obtained by removing all those cases (from the total possible) in which C & D are together. The total number of ways will be (5 – 1)! or 24. Similar to (i) above, the number of cases in which C & D are seated together will be 12. Therefore the required number of ways will be 24 – 12 = 12.
Example:
In how many ways can 3 men and 3 ladies be seated at around table such that no two men are seated together?
Soln. Since we don’t want the men to be seated together, the only way to do this is to make the men and women sit alternately. We’ll first set the 3 women, on alternate seats, which can be done in (3 – 1)! or 2 ways.(We’re ignoring the other 3 seats for now. If each of the women is shifted by a seat in any direction, the seating arrangement remains exactly the same. That is why we have only 2 arrangements.
Now that we’ve done this, the 3 men can be seated in the remaining seats in 3! or 6 ways. Note that we haven’t used the formula for circular arrangements now. This is so because, after the women are seated, shifting the each of the men by 2 seats, will give a different arrangement. After fixing the position of the women (same as ‘numbering’ the seats), the arrangement of the remaining seats is equivalent to a linear arrangement.
Therefore the total number of ways, in this case will be 2! X 3! = 12.
Taken reference from
( Basic mathematics Grade XII and A foundation of Mathematics Volume II and Wikipedia.com )
• The number of circular permutations of n different objects is (n-1)!
• A Restricted permutation is a special type of permutation in which certain types of objects or data are always included or excluded and if they can come together or always stay apart.
• Number of permutations of ‘n’ things, taken ‘r’ at a time, when a particular thing is to be always included in each arrangement
= r n-1 Pr-1
• Number of permutations of ‘n’ things, taken ‘r’ at a time, when a particular thing is fixed: = n-1 Pr-1
• TheNumber of permutations of ‘n’ things, taken ‘r’ at a timewhen a particular thing is never taken: = n-1 Pr.
• TheNumber of permutations of ‘n’ things, taken ‘r’ at a time, when ‘m’ specified things always come together = m! x ( n-m+1) !
• TheNumber of permutations of ‘n’ things, taken all at a time, when ‘m’ specified things always come together = n ! - [ m! x (n-m+1)! ]
.
0%
## ASK ANY QUESTION ON Circular, Restricted permutation
No discussion on this note yet. Be first to comment on this note | 2020-07-13 13:17:24 | {"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.8119485378265381, "perplexity": 903.2972583331864}, "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-29/segments/1593657145436.64/warc/CC-MAIN-20200713131310-20200713161310-00432.warc.gz"} |
https://socratic.org/questions/how-many-grams-of-solute-are-present-in-50-ml-of-0-360-m-sodium-chloride | # How many grams of solute are present in 50 mL of 0.360 M sodium chloride?
##### 1 Answer
Jul 11, 2016
There are 1.05g of solute present.
#### Explanation:
Let's start off with the equation for molarity:
We are given the molarity and the volume of solution. The only issue is that the volume is given in mL instead of L. This issue can be fixed by using the following conversion factor:
$\textcolor{w h i t e}{a a a a a a a a a a a a a a a a a a a a a} 1000 m L = 1 L$
Therefore, if we divide 50mL by 1000mL we will obtain a value of 0.05L.
Next, the equation has to be rearranged to solve for the moles of solute:
Moles of solute = Molarity $\times$ Liters of solution
Now, multiply 0.360 M by 0.05:
("0.360 mol")/("1 L") xx "0.05 L" = "0.018 mol"
To obtain the mass of solute, we will need to the molar mass of NaCl, which is 58.44 g/mol:
Finally, multiply the number of moles by 58.44 g/mol
0.018 cancel"mol" xx (58.44g)/(1cancel"mol")
Boom, here it is:
$1.05 g$ | 2020-02-16 18:45:53 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 5, "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.6397542357444763, "perplexity": 2180.9821003939414}, "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-2020-10/segments/1581875141396.22/warc/CC-MAIN-20200216182139-20200216212139-00346.warc.gz"} |
http://www.martinbroadhurst.com/finding-the-height-of-a-binary-tree-recursively.html | # Finding the height of a binary tree recursively
The height of a node in a binary tree is simply the maximum of the height of its left and right subtrees, plus one.
This lends itself to a simple recursive algorithm for finding the height of a binary tree.
static int max(int a, int b)
{
if (a >= b) {
return a;
}
return b;
}
unsigned int binarytree_height_recursive(const btnode *node)
{
unsigned int height = 0;
if (node->left || node->right) {
height = max(node->left ? binarytree_height_recursive(node->left) : 0,
node->right ? binarytree_height_recursive(node->right) : 0) + 1;
}
return height;
}
unsigned int binarytree_height(const binarytree *tree)
{
unsigned int height = 0;
if (tree->root) {
height = binarytree_height_recursive(tree->root);
}
return height;
} | 2019-06-26 10:23:21 | {"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.32518842816352844, "perplexity": 6949.164856233379}, "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-26/segments/1560628000266.39/warc/CC-MAIN-20190626094111-20190626120111-00238.warc.gz"} |
https://qiskit.org/documentation/locale/ko_KR/stubs/qiskit.aqua.algorithms.QAOA.html | # qiskit.aqua.algorithms.QAOA¶
class QAOA(operator=None, optimizer=None, p=1, initial_state=None, mixer=None, initial_point=None, gradient=None, expectation=None, include_custom=False, max_evals_grouped=1, aux_operators=None, callback=None, quantum_instance=None)[소스]
The Quantum Approximate Optimization Algorithm.
QAOA is a well-known algorithm for finding approximate solutions to combinatorial-optimization problems. The QAOA implementation in Aqua directly extends VQE and inherits VQE’s general hybrid optimization structure. However, unlike VQE, which can be configured with arbitrary variational forms, QAOA uses its own fine-tuned variational form, which comprises $$p$$ parameterized global $$x$$ rotations and $$p$$ different parameterizations of the problem hamiltonian. QAOA is thus principally configured by the single integer parameter, p, which dictates the depth of the variational form, and thus affects the approximation quality.
An optional array of $$2p$$ parameter values, as the initial_point, may be provided as the starting beta and gamma parameters (as identically named in the original QAOA paper) for the QAOA variational form.
An operator may optionally also be provided as a custom mixer Hamiltonian. This allows, as discussed in this paper for quantum annealing, and in this paper for QAOA, to run constrained optimization problems where the mixer constrains the evolution to a feasible subspace of the full Hilbert space.
An initial state from Aqua’s initial_states may optionally be supplied.
매개변수
• operator (Union[OperatorBase, LegacyBaseOperator, None]) – Qubit operator
• optimizer (Optional[Optimizer]) – A classical optimizer.
• p (int) – the integer parameter p as specified in https://arxiv.org/abs/1411.4028, Has a minimum valid value of 1.
• initial_state (Optional[InitialState]) – An optional initial state to prepend the QAOA circuit with
• mixer (Union[OperatorBase, LegacyBaseOperator, None]) – the mixer Hamiltonian to evolve with. Allows support of optimizations in constrained subspaces as per https://arxiv.org/abs/1709.03489
• initial_point (Optional[ndarray]) – An optional initial point (i.e. initial parameter values) for the optimizer. If None then it will simply compute a random one.
• gradient (Union[GradientBase, Callable[[Union[ndarray, List]], List], None]) – An optional gradient operator respectively a gradient function used for optimization.
• expectation (Optional[ExpectationBase]) – The Expectation converter for taking the average value of the Observable over the var_form state function. When None (the default) an ExpectationFactory is used to select an appropriate expectation based on the operator and backend. When using Aer qasm_simulator backend, with paulis, it is however much faster to leverage custom Aer function for the computation but, although VQE performs much faster with it, the outcome is ideal, with no shot noise, like using a state vector simulator. If you are just looking for the quickest performance when choosing Aer qasm_simulator and the lack of shot noise is not an issue then set include_custom parameter here to True (defaults to False).
• include_custom (bool) – When expectation parameter here is None setting this to True will allow the factory to include the custom Aer pauli expectation.
• max_evals_grouped (int) – Max number of evaluations performed simultaneously. Signals the given optimizer that more than one set of parameters can be supplied so that potentially the expectation values can be computed in parallel. Typically this is possible when a finite difference gradient is used by the optimizer such that multiple points to compute the gradient can be passed and if computed in parallel improve overall execution time. Ignored if a gradient operator or function is given.
• aux_operators (Optional[List[Union[OperatorBase, LegacyBaseOperator, None]]]) – Optional list of auxiliary operators to be evaluated with the eigenstate of the minimum eigenvalue main result and their expectation values returned. For instance in chemistry these can be dipole operators, total particle count operators so we can get values for these at the ground state.
• callback (Optional[Callable[[int, ndarray, float, float], None]]) – a callback that can access the intermediate data during the optimization. Four parameter values are passed to the callback as follows during each evaluation by the optimizer for its current set of parameters as it works towards the minimum. These are: the evaluation count, the optimizer parameters for the variational form, the evaluated mean and the evaluated standard deviation.
• quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – Quantum Instance or Backend
__init__(operator=None, optimizer=None, p=1, initial_state=None, mixer=None, initial_point=None, gradient=None, expectation=None, include_custom=False, max_evals_grouped=1, aux_operators=None, callback=None, quantum_instance=None)[소스]
매개변수
• operator (Union[OperatorBase, LegacyBaseOperator, None]) – Qubit operator
• optimizer (Optional[Optimizer]) – A classical optimizer.
• p (int) – the integer parameter p as specified in https://arxiv.org/abs/1411.4028, Has a minimum valid value of 1.
• initial_state (Optional[InitialState]) – An optional initial state to prepend the QAOA circuit with
• mixer (Union[OperatorBase, LegacyBaseOperator, None]) – the mixer Hamiltonian to evolve with. Allows support of optimizations in constrained subspaces as per https://arxiv.org/abs/1709.03489
• initial_point (Optional[ndarray]) – An optional initial point (i.e. initial parameter values) for the optimizer. If None then it will simply compute a random one.
• gradient (Union[GradientBase, Callable[[Union[ndarray, List]], List], None]) – An optional gradient operator respectively a gradient function used for optimization.
• expectation (Optional[ExpectationBase]) – The Expectation converter for taking the average value of the Observable over the var_form state function. When None (the default) an ExpectationFactory is used to select an appropriate expectation based on the operator and backend. When using Aer qasm_simulator backend, with paulis, it is however much faster to leverage custom Aer function for the computation but, although VQE performs much faster with it, the outcome is ideal, with no shot noise, like using a state vector simulator. If you are just looking for the quickest performance when choosing Aer qasm_simulator and the lack of shot noise is not an issue then set include_custom parameter here to True (defaults to False).
• include_custom (bool) – When expectation parameter here is None setting this to True will allow the factory to include the custom Aer pauli expectation.
• max_evals_grouped (int) – Max number of evaluations performed simultaneously. Signals the given optimizer that more than one set of parameters can be supplied so that potentially the expectation values can be computed in parallel. Typically this is possible when a finite difference gradient is used by the optimizer such that multiple points to compute the gradient can be passed and if computed in parallel improve overall execution time. Ignored if a gradient operator or function is given.
• aux_operators (Optional[List[Union[OperatorBase, LegacyBaseOperator, None]]]) – Optional list of auxiliary operators to be evaluated with the eigenstate of the minimum eigenvalue main result and their expectation values returned. For instance in chemistry these can be dipole operators, total particle count operators so we can get values for these at the ground state.
• callback (Optional[Callable[[int, ndarray, float, float], None]]) – a callback that can access the intermediate data during the optimization. Four parameter values are passed to the callback as follows during each evaluation by the optimizer for its current set of parameters as it works towards the minimum. These are: the evaluation count, the optimizer parameters for the variational form, the evaluated mean and the evaluated standard deviation.
• quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – Quantum Instance or Backend
Methods
__init__([operator, optimizer, p, …]) type operator Union[OperatorBase, LegacyBaseOperator, None] set parameterized circuits to None compute_minimum_eigenvalue([operator, …]) Computes minimum eigenvalue. construct_circuit(parameter) Return the circuits used to compute the expectation value. construct_expectation(parameter) Generate the ansatz circuit and expectation value measurement, and return their runnable composition. find_minimum([initial_point, var_form, …]) Optimize to find the minimum cost value. Get the circuit with the optimal parameters. Get the minimal cost or energy found by the VQE. Get the simulation outcome of the optimal circuit. Helper function to get probability vectors for a set of params get probabilities for counts Preparing the setting of VQE into a string. run([quantum_instance]) Execute the algorithm with selected backend. set_backend(backend, **kwargs) Sets backend with configuration. Whether computing the expectation value of auxiliary operators is supported.
Attributes
aux_operators Returns aux operators backend Returns backend. expectation The expectation value algorithm used to construct the expectation measurement from the observable. initial_point Returns initial point operator Returns operator optimal_params The optimal parameters for the variational form. optimizer Returns optimizer quantum_instance Returns quantum instance. random Return a numpy random. setting Prepare the setting of VQE as a string. var_form Returns variational form
property aux_operators
Returns aux operators
반환 형식
Optional[List[Optional[OperatorBase]]]
property backend
Returns backend.
반환 형식
Union[Backend, BaseBackend]
cleanup_parameterized_circuits()
set parameterized circuits to None
compute_minimum_eigenvalue(operator=None, aux_operators=None)
Computes minimum eigenvalue. Operator and aux_operators can be supplied here and if not None will override any already set into algorithm so it can be reused with different operators. While an operator is required by algorithms, aux_operators are optional. To 〈remove〉 a previous aux_operators array use an empty list here.
매개변수
• operator (Union[OperatorBase, LegacyBaseOperator, None]) – If not None replaces operator in algorithm
• aux_operators (Optional[List[Union[OperatorBase, LegacyBaseOperator, None]]]) – If not None replaces aux_operators in algorithm
반환 형식
MinimumEigensolverResult
반환값
MinimumEigensolverResult
construct_circuit(parameter)
Return the circuits used to compute the expectation value.
매개변수
parameter (Union[List[float], List[Parameter], ndarray]) – Parameters for the ansatz circuit.
반환 형식
List[QuantumCircuit]
반환값
A list of the circuits used to compute the expectation value.
construct_expectation(parameter)
Generate the ansatz circuit and expectation value measurement, and return their runnable composition.
매개변수
parameter (Union[List[float], List[Parameter], ndarray]) – Parameters for the ansatz circuit.
반환 형식
OperatorBase
반환값
The Operator equalling the measurement of the ansatz StateFn by the Observable’s expectation StateFn.
예외
AquaError – If no operator has been provided.
property expectation
The expectation value algorithm used to construct the expectation measurement from the observable.
반환 형식
ExpectationBase
find_minimum(initial_point=None, var_form=None, cost_fn=None, optimizer=None, gradient_fn=None)
Optimize to find the minimum cost value.
매개변수
• initial_point (Optional[ndarray]) – If not None will be used instead of any initial point supplied via constructor. If None and None was supplied to constructor then a random point will be used if the optimizer requires an initial point.
• var_form (Union[QuantumCircuit, VariationalForm, None]) – If not None will be used instead of any variational form supplied via constructor.
• cost_fn (Optional[Callable]) – If not None will be used instead of any cost_fn supplied via constructor.
• optimizer (Optional[Optimizer]) – If not None will be used instead of any optimizer supplied via constructor.
• gradient_fn (Optional[Callable]) – Optional gradient function for optimizer
반환값
Optimized variational parameters, and corresponding minimum cost value.
반환 형식
dict
예외
ValueError – invalid input
get_optimal_circuit()
Get the circuit with the optimal parameters.
반환 형식
QuantumCircuit
get_optimal_cost()
Get the minimal cost or energy found by the VQE.
반환 형식
float
get_optimal_vector()
Get the simulation outcome of the optimal circuit.
반환 형식
Union[List[float], Dict[str, int]]
get_prob_vector_for_params(construct_circuit_fn, params_s, quantum_instance, construct_circuit_args=None)
Helper function to get probability vectors for a set of params
get_probabilities_for_counts(counts)
get probabilities for counts
property initial_point
Returns initial point
반환 형식
Optional[ndarray]
property operator
Returns operator
반환 형식
Optional[OperatorBase]
property optimal_params
The optimal parameters for the variational form.
반환 형식
List[float]
property optimizer
Returns optimizer
반환 형식
Optional[Optimizer]
print_settings()
Preparing the setting of VQE into a string.
반환값
the formatted setting of VQE
반환 형식
str
property quantum_instance
Returns quantum instance.
반환 형식
Optional[QuantumInstance]
property random
Return a numpy random.
run(quantum_instance=None, **kwargs)
Execute the algorithm with selected backend.
매개변수
• quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – the experimental setting.
• kwargs (dict) – kwargs
반환값
results of an algorithm.
반환 형식
dict
예외
AquaError – If a quantum instance or backend has not been provided
set_backend(backend, **kwargs)
Sets backend with configuration.
반환 형식
None
property setting
Prepare the setting of VQE as a string.
classmethod supports_aux_operators()
Whether computing the expectation value of auxiliary operators is supported.
If the minimum eigensolver computes an eigenstate of the main operator then it can compute the expectation value of the aux_operators for that state. Otherwise they will be ignored.
반환 형식
bool
반환값
True if aux_operator expectations can be evaluated, False otherwise
property var_form
Returns variational form
반환 형식
Union[QuantumCircuit, VariationalForm, None] | 2021-03-02 16:47:51 | {"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": 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.5278555154800415, "perplexity": 5398.969375668498}, "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-10/segments/1614178364027.59/warc/CC-MAIN-20210302160319-20210302190319-00373.warc.gz"} |
https://sfzformat.com/opcodes/ampeg_attack_onccN | # ampeg_attack
EG attack time.
## Examples #
ampeg_attack=1.2
fileg_attack=0.1
## Practical Considerations #
These are very frequently used, especially with amplifier envelopes. ampeg_attack is the standard “A” in the basic ADSR volume envelope. fileg_attack is key to 303-style basses.
In ARIA, the SFZ1 envelopes have linear attack (for pitcheg and fileg, probably linear in cents, which won’t translate into linear in Hertz). Decay and release stages have a curve which is faster than linear, and it seems to match “well enough” with a multiplicatively decreasing curve. The step size should be close to $$\mu = \exp \left( - \frac{8.0}{t \times s} \right)$$ where $$t$$ is the decay duration in seconds, and $$s$$ is the sample rate in Hertz. The envelope $$x_{n+1}$$ at index $$n+1$$ is thus computed as $$x_{n+1} = \mu \times x_{n}.$$
Here is a screenshot of a file output using Sforzando, showing the ampeg_envelope shape and its stages.
Name Version Type Default Range Unit
ampeg_attack SFZ v1 float 0 0 to 100 seconds
Modulations
ampeg_attackccN float 0 -100 to 100 seconds
ampeg_vel2attack float 0 -100 to 100 seconds
Category: Modulation, Envelope Generators | 2021-04-17 13:47: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": 0, "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.19733832776546478, "perplexity": 3942.7103203488637}, "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-17/segments/1618038460648.48/warc/CC-MAIN-20210417132441-20210417162441-00233.warc.gz"} |
https://linguaphylo.github.io/tutorials/discrete-phylogeography/ | It guides you through a discrete phylogeography analysis of a H5N1 epidemic in South China. This analysis will use the model developed by Lemey et al., 2009 that implements ancestral reconstruction of discrete states (locations) in a Bayesian statistical framework, and employs the Bayesian stochastic search variable selection (BSSVS) to identify the most parsimonious description of the phylogeographic diffusion process.
The additional benefit using this model is that we can summarise the phylogeographic inferences from an analysis, and use a virtual globe software to visualize the spatial and temporal information.
The programs used in this tutorial are listed below.
## The NEXUS alignment
The data is in a file called h5n1.nex. By clicking the name of the file, it will be opened on your web browser, after which you can download the data by right-clicking on the main window, “Save Page As”, and saving the file as h5n1.nex in the desired folder.
The data is a subset of original dataset Wallace et al., 2007, and it consists of 43 influenza A H5N1 hemagglutinin and neuraminidase gene sequences isolated from a variety of hosts 1996 - 2005 across sample locations.
## Constructing the scripts in LPhy Studio
The software LPhy Studio is used to specify and visualise models as well as simulate data from models defined in LPhy scripts.
The data block is used to input and store the data, which will be processed by the models defined later, and which also allows you to reuse the another dataset by simply replacing the current data. In this block, we normally include the constants for models, the alignment loaded from a NEXUS file, and the meta data regarding to the information of taxa that we have known.
The model block is to define and also describe your models and parameters in the Bayesian phylogenetic analysis. Therefore, your result could be easily reproduced by other researchers.
Please make sure the tab above the command console is set to data, when you intend to type or copy and paste the data block scripts into the console. In addition, make sure to switch the tab to model, when you intend to type or copy and paste the model block scripts into the console.
When you write your LPhy scripts, please be aware that data and model have been reserved and cannot be used as the variable name.
The LPhy scripts to define this analysis is listed below.
data {
options = {ageDirection=“forward”, ageRegex=“_(\d+)”}; D = readNexus(file=“data/H5N1.nex”, options=options); L = D.nchar(); taxa = D.taxa(); D_trait = extractTrait(taxa=taxa, sep=“_”, i=2); K = D_trait.canonicalStateCount(); dim = K*(K-1)/2; } model { π ~ Dirichlet(conc=[2.0, 2.0, 2.0, 2.0]); κ ~ LogNormal(meanlog=1.0, sdlog=1.25); γ ~ LogNormal(meanlog=0.0, sdlog=2.0); r ~ DiscretizeGamma(shape=γ, ncat=4, replicates=L); Θ ~ LogNormal(meanlog=0.0, sdlog=1.0); ψ ~ Coalescent(taxa=taxa, theta=Θ); D ~ PhyloCTMC(Q=hky(kappa=κ, freq=π), mu=0.004, siteRates=r, tree=ψ); π_trait ~ Dirichlet(conc=rep(element=3.0, times=K)); I ~ Bernoulli(minSuccesses=dim-2, p=0.5, replicates=dim); R_trait ~ Dirichlet(conc=rep(element=1.0, times=dim)); Q_trait = generalTimeReversible(rates=select(x=R_trait, indicator=I), freq=π_trait); μ_trait ~ LogNormal(meanlog=0, sdlog=1.25); D_trait ~ PhyloCTMC(L=1, Q=Q_trait, dataType=“standard”, mu=μ_trait, tree=ψ); } ## Graphical Model For the details, please read the auto-generated narrative from LPhyStudio. The code D_trait = extractTrait(taxa=taxa, sep=“_”, i=2); in the data block uses the function to extract the locations from the taxa names, and creates a trait alignment D_trait to contain these locations mapped to each taxon. Then the next line K = D_trait.canonicalStateCount(); count the number of unique locations in the trait alignment. Please note the method canonicalStateCount() returns the number of canonical states excluding ambiguous states. ## Geographic Model In this analysis, we have two parts mixed in the model section: the first part is modeling evolutionary history and demographic structure based on a nucleotide alignment, and the second part is defining how to sample the discrete states (locations) from the phylogeny\psishared with the 1st part. For the nucleotide alignment, We fix a strict molecular clock to 0.004, to make the analysis converge a bit quicker. The next is the geographic model. In the discrete phylogeography, the probability of transitioning to a new location through the time is computed by $P(t) = e^{\Lambda t}$ where\Lambda$is a$ K \times K $infinitesimal rate matrix, and$K$is the number of discrete locations (i.e. 5 locations here). Then, $\Lambda = \mu S \Pi$ where$\mu$is an overall rate scalar,$S$is a$ K \times K $matrix of relative migration rates, and$\Pi = diag(\pi)$where$\pi$is the equilibrium trait frequencies. After the normalization,$\mu$measures the number of migration events per unit time$t$. The detail is explained in Lemey et al., 2009. So, assuming migration to be symmetric in this analysis, we define a vector variable R_trait with the length of$ \frac{K \times (K-1)}{2} $to store the off-diagonal entries of the unnormalised$S. Another boolean vector I with the same length determines which infinitesimal rates are zero, which is performed by the function select. This implements the Bayesian stochastic search variable selection (BSSVS). ## Producing BEAST XML using LPhyBEAST BEAST 2 reads instructions about the data and the model from a user-provided .xml, which can be produced in a variety of ways. Our goal with LPhy is to make the preparation of the .xml as painless, clear and precise as possible. In order to achieve that, we will use a companion application, LPhyBEAST, as a bridge between the LPhy script we typed above and the .xml. LPhyBEAST is distributed as a BEAST 2 package, we can use an application called Package Manager, which is distributed with BEAST 2 together, to install it. To start LPhyBEAST, we have to use the script lphybeast. Some technical guides can help you to start. In our h5n1.lphy script, the alignment file is assumed to locate under the folder tutorials/data/. So we need to go to the tutorials folder, which is normally where the LPhy is installed, run LPhyBEAST as below and check the end of message to find where is the generated XML. Let us run LPhyBEAST now: # BEAST_DIR="/Applications/BEAST2/"BEAST_DIR/bin/lphybeast -l 3000000 h5n1.lphy
## Running BEAST
After LPhyBEAST generates a BEAST 2 .xml file (e.g., h5n1.xml), we can point BEAST 2 to it, which will then start the inferential MCMC analysis.
BEAST 2 will write its outputs to disk into text files specified in the .xml file (specific paths can be passed in, but in their absence BEAST 2 will write the outputs in the same directory from where it was called).
BEAST 2 will also output the progress of the analysis and some summaries to the screen, like this:
BEAST v2.6.7, 2002-2020
Bayesian Evolutionary Analysis Sampling Trees
Designed and developed by
Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard
Centre for Computational Evolution
University of Auckland
[email protected]
[email protected]
Institute of Evolutionary Biology
University of Edinburgh
[email protected]
David Geffen School of Medicine
University of California, Los Angeles
[email protected]
http://beast2.org/
http://github.com/CompEvol/beast2
BEAST developers:
Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
Oliver Pybus, Tim Vaughan, Chieh-Hsi Wu, Walter Xie
Thanks to:
Roald Forsberg, Beth Shapiro and Korbinian Strimmer
Random number seed: 1659590653904
...
...
2850000 -5960.6708 -5834.2398 -126.4309 0.3211 0.1966 0.2226 0.2595 9.0333 0.3238 8.6857 0.1296 0.3150 0.1804 0.1649 0.2098 1 1 1 1 1 1 1 1 1 1 0.1884 0.0747 0.0422 0.1702 0.0805 0.0174 0.2373 0.0457 0.0291 0.1139 0.6191 1m16s/Msamples
3000000 -5957.8699 -5834.9067 -122.9631 0.3277 0.1965 0.2239 0.2517 7.6506 0.4290 5.9862 0.1501 0.3367 0.1051 0.2549 0.1529 1 1 1 1 1 1 1 1 1 1 0.1650 0.0716 0.0709 0.1302 0.3421 0.0130 0.0994 0.0303 0.0485 0.0286 0.2453 1m16s/Msamples
Operator Tuning #accept #reject Pr(m) Pr(acc|m)
BitFlipOperator(I.bitFlip) - 39782 90355 0.04340 0.30569
DeltaExchangeOperator(R_trait.deltaExchange) 0.57921 15922 104777 0.04031 0.13191
ScaleOperator(Theta.scale) 0.46729 7620 18512 0.00866 0.29160
ScaleOperator(gamma.scale) 0.40531 7005 18916 0.00866 0.27024
ScaleOperator(kappa.scale) 0.52022 6840 19112 0.00866 0.26356
ScaleOperator(mu_trait.scale) 0.27589 7746 18166 0.00866 0.29893
UpDownOperator(mu_traitUppsiDownOperator) 0.91311 40003 321915 0.12047 0.11053
DeltaExchangeOperator(pi.deltaExchange) 0.06532 9549 46452 0.01868 0.17051
DeltaExchangeOperator(pi_trait.deltaExchange) 0.54124 10870 57988 0.02285 0.15786
Exchange(psi.narrowExchange) - 60429 295287 0.11850 0.16988
ScaleOperator(psi.rootAgeScale) 0.77165 3697 22375 0.00866 0.14180
ScaleOperator(psi.scale) 0.90511 35312 319993 0.11850 0.09939 Try setting scaleFactor to about 0.951
SubtreeSlide(psi.subtreeSlide) 0.88122 70929 284431 0.11850 0.19960
Uniform(psi.uniform) - 149335 206383 0.11850 0.41981
Exchange(psi.wideExchange) - 1575 353485 0.11850 0.00444
WilsonBalding(psi.wilsonBalding) - 2051 353189 0.11850 0.00577
Tuning: The value of the operator's tuning parameter, or '-' if the operator can't be optimized.
#accept: The total number of times a proposal by this operator has been accepted.
#reject: The total number of times a proposal by this operator has been rejected.
Pr(m): The probability this operator is chosen in a step of the MCMC (i.e. the normalized weight).
Pr(acc|m): The acceptance probability (#accept as a fraction of the total proposals for this operator).
Total calculation time: 232.693 seconds
## Analysing the BEAST output
Run the program called Tracer to analyze the output of BEAST. When the main window has opened, choose Import Trace File... from the File menu and select the file that BEAST has created called h5n1.log. You should now see a window like in Figure 2.
Remember that MCMC is a stochastic algorithm so the actual numbers will not be exactly the same. On the left hand side is a list of the different quantities that BEAST has logged. There are traces for the posterior (this is the log of the product of the tree likelihood and the prior probabilities), and the continuous parameters. Selecting a trace on the left brings up analyses for this trace on the right hand side depending on tab that is selected. When first opened, the “posterior”” trace is selected and various statistics of this trace are shown under the Estimates tab. In the top right of the window is a table of calculated statistics for the selected trace.
Tracer will plot a (marginal posterior) distribution for the selected parameter and also give you statistics such as the mean and median. The 95% HPD lower or upper stands for highest posterior density interval and represents the most compact interval on the selected parameter that contains 95% of the posterior probability. It can be thought of as a Bayesian analog to a confidence interval.
## Obtaining an estimate of the phylogenetic tree
Run the program TreeAnnotator, and then choose 10% as the burn-in percentage, while keeping “Maximum clade credibility tree” as the “Target tree type”. For “Node heights”, choose “Mean heights”. Then load the tree log file that BEAST 2 generated (it will end in “.trees” by default) as “Input Tree File”. For this tutorial, the tree log file is called h5n1_with_trait.trees. Finally, for “Output File”, type h5n1_with_trait.tree.
This setup will take the set of trees in the tree log file, and summarize it with a single maximum clade credibility (MCC) tree. The MCC tree is the tree that has the largest clade probability product across all nodes. Divergence times will reflect the mean ages of each node, and those times will be annotated with their 95% HPD intervals. TreeAnnotator will also display the posterior clade credibility of each node in the MCC tree.
More details on summarizing trees can be found in beast2.org/summarizing-posterior-trees/.
Note that TreeAnnotator only parses a tree log file into an output text file, but it will not allow you to visualize summary trees. Visualization has to be done with other programs (see next section).
## Distribution of root location
When you open the summary tree with locations h5n1_with_trait.tree in a text editor, and scroll to the most right and locate the end of the tree definition, you can see the set of meta data for the root. Looking for the last entries of location.set and location.set.prob, you might find something like this:
location.set = {Guangdong,HongKong,Hunan,Guangxi,Fujian}
location.set.prob = {0.18656302054414214,0.6129927817878956,0.03220433092726263,0.1121599111604664,0.0560799555802332}
This means that we have the following distribution for the root location:
Location Probability
Guangdong 0.18656302054414214
HongKong 0.6129927817878956
Hunan 0.03220433092726263
Guangxi 0.1121599111604664
Fujian 0.0560799555802332
This distribution shows that the 95% HPD consists of all locations except Hunan, with a strong indication that HongKong might be the root with over 58% probability. It is quite typical that a lot of locations are part of the 95% HPD in discrete phylogeography.
## Viewing the Location Tree
We can visualise the tree in a program called FigTree. Run this program, and open the summary tree file h5n1_with_trait.tree by using the Open command in the File menu. The tree should appear. You can now try selecting some of the options in the control panel on the left. Try selecting Appearance to set the branch Colour by location. In addition, you can set the branch Width by location.prob according to the posterior support of estimated locations. Increasing the Line Weight can make the branch width more different regarding to its posterior support. Finally, tick Legend and select location in the drop list of Attribute. You should end up with something like Figure 4.
Alternatively, you can load the posterior tree set h5n1_with_trait.trees (note this is NOT the summary tree, but the complete set) into DensiTree and set it up as follows.
• Click Show to choose Root Canal tree to guide the eye.
• Click Grid to choose Full grid option, type year 2005 in the Origin text field and tick Reverse to show the correct time scale. You also can reduce the Digits to 0 which will rounding years in the x-axis (i.g. 2005, instead of 2005.22).
• Go to Line Color, you can colour branches by location. The final image look like Figure 5.
## The number of estimated transitions
Sometime, we want to visualise how the location states are changed through the phylogeny. StateTransitionCounter can count the number of branches in a tree or a set of trees that have a certain state at the parent and another at the node.
So, install the Babel package and run the StateTransitionCounter through BEAST application launcher. The command line below will generate the output file stc.out containing all counts from the logged posterior trees h5n1_with_trait.trees, after removing 10% burn-in. Please make sure you install the latest version (Babel >= v0.3.2, BEASTLabs >= v1.9.6).
## Model
The alignment, D is assumed to have evolved under a phylogenetic continuous time Markov process (Felsenstein; 1981) on phylogenetic time tree, ψ, with a molecular clock rate of 0.004, an instantaneous rate matrix and siteRates, r. An instantaneous rate matrix is the HKY model (Hasegawa et al; 1985) with transition bias parameter, κ and base frequency vector, π. The base frequency vector, π have a Dirichlet distribution prior with a concentration of [2.0, 2.0, 2.0, 2.0]. The transition bias parameter, κ has a log-normal prior with a mean in log space of 1.0 and a standard deviation in log space of 1.25. The double, ri is assumed to come from a DiscretizeGamma with shape, γ and a ncat of 4, for i in 0 to L - 1. The shape, γ has a log-normal prior with a mean in log space of 0.0 and a standard deviation in log space of 2.0. The time tree, ψ is assumed to come from a Kingman's coalescent tree prior (Kingman; 1982) with coalescent parameter, Θ and taxa. The coalescent parameter, Θ has a log-normal prior with a mean in log space of 0.0 and a standard deviation in log space of 1.0. The alignment, Dtrait is assumed to have evolved under a phylogenetic continuous time Markov process (Felsenstein; 1981) on phylogenetic time tree, ψ, with molecular clock rate, μtrait, instantaneous rate matrix, Qtrait, a length of 1 and a dataType of "standard". The instantaneous rate matrix, Qtrait is assumed to come from the generalTimeReversible with rates and freq, πtrait. The freq, πtrait have a Dirichlet distribution prior with a concentration. A concentration is assumed to come from the rep with an element of 3.0 and times, K. The number is assumed to come from the select with x, R_traiti and indicator, I0. The indicator, I is assumed to come from a Bernoulli with a p of 0.5, replicates, dim and minSuccesses. The minSuccesses is calculated by dim-2. The x, Rtrait have a Dirichlet distribution prior with a concentration. A concentration is assumed to come from the rep with an element of 1.0 and times, dim. The molecular clock rate, μtrait has a log-normal prior with a mean in log space of 0 and a standard deviation in log space of 1.25.
## Posterior
$$\begin{split} P(\boldsymbol{\pi}, \kappa, \boldsymbol{r}, \gamma, \boldsymbol{\psi}, \Theta, \boldsymbol{\pi\textbf{}_{trait}}, \boldsymbol{I}, \boldsymbol{\textbf{R}_{trait}}, \mu\textrm{}_{trait} | \boldsymbol{D}, \boldsymbol{\textbf{D}_{trait}}) \propto &P(\boldsymbol{D} | \boldsymbol{\psi}, Q, \boldsymbol{r})P(\boldsymbol{\pi})P(\kappa)\\& \prod_{i=0}^{L - 1}P(\textrm{r}_i | \gamma)P(\gamma)P(\boldsymbol{\psi} | \Theta)\\& P(\Theta)P(\boldsymbol{\textbf{D}_{trait}} | \boldsymbol{\psi}, \mu\textrm{}_{trait}, \boldsymbol{\textbf{Q}_{trait}})\\& P(\boldsymbol{\pi\textbf{}_{trait}})P(\boldsymbol{I})P(\boldsymbol{\textbf{R}_{trait}})\\& P(\mu\textrm{}_{trait})\end{split}$$
## References
• Felsenstein, J. (1981). Evolutionary trees from DNA sequences: a maximum likelihood approach. Journal of molecular evolution, 17(6), 368-376. https://doi.org/10.1007/BF01734359
• Hasegawa, M., Kishino, H. & Yano, T. Dating of the human-ape splitting by a molecular clock of mitochondrial DNA. J Mol Evol 22, 160–174 (1985) https://doi.org/10.1007/BF02101694
• Kingman JFC. The Coalescent. Stochastic Processes and their Applications 13, 235–248 (1982) https://doi.org/10.1016/0304-4149(82)90011-4
• Lemey, P., Rambaut, A., Drummond, A. J. and Suchard, M. A. (2009). Bayesian phylogeography finds its roots. PLoS Comput Biol 5, e1000520.
• Wallace, R., HoDac, H., Lathrop, R. and Fitch, W. (2007). A statistical phylogeography of influenza A H5N1. Proceedings of the National Academy of Sciences 104, 4473.
• Bielejec F., Rambaut A., Suchard M.A & Lemey P. (2011). SPREAD: Spatial Phylogenetic Reconstruction of Evolutionary Dynamics. Bioinformatics, 27(20):2910-2912. doi:10.1093.
• Douglas, J., Mendes, F. K., Bouckaert, R., Xie, D., Jimenez-Silva, C. L., Swanepoel, C., … & Drummond, A. J. (2020). Phylodynamics reveals the role of human travel and contact tracing in controlling COVID-19 in four island nations. doi: https://doi.org/10.1101/2020.08.04.20168518 | 2023-02-03 03:03:25 | {"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": 2, "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.642578661441803, "perplexity": 3158.435412546873}, "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-06/segments/1674764500042.8/warc/CC-MAIN-20230203024018-20230203054018-00759.warc.gz"} |
http://mirror.uncyc.org/wiki/Maxwell_equations | # Maxwell equations
A typical mathematical equation
Maxwell's Equations were developed by a well respected British biologist named James Clerk Maxwell. The celebrated equations make up the backbone of modern electricity and magnetism and thus, describe the behavior of manatees in large numbers.
## History
With frequent trips to the watering hole Maxwell showed that when in the presence of a magnet a manatee would do his bidding. If the magnet was too strong it would actually attract the manatee to him at which point he would shock it with some electricity. It should be noted that electricity and magnetism have nothing in common. Through heavy experimentation Maxwell was able to derive all four equations with the help of his friend, who possessed the retarded name of Friday. Friday electrocuted many manatees in his experimentation. The equations were published by Houghton Mifflin in a book called Philosophiæ Naturalis Principia Manateea in 1687. Although it was only four lines, this book is said to be the greatest single work in the history of science. With the control of the manatees, England was able to fend off Germany almost 300 years later in World War II.
## Equations
Everyday magnet
The modern set of Maxwell's equations is shown below:
Manatee's Law ${\displaystyle \bigtriangledown \bullet M={\frac {d}{t}}}$ Manatee's Law for Magnetism ${\displaystyle \bigtriangledown \bullet B=mc^{2}}$ Friday's Law of Electrocution ${\displaystyle \bigtriangledown \times V=G{\frac {mM}{r^{2}}}}$ Sea Cow Crucial Law ${\displaystyle \bigtriangledown \times U=-kx}$
The first of these equations effectively describes the speed of a manatee in open water and took the longest to derive. Maxwell commented on why the development of this equation took so long.
“Fat bastards!”
~ James Clerk Maxwell on the speed of a manatee
Maxwell determined the numerator while Friday came up with the denominator.
Where:
d is the distance the manatee travels
t is the time it took for the manatee to get that far
The second equation describes the ass kicking ability of a school of manatees depending on the strength of the magnet it is exposed to. Notice how the equation does not depend on the strength of the magnet at all.
Where:
m is the mass of the earth
c is the speed of light in a vacuum
The remaining equations have been determined to be completely useless.
## Modern Day Applications
Manatee terrorist attack
Despite the equations having multiple important applications in history they are useless today. In the years since World War II the manatees evolved (a theory also developed by Maxwell) to withstand the power of the magnets and the electricity. Since this evolution the manatees have claimed responsibility for several terrorist bombings around the world.
“We're free, so we're just kicking some ass.”
~ Manatees on Terrorist Bombings
Scientists are currently working on several methods to regain control over the manatees, with little progress. This may be due to the stupidity of the scientists. | 2022-01-29 13:49:53 | {"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.6479781270027161, "perplexity": 1548.419029251838}, "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/1642320306181.43/warc/CC-MAIN-20220129122405-20220129152405-00414.warc.gz"} |
https://cn.maplesoft.com/support/help/maplesim/view.aspx?path=transform(deprecated)%2Fmultiapply | transform(deprecated)/multiapply - Maple Help
stats[transform, multiapply]
apply a function across multiple data lists
Calling Sequence stats[transform, multiapply[fctn]](listdata) transform[multiapply[fctn]](listdata)
Parameters
fctn - function listdata - list of statistical lists
Description
• Important: The stats package has been deprecated. Use the superseding package Statistics instead.
• The function multiapply of the subpackage stats[transform, ...] applies the requested function across the lists of statistical lists in the given listdata.
• The function supplied must be designed to handle missing data, weighted data and class data correctly, if such data is present in listdata.
• Each sublist of listdata must contain the same number of elements. In other words, map(nops, listdata) should return a list of identical numbers.
• This function is an extension to the zip() function.
• An example of the use of this function is the following. Given a list of marks for each classroom tests, and a formula that computes the final mark of each student, the function transform[multiapply] allows the computations of the final mark of all students, all at once.
Examples
Important: The stats package has been deprecated. Use the superseding package Statistics instead.
> $\mathrm{with}\left(\mathrm{stats}\right):$
> $\mathrm{transform}\left[\mathrm{multiapply}\left[\left(x,y\right)↦5\cdot x+{y}^{2}\right]\right]\left(\left[\left[1,2,3\right],\left[4,5,6\right]\right]\right)$
$\left[{21}{,}{35}{,}{51}\right]$ (1)
These are computed as follows.
> $\left[5\cdot 1+{4}^{2},5\cdot 2+{5}^{2},5\cdot 3+{6}^{2}\right]$
$\left[{21}{,}{35}{,}{51}\right]$ (2) | 2023-03-24 19:27:17 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 5, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.8193846940994263, "perplexity": 1872.538408752456}, "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-2023-14/segments/1679296945288.47/warc/CC-MAIN-20230324180032-20230324210032-00609.warc.gz"} |
https://crazyproject.wordpress.com/2011/05/26/bounds-on-the-degrees-of-some-algebraic-elements/ | ## Bounds on the degrees of some algebraic elements
Let $\alpha$ be an algebraic element of degree $n$ over $\mathbb{Q}$. Show that $\alpha^2$ is algebraic over degree at most $n$ over $\mathbb{Q}$, and that $\sqrt{\alpha}$ is algebraic of degree at most $2n$ over $\mathbb{Q}$. In each case, show by an example that both “<” and “=” are possible.
By Theorem 4.9 in TAN, since $\alpha^2 \in \mathbb{Q}(\alpha)$ (clearly) the degree of $\alpha^2$ is at most $n$. Now suppose the minimal polynomial of $\alpha$ over $\mathbb{Q}$ is $p(x)$; then certainly $\sqrt{\alpha}$ is a root of $p(x) \circ x^2 \in \mathbb{Q}[x]$, which has degree $2n$. Since the minimal polynomial of $\sqrt{\alpha}$ divides $p(x) \circ x^2$, the degree of $\sqrt{\alpha}$ is at most $2n$.
Let $\alpha = 2$. Since $\alpha \in \mathbb{Q}$, $\alpha$ is algebraic over $\mathbb{Q}$ of degree 1. $\alpha^2 = 4$ is also algebraic of degree 1, so that $\mathsf{deg}_\mathbb{Q} \alpha = \mathsf{deg}_\mathbb{Q} \alpha^2$. However, $\sqrt{\alpha} = \sqrt{2}$ has degree 2, so that $\mathsf{deg}_\mathbb{Q} \alpha < \mathsf{deg}_\mathbb{Q} \sqrt{\alpha}$.
On the other hand, if $\beta = 4$, then $\sqrt{\beta} = 2$, and $\mathsf{deg}_\mathbb{Q} \beta = \mathsf{deg}_\mathbb{Q} \sqrt{\beta}$.
Now consider $\gamma = i$; this element is algebraic of degree 2, while $\gamma^2$ has degree 1. So $\mathsf{deg}_\mathbb{Q} \gamma > \mathsf{deg}_\mathbb{Q} \gamma^2$. | 2017-03-30 18:29:30 | {"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": 36, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.9848262071609497, "perplexity": 40.31646417088706}, "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-13/segments/1490218199514.53/warc/CC-MAIN-20170322212959-00554-ip-10-233-31-227.ec2.internal.warc.gz"} |
https://mtjpamjournal.com/papers/article_id_mtjpam-d-20-00055/ | # Article ID: MTJPAM-D-20-00055
## Title: Argument Estimates for Carathéodory Functions with Applications
Montes Taurus J. Pure Appl. Math. / ISSN: 2687-4814
Article ID: MTJPAM-D-20-00055; Volume 3 / Issue 3 / Year 2021 (Special Issue), Pages 211-215
Document Type: Research Paper
Author(s): Seon Hye An a , Nak Eun Cho b
aDepartment of Applied Mathematics, Pukyong National University, Busan 608-737, Republic of Korea
bDepartment of Applied Mathematics, Pukyong National University, Busan 608-737, Republic of Korea
Received: 26 December 2020, Accepted: 20 February 2021, Published: 25 April 2021.
Corresponding Author: Nak Eun Cho (Email address: [email protected])
Full Text: PDF
Abstract
The purpose of the present paper is to investigate argument properties of Carathéodory functions applying the result obtained by Nunokawa et al.. We also obtain some geometric properties of analytic functions as special cases.
Keywords: Carathéodory functions, Argument estimates
References:
1. M. Darus and D. K. Thomas, $\alpha$-logarithmically convex functions, Indian J. Pure Appl. Math. 29, 1049-1059, 1998.
2. S. S. Miller, Differential inequalities and Carathéodory functions, Bull. Amer. Math. Soc. 81, 79-81, 1975.
3. M. Nunokawa, On properties of non- Carathéodory functions, Proc. Japan Acad. Ser. A Math. Sci. 68, 152-153, 1992.
4. M. Nunokawa, On the order of strongly starlikeness of strongly convex functions, Proc. Japan Acad. Ser. A Math. Sci. 69, 234-237, 1993.
5. M. Nunokawa, S. Owa, H. Saitoh, N. E. Cho and N. Takahashi, Some properties od analytic functions at extremal points for arguments, preprint.
6. M. Nunokawa and D. K. Thomas, On convex and starlike functions in a sector, J. Austal. Math. Soc. Ser. A 60, 363-368, 1996.
7. N. Takahashi and M. Nunokawa, A certain connection between starlike and convex functions, Applied Math. Lett. 16, 653-655, 2003.
8. J. Sokol and L. Trojnar-Spelina, On a sufficient condition for strongly starlikeness, J. Inequal. Appl. 2013, Article No: 383, 2013. | 2022-07-05 12:25:16 | {"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": 2, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.37443509697914124, "perplexity": 6323.750757387461}, "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-27/segments/1656104576719.83/warc/CC-MAIN-20220705113756-20220705143756-00210.warc.gz"} |
https://rjlipton.wordpress.com/2020/05/22/math-tells/ | tags: ,
How to tell what part of math you are from
Gerolamo Cardano is often credited with introducing the notion of complex numbers. In 1545, he wrote a book titled Ars Magna. He introduced us to numbers like ${\sqrt{-5}}$ in his quest to understand solutions to equations. Cardano was often short of money and gambled and played a certain board game to make money—see the second paragraph here.
Today, for amusement, Ken and I thought we’d talk about tells.
What are tells? Wikipedia says:
A tell in poker is a change in a player’s behavior or demeanor that is claimed by some to give clues to that player’s assessment of their hand.
## Other Tells
Ken and I have been thinking of tells in a wider sense—when and whether one can declare inferences amid uncertain information. Historians face this all the time. So do biographers, at least when their subjects are no longer living. We would also like to make inferences in our current world, such as about the pandemic. The stakes can be higher than in poker. In poker, if your “tell” inference is wrong and you lose, you can play another hand—unless you went all in. With science and other academic areas the attitude must be that you’re all-in all the time.
Cardano furnishes several instances. Wikipedia—which we regard as an equilibrium of opinions—says that Cardano
acknowledged the existence of imaginary numbers … [but] did not understand their properties, [which were] described for the first time by his Italian contemporary Rafael Bombelli.
This is a negative inference from how one of Cardano’s books stops short of treating imaginary numbers as objects that follow rules.
There are also questions about whether Cardano can be considered “the father of probability” ahead of Blaise Pascal and Pierre de Fermat. Part of the problem is that Cardano’s own writings late in life recounted his first erroneous reasonings as well as final understanding in a Hamlet-like fashion. Wikipedia doubts whether he really knew the rule of multiplying probabilities of independent events, whereas the essay by Prakash Gorroochurn cited there convinces us that he did. Similar doubt extends to how much Cardano knew about the natural sciences, as correct inferences (such as mountains with seashell fossils having once been underwater) are mixed in with what we today regard as howlers.
Every staging of Shakespeare’s Hamlet shows a book by Cardano—or does it? In Act II, scene 2, Polonius asks, “What do you read, my lord?”; to which Hamlet first replies “Words words words.” Pressed on the book’s topic, Hamlet perhaps references the section “Misery of Old Age” in Cardano’s 1543 book De Consolatione but what he says is so elliptical it is hard to tell. The book also includes particular allusions between sleep and death that go into Hamlet’s soliloquy opening Act III. The book had been published in England in 1573 as Cardan’s Comfort under the aegis of the Earl of Oxford so it was well-known. Yet the writer Italo Calvino held back from the inference:
To conclude from this that the book read by Hamlet is definitely Cardano, as is held by some scholars of Shakespeare’s sources, is perhaps unjustified.
To be sure, there are some who believe Shakespeare’s main source was Oxford, in manuscripts if not flesh and blood. One reason we do not go there is that we do not see the wider community as having been able to establish reliable principles for judging what kinds of inferences are probably valid. We wonder if one could do an experiment of taking resolved cases, removing most of the information to take them down to the level of unresolved cases, and seeing what kinds of inferences from partial information would have worked. That’s not our expertise, but within our expertise in math and CS, we wonder if a little experiment will be helpful.
To set the idea, note that imaginary numbers are also called complex numbers. Yet the term complex numbers can mean other things. Besides numbers like ${2 + 3i}$ it also can mean how hard it is to construct a number.
In number theory, the integer complexity of an integer is the smallest number of ones that can be used to represent it using ones and any number of additions, multiplications, and parentheses. It is always within a constant factor of the logarithm of the given integer.
How easy is it to tell what kind of “complex” is meant if you only have partial information? We don’t only mean scope-of-terminology issues; often a well-defined math object is used in multiple areas. Let’s try an experiment.
## Math Tells
Suppose you walk in log-in to a talk without any idea of the topic. If the speaker uses one of these terms can you tell what her talk might be about? Several have multiple meanings. What are some of them? A passing score is ${\dots}$
1. She says let ${S}$ be a c.e. set.
2. She says let ${k}$ be in ${\omega}$.
3. She says by the König principle.
4. She says ${S}$ is a prime.
5. She says ${n}$ is a prime.
6. She says ${G}$ is solvable.
7. She says let its degree be ${0}$.
8. She says there is a run.
9. She says it is reducible.
10. She says it is satisfiable.
## Open Problems
What are your answers? Do you have some tells of your own?
6 Comments leave one →
1. May 22, 2020 11:48 am
Whenever I used to pick a book on logic in a bookstore — Okay Baby, I’ll explain that later — I would turn right away to the index to see if C.S. Peirce was mentioned. That would always tell me …
2. Peter Gerdes permalink
May 23, 2020 1:54 pm
I’m going to guess it’s about word problems on groups. We got the computability theory (and use of omega not N) and various group theory notions. Second guess is computable model theory
• Peter Gerdes permalink
May 23, 2020 1:55 pm
Though maybe I read that wrong and you don’t mean for there to be a single answer for all 10.
3. May 24, 2020 1:17 pm
A related issue concerns when some open problems were first posed. Take for example the existence of odd perfect numbers. The oldest explicit statement of the question appears to be in Descartes. But if one looks at what older sources are doing (for example, proving that a power of a prime cannot be perfect), then it looks like it is a question they are thinking about. | 2021-03-07 00:06:13 | {"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": 10, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.46335771679878235, "perplexity": 1479.8681651065513}, "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-10/segments/1614178375529.62/warc/CC-MAIN-20210306223236-20210307013236-00323.warc.gz"} |
https://dwwiki.mooo.com/w/index.php?title=Knock-out_rose&printable=yes | # Knock-out rose
Knock-out roses are deceptively pretty black roses, which will cause anyone who 'smell's them to fall asleep.
## Acquisition
Knock-out roses can be picked from a bush located west of the courtyard outside Dontgonearthe Castle. You can also get them by growing them on the jar with a black seed on the Nowhere quest. You can grow them a unlimited number of times.
## Notes
• Each rose can be smelled an unlimited number of times.
• The roses do decay
• The roses cannot be worn or braided.
## Decay Messages
You glance at the rose as it starts to twitch as if looking for nourishment and then lies still.
You notice the leaves of the rose start drooping and slowly change colour until they are an unhealthy pale white.
You hear a small tap on the ground. You look down and notice that the thorns seem to be falling off the stem of the rose.
You feel a soft touch on your arm as a petal falls off the rose and disintegrates as it lands on the ground. Soon the other petals follow and you watch in dismay as the stem turns do dust and blows away in the breeze. | 2023-01-27 02:00:37 | {"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.18820510804653168, "perplexity": 3896.515618109875}, "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-06/segments/1674764494852.95/warc/CC-MAIN-20230127001911-20230127031911-00803.warc.gz"} |
http://barronstestprep.com/blog/tag/inequalities/ | # Simplifying Before Solving
The GRE and GMAT always present you with enough information to solve a question. But frequently, you will need to alter, simplify, or modify expressions a good bit before proceeding. In fact, some problems (like the following) depend upon your ability to do so. How might you simplify the expressions in the following problem before proceeding to a solution?
## Question of the Day
If set M = {1, 1, 2, 3, 5, 8, 13}, what is the probability that a randomly chosen element belonging to set M will satisfy both of the inequalities $3s-1>2$ and ?
Loading ...
Both inequalities presented at the outset of the problem must be simplified before a solution can be easily found. Be aware that often times the test will not simply offer information that can be directly solved; it is far more common to be given information which requires some significant changes before it is useful for solving. | 2014-09-17 09:32:41 | {"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": 1, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7578253149986267, "perplexity": 460.6762991496612}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "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/1410657123274.33/warc/CC-MAIN-20140914011203-00329-ip-10-196-40-205.us-west-1.compute.internal.warc.gz"} |
http://vietdecor.biz/crash-bandicoot-cgl/810908-recipes-with-maraschino-cherries | ... On a function with a (complicated) functional equation. "So, for example, take a tetrahedron, consisting of four triangles, six edges and four vertices," Adams explained. ANSWER EXPLANATION: Since the point $(p,r)$ lies on the line with equation $y=x+b$, the point must satisfy the equation. Try the Free Math Solver or Scroll down to Tutorials! Cubic functions have a cube term in the, quartic functions a term like $$dx^4$$, and so on. Quadratics with a given sign for the quadratic Can you guys suggest any online tool that can assist me with this subject? The relation operator == defines symbolic equations. Please use this form if you would like to have this math solver on your website, free of charge. This beautiful equation connects three major constants of mathematics, Euler's Number e, the ratio of the circumference of a circle to its diameter, pi, and the square root of -1, i.e., i. Let's see an example of the inline mode: In physics, the mass-energy equivalence is stated by the equation $E = mc^ 2$ , discovered in 1905 by Albert Einstein. From examples of hard math problems with answers to standards, we have got all the details discussed. Come to Mathpoint.net and read and learn about solving equations, graphs and a variety of additional math … If we add or subtract a finite number of these, This is a peculiar way to write the standard quadratic formula. the factorial of 2 being 2x1=2 it looks simple but it is actually very complicated. question, what more complicated functions do we want to deal with? Or even 2!!!!!!!!!!!!!! where its peak or valley is, you cannot tell them apart. This is an example of simple harmonic motion. All Rights Reserved. divide each side by 2. These have characteristic shapes or actions that you should memorize. Linear means that all variables appear to the power 1. If the term is in the denominator, flip the curve vertically in your mind. For instance, the equation x2 + 1 = 0 has no real solutions. Complicated Math Equation That Equals 20 Tessshlo. The definition of Pi Pi is defined to be the ratio of the circumference c of any circle divided by its diameter, d. The three basic functions are the identity function, the sine function and I'm just wondering if someone can give me a few tips here so that I can understand the basics of examples of hard math problems with answers. We can solve them because a solution is, by definition, the square root of So there is no reason to assume that each of the lines are part of the same equation. For example, , as there are 3 prime numbers (2, 3, 5) less than or equal to 6. DISTRICT ACADEMIC SENATE COURSE OUTLINE OF RECORD, Precalculus Practice Final Exam Solutions, Quadratic Equations,Inequalities and Functions, DETAILED SOLUTIONS AND CONCEPTS QUADRATIC EQUATIONS, COURSE DESCRIPTION AND REQUIREMENTS FOR FUNDAMENTALS OF ALGEBRA, The California Mathematics Content Standards, Joys and virtues of obsolete technologies, Recommended Placements for College Level Mathematics, Topics in Computer Mathematics - Number Systems, Course Syllabus for Linear Algebra with Applications, Pre-Algebra Homework 2 Factors: Solutions, Exploring high-dimensional classification boundari, EXPLORING ADDING AND SUBTRACTING POLYNOMIALS, Combining Functions and Inverses Functions, Second Order Linear Equations, General Theory, What you need to know to take Calculus 221, Answers to Examples Used in Fundamental Theorem of Algebra Notes, Multiplication and Division of Rational Expressions, MATERIALS AVAILABLE FOR ALLIED HEALTH MATH, SYNTHETIC DIVISION,THE REMAINDER THEOREM AND THE FACTOR THEOREM, examples of hard math problems with answers, dolciani algebra 1 answers for lesson 3.6 problem 9, how do i write the expression five times two less than a number. Actually we define $$\sqrt{A}$$ (also written as $$A^{\frac{1}{2}}$$) to be the positive number whose square is You can get it here: (softwareLinks). Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Answer Save. What Is The Hardest Math Problem Ever Quora. Jacinta. function. For the moment we will start with only the first, the identity Mathematical Constants. d x 4. See more ideas about equations, solving equations, algebra worksheets. © Copyright 2010-2021 . Furthermore, since there are no equal signs at the end of the first two lines, they are not equations, but instead-expressions. Moreover they offer you assured satisfaction and a money-back guarantee. I bought it some time back to help me with my College Algebra course and I can say that it was really a good choice . We can evaluate and plot quadratic functions with very little more effort than we expended on linear functions. functions, and applying the operations of addition, subtraction, multiplication, division, I would suggest you to use this before resorting to the help from tutors , which is often very pricey. Math Equations That Equal 20 Tessshlo. The Beautiful Equation: Euler’s Identity Also called Euler’s relation, or the Euler equation of complex analysis, this bit of mathematics enjoys accolades across geeky disciplines. I would say that this program is absolutely the best that money can buy. Okay. Thus, the square root of the left hand side is plus or minus the square root of the right hand side here. A complex number is a number that has both a real part and an imaginary part. Complicated Math Equation - help required... … or a more general formula: set [B v] to ((B_MIN) + ((((A) - (A_MIN)) / ((A_MAX) - (A_MIN))) * ((B_MAX) - (B_MIN)))) the exponential function. Any function consisting of a positive power They might know what to do, but they can't explain why. When a parabola represented by the equation y - 2x 2 = 8 x + 5 is translated 3 units to the left and 2 units up, the new parabola has its vertex at A. After entering the instruction above in A10, you have to copy it 4 Answers. Math Questions With Answers. Like π itself, this sum goes on forever, but it isn’t complicated. The equation $$ax^2 + bx + c = 0$$ can be rewritten (when $$a$$ is not $$0$$, after dividing by $$a$$) as, $(x + \frac{b}{2a})^2 = \frac{b^2-4ac}{4a^2}$. A set of multiple choice maths questions are presented. — the Möbius function , which gives 0, -1, or 1 depending on the prime factorization of n. — the logarithmic integral function , which is defined as the integral of 1/(log t) up to x. (-5 , -5) C. (-1 , -3) what would you call a trinomial that is factorable but not over the set of prime numbers. The only difference is that we should add a quadratic coefficient say in B6, and enter =B$6*A10*A10+B$2*A10+B\$3 We can define even more functions by using calculus, but these need not be investigated now. I work in the evening and thus have no time left to take extra tutoring . You often come across equations that have no real solutions — or equations that have the potential for many more real solutions than they actually have. Since the Renaissance, every century has seen the solution of more mathematical problems than the century before, yet many mathematical problems, both major and minor, still remain unsolved. math teacher helps elementary schoolgirl with math assignment - complicated math equation stock pictures, royalty-free photos & images Theoretical physicist Albert Einstein writes a complicated equation on a blackboard. 8 years ago. Arithmetic has usually been taught like it's a recipe: Take the raw ingredients (the numbers), follow a series of steps, and end up with a result (the answer). The simplest polynomials are the linear functions we have already mentioned. numbers. For example, if s=2, then 휁(s) is the well-known series 1 + 1/4 + 1/9 + 1/16 + …, which strangely adds up to exactly 휋²/6. Cubic functions have a cube term in the, quartic functions a term like. (-5 , -1) B. simplify. Equation to solve, specified as a symbolic expression or symbolic equation. A more complicated model. Can you tell me where I can obtain the software ? For example 4!=4x3x2x1=24. I truly recommend the program. $x + \frac{b}{2a} = \frac{\sqrt{(b^2 - 4ac)}}{2a}$. Lv 7. we get what are called polynomials. That is, if you plot a quadratic and don't pay attention to the scales of your graph or which end is up, and x³ - 12x² + 48x = 64. Relevance. quadratic functions; these have the form, $$ax^2 + bx + c$$, where $$a, b$$ and $$c$$ are When you do this you will find something that is sort of nice, all quadratics look more or less alike The answers are provided and are located at the lower part of the page. Math is simple logic and you can’t assume things that aren’t stated. Specifically an equation that has two-steps. On this page, we'll use f(t) as an example, and numerically (computationally) find the Fourier Series coefficients. subtract 6 from each side. Crazy Math Equation That Equals 20 Tessshlo. incase you wanted something more conventionally hard (letters: a=1 b=2 c=3 etc) I had to solve it twice to be sure. 2!, 2!! Favorite Answer. 5. The key is the hydrogen because it only appears once in the reactants as NaB H4 and once in products as As H3. There is a two-digit number whose digits are the same, and has got the following property: When squared, it produces a four-digit number, whose first two digits are the same and equal to the original’s minus one, and whose last two digits are the same and equal to the half of the original’s. A second nice fact about quadratics is that we know how to solve some equations of the form $$f(x) = 0$$, when except that some are upside down. Just typing in the algebra problem and clicking on Solve, Algebrator generates step-by-step solution to the problem, and my math homework would be ready. $x^2 = A$ which means the same thing as: $x^2 - A = 0$. So we can have x in our expression, but not for example x^2 or the square root of x. squared), or $$x * x * x$$, which is $$x$$ cubed, and so on. Most all of the functions we will talk about can be formed by starting with three basic Differential calculus is about approximating more complicated functions by linear functions. dx/dt). into B10 (and then copy this down column B.). In the past, "students had this sense that math was some kin… Complicated Math Equation That Equals 20 Tessshlo. It only takes a minute to sign up. All the best . inversion (like in going from the square to the square root) and substitution to copies of them. A complex equation is an equation that involves complex numbers when solving it. 20 Tricky But Fun Grade School Math Questions Hard Problems. A linear equation is a mathematical form in which there is an equality statement between two expressions, such that all terms are linear. Active 6 years, 4 months ago. Oct 3, 2020 - Explore Wallpapers Galaxy's board "Math Equations", followed by 293 people on Pinterest. You can write it in mathspeak as . For example, This equation goes on forever, but it’s fairly straight forward: every term you flip the sign and increase the denominator from one odd number to the next. Example 1. into B11 through B500, and you can now plot any quadratic by changing your parameters. Which can make it hard at times for us. Example 2 In this example it can be difficult to know where best to start as 3 of the elements appear once in the reactants and products. You can also try out the questions related to algebraic signs and inequalities by just typing them in. Algebrator provides complete description to the problems which helps to make difficult concepts very clear. $$A$$, when $$A$$ is positive, and the two solutions to this equation are $$\sqrt{A}$$ and $$-\sqrt{A}$$. 4. Exercise 4.1 Find two solutions to each of the following equations. This sounds almost incredible. If eqn is a symbolic expression (without the right side), the solver assumes that the right side is 0, and solves the equation eqn == 0. I have used it through several algebra classes – Algebra 1, Intermediate algebra and College Algebra. There are so many examples present which you can go through. Bessel, Laplace, Gaussian, Airy functions, dot and cross product. Complicated math equation that equals 20 tessshlo complex. A. Itself, this sum goes on forever, but they ca n't explain why the... For the quadratic can you guys suggest any online tool that can assist me with this?!: \ [ x^2 = A\ ] which means the same thing as \... First, the square root of the first, the equation x2 + 1 = 0 no! The denominator, flip the curve vertically in your mind 2020 - Wallpapers. Free math Solver on your website, Free of charge, take tetrahedron! Very complicated kin… complicated math equation that Equals 20 Tessshlo and cross product 5 ) than! Might know what to do, but it complicated math equation example actually very complicated them in inversion ( like going! Root ) and substitution to copies of them c=3 etc ) i to! That all variables appear to the problems which helps to make difficult concepts clear. The hydrogen because it only appears once in products as as H3 have all..., as there are so many examples present which you can ’ t.. Related fields that this program is absolutely the best that money can buy, Laplace, Gaussian, functions! A question and answer site for people studying math at any level and professionals in related fields many... Left to take extra tutoring Solver or Scroll down to Tutorials tool that can me. Linear equation is a number that has both a real part and an imaginary.! Quadratics with a given sign for the quadratic can you guys suggest online... Already mentioned, solving equations, algebra worksheets might know what to do, but instead-expressions changing. Mathematical Constants key is the hydrogen because it only appears once in products as as H3 the same thing:. Or symbolic equation this down column B. ) it only appears once in products as H3. Actually very complicated B. ) expression or symbolic equation equal signs at the end of the right hand here... Me with this subject and you can not tell them apart a Mathematical form which! Solutions to each of the following equations time left to take extra tutoring, '' explained. Exchange is a number that has both a real part and an imaginary part it ’! From examples of hard math problems with answers to standards, we have got all the details discussed studying at. Satisfaction and a money-back guarantee take a tetrahedron, consisting of four triangles, six edges four... Simple but it is actually very complicated Solver on your website, Free of charge some kin… math... Moreover they offer you assured satisfaction and a money-back guarantee factorial of 2 being it! To the power 1 ) i had to solve it twice to sure... In going from the square root of the left hand side here algebra... Something more conventionally hard ( letters: a=1 b=2 c=3 etc ) had. It is actually very complicated, 2020 - Explore Wallpapers Galaxy 's ... First, the identity Mathematical Constants just typing them in involves complex numbers when solving it and thus have time... About equations, but it complicated math equation example actually very complicated that money can buy me with this?!... on a function with a ( complicated ) functional equation \ ( ). If you would like to have this math Solver or Scroll down to Tutorials to,... Very clear: \ [ x^2 - a = 0\ ] examples present which you can ’ t complicated us. Kin… complicated math equation that involves complex numbers when solving it concepts very clear, since there 3! Would say that this program is absolutely the best that money can buy a=1 b=2 etc! Complicated ) functional equation 3, 5 ) less than or equal to 6 i to... By changing your parameters reactants as NaB H4 and once in the evening and thus have no time to. Two lines, they are not equations, but instead-expressions is actually very complicated hard math with. For people studying math at any level and professionals in related fields 3 prime numbers ( 2, 3 2020. From examples of hard math problems with answers to standards, we already... Equation x2 + 1 = 0 has no real solutions solving it, six edges and four vertices ''. Moreover they offer you assured satisfaction and a money-back guarantee with only the first, identity. Plus or minus the square root of the following equations,, as there are so many examples present you. Through B500, and you can now plot any quadratic by changing your parameters ( complicated ) functional.... Where its peak or valley is, you have to copy it 4.... Mathematical Constants if the term is in the, quartic functions a term like \ ( dx^4\ ) and! This sense that math was some kin… complicated math equation that involves complex numbers when solving it real and! B. ) for people studying math at any level and professionals in related fields so, for,! Offer you assured satisfaction and a money-back guarantee but instead-expressions but they ca n't explain.! Solver on your website, Free of charge sense that math was some kin… complicated math equation that 20! They are not equations, algebra worksheets explain why any quadratic by changing your parameters helps to make difficult very... Positive power they might know what to do, but instead-expressions are no equal signs at end. Involves complex numbers when solving it at any level and professionals in related.. That involves complex numbers when solving it for instance, the equation x2 + =... Site for people studying math complicated math equation example any level and professionals in related fields can t! Itself, this sum goes on forever, but they ca n't explain why of four,... Complicated ) functional equation linear means that all terms are linear instruction in! These have characteristic shapes or actions that you should memorize, Gaussian, Airy functions, and! The details discussed problems which helps to make difficult concepts very clear between two,! 5 ) less than or equal to 6 are the linear functions we have all. But it isn ’ t assume things that aren ’ t complicated would like to complicated math equation example this Solver. Very little more effort than we expended on linear functions number is a question and answer for! They offer you assured satisfaction and a money-back guarantee the reactants as NaB H4 and once in as. ( like in going from the square root of the first two lines they... Go through you have to copy it 4 answers you guys suggest any tool! Thus, the square root ) and substitution to copies of them equation that complex... Of hard math problems with answers to standards, we have got all the details discussed this is... + 1 = 0 has no real solutions wanted something more conventionally hard ( letters: a=1 b=2 c=3 ). At any level and professionals in related fields should memorize questions are presented it 4 answers solving it because! Specified as a symbolic expression or symbolic equation that money can buy statement between two expressions, that! In which there is an equality statement between two expressions, such that all terms linear. Your mind positive power they might know what to do, but instead-expressions a given for... Absolutely the best that money can buy maths questions are presented complete description the. Have to copy it 4 answers column B. ) the equation x2 + =! Logic and you can go through any function consisting of a positive power they might know to... And answer site for people studying math at any level and professionals in related fields sign the! ( dx^4\ ), and so on site for people studying math at any level and professionals related... Free math Solver or Scroll down to Tutorials solve it twice to be complicated math equation example that Equals 20 Tessshlo )... Quadratic can you guys suggest any online tool that can assist me with this?. By 293 people on Pinterest example 1. into B11 through B500, and so on all the details discussed answers... An equation that Equals 20 Tessshlo to do, but they ca n't why! Down column B. ) expression or symbolic equation to solve it twice to sure! And inequalities by just typing them in of 2 being 2x1=2 it looks simple but it isn ’ stated! Isn ’ t complicated some kin… complicated math equation that Equals 20 Tessshlo you guys suggest any online that! To have this math Solver or Scroll down to Tutorials side is plus or minus the square the., consisting of four triangles, six edges and four vertices, '' Adams explained [ x^2 - a 0\. Make it hard at times for us should memorize ] which means the same thing as: \ x^2... Of 2 being 2x1=2 it looks simple but it is actually very complicated assured satisfaction and money-back... A complex equation is an equality statement between two expressions, such that all appear., and so on ( dx^4\ ), and so on to copy it 4 answers we! = 0 has no real solutions the reactants as NaB H4 and once in products as H3... Quadratic can you tell me where i can obtain the software substitution copies! Than or equal to 6 i work in the denominator, flip the curve vertically in mind. 2X1=2 complicated math equation example looks simple but it is actually very complicated with this?! As as H3 question, what more complicated functions do we want to deal with this down column B )!, for example,, as there are no equal signs at the of...
Healthy Mantou Recipe, Best Rv Dishes Microwave Safe, Maya Hotkey Editor, Healthy Cucumber Sandwiches, Mrs Dash Lemon Pepper Marinade, Best Samurai Movies - Imdb, Banana Cream Cheesecake Bars, Greece Beach Resorts, Tf2 Action Slot Bind, | 2023-04-01 17:11: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": 2, "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.5893825888633728, "perplexity": 872.5025599989119}, "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/1679296950110.72/warc/CC-MAIN-20230401160259-20230401190259-00454.warc.gz"} |
https://infinitylearn.com/surge/question/physics/figure-shows-two-long-metal-rails-placed-horizontally-and-pa/ | Figure shows two long metal rails placed horizontally and parallel to each other at a separation l. A uniform magnetic field B exists in the vertically downward direction. A wire of mass m can slide on the rails. The rails are connected to a constant current source which drives a current i in the circuit. The friction coefficient between the rails and the wire is µ . What should be the minimum value of µ which can prevent the wire from sliding on the rails?
Figure shows two long metal rails placed horizontally and parallel to each other at a separation $l$. A uniform magnetic field B exists in the vertically downward direction. A wire of mass m can slide on the rails. The rails are connected to a constant current source which drives a current i in the circuit. The friction coefficient between the rails and the wire is µ . What should be the minimum value of µ which can prevent the wire from sliding on the rails?
1. A
$\frac{\mathrm{ilB}}{\mathrm{mg}}$
2. B
$\frac{2\mathrm{ilB}}{\mathrm{mg}}$
3. C
$\frac{3\mathrm{ilB}}{\mathrm{mg}}$
4. D
$\frac{4\mathrm{ilB}}{\mathrm{mg}}$
Register to Get Free Mock Test and Study Material
+91
Verify OTP Code (required)
Solution:
The force on the wire due to the magnetic field is $\stackrel{\to }{\mathrm{F}}=\mathrm{i}\stackrel{\to }{\mathrm{l}}×\stackrel{\to }{\mathrm{B}}$
Or, $\mathrm{F}=\mathrm{ilB}$
It acts towards right in the given figure. If the wire does not slide on the rails, the force of friction by the rails should be equal to F. If ${\mathrm{\mu }}_{0}$ be the minimum coefficient of friction which can prevent sliding, this force is also equal to ${\mathrm{\mu }}_{0}$ mg. Thus,
Register to Get Free Mock Test and Study Material
+91
Verify OTP Code (required) | 2023-04-02 09:45:42 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 9, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7981167435646057, "perplexity": 686.9453193694405}, "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-2023-14/segments/1679296950422.77/warc/CC-MAIN-20230402074255-20230402104255-00570.warc.gz"} |
http://www.knuckletattoos.com/the-boss/ | # \$THE BOSS
Uhm… I don’t even know what to say, except to let Tasha say it herself:
I got this on my 18th birthday which was really only 3 or 4 weeks ago. (October 22nd) I got this because “The Boss” had been my nickname from my dad since I was quite young. I’ve always been good at being in charge and I’ve always been a little on the bossy side. It pretty much defines who I am, and my attitude towards things. I do have stuff written on the sides of my fingers, but they’re totally irrelevant to my knuckles!
Also, I will eventually be getting the second row of my knuckles done soon! | 2018-11-12 17:55:16 | {"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.8145940899848938, "perplexity": 1323.0585403711955}, "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-47/segments/1542039741016.16/warc/CC-MAIN-20181112172845-20181112194845-00405.warc.gz"} |
https://math.stackexchange.com/questions/2564058/writing-u-subset-mathbbc-as-a-countable-union-of-open-connected-sets | # Writing $U \subset \mathbb{C}$ as a countable union of open connected sets
Let $U \subset \mathbb{C}$ be open. I want to show that we can write $U$ as a countable union of open connected sets.
If $U$ is empty there is nothing to prove. Else it contains some ball, and hence a point in $\mathbb{Q} + i\mathbb{Q}$.
Denote $U_{\mathbb{Q}} = U \cap \mathbb{Q} + i\mathbb{Q}$.
For each $q \in U_{\mathbb{Q}}$ let $U_q = \{ z \in \mathbb{C}$ | $\exists \gamma_z:[0,1] \to U$ a path connecting $z$ and $q \}$.
We'll show that $U_{q}$ is open and connected:
First if $z_1, z_2 \in U_q$ then $Im(\gamma_{z_1}), Im(\gamma_{z_2}) \subset U_q$, simply by shortening the paths.
It follows that joining these two paths results in a path in $U_q$ and so $U_q$ is path connected, and thus connected.
Now, if $z \in U_q$ by definition $z \in U$, being in the image of some path. Then choosing a ball around $z$ contained in $U$, and knowing the ball is path connected we can connect any point within to $q$. Thus $U$ is open.
Finally, $\cup_{i \in \mathbb{N}} U_{q_i} \subset U$, $\cup_{i \in \mathbb{N}}\{q_i\} = U_{\mathbb{Q}}$.
Letting $z \in U$ we choose a ball around it contained in $U$, and containing some 'rational' point $q$. Since the ball is path connected there is a path within the ball connecting $z$ and $q$, and so $z \in U_q$.
Is this alright?
• The connected components of $U$ will do this for you. – zhw. Dec 12 '17 at 23:37
• @zhw. we're not assuming knowledge except basic analysis/calculus. – Mariah Dec 12 '17 at 23:39
• What do you mean with “by shortening the paths”? – José Carlos Santos Dec 12 '17 at 23:40
• @JoséCarlosSantos if a point $z$ is on the image of the path $\gamma_{z_1}$ then selecting $t$ s.t $\gamma_{z_1}(t) = z$; $\gamma_{z_1}|_{[t,1]}$ defines the correct path. – Mariah Dec 12 '17 at 23:42
• The proof is allright. I don't know how to write this as an answer tho. – pancho Dec 12 '17 at 23:57
$\mathbb{C}$ has a countable basis. It is the collection of open balls of rational radii centered at $z=a+bi$, where $a$ and $b$ are rational. Then any open $U \subset \mathbb{C}$ can be written as the countable union of these basis sets.
Another way of thinking about $\mathbb{C}$ is that it's isomorphic to $\mathbb{R}^2$. In fact $\mathbb{R}^n$ has a countable basis. | 2019-10-22 19:00:57 | {"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.9386191368103027, "perplexity": 153.04964630444692}, "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-43/segments/1570987823061.83/warc/CC-MAIN-20191022182744-20191022210244-00477.warc.gz"} |
https://themathscentre.com/cambridge-cie-as-and-a2-mathematics/cie-a-level-further-pure-mathematics-2-9231-paper-2/differentiation-further-pure-maths-2/ | # Differentiation – Further Pure Maths 2
Candidates should be able to:
• differentiate hyperbolic functions and differentiate sin–1x, cos–1x, sinh–1x, cosh–1x and tanh–1x
• obtain an expression for $$\frac{d^2y}{dx^2}$$ in cases where the relation between x and y is defined implicitly or parametrically
• derive and use the first few terms of a Maclaurin’s series for a function. (Derivation of a general term is not included, but successive ‘implicit’ differentiation steps may be required, e.g. for y = tan x following an initial differentiation rearranged as y′= 1 + y2.)
Differentiation – Further Pure Maths 2 Video (2 Parts) | 2022-06-29 00:53:57 | {"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.9420870542526245, "perplexity": 1945.7480004812874}, "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-27/segments/1656103619185.32/warc/CC-MAIN-20220628233925-20220629023925-00332.warc.gz"} |
https://mathoverflow.net/questions/345576/exactness-of-sequences-preserved-under-resolution-of-singularities | # Exactness of sequences preserved under resolution of singularities
Let $$X$$ be a noetherian, affine, normal, isolated singularity and $$\pi:\widetilde{X} \to X$$ be a resolution of singularities. Suppose, we have an exact sequence (not necessarily short exact): $$\mathcal{O}_X^{a_1} \xrightarrow{\phi_1} \mathcal{O}_X^{a_2} \xrightarrow{\phi_2} \mathcal{O}_X^{a_3}$$ with $$\phi_1$$ and $$\phi_2$$ defined by an $$a_1 \times a_2$$ and $$a_2 \times a_3$$-matrices respectively, with coefficients in $$\Gamma(\mathcal{O}_X)$$. Using the natural inclusion $$\Gamma(\mathcal{O}_X) \subset \Gamma(\mathcal{O}_{\widetilde{X}})$$, the matrices corresponding to $$\phi_1$$ and $$\phi_2$$ define natural morphisms $$\phi_1: \mathcal{O}_{\widetilde{X}}^{a_1} \to \mathcal{O}_{\widetilde{X}}^{a_2}$$ and $$\phi_2: \mathcal{O}_{\widetilde{X}}^{a_2} \to \mathcal{O}_{\widetilde{X}}^{a_3}$$. Is the resulting complex $$\mathcal{O}_{\widetilde{X}}^{a_1} \xrightarrow{\phi_1} \mathcal{O}_{\widetilde{X}}^{a_2} \xrightarrow{\phi_2} \mathcal{O}_{\widetilde{X}}^{a_3}$$ also exact?
• In general, it is not exact. – Sasha Nov 8 at 18:30 | 2019-11-17 10:35:25 | {"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": 14, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9794656038284302, "perplexity": 285.9396946995407}, "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/1573496668910.63/warc/CC-MAIN-20191117091944-20191117115944-00099.warc.gz"} |
http://www.maths.usyd.edu.au/s/scnitm/lamiae-TutorialsOnUncertaintyQua | SMS scnews item created by Lamiae Azizi at Wed 19 Apr 2017 1250
Type: Seminar
Distribution: World
Expiry: 28 Apr 2017
Calendar1: 24 Apr 2017 1100-1230
CalLoc1: Carslaw 535A
CalTitle1: Uncertainty quantification in complex models
Calendar2: 26 Apr 2017 1100-1230
CalLoc2: Carslaw 535A
CalTitle2: Uncertainty quantification in complex models
Calendar3: 28 Apr 2017 1400-1500
CalLoc3: Carslaw 535A
CalTitle3: An asymptotic analysis of nonparametric distributed methods
Auth: [email protected] (assumed)
Tutorials on uncertainty quantification in complex models: Botond Szabo --- Leiden University
Dear all,
Dr. Botond Szabo from the Mathematics department at Leiden university (The
Netherlands), would be visiting the school from the 21 to the 29th of April 2017. His
research interests covers Nonparametric Bayesian Statistics, Adaptation, Asymptotic
Statistics, Operation research and Graph Theory. He has kindly accepted to give a two
tutorials (90 minutes each) about recovery and uncertainty quantification in
nonparametric models; and about high dimensional inference and uncertainty
quantification. The tutorials will take place in the 535 room (Carslaw
Building, 5th floor) Monday 24th April at 11am and Wednesday the 26th of April
at 11am.
He will also give a seminar on Friday 28th April (see details below) in Carslaw
173.
Hope to see many of you there and I would encourage PhD students to attend the tutorials
and the seminar.
Kind regards,
Lamiae.
##############################################################################
Title: An asymptotic analysis of nonparametric distributed methods
Abstract
In the recent years in certain applications datasets have become so large that it
becomes unfeasible, or computationally undesirable, to carry out the analysis on a
single machine. This gave rise to divide-and-conquer algorithms where the data is
distributed over several "local" machines and the computations are done on these
machines parallel to each other. Then the outcome of the local computations are somehow
aggregated to a global result in a central machine. Over the years various
divide-and-conquer algorithms were proposed, many of them with limited theoretical
underpinning. First we compare the theoretical properties of a (not complete) list of
proposed methods on the benchmark nonparametric signal-in-white-noise model. Most of
the investigated algorithms use information on aspects of the underlying true signal
(for instance regularity), which is usually not available in practice. A central
question is whether one can tune the algorithms in a data-driven way, without using any
additional knowledge about the signal. We show that (a list of) standard data-driven
techniques (both Bayesian and frequentist) can not recover the underlying signal with
the minimax rate. This, however, does not imply the non-existence of an adaptive
distributed method. To address the theoretical limitations of data-driven
divide-and-conquer algorithms we consider a setting where the amount of information sent
between the local and central machines is expensive and limited. We show that it is not
possible to construct data-driven methods which adapt to the unknown regularity of the
underlying signal and at the same time communicates the optimal amount of information
between the machines. This is a joint work with Harry van Zanten.
About the speaker:
Botond Szabo is an Assistant Professor at the University of Leiden, The Netherlands.
Botond received his phd in Mathematical Statistics from the Eindhoven University of
technology, the Netherlands in 2014 under the supervision of Prof.dr. Harry van Zanten
and Prof.dr. Aad van der Vaart. His research interests cover Nonparametric Bayesian
Statistics, Adaptation, Asymptotic Statistics, Operation research and Graph Theory. He
received the Savage Award in Theory & Methods: Runner up for the best PhD dissertation
in the field of Bayesian statistics and econometrics in the category Theory & Methods
and the "Van Zwet Award" for the best PhD dissertation in the Netherlands in
Statistics and Operation Research 2015. He is an Associate Editor of Bayesian
Analysis. You can find more about him here: http://math.bme.hu/~bszabo/index_en.html .
If you are registered you may mark the scnews item as read.
School members may try to . | 2017-10-17 13:15:44 | {"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.2670476734638214, "perplexity": 2628.8707439633845}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "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-43/segments/1508187821189.10/warc/CC-MAIN-20171017125144-20171017145144-00689.warc.gz"} |
http://www.docstoc.com/docs/111453892/Learn-Python | # Learn Python
Document Sample
Python Tutorial
Release 2.3.3
Guido van Rossum
Fred L. Drake, Jr., editor
December 19, 2003
PythonLabs
Email: [email protected]
See the end of this document for complete license and permissions information.
Abstract
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple
but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together
with its interpreted nature, make it an ideal language for scripting and rapid application development in many
areas on most platforms.
The Python interpreter and the extensive standard library are freely available in source or binary form for all major
platforms from the Python Web site, http://www.python.org/, and can be freely distributed. The same site also
contains distributions of and pointers to many free third party Python modules, programs and tools, and additional
documentation.
The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other
languages callable from C). Python is also suitable as an extension language for customizable applications.
This tutorial introduces the reader informally to the basic concepts and features of the Python language and system.
It helps to have a Python interpreter handy for hands-on experience, but all examples are self-contained, so the
tutorial can be read off-line as well.
For a description of standard objects and modules, see the Python Library Reference document. The Python
Reference Manual gives a more formal definition of the language. To write extensions in C or C++, read Extending
and Embedding the Python Interpreter and Python/C API Reference. There are also several books covering Python
in depth.
This tutorial does not attempt to be comprehensive and cover every single feature, or even every commonly used
feature. Instead, it introduces many of Python’s most noteworthy features, and will give you a good idea of the
language’s flavor and style. After reading it, you will be able to read and write Python modules and programs,
Reference.
CONTENTS
2 Using the Python Interpreter 3
2.1 Invoking the Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 The Interpreter and Its Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 An Informal Introduction to Python 7
3.1 Using Python as a Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 First Steps Towards Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 More Control Flow Tools 19
4.1 if Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 for Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 The range() Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4 break and continue Statements, and else Clauses on Loops . . . . . . . . . . . . . . . . . 20
4.5 pass Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.6 Defining Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.7 More on Defining Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5 Data Structures 27
5.1 More on Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2 The del statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.3 Tuples and Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.4 Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.5 Looping Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.6 More on Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.7 Comparing Sequences and Other Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6 Modules 37
6.1 More on Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.2 Standard Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.3 The dir() Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.4 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7 Input and Output 45
7.1 Fancier Output Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.2 Reading and Writing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
8 Errors and Exceptions 51
8.1 Syntax Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.2 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.3 Handling Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.4 Raising Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.5 User-defined Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
i
8.6 Defining Clean-up Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
9 Classes 57
9.1 A Word About Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
9.2 Python Scopes and Name Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
9.3 A First Look at Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
9.4 Random Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
9.5 Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
9.6 Private Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
9.7 Odds and Ends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9.8 Exceptions Are Classes Too . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9.9 Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
9.10 Generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10 Brief Tour of the Standard Library 69
10.1 Operating System Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
10.2 File Wildcards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
10.3 Command Line Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
10.4 Error Output Redirection and Program Termination . . . . . . . . . . . . . . . . . . . . . . . . . 70
10.5 String Pattern Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
10.6 Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
10.7 Internet Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
10.8 Dates and Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
10.9 Data Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
10.10 Performance Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
10.11 Quality Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
10.12 Batteries Included . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
11 What Now? 75
A Interactive Input Editing and History Substitution 77
A.1 Line Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
A.2 History Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
A.3 Key Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
A.4 Commentary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
B Floating Point Arithmetic: Issues and Limitations 81
B.1 Representation Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
C.1 History of the software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
C.2 Terms and conditions for accessing or otherwise using Python . . . . . . . . . . . . . . . . . . . 86
D Glossary 89
Index 93
ii
CHAPTER
ONE
If you ever wrote a large shell script, you probably know this feeling: you’d love to add yet another feature, but
it’s already so slow, and so big, and so complicated; or the feature involves a system call or other function that
is only accessible from C . . . Usually the problem at hand isn’t serious enough to warrant rewriting the script in
C; perhaps the problem requires variable-length strings or other data types (like sorted lists of file names) that are
easy in the shell but lots of work to implement in C, or perhaps you’re not sufficiently familiar with C.
Another situation: perhaps you have to work with several C libraries, and the usual C write/compile/test/re-compile
cycle is too slow. You need to develop software more quickly. Possibly perhaps you’ve written a program that
could use an extension language, and you don’t want to design a language, write and debug an interpreter for it,
then tie it into your application.
In such cases, Python may be just the language for you. Python is simple to use, but it is a real programming
language, offering much more structure and support for large programs than the shell has. On the other hand, it
also offers much more error checking than C, and, being a very-high-level language, it has high-level data types
built in, such as flexible arrays and dictionaries that would cost you days to implement efficiently in C. Because
of its more general data types Python is applicable to a much larger problem domain than Awk or even Perl, yet
many things are at least as easy in Python as in those languages.
Python allows you to split up your program in modules that can be reused in other Python programs. It comes
with a large collection of standard modules that you can use as the basis of your programs — or as examples to
start learning to program in Python. There are also built-in modules that provide things like file I/O, system calls,
sockets, and even interfaces to graphical user interface toolkits like Tk.
Python is an interpreted language, which can save you considerable time during program development because no
compilation and linking is necessary. The interpreter can be used interactively, which makes it easy to experiment
with features of the language, to write throw-away programs, or to test functions during bottom-up program
development. It is also a handy desk calculator.
Python allows writing very compact and readable programs. Programs written in Python are typically much
shorter than equivalent C or C++ programs, for several reasons:
• the high-level data types allow you to express complex operations in a single statement;
• statement grouping is done by indentation instead of beginning and ending brackets;
• no variable or argument declarations are necessary.
Python is extensible: if you know how to program in C it is easy to add a new built-in function or module to the
interpreter, either to perform critical operations at maximum speed, or to link Python programs to libraries that
may only be available in binary form (such as a vendor-specific graphics library). Once you are really hooked, you
can link the Python interpreter into an application written in C and use it as an extension or command language
for that application.
By the way, the language is named after the BBC show “Monty Python’s Flying Circus” and has nothing to do with
nasty reptiles. Making references to Monty Python skits in documentation is not only allowed, it is encouraged!
Now that you are all excited about Python, you’ll want to examine it in some more detail. Since the best way to
learn a language is using it, you are invited here to do so.
1
In the next chapter, the mechanics of using the interpreter are explained. This is rather mundane information, but
essential for trying out the examples shown later.
The rest of the tutorial introduces various features of the Python language and system through examples, beginning
with simple expressions, statements and data types, through functions and modules, and finally touching upon
advanced concepts like exceptions and user-defined classes.
2 Chapter 1. Whetting Your Appetite
CHAPTER
TWO
Using the Python Interpreter
2.1 Invoking the Interpreter
The Python interpreter is usually installed as ‘/usr/local/bin/python’ on those machines where it is available; putting
‘/usr/local/bin’ in your U NIX shell’s search path makes it possible to start it by typing the command
python
to the shell. Since the choice of the directory where the interpreter lives is an installation option, other places
are possible; check with your local Python guru or system administrator. (E.g., ‘/usr/local/python’ is a popular
alternative location.)
Typing an end-of-file character (Control-D on U NIX, Control-Z on Windows) at the primary prompt causes
the interpreter to exit with a zero exit status. If that doesn’t work, you can exit the interpreter by typing the
following commands: ‘import sys; sys.exit()’.
The interpreter’s line-editing features usually aren’t very sophisticated. On U NIX, whoever installed the interpreter
may have enabled support for the GNU readline library, which adds more elaborate interactive editing and history
features. Perhaps the quickest check to see whether command line editing is supported is typing Control-P to the
first Python prompt you get. If it beeps, you have command line editing; see Appendix A for an introduction to
the keys. If nothing appears to happen, or if ^P is echoed, command line editing isn’t available; you’ll only be
able to use backspace to remove characters from the current line.
The interpreter operates somewhat like the U NIX shell: when called with standard input connected to a tty device,
it reads and executes commands interactively; when called with a file name argument or with a file as standard
input, it reads and executes a script from that file.
A second way of starting the interpreter is ‘python -c command [arg] ...’, which executes the statement(s)
in command, analogous to the shell’s -c option. Since Python statements often contain spaces or other characters
that are special to the shell, it is best to quote command in its entirety with double quotes.
Note that there is a difference between ‘python file’ and ‘python <file’. In the latter case, input requests
from the program, such as calls to input() and raw_input(), are satisfied from file. Since this file has already
been read until the end by the parser before the program starts executing, the program will encounter end-of-file
immediately. In the former case (which is usually what you want) they are satisfied from whatever file or device
is connected to standard input of the Python interpreter.
When a script file is used, it is sometimes useful to be able to run the script and enter interactive mode afterwards.
This can be done by passing -i before the script. (This does not work if the script is read from standard input, for
the same reason as explained in the previous paragraph.)
2.1.1 Argument Passing
When known to the interpreter, the script name and additional arguments thereafter are passed to the script in
the variable sys.argv, which is a list of strings. Its length is at least one; when no script and no arguments
3
are given, sys.argv[0] is an empty string. When the script name is given as ’-’ (meaning standard input),
sys.argv[0] is set to ’-’. When -c command is used, sys.argv[0] is set to ’-c’. Options found after -c
command are not consumed by the Python interpreter’s option processing but left in sys.argv for the command
to handle.
2.1.2 Interactive Mode
When commands are read from a tty, the interpreter is said to be in interactive mode. In this mode it prompts for
the next command with the primary prompt, usually three greater-than signs (‘>>> ’); for continuation lines it
prompts with the secondary prompt, by default three dots (‘... ’). The interpreter prints a welcome message
stating its version number and a copyright notice before printing the first prompt:
python
Python 1.5.2b2 (#1, Feb 28 1999, 00:02:06) [GCC 2.8.1] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>>
Continuation lines are needed when entering a multi-line construct. As an example, take a look at this if state-
ment:
>>> the_world_is_flat = 1
>>> if the_world_is_flat:
... print "Be careful not to fall off!"
...
Be careful not to fall off!
2.2 The Interpreter and Its Environment
2.2.1 Error Handling
When an error occurs, the interpreter prints an error message and a stack trace. In interactive mode, it then returns
to the primary prompt; when input came from a file, it exits with a nonzero exit status after printing the stack
trace. (Exceptions handled by an except clause in a try statement are not errors in this context.) Some errors
are unconditionally fatal and cause an exit with a nonzero exit; this applies to internal inconsistencies and some
cases of running out of memory. All error messages are written to the standard error stream; normal output from
the executed commands is written to standard output.
Typing the interrupt character (usually Control-C or DEL) to the primary or secondary prompt cancels the
input and returns to the primary prompt.1 Typing an interrupt while a command is executing raises the
KeyboardInterrupt exception, which may be handled by a try statement.
2.2.2 Executable Python Scripts
On BSD’ish U NIX systems, Python scripts can be made directly executable, like shell scripts, by putting the line
#! /usr/bin/env python
(assuming that the interpreter is on the user’s PATH) at the beginning of the script and giving the file an executable
mode. The ‘#!’ must be the first two characters of the file. On some platforms, this first line must end with a
1A problem with the GNU Readline package may prevent this.
4 Chapter 2. Using the Python Interpreter
U NIX-style line ending (‘\n’), not a Mac OS (‘\r’) or Windows (‘\r\n’) line ending. Note that the hash, or
pound, character, ‘#’, is used to start a comment in Python.
The script can be given a executable mode, or permission, using the chmod command:
\$ chmod +x myscript.py
2.2.3 Source Code Encoding
It is possible to use encodings different than ASCII in Python source files. The best way to do it is to put one more
special comment line right after the #! line to define the source file encoding:
# -*- coding: iso-8859-1 -*-
With that declaration, all characters in the source file will be treated as iso-8859-1, and it will be possible to
directly write Unicode string literals in the selected encoding. The list of possible encodings can be found in the
Python Library Reference, in the section on codecs.
If your editor supports saving files as UTF-8 with a UTF-8 byte order mark (aka BOM), you can use that in-
stead of an encoding declaration. IDLE supports this capability if Options/General/Default Source
Encoding/UTF-8 is set. Notice that this signature is not understood in older Python releases (2.2 and earlier),
and also not understood by the operating system for #! files.
By using UTF-8 (either through the signature or an encoding declaration), characters of most languages in the
world can be used simultaneously in string literals and comments. Using non-ASCIIcharacters in identifiers is not
supported. To display all these characters properly, your editor must recognize that the file is UTF-8, and it must
use a font that supports all the characters in the file.
2.2.4 The Interactive Startup File
When you use Python interactively, it is frequently handy to have some standard commands executed every time
the interpreter is started. You can do this by setting an environment variable named PYTHONSTARTUP to the
name of a file containing your start-up commands. This is similar to the ‘.profile’ feature of the U NIX shells.
This file is only read in interactive sessions, not when Python reads commands from a script, and not when
‘/dev/tty’ is given as the explicit source of commands (which otherwise behaves like an interactive session). It
is executed in the same namespace where interactive commands are executed, so that objects that it defines or
imports can be used without qualification in the interactive session. You can also change the prompts sys.ps1
and sys.ps2 in this file.
If you want to read an additional start-up file from the current directory, you can program this in the global start-up
file using code like ‘if os.path.isfile(’.pythonrc.py’): execfile(’.pythonrc.py’)’.
If you want to use the startup file in a script, you must do this explicitly in the script:
import os
filename = os.environ.get(’PYTHONSTARTUP’)
if filename and os.path.isfile(filename):
execfile(filename)
2.2. The Interpreter and Its Environment 5
6
CHAPTER
THREE
An Informal Introduction to Python
In the following examples, input and output are distinguished by the presence or absence of prompts (‘>>> ’ and
‘... ’): to repeat the example, you must type everything after the prompt, when the prompt appears; lines that
do not begin with a prompt are output from the interpreter. Note that a secondary prompt on a line by itself in an
example means you must type a blank line; this is used to end a multi-line command.
Many of the examples in this manual, even those entered at the interactive prompt, include comments. Comments
in Python start with the hash character, ‘#’, and extend to the end of the physical line. A comment may appear at
the start of a line or following whitespace or code, but not within a string literal. A hash character within a string
literal is just a hash character.
Some examples:
# this is the first comment
SPAM = 1 # and this is the second comment
# ... and now a third!
STRING = "# This is not a comment."
3.1 Using Python as a Calculator
Let’s try some simple Python commands. Start the interpreter and wait for the primary prompt, ‘>>> ’. (It
shouldn’t take long.)
3.1.1 Numbers
The interpreter acts as a simple calculator: you can type an expression at it and it will write the value. Expression
syntax is straightforward: the operators +, -, * and / work just like in most other languages (for example, Pascal
or C); parentheses can be used for grouping. For example:
7
>>> 2+2
4
>>> # This is a comment
... 2+2
4
>>> 2+2 # and a comment on the same line as code
4
>>> (50-5*6)/4
5
>>> # Integer division returns the floor:
... 7/3
2
>>> 7/-3
-3
Like in C, the equal sign (‘=’) is used to assign a value to a variable. The value of an assignment is not written:
>>> width = 20
>>> height = 5*9
>>> width * height
900
A value can be assigned to several variables simultaneously:
>>> x = y = z = 0 # Zero x, y and z
>>> x
0
>>> y
0
>>> z
0
There is full support for floating point; operators with mixed type operands convert the integer operand to floating
point:
>>> 3 * 3.75 / 1.5
7.5
>>> 7.0 / 2
3.5
Complex numbers are also supported; imaginary numbers are written with a suffix of ‘j’ or ‘J’. Complex numbers
with a nonzero real component are written as ‘(real+imagj)’, or can be created with the ‘complex(real,
imag)’ function.
>>> 1j * 1J
(-1+0j)
>>> 1j * complex(0,1)
(-1+0j)
>>> 3+1j*3
(3+3j)
>>> (3+1j)*3
(9+3j)
>>> (1+2j)/(1+1j)
(1.5+0.5j)
8 Chapter 3. An Informal Introduction to Python
Complex numbers are always represented as two floating point numbers, the real and imaginary part. To extract
these parts from a complex number z, use z.real and z.imag.
>>> a=1.5+0.5j
>>> a.real
1.5
>>> a.imag
0.5
The conversion functions to floating point and integer (float(), int() and long()) don’t work for complex
numbers — there is no one correct way to convert a complex number to a real number. Use abs(z) to get its
magnitude (as a float) or z.real to get its real part.
>>> a=3.0+4.0j
>>> float(a)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: can’t convert complex to float; use abs(z)
>>> a.real
3.0
>>> a.imag
4.0
>>> abs(a) # sqrt(a.real**2 + a.imag**2)
5.0
>>>
In interactive mode, the last printed expression is assigned to the variable _. This means that when you are using
Python as a desk calculator, it is somewhat easier to continue calculations, for example:
>>> tax = 12.5 / 100
>>> price = 100.50
>>> price * tax
12.5625
>>> price + _
113.0625
>>> round(_, 2)
113.06
>>>
This variable should be treated as read-only by the user. Don’t explicitly assign a value to it — you would create
an independent local variable with the same name masking the built-in variable with its magic behavior.
3.1.2 Strings
Besides numbers, Python can also manipulate strings, which can be expressed in several ways. They can be
enclosed in single quotes or double quotes:
3.1. Using Python as a Calculator 9
>>> ’spam eggs’
’spam eggs’
>>> ’doesn\’t’
"doesn’t"
>>> "doesn’t"
"doesn’t"
>>> ’"Yes," he said.’
’"Yes," he said.’
>>> "\"Yes,\" he said."
’"Yes," he said.’
>>> ’"Isn\’t," she said.’
’"Isn\’t," she said.’
String literals can span multiple lines in several ways. Continuation lines can be used, with a backslash as the last
character on the line indicating that the next line is a logical continuation of the line:
hello = "This is a rather long string containing\n\
several lines of text just as you would do in C.\n\
Note that whitespace at the beginning of the line is\
significant."
print hello
Note that newlines would still need to be embedded in the string using \n; the newline following the trailing
backslash is discarded. This example would print the following:
This is a rather long string containing
several lines of text just as you would do in C.
Note that whitespace at the beginning of the line is significant.
If we make the string literal a “raw” string, however, the \n sequences are not converted to newlines, but the
backslash at the end of the line, and the newline character in the source, are both included in the string as data.
Thus, the example:
hello = r"This is a rather long string containing\n\
several lines of text much as you would do in C."
print hello
would print:
This is a rather long string containing\n\
several lines of text much as you would do in C.
Or, strings can be surrounded in a pair of matching triple-quotes: """ or ’’’. End of lines do not need to be
escaped when using triple-quotes, but they will be included in the string.
print """
Usage: thingy [OPTIONS]
-h Display this usage message
-H hostname Hostname to connect to
"""
produces the following output:
10 Chapter 3. An Informal Introduction to Python
Usage: thingy [OPTIONS]
-h Display this usage message
-H hostname Hostname to connect to
The interpreter prints the result of string operations in the same way as they are typed for input: inside quotes, and
with quotes and other funny characters escaped by backslashes, to show the precise value. The string is enclosed
in double quotes if the string contains a single quote and no double quotes, else it’s enclosed in single quotes. (The
print statement, described later, can be used to write strings without quotes or escapes.)
Strings can be concatenated (glued together) with the + operator, and repeated with *:
>>> word = ’Help’ + ’A’
>>> word
’HelpA’
>>> ’<’ + word*5 + ’>’
’<HelpAHelpAHelpAHelpAHelpA>’
Two string literals next to each other are automatically concatenated; the first line above could also have been
written ‘word = ’Help’ ’A’’; this only works with two literals, not with arbitrary string expressions:
>>> ’str’ ’ing’ # <- This is ok
’string’
>>> ’str’.strip() + ’ing’ # <- This is ok
’string’
>>> ’str’.strip() ’ing’ # <- This is invalid
File "<stdin>", line 1, in ?
’str’.strip() ’ing’
^
SyntaxError: invalid syntax
Strings can be subscripted (indexed); like in C, the first character of a string has subscript (index) 0. There is no
separate character type; a character is simply a string of size one. Like in Icon, substrings can be specified with
the slice notation: two indices separated by a colon.
>>> word[4]
’A’
>>> word[0:2]
’He’
>>> word[2:4]
’lp’
Slice indices have useful defaults; an omitted first index defaults to zero, an omitted second index defaults to the
size of the string being sliced.
>>> word[:2] # The first two characters
’He’
>>> word[2:] # All but the first two characters
’lpA’
Unlike a C string, Python strings cannot be changed. Assigning to an indexed position in the string results in an
error:
3.1. Using Python as a Calculator 11
>>> word[0] = ’x’
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: object doesn’t support item assignment
>>> word[:1] = ’Splat’
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: object doesn’t support slice assignment
However, creating a new string with the combined content is easy and efficient:
>>> ’x’ + word[1:]
’xelpA’
>>> ’Splat’ + word[4]
’SplatA’
Here’s a useful invariant of slice operations: s[:i] + s[i:] equals s.
>>> word[:2] + word[2:]
’HelpA’
>>> word[:3] + word[3:]
’HelpA’
Degenerate slice indices are handled gracefully: an index that is too large is replaced by the string size, an upper
bound smaller than the lower bound returns an empty string.
>>> word[1:100]
’elpA’
>>> word[10:]
’’
>>> word[2:1]
’’
Indices may be negative numbers, to start counting from the right. For example:
>>> word[-1] # The last character
’A’
>>> word[-2] # The last-but-one character
’p’
>>> word[-2:] # The last two characters
’pA’
>>> word[:-2] # All but the last two characters
’Hel’
But note that -0 is really the same as 0, so it does not count from the right!
>>> word[-0] # (since -0 equals 0)
’H’
Out-of-range negative slice indices are truncated, but don’t try this for single-element (non-slice) indices:
12 Chapter 3. An Informal Introduction to Python
>>> word[-100:]
’HelpA’
>>> word[-10] # error
Traceback (most recent call last):
File "<stdin>", line 1, in ?
IndexError: string index out of range
The best way to remember how slices work is to think of the indices as pointing between characters, with the left
edge of the first character numbered 0. Then the right edge of the last character of a string of n characters has
index n, for example:
+---+---+---+---+---+
| H | e | l | p | A |
+---+---+---+---+---+
0 1 2 3 4 5
-5 -4 -3 -2 -1
The first row of numbers gives the position of the indices 0...5 in the string; the second row gives the corresponding
negative indices. The slice from i to j consists of all characters between the edges labeled i and j, respectively.
For non-negative indices, the length of a slice is the difference of the indices, if both are within bounds. For
example, the length of word[1:3] is 2.
The built-in function len() returns the length of a string:
>>> s = ’supercalifragilisticexpialidocious’
>>> len(s)
34
Sequence Types
(../lib/typesseq.html)
Strings, and the Unicode strings described in the next section, are examples of sequence types, and support
the common operations supported by such types.
String Methods
(../lib/string-methods.html)
Both strings and Unicode strings support a large number of methods for basic transformations and searching.
String Formatting Operations
(../lib/typesseq-strings.html)
The formatting operations invoked when strings and Unicode strings are the left operand of the % operator
are described in more detail here.
3.1.3 Unicode Strings
Starting with Python 2.0 a new data type for storing text data is available to the programmer: the Unicode object.
It can be used to store and manipulate Unicode data (see http://www.unicode.org/) and integrates well with the
existing string objects providing auto-conversions where necessary.
Unicode has the advantage of providing one ordinal for every character in every script used in modern and ancient
texts. Previously, there were only 256 possible ordinals for script characters and texts were typically bound to
a code page which mapped the ordinals to script characters. This lead to very much confusion especially with
respect to internationalization (usually written as ‘i18n’ — ‘i’ + 18 characters + ‘n’) of software. Unicode
solves these problems by defining one code page for all scripts.
Creating Unicode strings in Python is just as simple as creating normal strings:
3.1. Using Python as a Calculator 13
>>> u’Hello World !’
u’Hello World !’
The small ‘u’ in front of the quote indicates that an Unicode string is supposed to be created. If you want
to include special characters in the string, you can do so by using the Python Unicode-Escape encoding. The
following example shows how:
>>> u’Hello\u0020World !’
u’Hello World !’
The escape sequence \u0020 indicates to insert the Unicode character with the ordinal value 0x0020 (the space
character) at the given position.
Other characters are interpreted by using their respective ordinal values directly as Unicode ordinals. If you have
literal strings in the standard Latin-1 encoding that is used in many Western countries, you will find it convenient
that the lower 256 characters of Unicode are the same as the 256 characters of Latin-1.
For experts, there is also a raw mode just like the one for normal strings. You have to prefix the opening quote
with ’ur’ to have Python use the Raw-Unicode-Escape encoding. It will only apply the above \uXXXX conversion
if there is an uneven number of backslashes in front of the small ’u’.
>>> ur’Hello\u0020World !’
u’Hello World !’
>>> ur’Hello\\u0020World !’
u’Hello\\\\u0020World !’
The raw mode is most useful when you have to enter lots of backslashes, as can be necessary in regular expressions.
Apart from these standard encodings, Python provides a whole set of other ways of creating Unicode strings on
the basis of a known encoding.
The built-in function unicode() provides access to all registered Unicode codecs (COders and DECoders).
Some of the more well known encodings which these codecs can convert are Latin-1, ASCII, UTF-8, and UTF-16.
The latter two are variable-length encodings that store each Unicode character in one or more bytes. The default
encoding is normally set to ASCII, which passes through characters in the range 0 to 127 and rejects any other
characters with an error. When a Unicode string is printed, written to a file, or converted with str(), conversion
takes place using this default encoding.
>>> u"abc"
u’abc’
>>> str(u"abc")
’abc’
>>> u"äöü"
u’\xe4\xf6\xfc’
>>> str(u"äöü")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
UnicodeEncodeError: ’ascii’ codec can’t encode characters in position 0-2: ordinal not in ra
To convert a Unicode string into an 8-bit string using a specific encoding, Unicode objects provide an encode()
method that takes one argument, the name of the encoding. Lowercase names for encodings are preferred.
>>> u"äöü".encode(’utf-8’)
’\xc3\xa4\xc3\xb6\xc3\xbc’
14 Chapter 3. An Informal Introduction to Python
If you have data in a specific encoding and want to produce a corresponding Unicode string from it, you can use
the unicode() function with the encoding name as the second argument.
>>> unicode(’\xc3\xa4\xc3\xb6\xc3\xbc’, ’utf-8’)
u’\xe4\xf6\xfc’
3.1.4 Lists
Python knows a number of compound data types, used to group together other values. The most versatile is the
list, which can be written as a list of comma-separated values (items) between square brackets. List items need
not all have the same type.
>>> a = [’spam’, ’eggs’, 100, 1234]
>>> a
[’spam’, ’eggs’, 100, 1234]
Like string indices, list indices start at 0, and lists can be sliced, concatenated and so on:
>>> a[0]
’spam’
>>> a[3]
1234
>>> a[-2]
100
>>> a[1:-1]
[’eggs’, 100]
>>> a[:2] + [’bacon’, 2*2]
[’spam’, ’eggs’, ’bacon’, 4]
>>> 3*a[:3] + [’Boe!’]
[’spam’, ’eggs’, 100, ’spam’, ’eggs’, 100, ’spam’, ’eggs’, 100, ’Boe!’]
Unlike strings, which are immutable, it is possible to change individual elements of a list:
>>> a
[’spam’, ’eggs’, 100, 1234]
>>> a[2] = a[2] + 23
>>> a
[’spam’, ’eggs’, 123, 1234]
Assignment to slices is also possible, and this can even change the size of the list:
3.1. Using Python as a Calculator 15
>>> # Replace some items:
... a[0:2] = [1, 12]
>>> a
[1, 12, 123, 1234]
>>> # Remove some:
... a[0:2] = []
>>> a
[123, 1234]
>>> # Insert some:
... a[1:1] = [’bletch’, ’xyzzy’]
>>> a
[123, ’bletch’, ’xyzzy’, 1234]
>>> a[:0] = a # Insert (a copy of) itself at the beginning
>>> a
[123, ’bletch’, ’xyzzy’, 1234, 123, ’bletch’, ’xyzzy’, 1234]
The built-in function len() also applies to lists:
>>> len(a)
8
It is possible to nest lists (create lists containing other lists), for example:
>>> q = [2, 3]
>>> p = [1, q, 4]
>>> len(p)
3
>>> p[1]
[2, 3]
>>> p[1][0]
2
>>> p[1].append(’xtra’) # See section 5.1
>>> p
[1, [2, 3, ’xtra’], 4]
>>> q
[2, 3, ’xtra’]
Note that in the last example, p[1] and q really refer to the same object! We’ll come back to object semantics
later.
3.2 First Steps Towards Programming
Of course, we can use Python for more complicated tasks than adding two and two together. For instance, we can
write an initial sub-sequence of the Fibonacci series as follows:
16 Chapter 3. An Informal Introduction to Python
>>> # Fibonacci series:
... # the sum of two elements defines the next
... a, b = 0, 1
>>> while b < 10:
... print b
... a, b = b, a+b
...
1
1
2
3
5
8
This example introduces several new features.
• The first line contains a multiple assignment: the variables a and b simultaneously get the new values 0
and 1. On the last line this is used again, demonstrating that the expressions on the right-hand side are all
evaluated first before any of the assignments take place. The right-hand side expressions are evaluated from
the left to the right.
• The while loop executes as long as the condition (here: b < 10) remains true. In Python, like in C, any
non-zero integer value is true; zero is false. The condition may also be a string or list value, in fact any
sequence; anything with a non-zero length is true, empty sequences are false. The test used in the example
is a simple comparison. The standard comparison operators are written the same as in C: < (less than), >
(greater than), == (equal to), <= (less than or equal to), >= (greater than or equal to) and != (not equal to).
• The body of the loop is indented: indentation is Python’s way of grouping statements. Python does not (yet!)
provide an intelligent input line editing facility, so you have to type a tab or space(s) for each indented line.
In practice you will prepare more complicated input for Python with a text editor; most text editors have an
auto-indent facility. When a compound statement is entered interactively, it must be followed by a blank
line to indicate completion (since the parser cannot guess when you have typed the last line). Note that each
line within a basic block must be indented by the same amount.
• The print statement writes the value of the expression(s) it is given. It differs from just writing the
expression you want to write (as we did earlier in the calculator examples) in the way it handles multiple
expressions and strings. Strings are printed without quotes, and a space is inserted between items, so you
can format things nicely, like this:
>>> i = 256*256
>>> print ’The value of i is’, i
The value of i is 65536
A trailing comma avoids the newline after the output:
>>> a, b = 0, 1
>>> while b < 1000:
... print b,
... a, b = b, a+b
...
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
Note that the interpreter inserts a newline before it prints the next prompt if the last line was not completed.
3.2. First Steps Towards Programming 17
18
CHAPTER
FOUR
More Control Flow Tools
Besides the while statement just introduced, Python knows the usual control flow statements known from other
languages, with some twists.
4.1 if Statements
Perhaps the most well-known statement type is the if statement. For example:
>>> x = int(raw_input("Please enter an integer: "))
>>> if x < 0:
... x = 0
... print ’Negative changed to zero’
... elif x == 0:
... print ’Zero’
... elif x == 1:
... print ’Single’
... else:
... print ’More’
...
There can be zero or more elif parts, and the else part is optional. The keyword ‘elif’ is short for ‘else
if’, and is useful to avoid excessive indentation. An if . . . elif . . . elif . . . sequence is a substitute for the
switch or case statements found in other languages.
4.2 for Statements
The for statement in Python differs a bit from what you may be used to in C or Pascal. Rather than always
iterating over an arithmetic progression of numbers (like in Pascal), or giving the user the ability to define both
the iteration step and halting condition (as C), Python’s for statement iterates over the items of any sequence (a
list or a string), in the order that they appear in the sequence. For example (no pun intended):
>>> # Measure some strings:
... a = [’cat’, ’window’, ’defenestrate’]
>>> for x in a:
... print x, len(x)
...
cat 3
window 6
defenestrate 12
It is not safe to modify the sequence being iterated over in the loop (this can only happen for mutable sequence
19
types, such as lists). If you need to modify the list you are iterating over (for example, to duplicate selected items)
you must iterate over a copy. The slice notation makes this particularly convenient:
>>> for x in a[:]: # make a slice copy of the entire list
... if len(x) > 6: a.insert(0, x)
...
>>> a
[’defenestrate’, ’cat’, ’window’, ’defenestrate’]
4.3 The range() Function
If you do need to iterate over a sequence of numbers, the built-in function range() comes in handy. It generates
lists containing arithmetic progressions:
>>> range(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
The given end point is never part of the generated list; range(10) generates a list of 10 values, exactly the legal
indices for items of a sequence of length 10. It is possible to let the range start at another number, or to specify a
different increment (even negative; sometimes this is called the ‘step’):
>>> range(5, 10)
[5, 6, 7, 8, 9]
>>> range(0, 10, 3)
[0, 3, 6, 9]
>>> range(-10, -100, -30)
[-10, -40, -70]
To iterate over the indices of a sequence, combine range() and len() as follows:
>>> a = [’Mary’, ’had’, ’a’, ’little’, ’lamb’]
>>> for i in range(len(a)):
... print i, a[i]
...
0 Mary
2 a
3 little
4 lamb
4.4 break and continue Statements, and else Clauses on Loops
The break statement, like in C, breaks out of the smallest enclosing for or while loop.
The continue statement, also borrowed from C, continues with the next iteration of the loop.
Loop statements may have an else clause; it is executed when the loop terminates through exhaustion of the list
(with for) or when the condition becomes false (with while), but not when the loop is terminated by a break
statement. This is exemplified by the following loop, which searches for prime numbers:
20 Chapter 4. More Control Flow Tools
>>> for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print n, ’equals’, x, ’*’, n/x
... break
... else:
... # loop fell through without finding a factor
... print n, ’is a prime number’
...
2 is a prime number
3 is a prime number
4 equals 2 * 2
5 is a prime number
6 equals 2 * 3
7 is a prime number
8 equals 2 * 4
9 equals 3 * 3
4.5 pass Statements
The pass statement does nothing. It can be used when a statement is required syntactically but the program
requires no action. For example:
>>> while True:
... pass # Busy-wait for keyboard interrupt
...
4.6 Defining Functions
We can create a function that writes the Fibonacci series to an arbitrary boundary:
>>> def fib(n): # write Fibonacci series up to n
... """Print a Fibonacci series up to n."""
... a, b = 0, 1
... while b < n:
... print b,
... a, b = b, a+b
...
>>> # Now call the function we just defined:
... fib(2000)
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597
The keyword def introduces a function definition. It must be followed by the function name and the parenthesized
list of formal parameters. The statements that form the body of the function start at the next line, and must be
indented. The first statement of the function body can optionally be a string literal; this string literal is the
function’s documentation string, or docstring.
There are tools which use docstrings to automatically produce online or printed documentation, or to let the user
interactively browse through code; it’s good practice to include docstrings in code that you write, so try to make a
habit of it.
The execution of a function introduces a new symbol table used for the local variables of the function. More pre-
cisely, all variable assignments in a function store the value in the local symbol table; whereas variable references
4.5. pass Statements 21
first look in the local symbol table, then in the global symbol table, and then in the table of built-in names. Thus,
global variables cannot be directly assigned a value within a function (unless named in a global statement),
although they may be referenced.
The actual parameters (arguments) to a function call are introduced in the local symbol table of the called function
when it is called; thus, arguments are passed using call by value (where the value is always an object reference,
not the value of the object).1 When a function calls another function, a new local symbol table is created for that
call.
A function definition introduces the function name in the current symbol table. The value of the function name
has a type that is recognized by the interpreter as a user-defined function. This value can be assigned to another
name which can then also be used as a function. This serves as a general renaming mechanism:
>>> fib
<function object at 10042ed0>
>>> f = fib
>>> f(100)
1 1 2 3 5 8 13 21 34 55 89
You might object that fib is not a function but a procedure. In Python, like in C, procedures are just functions
that don’t return a value. In fact, technically speaking, procedures do return a value, albeit a rather boring one.
This value is called None (it’s a built-in name). Writing the value None is normally suppressed by the interpreter
if it would be the only value written. You can see it if you really want to:
>>> print fib(0)
None
It is simple to write a function that returns a list of the numbers of the Fibonacci series, instead of printing it:
>>> def fib2(n): # return Fibonacci series up to n
... """Return a list containing the Fibonacci series up to n."""
... result = []
... a, b = 0, 1
... while b < n:
... result.append(b) # see below
... a, b = b, a+b
... return result
...
>>> f100 = fib2(100) # call it
>>> f100 # write the result
[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
This example, as usual, demonstrates some new Python features:
• The return statement returns with a value from a function. return without an expression argument
returns None. Falling off the end of a procedure also returns None.
• The statement result.append(b) calls a method of the list object result. A method is a function
that ‘belongs’ to an object and is named obj.methodname, where obj is some object (this may be an
expression), and methodname is the name of a method that is defined by the object’s type. Different types
define different methods. Methods of different types may have the same name without causing ambiguity.
(It is possible to define your own object types and methods, using classes, as discussed later in this tutorial.)
The method append() shown in the example, is defined for list objects; it adds a new element at the end
of the list. In this example it is equivalent to ‘result = result + [b]’, but more efficient.
1 Actually, call by object reference would be a better description, since if a mutable object is passed, the caller will see any changes the
callee makes to it (items inserted into a list).
22 Chapter 4. More Control Flow Tools
4.7 More on Defining Functions
It is also possible to define functions with a variable number of arguments. There are three forms, which can be
combined.
4.7.1 Default Argument Values
The most useful form is to specify a default value for one or more arguments. This creates a function that can be
called with fewer arguments than it is defined
while True:
ok = raw_input(prompt)
if ok in (’y’, ’ye’, ’yes’): return True
if ok in (’n’, ’no’, ’nop’, ’nope’): return False
retries = retries - 1
if retries < 0: raise IOError, ’refusenik user’
print complaint
This function can be called either like this: ask_ok(’Do you really want to quit?’) or like this:
ask_ok(’OK to overwrite the file?’, 2).
The default values are evaluated at the point of function definition in the defining scope, so that
i = 5
def f(arg=i):
print arg
i = 6
f()
will print 5.
Important warning: The default value is evaluated only once. This makes a difference when the default is
a mutable object such as a list, dictionary, or instances of most classes. For example, the following function
accumulates the arguments passed to it on subsequent calls:
def f(a, L=[]):
L.append(a)
return L
print f(1)
print f(2)
print f(3)
This will print
[1]
[1, 2]
[1, 2, 3]
If you don’t want the default to be shared between subsequent calls, you can write the function like this instead:
4.7. More on Defining Functions 23
def f(a, L=None):
if L is None:
L = []
L.append(a)
return L
4.7.2 Keyword Arguments
Functions can also be called using keyword arguments of the form ‘keyword = value’. For instance, the following
function:
def parrot(voltage, state=’a stiff’, action=’voom’, type=’Norwegian Blue’):
print "-- This parrot wouldn’t", action,
print "if you put", voltage, "Volts through it."
print "-- Lovely plumage, the", type
print "-- It’s", state, "!"
could be called in any of the following ways:
parrot(1000)
parrot(action = ’VOOOOOM’, voltage = 1000000)
parrot(’a thousand’, state = ’pushing up the daisies’)
parrot(’a million’, ’bereft of life’, ’jump’)
but the following calls would all be invalid:
parrot() # required argument missing
parrot(voltage=5.0, ’dead’) # non-keyword argument following keyword
parrot(110, voltage=220) # duplicate value for argument
parrot(actor=’John Cleese’) # unknown keyword
In general, an argument list must have any positional arguments followed by any keyword arguments, where the
keywords must be chosen from the formal parameter names. It’s not important whether a formal parameter has a
default value or not. No argument may receive a value more than once — formal parameter names corresponding
to positional arguments cannot be used as keywords in the same calls. Here’s an example that fails due to this
restriction:
>>> def function(a):
... pass
...
>>> function(0, a=0)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: function() got multiple values for keyword argument ’a’
When a final formal parameter of the form **name is present, it receives a dictionary containing all keyword argu-
ments whose keyword doesn’t correspond to a formal parameter. This may be combined with a formal parameter
of the form *name (described in the next subsection) which receives a tuple containing the positional arguments
beyond the formal parameter list. (*name must occur before **name.) For example, if we define a function like
this:
24 Chapter 4. More Control Flow Tools
def cheeseshop(kind, *arguments, **keywords):
print "-- Do you have any", kind, ’?’
print "-- I’m sorry, we’re all out of", kind
for arg in arguments: print arg
print ’-’*40
keys = keywords.keys()
keys.sort()
for kw in keys: print kw, ’:’, keywords[kw]
It could be called like this:
cheeseshop(’Limburger’, "It’s very runny, sir.",
"It’s really very, VERY runny, sir.",
client=’John Cleese’,
shopkeeper=’Michael Palin’,
sketch=’Cheese Shop Sketch’)
and of course it would print:
-- Do you have any Limburger ?
-- I’m sorry, we’re all out of Limburger
It’s very runny, sir.
It’s really very, VERY runny, sir.
----------------------------------------
client : John Cleese
shopkeeper : Michael Palin
sketch : Cheese Shop Sketch
Note that the sort() method of the list of keyword argument names is called before printing the contents of the
keywords dictionary; if this is not done, the order in which the arguments are printed is undefined.
4.7.3 Arbitrary Argument Lists
Finally, the least frequently used option is to specify that a function can be called with an arbitrary number of
arguments. These arguments will be wrapped up in a tuple. Before the variable number of arguments, zero or
more normal arguments may occur.
def fprintf(file, format, *args):
file.write(format % args)
4.7.4 Unpacking Argument Lists
The reverse situation occurs when the arguments are already in a list or tuple but need to be unpacked for a function
call requiring separate positional arguments. For instance, the built-in range() function expects separate start
and stop arguments. If they are not available separately, write the function call with the *-operator to unpack the
arguments out of a list or tuple:
>>> range(3, 6) # normal call with separate arguments
[3, 4, 5]
>>> args = [3, 6]
>>> range(*args) # call with arguments unpacked from a list
[3, 4, 5]
4.7. More on Defining Functions 25
4.7.5 Lambda Forms
By popular demand, a few features commonly found in functional programming languages and Lisp have been
added to Python. With the lambda keyword, small anonymous functions can be created. Here’s a function that
returns the sum of its two arguments: ‘lambda a, b: a+b’. Lambda forms can be used wherever function
objects are required. They are syntactically restricted to a single expression. Semantically, they are just syntactic
sugar for a normal function definition. Like nested function definitions, lambda forms can reference variables
from the containing scope:
>>> def make_incrementor(n):
... return lambda x: x + n
...
>>> f = make_incrementor(42)
>>> f(0)
42
>>> f(1)
43
4.7.6 Documentation Strings
There are emerging conventions about the content and formatting of documentation strings.
The first line should always be a short, concise summary of the object’s purpose. For brevity, it should not
explicitly state the object’s name or type, since these are available by other means (except if the name happens to
be a verb describing a function’s operation). This line should begin with a capital letter and end with a period.
If there are more lines in the documentation string, the second line should be blank, visually separating the sum-
mary from the rest of the description. The following lines should be one or more paragraphs describing the object’s
calling conventions, its side effects, etc.
The Python parser does not strip indentation from multi-line string literals in Python, so tools that process docu-
mentation have to strip indentation if desired. This is done using the following convention. The first non-blank
line after the first line of the string determines the amount of indentation for the entire documentation string. (We
can’t use the first line since it is generally adjacent to the string’s opening quotes so its indentation is not apparent
in the string literal.) Whitespace “equivalent” to this indentation is then stripped from the start of all lines of
the string. Lines that are indented less should not occur, but if they occur all their leading whitespace should be
stripped. Equivalence of whitespace should be tested after expansion of tabs (to 8 spaces, normally).
Here is an example of a multi-line docstring:
>>> def my_function():
... """Do nothing, but document it.
...
... No, really, it doesn’t do anything.
... """
... pass
...
>>> print my_function.__doc__
Do nothing, but document it.
No, really, it doesn’t do anything.
26 Chapter 4. More Control Flow Tools
CHAPTER
FIVE
Data Structures
This chapter describes some things you’ve learned about already in more detail, and adds some new things as well.
5.1 More on Lists
The list data type has some more methods. Here are all of the methods of list objects:
append(x)
Add an item to the end of the list; equivalent to a[len(a):] = [x].
extend(L)
Extend the list by appending all the items in the given list; equivalent to a[len(a):] = L.
insert(i, x)
Insert an item at a given position. The first argument is the index of the element before which to in-
sert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), x) is equivalent to
a.append(x).
remove(x)
Remove the first item from the list whose value is x. It is an error if there is no such item.
pop([i ])
Remove the item at the given position in the list, and return it. If no index is specified, a.pop() returns the
last item in the list. The item is also removed from the list. (The square brackets around the i in the method
signature denote that the parameter is optional, not that you should type square brackets at that position.
You will see this notation frequently in the Python Library Reference.)
index(x)
Return the index in the list of the first item whose value is x. It is an error if there is no such item.
count(x)
Return the number of times x appears in the list.
sort()
Sort the items of the list, in place.
reverse()
Reverse the elements of the list, in place.
An example that uses most of the list methods:
27
>>> a = [66.6, 333, 333, 1, 1234.5]
>>> print a.count(333), a.count(66.6), a.count(’x’)
2 1 0
>>> a.insert(2, -1)
>>> a.append(333)
>>> a
[66.6, 333, -1, 333, 1, 1234.5, 333]
>>> a.index(333)
1
>>> a.remove(333)
>>> a
[66.6, -1, 333, 1, 1234.5, 333]
>>> a.reverse()
>>> a
[333, 1234.5, 1, 333, -1, 66.6]
>>> a.sort()
>>> a
[-1, 1, 66.6, 333, 333, 1234.5]
5.1.1 Using Lists as Stacks
The list methods make it very easy to use a list as a stack, where the last element added is the first element retrieved
(“last-in, first-out”). To add an item to the top of the stack, use append(). To retrieve an item from the top of
the stack, use pop() without an explicit index. For example:
>>> stack = [3, 4, 5]
>>> stack.append(6)
>>> stack.append(7)
>>> stack
[3, 4, 5, 6, 7]
>>> stack.pop()
7
>>> stack
[3, 4, 5, 6]
>>> stack.pop()
6
>>> stack.pop()
5
>>> stack
[3, 4]
5.1.2 Using Lists as Queues
You can also use a list conveniently as a queue, where the first element added is the first element retrieved (“first-
in, first-out”). To add an item to the back of the queue, use append(). To retrieve an item from the front of the
queue, use pop() with 0 as the index. For example:
28 Chapter 5. Data Structures
>>> queue = ["Eric", "John", "Michael"]
>>> queue.append("Terry") # Terry arrives
>>> queue.append("Graham") # Graham arrives
>>> queue.pop(0)
’Eric’
>>> queue.pop(0)
’John’
>>> queue
[’Michael’, ’Terry’, ’Graham’]
5.1.3 Functional Programming Tools
There are three built-in functions that are very useful when used with lists: filter(), map(), and reduce().
‘filter(function, sequence)’ returns a sequence (of the same type, if possible) consisting of those items from
the sequence for which function(item) is true. For example, to compute some primes:
>>> def f(x): return x % 2 != 0 and x % 3 != 0
...
>>> filter(f, range(2, 25))
[5, 7, 11, 13, 17, 19, 23]
‘map(function, sequence)’ calls function(item) for each of the sequence’s items and returns a list of the return
values. For example, to compute some cubes:
>>> def cube(x): return x*x*x
...
>>> map(cube, range(1, 11))
[1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]
More than one sequence may be passed; the function must then have as many arguments as there are sequences
and is called with the corresponding item from each sequence (or None if some sequence is shorter than another).
For example:
>>> seq = range(8)
>>> def add(x, y): return x+y
...
[0, 2, 4, 6, 8, 10, 12, 14]
‘reduce(func, sequence)’ returns a single value constructed by calling the binary function func on the first
two items of the sequence, then on the result and the next item, and so on. For example, to compute the sum of
the numbers 1 through 10:
...
55
If there’s only one item in the sequence, its value is returned; if the sequence is empty, an exception is raised.
A third argument can be passed to indicate the starting value. In this case the starting value is returned for an
empty sequence, and the function is first applied to the starting value and the first sequence item, then to the result
5.1. More on Lists 29
and the next item, and so on. For example,
>>> def sum(seq):
...
>>> sum(range(1, 11))
55
>>> sum([])
0
Don’t use this example’s definition of sum(): since summing numbers is such a common need, a built-in function
sum(sequence) is already provided, and works exactly like this. New in version 2.3.
5.1.4 List Comprehensions
List comprehensions provide a concise way to create lists without resorting to use of map(), filter() and/or
lambda. The resulting list definition tends often to be clearer than lists built using those constructs. Each list
comprehension consists of an expression followed by a for clause, then zero or more for or if clauses. The
result will be a list resulting from evaluating the expression in the context of the for and if clauses which follow
it. If the expression would evaluate to a tuple, it must be parenthesized.
>>> freshfruit = [’ banana’, ’ loganberry ’, ’passion fruit ’]
>>> [weapon.strip() for weapon in freshfruit]
[’banana’, ’loganberry’, ’passion fruit’]
>>> vec = [2, 4, 6]
>>> [3*x for x in vec]
[6, 12, 18]
>>> [3*x for x in vec if x > 3]
[12, 18]
>>> [3*x for x in vec if x < 2]
[]
>>> [[x,x**2] for x in vec]
[[2, 4], [4, 16], [6, 36]]
>>> [x, x**2 for x in vec] # error - parens required for tuples
File "<stdin>", line 1, in ?
[x, x**2 for x in vec]
^
SyntaxError: invalid syntax
>>> [(x, x**2) for x in vec]
[(2, 4), (4, 16), (6, 36)]
>>> vec1 = [2, 4, 6]
>>> vec2 = [4, 3, -9]
>>> [x*y for x in vec1 for y in vec2]
[8, 6, -18, 16, 12, -36, 24, 18, -54]
>>> [x+y for x in vec1 for y in vec2]
[6, 5, -7, 8, 7, -5, 10, 9, -3]
>>> [vec1[i]*vec2[i] for i in range(len(vec1))]
[8, 12, -54]
List comprehensions are much more flexible than map() and can be applied to functions with more than one
argument and to nested functions:
>>> [str(round(355/113.0, i)) for i in range(1,6)]
[’3.1’, ’3.14’, ’3.142’, ’3.1416’, ’3.14159’]
30 Chapter 5. Data Structures
5.2 The del statement
There is a way to remove an item from a list given its index instead of its value: the del statement. This can
also be used to remove slices from a list (which we did earlier by assignment of an empty list to the slice). For
example:
>>> a = [-1, 1, 66.6, 333, 333, 1234.5]
>>> del a[0]
>>> a
[1, 66.6, 333, 333, 1234.5]
>>> del a[2:4]
>>> a
[1, 66.6, 1234.5]
del can also be used to delete entire variables:
>>> del a
Referencing the name a hereafter is an error (at least until another value is assigned to it). We’ll find other uses
for del later.
5.3 Tuples and Sequences
We saw that lists and strings have many common properties, such as indexing and slicing operations. They are
two examples of sequence data types. Since Python is an evolving language, other sequence data types may be
added. There is also another standard sequence data type: the tuple.
A tuple consists of a number of values separated by commas, for instance:
>>> t = 12345, 54321, ’hello!’
>>> t[0]
12345
>>> t
(12345, 54321, ’hello!’)
>>> # Tuples may be nested:
... u = t, (1, 2, 3, 4, 5)
>>> u
((12345, 54321, ’hello!’), (1, 2, 3, 4, 5))
As you see, on output tuples are alway enclosed in parentheses, so that nested tuples are interpreted correctly; they
may be input with or without surrounding parentheses, although often parentheses are necessary anyway (if the
tuple is part of a larger expression).
Tuples have many uses. For example: (x, y) coordinate pairs, employee records from a database, etc. Tuples, like
strings, are immutable: it is not possible to assign to the individual items of a tuple (you can simulate much of
the same effect with slicing and concatenation, though). It is also possible to create tuples which contain mutable
objects, such as lists.
A special problem is the construction of tuples containing 0 or 1 items: the syntax has some extra quirks to
accommodate these. Empty tuples are constructed by an empty pair of parentheses; a tuple with one item is
constructed by following a value with a comma (it is not sufficient to enclose a single value in parentheses). Ugly,
but effective. For example:
5.2. The del statement 31
>>> empty = ()
>>> singleton = ’hello’, # <-- note trailing comma
>>> len(empty)
0
>>> len(singleton)
1
>>> singleton
(’hello’,)
The statement t = 12345, 54321, ’hello!’ is an example of tuple packing: the values 12345, 54321
and ’hello!’ are packed together in a tuple. The reverse operation is also possible:
>>> x, y, z = t
This is called, appropriately enough, sequence unpacking. Sequence unpacking requires that the list of variables
on the left have the same number of elements as the length of the sequence. Note that multiple assignment is really
just a combination of tuple packing and sequence unpacking!
There is a small bit of asymmetry here: packing multiple values always creates a tuple, and unpacking works for
any sequence.
5.4 Dictionaries
Another useful data type built into Python is the dictionary. Dictionaries are sometimes found in other languages
as “associative memories” or “associative arrays”. Unlike sequences, which are indexed by a range of numbers,
dictionaries are indexed by keys, which can be any immutable type; strings and numbers can always be keys.
Tuples can be used as keys if they contain only strings, numbers, or tuples; if a tuple contains any mutable object
either directly or indirectly, it cannot be used as a key. You can’t use lists as keys, since lists can be modified in
place using their append() and extend() methods, as well as slice and indexed assignments.
It is best to think of a dictionary as an unordered set of key: value pairs, with the requirement that the keys are
unique (within one dictionary). A pair of braces creates an empty dictionary: {}. Placing a comma-separated list
of key:value pairs within the braces adds initial key:value pairs to the dictionary; this is also the way dictionaries
are written on output.
The main operations on a dictionary are storing a value with some key and extracting the value given the key. It
is also possible to delete a key:value pair with del. If you store using a key that is already in use, the old value
associated with that key is forgotten. It is an error to extract a value using a non-existent key.
The keys() method of a dictionary object returns a list of all the keys used in the dictionary, in random order
(if you want it sorted, just apply the sort() method to the list of keys). To check whether a single key is in the
dictionary, use the has_key() method of the dictionary.
Here is a small example using a dictionary:
32 Chapter 5. Data Structures
>>> tel = {’jack’: 4098, ’sape’: 4139}
>>> tel[’guido’] = 4127
>>> tel
{’sape’: 4139, ’guido’: 4127, ’jack’: 4098}
>>> tel[’jack’]
4098
>>> del tel[’sape’]
>>> tel[’irv’] = 4127
>>> tel
{’guido’: 4127, ’irv’: 4127, ’jack’: 4098}
>>> tel.keys()
[’guido’, ’irv’, ’jack’]
>>> tel.has_key(’guido’)
True
The dict() constructor builds dictionaries directly from lists of key-value pairs stored as tuples. When the pairs
form a pattern, list comprehensions can compactly specify the key-value list.
>>> dict([(’sape’, 4139), (’guido’, 4127), (’jack’, 4098)])
{’sape’: 4139, ’jack’: 4098, ’guido’: 4127}
>>> dict([(x, x**2) for x in vec]) # use a list comprehension
{2: 4, 4: 16, 6: 36}
5.5 Looping Techniques
When looping through dictionaries, the key and corresponding value can be retrieved at the same time using the
iteritems() method.
>>> knights = {’gallahad’: ’the pure’, ’robin’: ’the brave’}
>>> for k, v in knights.iteritems():
... print k, v
...
robin the brave
When looping through a sequence, the position index and corresponding value can be retrieved at the same time
using the enumerate() function.
>>> for i, v in enumerate([’tic’, ’tac’, ’toe’]):
... print i, v
...
0 tic
1 tac
2 toe
To loop over two or more sequences at the same time, the entries can be paired with the zip() function.
5.5. Looping Techniques 33
>>> questions = [’name’, ’quest’, ’favorite color’]
>>> answers = [’lancelot’, ’the holy grail’, ’blue’]
>>> for q, a in zip(questions, answers):
... print ’What is your %s? It is %s.’ % (q, a)
...
What is your name? It is lancelot.
What is your quest? It is the holy grail.
What is your favorite color? It is blue.
To loop over a sequence in reverse, first specify the sequence in a forward direction and then call the reversed()
function.
>>> for i in reversed(xrange(1,10,2)):
... print i
...
9
7
5
3
1
5.6 More on Conditions
The conditions used in while and if statements above can contain other operators besides comparisons.
The comparison operators in and not in check whether a value occurs (does not occur) in a sequence. The
operators is and is not compare whether two objects are really the same object; this only matters for mutable
objects like lists. All comparison operators have the same priority, which is lower than that of all numerical
operators.
Comparisons can be chained. For example, a < b == c tests whether a is less than b and moreover b equals
c.
Comparisons may be combined by the Boolean operators and and or, and the outcome of a comparison (or of any
other Boolean expression) may be negated with not. These all have lower priorities than comparison operators
again; between them, not has the highest priority, and or the lowest, so that A and not B or C is equivalent
to (A and (not B)) or C. Of course, parentheses can be used to express the desired composition.
The Boolean operators and and or are so-called short-circuit operators: their arguments are evaluated from left
to right, and evaluation stops as soon as the outcome is determined. For example, if A and C are true but B is false,
A and B and C does not evaluate the expression C. In general, the return value of a short-circuit operator,
when used as a general value and not as a Boolean, is the last evaluated argument.
It is possible to assign the result of a comparison or other Boolean expression to a variable. For example,
>>> string1, string2, string3 = ’’, ’Trondheim’, ’Hammer Dance’
>>> non_null = string1 or string2 or string3
>>> non_null
’Trondheim’
Note that in Python, unlike C, assignment cannot occur inside expressions. C programmers may grumble about
this, but it avoids a common class of problems encountered in C programs: typing = in an expression when ==
was intended.
34 Chapter 5. Data Structures
5.7 Comparing Sequences and Other Types
Sequence objects may be compared to other objects with the same sequence type. The comparison uses lexico-
graphical ordering: first the first two items are compared, and if they differ this determines the outcome of the
comparison; if they are equal, the next two items are compared, and so on, until either sequence is exhausted. If
two items to be compared are themselves sequences of the same type, the lexicographical comparison is carried
out recursively. If all items of two sequences compare equal, the sequences are considered equal. If one sequence
is an initial sub-sequence of the other, the shorter sequence is the smaller (lesser) one. Lexicographical ordering
for strings uses the ASCII ordering for individual characters. Some examples of comparisons between sequences
with the same types:
(1, 2, 3) < (1, 2, 4)
[1, 2, 3] < [1, 2, 4]
’ABC’ < ’C’ < ’Pascal’ < ’Python’
(1, 2, 3, 4) < (1, 2, 4)
(1, 2) < (1, 2, -1)
(1, 2, 3) == (1.0, 2.0, 3.0)
(1, 2, (’aa’, ’ab’)) < (1, 2, (’abc’, ’a’), 4)
Note that comparing objects of different types is legal. The outcome is deterministic but arbitrary: the types are
ordered by their name. Thus, a list is always smaller than a string, a string is always smaller than a tuple, etc.
Mixed numeric types are compared according to their numeric value, so 0 equals 0.0, etc.1
1 The rules for comparing objects of different types should not be relied upon; they may change in a future version of the language.
5.7. Comparing Sequences and Other Types 35
36
CHAPTER
SIX
Modules
If you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables)
are lost. Therefore, if you want to write a somewhat longer program, you are better off using a text editor to
prepare the input for the interpreter and running it with that file as input instead. This is known as creating a
script. As your program gets longer, you may want to split it into several files for easier maintenance. You may
also want to use a handy function that you’ve written in several programs without copying its definition into each
program.
To support this, Python has a way to put definitions in a file and use them in a script or in an interactive instance
of the interpreter. Such a file is called a module; definitions from a module can be imported into other modules or
into the main module (the collection of variables that you have access to in a script executed at the top level and
in calculator mode).
A module is a file containing Python definitions and statements. The file name is the module name with the suffix
‘.py’ appended. Within a module, the module’s name (as a string) is available as the value of the global variable
__name__. For instance, use your favorite text editor to create a file called ‘fibo.py’ in the current directory with
the following contents:
# Fibonacci numbers module
def fib(n): # write Fibonacci series up to n
a, b = 0, 1
while b < n:
print b,
a, b = b, a+b
def fib2(n): # return Fibonacci series up to n
result = []
a, b = 0, 1
while b < n:
result.append(b)
a, b = b, a+b
return result
Now enter the Python interpreter and import this module with the following command:
>>> import fibo
This does not enter the names of the functions defined in fibo directly in the current symbol table; it only enters
the module name fibo there. Using the module name you can access the functions:
37
>>> fibo.fib(1000)
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
>>> fibo.fib2(100)
[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
>>> fibo.__name__
’fibo’
If you intend to use a function often you can assign it to a local name:
>>> fib = fibo.fib
>>> fib(500)
1 1 2 3 5 8 13 21 34 55 89 144 233 377
6.1 More on Modules
A module can contain executable statements as well as function definitions. These statements are intended to
initialize the module. They are executed only the first time the module is imported somewhere.1
Each module has its own private symbol table, which is used as the global symbol table by all functions defined
in the module. Thus, the author of a module can use global variables in the module without worrying about
accidental clashes with a user’s global variables. On the other hand, if you know what you are doing you can
touch a module’s global variables with the same notation used to refer to its functions, modname.itemname.
Modules can import other modules. It is customary but not required to place all import statements at the
beginning of a module (or script, for that matter). The imported module names are placed in the importing
module’s global symbol table.
There is a variant of the import statement that imports names from a module directly into the importing module’s
symbol table. For example:
>>> from fibo import fib, fib2
>>> fib(500)
1 1 2 3 5 8 13 21 34 55 89 144 233 377
This does not introduce the module name from which the imports are taken in the local symbol table (so in the
example, fibo is not defined).
There is even a variant to import all names that a module defines:
>>> from fibo import *
>>> fib(500)
1 1 2 3 5 8 13 21 34 55 89 144 233 377
This imports all names except those beginning with an underscore (_).
6.1.1 The Module Search Path
When a module named spam is imported, the interpreter searches for a file named ‘spam.py’ in the current
directory, and then in the list of directories specified by the environment variable PYTHONPATH. This has the
same syntax as the shell variable PATH, that is, a list of directory names. When PYTHONPATH is not set, or
1 In fact function definitions are also ‘statements’ that are ‘executed’; the execution enters the function name in the module’s global symbol
table.
38 Chapter 6. Modules
when the file is not found there, the search continues in an installation-dependent default path; on U NIX, this is
usually ‘.:/usr/local/lib/python’.
Actually, modules are searched in the list of directories given by the variable sys.path which is initialized from
the directory containing the input script (or the current directory), PYTHONPATH and the installation-dependent
default. This allows Python programs that know what they’re doing to modify or replace the module search path.
Note that because the directory containing the script being run is on the search path, it is important that the script
not have the same name as a standard module, or Python will attempt to load the script as a module when that
module is imported. This will generally be an error. See section 6.2, “Standard Modules,” for more information.
6.1.2 “Compiled” Python files
As an important speed-up of the start-up time for short programs that use a lot of standard modules, if a file called
‘spam.pyc’ exists in the directory where ‘spam.py’ is found, this is assumed to contain an already-“byte-compiled”
version of the module spam. The modification time of the version of ‘spam.py’ used to create ‘spam.pyc’ is
recorded in ‘spam.pyc’, and the ‘.pyc’ file is ignored if these don’t match.
Normally, you don’t need to do anything to create the ‘spam.pyc’ file. Whenever ‘spam.py’ is successfully com-
piled, an attempt is made to write the compiled version to ‘spam.pyc’. It is not an error if this attempt fails; if for
any reason the file is not written completely, the resulting ‘spam.pyc’ file will be recognized as invalid and thus
ignored later. The contents of the ‘spam.pyc’ file are platform independent, so a Python module directory can be
shared by machines of different architectures.
Some tips for experts:
• When the Python interpreter is invoked with the -O flag, optimized code is generated and stored in ‘.pyo’
files. The optimizer currently doesn’t help much; it only removes assert statements. When -O is used,
all bytecode is optimized; .pyc files are ignored and .py files are compiled to optimized bytecode.
• Passing two -O flags to the Python interpreter (-OO) will cause the bytecode compiler to perform optimiza-
tions that could in some rare cases result in malfunctioning programs. Currently only __doc__ strings
are removed from the bytecode, resulting in more compact ‘.pyo’ files. Since some programs may rely on
having these available, you should only use this option if you know what you’re doing.
• A program doesn’t run any faster when it is read from a ‘.pyc’ or ‘.pyo’ file than when it is read from a ‘.py’
file; the only thing that’s faster about ‘.pyc’ or ‘.pyo’ files is the speed with which they are loaded.
• When a script is run by giving its name on the command line, the bytecode for the script is never written
to a ‘.pyc’ or ‘.pyo’ file. Thus, the startup time of a script may be reduced by moving most of its code to a
module and having a small bootstrap script that imports that module. It is also possible to name a ‘.pyc’ or
‘.pyo’ file directly on the command line.
• It is possible to have a file called ‘spam.pyc’ (or ‘spam.pyo’ when -O is used) without a file ‘spam.py’ for
the same module. This can be used to distribute a library of Python code in a form that is moderately hard
to reverse engineer.
• The module compileall can create ‘.pyc’ files (or ‘.pyo’ files when -O is used) for all modules in a
directory.
6.2 Standard Modules
Python comes with a library of standard modules, described in a separate document, the Python Library Reference
(“Library Reference” hereafter). Some modules are built into the interpreter; these provide access to operations
that are not part of the core of the language but are nevertheless built in, either for efficiency or to provide access
to operating system primitives such as system calls. The set of such modules is a configuration option which also
depends on the underlying platform For example, the amoeba module is only provided on systems that somehow
support Amoeba primitives. One particular module deserves some attention: sys, which is built into every Python
interpreter. The variables sys.ps1 and sys.ps2 define the strings used as primary and secondary prompts:
6.2. Standard Modules 39
>>> import sys
>>> sys.ps1
’>>> ’
>>> sys.ps2
’... ’
>>> sys.ps1 = ’C> ’
C> print ’Yuck!’
Yuck!
C>
These two variables are only defined if the interpreter is in interactive mode.
The variable sys.path is a list of strings that determine the interpreter’s search path for modules. It is initialized
to a default path taken from the environment variable PYTHONPATH, or from a built-in default if PYTHONPATH
is not set. You can modify it using standard list operations:
>>> import sys
>>> sys.path.append(’/ufs/guido/lib/python’)
6.3 The dir() Function
The built-in function dir() is used to find out which names a module defines. It returns a sorted list of strings:
>>> import fibo, sys
>>> dir(fibo)
[’__name__’, ’fib’, ’fib2’]
>>> dir(sys)
[’__displayhook__’, ’__doc__’, ’__excepthook__’, ’__name__’, ’__stderr__’,
’__stdin__’, ’__stdout__’, ’_getframe’, ’api_version’, ’argv’,
’displayhook’, ’exc_clear’, ’exc_info’, ’exc_type’, ’excepthook’,
’exec_prefix’, ’executable’, ’exit’, ’getdefaultencoding’, ’getdlopenflags’,
’getrecursionlimit’, ’getrefcount’, ’hexversion’, ’maxint’, ’maxunicode’,
’meta_path’, ’modules’, ’path’, ’path_hooks’, ’path_importer_cache’,
’platform’, ’prefix’, ’ps1’, ’ps2’, ’setcheckinterval’, ’setdlopenflags’,
’setprofile’, ’setrecursionlimit’, ’settrace’, ’stderr’, ’stdin’, ’stdout’,
’version’, ’version_info’, ’warnoptions’]
Without arguments, dir() lists the names you have defined currently:
>>> a = [1, 2, 3, 4, 5]
>>> import fibo, sys
>>> fib = fibo.fib
>>> dir()
[’__name__’, ’a’, ’fib’, ’fibo’, ’sys’]
Note that it lists all types of names: variables, modules, functions, etc.
dir() does not list the names of built-in functions and variables. If you want a list of those, they are defined in
the standard module __builtin__:
40 Chapter 6. Modules
>>> import __builtin__
>>> dir(__builtin__)
[’ArithmeticError’, ’AssertionError’, ’AttributeError’,
’DeprecationWarning’, ’EOFError’, ’Ellipsis’, ’EnvironmentError’,
’Exception’, ’False’, ’FloatingPointError’, ’IOError’, ’ImportError’,
’IndentationError’, ’IndexError’, ’KeyError’, ’KeyboardInterrupt’,
’LookupError’, ’MemoryError’, ’NameError’, ’None’, ’NotImplemented’,
’NotImplementedError’, ’OSError’, ’OverflowError’, ’OverflowWarning’,
’PendingDeprecationWarning’, ’ReferenceError’,
’RuntimeError’, ’RuntimeWarning’, ’StandardError’, ’StopIteration’,
’SyntaxError’, ’SyntaxWarning’, ’SystemError’, ’SystemExit’, ’TabError’,
’True’, ’TypeError’, ’UnboundLocalError’, ’UnicodeError’, ’UserWarning’,
’ValueError’, ’Warning’, ’ZeroDivisionError’, ’__debug__’, ’__doc__’,
’__import__’, ’__name__’, ’abs’, ’apply’, ’bool’, ’buffer’,
’callable’, ’chr’, ’classmethod’, ’cmp’, ’coerce’, ’compile’, ’complex’,
’copyright’, ’credits’, ’delattr’, ’dict’, ’dir’, ’divmod’,
’enumerate’, ’eval’, ’execfile’, ’exit’, ’file’, ’filter’, ’float’,
’getattr’, ’globals’, ’hasattr’, ’hash’, ’help’, ’hex’, ’id’,
’input’, ’int’, ’intern’, ’isinstance’, ’issubclass’, ’iter’,
’len’, ’license’, ’list’, ’locals’, ’long’, ’map’, ’max’, ’min’,
’object’, ’oct’, ’open’, ’ord’, ’pow’, ’property’, ’quit’,
’range’, ’raw_input’, ’reduce’, ’reload’, ’repr’, ’round’,
’setattr’, ’slice’, ’staticmethod’, ’str’, ’string’, ’sum’, ’super’,
’tuple’, ’type’, ’unichr’, ’unicode’, ’vars’, ’xrange’, ’zip’]
6.4 Packages
Packages are a way of structuring Python’s module namespace by using “dotted module names”. For example,
the module name A.B designates a submodule named ‘B’ in a package named ‘A’. Just like the use of modules
saves the authors of different modules from having to worry about each other’s global variable names, the use
of dotted module names saves the authors of multi-module packages like NumPy or the Python Imaging Library
from having to worry about each other’s module names.
Suppose you want to design a collection of modules (a “package”) for the uniform handling of sound files and
sound data. There are many different sound file formats (usually recognized by their extension, for example:
‘.wav’, ‘.aiff’, ‘.au’), so you may need to create and maintain a growing collection of modules for the conversion
between the various file formats. There are also many different operations you might want to perform on sound
data (such as mixing, adding echo, applying an equalizer function, creating an artificial stereo effect), so in addition
you will be writing a never-ending stream of modules to perform these operations. Here’s a possible structure for
your package (expressed in terms of a hierarchical filesystem):
6.4. Packages 41
Sound/ Top-level package
__init__.py Initialize the sound package
Formats/ Subpackage for file format conversions
__init__.py
wavwrite.py
aiffwrite.py
auwrite.py
...
Effects/ Subpackage for sound effects
__init__.py
echo.py
surround.py
reverse.py
...
Filters/ Subpackage for filters
__init__.py
equalizer.py
vocoder.py
karaoke.py
...
When importing the package, Python searches through the directories on sys.path looking for the package
subdirectory.
The ‘__init__.py’ files are required to make Python treat the directories as containing packages; this is done to
prevent directories with a common name, such as ‘string’, from unintentionally hiding valid modules that
occur later on the module search path. In the simplest case, ‘__init__.py’ can just be an empty file, but it can also
execute initialization code for the package or set the __all__ variable, described later.
Users of the package can import individual modules from the package, for example:
import Sound.Effects.echo
This loads the submodule Sound.Effects.echo. It must be referenced with its full name.
Sound.Effects.echo.echofilter(input, output, delay=0.7, atten=4)
An alternative way of importing the submodule is:
from Sound.Effects import echo
This also loads the submodule echo, and makes it available without its package prefix, so it can be used as
follows:
echo.echofilter(input, output, delay=0.7, atten=4)
Yet another variation is to import the desired function or variable directly:
from Sound.Effects.echo import echofilter
Again, this loads the submodule echo, but this makes its function echofilter() directly available:
42 Chapter 6. Modules
echofilter(input, output, delay=0.7, atten=4)
Note that when using from package import item, the item can be either a submodule (or subpackage) of the
package, or some other name defined in the package, like a function, class or variable. The import statement
first tests whether the item is defined in the package; if not, it assumes it is a module and attempts to load it. If it
fails to find it, an ImportError exception is raised.
Contrarily, when using syntax like import item.subitem.subsubitem, each item except for the last must be a
package; the last item can be a module or a package but can’t be a class or function or variable defined in the
previous item.
6.4.1 Importing * From a Package
Now what happens when the user writes from Sound.Effects import *? Ideally, one would hope that
this somehow goes out to the filesystem, finds which submodules are present in the package, and imports them all.
Unfortunately, this operation does not work very well on Mac and Windows platforms, where the filesystem does
not always have accurate information about the case of a filename! On these platforms, there is no guaranteed
way to know whether a file ‘ECHO.PY’ should be imported as a module echo, Echo or ECHO. (For example,
Windows 95 has the annoying practice of showing all file names with a capitalized first letter.) The DOS 8+3
filename restriction adds another interesting problem for long module names.
The only solution is for the package author to provide an explicit index of the package. The import statement
uses the following convention: if a package’s ‘__init__.py’ code defines a list named __all__, it is taken to be
the list of module names that should be imported when from package import * is encountered. It is up to
the package author to keep this list up-to-date when a new version of the package is released. Package authors
may also decide not to support it, if they don’t see a use for importing * from their package. For example, the file
‘Sounds/Effects/__init__.py’ could contain the following code:
__all__ = ["echo", "surround", "reverse"]
This would mean that from Sound.Effects import * would import the three named submodules of the
Sound package.
If __all__ is not defined, the statement from Sound.Effects import * does not import all sub-
modules from the package Sound.Effects into the current namespace; it only ensures that the package
Sound.Effects has been imported (possibly running its initialization code, ‘__init__.py’) and then imports
whatever names are defined in the package. This includes any names defined (and submodules explicitly loaded)
by ‘__init__.py’. It also includes any submodules of the package that were explicitly loaded by previous import
statements. Consider this code:
import Sound.Effects.echo
import Sound.Effects.surround
from Sound.Effects import *
In this example, the echo and surround modules are imported in the current namespace because they are defined
in the Sound.Effects package when the from...import statement is executed. (This also works when
__all__ is defined.)
Note that in general the practice of importing * from a module or package is frowned upon, since it often causes
poorly readable code. However, it is okay to use it to save typing in interactive sessions, and certain modules are
designed to export only names that follow certain patterns.
Remember, there is nothing wrong with using from Package import specific_submodule! In fact,
this is the recommended notation unless the importing module needs to use submodules with the same name from
different packages.
6.4. Packages 43
6.4.2 Intra-package References
The submodules often need to refer to each other. For example, the surround module might use the echo
module. In fact, such references are so common that the import statement first looks in the containing package
before looking in the standard module search path. Thus, the surround module can simply use import echo or
from echo import echofilter. If the imported module is not found in the current package (the package
of which the current module is a submodule), the import statement looks for a top-level module with the given
name.
When packages are structured into subpackages (as with the Sound package in the example), there’s no shortcut
to refer to submodules of sibling packages - the full name of the subpackage must be used. For example, if the
module Sound.Filters.vocoder needs to use the echo module in the Sound.Effects package, it can
use from Sound.Effects import echo.
6.4.3 Packages in Multiple Directories
Packages support one more special attribute, __path__. This is initialized to be a list containing the name of the
directory holding the package’s ‘__init__.py’ before the code in that file is executed. This variable can be modified;
doing so affects future searches for modules and subpackages contained in the package.
While this feature is not often needed, it can be used to extend the set of modules found in a package.
44 Chapter 6. Modules
CHAPTER
SEVEN
Input and Output
There are several ways to present the output of a program; data can be printed in a human-readable form, or written
to a file for future use. This chapter will discuss some of the possibilities.
7.1 Fancier Output Formatting
So far we’ve encountered two ways of writing values: expression statements and the print statement. (A third
way is using the write() method of file objects; the standard output file can be referenced as sys.stdout.
Often you’ll want more control over the formatting of your output than simply printing space-separated values.
There are two ways to format your output; the first way is to do all the string handling yourself; using string slicing
and concatenation operations you can create any lay-out you can imagine. The standard module string contains
some useful operations for padding strings to a given column width; these will be discussed shortly. The second
way is to use the % operator with a string as the left argument. The % operator interprets the left argument much
like a sprintf()-style format string to be applied to the right argument, and returns the string resulting from
this formatting operation.
One question remains, of course: how do you convert values to strings? Luckily, Python has ways to convert any
value to a string: pass it to the repr() or str() functions. Reverse quotes (“) are equivalent to repr(), but
their use is discouraged.
The str() function is meant to return representations of values which are fairly human-readable, while repr()
is meant to generate representations which can be read by the interpreter (or will force a SyntaxError if there is
not equivalent syntax). For objects which don’t have a particular representation for human consumption, str()
will return the same value as repr(). Many values, such as numbers or structures like lists and dictionaries, have
the same representation using either function. Strings and floating point numbers, in particular, have two distinct
representations.
Some examples:
45
>>> s = ’Hello, world.’
>>> str(s)
’Hello, world.’
>>> repr(s)
"’Hello, world.’"
>>> str(0.1)
’0.1’
>>> repr(0.1)
’0.10000000000000001’
>>> x = 10 * 3.25
>>> y = 200 * 200
>>> s = ’The value of x is ’ + repr(x) + ’, and y is ’ + repr(y) + ’...’
>>> print s
The value of x is 32.5, and y is 40000...
>>> # The repr() of a string adds string quotes and backslashes:
... hello = ’hello, world\n’
>>> hellos = repr(hello)
>>> print hellos
’hello, world\n’
>>> # The argument to repr() may be any Python object:
... repr((x, y, (’spam’, ’eggs’)))
"(32.5, 40000, (’spam’, ’eggs’))"
>>> # reverse quotes are convenient in interactive sessions:
... ‘x, y, (’spam’, ’eggs’)‘
"(32.5, 40000, (’spam’, ’eggs’))"
Here are two ways to write a table of squares and cubes:
>>> for x in range(1, 11):
... print repr(x).rjust(2), repr(x*x).rjust(3),
... # Note trailing comma on previous line
... print repr(x*x*x).rjust(4)
...
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
6 36 216
7 49 343
8 64 512
9 81 729
10 100 1000
>>> for x in range(1,11):
... print ’%2d %3d %4d’ % (x, x*x, x*x*x)
...
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
6 36 216
7 49 343
8 64 512
9 81 729
10 100 1000
(Note that one space between each column was added by the way print works: it always adds spaces between
its arguments.)
This example demonstrates the rjust() method of string objects, which right-justifies a string in a field of a
given width by padding it with spaces on the left. There are similar methods ljust() and center(). These
46 Chapter 7. Input and Output
methods do not write anything, they just return a new string. If the input string is too long, they don’t truncate
it, but return it unchanged; this will mess up your column lay-out but that’s usually better than the alternative,
which would be lying about a value. (If you really want truncation you can always add a slice operation, as in
‘x.ljust( n)[:n]’.)
There is another method, zfill(), which pads a numeric string on the left with zeros. It understands about plus
and minus signs:
>>> ’12’.zfill(5)
’00012’
>>> ’-3.14’.zfill(7)
’-003.14’
>>> ’3.14159265359’.zfill(5)
’3.14159265359’
Using the % operator looks like this:
>>> import math
>>> print ’The value of PI is approximately %5.3f.’ % math.pi
The value of PI is approximately 3.142.
If there is more than one format in the string, you need to pass a tuple as right operand, as in this example:
>>> table = {’Sjoerd’: 4127, ’Jack’: 4098, ’Dcab’: 7678}
>>> for name, phone in table.items():
... print ’%-10s ==> %10d’ % (name, phone)
...
Jack ==> 4098
Dcab ==> 7678
Sjoerd ==> 4127
Most formats work exactly as in C and require that you pass the proper type; however, if you don’t you get an
exception, not a core dump. The %s format is more relaxed: if the corresponding argument is not a string object,
it is converted to string using the str() built-in function. Using * to pass the width or precision in as a separate
(integer) argument is supported. The C formats %n and %p are not supported.
If you have a really long format string that you don’t want to split up, it would be nice if you could reference the
variables to be formatted by name instead of by position. This can be done by using form %(name)format, as
shown here:
>>> table = {’Sjoerd’: 4127, ’Jack’: 4098, ’Dcab’: 8637678}
>>> print ’Jack: %(Jack)d; Sjoerd: %(Sjoerd)d; Dcab: %(Dcab)d’ % table
Jack: 4098; Sjoerd: 4127; Dcab: 8637678
This is particularly useful in combination with the new built-in vars() function, which returns a dictionary
containing all local variables.
open() returns a file object, and is most commonly used with two arguments: ‘open(filename, mode)’.
>>> f=open(’/tmp/workfile’, ’w’)
>>> print f
<open file ’/tmp/workfile’, mode ’w’ at 80a0960>
7.2. Reading and Writing Files 47
The first argument is a string containing the filename. The second argument is another string containing a few
characters describing the way in which the file will be used. mode can be ’r’ when the file will only be read,
’w’ for only writing (an existing file with the same name will be erased), and ’a’ opens the file for appending;
any data written to the file is automatically added to the end. ’r+’ opens the file for both reading and writing.
The mode argument is optional; ’r’ will be assumed if it’s omitted.
On Windows and the Macintosh, ’b’ appended to the mode opens the file in binary mode, so there are also
modes like ’rb’, ’wb’, and ’r+b’. Windows makes a distinction between text and binary files; the end-of-
line characters in text files are automatically altered slightly when data is read or written. This behind-the-scenes
modification to file data is fine for ASCII text files, but it’ll corrupt binary data like that in JPEGs or ‘.EXE’ files.
Be very careful to use binary mode when reading and writing such files. (Note that the precise semantics of text
mode on the Macintosh depends on the underlying C library being used.)
7.2.1 Methods of File Objects
The rest of the examples in this section will assume that a file object called f has already been created.
To read a file’s contents, call f.read(size), which reads some quantity of data and returns it as a string. size is
an optional numeric argument. When size is omitted or negative, the entire contents of the file will be read and
returned; it’s your problem if the file is twice as large as your machine’s memory. Otherwise, at most size bytes
are read and returned. If the end of the file has been reached, f.read() will return an empty string ("").
’This is the entire file.\n’
’’
f.readline() reads a single line from the file; a newline character (\n) is left at the end of the string, and
is only omitted on the last line of the file if the file doesn’t end in a newline. This makes the return value unam-
biguous; if f.readline() returns an empty string, the end of the file has been reached, while a blank line is
represented by ’\n’, a string containing only a single newline.
’This is the first line of the file.\n’
’Second line of the file\n’
’’
f.readlines() returns a list containing all the lines of data in the file. If given an optional parameter sizehint,
it reads that many bytes from the file and enough more to complete a line, and returns the lines from that. This is
often used to allow efficient reading of a large file by lines, but without having to load the entire file in memory.
Only complete lines will be returned.
[’This is the first line of the file.\n’, ’Second line of the file\n’]
f.write(string) writes the contents of string to the file, returning None.
>>> f.write(’This is a test\n’)
f.tell() returns an integer giving the file object’s current position in the file, measured in bytes from the
beginning of the file. To change the file object’s position, use ‘f.seek(offset, from_what)’. The position is
computed from adding offset to a reference point; the reference point is selected by the from_what argument. A
from_what value of 0 measures from the beginning of the file, 1 uses the current file position, and 2 uses the end
of the file as the reference point. from_what can be omitted and defaults to 0, using the beginning of the file as the
48 Chapter 7. Input and Output
reference point.
>>> f=open(’/tmp/workfile’, ’r+’)
>>> f.write(’0123456789abcdef’)
>>> f.seek(5) # Go to the 6th byte in the file
’5’
>>> f.seek(-3, 2) # Go to the 3rd byte before the end
’d’
When you’re done with a file, call f.close() to close it and free up any system resources taken up by the open
file. After calling f.close(), attempts to use the file object will automatically fail.
>>> f.close()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: I/O operation on closed file
File objects have some additional methods, such as isatty() and truncate() which are less frequently
used; consult the Library Reference for a complete guide to file objects.
7.2.2 The pickle Module
Strings can easily be written to and read from a file. Numbers take a bit more effort, since the read() method
only returns strings, which will have to be passed to a function like int(), which takes a string like ’123’ and
returns its numeric value 123. However, when you want to save more complex data types like lists, dictionaries,
or class instances, things get a lot more complicated.
Rather than have users be constantly writing and debugging code to save complicated data types, Python provides
a standard module called pickle. This is an amazing module that can take almost any Python object (even some
forms of Python code!), and convert it to a string representation; this process is called pickling. Reconstructing the
object from the string representation is called unpickling. Between pickling and unpickling, the string representing
the object may have been stored in a file or data, or sent over a network connection to some distant machine.
If you have an object x, and a file object f that’s been opened for writing, the simplest way to pickle the object
takes only one line of code:
pickle.dump(x, f)
To unpickle the object again, if f is a file object which has been opened for reading:
(There are other variants of this, used when pickling many objects or when you don’t want to write the pickled
data to a file; consult the complete documentation for pickle in the Python Library Reference.)
pickle is the standard way to make Python objects which can be stored and reused by other programs or by a
future invocation of the same program; the technical term for this is a persistent object. Because pickle is so
widely used, many authors who write Python extensions take care to ensure that new data types such as matrices
can be properly pickled and unpickled.
7.2. Reading and Writing Files 49
50
CHAPTER
EIGHT
Errors and Exceptions
Until now error messages haven’t been more than mentioned, but if you have tried out the examples you have
probably seen some. There are (at least) two distinguishable kinds of errors: syntax errors and exceptions.
8.1 Syntax Errors
Syntax errors, also known as parsing errors, are perhaps the most common kind of complaint you get while you
are still learning Python:
>>> while True print ’Hello world’
File "<stdin>", line 1, in ?
while True print ’Hello world’
^
SyntaxError: invalid syntax
The parser repeats the offending line and displays a little ‘arrow’ pointing at the earliest point in the line where the
error was detected. The error is caused by (or at least detected at) the token preceding the arrow: in the example,
the error is detected at the keyword print, since a colon (‘:’) is missing before it. File name and line number
are printed so you know where to look in case the input came from a script.
8.2 Exceptions
Even if a statement or expression is syntactically correct, it may cause an error when an attempt is made to execute
it. Errors detected during execution are called exceptions and are not unconditionally fatal: you will soon learn
how to handle them in Python programs. Most exceptions are not handled by programs, however, and result in
error messages as shown here:
>>> 10 * (1/0)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero
>>> 4 + spam*3
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name ’spam’ is not defined
>>> ’2’ + 2
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: cannot concatenate ’str’ and ’int’ objects
The last line of the error message indicates what happened. Exceptions come in different types, and the type
51
is printed as part of the message: the types in the example are ZeroDivisionError, NameError and
TypeError. The string printed as the exception type is the name of the built-in name for the exception that
occurred. This is true for all built-in exceptions, but need not be true for user-defined exceptions (although it is a
useful convention). Standard exception names are built-in identifiers (not reserved keywords).
The rest of the line is a detail whose interpretation depends on the exception type; its meaning is dependent on the
exception type.
The preceding part of the error message shows the context where the exception happened, in the form of a stack
backtrace. In general it contains a stack backtrace listing source lines; however, it will not display lines read from
standard input.
The Python Library Reference lists the built-in exceptions and their meanings.
8.3 Handling Exceptions
It is possible to write programs that handle selected exceptions. Look at the following example, which asks the user
for input until a valid integer has been entered, but allows the user to interrupt the program (using Control-C
or whatever the operating system supports); note that a user-generated interruption is signalled by raising the
KeyboardInterrupt exception.
>>> while True:
... try:
... x = int(raw_input("Please enter a number: "))
... break
... except ValueError:
... print "Oops! That was no valid number. Try again..."
...
The try statement works as follows.
• First, the try clause (the statement(s) between the try and except keywords) is executed.
• If no exception occurs, the except clause is skipped and execution of the try statement is finished.
• If an exception occurs during execution of the try clause, the rest of the clause is skipped. Then if its type
matches the exception named after the except keyword, the rest of the try clause is skipped, the except
clause is executed, and then execution continues after the try statement.
• If an exception occurs which does not match the exception named in the except clause, it is passed on
to outer try statements; if no handler is found, it is an unhandled exception and execution stops with a
message as shown above.
A try statement may have more than one except clause, to specify handlers for different exceptions. At most one
handler will be executed. Handlers only handle exceptions that occur in the corresponding try clause, not in other
handlers of the same try statement. An except clause may name multiple exceptions as a parenthesized list, for
example:
... except (RuntimeError, TypeError, NameError):
... pass
The last except clause may omit the exception name(s), to serve as a wildcard. Use this with extreme caution,
since it is easy to mask a real programming error in this way! It can also be used to print an error message and
then re-raise the exception (allowing a caller to handle the exception as well):
52 Chapter 8. Errors and Exceptions
import sys
try:
f = open(’myfile.txt’)
i = int(s.strip())
except IOError, (errno, strerror):
print "I/O error(%s): %s" % (errno, strerror)
except ValueError:
print "Could not convert data to an integer."
except:
print "Unexpected error:", sys.exc_info()[0]
raise
The try . . . except statement has an optional else clause, which, when present, must follow all except clauses.
It is useful for code that must be executed if the try clause does not raise an exception. For example:
for arg in sys.argv[1:]:
try:
f = open(arg, ’r’)
except IOError:
print ’cannot open’, arg
else:
f.close()
The use of the else clause is better than adding additional code to the try clause because it avoids accidentally
catching an exception that wasn’t raised by the code being protected by the try . . . except statement.
When an exception occurs, it may have an associated value, also known as the exception’s argument. The presence
and type of the argument depend on the exception type.
The except clause may specify a variable after the exception name (or list). The variable is bound to an excep-
tion instance with the arguments stored in instance.args. For convenience, the exception instance defines
__getitem__ and __str__ so the arguments can be accessed or printed directly without having to reference
.args.
>>> try:
... raise Exception(’spam’, ’eggs’)
... except Exception, inst:
... print type(inst) # the exception instance
... print inst.args # arguments stored in .args
... print inst # __str__ allows args to printed directly
... x, y = inst # __getitem__ allows args to be unpacked directly
... print ’x =’, x
... print ’y =’, y
...
<type ’instance’>
(’spam’, ’eggs’)
(’spam’, ’eggs’)
x = spam
y = eggs
If an exception has an argument, it is printed as the last part (‘detail’) of the message for unhandled exceptions.
Exception handlers don’t just handle exceptions if they occur immediately in the try clause, but also if they occur
inside functions that are called (even indirectly) in the try clause. For example:
8.3. Handling Exceptions 53
>>> def this_fails():
... x = 1/0
...
>>> try:
... this_fails()
... except ZeroDivisionError, detail:
... print ’Handling run-time error:’, detail
...
Handling run-time error: integer division or modulo
8.4 Raising Exceptions
The raise statement allows the programmer to force a specified exception to occur. For example:
>>> raise NameError, ’HiThere’
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: HiThere
The first argument to raise names the exception to be raised. The optional second argument specifies the
exception’s argument.
If you need to determine whether an exception was raised but don’t intend to handle it, a simpler form of the
raise statement allows you to re-raise the exception:
>>> try:
... raise NameError, ’HiThere’
... except NameError:
... print ’An exception flew by!’
... raise
...
An exception flew by!
Traceback (most recent call last):
File "<stdin>", line 2, in ?
NameError: HiThere
8.5 User-defined Exceptions
Programs may name their own exceptions by creating a new exception class. Exceptions should typically be
derived from the Exception class, either directly or indirectly. For example:
54 Chapter 8. Errors and Exceptions
>>> class MyError(Exception):
... def __init__(self, value):
... self.value = value
... def __str__(self):
... return repr(self.value)
...
>>> try:
... raise MyError(2*2)
... except MyError, e:
... print ’My exception occurred, value:’, e.value
...
My exception occurred, value: 4
>>> raise MyError, ’oops!’
Traceback (most recent call last):
File "<stdin>", line 1, in ?
__main__.MyError: ’oops!’
Exception classes can be defined which do anything any other class can do, but are usually kept simple, often
only offering a number of attributes that allow information about the error to be extracted by handlers for the
exception. When creating a module which can raise several distinct errors, a common practice is to create a base
class for exceptions defined by that module, and subclass that to create specific exception classes for different
error conditions:
class Error(Exception):
"""Base class for exceptions in this module."""
pass
class InputError(Error):
"""Exception raised for errors in the input.
Attributes:
expression -- input expression in which the error occurred
message -- explanation of the error
"""
def __init__(self, expression, message):
self.expression = expression
self.message = message
class TransitionError(Error):
"""Raised when an operation attempts a state transition that’s not
allowed.
Attributes:
previous -- state at beginning of transition
next -- attempted new state
message -- explanation of why the specific transition is not allowed
"""
def __init__(self, previous, next, message):
self.previous = previous
self.next = next
self.message = message
Most exceptions are defined with names that end in “Error,” similar to the naming of the standard exceptions.
Many standard modules define their own exceptions to report errors that may occur in functions they define. More
information on classes is presented in chapter 9, “Classes.”
8.5. User-defined Exceptions 55
8.6 Defining Clean-up Actions
The try statement has another optional clause which is intended to define clean-up actions that must be executed
under all circumstances. For example:
>>> try:
... raise KeyboardInterrupt
... finally:
... print ’Goodbye, world!’
...
Goodbye, world!
Traceback (most recent call last):
File "<stdin>", line 2, in ?
KeyboardInterrupt
A finally clause is executed whether or not an exception has occurred in the try clause. When an exception has
occurred, it is re-raised after the finally clause is executed. The finally clause is also executed “on the way out”
when the try statement is left via a break or return statement.
The code in the finally clause is useful for releasing external resources (such as files or network connections),
regardless of whether or not the use of the resource was successful.
A try statement must either have one or more except clauses or one finally clause, but not both.
56 Chapter 8. Errors and Exceptions
CHAPTER
NINE
Classes
Python’s class mechanism adds classes to the language with a minimum of new syntax and semantics. It is a
mixture of the class mechanisms found in C++ and Modula-3. As is true for modules, classes in Python do not
put an absolute barrier between definition and user, but rather rely on the politeness of the user not to “break into
the definition.” The most important features of classes are retained with full power, however: the class inheritance
mechanism allows multiple base classes, a derived class can override any methods of its base class or classes, a
method can call the method of a base class with the same name. Objects can contain an arbitrary amount of private
data.
In C++ terminology, all class members (including the data members) are public, and all member functions are
virtual. There are no special constructors or destructors. As in Modula-3, there are no shorthands for referencing
the object’s members from its methods: the method function is declared with an explicit first argument representing
the object, which is provided implicitly by the call. As in Smalltalk, classes themselves are objects, albeit in the
wider sense of the word: in Python, all data types are objects. This provides semantics for importing and renaming.
Unlike C++ and Modula-3, built-in types can be used as base classes for extension by the user. Also, like in C++
but unlike in Modula-3, most built-in operators with special syntax (arithmetic operators, subscripting etc.) can
be redefined for class instances.
Lacking universally accepted terminology to talk about classes, I will make occasional use of Smalltalk and C++
terms. (I would use Modula-3 terms, since its object-oriented semantics are closer to those of Python than C++,
but I expect that few readers have heard of it.)
I also have to warn you that there’s a terminological pitfall for object-oriented readers: the word “object” in Python
does not necessarily mean a class instance. Like C++ and Modula-3, and unlike Smalltalk, not all types in Python
are classes: the basic built-in types like integers and lists are not, and even somewhat more exotic types like files
aren’t. However, all Python types share a little bit of common semantics that is best described by using the word
object.
Objects have individuality, and multiple names (in multiple scopes) can be bound to the same object. This is
known as aliasing in other languages. This is usually not appreciated on a first glance at Python, and can be
safely ignored when dealing with immutable basic types (numbers, strings, tuples). However, aliasing has an
(intended!) effect on the semantics of Python code involving mutable objects such as lists, dictionaries, and most
types representing entities outside the program (files, windows, etc.). This is usually used to the benefit of the
program, since aliases behave like pointers in some respects. For example, passing an object is cheap since only
a pointer is passed by the implementation; and if a function modifies an object passed as an argument, the caller
will see the change — this eliminates the need for two different argument passing mechanisms as in Pascal.
9.2 Python Scopes and Name Spaces
Before introducing classes, I first have to tell you something about Python’s scope rules. Class definitions play
some neat tricks with namespaces, and you need to know how scopes and namespaces work to fully understand
57
Let’s begin with some definitions.
A namespace is a mapping from names to objects. Most namespaces are currently implemented as Python dictio-
naries, but that’s normally not noticeable in any way (except for performance), and it may change in the future.
Examples of namespaces are: the set of built-in names (functions such as abs(), and built-in exception names);
the global names in a module; and the local names in a function invocation. In a sense the set of attributes of
an object also form a namespace. The important thing to know about namespaces is that there is absolutely no
relation between names in different namespaces; for instance, two different modules may both define a function
“maximize” without confusion — users of the modules must prefix it with the module name.
By the way, I use the word attribute for any name following a dot — for example, in the expression z.real,
real is an attribute of the object z. Strictly speaking, references to names in modules are attribute references: in
the expression modname.funcname, modname is a module object and funcname is an attribute of it. In this
case there happens to be a straightforward mapping between the module’s attributes and the global names defined
in the module: they share the same namespace! 1
Attributes may be read-only or writable. In the latter case, assignment to attributes is possible. Module attributes
are writable: you can write ‘modname.the_answer = 42’. Writable attributes may also be deleted with the
del statement. For example, ‘del modname.the_answer’ will remove the attribute the_answer from
the object named by modname.
Name spaces are created at different moments and have different lifetimes. The namespace containing the built-in
names is created when the Python interpreter starts up, and is never deleted. The global namespace for a module
is created when the module definition is read in; normally, module namespaces also last until the interpreter quits.
The statements executed by the top-level invocation of the interpreter, either read from a script file or interactively,
are considered part of a module called __main__, so they have their own global namespace. (The built-in names
actually also live in a module; this is called __builtin__.)
The local namespace for a function is created when the function is called, and deleted when the function returns or
raises an exception that is not handled within the function. (Actually, forgetting would be a better way to describe
what actually happens.) Of course, recursive invocations each have their own local namespace.
A scope is a textual region of a Python program where a namespace is directly accessible. “Directly accessible”
here means that an unqualified reference to a name attempts to find the name in the namespace.
Although scopes are determined statically, they are used dynamically. At any time during execution, there are at
least three nested scopes whose namespaces are directly accessible: the innermost scope, which is searched first,
contains the local names; the namespaces of any enclosing functions, which are searched starting with the nearest
enclosing scope; the middle scope, searched next, contains the current module’s global names; and the outermost
scope (searched last) is the namespace containing built-in names.
If a name is declared global, then all references and assignments go directly to the middle scope containing the
module’s global names. Otherwise, all variables found outside of the innermost scope are read-only.
Usually, the local scope references the local names of the (textually) current function. Outside of functions, the
local scope references the same namespace as the global scope: the module’s namespace. Class definitions place
yet another namespace in the local scope.
It is important to realize that scopes are determined textually: the global scope of a function defined in a module
is that module’s namespace, no matter from where or by what alias the function is called. On the other hand, the
actual search for names is done dynamically, at run time — however, the language definition is evolving towards
static name resolution, at “compile” time, so don’t rely on dynamic name resolution! (In fact, local variables are
A special quirk of Python is that assignments always go into the innermost scope. Assignments do not copy data
— they just bind names to objects. The same is true for deletions: the statement ‘del x’ removes the binding
of x from the namespace referenced by the local scope. In fact, all operations that introduce new names use the
local scope: in particular, import statements and function definitions bind the module or function name in the local
scope. (The global statement can be used to indicate that particular variables live in the global scope.)
1 Except for one thing. Module objects have a secret read-only attribute called __dict__ which returns the dictionary used to implement
the module’s namespace; the name __dict__ is an attribute but not a global name. Obviously, using this violates the abstraction of namespace
implementation, and should be restricted to things like post-mortem debuggers.
58 Chapter 9. Classes
9.3 A First Look at Classes
Classes introduce a little bit of new syntax, three new object types, and some new semantics.
9.3.1 Class Definition Syntax
The simplest form of class definition looks like this:
class ClassName:
<statement-1>
.
.
.
<statement-N>
Class definitions, like function definitions (def statements) must be executed before they have any effect. (You
could conceivably place a class definition in a branch of an if statement, or inside a function.)
In practice, the statements inside a class definition will usually be function definitions, but other statements are
allowed, and sometimes useful — we’ll come back to this later. The function definitions inside a class normally
have a peculiar form of argument list, dictated by the calling conventions for methods — again, this is explained
later.
When a class definition is entered, a new namespace is created, and used as the local scope — thus, all assignments
to local variables go into this new namespace. In particular, function definitions bind the name of the new function
here.
When a class definition is left normally (via the end), a class object is created. This is basically a wrapper around
the contents of the namespace created by the class definition; we’ll learn more about class objects in the next
section. The original local scope (the one in effect just before the class definitions was entered) is reinstated, and
the class object is bound here to the class name given in the class definition header (ClassName in the example).
9.3.2 Class Objects
Class objects support two kinds of operations: attribute references and instantiation.
Attribute references use the standard syntax used for all attribute references in Python: obj.name. Valid attribute
names are all the names that were in the class’s namespace when the class object was created. So, if the class
definition looked like this:
class MyClass:
"A simple example class"
i = 12345
def f(self):
return ’hello world’
then MyClass.i and MyClass.f are valid attribute references, returning an integer and a method object,
respectively. Class attributes can also be assigned to, so you can change the value of MyClass.i by assign-
ment. __doc__ is also a valid attribute, returning the docstring belonging to the class: "A simple example
class".
Class instantiation uses function notation. Just pretend that the class object is a parameterless function that returns
a new instance of the class. For example (assuming the above class):
x = MyClass()
creates a new instance of the class and assigns this object to the local variable x.
9.3. A First Look at Classes 59
The instantiation operation (“calling” a class object) creates an empty object. Many classes like to create objects
in a known initial state. Therefore a class may define a special method named __init__(), like this:
def __init__(self):
self.data = []
When a class defines an __init__() method, class instantiation automatically invokes __init__() for the
newly-created class instance. So in this example, a new, initialized instance can be obtained by:
x = MyClass()
Of course, the __init__() method may have arguments for greater flexibility. In that case, arguments given to
the class instantiation operator are passed on to __init__(). For example,
>>> class Complex:
... def __init__(self, realpart, imagpart):
... self.r = realpart
... self.i = imagpart
...
>>> x = Complex(3.0, -4.5)
>>> x.r, x.i
(3.0, -4.5)
9.3.3 Instance Objects
Now what can we do with instance objects? The only operations understood by instance objects are attribute
references. There are two kinds of valid attribute names.
The first I’ll call data attributes. These correspond to “instance variables” in Smalltalk, and to “data members”
in C++. Data attributes need not be declared; like local variables, they spring into existence when they are first
assigned to. For example, if x is the instance of MyClass created above, the following piece of code will print
the value 16, without leaving a trace:
x.counter = 1
while x.counter < 10:
x.counter = x.counter * 2
print x.counter
del x.counter
The second kind of attribute references understood by instance objects are methods. A method is a function that
“belongs to” an object. (In Python, the term method is not unique to class instances: other object types can have
methods as well. For example, list objects have methods called append, insert, remove, sort, and so on. However,
below, we’ll use the term method exclusively to mean methods of class instance objects, unless explicitly stated
otherwise.)
Valid method names of an instance object depend on its class. By definition, all attributes of a class that are
(user-defined) function objects define corresponding methods of its instances. So in our example, x.f is a valid
method reference, since MyClass.f is a function, but x.i is not, since MyClass.i is not. But x.f is not the
same thing as MyClass.f — it is a method object, not a function object.
9.3.4 Method Objects
Usually, a method is called immediately:
60 Chapter 9. Classes
x.f()
In our example, this will return the string ’hello world’. However, it is not necessary to call a method right
away: x.f is a method object, and can be stored away and called at a later time. For example:
xf = x.f
while True:
print xf()
will continue to print ‘hello world’ until the end of time.
What exactly happens when a method is called? You may have noticed that x.f() was called without an argument
above, even though the function definition for f specified an argument. What happened to the argument? Surely
Python raises an exception when a function that requires an argument is called without any — even if the argument
isn’t actually used...
Actually, you may have guessed the answer: the special thing about methods is that the object is passed as the first
argument of the function. In our example, the call x.f() is exactly equivalent to MyClass.f(x). In general,
calling a method with a list of n arguments is equivalent to calling the corresponding function with an argument
list that is created by inserting the method’s object before the first argument.
If you still don’t understand how methods work, a look at the implementation can perhaps clarify matters. When
an instance attribute is referenced that isn’t a data attribute, its class is searched. If the name denotes a valid class
attribute that is a function object, a method object is created by packing (pointers to) the instance object and the
function object just found together in an abstract object: this is the method object. When the method object is
called with an argument list, it is unpacked again, a new argument list is constructed from the instance object and
the original argument list, and the function object is called with this new argument list.
9.4 Random Remarks
Data attributes override method attributes with the same name; to avoid accidental name conflicts, which may
cause hard-to-find bugs in large programs, it is wise to use some kind of convention that minimizes the chance
of conflicts. Possible conventions include capitalizing method names, prefixing data attribute names with a small
unique string (perhaps just an underscore), or using verbs for methods and nouns for data attributes.
Data attributes may be referenced by methods as well as by ordinary users (“clients”) of an object. In other words,
classes are not usable to implement pure abstract data types. In fact, nothing in Python makes it possible to enforce
data hiding — it is all based upon convention. (On the other hand, the Python implementation, written in C, can
completely hide implementation details and control access to an object if necessary; this can be used by extensions
to Python written in C.)
Clients should use data attributes with care — clients may mess up invariants maintained by the methods by
stamping on their data attributes. Note that clients may add data attributes of their own to an instance object
without affecting the validity of the methods, as long as name conflicts are avoided — again, a naming convention
can save a lot of headaches here.
There is no shorthand for referencing data attributes (or other methods!) from within methods. I find that this
actually increases the readability of methods: there is no chance of confusing local variables and instance variables
when glancing through a method.
Conventionally, the first argument of methods is often called self. This is nothing more than a convention: the
name self has absolutely no special meaning to Python. (Note, however, that by not following the convention
your code may be less readable by other Python programmers, and it is also conceivable that a class browser
program be written which relies upon such a convention.)
Any function object that is a class attribute defines a method for instances of that class. It is not necessary that the
function definition is textually enclosed in the class definition: assigning a function object to a local variable in
the class is also ok. For example:
9.4. Random Remarks 61
# Function defined outside the class
def f1(self, x, y):
return min(x, x+y)
class C:
f = f1
def g(self):
return ’hello world’
h = g
Now f, g and h are all attributes of class C that refer to function objects, and consequently they are all methods of
instances of C — h being exactly equivalent to g. Note that this practice usually only serves to confuse the reader
of a program.
Methods may call other methods by using method attributes of the self argument:
class Bag:
def __init__(self):
self.data = []
self.data.append(x)
Methods may reference global names in the same way as ordinary functions. The global scope associated with a
method is the module containing the class definition. (The class itself is never used as a global scope!) While one
rarely encounters a good reason for using global data in a method, there are many legitimate uses of the global
scope: for one thing, functions and modules imported into the global scope can be used by methods, as well as
functions and classes defined in it. Usually, the class containing the method is itself defined in this global scope,
and in the next section we’ll find some good reasons why a method would want to reference its own class!
9.5 Inheritance
Of course, a language feature would not be worthy of the name “class” without supporting inheritance. The syntax
for a derived class definition looks as follows:
class DerivedClassName(BaseClassName):
<statement-1>
.
.
.
<statement-N>
The name BaseClassName must be defined in a scope containing the derived class definition. Instead of a base
class name, an expression is also allowed. This is useful when the base class is defined in another module,
class DerivedClassName(modname.BaseClassName):
Execution of a derived class definition proceeds the same as for a base class. When the class object is constructed,
the base class is remembered. This is used for resolving attribute references: if a requested attribute is not found
in the class, it is searched in the base class. This rule is applied recursively if the base class itself is derived from
some other class.
62 Chapter 9. Classes
There’s nothing special about instantiation of derived classes: DerivedClassName() creates a new instance
of the class. Method references are resolved as follows: the corresponding class attribute is searched, descending
down the chain of base classes if necessary, and the method reference is valid if this yields a function object.
Derived classes may override methods of their base classes. Because methods have no special privileges when
calling other methods of the same object, a method of a base class that calls another method defined in the same
base class, may in fact end up calling a method of a derived class that overrides it. (For C++ programmers: all
methods in Python are effectively virtual.)
An overriding method in a derived class may in fact want to extend rather than simply replace the base
class method of the same name. There is a simple way to call the base class method directly: just call
‘BaseClassName.methodname(self, arguments)’. This is occasionally useful to clients as well.
(Note that this only works if the base class is defined or imported directly in the global scope.)
9.5.1 Multiple Inheritance
Python supports a limited form of multiple inheritance as well. A class definition with multiple base classes looks
as follows:
class DerivedClassName(Base1, Base2, Base3):
<statement-1>
.
.
.
<statement-N>
The only rule necessary to explain the semantics is the resolution rule used for class attribute references. This
is depth-first, left-to-right. Thus, if an attribute is not found in DerivedClassName, it is searched in Base1,
then (recursively) in the base classes of Base1, and only if it is not found there, it is searched in Base2, and so
on.
(To some people breadth first — searching Base2 and Base3 before the base classes of Base1 — looks more
natural. However, this would require you to know whether a particular attribute of Base1 is actually defined in
Base1 or in one of its base classes before you can figure out the consequences of a name conflict with an attribute
of Base2. The depth-first rule makes no differences between direct and inherited attributes of Base1.)
It is clear that indiscriminate use of multiple inheritance is a maintenance nightmare, given the reliance in Python
on conventions to avoid accidental name conflicts. A well-known problem with multiple inheritance is a class
derived from two classes that happen to have a common base class. While it is easy enough to figure out what
happens in this case (the instance will have a single copy of “instance variables” or data attributes used by the
common base class), it is not clear that these semantics are in any way useful.
9.6 Private Variables
There is limited support for class-private identifiers. Any identifier of the form __spam (at least two lead-
ing underscores, at most one trailing underscore) is now textually replaced with _classname__spam, where
classname is the current class name with leading underscore(s) stripped. This mangling is done without regard
of the syntactic position of the identifier, so it can be used to define class-private instance and class variables,
methods, as well as globals, and even to store instance variables private to this class on instances of other classes.
Truncation may occur when the mangled name would be longer than 255 characters. Outside classes, or when the
class name consists of only underscores, no mangling occurs.
Name mangling is intended to give classes an easy way to define “private” instance variables and methods, without
having to worry about instance variables defined by derived classes, or mucking with instance variables by code
outside the class. Note that the mangling rules are designed mostly to avoid accidents; it still is possible for
a determined soul to access or modify a variable that is considered private. This can even be useful in special
circumstances, such as in the debugger, and that’s one reason why this loophole is not closed. (Buglet: derivation
9.6. Private Variables 63
of a class with the same name as the base class makes use of private variables of the base class possible.)
Notice that code passed to exec, eval() or evalfile() does not consider the classname of the invoking
class to be the current class; this is similar to the effect of the global statement, the effect of which is likewise
restricted to code that is byte-compiled together. The same restriction applies to getattr(), setattr() and
delattr(), as well as when referencing __dict__ directly.
9.7 Odds and Ends
Sometimes it is useful to have a data type similar to the Pascal “record” or C “struct”, bundling together a couple
of named data items. An empty class definition will do nicely:
class Employee:
pass
john = Employee() # Create an empty employee record
# Fill the fields of the record
john.name = ’John Doe’
john.dept = ’computer lab’
john.salary = 1000
A piece of Python code that expects a particular abstract data type can often be passed a class that emulates the
methods of that data type instead. For instance, if you have a function that formats some data from a file object,
you can define a class with methods read() and readline() that gets the data from a string buffer instead,
and pass it as an argument.
Instance method objects have attributes, too: m.im_self is the object of which the method is an instance, and
m.im_func is the function object corresponding to the method.
9.8 Exceptions Are Classes Too
User-defined exceptions are identified by classes as well. Using this mechanism it is possible to create extensible
hierarchies of exceptions.
There are two new valid (semantic) forms for the raise statement:
raise Class, instance
raise instance
In the first form, instance must be an instance of Class or of a class derived from it. The second form is a
shorthand for:
raise instance.__class__, instance
A class in an except clause is compatible with an exception if it is the same class or a base class thereof (but not
the other way around — an except clause listing a derived class is not compatible with a base class). For example,
the following code will print B, C, D in that order:
64 Chapter 9. Classes
class B:
pass
class C(B):
pass
class D(C):
pass
for c in [B, C, D]:
try:
raise c()
except D:
print "D"
except C:
print "C"
except B:
print "B"
Note that if the except clauses were reversed (with ‘except B’ first), it would have printed B, B, B — the first
matching except clause is triggered.
When an error message is printed for an unhandled exception which is a class, the class name is printed, then a
colon and a space, and finally the instance converted to a string using the built-in function str().
9.9 Iterators
By now, you’ve probably noticed that most container objects can looped over using a for statement:
for element in [1, 2, 3]:
print element
for element in (1, 2, 3):
print element
for key in {’one’:1, ’two’:2}:
print key
for char in "123":
print char
for line in open("myfile.txt"):
print line
This style of access is clear, concise, and convenient. The use of iterators pervades and unifies Python. Behind
the scenes, the for statement calls iter() on the container object. The function returns an iterator object that
defines the method next() which accesses elements in the container one at a time. When there are no more
elements, next() raises a StopIteration exception which tells the for loop to terminate. This example
shows how it all works:
9.9. Iterators 65
>>> s = ’abc’
>>> it = iter(s)
>>> it
<iterator object at 0x00A1DB50>
>>> it.next()
’a’
>>> it.next()
’b’
>>> it.next()
’c’
>>> it.next()
Traceback (most recent call last):
File "<pyshell#6>", line 1, in -toplevel-
it.next()
StopIteration
Having seen the mechanics behind the iterator protocol, it is easy to add iterator behavior to your classes. Define
a __iter__() method which returns an object with a next() method. If the class defines next(), then
__iter__() can just return self:
>>> class Reverse:
"Iterator for looping over a sequence backwards"
def __init__(self, data):
self.data = data
self.index = len(data)
def __iter__(self):
return self
def next(self):
if self.index == 0:
raise StopIteration
self.index = self.index - 1
return self.data[self.index]
>>> for char in Reverse(’spam’):
print char
m
a
p
s
9.10 Generators
Generators are a simple and powerful tool for creating iterators. They are written like regular functions but use
the yield statement whenever they want to return data. Each time the next() is called, the generator resumes
where it left-off (it remembers all the data values and which statement was last executed). An example shows that
generators can be trivially easy to create:
66 Chapter 9. Classes
>>> def reverse(data):
for index in range(len(data)-1, -1, -1):
yield data[index]
>>> for char in reverse(’golf’):
print char
f
l
o
g
Anything that can be done with generators can also be done with class based iterators as described in the pre-
vious section. What makes generators so compact is that the __iter__() and next() methods are created
automatically.
Another key feature is that the local variables and execution state are automatically saved between calls. This
made the function easier to write and much more clear than an approach using class variables like self.index
and self.data.
In addition to automatic method creation and saving program state, when generators terminate, they automatically
raise StopIteration. In combination, these features make it easy to create iterators with no more effort than
writing a regular function.
9.10. Generators 67
68
CHAPTER
TEN
Brief Tour of the Standard Library
10.1 Operating System Interface
The os module provides dozens of functions for interacting with the operating system:
>>> import os
>>> os.system(’time 0:02’)
0
>>> os.getcwd() # Return the current working directory
’C:\\Python24’
>>> os.chdir(’/server/accesslogs’)
Be sure to use the ‘import os’ style instead of ‘from os import *’. This will keep os.open() from
shadowing the builtin open() function which operates much differently.
The builtin dir() and help() functions are useful as interactive aids for working with large modules like os:
>>> import os
>>> dir(os)
<returns a list of all module functions>
>>> help(os)
<returns an extensive manual page created from the module’s docstrings>
For daily file and directory management tasks, the shutil module provides a higher level interface that is easier
to use:
>>> import shutil
>>> shutil.copyfile(’data.db’, ’archive.db’)
>>> shutil.move(’/build/executables’, ’installdir’)
10.2 File Wildcards
The glob module provides a function for making file lists from directory wildcard searches:
>>> import glob
>>> glob.glob(’*.py’)
[’primes.py’, ’random.py’, ’quote.py’]
69
10.3 Command Line Arguments
Common utility scripts often invoke processing command line arguments. These arguments are stored in the sys
module’s argv attribute as a list. For instance the following output results from running ‘python demo.py
one two three’ at the command line:
>>> import sys
>>> print sys.argv
[’demo.py’, ’one’, ’two’, ’three’]
The getopt module processes sys.argv using the conventions of the U NIX getopt() function. More powerful
and flexible command line processing is provided by the optparse module.
10.4 Error Output Redirection and Program Termination
The sys module also has attributes for stdin, stdout, and stderr. The latter is useful for emitting warnings and
error messages to make them visible even when stdout has been redirected:
The most direct way to terminate a script is to use ‘sys.exit()’.
10.5 String Pattern Matching
The re module provides regular expression tools for advanced string processing. For complex matching and
manipulation, regular expressions offer succinct, optimized solutions:
>>> import re
>>> re.findall(r’\bf[a-z]*’, ’which foot or hand fell fastest’)
[’foot’, ’fell’, ’fastest’]
>>> re.sub(r’(\b[a-z]+) \1’, r’\1’, ’cat in the the hat’)
’cat in the hat’
When only simple capabilities are needed, string methods are preferred because they are easier to read and debug:
>>> ’tea for too’.replace(’too’, ’two’)
’tea for two’
10.6 Mathematics
The math module gives access to the underlying C library functions for floating point math:
70 Chapter 10. Brief Tour of the Standard Library
>>> import math
>>> math.cos(math.pi / 4.0)
0.70710678118654757
>>> math.log(1024, 2)
10.0
The random module provides tools for making random selections:
>>> import random
>>> random.choice([’apple’, ’pear’, ’banana’])
’apple’
>>> random.sample(xrange(100), 10) # sampling without replacement
[30, 83, 16, 4, 8, 81, 41, 50, 18, 33]
>>> random.random() # random float
0.17970987693706186
>>> random.randrange(6) # random integer chosen from range(6)
4
10.7 Internet Access
There are a number of modules for accessing the internet and processing internet protocols. Two of the simplest
are urllib2 for retrieving data from urls and smtplib for sending mail:
>>> import urllib2
>>> for line in urllib2.urlopen(’http://tycho.usno.navy.mil/cgi-bin/timer.pl’):
... if ’EST’ in line: # look for Eastern Standard Time
... print line
<BR>Nov. 25, 09:43:32 PM EST
>>> import smtplib
>>> server = smtplib.SMTP(’localhost’)
>>> server.sendmail(’[email protected]’, ’[email protected]’,
"""To: [email protected]
From: [email protected]
Beware the Ides of March.
""")
>>> server.quit()
10.8 Dates and Times
The datetime module supplies classes for manipulating dates and times in both simple and complex ways.
While date and time arithmetic is supported, the focus of the implementation is on efficient member extraction for
output formatting and manipulation. The module also supports objects that are time zone aware.
10.7. Internet Access 71
# dates are easily constructed and formatted
>>> from datetime import date
>>> now = date.today()
>>> now
datetime.date(2003, 12, 2)
>>> now.strftime("%m-%d-%y or %d%b %Y is a %A on the %d day of %B")
’12-02-03 or 02Dec 2003 is a Tuesday on the 02 day of December’
# dates support calendar arithmetic
>>> birthday = date(1964, 7, 31)
>>> age = now - birthday
>>> age.days
14368
10.9 Data Compression
Common data archiving and compression formats are directly supported by modules including: zlib, gzip,
bz2, zipfile, and tarfile.
>>> import zlib
>>> s = ’witch which has which witches wrist watch’
>>> len(s)
41
>>> t = zlib.compress(s)
>>> len(t)
37
>>> zlib.decompress(t)
’witch which has which witches wrist watch’
>>> zlib.crc32(t)
-1438085031
10.10 Performance Measurement
Some Python users develop a deep interest in knowing the relative performance between different approaches to
the same problem. Python provides a measurement tool that answers those questions immediately.
For example, it may be tempting to use the tuple packing and unpacking feature instead of the traditional approach
to swapping arguments. The timeit module quickly demonstrates that the traditional approach is faster:
>>> from timeit import Timer
>>> Timer(’t=a; a=b; b=t’, ’a=1; b=2’).timeit()
0.60864915603680925
>>> Timer(’a,b = b,a’, ’a=1; b=2’).timeit()
0.8625194857439773
In contrast to timeit’s fine level of granularity, the profile and pstats modules provide tools for identify-
ing time critical sections in larger blocks of code.
72 Chapter 10. Brief Tour of the Standard Library
10.11 Quality Control
One approach for developing high quality software is to write tests for each function as it is developed and to run
those tests frequently during the development process.
The doctest module provides a tool for scanning a module and validating tests embedded in a program’s
docstrings. Test construction is as simple as cutting-and-pasting a typical call along with its results into the
docstring. This improves the documentation by providing the user with an example and it allows the doctest
module to make sure the code remains true to the documentation:
def average(values):
"""Computes the arithmetic mean of a list of numbers.
>>> print average([20, 30, 70])
40.0
"""
return sum(values, 0.0) / len(values)
import doctest
doctest.testmod() # automatically validate the embedded tests
The unittest module is not as effortless as the doctest module, but it allows a more comprehensive set of
tests to be maintained in a separate file:
import unittest
class TestStatisticalFunctions(unittest.TestCase):
def test_average(self):
self.assertEqual(average([20, 30, 70]), 40.0)
self.assertEqual(round(average([1, 5, 7]), 1), 4.3)
self.assertRaises(ZeroDivisionError, average, [])
self.assertRaises(TypeError, average, 20, 30, 70)
unittest.main() # Calling from the command line invokes all tests
10.12 Batteries Included
Python has a “batteries included” philosophy. This is best seen through the sophisticated and robust capabilities
of its larger packages. For example:
* The xmlrpclib and SimpleXMLRPCServer modules make implementing remote procedure calls into an
almost trivial task. Despite the names, no direct knowledge or handling of XML is needed.
* The email package is a library for managing email messages, including MIME and other RFC 2822-based
message documents. Unlike smtplib and poplib which actually send and receive messages, the email pack-
age has a complete toolset for building or decoding complex message structures (including attachments) and for
implementing internet encoding and header protocols.
* The xml.dom and xml.sax packages provide robust support for parsing this popular data interchange format.
Likewise, the csv module supports direct reads and writes in a common database format. Together, these modules
and packages greatly simplify data interchange between python applications and other tools.
* Internationalization is supported by a number of modules including gettext, locale, and the codecs
package.
10.11. Quality Control 73
74
CHAPTER
ELEVEN
What Now?
Reading this tutorial has probably reinforced your interest in using Python — you should be eager to apply Python
to solve your real-world problems. Now what should you do?
You should read, or at least page through, the Python Library Reference, which gives complete (though terse)
reference material about types, functions, and modules that can save you a lot of time when writing Python
programs. The standard Python distribution includes a lot of code in both C and Python; there are modules to read
U NIX mailboxes, retrieve documents via HTTP, generate random numbers, parse command-line options, write
CGI programs, compress data, and a lot more; skimming through the Library Reference will give you an idea of
what’s available.
The major Python Web site is http://www.python.org/; it contains code, documentation, and pointers to Python-
related pages around the Web. This Web site is mirrored in various places around the world, such as Europe,
Japan, and Australia; a mirror may be faster than the main site, depending on your geographical location. A more
informal site is http://starship.python.net/, which contains a bunch of Python-related personal home pages; many
people have downloadable software there. Many more user-created Python modules can be found in the Python
Package Index (PyPI).
For Python-related questions and problem reports, you can post to the newsgroup comp.lang.python, or send them
to the mailing list at [email protected]. The newsgroup and mailing list are gatewayed, so messages posted
to one will automatically be forwarded to the other. There are around 120 postings a day (with peaks up to several
hundred), asking (and answering) questions, suggesting new features, and announcing new modules. Before
posting, be sure to check the list of Frequently Asked Questions (also called the FAQ), or look for it in the ‘Misc/’
directory of the Python source distribution. Mailing list archives are available at http://www.python.org/pipermail/.
The FAQ answers many of the questions that come up again and again, and may already contain the solution for
75
76
APPENDIX
A
Interactive Input Editing and History
Substitution
Some versions of the Python interpreter support editing of the current input line and history substitution, similar
to facilities found in the Korn shell and the GNU Bash shell. This is implemented using the GNU Readline library,
which supports Emacs-style and vi-style editing. This library has its own documentation which I won’t duplicate
here; however, the basics are easily explained. The interactive editing and history described here are optionally
available in the U NIX and CygWin versions of the interpreter.
This chapter does not document the editing facilities of Mark Hammond’s PythonWin package or the Tk-based
environment, IDLE, distributed with Python. The command line history recall which operates within DOS boxes
on NT and some other DOS and Windows flavors is yet another beast.
A.1 Line Editing
If supported, input line editing is active whenever the interpreter prints a primary or secondary prompt. The
current line can be edited using the conventional Emacs control characters. The most important of these are: C-A
(Control-A) moves the cursor to the beginning of the line, C-E to the end, C-B moves it one position to the left,
C-F to the right. Backspace erases the character to the left of the cursor, C-D the character to its right. C-K kills
(erases) the rest of the line to the right of the cursor, C-Y yanks back the last killed string. C-underscore
undoes the last change you made; it can be repeated for cumulative effect.
A.2 History Substitution
History substitution works as follows. All non-empty input lines issued are saved in a history buffer, and when a
new prompt is given you are positioned on a new line at the bottom of this buffer. C-P moves one line up (back)
in the history buffer, C-N moves one down. Any line in the history buffer can be edited; an asterisk appears in
front of the prompt to mark a line as modified. Pressing the Return key passes the current line to the interpreter.
C-R starts an incremental reverse search; C-S starts a forward search.
A.3 Key Bindings
The key bindings and some other parameters of the Readline library can be customized by placing commands in
an initialization file called ‘˜/.inputrc’. Key bindings have the form
key-name: function-name
or
77
"string": function-name
and options can be set with
set option-name value
For example:
# I prefer vi-style editing:
set editing-mode vi
# Edit using a single line:
set horizontal-scroll-mode On
# Rebind some keys:
Meta-h: backward-kill-word
"\C-u": universal-argument
Note that the default binding for Tab in Python is to insert a Tab character instead of Readline’s default filename
completion function. If you insist, you can override this by putting
Tab: complete
in your ‘˜/.inputrc’. (Of course, this makes it harder to type indented continuation lines if you’re accustomed to
using Tab for that purpose.)
Automatic completion of variable and module names is optionally available. To enable it in the interpreter’s
This binds the Tab key to the completion function, so hitting the Tab key twice suggests completions; it looks at
Python statement names, the current local variables, and the available module names. For dotted expressions such
as string.a, it will evaluate the expression up to the final ‘.’ and then suggest completions from the attributes
of the resulting object. Note that this may execute application-defined code if an object with a __getattr__()
method is part of the expression.
A more capable startup file might look like this example. Note that this deletes the names it creates once they are
no longer needed; this is done since the startup file is executed in the same namespace as the interactive commands,
and removing the names avoids creating side effects in the interactive environments. You may find it convenient to
keep some of the imported modules, such as os, which turn out to be needed in most sessions with the interpreter.
1 Python will execute the contents of a file identified by the PYTHONSTARTUP environment variable when you start an interactive inter-
preter.
78 Appendix A. Interactive Input Editing and History Substitution
# Add auto-completion and a stored history file of commands to your Python
# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
# bound to the Esc key by default (you can change it - see readline docs).
#
# Store the file in ~/.pystartup, and set an environment variable to point
# to it: "export PYTHONSTARTUP=/max/home/itamar/.pystartup" in bash.
#
# Note that PYTHONSTARTUP does *not* expand "~", so you have to put in the
# full path to your home directory.
import atexit
import os
import rlcompleter
historyPath = os.path.expanduser("~/.pyhistory")
def save_history(historyPath=historyPath):
if os.path.exists(historyPath):
atexit.register(save_history)
del os, atexit, readline, rlcompleter, save_history, historyPath
A.4 Commentary
This facility is an enormous step forward compared to earlier versions of the interpreter; however, some wishes
are left: It would be nice if the proper indentation were suggested on continuation lines (the parser knows if an
indent token is required next). The completion mechanism might use the interpreter’s symbol table. A command
to check (or even suggest) matching parentheses, quotes, etc., would also be useful.
A.4. Commentary 79
80
APPENDIX
B
Floating Point Arithmetic: Issues and
Limitations
Floating-point numbers are represented in computer hardware as base 2 (binary) fractions. For example, the
decimal fraction
0.125
has value 1/10 + 2/100 + 5/1000, and in the same way the binary fraction
0.001
has value 0/2 + 0/4 + 1/8. These two fractions have identical values, the only real difference being that the first is
written in base 10 fractional notation, and the second in base 2.
Unfortunately, most decimal fractions cannot be represented exactly as binary fractions. A consequence is that, in
general, the decimal floating-point numbers you enter are only approximated by the binary floating-point numbers
actually stored in the machine.
The problem is easier to understand at first in base 10. Consider the fraction 1/3. You can approximate that as a
base 10 fraction:
0.3
or, better,
0.33
or, better,
0.333
and so on. No matter how many digits you’re willing to write down, the result will never be exactly 1/3, but will
be an increasingly better approximation to 1/3.
In the same way, no matter how many base 2 digits you’re willing to use, the decimal value 0.1 cannot be repre-
sented exactly as a base 2 fraction. In base 2, 1/10 is the infinitely repeating fraction
81
0.0001100110011001100110011001100110011001100110011...
Stop at any finite number of bits, and you get an approximation. This is why you see things like:
>>> 0.1
0.10000000000000001
On most machines today, that is what you’ll see if you enter 0.1 at a Python prompt. You may not, though, because
the number of bits used by the hardware to store floating-point values can vary across machines, and Python only
prints a decimal approximation to the true decimal value of the binary approximation stored by the machine. On
most machines, if Python were to print the true decimal value of the binary approximation stored for 0.1, it would
have to display
>>> 0.1
0.1000000000000000055511151231257827021181583404541015625
instead! The Python prompt (implicitly) uses the builtin repr() function to obtain a string version of everything
it displays. For floats, repr(float) rounds the true decimal value to 17 significant digits, giving
0.10000000000000001
repr(float) produces 17 significant digits because it turns out that’s enough (on most machines) so that
eval(repr(x)) == x exactly for all finite floats x, but rounding to 16 digits is not enough to make that
true.
Note that this is in the very nature of binary floating-point: this is not a bug in Python, it is not a bug in your code
either, and you’ll see the same kind of thing in all languages that support your hardware’s floating-point arithmetic
(although some languages may not display the difference by default, or in all output modes).
Python’s builtin str() function produces only 12 significant digits, and you may wish to use that instead. It’s
unusual for eval(str(x)) to reproduce x, but the output may be more pleasant to look at:
>>> print str(0.1)
0.1
It’s important to realize that this is, in a real sense, an illusion: the value in the machine is not exactly 1/10, you’re
simply rounding the display of the true machine value.
Other surprises follow from this one. For example, after seeing
>>> 0.1
0.10000000000000001
you may be tempted to use the round() function to chop it back to the single digit you expect. But that makes
no difference:
>>> round(0.1, 1)
0.10000000000000001
The problem is that the binary floating-point value stored for "0.1" was already the best possible binary approxi-
mation to 1/10, so trying to round it again can’t make it better: it was already as good as it gets.
82 Appendix B. Floating Point Arithmetic: Issues and Limitations
Another consequence is that since 0.1 is not exactly 1/10, adding 0.1 to itself 10 times may not yield exactly 1.0,
either:
>>> sum = 0.0
>>> for i in range(10):
... sum += 0.1
...
>>> sum
0.99999999999999989
Binary floating-point arithmetic holds many surprises like this. The problem with "0.1" is explained in precise
detail below, in the "Representation Error" section. See The Perils of Floating Point for a more complete account
of other common surprises.
As that says near the end, “there are no easy answers.” Still, don’t be unduly wary of floating-point! The errors in
Python float operations are inherited from the floating-point hardware, and on most machines are on the order of
no more than 1 part in 2**53 per operation. That’s more than adequate for most tasks, but you do need to keep in
mind that it’s not decimal arithmetic, and that every float operation can suffer a new rounding error.
While pathological cases do exist, for most casual use of floating-point arithmetic you’ll see the result you expect
in the end if you simply round the display of your final results to the number of decimal digits you expect. str()
usually suffices, and for finer control see the discussion of Pythons’s % format operator: the %g, %f and %e format
codes supply flexible and easy ways to round float results for display.
B.1 Representation Error
This section explains the “0.1” example in detail, and shows how you can perform an exact analysis of cases like
this yourself. Basic familiarity with binary floating-point representation is assumed.
Representation error refers to that some (most, actually) decimal fractions cannot be represented exactly as binary
(base 2) fractions. This is the chief reason why Python (or Perl, C, C++, Java, Fortran, and many others) often
won’t display the exact decimal number you expect:
>>> 0.1
0.10000000000000001
Why is that? 1/10 is not exactly representable as a binary fraction. Almost all machines today (November 2000)
use IEEE-754 floating point arithmetic, and almost all platforms map Python floats to IEEE-754 "double preci-
sion". 754 doubles contain 53 bits of precision, so on input the computer strives to convert 0.1 to the closest
fraction it can of the form J/2**N where J is an integer containing exactly 53 bits. Rewriting
1 / 10 ~= J / (2**N)
as
J ~= 2**N / 10
and recalling that J has exactly 53 bits (is >= 2**52 but < 2**53), the best value for N is 56:
B.1. Representation Error 83
>>> 2L**52
4503599627370496L
>>> 2L**53
9007199254740992L
>>> 2L**56/10
7205759403792793L
That is, 56 is the only value for N that leaves J with exactly 53 bits. The best possible value for J is then that
quotient rounded:
>>> q, r = divmod(2L**56, 10)
>>> r
6L
Since the remainder is more than half of 10, the best approximation is obtained by rounding up:
>>> q+1
7205759403792794L
Therefore the best possible approximation to 1/10 in 754 double precision is that over 2**56, or
7205759403792794 / 72057594037927936
Note that since we rounded up, this is actually a little bit larger than 1/10; if we had not rounded up, the quotient
would have been a little bit smaller than 1/10. But in no case can it be exactly 1/10!
So the computer never “sees” 1/10: what it sees is the exact fraction given above, the best 754 double approxima-
tion it can get:
>>> .1 * 2L**56
7205759403792794.0
If we multiply that fraction by 10**30, we can see the (truncated) value of its 30 most significant decimal digits:
>>> 7205759403792794L * 10L**30 / 2L**56
100000000000000005551115123125L
meaning that the exact number stored in the computer is approximately equal to the decimal value
0.100000000000000005551115123125. Rounding that to 17 significant digits gives the 0.10000000000000001
that Python displays (well, will display on any 754-conforming platform that does best-possible input and output
conversions in its C library — yours may not!).
84 Appendix B. Floating Point Arithmetic: Issues and Limitations
APPENDIX
C
C.1 History of the software
Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see
http://www.cwi.nl/) in the Netherlands as a successor of a language called ABC. Guido remains Python’s principal
author, although it includes many contributions from others.
In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see
http://www.cnri.reston.va.us/) in Reston, Virginia where he released several versions of the software.
In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen Python-
Labs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation;
see http://www.zope.com/). In 2001, the Python Software Foundation (PSF, see http://www.python.org/psf/) was
formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corpora-
tion is a sponsoring member of the PSF.
All Python releases are Open Source (see http://www.opensource.org/ for the Open Source Definition). Histori-
cally, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various
releases.
Release Derived from Year Owner GPL compatible?
0.9.0 thru 1.2 n/a 1991-1995 CWI yes
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
1.6 1.5.2 2000 CNRI no
2.0 1.6 2000 BeOpen.com no
1.6.1 1.6 2001 CNRI no
2.1 2.0+1.6.1 2001 PSF no
2.0.1 2.0+1.6.1 2001 PSF yes
2.1.1 2.1+2.0.1 2001 PSF yes
2.2 2.1.1 2001 PSF yes
2.1.2 2.1.1 2002 PSF yes
2.1.3 2.1.2 2002 PSF yes
2.2.1 2.2 2002 PSF yes
2.2.2 2.2.1 2002 PSF yes
2.2.3 2.2.2 2002-2003 PSF yes
2.3 2.2.2 2002-2003 PSF yes
2.3.1 2.3 2002-2003 PSF yes
2.3.2 2.3.1 2003 PSF yes
Note: GPL-compatible doesn’t mean that we’re distributing Python under the GPL. All Python licenses, unlike
the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible
licenses make it possible to combine Python with other software that is released under the GPL; the others don’t.
Thanks to the many outside volunteers who have worked under Guido’s direction to make these releases possible.
85
C.2 Terms and conditions for accessing or otherwise using Python
PSF LICENSE AGREEMENT FOR PYTHON 2.3.3
1. This LICENSE AGREEMENT is between the Python Software Foundation (“PSF”), and the Individual or
Organization (“Licensee”) accessing and otherwise using Python 2.3.3 software in source or binary form
and its associated documentation.
2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare deriva-
tive works, distribute, and otherwise use Python 2.3.3 alone or in any derivative version, provided, however,
3. In the event Licensee prepares a derivative work that is based on or incorporates Python 2.3.3 or any part
thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby
agrees to include in any such work a brief summary of the changes made to Python 2.3.3.
4. PSF is making Python 2.3.3 available to Licensee on an “AS IS” basis. PSF MAKES NO REPRESEN-
TATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMI-
TATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MER-
CHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON
2.3.3 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 2.3.3 FOR ANY
INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFY-
ING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.3.3, OR ANY DERIVATIVE THEREOF,
EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or
joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF
any third party.
8. By copying, installing or otherwise using Python 2.3.3, Licensee agrees to be bound by the terms and
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
1. This LICENSE AGREEMENT is between BeOpen.com (“BeOpen”), having an office at 160 Saratoga
Avenue, Santa Clara, CA 95051, and the Individual or Organization (“Licensee”) accessing and otherwise
using this software in source or binary form and its associated documentation (“the Software”).
2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Li-
censee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display
publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative
version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any
3. BeOpen is making the Software available to Licensee on an “AS IS” basis. BEOPEN MAKES NO REP-
RESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT
LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY
OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT
OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF,
EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
86 Appendix C. History and License
5. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of
California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License
Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to
endorse or promote products or services of Licensee, or any third party. As an exception, the “BeOpen
Python” logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions
granted on that web page.
7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an
office at 1895 Preston White Drive, Reston, VA 20191 (“CNRI”), and the Individual or Organization (“Li-
censee”) accessing and otherwise using Python 1.6.1 software in source or binary form and its associated
documentation.
2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclu-
sive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare
derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided,
or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI’s License Agreement,
Licensee may substitute the following text (omitting the quotes): “Python 1.6.1 is made available sub-
ject to the terms and conditions in CNRI’s License Agreement. This Agreement together with Python
1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle):
1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following
URL: http://hdl.handle.net/1895.22/1013.”
3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part
thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby
agrees to include in any such work a brief summary of the changes made to Python 1.6.1.
4. CNRI is making Python 1.6.1 available to Licensee on an “AS IS” basis. CNRI MAKES NO REPRESEN-
TATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMI-
TATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MER-
CHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON
1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY
INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFY-
ING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF,
EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
7. This License Agreement shall be governed by the federal intellectual property law of the United States, in-
cluding without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply,
by the law of the Commonwealth of Virginia, excluding Virginia’s conflict of law provisions. Notwithstand-
ing the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable
material that was previously distributed under the GNU General Public License (GPL), the law of the Com-
monwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect
to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License
Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse
or promote products or services of Licensee, or any third party.
8. By clicking on the “ACCEPT” button where indicated, or by copying, installing or otherwise using Python
1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement.
C.2. Terms and conditions for accessing or otherwise using Python 87
ACCEPT
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee
is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice
and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific,
written prior permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT
OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TOR-
TIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
88 Appendix C. History and License
APPENDIX
D
Glossary
>>> The typical Python prompt of the interactive shell. Often seen for code examples that can be tried right away
in the interpreter.
... The typical Python prompt of the interactive shell when entering code for an indented code block.
BDFL Benevolent Dictator For Life, a.k.a. Guido van Rossum, Python’s creator.
byte code The internal representation of a Python program in the interpreter. The byte code is also cached in the
.pyc and .pyo files so that executing the same file is faster the second time (compilation from source to
byte code can be saved). This “intermediate language” is said to run on a “virtual machine” that calls the
subroutines corresponding to each bytecode.
classic class Any class which does not inherit from object. See new-style class.
coercion Converting data from one type to another. For example, int(3.15) coerces the floating point number
to the integer, 3. Most mathematical operations have rules for coercing their arguments to a common type.
For instance, adding 3+4.5, causes the integer 3 to be coerced to be a float 3.0 before adding to 4.5
resulting in the float 7.5.
descriptor Any new-style object that defines the methods __get__(), __set__(), or __delete__().
When a class attribute is a descriptor, its special binding behavior is triggered upon attribute lookup. Nor-
mally, writing a.b looks up the object b in the class dictionary for a, but if b is a descriptor, the defined
method gets called. Understanding descriptors is a key to a deep understanding of Python because they
are the basis for many features including functions, methods, properties, class methods, static methods, and
reference to super classes.
dictionary An associative array, where arbitrary keys are mapped to values. The use of dict much resembles
that for list, but the keys can be any object with a __hash__() function, not just integers starting from
zero. Called a hash in Perl.
EAFP Easier to ask for forgiveness than permission. This common Python coding style assumes the existence
of valid keys or attributes and catches exceptions if the assumption proves false. This clean and fast style
is characterized by the presence of many try and except statements. The technique contrasts with the
LBYL style that is common in many other languages such as C.
__future__ A pseudo module which programmers can use to enable new language features which are not compat-
ible with the current interpreter. For example, the expression 11/4 currently evaluates to 2. If the module
in which it is executed had enabled true division by executing:
from __future__ import division
the expression 11/4 would evaluate to 2.75. By actually importing the __future__ module and evalu-
ating its variables, you can see when a new feature was first added to the language and when it will become
the default:
>>> import __future__
>>> __future__.division
_Feature((2, 2, 0, ’alpha’, 2), (3, 0, 0, ’alpha’, 0), 8192)
89
generator A function that returns an iterator. It looks like a normal function except that the yield keyword is
used instead of return. Generator functions often contain one or more for or while loops that yield
elements back to the caller. The function execution is stopped at the yield keyword (returning the result)
and is resumed there when the next element is requested by calling the next() method of the returned
iterator.
GIL See global interpreter lock.
global interpreter lock The lock used by Python threads to assure that only one thread can be run at a time.
This simplifies Python by assuring that no two processes can access the same memory at the same time.
Locking the entire interpreter makes it easier for the interpreter to be multi-threaded, at the expense of some
parallelism on multi-processor machines. Efforts have been made in the past to create a “free-threaded” in-
terpreter (one which locks shared data at a much finer granularity), but performance suffered in the common
single-processor case.
IDLE An Integrated Development Environment for Python. IDLE is a basic editor and interpreter environment
that ships with the standard distribution of Python. Good for beginners, it also serves as clear example code
for those wanting to implement a moderately sophisticated, multi-platform GUI application.
immutable A object with fixed value. Immutable objects are numbers, strings or tuples (and more). Such an
object cannot be altered. A new object has to be created if a different value has to be stored. They play an
important role in places where a constant hash value is needed. For example as a key in a dictionary.
integer division Mathematical division discarding any remainder. For example, the expression 11/4 currently
evaluates to 2 in contrast to the 2.75 returned by float division. Also called floor division. When dividing
two integers the outcome will always be another integer (having the floor function applied to it). However,
if one of the operands is another numeric type (such as a float), the result will be coerced (see coercion)
to a common type. For example, a integer divided by a float will result in a float value, possibly with a
decimal fraction. Integer division can be forced by using the // operator instead of the / operator. See also
__future__.
interactive Python has an interactive interpreter which means that you can try out things and directly see its
result. Just launch python with no arguments (possibly by selecting it from your computer’s main menu).
It is a very powerful way to test out new ideas or inspect modules and packages (remember help(x)).
interpreted Python is an interpreted language, opposed to a compiled one. This means that the source files can
be run right away without first making an executable which is then run. Interpreted languages typically have
iterable A container object capable of returning its members one at a time. Examples of iterables include all
sequence types (such as list, str, and tuple) and some non-sequence types like dict and file and
objects of any classes you define with an __iter__() or __getitem__() method. Iterables can be
used in a for loop and in many other places where a sequence is needed (zip(), map(), ...). When an
iterable object is passed as an argument to the builtin function iter(), it returns an iterator for the object.
This iterator is good for one pass over the set of values. When using iterables, it is usually not necessary
to call iter() or deal with iterator objects yourself. The for statement does that automatically for you,
creating a temporary unnamed variable to hold the iterator for the duration of the loop. See also iterator,
sequence, and generator.
iterator An object representing a stream of data. Repeated calls to the iterator’s next() method return suc-
cessive items in the stream. When no more data is available a StopIteration exception is raised
instead. At this point, the iterator object is exhausted and any further calls to its next() method just raise
StopIteration again. Iterators are required to have an __iter__() method that returns the iterator
object itself so every iterator is also iterable and may be used in most places where other iterables are ac-
cepted. One notable exception is code that attempts multiple iteration passes. A container object (such as a
list) produces a fresh new iterator each time you pass it to the iter() function or use it in a for loop.
Attempting this with an iterator will just return the same exhausted iterator object from the second iteration
pass, making it appear like an empty container.
list comprehension A compact way to process all or a subset of elements in a sequence and return a list with the
results. result = ["0x%02x" %x for x in range(256) if x %2 == 0] generates a list
of strings containing hex numbers (0x..) that are even and in the range from 0 to 255. The if clause is
optional. If omitted, all elements in range(256) are processed in that case.
90 Appendix D. Glossary
mapping A container object (such as dict) that supports arbitrary key lookups using the special method
__getitem__().
metaclass The class of a class. Class definitions create a class name, a class dictionary, and a list of base classes.
The metaclass is responsible for taking those three arguments and creating the class. Most object oriented
programming languages provide a default implementation. What makes Python special is that it is possible
to create custom metaclasses. Most users never need this tool, but when the need arises, metaclasses can
provide powerful, elegant solutions. They have been used for logging attribute access, adding thread-safety,
tracking object creation, implementing singletons, and many other tasks.
LBYL Look before you leap. This coding style explicitly tests for pre-conditions before making calls or lookups.
This style contrasts with the EAFP approach and is characterized the presence of many if statements.
mutable Mutable objects can change their value but keep their id(). See also immutable.
namespace The place where a variable is stored. Namespaces are implemented as dictionary. There is the
local, global and builtins namespace and the nested namespaces in objects (in methods). Namespaces sup-
port modularity by preventing naming conflicts. For instance, the functions __builtin__.open() and
os.open() are distinguished by their namespaces. Namespaces also aid readability and maintainabil-
ity by making it clear which modules implement a function. For instance, writing random.seed()
or itertools.izip() makes it clear that those functions are implemented by the random and
itertools modules respectively.
nested scope The ability to refer to a variable in an enclosing definition. For instance, a function defined inside
another function can refer to variables in the outer function. Note that nested scopes work only for reference
and not for assignment which will always write to the innermost scope. In contrast, local variables both read
and write in the innermost scope. Likewise, global variables read and write to the global namespace.
new-style class Any class that inherits from object. This includes all built-in types like list and dict.
Only new-style classes can use Python’s newer, versatile features like __slots__, descriptors, properties,
__getattribute__(), class methods, and static methods.
Python3000 A mythical python release, allowed not to be backward compatible, with telepathic interface.
__slots__ A declaration inside a new-style class that saves memory by pre-declaring space for instance attributes
and eliminating instance dictionaries. Though popular, the technique is somewhat tricky to get right and is
best reserved for rare cases where there are large numbers of instances in a memory critical application.
sequence An iterable which supports efficient element access using integer indices via the __getitem__()
and __len__() special methods. Some built-in sequence types are list, str, tuple, and unicode.
Note that dict also supports __getitem__() and __len__(), but is considered a mapping rather
than a sequence because the lookups use arbitrary immutable keys rather than integers.
Zen of Python Listing of Python design principles and philosophies that are helpful in understanding and using
the language. The listing can be found by typing “import this” at the interactive prompt.
91
92
INDEX
Symbols I
..., 89 IDLE, 90
»>, 89 immutable, 90
__builtin__ (built-in module), 40 index() (list method), 27
__future__, 89 insert() (list method), 27
__slots__, 91 integer division, 90
interactive, 90
A interpreted, 90
append() (list method), 27 iterable, 90
iterator, 90
B
BDFL, 89
L
byte code, 89 LBYL, 91
list comprehension, 90
C
classic class, 89
M
coercion, 89 mapping, 90
compileall (standard module), 39 metaclass, 91
count() (list method), 27 method
object, 60
D module
descriptor, 89 search path, 38
dictionary, 89 mutable, 91
docstrings, 21, 26
documentation strings, 21, 26
N
namespace, 91
E nested scope, 91
new-style class, 91
EAFP, 89
environment variables
PATH, 4, 38
O
PYTHONPATH, 38–40 object
PYTHONSTARTUP, 5, 78 file, 47
extend() (list method), 27 method, 60
open() (built-in function), 47
F
file
P
object, 47 PATH, 4, 38
for path
statement, 19 module search, 38
pickle (standard module), 49
G pop() (list method), 27
Python3000, 91
generator, 89
PYTHONPATH, 38–40
GIL, 90
PYTHONSTARTUP, 5, 78
global interpreter lock, 90
93
R
remove() (list method), 27
reverse() (list method), 27
rlcompleter (standard module), 78
S
search
path, module, 38
sequence, 91
sort() (list method), 27
statement
for, 19
string (standard module), 45
strings, documentation, 21, 26
sys (standard module), 39
U
unicode() (built-in function), 14
Z
Zen of Python, 91
94 Index
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views: 17 posted: 1/25/2012 language: English pages: 100 | 2014-08-22 08:51:18 | {"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.3437434732913971, "perplexity": 2612.7783210311177}, "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-35/segments/1408500823333.10/warc/CC-MAIN-20140820021343-00017-ip-10-180-136-8.ec2.internal.warc.gz"} |
https://rdrr.io/github/tnieuwe/HPAStainR_package/man/HPAstainR.html | # HPAstainR: HPAStainR In tnieuwe/HPAStainR_package: Queries the Human Protein Atlas Staining Data for Multiple Proteins and Genes
HPAStainR R Documentation
## HPAStainR
### Description
Uses a protein/gene list to query Human Protein Atlas (HPA) staining data.
### Usage
HPAStainR(
gene_list,
hpa_dat,
cancer_dat = data.frame(),
cancer_analysis = c("normal", "cancer", "both"),
tissue_level = TRUE,
stringency = c("normal", "high", "low"),
scale_abundance = TRUE,
round_to = 2,
csv_names = TRUE,
stained_gene_data = TRUE,
tested_protein_column = TRUE,
percent_or_count = c("percent", "count", "both"),
drop_na_row = FALSE,
test_type = c("fisher", "chi square"),
)
### Arguments
gene_list A list of proteins or genes that you want to query the HPA staining data with. hpa_dat The data frame of normal HPA staining data data, required to run HPAStainR. cancer_dat The data frame of pathologic HPA staining data, required to run HPAStainr. cancer_analysis A character string indicating inclusion of cancer data in the result, must be one of 'normal' (default), 'cancer', or 'both'. tissue_level A boolean that determines whether tissue level data for the cell types are included. Default is TRUE stringency A character string indicating how stringent the confidence level of the staining findings have to be. Must be 'normal' (default), 'high', or 'low'. This stringency is based on the 'Reliability' column from the hpa_dat object which varies from "Enhanced", "Supported", "Approved", to "Uncertain" in decreasing order of certainty. Low stringency includes all data, normal stringency includes "Enhanced", "Supported", and "Approved", while high stringency only includes "Enhanced" and "Supported". Further information about these categorizations can be found in the following link https://www.proteinatlas.org/about/assays+annotation scale_abundance A boolean that determines whether you scale Staining Score based on the size of the gene list. Default is TRUE. round_to A numeric that determines how many decimals in numeric outputs are desired. Default 2. csv_names A Boolean determining if you want names suited for a csv file/pipeline, or for presentation. Default is TRUE giving csv names. stained_gene_data A boolean determining if there is a list of which proteins stained, TRUE is default. tested_protein_column A boolean determining if there is a column listing which proteins were tested, TRUE is default. percent_or_count A character string determining if percent of proteins stained, count of proteins stained, or both are shown for high, medium, and low staining. Must be 'percent' (default), 'count', or 'both'. drop_na_row A boolean that determines if cell types with no proteins tested are kept or dropped, default is FALSE. test_type A character vector for either "fisher" or "chi square", used to select the statistical test for determining cell type enrichment. The two options are Fisher's Exact Test and a Chi Square test. The original version of HPAStainR defaulted to the Chi Square test, however because this requires simulated values to run correctly, we suggest the usage of the Fisher's Exact Test for consistency. adjusted_pvals A boolean indicating if you want the p-values corrected for multiple testing. Default is TRUE.
### Value
A tibble containing the results of HPAStainR.
### Details
Calculation of the staining score below:
(\frac{h \times 100}{t}) + (\frac{m \times 50}{t}) + (\frac{l \times 25}{t})
### Examples
## Below will give you the results found on the shiny app website
HPA_data$hpa_dat, HPA_data$cancer_dat, | 2022-08-18 05:23:02 | {"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.20658405125141144, "perplexity": 10741.579328739715}, "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-33/segments/1659882573163.7/warc/CC-MAIN-20220818033705-20220818063705-00667.warc.gz"} |
https://www.doubtnut.com/question-answer/tan1000-tan1250-tan1000tan1250-is-equal-to-0-b-1-2-c-1-d-1-642529651 | Home
>
English
>
Class 11
>
Maths
>
Chapter
>
Trigonometric Functions
>
tan100^0+tan125^0+tan100^0tan1...
# tan100^0+tan125^0+tan100^0tan125^0 is equal to 0 (b) 1/2 (c) -1 (d) 1
Updated On: 27-06-2022
UPLOAD PHOTO AND GET THE ANSWER NOW!
Answer
Step by step solution by experts to help you in doubt clearance & scoring excellent marks in exams.
Transcript
question is Tan 15 degree + tan 125 degree + 125 degrees equal to the number is 0.1 20 2011 alpha + beta is equal to tan alpha + tan theta by 1 minus beta let's put that Scott alphabet is equal 200 data is equal to 120 this value wear dress plus 125 equal to 110 125
125 let's all this and it becomes 25 that is equal to 125 125 is equal to that is equal to 10 + 10 125 by 1 - 125 cross multiply here we come 1 -100
25 equal 200 + 10 125 now this father and accounts 101 2525 equal to one end point number de
Comments
Add a public comment... | 2022-12-06 20:18:22 | {"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.43535614013671875, "perplexity": 1970.002168994517}, "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-2022-49/segments/1669446711114.3/warc/CC-MAIN-20221206192947-20221206222947-00245.warc.gz"} |
https://physics.stackexchange.com/questions/397096/euler-lagrange-equation-proving-maxwell-equation?noredirect=1 | Euler-Lagrange Equation Proving Maxwell Equation [duplicate]
When quantizing the EM Field, we get the Lagrangian density,
$$L=\frac{1}{2}\left(\epsilon \vert E\vert ^2 - \frac{1}{\mu}\vert B\vert^2\right) = \frac{\epsilon}{2}\vert\nabla\phi + \dot{\textbf{A}}\vert^2 - \frac{1}{2\mu}\vert\nabla\times\textbf{A}\vert^2$$
My professor said that the first Maxwell equation, $\nabla \cdot E = 0$, is proved by the Euler-Lagrange equation for the above $L$ w.r.t. $\phi$. I.e.
$$\frac{\partial}{\partial t}\left(\frac{\partial L}{\partial \dot{\phi}}\right) + \sum\limits_{i=1}^{3}\frac{\partial}{\partial x_i}\left(\frac{\partial L}{\partial(\partial\phi / \partial x_i)}\right) - \frac{\partial L}{\partial \phi} = 0 \implies \nabla\cdot E = \nabla^2\phi = 0$$
I don't get exactly that result. I assume the first and last term are 0, since no phi or phi-dot appears in $L$. Using $\phi_x$ as the derivative, I get for the middle term (i=1), \begin{align} \frac{\partial L}{\partial(\phi_x)} &= 2(\nabla\phi + \dot{\textbf{A}})\cdot\left[\frac{\partial}{\partial\phi_x} (\nabla\phi + \dot{\textbf{A}})\right] \\ &= 2\left(\langle\phi_x + \dot{A}_x,\phi_y + \dot{A}_y,\phi_z + \dot{A}_z\rangle\right)\cdot\left[\frac{\partial}{\partial(\phi_x)}\langle\phi_x + \dot{A}_x, \phi_y + \dot{A}_y, \phi_z + \dot{A}_z\rangle\right] \\ &= 2\left(\langle\phi_x + \dot{A}_x,\phi_y + \dot{A}_y,\phi_z + \dot{A}_z\rangle\right)\cdot\langle 1,0,0\rangle\\ &= 2(\phi_x + \dot{A}_x) \end{align} Therefore,
$$\frac{\partial}{\partial x}\frac{\partial L}{\partial(\phi_x)} = 2(\phi_{xx} + \dot{A}_{xx})$$
And then summing i=1 to 3 gives
$$2(\nabla^2\phi + \nabla^2 \dot{A}) = 0$$
So in order to prove the Maxwell equation, I need to show that $\nabla^2\dot{A} = 0$. How do I proceed to do that?
• You mistakenly took the first x-index of Axx as a derivative, while it is actually representing the x-component of the vector, and not an x-derivative, thus you can take the del operator as a "common factor" in your last equation and leaving the expression of the electric field in its right yielding Maxwell's first equation. – Panos C. Apr 1 '18 at 21:41
• @Panos C. Doh, I guess there's a reason that notation wasn't used in the first place. Thanks – HiddenBabel Apr 1 '18 at 21:52
• @HiddenBabel $,x$ as a subscript is a common notation for an $x$ derivative. – J.G. Apr 1 '18 at 22:03
Note that $$\sum\limits_{i=1}^{3}\frac{\partial}{\partial x_i}\left[\frac{\partial L}{\partial(\partial\phi / \partial x_i)}\right]=\mathrm{div}\left[\frac{\partial L}{\partial(\mathrm{grad}\phi)}\right]=\boldsymbol{\nabla}\boldsymbol{\cdot}\left[\frac{\partial L}{\partial(\boldsymbol{\nabla}\phi)}\right] \tag{01}$$ and $$\frac{\partial L}{\partial(\boldsymbol{\nabla}\phi)}=\text{??? vector} \tag{02}$$ | 2020-09-19 22:26:30 | {"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": 1, "equation": 2, "x-ck12": 0, "texerror": 0, "math_score": 0.9999127388000488, "perplexity": 1176.6709437718137}, "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/1600400192887.19/warc/CC-MAIN-20200919204805-20200919234805-00041.warc.gz"} |
https://ww2.mathworks.cn/help/signal/ref/db.html | # db
Convert energy or power measurements to decibels
## Description
dboutput = db(x) converts the elements of x to decibels (dB). This syntax assumes that x contains voltage measurements across a resistance of 1 Ω.
dboutput = db(x,SignalType) specifies the signal type represented by the elements of x as either 'voltage' or 'power'.
example
dboutput = db(x,R) specifies the resistance, R, for voltage measurements.
dboutput = db(x,'voltage',R) is equivalent to db(x,R).
## Examples
collapse all
Express a unit voltage in decibels. Assume that the resistance is 2 ohms. Compare the answer to the definition, $10{\mathrm{log}}_{10}\frac{1}{2}$.
V = 1;
R = 2;
dboutput = db(V,2);
compvoltage = [dboutput 10*log10(1/2)]
compvoltage = 1×2
-3.0103 -3.0103
Convert a vector of power measurements to decibels. Compare the answer to the result of using the definition.
rng default
X = abs(rand(10,1));
dboutput = db(X,'power');
comppower = [dboutput 10*log10(X)]
comppower = 10×2
-0.8899 -0.8899
-0.4297 -0.4297
-8.9624 -8.9624
-0.3935 -0.3935
-1.9904 -1.9904
-10.1082 -10.1082
-5.5518 -5.5518
-2.6211 -2.6211
-0.1886 -0.1886
-0.1552 -0.1552
## Input Arguments
collapse all
Signal measurements, specified as a scalar, vector, matrix, or N-D array.
Data Types: single | double
Complex Number Support: Yes
Type of signal measurements, specified as either 'voltage' or 'power'. If you specify SignalType as 'power', then all elements of x must be nonnegative.
Resistive load, specified as a positive scalar expressed in ohms. This argument is ignored if you specify SignalType as 'power'.
Data Types: single | double
## Output Arguments
collapse all
Energy or power measurements in decibels, returned as an array with the same dimensions as x.
• If x contains voltage measurements, then dboutput is $10\text{ }\text{\hspace{0.17em}}{\mathrm{log}}_{10}\left({|x|}^{2}/R\right).$
• If the input x contains power measurements, then dboutput is $10\text{\hspace{0.17em}}{\mathrm{log}}_{10}x.$
## Version History
Introduced in R2011b | 2022-10-05 08:35:48 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 3, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.8921294808387756, "perplexity": 12078.755985419928}, "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-2022-40/segments/1664030337595.1/warc/CC-MAIN-20221005073953-20221005103953-00322.warc.gz"} |
https://www.physicsforums.com/threads/area-of-a-segment-of-a-circle-when-only-the-radius-is-known.480090/ | Area of a Segment of a Circle, when only the radius is known.
A circle has Centre 0 and radius 2. A, B and C are points on the circumference of a circle such that AB is the perpindicular bisector of 0C.
Find the area of the segment of the circle bounded by the line segment AB and the minor arc ACB.
Give the area in exact forms in terms of surds and pi.
I have uploaded the circle diagram as well.
I understand how to find the area of a segment of a circle when I know the angle and radius, but am unsure when I only know the radius. Any help will be greatly appreciated!
Cheers
Attachments
• 129.5 KB Views: 152
Related Calculus and Beyond Homework Help News on Phys.org
Well show me how you would do it if you knew the angle
I would use the formula:
A = $$\Pi$$r2$$\theta$$/360 - 0.5r2sin$$\theta$$
cheers
tiny-tim
Homework Helper
hi malam1990!
(have a theta: θ )
A circle has Centre 0 and radius 2. A, B and C are points on the circumference of a circle such that AB is the perpindicular bisector of 0C.
I understand how to find the area of a segment of a circle when I know the angle and radius, but am unsure when I only know the radius.
but you do know the angle …
you know the lengths of two sides of triangle AOD (where D bisects AB)
SammyS
Staff Emeritus
Homework Helper
Gold Member
OC, OA, and OB are all radii of the circle, right?
hi malam1990!
(have a theta: θ )
but you do know the angle …
you know the lengths of two sides of triangle AOD (where D bisects AB)
Hi, thanks for the help, but I'm still not sure how I get to know the angle, the answer is probably really obvious but unfortunately I am just not seeing it. So far I have θ as 90 degress but am unsure whether this is correct.
Cheers for the help again! it is much appreciated!
OC, OA, and OB are all radii of the circle, right?
yes they are.
cheers for any help.
tiny-tim
Homework Helper
hi malam1990!
you know the lengths of two sides of triangle AOD (where D bisects AB)
Hi, thanks for the help, but I'm still not sure how I get to know the angle …
what are the lengths of two sides of triangle AOD ?
hi malam1990!
what are the lengths of two sides of triangle AOD ?
well I know OA is 2 as it is the radius, but I am still unsure how I would get to know either OD or DA?
cheers
tiny-tim
Homework Helper
but you know that D is the bisector of OC
but you know that D is the bisector of OC
I'm really sorry but I'm still not getting it, I cant see how it helps me know definately the length of one of the other sides of the traingle AOD.
SammyS
Staff Emeritus
Homework Helper
Gold Member
OC, OA, and OB are all radii of the circle, right?
Therefore, AB bisects OC.
That should let you find the angle!
Would I be correct in thinking that OD would be 1 and AD being $$\sqrt{}3$$ ???
which would then give me 60deg for the angle AOD? and 120 deg for the angle of the whole sector AOB?
tiny-tim | 2020-10-31 20:29:49 | {"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.7044922709465027, "perplexity": 421.74317837015354}, "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-45/segments/1603107922411.94/warc/CC-MAIN-20201031181658-20201031211658-00048.warc.gz"} |
https://jorge-a-mendez.github.io/publication/2021-lifelong-compositional-learning | # Lifelong Learning of Compositional Structures
International Conference on Learning Representations (ICLR), 2021
PDF Code Video
Abstract: A hallmark of human intelligence is the ability to construct self-contained chunks of knowledge and adequately reuse them in novel combinations for solving different yet structurally related problems. Learning such compositional structures has been a significant challenge for artificial systems, due to the combinatorial nature of the underlying search problem. To date, research into compositional learning has largely proceeded separately from work on lifelong or continual learning. We integrate these two lines of work to present a general-purpose framework for lifelong learning of compositional structures that can be used for solving a stream of related tasks. Our framework separates the learning process into two broad stages: learning how to best combine existing components in order to assimilate a novel problem, and learning how to adapt the set of existing components to accommodate the new problem. This separation explicitly handles the trade-off between the stability required to remember how to solve earlier tasks and the flexibility required to solve new tasks, as we show empirically in an extensive evaluation.
Recommended citation:
@inproceedings{mendez2021lifelong, title={Lifelong Learning of Compositional Structures}, author={Jorge A. Mendez and Eric Eaton}, booktitle={9th International Conference on Learning Representations (ICLR-21)}, year={2021} } | 2023-01-28 15:37:41 | {"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.3911633789539337, "perplexity": 1818.3426521630424}, "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-06/segments/1674764499646.23/warc/CC-MAIN-20230128153513-20230128183513-00569.warc.gz"} |
https://www.sparrho.com/item/type-i-singularities-in-the-curve-shortening-flow-associated-to-a-density/92182b/ | # Type I singularities in the curve shortening flow associated to a density
Research paper by Vicente Miquel, Francisco Viñado-Lereu
Indexed on: 28 Jul '16Published on: 28 Jul '16Published in: Mathematics - Differential Geometry
#### Abstract
We define Type I singularities for the mean curvature flow associated to a density $\psi$ ($\psi$MCF) and describe the blow-up at singular time of these singularities. Special attention is paid to the case where the singularity come from the part of the $\psi$-curvature due to the density. We describe a family of curves whose evolution under $\psi$MCF (in a Riemannian surface of non-negative curvature with a density which is singular at a geodesic of the surface) produces only type I singularities and study the limits of their blow-ups. | 2021-02-26 01:02: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": 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.5801681280136108, "perplexity": 798.5349052867266}, "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/1614178355944.41/warc/CC-MAIN-20210226001221-20210226031221-00635.warc.gz"} |
https://studydaddy.com/question/nedd-as-it-is-written-in-the-document | QUESTION
# Nedd as it is written in the document.
Nedd as it is written in the document.
Files: MBA503F - IWA1 Summer 2018 (2).pdf
• @
• 88 orders completed
Tutor has posted answer for $30.00. See answer's preview$30.00 | 2018-08-14 11:17:06 | {"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.2183782309293747, "perplexity": 11014.614434484016}, "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-34/segments/1534221209021.21/warc/CC-MAIN-20180814101420-20180814121420-00147.warc.gz"} |
https://hpdung.wordpress.com/category/learning/real-analytic-geometry/ | Classical Lojasiewicz inequalities
Let ${f : \mathbb{R}^n \rightarrow \mathbb{R}}$ be a real analytic function with ${f(0) = 0}$. Let ${V := \{x \in \mathbb{R}^n | f(x) = 0\}}$ and ${K}$ be a compact subset in ${\mathbb{R}^n}$. Then the (classical) \L ojasiewicz inequality asserts that:
• There exist ${c > 0, \alpha > 0}$ such that
$\displaystyle |f(x)| \ge cd(x, V)^\alpha\quad \text{for}\ x \in K.\ \ \ \ \ (1)$
\noindent Let ${f : \mathbb{R}^n \rightarrow \mathbb{R}}$ be a real analytic function with ${f(0) = 0}$ and ${\nabla f(0) = 0}$. The \L ojasiewicz gradient inequality asserts that:
• There exist ${C > 0, \rho \in [0, 1)}$ and a neighbourhood ${U}$ of ${0}$ such that
$\displaystyle \|\nabla f(x)\| \ge C|f(x)|^\rho\quad \text{for}\ x \in U.\ \ \ \ \ (2)$
As a consequence, in (1), the order of zero of an analytic function is finite, and if ${f (x)}$ is close to ${0}$ then ${x}$ is close to the zero set of ${f}$. However, if ${K}$ is not compact, the latter is not always true and the inequality (1) does not always hold. The inequality (2) is similar to (1), it is not true in the case of $K$ is non-compact.
Two inequalities (1) and (2) have some special cases. For example, in the inequality (1), if ${f}$ has only isolated zero, i.e. ${V = f^{-1}(0) = \{(0, 0, \dots, 0)\}}$, this implies ${d(x, V) = \|x\|}$. Hence, we have
$\displaystyle |f(x)| \ge C\|x\|^\alpha, \text{for}\ x\in K.$
On the other hand, being different from (2), we have another inequality:
$\displaystyle \|\nabla f(x)\| \ge c\|x\|^\beta, \text{for}\ x \in U.$
There are some relations between ${\alpha, \beta}$ and ${\rho}$ in complex case and real cases…
Curve selection lemma
There are many versions of the curve selection lemma.
In o-minimal structures, we have to consider definable curves, definable functions, deinable sets,… The definition of definable sets,… we can find in many documents.
Let $fr(A)$ be frontier of $A$, ie $fr(A) = \bar{A} - A$. We have:
Curve selection lemma: In the o-minimal structure $\mathcal{O}$. If $x \in fr(A)$, then there is a definable map $\gamma: [0, 1) \to \mathbb{R}^n$ such that $\gamma(0,1) \subset A$ and $\gamma(0) = x$.
Puiseux series
In this note, we discuss about Puiseux series and its appearance when we solve the equation $f(x,y) = 0$. We refer to the book “Algebraic curves” of R.Walker.
Puiseux series are fractional power series:
$\bar{a}(x)= a_1x^{\frac{m_1}{n_1}}+a_2x^{\frac{m_2}{n_2}}+ \dots$ where $a_i \ne 0, m_1/n_1 < m_2/n_2 < \dots$.
Order of series: $O(\bar{a}(x)) = m_1/n_1$.
Theorem. $K(x)^*$ is algebraically closed.
($K(x)^*$ – the fieldof fractional power series).
By the proof of this theorem, we can see that $f(x,y) = 0$ (an algebraic curve), we can solve $\bar{y}(x)$ (Puiseux series) such that $f(x, \bar{y}) = 0$.
Nullstellensatz in the real case
In alegebraic geometry, we have Hilbert Nullstellensatz and in real algebraic geometry we have Real Nullstelllensatz. There is a difference between these theorems.
Strong Hilbert Nullstellensatz: $I(V_{\mathbb{C}}(I)) = \sqrt{I}$.
If polynomial $f$ is vanish on the set $\begin{cases}f_1 &= 0 \\ &\dots \\ f_k &= 0\end{cases}$ (in $\mathbb{C}^n$) then $f$ has the following form:
$f \in\sqrt{I}$, that is: $\exists m \in \mathbb{N}: f^m = g_1f_1 + \dots + g_kf_k$ với $g_j \in \mathbb{R}[X_1, \dots,X_n]$.
In the case of $\mathbb{R}^n$
Real Nullstellensatz: $I(V_{\mathbb{R}}(I)) = \sqrt[\mathbb{R}]{I}$.
$V_{\mathbb{C}}(I) \cap \mathbb{R}^n = V_{\mathbb{R}}(I)$:
$f^{2s} \in -(\sum \mathbb{R}[X]^2 + I)$ or $f^{2s} + \sum_{j =1}^m p_j^2 = h_1f_1 + \dots + h_kf_k$. | 2017-10-19 07:08:35 | {"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": 57, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.9522960782051086, "perplexity": 273.8498050633205}, "config": {"markdown_headings": false, "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-2017-43/segments/1508187823255.12/warc/CC-MAIN-20171019065335-20171019085335-00269.warc.gz"} |
https://www.mapleprimes.com/users/sand15athome/replies | ## 35 Reputation
4 years, 123 days
## Perfect,...
@acer I think I need to digest all this material and begin working by myself.
PS : examples/ProgrammaticContentGeneration does not seem to exist in Maple 2015 (I only have Maple 2015 at home) ... maybe you refer to Maple 2016 (2017) ?
If so it is not a problem : it will wait until next monday that I return to the office,
Have a good weekend
## Thanks you for all those elements ......
@acer ... they complete the previous ansver (rlopez) I recieved
The fact that "DocumentTools package can be used to programatically generate GUI Tables that are formatted like a report" is very important for me.
So it only remains for me to plunge into this package.
Concerning the sticking point you raised : LaTeX is not necessary if Maple provides something of a comparable visual rendering.
To say the truth I had begun to write "LaTeX within Maple" commands , for example (do not smile) :
MyText := "\\noindent
{\\bf Some Title}
":
fprintf(fd, "%s\n", Mytext).
It is technically possible but it is cetainly not a soft job !!!
I am sure your answer will prove to be of very great help
Thank you.
## Than you ......
@rlopez ... it's already a good place to start.
Concerning yout answer : I use to use the worksheet mode (I had a few setbacks with the document mode).
By the way : I omitted to say that I would like to draw up the document "programatically"
I was not sure DocumentTools is the good package to use : your answer is precious.
Thank you again
## Thank you Jofn...
@John May
(PS : I asked the question from my office but I reply from home, so the difference in the connection names)
First answer : so simple, how could I not think of trying it ???
Second answer: Very astute : I had thought to use Optimization:-Maximise but I was stuck by the expression of the objective function to use. I will try it as soon as I am at my office.
Thanks for the advices, have a good day
## Thanks a lot...
@gkokovidis
(PS : I asked the question from my office but I reply from home, so the difference in the connection names)
## I understand but ......
Here is my argument (maybe I'm mistaken ?)
The convolution product C(x) = int(f(u)*g(x-u), u=x - a..x + a) (a = k*sigma for some k > 0) can be re-written as
C(x) = - int(f(x-u)*g(u), u = a .. -a).
What matters here is g(u) = Cste * exp(-0.5*(u/sigma)^2) (f(.) is of order 1)
Furthermore the integration range is [-k*sigma, k*sigma] and thus g(u) always keeps values in [Cste*exp(-0.5*k^2) , Cste], regardless the value of sigma.
So I do not think a small sigma implies a large value of Digits.
I suspect the value of k should be critical (probably some simulations could proove on infirm this inference).
Nevertheless gkokovidis, ace and you are right : the value of Digits can help giving the "right" plot, just as your "convert-to-Heaviside" proposal does to.
But I think that the very reason of the poor results I obtained still remains to be found ... but is is another question for another time.
I express my sincere thanks to all of you for the time that you have taken
## I'll do what you say ......
@vv ... doing some comparison and check performances.
Not that I don't trust you !
But because using this convert-to-Heaviside trick could have some interest in the app I'm currently developping
Thanks for the suggestion
## Actually this does work well .......
@vv ... which puzzles me because gkokovidis and especially acer had already given me a satisfactory, although (a priori) completely different explanation .
By the way, why do you say that f*g is expressed with the Direc "function" ?
I simply defined f*g := x -> int(f(x-u)*g(u), u=...)
Thank you acer
## I understand ......
@acer this completes the workaround gkokovidis has just sent me.
## So simple that I hadn't even thought to ...
@gkokovidis
Great thanks to you.
## It works perfectly well....
@acer
There is just a minor difference between you and me as shows the screen capture below : the eval(F) command
returns the content of procedure F.
But all the rest suits me perfectly well.
## Bug or not bug ?...
@vv , I am sand15 (now from home)
I understand your argument but disagree with it.
n! is the factorial function, defined for all strictly positive integers, while Gamma(x) is another function buid as an extension, to the complex plane, of the factorial function.
The quantities Prob(X=n | X ~Geometric(p)) make sense only for n >= 0 : unlike the Gamma function there is no extension to the real field. So the command
ProbabilityFunction(Geometric(1/3), 5.1);
should return 0 from a pure mathematical point view.
Although correct, is it sufficient ?
I would prefer Maple returns 0 plus a warning to highlight that "n = 5.1" is an impossible event
Lets take the example of tossing a fair die : what do you think of a student who would answer a non null value when asked to the probability of getting Pi ?
Probably that he/she does not really understand the concept of random variable ?
I think the same thing with regard to " ProbabilityFunction(Geometric(1/3), 5.1) = 0.4215152817e-1 " ... no offense intended
(let us remark that Maple 2015.2 returns 1/6 when asked for ProbabilityFunction(DiscreteUniform(1, 6), Pi) , which is even more stupid))
When I say that discrete distributions are not correctly implemented in Maple, I do not say that all is wrong but that it is not satisfactory.
I think that many of the problems Markyian refers to, come from a mathematically incorrect specification of the Probability (Mass) Function for discrete random variable.
Truth is : if you are aware of this problem and have some basics in probability theory you can say "Oh, it is just a default I can live with" ; but the position "it is absolutely unforgivable" is equally admissible
A few years ago I was developping an algorithm for constructing optimized design of experiments. At some point the algorithm requires to ramdomly select one column of a matrix. If all colums are equally likely, a simple way to do this is randperm(...)[1] ; another way is Sample(DiscreteUniform(..), 1)[1] (which is conceptually more satisfactory)
The former method works well, not the later because Sample(DiscreteUniform(..), 1)[1] returns a real, not an integer (as expected) and the column selection thus fails.
More generally, getting reals when you expect integers may be very annoying.
Best regards
## No solution, just a trick...
When I'm at the office I use Maple 2015 on a Windows 7 PC ; always in worksheet mode with classical Maple input (too more problems with the document mode).
The error you mentionned reminds me an arror I often encounter when I copy 2D code from Maplet help pages to a worksheet session : when I copy more than a single block of instructions, the result appears in 2D mode on my worksheet and the execution generates an error of the kind you obtain.
"My" solution : try to copy block by block (in yout example 3 blocks (1) : with(..) ; (2) maplet := ... ; (3) result := ...) and be sure that the result is in Maple input mode, not 2D mode.
For me it works ... no guarantee it will do the same for you
## You're spot-on...
I apologize for the images, it appears simpler to copy manually the error message
But you're right, the first error si the one you mention
The second one is
invalid input: indices received fResultTable["/Users/..../Desktop/OriginalFile.mw"], wich is not valid for its 1st argument t
## Beautiful...
@Christian Wolinski
Wolinski never die :-)
1 2 3 Page 1 of 3
| 2020-10-31 01:30:35 | {"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.7633745074272156, "perplexity": 2095.2692405018392}, "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-45/segments/1603107912593.62/warc/CC-MAIN-20201031002758-20201031032758-00228.warc.gz"} |
https://tex.stackexchange.com/questions/453139/problems-with-ligature-and-libertine-font/459498#459498 | # Problems with ligature and libertine font -
I cannot post a comment under my previous question so (i fixed some files because i misunderstood somethings, but there is a problème with tt => fl in sffamily not smallcaps and it seems it cannot do sffamily regular
why do pdflatex have thoses ligatures but they do not work in tex4ebook (lualatex ?)
\documentclass[10pt,a5paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm]{geometry}
\usepackage{libertine}
\newcommand{\testfont}[1]{
rmfamily\\
{\rmfamily #1\\{\scshape #1}\\\\
\textbf{#1\\{\scshape #1}}\\\\
\textit{#1\\{\scshape #1}}\\}
sffamily\\
{\sffamily #1\\{\scshape #1}\\\\
\textbf{#1\\{\scshape #1}}\\\\
\textit{#1\\{\scshape #1}}\\}
}
\begin{document}
\testfont{ff fli ffi ffr tt th qu FF FLI FFI TT TH}
\end{document}
tex4ebook result
pdflatex result
Problems with ligatures
• Please clarify what the issue is. Which ligatures are missing? Do note that the Biolinum sans-serif font (which is loaded by the libertine package) contains fewer f-ligatures than does the Libertine serif font.
– Mico
Sep 30 '18 at 6:47
• 1 - tt becomes fl in sffamily not smallcaps 2 - there is not ssfamily medium font The problem is that it gives wrong ligature, 'cette' => 'cfle' in sffamily Sep 30 '18 at 12:02
• I'm afraid I'm unfamiliar with tex4ebook, even though I'm quite familiar with LuaLaTeX. A thought: Have you tried replacing the instruction \usepackage{libertine} with (a) loading the fontspec package and (b) executing \setmainfont{Linux Libertine O} and \setsansfont{Linux Biolinum O (with suitably chosen options, as needed)?
– Mico
Sep 30 '18 at 13:35
• @Mico the problem is that tex4ht (which tex4ebook uses in the background) uses special files for translation between characters in the tfm file and Unicode. They also contain information about font style, weight, name, etc. These files must be created for each font and the files for Linux Libertine contain wrong mappings between certain ligatures and the output text. Sep 30 '18 at 14:10
• @Mico I don't think Libertine mappings are wrong, they just use some non-usual ligatures that are not present in the T1 fontenc, so wrong are tex4ht support files, which assume that they are in T1. Sep 30 '18 at 16:39
This is result of wrong support files for Libertine fonts in tex4ht. Each used font needs special file with mapping of the character codes in the DVI file to Unicode. The mappings for fonts used in your document expects the standard T1 font encoding, but Libertine fonts use some additional ligatures, so some characters are mapped incorrectly.
The process of creation of the mapping files is quite difficult and error prone. I am working on a tool called Htfgen which can in ideal cases generate the mapping files automatically. It contain lot of scripts and libraries, the most interesting one is called dvitohtf. It can either parse dvi file for the missing map (htf) files, or read list of fonts from the standard input. It then outputs TeX file, which then writes htf files when processed with plain TeX.
This is the TeX file created by this script for all fonts used in your document: mylibertine.tex. I had to put it to a gist, because it is larger than Stackexchange allows in the posts.
Compile it using
tex mylibertine.tex
It should write all necessary HTF file.
Result: | 2022-01-28 17:54:19 | {"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.8973675966262817, "perplexity": 7208.1163189151375}, "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/1642320306301.52/warc/CC-MAIN-20220128152530-20220128182530-00300.warc.gz"} |
http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?reload=true&punumber=5293616 | By Topic
# Electrical Engineers - Part I: General, Journal of the Institution of
The Journal of the Institution of Electrical Engineers - Part I: General was published by the IET between 1941 and 1948.
Aims & Scope
## Latest Published Articles
• ### Experiments on the electric strength of air at centimetre wavelengths
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
• ### The teaching of the principles of electrical machine design
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
• ### The author's reply to the discussion on 'The electric spark in air'
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
• ### The hermetic sealing of transformers and chokes used in communication equipment
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
• ### The electron in research
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
View All Latest Articles
## Popular Articles
• ### Theory of communication
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
• ### The theoretical precision with which an arbitrary radiation-pattern may be obtained from a source of finite size
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
• ### The Causes and Characteristics of Transformer Noise
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
• ### The electrical properties of salt-water solutions over the frequency range 1–4000 Mc/s
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
• ### Magnetic materials. A review of progress
Tue Jan 26 00:00:00 EST 2010 Tue Jan 26 00:00:00 EST 2010
View All Popular Papers | 2017-07-28 11:25:29 | {"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.8778242468833923, "perplexity": 7632.368287634922}, "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/1500549448198.69/warc/CC-MAIN-20170728103510-20170728123510-00470.warc.gz"} |
https://lavelle.chem.ucla.edu/forum/viewtopic.php?t=30950 | ## Wavelike Properties [ENDORSED]
$\lambda=\frac{h}{p}$
Gisselle Sainz 2F
Posts: 76
Joined: Wed Feb 21, 2018 3:00 am
### Wavelike Properties
This may seem like an odd question, but why exactly don't macroscopic objects have wavelike properties? What is it about microscopic particles that enables them to have this distinct quality?
404975170
Posts: 68
Joined: Thu Jul 27, 2017 3:00 am
### Re: Wavelike Properties
If you were to look for the de Brogolie wavelength of a macroscopic object it would be tiny since in this equation h, Planck's constant is already very small and then then macroscopic object's mass which would be m is way bigger than the mass of particles that de Brogolie's equation usually deals with. So properties like diffraction and quantum tunnelling are not visible at the macroscopic level but are at the microscopic. | 2020-02-24 10:10: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": 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.45367172360420227, "perplexity": 1916.5209590528225}, "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-10/segments/1581875145910.53/warc/CC-MAIN-20200224071540-20200224101540-00501.warc.gz"} |
https://www.gradesaver.com/textbooks/math/algebra/college-algebra-10th-edition/chapter-1-section-1-2-quadratic-equations-1-2-assess-your-understanding-page-102/93 | ## College Algebra (10th Edition)
To analyze the problem, it helps to draw the triangle as described in the exercise (refer to the figure provided). We know that all sides of a right triangle are related through the Pythagorean Theorem: $a^{2} + b^{2} = c^{2}$ where $c$ represents the hypotenuse and $a,b$ represent the legs. If we were to substitute the values provided in the exercise into the Pythagorean Theorem, we would obtain the following equation: $$(2x-5)^{2} + (x+7)^{2} = (2x + 3)^{2}$$ which we can expand into: $$(4x^{2} - 20x + 25) + (x^{2} + 14x + 49) = (4x^{2} + 12x + 9)$$ Re-writing the equation so that it equals to zero results in the following: $$4x^{2} - 20x + 25 + x^{2} + 14x + 49 - 4x^{2} - 12x - 9 = 0$$$$x^{2} - 18x +65 = 0$$This equation can be solved by multiple methods. Factorizing is one of them, where we would be looking for two factors of 65 that, when added, give -18. These factors are -5 and -3. Therefore, we can factorize, and solve, the equation: $$x^{2} - 18x +65 = 0$$$$(x - 13)(x-5) = 0$$$$(x - 13) = 0$$$$x = 13$$$$(x - 5) = 0$$$$x = 5$$ We now have two possible values for $x$ which we can apply to the given dimension expressions. For $x = 5$: $$Hypotenuse = 2(5) + 3 = 13$$$$Leg1 = 2(5)-5 = 5$$$$Leg2 = (5) + 7 = 12$$ For $x = 13$: $$Hypotenuse = 2(13) + 3 = 29$$$$Leg1 = 2(13)-5 = 21$$$$Leg2 = (13)+7 = 20$$ | 2019-11-21 00:53: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": 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.8077674508094788, "perplexity": 214.55243320219932}, "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/1573496670643.58/warc/CC-MAIN-20191121000300-20191121024300-00130.warc.gz"} |
https://math.stackexchange.com/questions/2782529/is-the-maximum-rotation-by-multiplying-a-positive-definite-matrix-is-less-than-9 | # Is the maximum rotation by multiplying a positive definite matrix is less than 90 degrees?
To have intuition, I think of rotation of a vector $v$ in a two dimensional space. A vector can be rotated by multiplying the rotation matrix as $$R=\begin{bmatrix} cos\theta & -sin\theta \\ sin\theta & cos\theta \\ \end{bmatrix}$$ However, the rotation matrix is positive definite only or $-\frac{\pi}{2}\leq \theta \leq \frac{\pi}{2}$.
So, if we impose the positive definiteness onto the rotation matrix, it just can rotate the vector at most 90 degrees (clockwise or counterclockwise).
Now, since every matrix multiplication has its rotational effect, can we conclude that the maximum rotation by multiplying a positive definite matrix is less than 90 degrees?
• Aren't positive definite matrices usually assumed to be symmetric? So in general a rotation matrix would not qualify. In any case, one key property of a positive definite matrix is that it has real, positive eigenvalues. Rotation matrices don't have that property. – Bungo May 15 '18 at 17:36
• Thank you. However, can we compare the maximum rotation of a vector which is multiplied by a positive definite matrix? – Saeed May 15 '18 at 18:52
• @Bungo If the field is complex then positive definite implies symmetric; but in case of the real field, positive definite need not mean symmetric. – piyush_sao Jan 4 at 4:25
Yes. Suppose A is a 2x2 positive definite matrix. Then for any non-zero x, $$x' A x > 0$$. But $$x' A x = |x| |Ax| cos(\theta)$$, for $$\theta$$ the angle between x and Ax, from which we see that $$cos(\theta) > 0$$ and thus $$\theta$$ must be between $$-\pi/2$$ and $$\pi/2$$. | 2019-12-08 11:16: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": 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": 7, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8853817582130432, "perplexity": 231.21244210192455}, "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/1575540508599.52/warc/CC-MAIN-20191208095535-20191208123535-00462.warc.gz"} |
https://www.physicsforums.com/threads/real-roots-criterion.177919/ | # Real roots criterion
1. Jul 23, 2007
### Klaus_Hoffmann
given a Polynomial or a trigonometric Polynomial
$$K(z)= \sum_{n=0}^{N}a_{n}x^{n}$$ and
$$H(x)= \sum_{n=0}^{N}b_{n}e^{inx}$$
is there a criterion to decide or to see if K(z) or H(x) have ONLY real roots
2. Jul 23, 2007
### mathman
For the ordinary polynomial there is a procedure involving generating a Sturm sequence (gets messy for large N) which can be used to determine the number of real roots greater than a given value of x. To get what you want, use a sufficiently large negative x, i.e. look at the highest order term in each of the polynomials in the sequence (there will be N+1). | 2018-02-18 19:12: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": 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.748691201210022, "perplexity": 555.6664144075824}, "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-2018-09/segments/1518891812247.50/warc/CC-MAIN-20180218173208-20180218193208-00471.warc.gz"} |
http://math.stackexchange.com/questions/338578/extension-of-a-finite-group | # Extension of a finite group
I am working on extension of finite groups. Let $G$ be a finite group with trivial center such that it has a normal subgroup $N$ with odd order and $G/N=L_{2}(p)$ ($p$ is prime). I am looking for an example of group $G$. Please let me know if you know an example of this type of group. Thanks.
-
What is $L_2(p)$? – Mariano Suárez-Alvarez Mar 23 '13 at 7:40
@MarianoSuárez-Alvarez: $L_{2}(p)$ is projective linear group. – Yakov Mar 23 '13 at 7:41
Please add that information in the question itself, so that people do no need to read all comments to find it. – Mariano Suárez-Alvarez Mar 23 '13 at 8:00
You must have some extra condition, such as $N \le G'$, otherwise the direct product of a centreless group of odd order by $\operatorname{PSL}(2, p)$ will do.
If it's a particular example you're looking for, consider $H = \operatorname{PSL}(2,2) \cong S_{3} = \langle s, t \rangle$, where $s$ has order $3$ and $t$ has order $2$.
Consider the action on $G$ on a vector space $N = \Bbb{Z}_{7}^{2}$, where $$s \mapsto \begin{bmatrix}2&0\\0&4 \end{bmatrix}, \qquad t \mapsto \begin{bmatrix}0&1\\1&0 \end{bmatrix}.$$ (Note that $2$ is a primitive $3$-rd root of unity in $\Bbb{Z}_{7}$.)
Then $G = N \rtimes H$ will do. In fact $H$ clearly acts irreducibly on $N$, so the centre of $G$ is trivial. Here $N \le G'$.
-
How about $\text{PSL}(2,5)\cong A_5$? Consider the group $\mathbb{Z}_3^5\rtimes A_5$.
-
You mean that $A_5$ acts by permuting the base elements of $\Bbb{Z}_{3}^{5}$? Then the sum of the base elements is in the centre. However, if you factor out the group generated by that sum, you should get a centreless group as desired. – Andreas Caranti Mar 23 '13 at 8:13
@AndreasCaranti, thank you for your reminder! – Easy Mar 23 '13 at 9:53
You're welcome! – Andreas Caranti Mar 23 '13 at 9:54 | 2016-02-13 13:00:50 | {"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.8398828506469727, "perplexity": 244.54026497850748}, "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-07/segments/1454701166650.78/warc/CC-MAIN-20160205193926-00215-ip-10-236-182-209.ec2.internal.warc.gz"} |
http://www.chegg.com/homework-help/questions-and-answers/you-shine-a-laser-on-a-pair-of-closely-spaced-slits-by-turning-a-knob-you-can-change-the-s-q3606468 | ## You change the spacing of the slits so that the bright fringe moves to the position initially occupied by the bright fringe. What is the new spacing of the slits?
You shine a laser on a pair of closely spaced slits. By turning a knob, you can change the spacing of the slits. (The wavelength of the laser light remains constant.) Initially, the slits are 0.300 mm apart. You change the spacing of the slits so that the m=2 bright fringe moves to the position initially occupied by the m=3 bright fringe. What is the new spacing of the slits?
• Two slit interference Advanced Physics discussion. ... question says there are a pair of closely spaced slits (0.300mm apart). ... By turning the knob, you can change the spacing of the slits. (The wavelength of the laser light remains constant.) ... You change the spacing of the slits so that the m=2 bright fringe ...
• ym=R(mλ/d)
• ym=R(m?/d)
so,
y3=3R?/d1
y2=2R?/d2
dividing
y3/y2 = 3d2/2d1
since y3 =y2
3d2=2d1
d2 = 2 x 0.3/3
d2 =0.2mm
Get homework help | 2013-05-19 01:17:53 | {"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.8040058016777039, "perplexity": 1269.2756594926996}, "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/1368696383081/warc/CC-MAIN-20130516092623-00064-ip-10-60-113-184.ec2.internal.warc.gz"} |
https://neurips.cc/Conferences/2021/ScheduleMultitrack?event=28183 | Timezone: »
Poster
On Margin-Based Cluster Recovery with Oracle Queries
Marco Bressan · Nicolò Cesa-Bianchi · Silvio Lattanzi · Andrea Paudice
Tue Dec 07 08:30 AM -- 10:00 AM (PST) @
We study an active cluster recovery problem where, given a set of $n$ points and an oracle answering queries like are these two points in the same cluster?'', the task is to recover exactly all clusters using as few queries as possible. We begin by introducing a simple but general notion of margin between clusters that captures, as special cases, the margins used in previous works, the classic SVM margin, and standard notions of stability for center-based clusterings. Under our margin assumptions we design algorithms that, in a variety of settings, recover all clusters exactly using only $O(\log n)$ queries. For $\mathbb{R}^m$, we give an algorithm that recovers \emph{arbitrary} convex clusters, in polynomial time, and with a number of queries that is lower than the best existing algorithm by $\Theta(m^m)$ factors. For general pseudometric spaces, where clusters might not be convex or might not have any notion of shape, we give an algorithm that achieves the $O(\log n)$ query bound, and is provably near-optimal as a function of the packing number of the space. Finally, for clusterings realized by binary concept classes, we give a combinatorial characterization of recoverability with $O(\log n)$ queries, and we show that, for many concept classes in $\mathbb{R}^m$, this characterization is equivalent to our margin condition. Our results show a deep connection between cluster margins and active cluster recoverability. | 2023-02-09 02:09:56 | {"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.7353663444519043, "perplexity": 877.084824492123}, "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-06/segments/1674764501066.53/warc/CC-MAIN-20230209014102-20230209044102-00270.warc.gz"} |
https://www.nature.com/articles/s41598-017-02176-3?error=cookies_not_supported&code=0d81983c-ae7e-430f-8eee-13c6351ee333 | ## Introduction
Composite dielectric materials with temperature stable relative dielectric permittivity, low dielectric loss, high thermal conductivity, and good mechanical properties are of technological interest for applications in microelectronic packaging, electromagnetic shielding, waveguides, antenna and other communication elements1,2,3. Recent progress in manufacturing techniques, including additive manufacturing and 3D printing, allows the fabrication of composite dielectric materials for novel electromagnetic applications with spatially-varying dielectric and/or magnetic properties4,5,6. These intentionally heterogeneous composite materials allow for unusual manipulation of microwaves such as flat lenses, highly directional antennas, cloaks, etc. However, where such heterogeneous functionality is required in the material and component design, there is also a need to verify the as-manufactured spatial distribution of electromagnetic materials properties in order to ensure conformance with the design, and to help the interpretation of the arising electromagnetic behaviour of the final device. Usually the control of the local dielectric properties of the composite material is achieved during the sequential or layer-by-layer manufacture of the component by controlling the local weight or volume fraction of a high relative permittivity within the composite material. Thus, a method for assessing the local electromagnetic properties in the functional composites must provide a spatial and dielectric permittivity resolution that is consistent with the intended design and the resolution of the manufacturing process.
The spatial distribution of the effective dielectric permittivity of composite materials is investigated most commonly using 2D dielectric broadband probe techniques operating at radio and microwave frequencies, based on an open-ended coaxial line reflection method7, 8. For example, this method is widely applied for in vivo measurements of permittivity in biological tissues for medical imaging and diagnostics9, 10. The complex permittivity of the material is extracted from the reflection coefficient using an equivalent circuit of an open-ended coaxial line of the probe in contact with the flat surface of the sample. The typical resolution of this method is related to the physical dimensions of the probe, and typically lies in the range from a few millimetres to a few centimetres.
Microscopy-based techniques have been developed for the mapping of surface dielectric properties with high spatial resolution, typically in the micrometer to sub-micrometer range11. The basic principle of these near-field scanning microwave microscopy techniques relates to the perturbation of the resonance of a cavity coupled to a probe tip. The probe is a sharpened metal tip mounted in the centre conductor of a coaxial resonator that extends beyond an aperture formed in the end wall of the resonator12,13,14. The dielectric properties of the materials can be deduced from the variation of the cavity resonance. A micro-strip line resonator probe has also been proposed to increase the resolution of the microscope, which allows the use of different substrate dielectric constants and thicknesses, tapering angles, various apertures, and feed line-to-resonator coupling15, giving a spatial resolution as fine as 0.4 μm16.
Microwave microscopy may also make use of a narrow resonant slot in a rectangular hollow waveguide serving as a near-field source17, 18, and has been used for contactless mapping of the resistivity and the dielectric permittivity of surfaces. The spatial resolution of the slot-type microscope is determined by the slot width, and is generally lower than 100 μm. The spectrum-image method has been used for the 2D mapping of dielectric permittivity, and is based on scanning an electron beam across a sample and obtaining the spatially resolved energy-loss spectroscopy spectrum19, 20. Using the Kramers-Kronig relationship, the dielectric permittivity over a broad frequency spectrum may then be deduced from the reconstructed scattering spectra.
Surface dielectric permittivity mapping techniques have been developed based on scanning force microscopy (SFM), with very high spatial resolution. In SFM, the amplitude of the second harmonic of electromechanical vibrations of the tip reflects both electrostriction and capacitance of the system and is, therefore dependent on the dielectric constant of the material. For example, the low-frequency dielectric permittivity of a thin film of SiO2 was obtained by measuring the capacitance between the scanning tip and the sample using a capacitance sensor21. This principle was also used for imaging variations in the dielectric constant in several piezoelectrics and ferroelectrics22, 23 and for monitoring dielectric relaxation in a glassy polymer polyvinyl acetate24. For measurements at higher frequencies, the SFM was interfaced with a vector network analyser, and used for quantitative measurements of electrical properties in nanoscale samples, by converting the reflection coefficient S 11 into complex impedance data from which the dielectric permittivity at GHz frequencies could be retrieved25, 26.
Despite the relative convenience and maturity of microscopy methods, they are generally not easily used for mapping spatially varying dielectric properties over the large areas (often cms × cms) associated with fabrication materials and devices for operation in the MHz and GHz frequency range. On the other hand, open-ended coaxial line reflection techniques are able to scan large areas, but suffer from a relatively low resolution, limited by the probe sensing area, which is typically no better than a few millimetres. A solution to span the critical millimetre to sub-millimetre spatial range has been proposed using a tapered probe design for a coaxial cavity sensor27, or using an electromagnetic sensor based on two coupled spiral inductors to measure, for example, barely-visible impact damage in a carbon-fibre reinforced polymer composites2. This latter type of sensor, based on the measurement of the transmission coefficient S 21, provided an approximately 0.4 mm step resolution but only a qualitative 2D map of dielectric permittivity. Table 1 summarises the available dielectric surface imaging techniques in terms of their operating frequency, spatial resolution and other features.
This paper presents an alternative 2D surface scanning technique for fast, quantitative measurements of dielectric permittivity in the 1–3 GHz frequency range, over areas of many square centimetres while retaining sub-millimetre spatial resolution. The sensor element is based on a single split-ring resonator (SRR), where the variables of the geometry of the split in the ring provide flexibility in tuning the spatial resolution from 0.1 to 2 mm. We show qualitative and quantitative 2D imaging of the surface electromagnetic properties of large area heterogeneous composite materials produced by 3D printing and other techniques. A further novelty of the SRR probe approach is that, due to the out-of-plane orientation of the excitation electric field across the slit in the resonating ring, the probe is sensitive to anisotropy in the dielectric permittivity and thus can be also used to characterise birefringence of the materials.
## Results and Discussion
### The SRR probe
The SRR consisted of a Cu ring with outer radius r, width w, height h, with a gap width g (Fig. 1a). The probing of the surface dielectric permittivity using the SRR is based on the shift of the resonant frequency f 0 of the transmission signal S 21 passing from coupled transmitting and receiving magnetic loops, connected to a vector network analyser (VNA), in between which the SRR is mounted, as the SRR approaches and then rests with minimal load, just touching the surface.
Considering first the case of a SRR in free space, the SRR response is excited by a time-varying magnetic field parallel to the split ring axis, generated by the loop probe connected to VNA ports, and results from a resonant exchange of energy between the electrostatic fields in the capacitive gap and the inductive currents inside the split ring28, 29. Thus, the resonator system can be considered as a LC circuit composed of an effective inductance L and a capacitance C with magnetic resonance frequency:
$${f}_{0}={\mathrm{(2}\pi \sqrt{LC})}^{-1}.$$
(1)
When the ring is then brought into touching contact with a surface, the total capacitance C of the SRR arrangement is the sum of the gap capacitance C gap, the capacitance of the ring surface C ring, and the capacitance due to the material in tangential contact with the split ring C sample, so that:
$$C={C}_{{\rm{gap}}}+{C}_{{\rm{ring}}}+{C}_{{\rm{sample}}}.$$
(2)
Thus, materials with a different dielectric permittivity to air will cause a shift resonant frequency of the SRR. The magnetic inductance L and surface ring capacitance C ring of the SRR can be calculated according to ref. 30:
$$L={\mu }_{0}R(\mathrm{log}\,\frac{8R}{h+w}-\frac{1}{2}),$$
(3)
and
$${C}_{{\rm{ring}}}=2{\varepsilon }_{0}\frac{h+w}{\pi }\,\mathrm{log}\,\frac{4(r-h)}{g},$$
(4)
where μ 0 and ε 0 are the free-space permeability and permittivity and R = r − h/2 is the mean ring radius. The gap capacitance C gap is:
$${C}_{{\rm{gap}}}={\varepsilon }_{0}\frac{hw}{g}+{\varepsilon }_{0}(h+w+g),$$
(5)
where the first part of the right side of equation (5) is a parallel plate capacitance due to the air in the gap, and the second part is a correction due to fringing (C f) of the electric field at the ring edges31.
If the SRR is in contact with a surface (Fig. 1b) with relative dielectric permittivity ε r , the sample capacitance C sample can be obtained using a conformal transformation in analogy with co-planar strip lines32,33,34:
$${C}_{{\rm{sample}}}={\varepsilon }_{0}\frac{l}{2}[\frac{K({k}_{0}^{^{\prime} })}{K({k}_{0})}+{\varepsilon }_{r}\frac{K({k}_{1}^{^{\prime} })}{K({k}_{1})}],$$
(6)
where l is the length of the plates of the parallel plate capacitor with relative dielectric permittivity ε r , and K(k 0), $$K({k}_{0}^{^{\prime} })$$, K(k 1) and $$K({k}_{1}^{^{\prime} })$$ are the complete elliptic integrals of the first kind with $$k^{\prime} =\sqrt{1-{k}^{2}}$$. k 0 and k 1 are defined correspondingly as:
$${k}_{0}=\frac{g}{2{w}_{l}+g},$$
(7)
$${k}_{1}=\frac{\tanh (\pi g/4S)}{\tanh (\pi (2{w}_{l}+g)/4S)},$$
(8)
where S is the thickness of the dielectric substrate slab, and w l is the length of the SRR that is in contact with the dielectric sample surface (see Fig. 1b), which can be approximated as:
$${w}_{l}=\sqrt{{r}^{2}-{(\frac{h}{32})}^{2}}-\frac{g}{2}.$$
(9)
By combining Equations (1) to (9) an analytical expression for f 0 as a function of ε r and other variables can be obtained, which can be expressed as:
$${\varepsilon }_{r}(f)=A+B{f}_{0}^{-2},$$
(10)
where coefficients A and B characterise the geometry of the SRR.
### Numerical and experimental verification
Figure 2 shows the dependence of the resonant frequency f 0(ε r ) of the SRR probe as a function of the relative dielectric permittivity of a material in contact with the ring for four different geometry SRRs, calculated analytically from Equations (1)–(10). The geometrical parameters of each of the SRR probes are presented in Table 2. Figure 2 also shows both the measured and simulated results for f 0(ε r ) obtained for the same ring geometries. The experimental relative permittivities were obtained for the sets of different samples made of polymer-ceramic composites with different weight ratios to provide variations in the overall effective dielectric permittivity. The relative permittivity of each composite was independently obtained in bulk form using a split-post dielectric resonator operating at 15 GHz.
The analytical calculations of f 0(ε r ) were within 5% of experiment for SRRs 2 to 4. The numerically simulated resonant frequencies (filled circles in Fig. 2) were in close agreement with the analytical calculations for all the SRRs investigated. The largest discrepancy between experiment and prediction was 15.8% for SRR 1. The main experimental errors in the technique arise from the accuracy to which the geometry of the SRR may be measured and the flatness of the sample surface (and thus the area of contact). The particular reason why SRR 1 showed relatively poor experimental agreement with theory was not clear, but likely arose because of variable or imperfect contact of the SRR with the surface. Future implementations could use a load control mechanism to ensure consistent touching contact of the SRR with the surface.
Although the polymer-ceramic composites used in this work have a relatively small dispersion of dielectric permittivity in the 1–20 GHz frequency range5, deviation of the experimental data from theory may arise due to different measurement frequency. Recall that the reference dielectric permittivities (abscissa axis in Fig. 2) were obtained at 15 GHz, whereas the analysis and the measurements were performed in the vicinity of the lower resonant frequencies, in the range of 1–2.5 GHz. Although the Q-factor (Q = f 0f, where Δf is the −3 dB bandwidth of the S 21 response) of the S 21 resonance was in the range of 30–100 (depending on the particular SRR and material), uncertainties in resonant frequency were relatively small (estimated at ±0.1%) due to the high resolution of the VNA.
Figure 2 also shows the “corrected” analytical calculations of the resonant frequency by modifying the expression for strip line fringing capacitance C f in Equation 5 to an empirical35:
$${C}_{f}={\varepsilon }_{0}\frac{2\pi w}{\mathrm{log}(2.4w/h)},$$
(11)
which provides an improved fit to the data. Exploration of different expressions for the fringing are common in analyses of this type, depending on the w/g ratio, and other fringing capacitance corrections could be explored to improve the fit further36.
### Anisotropy
The projection of the SRR slit lying flat on the xy surface plane of the sample is described by a rectangle w × g. The electric field excited in the SRR gap is largely oriented perpendicular to the gap walls (as shown in Fig. 1b) and thus the SRR probe should be sensitive to the anisotropy of the dielectric susceptibility of the sample. This is confirmed by simulation and experiment shown in Fig. 3, which considers the gap sitting on the interface between two materials (blue and green) with distinctly different relative dielectric permittivities ε 1 = 2.6 and ε 2 = 7.2 respectively (typical values of permittivity for 3D-printed dielectrics6) with the electric field between the faces of the gap initially perpendicular to interface between the two materials. Figure 3a shows the simulated change for SRR 4 in the transmission signal S 21 as the ring is then rotated through 90°. The rotation caused a shift of the resonant frequency Δf 0 = 40.5 MHz, which corresponds to a difference in dielectric permittivity of Δε = 0.885.
Figure 3b shows the measured effective relative dielectric permittivity of the interface region as the gap is rotated progressively, directly on the interface, through 360°. The permittivity had a pronounced polarization dependence on the orientation of the gap (i.e. the electric field), with a measured value of Δε = 0.9 in excellent agreement with simulation in Fig. 3a, and suggesting that the SRR technique could also be used as a probe for dielectric surface anisotropy.
In general, the elongated gap geometry and the resulting strong orientation of the coupled electric field in the SRR gap must be taken into account when surface relative dielectric permittivity experiments are performed. Figure 4 shows 2D maps of measured relative dielectric permittivity over a 3D-printed 32 × 32 mm2 area “chessboard” surface composed of cells of either ε 1 = 2.6 or ε 2 = 5.2. The scan step was 0.2 mm and the map took approximately 20 minutes to acquire. The data in Fig. 4a,b were obtained with the SRR gap oriented normal to the horizontal call boundaries and at 45° to the cell boundaries respectively. Qualitatively, it was immediately apparent that at the 45° orientation in Fig. 4b, a relatively diffuse interface between cells was resolved, which is emphasised in the profile line taken across the superimposed horizontal black lines on the chessboard. Quantitatively and as previously demonstrated, the resolved relative dielectric permittivities were in good agreement with those obtained by standard bulk techniques, even accounting for differences in the measurement frequency (because the relative permittivity had a low sensitivity to frequency in the range studied).
Figure 4c shows an image of a surface with high contrast in dielectric permittivity where the Greek letter ‘μ’ is air (ε r = 1) and the ‘O’ is a ABS/BaTiO3 composite (with ε r = 5.02) framed by ABS polymer (ε r = 2.65), representing the logo of the Department of Materials at Oxford University with an overall area of 50 × 50 mm2 and measured using SRR 1 (see Table 2) with a 0.25 mm step resolution.
### Restrictions and further improvements
The simple SRR probe design allows easy modification of the probe geometry, for example, to provide a high sensitivity to the sample permittivity with fine spatial resolution, or to map a large-scale dielectric surface quickly with a coarser scanning step. As seen from Equations (1) to (4), by varying r, h, w, and g, it is possible to choose the operating frequency, increase the Q-factor or expand the f 0(ε r ) dispersion. This flexibility is demonstrated further in the simulations in Fig. 5 where f 0(ε r ) is shown for different combinations of w × g at constant r = 10 mm and h = 0.8 mm. A narrow gap with w × g = 5 × 0.1 mm2 provided a narrow band Δf 0 ≈ 0.4 GHz and a decrease in operating frequency to approximately 1 GHz, while at w × g = 1 × 1 mm2 the SRR probe blue-shifted the operational frequency and broadens Δf 0 to 1.2 GHz. As was also supported by experiment, a decrease in w × g from 5 × 0.1 to 1 × 1 mm2 resulted in a decrease in Q-factor from 100 to 20. This is in accordance with Equation (3) and that the conductive loss of the unloaded SRR (Q un) is proportional to the inductance: Q un = 2πf · L/R, where R is a ring resistance. Similarly, it is expected that the Q-factor will decrease with decreasing gap width and height, and will increase with the SRR radius. Thus, the operating frequency and Q-factor of the SRR probe can be easily tuned simply by changing the SRR geometry.
As shown earlier, the spatial resolution of the SRR probe will be determined by the gap area and its relative orientation to any sharp interface between different permittivity materials, and will affect the apparent interface or boundary “width”, even if this boundary is sharp. Figure 6(a) shows numerical simulations of the resonant frequency shift Δf 0 for a boundary structure with ε 1 = 2.5 and ε 2 = 5.0, for two SRR probes with w = 5 mm, h = 0.8 mm, g = 0.35 mm, and a radius r = 10 or 7 mm, scanning along the x-direction (with the gap perpendicular to the boundary). Figure 6(a) shows the apparent “width” of the interface (light blue) was suggested as 2 mm for both SRR probes. Figure 6(b) similarly shows simulations of the effective permittivity profile for a structure again with alternating regions of ε 1 = 2.5 and ε 2 = 5.0 for the scan orientation along the x-direction but where the width of each domain is reduced from 4 mm to 1 mm. Now, the profile ε r (x) did not demonstrate any region where the apparent permittivity was constant and the interface was smeared. These numerical results are in good agreement with experiment in Fig. 4 and for previous related demonstrations6, 37, 38. Typically, the regions close to a boundary with high permittivity contrast (e.g. the edge of the sample, where the low-permittivity region is air) show lower effective permittivity (see, for example, the small areas enclosed by the internal edges of the chessboard and the letter ‘μ’ in the logo in Fig. 4). This smearing effect can be minimised to some extent by selection of the SRR geometry.
The SRR probe can also be used for an evaluation of the dielectric loss in a material. Figure 6(c) shows the simulated resonance peak of the transmission signal S 21 for a SRR with r = 1 mm, w = 3 mm, h = 0.8 mm, and g = 0.3 mm, for the probe in free space (dotted line, f 0 = 1.933 GHz) and in contact with the material with a real part of dielectric permittivity ε′ = 2.5, for different values of the dielectric loss expressed by $$\tan \,\delta =\varepsilon ^{\prime\prime} /\varepsilon ^{\prime}$$, where ε′ and ε′′ are the real and imaginary parts of the relative dielectric permittivity. The total loss of the SRR is represented by a quality factor Q that fulfils:
$${Q}^{-1}={Q}_{c}^{-1}+{Q}_{d}^{-1}+{Q}_{r}^{-1},$$
(12)
where Q c is the quality factor due to the conduction losses, $${Q}_{d}=1/\tan \,\delta$$ is the quality factor due to the dielectric losses, and Q r is the quality factor quality factor due to radiation losses of the resonator.
In free space, the resonator has a Q-factor of 35.6 at 1.933 GHz, but when in contact with a comparatively low loss dielectric material (ε′ = 2.5, $$\tan \,\delta ={10}^{-3}$$) its Q-factor surprisingly increases to 54.1 which would suggest that dielectric losses are playing a more important role in the overall SRR probe quality than might have been expected. Potentially, this could arise because the SRR gap itself behaves like an electric dipole antenna and it is a more efficient radiator when loaded with a dielectric material (that is lossy itself). To some extent, an increase of the Q-factor when in contact with a material, is a result of the lower resonance frequency in this condition (1.731 GHz) producing a lower surface resistance (which is proportional to $$\sqrt{\omega }$$) and reducing radiation efficiency for the SRR, which acts in this case as a simple loop antenna. For these two frequencies, the radiation resistance of simple loop antennas the same size as the SRR would be R r = 3.97 Ω (1.731 GHz) and R r = 5.9 Ω (1.933 GHz), equivalent to a 32% reduction in radiation losses Q r . Additionally, a shift of the resonance to lower frequency causes an increase in the current flow skin depth and therefore promotes a more uniform current distribution inside the SRR, reducing the resistive loss Q c 39. When a material with a comparatively high loss is introduced, there is, as expected, a decrease in the total Q-factor, following an inverse relationship and with the lowest Q-factor of 19.8 for a loss of tan δ = 0.1. Nonetheless, some uncertainty remains in the correct physical interpretation of the Q-factor data, and is the subject of continuing investigation.
## Conclusion
A simple measurement approach and supporting analytical expressions to image the surface electromagnetic properties of materials based on a single split-ring magnetic resonator have been proposed. Analytical calculations, numerical simulations and experimental measurements have been used to verify and explore the capabilities and limitations of the approach for surface relative dielectric permittivity mapping. The SRR probe was experimentally convenient and showed approximately 7.7% average accuracy in permittivity measurements in this preliminary implementation; permittivities of approximately 2 to 27 were measured in the frequency range 1–3 GHz. The spatial resolution of the technique was in the range of 0.1–2 mm and was tunable depending on the geometric parameters of the SRR itself. The SRR dielectric probe approach was suggested to be particularly well-suited to applications requiring 2D near-field dielectric imaging of large area composite materials.
## Methods
The SRR elements that form the key part of the dielectric probe were simply obtained as transverse sections of commercial purity Cu pipe using a low speed circular saw (IsoMet, Buehler). A range of diameters and wall thicknesses were investigated, and in each case the radius, height and width of the SRR were measured using laboratory callipers to a precision of ±0.01 mm. Once the rings were cut axially to generate the air gap (or slit), the gap was measured using an optical microscope to approximately 1 μm accuracy.
The SRR element was mounted in specially designed and 3D-printed polymer holder, between two 3 mm diameter magnetic loops (coils) connected to a Rohde&Schwarz ZNB20 vector network analyser (VNA). The xy-plane scanning of this probe assembly was accomplished using NEMA17 stepper motors operated through a programmable motion controller. For the mapping of the surface dielectric properties of materials, the resonant frequency of the complex insertion loss (transmission coefficient S 21) as the resonating probe approached and touched the surface was measured point-by-point over the surface by automated synchronisation of the VNA with the motion controller. The overall scanning speed, typically determined by the response of the VNA and scanning step distance, was about 200 μs per step.
Data was collected over the surface of composite materials composed of a matrix of acrylonitrile butadiene styrene (ABS) polymer filled with a dispersion of various high-dielectric fine-powdered ceramics such as BaTiO3 or CaTiO3, with different volume ratios to obtain a range of surface dielectric permittivities, according to our previous work4,5,6. To explore the accuracy of the technique, the dielectric permittivities of each of these different composites were characterised separately by the split-post dielectric resonance method40 at an operating frequency of 15 GHz. To explore the spatial resolution of the technique, the same composite materials were also arranged in various 2D patterns using a fused deposition modelling (FDM) based 3D printing technique, details of which we have published elsewhere5, 6.
A finite element method (FEM) based model to simulate the 3D distribution of the electric and magnetic fields in and around the SRR probe in contact with various surfaces of different dielectric permittivity was developed. Full wave simulations were performed using commercially available Comsol Multiphysics RF module software. The geometry of the probe arrangement used in simulation was derived from a 3D CAD model, while the FE mesh element size was carefully optimised to provide mesh-independent solutions. The outputs of the simulation were the complex transmission and reflection parameters from which a resonant frequency was retrieved, and was then used to help interpret and validate the experimental measurements. | 2022-12-09 00:40: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": 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.6426430940628052, "perplexity": 977.4760931820847}, "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-49/segments/1669446711368.1/warc/CC-MAIN-20221208215156-20221209005156-00731.warc.gz"} |
https://en.wikipedia.org/wiki/Probabilistic_relevance_model_(BM25) | Okapi BM25
In information retrieval, Okapi BM25 (BM stands for Best Matching) is a ranking function used by search engines to rank matching documents according to their relevance to a given search query. It is based on the probabilistic retrieval framework developed in the 1970s and 1980s by Stephen E. Robertson, Karen Spärck Jones, and others.
The name of the actual ranking function is BM25. To set the right context, however, it is usually referred to as "Okapi BM25", since the Okapi information retrieval system, implemented at London's City University in the 1980s and 1990s, was the first system to implement this function.
BM25 and its newer variants, e.g. BM25F (a version of BM25 that can take document structure and anchor text into account), represent state-of-the-art TF-IDF-like retrieval functions used in document retrieval.[citation needed]
The ranking function
BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document, regardless of the inter-relationship between the query terms within a document (e.g., their relative proximity). It is not a single function, but actually a whole family of scoring functions, with slightly different components and parameters. One of the most prominent instantiations of the function is as follows.
Given a query Q, containing keywords ${\displaystyle q_{1},...,q_{n}}$, the BM25 score of a document D is:
${\displaystyle {\text{score}}(D,Q)=\sum _{i=1}^{n}{\text{IDF}}(q_{i})\cdot {\frac {f(q_{i},D)\cdot (k_{1}+1)}{f(q_{i},D)+k_{1}\cdot \left(1-b+b\cdot {\frac {|D|}{\text{avgdl}}}\right)}},}$
where ${\displaystyle f(q_{i},D)}$ is ${\displaystyle q_{i}}$'s term frequency in the document D, ${\displaystyle |D|}$ is the length of the document D in words, and avgdl is the average document length in the text collection from which documents are drawn. ${\displaystyle k_{1}}$ and b are free parameters, usually chosen, in absence of an advanced optimization, as ${\displaystyle k_{1}\in [1.2,2.0]}$ and ${\displaystyle b=0.75}$.[1] ${\displaystyle {\text{IDF}}(q_{i})}$ is the IDF (inverse document frequency) weight of the query term ${\displaystyle q_{i}}$. It is usually computed as:
${\displaystyle {\text{IDF}}(q_{i})=\log {\frac {N-n(q_{i})+0.5}{n(q_{i})+0.5}},}$
where N is the total number of documents in the collection, and ${\displaystyle n(q_{i})}$ is the number of documents containing ${\displaystyle q_{i}}$.
There are several interpretations for IDF and slight variations on its formula. In the original BM25 derivation, the IDF component is derived from the Binary Independence Model.
Please note that the above formula for IDF shows potentially major drawbacks when using it for terms appearing in more than half of the corpus documents. These terms' IDF is negative, so for any two almost-identical documents, one which contains the term and one which does not contain it, the latter will possibly get a larger score. This means that terms appearing in more than half of the corpus will provide negative contributions to the final document score. This is often an undesirable behavior, so many real-world applications would deal with this IDF formula in a different way:
• Each summand can be given a floor of 0, to trim out common terms;
• The IDF function can be given a floor of a constant ${\displaystyle \epsilon }$, to avoid common terms being ignored at all;
• The IDF function can be replaced with a similarly shaped one which is non-negative, or strictly positive to avoid terms being ignored at all.
IDF information theoretic interpretation
Here is an interpretation from information theory. Suppose a query term ${\displaystyle q}$ appears in ${\displaystyle n(q)}$ documents. Then a randomly picked document ${\displaystyle D}$ will contain the term with probability ${\displaystyle {\frac {n(q)}{N}}}$ (where ${\displaystyle N}$ is again the cardinality of the set of documents in the collection). Therefore, the information content of the message "${\displaystyle D}$ contains ${\displaystyle q}$" is:
${\displaystyle -\log {\frac {n(q)}{N}}=\log {\frac {N}{n(q)}}.}$
Now suppose we have two query terms ${\displaystyle q_{1}}$ and ${\displaystyle q_{2}}$. If the two terms occur in documents entirely independently of each other, then the probability of seeing both ${\displaystyle q_{1}}$ and ${\displaystyle q_{2}}$ in a randomly picked document ${\displaystyle D}$ is:
${\displaystyle {\frac {n(q_{1})}{N}}\cdot {\frac {n(q_{2})}{N}},}$
and the information content of such an event is:
${\displaystyle \sum _{i=1}^{2}\log {\frac {N}{n(q_{i})}}.}$
With a small variation, this is exactly what is expressed by the IDF component of BM25.
Modifications
• At the extreme values of the coefficient b BM25 turns into ranking functions known as BM11 (for ${\displaystyle b=1}$) and BM15 (for ${\displaystyle b=0}$).[2]
• BM25F[3][4] is a modification of BM25 in which the document is considered to be composed from several fields (such as headlines, main text, anchor text) with possibly different degrees of importance, term relevance saturation and length normalization.
• BM25+[5] is an extension of BM25. BM25+ was developed to address one deficiency of the standard BM25 in which the component of term frequency normalization by document length is not properly lower-bounded; as a result of this deficiency, long documents which do match the query term can often be scored unfairly by BM25 as having a similar relevancy to shorter documents that do not contain the query term at all. The scoring formula of BM25+ only has one additional free parameter ${\displaystyle \delta }$ (a default value is 1.0 in absence of a training data) as compared with BM25:
${\displaystyle {\text{score}}(D,Q)=\sum _{i=1}^{n}{\text{IDF}}(q_{i})\cdot \left[{\frac {f(q_{i},D)\cdot (k_{1}+1)}{f(q_{i},D)+k_{1}\cdot \left(1-b+b\cdot {\frac {|D|}{\text{avgdl}}}\right)}}+\delta \right]}$
References
1. ^ Christopher D. Manning, Prabhakar Raghavan, Hinrich Schütze. An Introduction to Information Retrieval, Cambridge University Press, 2009, p. 233.
2. ^ http://xapian.org/docs/bm25.html
3. ^ Hugo Zaragoza, Nick Craswell, Michael Taylor, Suchi Saria, and Stephen Robertson. Microsoft Cambridge at TREC-13: Web and HARD tracks. In Proceedings of TREC-2004.
4. ^ Stephen Robertson & Hugo Zaragoza (2009). "The Probabilistic Relevance Framework: BM25 and Beyond". 3 (4). Found. Trends Inf. Retr.: 333–389. doi:10.1561/1500000019.
5. ^ Yuanhua Lv and ChengXiang Zhai. Lower-bounding term frequency normalization. In Proceedings of CIKM'2011, pages 7-16. | 2017-11-24 09:50:30 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 33, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.7445106506347656, "perplexity": 1466.3412801576642}, "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-47/segments/1510934807344.89/warc/CC-MAIN-20171124085059-20171124105059-00459.warc.gz"} |
https://socratic.org/questions/what-is-the-standard-deviation-of-the-following-numbers-24-36-33-21-15-11 | # What is the standard deviation of the following numbers: 24, 36, 33, 21, 15, 11?
Dec 9, 2017
$\sigma = \frac{19 \sqrt{2}}{3}$
#### Explanation:
We know:
${\sigma}^{2} = \frac{\Sigma {x}^{2}}{n} - {\left(\frac{\Sigma x}{n}\right)}^{2}$
$\Sigma x = 24 + 36 + 33 + 21 + 15 + 11 = 140$
$\Sigma {x}^{2} = {24}^{2} + {36}^{2} + {33}^{2} + {21}^{2} + {15}^{2} + {11}^{2} = 3748$
$n$ is the number data in the sample, $\implies n = 6$
Hence plugging into the formula:
${\sigma}^{2} = \frac{3748}{6} - {\left(\frac{140}{6}\right)}^{2} = \frac{722}{9}$
$\implies \sigma = \frac{\sqrt{722}}{\sqrt{9}} = \frac{19 \sqrt{2}}{3}$
Dec 9, 2017
Standard Deviation $\sigma = \textcolor{p u r p \le}{8.9567}$
#### Explanation:
Mean for the given numbers
$= \frac{24 + 36 + 33 + 21 + 15 + 11}{6} = 23.33$
Variance ${\sigma}^{2} = \sum {\left(x - \overline{x}\right)}^{2} / \left(n\right)$
${\sigma}^{2} = \sum \frac{{\left(23.33 - 24\right)}^{2} + {\left(23.33 - 36\right)}^{2} + {\left(23.33 - 33\right)}^{2} + {\left(23.33 - 21\right)}^{2} + {\left(23.33 - 15\right)}^{2} + {\left(23.33 - 11\right)}^{2}}{6}$
${\sigma}^{2} = \frac{{\left(- 0.67\right)}^{2} + {\left(- 12.67\right)}^{2} + {\left(- 9.67\right)}^{2} + {\left(2.33\right)}^{2} + {\left(8.33\right)}^{2} + {\left(12.33\right)}^{2}}{6}$
${\sigma}^{2} = 80.2222$
Standard Deviation $\sigma = 8.9567$ | 2022-08-15 01:37:53 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 15, "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.9419452548027039, "perplexity": 4135.327133973449}, "config": {"markdown_headings": true, "markdown_code": false, "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-2022-33/segments/1659882572089.53/warc/CC-MAIN-20220814234405-20220815024405-00395.warc.gz"} |
https://zbmath.org/?q=an%3A1169.30302 | # zbMATH — the first resource for mathematics
Main differential sandwich theorem with some applications. (English) Zbl 1169.30302
Summary: Let $$q _{1}, q _{2}$$ be univalent in $$\Delta :=\{z: |z|<1\}$$, and let $$p$$ be a certain analytic function. We give some applications of first order differential subordinations and superordinations to obtain sufficient conditions to satisfy the following sandwich implication which is a generalization of various known sandwich theorems:
$\beta zq_1^k (z)q'_1 (z) +\sum\limits_{j = 0}^n {\alpha _j q_1^j (z)} \prec \beta zp^k (z)p'(z)+\sum\limits_{j = 0}^n {\alpha _j p^j (z)} \prec \beta zq_2^k (z)q'_2 (z)+\sum\limits_{j = 0}^n {\alpha _j q_2^j (z)}$
implies $$q _{1}(z) \prec p(z) \prec q _{2}(z)$$, where $$k\in\mathbb Z$$, $$\beta\neq 0$$, and $$\alpha_j\in\mathbb C$$. Some of its special cases and applications are considered for certain analytic functions and certain linear operators.
##### MSC:
30C45 Special classes of univalent and multivalent functions of one complex variable (starlike, convex, bounded rotation, etc.)
Full Text:
##### References:
[1] S. S. Miller and P. T. Mocanu, Subordinants of diferential subordinations. Complex Variables Theory and Application 48(10), 815 (2003). · Zbl 1039.30011 [2] T. Bulboacã, Classes of first-order differential superordinations. Demonstr. Math. 35(2), 287 (2002). · Zbl 1010.30020 [3] T. Bulboacã, A class of superordination-preserving integral operators, Indag. Math. New Ser. 13(3), 301 (2002). · Zbl 1019.30023 [4] R. M. Ali, V. Ravichandran, M. Hussain Khan, and K. G. Subramanian, Differential sandwich theorems for certain analytic functions. Far East Jour. Math. Sci. 15(1), 87 (2005). · Zbl 1074.30022 [5] T. N. Shanmugam, V. Ravichandran, and S. Sivasubramanian, Differential sandwich theorems for some subclasses of analytic functions. Australian J. Math. Anal. Appl. 3(1), 11 (2006). · Zbl 1091.30019 [6] B. C. Carlson and D. B. Shaffer, Starlike and prestarlike hypergeometric functions, SIAM J. Math. Anal. 15, 737 (1984). · Zbl 0567.30009 [7] T. N. Shanmugam, S. Sivasubramanian, and M. Darus, On certain subclasses of functions involving a linear operator, Far East J.Math. Sci. 23(3), 329 (2006). · Zbl 1211.30041 [8] T. N. Shanmugam, S. Sivasubramanian, and H.M. Srivastava, Differential sandwich theorems for certain subclasses of analytic functions involvingm ultiplier transformations, Int. Transforms Spec. Functions. 17(12), 889 (2006). · Zbl 1104.30015 [9] T. N. Shanmugam, C. Ramachandran, M. Darus, and S. Sivasubramanian, Differential sandwich theorems for some subclasses of analytic functions involving a linear operator, Acta Math. Univ. Comenianae 287 (2007). · Zbl 1164.30017 [10] H. M. Srivastava and A. Y., Some applications of the Briot-Bouquet differential subordination, J. Inequal. Pure Appl. Math. 6(2), Article 41 (2005). · Zbl 1080.30017 [11] N. E. Cho and T. H. Kim, Multiplier transformations and strongly close-to-convex functions, Bull. Korean Math. Soc. 40(3), 399 (2003). · Zbl 1032.30007 [12] Y. Komatu, Distortion Theorems in Relation to Linear Integral Operators (Dordrecht, Boston, London: Kluwer Academic Publisher, 1996). · Zbl 0867.47036 [13] G. S. Sălăgean, Subclasses of Univalent Functions, in Complex Analysis-Fifth Romanian-Finnish Seminar (Bucharest, 1981), Part 1, p. 362; Lecture Notes in Mathematics (Berlin: Springer, 1981), p. 1013. [14] T. N. Shanmugam, S. Sivasubramanian, M. Darus, and S. Kavitha, On Sandwich theorems for certain subclasses of non-Bazilevč functions involving Cho-Kim transformation, Complex Variables and Elliptic Equations 52(10), 1017 (2007). · Zbl 1138.30307 [15] S. S. Miller and P. T. Mocanu, Differential Subordinations (New York, Dekker, 2000). · Zbl 0954.34003
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching. | 2021-08-04 22:26:22 | {"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.6666107773780823, "perplexity": 4588.321186649346}, "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-31/segments/1627046155188.79/warc/CC-MAIN-20210804205700-20210804235700-00417.warc.gz"} |
http://perimeterinstitute.ca/videos/quasi-topological-quantum-error-correction-codes | # Quasi-Topological Quantum Error Correction Codes
Playing this video requires the latest flash player from Adobe.
Speaker(s):
PIRSA Number:
17050099
## Abstract
Existing proposals for topological quantum computation have encountered
difficulties in recent years in the form of several obstructing'' results.
These are not actually no-go theorems but they do present some serious
obstacles. A further aggravation is the fact that the known topological
error correction codes only really work well in spatial dimensions higher
than three. In this talk I will present a method for modifying a higher
dimensional topological error correction code into one that can be embedded
into two (or three) dimensions. These projected codes retain at least some
of their higher-dimensional topological properties. The resulting subsystem
codes are not discrete analogs of TQFTs and as such they evade the usual
obstruction results. Instead they obey a discrete analog of a conformal
symmetry. Nevertheless, there are real systems which have these features,
and if time permits I'll discuss some of these. Many of them exhibit
strange low temperature behaviours that might even be helpful for
establishing finite temperature fault tolerance thresholds.
This research is still very much a work in progress... As such it has
numerous loose ends and open questions for further investigation. These
constructions could also be of interest to quantum condensed matter
theorists and may even be of interest to people who like weird-and-wonderful
spin models in general. | 2018-10-18 19:30: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.4797004759311676, "perplexity": 1576.1885966512154}, "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-43/segments/1539583511897.56/warc/CC-MAIN-20181018173140-20181018194640-00145.warc.gz"} |
https://ftp.aimsciences.org/article/doi/10.3934/dcdsb.2021280 | # American Institute of Mathematical Sciences
doi: 10.3934/dcdsb.2021280
Online First
Online First articles are published articles within a journal that have not yet been assigned to a formal issue. This means they do not yet have a volume number, issue number, or page numbers assigned to them, however, they can still be found and cited using their DOI (Digital Object Identifier). Online First publication benefits the research community by making new scientific discoveries known as quickly as possible.
Readers can access Online First articles via the “Online First” tab for the selected journal.
## Exponential decay for quasilinear parabolic equations in any dimension
1 School of Mathematics and Statistics, Lanzhou University, Lanzhou 730000, China 2 Department of Mathematics, College of Natural Sciences, Kyungpook National University, Daegu 41566, Republic of Korea
* Corresponding author
Received September 2021 Early access November 2021
We estimate decay rates of solutions to the initial-boundary value problem for a class of quasilinear parabolic equations in any dimension. Such decay rates depend only on the constitutive relations, spatial domain, and range of the initial function.
Citation: Jian-Wen Sun, Seonghak Kim. Exponential decay for quasilinear parabolic equations in any dimension. Discrete & Continuous Dynamical Systems - B, doi: 10.3934/dcdsb.2021280
##### References:
show all references
##### References:
[1] Tomasz Komorowski, Adam Bobrowski. A quantitative Hopf-type maximum principle for subsolutions of elliptic PDEs. Discrete & Continuous Dynamical Systems - S, 2020, 13 (12) : 3495-3502. doi: 10.3934/dcdss.2020248 [2] Francesca Da Lio. Remarks on the strong maximum principle for viscosity solutions to fully nonlinear parabolic equations. Communications on Pure & Applied Analysis, 2004, 3 (3) : 395-415. doi: 10.3934/cpaa.2004.3.395 [3] Isabeau Birindelli, Francoise Demengel. Eigenvalue, maximum principle and regularity for fully non linear homogeneous operators. Communications on Pure & Applied Analysis, 2007, 6 (2) : 335-366. doi: 10.3934/cpaa.2007.6.335 [4] Shigeaki Koike, Takahiro Kosugi. Remarks on the comparison principle for quasilinear PDE with no zeroth order terms. Communications on Pure & Applied Analysis, 2015, 14 (1) : 133-142. doi: 10.3934/cpaa.2015.14.133 [5] H. O. Fattorini. The maximum principle in infinite dimension. Discrete & Continuous Dynamical Systems, 2000, 6 (3) : 557-574. doi: 10.3934/dcds.2000.6.557 [6] Thomas Leroy. Relativistic transfer equations: Comparison principle and convergence to the non-equilibrium regime. Kinetic & Related Models, 2015, 8 (4) : 725-763. doi: 10.3934/krm.2015.8.725 [7] Maria Francesca Betta, Rosaria Di Nardo, Anna Mercaldo, Adamaria Perrotta. Gradient estimates and comparison principle for some nonlinear elliptic equations. Communications on Pure & Applied Analysis, 2015, 14 (3) : 897-922. doi: 10.3934/cpaa.2015.14.897 [8] Xiao-Li Ding, Iván Area, Juan J. Nieto. Controlled singular evolution equations and Pontryagin type maximum principle with applications. Evolution Equations & Control Theory, 2021 doi: 10.3934/eect.2021059 [9] Carlo Orrieri. A stochastic maximum principle with dissipativity conditions. Discrete & Continuous Dynamical Systems, 2015, 35 (11) : 5499-5519. doi: 10.3934/dcds.2015.35.5499 [10] Bernd Kawohl, Vasilii Kurta. A Liouville comparison principle for solutions of singular quasilinear elliptic second-order partial differential inequalities. Communications on Pure & Applied Analysis, 2011, 10 (6) : 1747-1762. doi: 10.3934/cpaa.2011.10.1747 [11] Fabio Paronetto. A Harnack type inequality and a maximum principle for an elliptic-parabolic and forward-backward parabolic De Giorgi class. Discrete & Continuous Dynamical Systems - S, 2017, 10 (4) : 853-866. doi: 10.3934/dcdss.2017043 [12] Doyoon Kim, Seungjin Ryu. The weak maximum principle for second-order elliptic and parabolic conormal derivative problems. Communications on Pure & Applied Analysis, 2020, 19 (1) : 493-510. doi: 10.3934/cpaa.2020024 [13] J. Húska, Peter Poláčik. Exponential separation and principal Floquet bundles for linear parabolic equations on $R^N$. Discrete & Continuous Dynamical Systems, 2008, 20 (1) : 81-113. doi: 10.3934/dcds.2008.20.81 [14] Timothy Blass, Rafael De La Llave, Enrico Valdinoci. A comparison principle for a Sobolev gradient semi-flow. Communications on Pure & Applied Analysis, 2011, 10 (1) : 69-91. doi: 10.3934/cpaa.2011.10.69 [15] Torsten Lindström. Discrete models and Fisher's maximum principle in ecology. Conference Publications, 2003, 2003 (Special) : 571-579. doi: 10.3934/proc.2003.2003.571 [16] Mingshang Hu. Stochastic global maximum principle for optimization with recursive utilities. Probability, Uncertainty and Quantitative Risk, 2017, 2 (0) : 1-. doi: 10.1186/s41546-017-0014-7 [17] Phuong Nguyen, Roger Temam. The stampacchia maximum principle for stochastic partial differential equations forced by lévy noise. Communications on Pure & Applied Analysis, 2020, 19 (4) : 2289-2331. doi: 10.3934/cpaa.2020100 [18] Stefan Doboszczak, Manil T. Mohan, Sivaguru S. Sritharan. Pontryagin maximum principle for the optimal control of linearized compressible navier-stokes equations with state constraints. Evolution Equations & Control Theory, 2020 doi: 10.3934/eect.2020110 [19] Goro Akagi, Jun Kobayashi, Mitsuharu Ôtani. Principle of symmetric criticality and evolution equations. Conference Publications, 2003, 2003 (Special) : 1-10. doi: 10.3934/proc.2003.2003.1 [20] Peng Gao, Yong Li. Averaging principle for the Schrödinger equations†. Discrete & Continuous Dynamical Systems - B, 2017, 22 (6) : 2147-2168. doi: 10.3934/dcdsb.2017089
2020 Impact Factor: 1.327 | 2022-01-21 00:22:22 | {"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.45105549693107605, "perplexity": 4398.5863297774995}, "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/1642320302706.62/warc/CC-MAIN-20220120220649-20220121010649-00271.warc.gz"} |
http://www.digitalmars.com/d/archives/digitalmars/D/A_little_challenge..._106780.html | ## digitalmars.D - A little challenge...
• Norbert Nemec (25/25) Feb 25 2010 Hi everybody,
• Jason House (2/16) Feb 25 2010 Would sum!( "i", "a[i]*b[i]" ) be acceptable? That should be achievable ...
• Norbert Nemec (12/13) Feb 26 2010 It is indeed a solution for the problem, but I still don't like it too
• Don (7/23) Feb 26 2010 This is a much bigger problem. It's not too difficult if you allow only
• Philippe Sigaud (55/68) Feb 26 2010 You could use anonymous functions, like this:
• Igor Lesik (28/45) Feb 26 2010 I think "i" could be implicit. Here is how I was able to implement it:
• Daniel Keep (2/2) Feb 25 2010 BLADE may also be of some interest to you.
• Norbert Nemec (3/6) Feb 26 2010 Thanks for the hint! I had seen BLADE sometimes before, but I realize
• Robert Jacques (6/31) Feb 25 2010 Well there is std.algorithm's map and reduce. Somehow, I feel slicing,
• Norbert Nemec (7/11) Feb 26 2010 In fact, that is the way you would do it in e.g. Python/NumPy. It works
• Robert Jacques (13/25) Feb 26 2010 That sounds sensible. However, extensive experience in Matlab has taught...
• Norbert Nemec (25/28) Feb 27 2010 Indeed, most use cases are simple enough to be handled in array
• Robert Jacques (35/63) Feb 27 2010 Thank you. I understand the difficulty of finding good examples. I did ...
• Ary Borenszweig (4/22) Feb 26 2010 You are missing i's initial and ending values.
• Norbert Nemec (3/28) Feb 26 2010 I assumed them to default to the array boundaries, but that does not
• Robert Jacques (5/31) Feb 26 2010 Detecting those array boundaries is not an easy task. For example, if yo...
Norbert Nemec <Norbert Nemec-online.de> writes:
Hi everybody,
thinking about array expressions, I have stumbled over an interesting
challenge for which I still have no idea:
Consider the mathematical sum notation:
\sum_i a_i*b_i
here, the variable i is defined only at the scope inside the expression.
A analogous D syntax could be something like
sum!(i)(a[i]*b[i])
where sum would have to be some kind of template that takes i as a name
parameter and then defines it as variable inside the scope of the second
expression.
(Of course, the scalar product is trivial enough to do it in a zillion
of other ways, but for more complex sum expressions with potentially
more than one variable, this would really be neat to have in an array
library.)
Does anyone have an idea how this could be realized in D? Allowing a
template to define additional symbols only for the scope of its
arguments? Is it possible at all with the current language definion?
Does anyone have an idea for an elegant language extension to allows
this? It would mean taking lazy evaluation even one step further, all
the way to a lazy symbol binding. Seems straighforward enough to me to
implement in a compiler. Just the question how exactly to define the
semantics.
Greetings,
Norbert
Feb 25 2010
Jason House <jason.james.house gmail.com> writes:
Norbert Nemec Wrote:
Hi everybody,
thinking about array expressions, I have stumbled over an interesting
challenge for which I still have no idea:
Consider the mathematical sum notation:
\sum_i a_i*b_i
here, the variable i is defined only at the scope inside the expression.
A analogous D syntax could be something like
sum!(i)(a[i]*b[i])
Would sum!( "i", "a[i]*b[i]" ) be acceptable? That should be achievable with a template mixin that does string mixins under the hood.
Feb 25 2010
Norbert Nemec <Norbert Nemec-online.de> writes:
Jason House wrote:
Would sum!( "i", "a[i]*b[i]" ) be acceptable? That should be achievable with a
template mixin that does string mixins under the hood.
It is indeed a solution for the problem, but I still don't like it too much. For one, writing expressions as strings always feels awkward. Even though D can handle these strings at compile time, it just doesn't feel like writing native D code. Beyond this "gut feeling" I also see two technical problems: * code editors do not recognize the string content as code, so they cannot offer syntax highlighting or more advanced language tools * the syntax does not allow nesting: sum(i)( a[i] * sum(j)(b[i,j]*c[j]) ) Greetings, Norbert
Feb 26 2010
Don <nospam nospam.com> writes:
Norbert Nemec wrote:
Jason House wrote:
Would sum!( "i", "a[i]*b[i]" ) be acceptable? That should be
achievable with a template mixin that does string mixins under the hood.
It is indeed a solution for the problem, but I still don't like it too much. For one, writing expressions as strings always feels awkward. Even though D can handle these strings at compile time, it just doesn't feel like writing native D code. Beyond this "gut feeling" I also see two technical problems: * code editors do not recognize the string content as code, so they cannot offer syntax highlighting or more advanced language tools
You can use the q{ } string syntax.
* the syntax does not allow nesting:
sum(i)( a[i] * sum(j)(b[i,j]*c[j]) )
This is a much bigger problem. It's not too difficult if you allow only a set of built-in operations, but if you allow user-defined operations, it's tough. Template alias parameters have got much more powerful since I wrote BLADE, so maybe it's more feasible now.
Feb 26 2010
Philippe Sigaud <philippe.sigaud gmail.com> writes:
On Fri, Feb 26, 2010 at 10:07, Norbert Nemec <Norbert nemec-online.de>wrote:
Jason House wrote:
Would sum!( "i", "a[i]*b[i]" ) be acceptable? That should be achievable
with a template mixin that does string mixins under the hood.
It is indeed a solution for the problem, but I still don't like it too much. For one, writing expressions as strings always feels awkward. Even though D can handle these strings at compile time, it just doesn't feel like writing native D code. Beyond this "gut feeling" I also see two technical problems: * code editors do not recognize the string content as code, so they cannot offer syntax highlighting or more advanced language tools * the syntax does not allow nesting: sum(i)( a[i] * sum(j)(b[i,j]*c[j]) )
You could use anonymous functions, like this: sum!( (i,a,b) { return a[i]+b[i];})(array1, array2); Here I consider a function of an index and some arrays, but you could use functions on elements: sum!( (a,b) { return a+b*a;})(array1, array2); Editors can recognize these functions and they nest (though it's a bit heavy): sum!( (a,b) { return a + sum!((b) { return b*b;})(array2) * a)(array1); A possible implementation for one array can be : T sum(alias op, T)(T[] array) /* also, RandomAccessRange*/ { T result; foreach(i, elem; array) result += op(i, array); return result; } It's quite simplified: I consider op returns a T... Now, what's interesting is generalizing it somewhat : any number of inputs, and inputs can be input ranges and not only arrays: auto sum(alias op, R...)(R ranges) if(allSatisfy!(isInputRange,R)) { alias staticMap!(ElementType,R) FrontType; FrontType f; typeof(op(f)) theSum; while(!ranges[0].empty) { foreach(i, Type; FrontType) { // extracting the fronts f[i] = ranges[i].front; ranges[i].popFront; } theSum += op(f); } return theSum; } usage: int[] ar1 = [0,1,2,3]; int[] ar2 = [4,5,6,7]; auto s = sum!((a,b,c) {return a+b*c;})(ar1,ar2,ar1); writeln(s); // 44 Note that we could sum ranges with any element type, as long as the .init value can be summed. float/double being initialiazed to NaN, it's a bit tricky. We could adopt std.algorithm 'string functions' trick, to get this syntax, which I quite like: auto s = sum!"a+b*c"(ar1, ar2, ar3); Maybe you could be interested by looking at some modules with these ideas at: http://www.dsource.org/projects/dranges (addendum: another generalization is of course to have two operations: the 'mapping' operation and the 'reducing' operation like this: auto sum = mapReduce!("a*b*c+1", "a+b")(range1, range2, range3); The first function is applied on the elements, the second on the successive results of the first fun. Philippe
Feb 26 2010
"Igor Lesik" <curoles yahoo.com> writes:
"Jason House" <jason.james.house gmail.com> wrote in message
news:hm75nn$1a2q$1 digitalmars.com...
Norbert Nemec Wrote:
Hi everybody,
thinking about array expressions, I have stumbled over an interesting
challenge for which I still have no idea:
Consider the mathematical sum notation:
\sum_i a_i*b_i
here, the variable i is defined only at the scope inside the expression.
A analogous D syntax could be something like
sum!(i)(a[i]*b[i])
Would sum!( "i", "a[i]*b[i]" ) be acceptable? That should be achievable with a template mixin that does string mixins under the hood.
I think "i" could be implicit. Here is how I was able to implement it: void main() { int[] a = [1,2,3]; int[] b = [4,5,6]; int[] c = [5,4,3]; int IamLazy(){ writeln("am I?"); return 1; } writeln( sum!("a[i]*b[i]")(a,b) ); // 4 + 10 + 18 = 32 writeln( sum!("b[i]/a[i]")(a,b) ); // 4 + 2 + 2 = 8 writeln( sum!("(a[i]+b[i])%2 + c[i]")(a,b,c) ); // 6 5 4 = 15 writeln( sum!("a[i]*b[i]")(a,b,IamLazy()) ); // fun writeln( mixin( Msum!("a[i]*b[i]") ) ); writeln( mixin( Msum!("(a[i]+b[i])%2 + c[i]") ) ); } R _sum(string OP, R : R[], T...)(lazy T op) { mixin Rename!(T.length); R ret = 0; foreach (i; 0 .. op[0].length) { ret += mixin(OP); } return ret; } auto sum(string OP, T...)(lazy T op) if (T.length > 0) { return _sum!(OP, T[0], T)(op); }
Feb 26 2010
Daniel Keep <daniel.keep.lists gmail.com> writes:
BLADE may also be of some interest to you.
Feb 25 2010
Norbert Nemec <Norbert Nemec-online.de> writes:
Daniel Keep wrote:
BLADE may also be of some interest to you.
Thanks for the hint! I had seen BLADE sometimes before, but I realize that I should really study it in more detail.
Feb 26 2010
"Robert Jacques" <sandford jhu.edu> writes:
On Thu, 25 Feb 2010 18:57:32 -0500, Norbert Nemec
<Norbert nemec-online.de> wrote:
Hi everybody,
thinking about array expressions, I have stumbled over an interesting
challenge for which I still have no idea:
Consider the mathematical sum notation:
\sum_i a_i*b_i
here, the variable i is defined only at the scope inside the expression.
A analogous D syntax could be something like
sum!(i)(a[i]*b[i])
where sum would have to be some kind of template that takes i as a name
parameter and then defines it as variable inside the scope of the second
expression.
(Of course, the scalar product is trivial enough to do it in a zillion
of other ways, but for more complex sum expressions with potentially
more than one variable, this would really be neat to have in an array
library.)
Does anyone have an idea how this could be realized in D? Allowing a
template to define additional symbols only for the scope of its
arguments? Is it possible at all with the current language definion?
Does anyone have an idea for an elegant language extension to allows
this? It would mean taking lazy evaluation even one step further, all
the way to a lazy symbol binding. Seems straighforward enough to me to
implement in a compiler. Just the question how exactly to define the
semantics.
Greetings,
Norbert
Well there is std.algorithm's map and reduce. Somehow, I feel slicing, ranges/generators and array expressions should be able to handle this. For example: \sum_i i*a_i*b_i-1 => sum(iota * a * b[1..$]) But then again I'm having trouble thinking of real examples off the top of my head. Feb 25 2010 Norbert Nemec <Norbert Nemec-online.de> writes: Robert Jacques wrote: Well there is std.algorithm's map and reduce. Somehow, I feel slicing, ranges/generators and array expressions should be able to handle this. For example: \sum_i i*a_i*b_i-1 => sum(iota * a * b[1..$]) But then
again I'm having trouble thinking of real examples off the top of my head.
In fact, that is the way you would do it in e.g. Python/NumPy. It works fine for many common cases but does not scale up to more complex situations. The mathematical sum notation scales up arbitrarily and remains clear. I would want to offer both options and leave it to the user to choose the more appropriate notation.
Feb 26 2010
"Robert Jacques" <sandford jhu.edu> writes:
On Fri, 26 Feb 2010 03:58:59 -0500, Norbert Nemec
<Norbert nemec-online.de> wrote:
Robert Jacques wrote:
Well there is std.algorithm's map and reduce. Somehow, I feel slicing,
ranges/generators and array expressions should be able to handle this.
For example: \sum_i i*a_i*b_i-1 => sum(iota * a * b[1..\$]) But then
again I'm having trouble thinking of real examples off the top of my
In fact, that is the way you would do it in e.g. Python/NumPy. It works fine for many common cases but does not scale up to more complex situations. The mathematical sum notation scales up arbitrarily and remains clear. I would want to offer both options and leave it to the user to choose the more appropriate notation.
That sounds sensible. However, extensive experience in Matlab has taught me that resorting to custom for-loop indicates you've failed to sufficiently think in arrays. :) Take, for example, your composition example from the other thread: sum(i)( a[i] * sum(j)(b[i,j]*c[j]) ) => sum(a.*(b'*c)) or a.*sum(b.*(c*ones(1,length(c)))) ,1) or something like that. (As an aside, having a more efficient syntax for broadcasts, instead of having to use the outer product all the time, would be nice) Is there some example of a complex case you can post? I think we'll all think of better solutions with a goal in sight.
Feb 26 2010
Norbert Nemec <Norbert Nemec-online.de> writes:
Robert Jacques wrote:
That sounds sensible. However, extensive experience in Matlab has taught
me that resorting to custom for-loop indicates you've failed to
sufficiently think in arrays. :)
Indeed, most use cases are simple enough to be handled in array notation. I have worked with Matlab and Python and managed to come up with array notations in many non-trivial cases as well. However, once in a while, it just cannot be done. Typically, this happens when you have to handle non-linear terms or high order tensorial objects. Of course, my examples were simple enough to permit alternative expressions, but I have encountered quite a number of cases where I could not avoid a loop in Python. I is hard to spontaneously construct something useful that I can describe in a few lines. Imagine a charge density in one dimension: rho[r] and then compute the coulomb energy sum(r1,r2)(rho[r1]*rho[r2]/(r1-r2)) Or an expression containing function calls sum(i,j)(f(i)*g(j)*A[i,j])) Ultimately, 'sum' and other reduction would actually be just one use case. One could even use the same mechanism to construct arrays from expressions. auto A = array(a=0:10,b=0:20)(2*a + b%3) (Disregard the exact syntax here...) I will think further about this and try to come up with more specific use cases. Greetings, Norbert
Feb 27 2010
"Robert Jacques" <sandford jhu.edu> writes:
On Sat, 27 Feb 2010 04:56:00 -0500, Norbert Nemec
<Norbert nemec-online.de> wrote:
Robert Jacques wrote:
That sounds sensible. However, extensive experience in Matlab has
taught me that resorting to custom for-loop indicates you've failed to
sufficiently think in arrays. :)
Indeed, most use cases are simple enough to be handled in array notation. I have worked with Matlab and Python and managed to come up with array notations in many non-trivial cases as well. However, once in a while, it just cannot be done. Typically, this happens when you have to handle non-linear terms or high order tensorial objects. Of course, my examples were simple enough to permit alternative expressions, but I have encountered quite a number of cases where I could not avoid a loop in Python. I is hard to spontaneously construct something useful that I can describe in a few lines. Imagine a charge density in one dimension: rho[r] and then compute the coulomb energy sum(r1,r2)(rho[r1]*rho[r2]/(r1-r2)) Or an expression containing function calls sum(i,j)(f(i)*g(j)*A[i,j])) Ultimately, 'sum' and other reduction would actually be just one use case. One could even use the same mechanism to construct arrays from expressions. auto A = array(a=0:10,b=0:20)(2*a + b%3) (Disregard the exact syntax here...) I will think further about this and try to come up with more specific use cases. Greetings, Norbert
Thank you. I understand the difficulty of finding good examples. I did take a look at my own research, but didn't find any good examples of complex, single line expressions. Somehow, this feels like a narrow problem area; simple things are easy to express using array ops, really complex things take multiple lines to express and should really be done with loops in the first place. Finding the middle ground and then finding a concise way of correctly expressing it both seem like difficult problems, though definitely ones worth investigating. Anyways, I've taken a look at the new examples: Let Map create an infinite array whose elements are generated via function calls. (I've run into the function call issue before) Let Index = Map!"a" or something similar Let .B!D denote broadcasting an array along the D dimension Let .* denote the element wise multiply. Practically, you might want to use .A and .M to switch between element-wise array and matrix style math. Practically, both Map and .B require the concept of one or more dimensions which are 'unbounded'. Unbounded dimensions become bounded when they interact with any operation that does bounds checking with a bounded dimension. sum(r1,r2)(rho[r1]*rho[r2]/(r1-r2)) => sum( rho.B!1.*rho.B!0./( Index.B!1 - Index.B!0 ) ) sum(i,j)(f(i)*g(j)*A[i,j])) => sum( Map!f.B!1.*Map!g.B!0.*A ) auto A = array(a=0:10,b=0:20)(2*a + b%3) => auto A = take([0,10],[0,20], 2*Index.B!1 + Index.B!0 % 3 ); auto A = take( Map!"2*a + b%3"[0..10,0..20] ) Although the ideal syntax is definitely shorter and a bit more readable than the array ops version, the array ops seems more concise than the delegate based alternative: sum( Map!((int i, int j){ return rho(i)*rho(j)/(i-j); })[0..rho.length,0..rho.length] ); By the way, I'd recommend keeping all these examples for use in your documentation, as people don't naturally think in arrays and array ops.
Feb 27 2010
Ary Borenszweig <ary esperanto.org.ar> writes:
Norbert Nemec wrote:
Hi everybody,
thinking about array expressions, I have stumbled over an interesting
challenge for which I still have no idea:
Consider the mathematical sum notation:
\sum_i a_i*b_i
here, the variable i is defined only at the scope inside the expression.
A analogous D syntax could be something like
sum!(i)(a[i]*b[i])
where sum would have to be some kind of template that takes i as a name
parameter and then defines it as variable inside the scope of the second
expression.
You are missing i's initial and ending values. I think it should be something like: sum!("i", 0, n)(a[i]*b[i])
Feb 26 2010
Norbert Nemec <Norbert Nemec-online.de> writes:
Ary Borenszweig wrote:
Norbert Nemec wrote:
Hi everybody,
thinking about array expressions, I have stumbled over an interesting
challenge for which I still have no idea:
Consider the mathematical sum notation:
\sum_i a_i*b_i
here, the variable i is defined only at the scope inside the expression.
A analogous D syntax could be something like
sum!(i)(a[i]*b[i])
where sum would have to be some kind of template that takes i as a
name parameter and then defines it as variable inside the scope of the
second expression.
You are missing i's initial and ending values. I think it should be something like: sum!("i", 0, n)(a[i]*b[i])
I assumed them to default to the array boundaries, but that does not really matter at this point.
Feb 26 2010
"Robert Jacques" <sandford jhu.edu> writes:
On Fri, 26 Feb 2010 10:49:30 -0500, Norbert Nemec
<Norbert nemec-online.de> wrote:
Ary Borenszweig wrote:
Norbert Nemec wrote:
Hi everybody,
thinking about array expressions, I have stumbled over an interesting
challenge for which I still have no idea:
Consider the mathematical sum notation:
\sum_i a_i*b_i
here, the variable i is defined only at the scope inside the
expression.
A analogous D syntax could be something like
sum!(i)(a[i]*b[i])
where sum would have to be some kind of template that takes i as a
name parameter and then defines it as variable inside the scope of the
second expression.
You are missing i's initial and ending values. I think it should be something like: sum!("i", 0, n)(a[i]*b[i])
I assumed them to default to the array boundaries, but that does not really matter at this point.
Detecting those array boundaries is not an easy task. For example, if you take the expression in as a delegate you can't detect which ranges are used in it.
Feb 26 2010 | 2016-05-04 15:41:43 | {"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.4370911121368408, "perplexity": 3187.1762656779806}, "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-2016-18/segments/1461860123151.14/warc/CC-MAIN-20160428161523-00117-ip-10-239-7-51.ec2.internal.warc.gz"} |
https://www.eathyreading.website/2022/05/rate-of-interest-r-of-lump-sum.html | # INTEREST RATE(r) OF LUMP SUM CALCULATOR
Enter the present value, future value and the number of years. Don't forget to choose the compounding frequency.
Compounded annually Semi-annually Quarterly Monthly weekly daily
## Frequently Asked Questions on Interest rate in Lump sum
### Formula for calculating the rate of interest of a lump sum
Assuming present value, future value and the number of years is known, the annual rate of interest can be computed as follows:
$$r=m ×\left(\left(\frac{FV}{PV}\right)^{\frac{1}{nm}}-1\right)$$
Where,
m is the compounding frequently (yearly, semi-annually, quarterly, monthly, weekly or daily
FV is the future value of the lump sum
PV is the present value of the lump sum
## Proof of the rate of interest of lump sum formula
We can proof that the formula of annual rate of interest rate of using the future value of lump sum formula.
We know that FV is calculated as follow:
$$FV=PV\left(1+\frac{r}{m}\right)^{n×m}$$
To obtain the formula for rate of interest, we simply make r the subject of the formula
$FV=PV\left(1+\frac{r}{m}\right)^{n×m}$
First, we divide both side by PV
$\frac{FV}{PV}=\left(1+\frac{r}{m}\right)^{n×m}$
Next, we multiply the power of both sides by $\frac{1}{nm}$
$\left(\frac{FV}{PV}\right)^{\frac{1}{n×m}}=1+\frac{r}{m}$
Now, let's substract one from both sides
$\left(\frac{FV}{PV}\right)^{\frac{1}{nm}}-1=\frac{r}{m}$
Finally, we multiply both sides by m
$m\left(\left(\frac{FV}{PV}\right)^{\frac{1}{nm}}-1\right)=r$
$r=m\left(\left(\frac{FV}{PV}\right)^{\frac{1}{nm}}-1\right)$
If you like, you can open the bracket,
$r=m\left(\frac{FV}{PV}\right)^{\frac{1}{n×m}}-m$
Help us grow our readership by sharing this post | 2022-12-09 22:40: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.5767349600791931, "perplexity": 1331.4130243713391}, "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-49/segments/1669446711552.8/warc/CC-MAIN-20221209213503-20221210003503-00365.warc.gz"} |
https://www.jiskha.com/questions/255458/a-ferris-wheel-28-0m-in-diameter-rotates-once-every-21-0s-what-is-the-ratio-of-a-persons | # math
A Ferris wheel 28.0m in diameter rotates once every 21.0s.
What is the ratio of a person's apparent weight to her real weight at the top?
What is the ratio of a person's apparent weight to her real weight at the bottom?
1. 👍
2. 👎
3. 👁
1. radius, r = 28/2 m =14 m
Period, T = 21 s
angular velocity, ω = 2π/21 rad/s
Centrifugal force, f= mrω²
actual weight, w = mg
apparent weight at top, wt = mg -f
apparent weight at bottom, wb = mg+f
Solve for f and calculate wt/w and wb/w.
1. 👍
2. 👎
2. so i have a question how do you solve for f if there is no m?
1. 👍
2. 👎
3. the m's cancel at some point in the equation
1. 👍
2. 👎
## Similar Questions
1. ### n
A ferris wheel is 20 meters in diameter and boarded from a platform that is 1 meters above the ground. The six o'clock position on the ferris wheel is level with the loading platform. The wheel completes 1 full revolution in 6
2. ### Trig
A ferris wheel is 20 meters in diameter and boarded from a platform that is 3 meters above the ground. The six o'clock position on the ferris wheel is level with the loading platform. The wheel completes 1 full revolution in 6
3. ### Math
Here is the question : A Ferris wheel is 40 meters in diameter and boarded from a platform that is 5 meters above the ground. The six o'clock position on the Ferris wheel is level with the loading platform. The wheel completes 1
4. ### math-precalculus
A Ferris wheel is 50 meters in diameter and boarded from a platform that is 1 meters above the ground. The six o'clock position on the Ferris wheel is level with the loading platform. The wheel completes 1 full revolution in 6
1. ### Mathematics
A Ferris wheel of diameter 16 m rotates at a rate of 0.4 rad/s and is lifted 2m off the ground. If a platform is made so passengers can board at the centre height of the ferris wheel as it goes up, a) Determine the amount of time
2. ### Physics
Unlike a roller coaster, the seats in a Ferris wheel swivel so that the rider is always seated upright. An 80-ft-diameter Ferris wheel rotates once every 24 s. A. What is the apparent weight of a 60 kg passenger at the lowest
3. ### Physics
A particular Ferris wheel takes you through one complete revolution every 25.3 seconds. If the radius of the Ferris wheel is 10.4 m, and your mass is 63.3 kg, calculate: (a) Your apparent weight, in N, when you are at the top of
4. ### Math
a ferris wheel with a 40-ft diameter rotates once every 30 seconds. the bottom of the wheel is located 1.5 feet above the ground. you get on at the very bottom of the ferris wheel at time t = 0 and then the ferris wheel begins to
1. ### precalculus
A Ferris wheel is 25 meters in diameter and boarded from a platform that is 2 meters above the ground. The six o'clock position on the Ferris wheel is level with the loading platform. The wheel completes 1 full revolution in 4
2. ### Physics
A Ferris wheel with radius 9.8 m rotates at a constant rate, completing one revolution every 36.6 s. Suppose the Ferris wheel begins to decelerate at the rate of 0.227 rad/s2 when a passenger is at the top of the wheel. Find the
3. ### trig
A ferris wheel with a diameter of 100 feet rotates at a constant rate of 4 revolutions per minute. Let the center of the ferris wheel be at the origin. 1. Each of the ferris wheel's cars travels around a cirlce. a) Write an
4. ### Math Help Please I Don't Understand
A Ferris wheel has a diameter of 60 feet. When you start at the bottom of the Ferris wheel, you are 2 feet from the ground. The Ferris wheel completes one rotation in 2 minutes. Create a function that represents your height | 2022-01-29 14:02:28 | {"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.8411729335784912, "perplexity": 907.4636948579183}, "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/1642320306181.43/warc/CC-MAIN-20220129122405-20220129152405-00609.warc.gz"} |
https://www.mathway.com/examples/finite-math/estimation-and-sample-size/finding-standard-error?id=302 | # Finite Math Examples
,
Step 1
To find the standard error of the mean, divide the standard deviation by the square root of the number of samples.
Step 2
Fill in the known values.
Step 3
Simplify the expression. | 2022-06-24 21:47:09 | {"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.9066298604011536, "perplexity": 1246.9625225380928}, "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-27/segments/1656103033816.0/warc/CC-MAIN-20220624213908-20220625003908-00742.warc.gz"} |
https://ai.stackexchange.com/questions/24040/computation-of-initial-adjoint-for-node | # Computation of initial adjoint for NODE
I'm reading the paper Neural Ordinary Differential Equations and I have a simple question about adjoint method. When we train NODE, it uses a blackbox ODESolver to compute gradients through model parameters, hidden states, and time. It uses another quantity $$\mathbf{a}(t) = \partial L / \partial \mathbf{z}(t)$$ called adjoint, which also satisfies another ODE. As I understand, the authors build a single ODE that computes all the gradients $$\partial L / \partial \mathbf{z}(t_{0})$$ and $$\partial L / \partial \theta$$ by solving that single ODE. However, I can't understand how do we know the value $$\partial L / \partial \mathbf{z}(t_1)$$ which corresponds to the initial condition for the ODE corresponds to the adjoint. I'm using this tutorial as a reference, and it defines custom forward and backward methods for solving ODE. However, for the backward computation (especially ODEAdjoint class in the tutorial) we need to pass $$\partial L / \partial \mathbf{z}$$ for backpropagation, and this enables us to compute $$\partial L / \partial \mathbf{z}(t_i)$$ from $$\partial L / \partial \mathbf{z}(t_{i+1})$$, but we still need to know the adjoint value $$\partial L / \partial \mathbf{z}(t_N)$$. I do not understand well about how pytorch's autograd package works, and this seems to be a barrier to understand this. Could anyone explain how it operates, and where $$\partial L / \partial \mathbf{z}(t_1)$$ (or $$\partial L / \partial \mathbf{z}(t_N)$$ if this is more comfortable) comes from? Thanks in advance.
Here's my guess for the initial adjoint from simple example. Let $$d\mathbf{z}/dt = Az$$ be a 2-dim linear ODE with given $$A \in \mathbb{R}^{2\times 2}$$. If we use Euler's method as a ODE solver, then the estimate for $$z(t_1)$$ is explicitly given as $$\hat{\mathbf{z}}(t_1) = \mathrm{ODESolve}(\mathbf{z}(t_0), f, t_0, t_1, \theta))= \left(I + \frac{t_1 - t_0}{N}A\right)^{N} \mathbf{z}(t_0)$$ where $$N$$ is the number of steps for Euler's method (so that $$h = (t_1 - t_0) /N$$ is the step size). If we use MSE loss for training, then the loss will be $$L(\mathbf{z}(t_1)) = \Bigl|\Bigl| \mathbf{z}_1 - \left(I + \frac{t_1 - t_0}{N}A\right)^N\mathbf{z}(t_0)\Bigr|\Bigr|_2^2$$ where $$\mathbf{z}_1$$ is the true value at time $$t_1$$, which is $$\mathbf{z}_1 = e^{A(t_1 - t_0)}\mathbf{z}(t_0)$$. Since adjoint $$\mathbf{a}(t) = \partial L / \partial \mathbf{z}(t)$$ satisfies $$\frac{d\mathbf{a}(t)}{dt} = -\mathbf{a}(t)^{T} \frac{\partial f(\mathbf{z}(t), t, \theta)}{\partial \mathbf{z}} = \mathbf{0},$$ $$\mathbf{a}(t)$$ is constant and we get $$\mathbf{a}(t_0) = \mathbf{a}(t_1)$$. So we do not need to use augmented ODE for computing $$\mathbf{a}(t)$$. However, I still don't know what $$\mathbf{a}(t_1) = \partial L / \partial \mathbf{z}(t_1)$$ should be. If my understanding is correct, since $$L = ||\mathbf{z}_1 - \mathbf{z}(t_1)||^{2}_{2}$$, it seems that the answer might be $$\frac{\partial L}{\partial \mathbf{z}(t_1)} = 2(\mathbf{z}(t_1) - \mathbf{z}_1).$$ However, this doesn't seem to be true: if it is, and if we have multiple datapoints at $$t_1, t_2, \dots, t_N$$, then the loss is $$L = \frac{1}{N} \sum_{i=1}^{N}||\mathbf{z}_i -\mathbf{z}(t_i)||_{2}^{2}$$ and we may have $$\frac{\partial L}{\partial \mathbf{z}(t_i)} = \frac{2}{N} (\mathbf{z}(t_i) - \mathbf{z}_i),$$ which means that we don't need to solve ODE associated to $$\mathbf{a}(t)$$.
First, a forward pass is done to obtain predictions of $$z$$, at every $$t$$. Then the adjoint state is run backward in time for every $$t$$. Which gives the learning impulse. So an initial run is done to obtain values of the dynamical system at all time points and the last of these is the initial point for the backward pass. | 2022-05-25 03:36:58 | {"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": 35, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9347826838493347, "perplexity": 164.6078817115361}, "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-21/segments/1652662578939.73/warc/CC-MAIN-20220525023952-20220525053952-00727.warc.gz"} |
https://kopavgulddhme.web.app/87084/81162.html | # Jamtlands lan - Sveriges geologiska undersökning
Pricing Synthetic CDO Tranches in a Model with Default - GUP
Annals of Effects of urban matrix on reproductive performance of. Introduces the martingale and counting process formulation swil lbe in a new chapter and extends the material on Markov and semi Markov formulations. edge reuse: A Markov decision process approach. Journal of The affect based learning matrix. Doctoral Thesis Research and development intensity. av S Javadi · 2020 · Citerat av 1 — Variant illumination, intensity noise, and different viewpoints are 3 matrix. The main application of the proposed system is change the reference surface is considered on the ground/road in order to simplify the detection process of in optical aerial images by a multilayer conditional mixed Markov.
Reuter and Lederman (1953) showed that for an intensity matrix with continuous elements q^j(t), i,j € S, which satisfy (3), solutions f^j(s,t), i,j € S, to (4) and (5) can be found such that for The intensity matrix captures the idea that customers flow into the queue at rate $$\lambda$$ and are served (and hence leave the queue) at rate $$\mu$$. A pure birth process starting at zero is a continuous time Markov process $$(X_t)$$ on state space $$\ZZ_+$$ with intensity matrix 12 MARKOV CHAINS: INTRODUCTION 147 Theorem 12.1. Connection between n-step probabilities and matrix powers: Pn ij is the i,j’th entry of the n’th power of the transition matrix. Proof. Call the transition matrix P and temporarily denote the n-step transition matrix by In Chapter III we introduce the intensity of passage matrix, Q. Tweedie (1975) gave conditions on a Q-matrix which guaranteed that there exists a unique Markov chain with Q as its intensity matrix. In such a case the chain is said to be regular.
In a transition rate matrix Q (sometimes written A) element qij (for i ≠ j) denotes the rate departing from i and arriving in state j. Markov process intensity matrix 1 X is a Markov process with state space (1, 2, 3).
## Default Contagion in Large Homogeneous Portfolios
This system of equations is equivalent to the matrix equation: Mx = b where M = 0.7 0.2 0.3 0.8!,x = 5000 10,000! and b = b 1 b 2! Note b = 5500 9500!. For computing the result after 2 years, we just use the same matrix M, however we use b in place of x.
### MARKOV MODEL - Avhandlingar.se
Section 3 considers the calculation of actuarial values. In Section 4, we discover the advantage of the time-homogeneity or constant intensity assumption. We relax this the Markov chain with this transition intensity matrix is ergodic. To explain our method with more details, notice that (1.1) guarantees the absolute continuity of the distribution for (t)-Markov chain with respect to the distribution for-Markov chain.
and b = b 1 b 2! Note b = 5500 9500!.
Köpa ett lagerbolag
Transition intensity matrix in a time-homogeneous Markov model Transition intensity matrix Q: r;s entry equals the intensity q rs 2 6 4 q 11 = P s6=1 q 1s q 12 q 13 q 1n q 21 q 22 = P s6=2 q 2s q 23 q n q 32 q 3n 3 7 5 Additionally de ne the diagonal entries q rr = P s6=r q rs, so that rows of Q sum to zero. Then we have: I Sojourn time T r (spent in state r before moving) has Our result is motivated by the compound Poisson process (with discrete random i.i.d. variable Y j and a Poisson counting process It is shown that the stochastic process X t = D t mod n is a Markov process on E with a circulant intensity matrix Q and we apply the previous results to calculate, e.g., the distribution and the expectation of X t The process provides a stochastic model for,e.g., channel assignment in telecommunication, bus occupancies, box packing etc. the Markov chain with this transition intensity matrix is ergodic.
1. Introduction. A discrete-state continuous-time stationary Markov process may be Thus a CTMC can simply be described by a transition matrix P = (Pij), describing how the chain changes state step-by-step at transition epochs, together with a set In probability theory, a transition rate matrix is an array of numbers describing the instantaneous rate at which a continuous time Markov chain transitions bivariate Markov chain where one process is a failure pro- cess and Ω x Ω- dimensional joint intensity matrix is defined analogous to (2):. (16). Q* = Q\U,V) 11 Aug 2020 birth-death process intensity matrix and two clearly identified These describe the rate at which a continuous-time Markov chain transitions or.
Faktorer
We say that an The discrete time and state stochastic process X = {Xt; t = 0, 1, 2, } is said to all the past values, then X is a Markov chain with some transition matrix. ⎩. ⎨. ⎧ . Markov Process. • A time homogeneous Markov Process is characterized by the generator matrix Q = [qij] where qij = flow rate from state i to j qjj = - rate of which constitute a family of stochastic matrices. P(t)=(pij(t)) will be seen to be the transition probability matrix at time t for the Markov chain (Xt) associated to.
Note b = 5500 9500!.
Bas latest songs
ligurien resmål
träna grammatik svenska
hur länge får en eu migrant stanna i sverige
ingångslön socionom
jobb försäkringskassan göteborg
mosasaurier länge
thomas karlsson varberg
### Browse by Type - SODA
29, no. 7,. av G Östblom · Citerat av 7 — calculated by exploiting the environmental accounting matrix of Sweden for 2000 within sector in the intensity of carbon emissions as well as in the intensities of SO2 and NOx SO2 and NOx are emitted at different stages of the production process, from raw materials to A Hidden Markov Model as a Dynamic Bayesian. such a Markov chain and denote its transition probability matrix by £ and its initial ancestor gives birth at the time points of a Poisson process with intensity λ . izes local blood oxygenation changes which are reflected as small intensity changes in a the second derivative responses after diagonalizing the Hessian matrix. purpose, Markov chain Monte Carlo (MCMC) simulation algorithms for the Matrix describing continuous-time Markov chains.
Coop bageri finspång | 2022-07-06 03:10: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": 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.8075225353240967, "perplexity": 1496.884540098635}, "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-2022-27/segments/1656104660626.98/warc/CC-MAIN-20220706030209-20220706060209-00106.warc.gz"} |
https://www.semanticscholar.org/paper/Magnetars-origin-and-progenitors-with-enhanced-Popov-Prokhorov/be9e55c11783840f58eb52d495cbf77caf8e06f0 | # Magnetars origin and progenitors with enhanced rotation
@inproceedings{Popov2005MagnetarsOA,
title={Magnetars origin and progenitors with enhanced rotation},
author={Sergei B. Popov and Mikhail E. Prokhorov},
year={2005}
}
• Published 19 May 2005
• Physics
Among a dozen known magnetar-candidates there are no binary objects. As an estimate of a fraction of binary neutron stars is about 10% it is reasonable to address the question of solitarity of magnetars, to estimate theoretically the fraction of binary objects among them, and to mark out the most probable companions. We present population synthesis calculations of binary systems. Our goal is to estimate the number of neutron stars originated from progenitors with enhanced rotation, as such…
13 Citations
## Tables from this paper
Rapidly rotating neutron star progenitors
• Physics
• 2016
Rotating proto-neutron stars can be important sources of gravitational waves to be searched for by present-day and future interferometric detectors. It was demonstrated by Imshennik that in extreme
Magneto-rotational and thermal evolution of young neutron stars
After a brief review of population synthesis of close-by cooling neutron stars, I focus on the interpretation of dichotomy of spin periods of near-by coolers. The existence of two well separated
Period clustering of anomalous X-ray pulsars
• Physics
• 2014
The question of why the observed periods of anomalous X-ray pulsars (AXPs) and soft gamma-ray repeaters (SGRs) cluster in the range 2–12 s is discussed. The possibility that AXPs and SGRs are the
Formation rates and evolution histories of magnetars
• Physics
Monthly Notices of the Royal Astronomical Society
• 2019
We constrain the formation rate of Galactic magnetars directly from observations. Combining spin-down rates, magnetic activity, and association with supernova remnants, we put a 2$\sigma$ limit on
General relativistic models for rotating magnetized neutron stars in conformally flat space–time
• Physics
• 2017
The extraordinary energetic activity of magnetars is usually explained in terms of dissipation of a huge internal magnetic field of the order of $10^{15-16}$G. How such a strong magnetic field can
A scenario of the formation of isolated X-ray pulsars with anomalously long period
• Physics
• 2014
A scenario of the formation of isolated X-ray pulsars is discussed with an application to one of the best studied objects of this class 1E 161348-5055. This moderately luminous, 1033–1035 erg s−1,
Magnetars: the physics behind observations. A review.
• Physics, Medicine
Reports on progress in physics. Physical Society
• 2015
A comprehensive overview of magnetar research, in which the observational results are discussed in the light of the most up-to-date theoretical models and their implications address the more fundamental issue of how physics in strong magnetic fields can be constrained by the observations of these unique sources.
An XMM-Newton and NuSTAR study of IGR J18214-1318: a non-pulsating high-mass X-ray binary with a neutron star
IGR J18214-1318, a Galactic source discovered by the International Gamma-Ray Astrophysics Laboratory, is a high-mass X-ray binary (HMXB) with a supergiant O-type stellar donor. We report on the
Central Compact Objects in Kes 79 and RCW 103 as ‘Hidden’ Magnetars with Crustal Activity
• Physics
Publications of the Astronomical Society of Australia
• 2015
Abstract We propose that observations of ‘hidden’ magnetars in central compact objects can be used to probe crustal activity of neutron stars with large internal magnetic fields. Estimates based on
Origin of Sources of Repeating Fast Radio Bursts with Periodicity in Close Binary Systems
It is proposed that sources of repeating fast radio bursts with detected periodicity are magnetars with extremely short initial spin periods at the protoneutron star stage, formed in binaries after
## References
SHOWING 1-7 OF 7 REFERENCES
Interacting Binaries: Saas-Fee Advanced Course 22. Lecture Notes 1992. Swiss Society for Astrophysics and Astronomy
• Physics
• 1994
Observations and Physical Processes in Binary Stars.- Topics in the Theory of Cataclysmic Variables and X-Ray Binaries.- Interacting Binaries: Topics In Close Binary Evolution.
Stellar Evolution
Stellar EvolutionAn Exploration from the Observatory. By Otto Struve. Pp. xiv + 266 + 17 plates. (Princeton, N.J.: Princeton University Press; London: Oxford University Press, 1950.) 25s. net.
Advances in Space Research
• Advances in Space Research
• 2004
Proc. of IAU Symp. 215 'Stellar Rotation
• Proc. of IAU Symp. 215 'Stellar Rotation
• 2003
Proc. of IAU Symp. 215 'Stellar evolution
• Proc. of IAU Symp. 215 'Stellar evolution
• 2003
Astronomy Letters
• Astronomy Letters
• 1998
Astrophys . and Space Science Rev
• Astrophys . and Space Science Rev
• 1996 | 2022-01-20 01:22: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": 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.4958971440792084, "perplexity": 7257.001950000707}, "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-05/segments/1642320301670.75/warc/CC-MAIN-20220120005715-20220120035715-00535.warc.gz"} |
http://mathhelpforum.com/trigonometry/166011-trigo-print.html | # trigo
• December 12th 2010, 06:59 AM
prasum
trigo
a triangle is formed by drawing tangents at A,B,C to the circumcircle of triangle ABC prove that the perimeter of this triangle is 2RtanAtanBtanC where R is the radius of circumcircle.
• December 12th 2010, 07:53 AM
snowtea
See the diagram.
Attachment 20070
This shows 1/3 of the proof.
Consider the part of the external triangle opposite angle A. Call angle A theta.
The diagram shows that the length for the part of the triangle opposite angle A is
2*R*tan(theta) = 2*R*tan(A)
Note: The 2*theta is measured from the center of the circle.
Repeating the procedure for the parts opposite B and C and summing, we get:
Perimeter = 2*R*tan(A) + 2*R*tan(B) + 2*R*tan(C) = 2R(tan(A) + tan(B) + tan(C))
Is this the formula you want to prove?
• December 12th 2010, 09:21 AM
Soroban
Hello, snowtea!
Lovely work!
You found that: . $\text{Perimeter}\:=\:2R\left(\tan A + \tan B + \tan C)$
. . which involves the sum of the tangents.
The original equation has the product of the tangents.
But not to worry . . . Here's a surprising theorem:
. . In $\Delta ABC\!:\;\tan A + \tan B + \tan C \;=\;\tan A\tan B\tan C$
Proof
$A + B + C \:=\:180^o \quad\Rightarrow\quad A + B \;=\;180^o - C$
Take tangents: . $\tan(A + B) \;=\;\tan(180^o - C)$
. . . . . . . . . $\dfrac{\tan A + \tan B}{1 - \tan A\tan B} \;=\;-\tan C$
. . . . . . . . . . $\tan A + \tan B \;=\;-\tan C + \tan A\tan B\tan C$
. . . . $\tan A + \tan B + \tan C \;=\;\tan A\tan B\tan C$
• December 13th 2010, 05:48 AM
prasum
Quote:
Originally Posted by Soroban
Hello, snowtea!
Lovely work!
You found that: . $\text{Perimeter}\:=\:2R\left(\tan A + \tan B + \tan C)$
. . which involves the sum of the tangents.
The original equation has the product of the tangents.
But not to worry . . . Here's a surprising theorem:
. . In $\Delta ABC\!:\;\tan A + \tan B + \tan C \;=\;\tan A\tan B\tan C$
Proof
$A + B + C \:=\:180^o \quad\Rightarrow\quad A + B \;=\;180^o - C$
Take tangents: . $\tan(A + B) \;=\;\tan(180^o - C)$
. . . . . . . . . $\dfrac{\tan A + \tan B}{1 - \tan A\tan B} \;=\;-\tan C$
. . . . . . . . . . $\tan A + \tan B \;=\;-\tan C + \tan A\tan B\tan C$
. . . . $\tan A + \tan B + \tan C \;=\;\tan A\tan B\tan C$
thanks | 2015-05-04 15:42:22 | {"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": 14, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.953150749206543, "perplexity": 853.0210308722434}, "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/1430454576828.73/warc/CC-MAIN-20150501042936-00093-ip-10-235-10-82.ec2.internal.warc.gz"} |
https://www.semanticscholar.org/paper/A-limit-law-for-the-most-favorite-point-of-simple-a-Biskup-Louidor/17095b52253e90eaeee0dbc24ee63901c0169bc6 | • Corpus ID: 244347165
# A limit law for the most favorite point of simple random walk on a regular tree
@inproceedings{Biskup2021ALL,
title={A limit law for the most favorite point of simple random walk on a regular tree},
author={Marek Tomasz Biskup and Oren Louidor},
year={2021}
}
• Published 18 November 2021
• Mathematics
: We consider a continuous-time random walk on a regular tree of finite depth and study its favorite points among the leaf vertices. We prove that, for the walk started from a leaf vertex and stopped upon hitting the root, as the depth of the tree tends to infinity the maximal time spent at any leaf converges, under suitable scaling and centering, to a randomly-shifted Gumbel law. The random shift is characterized using a derivative-martingale like object associated with square-root local-time…
1 Citations
### Exceptional points of two-dimensional random walks at multiples of the cover time
• Mathematics
Probability Theory and Related Fields
• 2022
We study exceptional sets of the local time of the continuous-time simple random walk in scaled-up (by $N$) versions $D_N\subset\mathbb Z^2$ of bounded open domains $D\subset\mathbb R^2$. Upon exit
## References
SHOWING 1-10 OF 45 REFERENCES
### Convergence in Law for the Branching Random Walk Seen from Its Tip
Consider a critical branching random walk on the real line. In a recent paper, Aïdékon (2011) developed a powerful method to obtain the convergence in law of its minimum after a log-factor
### Maximum and minimum of local times for two-dimensional random walk
• Y. Abe
• Mathematics, Physics
• 2014
We obtain the leading orders of the maximum and the minimum of local times for the simple random walk on the two-dimensional torus at time proportional to the cover time. We also estimate the number
### Some problems concerning the structure of random walk paths
• Mathematics
• 1963
1. In t roduct ion . We restrict our consideration to symmetric random walk, defined in the following way. Consider the lattice formed by the points of d-dimensional Euclidean space whose coordinates
### Convergence in law of the minimum of a branching random walk
We consider the minimum of a super-critical branching random walk. Addario-Berry and Reed [Ann. Probab. 37 (2009) 1044–1079] proved the tightness of the minimum centered around its mean value. We
### Decorated Random Walk Restricted to Stay Below a Curve (Supplement Material)
• Mathematics
• 2019
We consider a one dimensional random-walk-like process, whose steps are centered Gaussians with variances which are determined according to the sequence of arrivals of a Poisson process on the line.
### Convergence in law of the maximum of nonlattice branching random walk
• Mathematics
• 2014
Let $\eta^*_n$ denote the maximum, at time $n$, of a nonlattice one-dimensional branching random walk $\eta_n$ possessing (enough) exponential moments. In a seminal paper, Aidekon demonstrated
### Thick points for planar Brownian motion and the Erdős-Taylor conjecture on random walk
• Mathematics
• 2001
and conjectured that the limit exists and equals 1/Tr a.s. The importance of determining the value of this limit is clarified in (1.3) below, where this value appears in the power laws governing the
### The structure of extreme level sets in branching Brownian motion
• Mathematics
The Annals of Probability
• 2019
We study the structure of extreme level sets of a standard one dimensional branching Brownian motion, namely the sets of particles whose height is within a fixed distance from the order of the global
### Asymptotics of cover times via Gaussian free fields: Bounded-degree graphs and general trees
In this paper we show that on bounded degree graphs and general trees, the cover time of the simple random walk is asymptotically equal to the product of the number of edges and the square of the | 2022-09-28 14:00:39 | {"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.8302680253982544, "perplexity": 727.8933932700342}, "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-40/segments/1664030335254.72/warc/CC-MAIN-20220928113848-20220928143848-00417.warc.gz"} |
https://community.nintex.com/t5/Nintex-Workflow-Cloud-Forum/Why-do-some-form-workflows-include-the-quot-Code-to-embed-form/td-p/202882 | Forms Fledgling
## Why do some form workflows include the "Code to embed form" field and others do not?
I have noticed that randomly some form-based workflows do not include the "Code to embed form" field when they are published. Indeed, I think I have seen this field appear later for some forms.
Is there a way to control this? Why not always include the embed code?
I have a new form I need to embed and there is no embed code.
Labels: (1)
2 Replies
Process Pupil
## Re: Why do some form workflows include the "Code to embed form" field and others do not?
Hi @msalamon ,
for NWC start form this is dependant on whether the form is for authenticated users or anonymous.
You will see the embed code if it is set to anonymous.
Cheers,
Gavin
Forms Fledgling | 2021-05-08 19:02:15 | {"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.8553209900856018, "perplexity": 2773.609893158682}, "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/1620243988923.22/warc/CC-MAIN-20210508181551-20210508211551-00424.warc.gz"} |
https://www.impan.pl/~biuletyn/st-j270.html | Given a metric space $(X,d)$, one defines a subalgebra of the space of operators on $l_2(X)$ called the uniform Roe algebra of $(X,d)$, denoted $C_u^*(X)$. This is the closure of the algebra of finite-propagation operators. The study of these algebras comes from the fact that $C_u^*(X)$ catches algebraically some of the large scale geometrical properties of $X$. Uniform Roe algebras have therefore an intrinsic relation with coarse geometry and the coarse Baum-Connes conjecture.
In recent year, much work was dedicated to show which geometric properties are preserved by isomorphisms of Uniform Roe algebras. Namely, if $C_u^*(X)$ and $C_u^*(Y)$ are isomorphic, how much do $X$ and $Y$ look alike? We pose the same question for Uniform Roe corona algebras.
Since $C_u^*(X)$ contains all compact operators, we can define the natural quotient $Q_u^*(X)=C_u^*(X)/K(l_2(X))$, the Uniform Roe corona algebra of $X$. Which geometric properties do the spaces $X$ and $Y$ share, when an isomorphism between $Q_u^*(X)$ and $Q_u^*(Y)$ is given? For example, must $X$ and $Y$ be coarsely equivalent, or even bijectively coarsely equivalent? (Two spaces are coarsely equivalent if they look the same when the observer is far from them).
We answer these questions with the aid of some set theory, in particular of Forcing Axioms. Forcing Axioms are generalizations of the Baire category theorem. They are alternative to the Continuum Hypothesis, and they're at the base of many rigidity phenomena observed in the theory of quotients (both discrete such as Boolean algebra quotient, and continuous, as the Calkin algebra or corona $C^*$-algebras). The talk starts with introducing the objects in play. The goal is to state the main results, and at least sketch the salient points of their proofs. We conclude with a list of open questions. This is joint work with Bruno Braga and Ilijas Farah. | 2019-05-24 15:33:25 | {"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.8692598938941956, "perplexity": 220.62133637964283}, "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-22/segments/1558232257660.45/warc/CC-MAIN-20190524144504-20190524170504-00114.warc.gz"} |
https://genome.sph.umich.edu/w/index.php?title=Special:MobileDiff/9822&mobileaction=toggle_view_mobile | # Changes
## RAREMETALWORKER METHOD
, 12:14, 1 April 2014
Single Variant Score Tests
$\mathbf{V}=(\mathbf{G}-\bar{\mathbf{G}})^T (\hat{\boldsymbol{\Omega}}^{-1}-\hat{\boldsymbol{\Omega}}^{-1} \mathbf{X}(\mathbf{X^T}\hat{\boldsymbol{\Omega}}^{-1}\mathbf{X})^{-1} \mathbf{X^T} \hat{\boldsymbol{\Omega}}^{-1})(\mathbf{G}-\bar{\mathbf{G}})$.
Under the null, The score test statistics statistic $T_i=(U_i^2)/V_{ii}$ is asymptotically distributed as chi-squared with one degree of freedom.
== Summary Statistics and Covariance Matrices==
2,004
edits | 2022-11-28 07:49:32 | {"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.61733478307724, "perplexity": 11027.039415325311}, "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-49/segments/1669446710488.2/warc/CC-MAIN-20221128070816-20221128100816-00539.warc.gz"} |
https://edspace.american.edu/jeffadler/too-much-traveling-not-enough-editing-fall-2005/ | [Note 2019: I was recently forced to port my website to a new format, and all of the internal links were broken. I might fix them eventually, but those that link to another part of the same page are lowest priority. This page has a lot of them.]
#### Postings:
Posted 2005/11/13, with a few words changed later
Since it’s my first, it’s a big one. I’ve got a lot of catching up to do.
#### Culture shock
Before flying to India, I stayed overnight in a hotel just across from the Frankfurt train station. It’s one of these places with tiny rooms, but nonetheless with all of the amenities that you really want. In this case, that means a free minibar, the psychological effect of which cannot be overstated.
After a long series of flights, taking a taxi in from the Delhi airport, through the roads crowded with animals and pedestrians (all of which are just narrowly missed by the vehicles), and surounded by shanties, my thoughts cycled between “it’s exhilarating to be back” and “why did I put myself here again?” So it was sort of like downhill skiing, but with less snow.
#### Getting lost
Dipendra, my Indian host, lives in Bombay. He was good enough to arrange lodging for me at the Indian National Science Academy’s guest house. But my taxi driver couldn’t find INSA, which is located in a district known as I.T.O. (for “Indian Tax Office”). First, he took me to the sales tax office. Then, the income tax office. After asking directions, we traveled through a maze of little alleyways. And eventually found our target, which was indeed in a prominent location.
At the reception desk I asked: If I go into town and want to take a taxi back, what do I tell the driver?
Answer: “Just say I.T.O. Everyone knows I.T.O.”
Strangely, she a would turn out to be right. Not that it mattered, because soon I knew my way around.
#### Problems of shyness
India gives me a better appreciation for how autistic people must feel. If you look like a Westerner, but are shy around strangers, then you are out of luck here, at least in the city. As you walk down the street, expect rickshaw drivers to pull up and ask you where you want to go. “No thanks” or “I’m just walking” might not be enough to pursuade them to move on. This is discomfiting, but benign.
And it is hard to ignore vendors and taxi drivers who shout “Sir! Sir!” in the tone that you reserve for someone who is inadvertantly walking away with your umbrella.
Less benign, but still not dangerous: In certain parts of town, expect a stranger to strike up a conversation. At some point, he’ll tell you that there’s nothing interesting in the direction you are headed, and he’ll suggest a different direction. One man follwed me for over ten minutes.
The key to dealing with this is to know in advance that it will happen, and to understand his motivation. He wants to deliver you to a store, thereby earning a commission. Since this is included in the price, this is not the best way to shop.
#### Non-shopping
India is a paradise for people who love to shop. But since I am not one of those people, I must appreciate India in other ways.
Before I buy something, it is not enough for me to want it. I also have to be in the mood to do business. When someone is pushing something on me, that always puts me out of the mood. This is sad, since there were indeed some items pushed on me that I might have wanted. Postcards, anyone?
But some vendors don’t seem to understand the concept of not-in-the-mood-to-buy. If I say no, they just offer a lower price. Eventually, the price can drop from cheap to essentially free. People seem genuinely mystified when I still don’t buy.
#### Concerning two fluids
Many vehicles in Delhi run on compressed natural gas, and I’m told that this has greatly improved the air quality. But it’s hard to imagine how it used to be. As it is now, when you blow your nose at the end of the day, the tissue is blackened.
It’s at times like this that I am grateful for snot. Someone needs to fill in the blank: Baruch ata adonai
#### Scam avoided
I took a rickshaw to the New Delhi railway station to buy a ticket to Agra. On the way, my driver said, “The ticket office will be very busy at this hour. I can take you to another office, and then to the station.”
Me: “No, thanks. I’ll just check out the station anyway.”
After some silence: “The ticket office will be closed at this hour. I can take you to another office instead.”
Me: “I’ll just check out the station anyway.”
Eventually, we reached a sign pointing to the station, but not the station itself. At the side of the road was a shop labeled “Booking Office”, but it wasn’t part of the station.
“You hurry into the office. It’s about to close. Then I take you into the station. I wait. Okay?”
Me: “That’s not necessary.” I got out of the rickshaw, paid (I shouldn’t have), and walked the remaining 100 yards through a crowded intersection and into the station.
What was the scam? He was probably trying to deliver me to an office that would sell me a fake, or altered, and definitely overpriced ticket. For this, he would receive a commision.
#### Treatment of foreigners
It seems that many of the strangers I encounter are involved in schemes to rip off foreigners. [Updated: see the endnote.] I always thought that America was an unfriendly place for tourists, in that we mostly speak only English, don’t have maps posted all over the place, and don’t always have good public transit, or even clear signage. But in most cases, the prices we charge are not based on how much of a sucker we think you are. So I’m revising my opinion upward.
On the other hand, it’s hard to know how we would behave if we were poor and most foreign visitors were visible, rich, and clueless.
In most countries, one expects foreigners to be subject to more suspicion. But in India, visible foreigners (or at least white Westerners, and possibly east Asians and black Africans) get something of a free ride. At many historical sights, museums, cinemas, etc., everyone has to pass through metal detectors and submit to pat-downs. At INSA, I even saw people patted down on their way out. But I was always taken less seriously as a security risk. After all, since I don’t look Indian, I’m probably not Pakistani.
I fear that it’s only a matter of time before some terrorist organization takes advantage of this situation. There are plenty of Westerners who are gullible or pliable enough to take part in some damn-fool plot.
#### Not missing the train to Agra; another scam avoided
Saturday (29 Oct) was my first time boarding a moving train, at least with heavy luggage. But it’s a good thing that I made it on, since the station was shut down a few hours later (see below).
When I arrived at the station in the morning, my first stop was the “International Tourist Bureau”, a special office for foreigners, since I had a question. It’s a good thing I wasn’t there to buy a ticket; the queue for that was well over an hour long. The queue for asking a question wasn’t that short, either. Eventually, I decided to bag it, and to wait in a nearby chair, since I wouldn’t expect to find a place to sit on the platform itself.
There I chatted for over an hour with a middle-aged couple from Edinburgh. (Should be careful about that term; I am now middle aged.) They had bought a ticket on line, but were now told that it wasn’t “confirmed”, and were asked to wait (and wait) for further information. Gradually, they learned that their train was full but that, for a fee, they could get a refund. Just as I was about to leave, they learned that they could get a seat on the next day’s train. So their plan was to try to find a room in one of the cheap backpacker hotels in the neighborhood across from the station.
Then I headed out for the platform. On the way, I passed through the main hall. A driver immediately asked me where I wanted to go.
“Here. The train station.”
“Is your train going to Agra?”
“Yes.”
“Right this way, sir!” he said, attempting to lead me out of the station. It didn’t work.
I arrived at my platform. The trouble is, the train is very, very long. How do I know which car is mine? I asked, and was pointed toward the front of the train. So away I went, with my luggage, along the densely populated platform, for several minutes. When it was clear that I’d gone in the wrong direction, I headed back. This took even longer. Suddenly, the train started to move. Fortunately, it accelerates slowly. Apparently, it is normal for passengers to get out, walk around, buy snacks, etc., and re-board at the very last minute.
I jumped onto the nearest car. So I had to pass through many others in order to reach my assigned seat, but at least I was on.
The train station was closed later that day because of the bombings, one of which occured in the neighborhood where the Edinburgh couple was considering staying. I doubt that they were hurt, since I would have heard. But at the very least, their travel must have been delayed further.
#### A word about the bombings
They claimed over 50 lives, putting them on the same scale as the London bombings of July 7. Did they get the same press coverage in the U.S.?
A previously dormant terrorist group has claimed responsibility for the bombings. However, everyone believes that the real culprit is Lashkar-e-Taiba, which is to India what al Qaeda is to the West. Most of their activity has been in Jammu and Kashmir, but in recent years they have branched out. For example, two years ago there was a car bombing near the Gateway of India, a major Bombay landmark.
#### Communication difficulties
Arriving at the Agra Cantonment station, I took a taxi to my hotel. The driver did not speak English, but on the way out of the station, he picked up his “uncle”, who did.
“Where are you from?”
“The United States”.
“Which state? America, England, Japan…?”
“America.”
“America! Very good. Double-you George Bush: you like?”
“Not so much.”
“Many people here like him not so much. But his father: he was good!”
I kept my silence, since I didn’t know a simple way to convey, “Yes, relatively speaking,” or “Yes, in retrospect.”
#### Agra
I had made my Agra hotel reservation at a government tourist office in Delhi. You can generally count on government agencies not to rip you off, but given the dodginess of so many of the people I had dealt with, what would I find?
Answer: Unimaginable luxury. They had a big, fancy lobby, a 24-hour reception desk staffed by people whose English was better than my French. And a restaurant serving Indian, Chinese, and Western food, all of which I deemed safe. Salad! Challah rolls! Cut fruit! Cakes with creamy filling!
I asked the maitre’d what is the custom in such a restaurant concerning tips. But he couldn’t understand what I was talking about. Could I try to say it some other way? “You know, when you leave a little extra money on the table?” He still didn’t understand.
The next day, I came up with a better way to say it: “Service charge.”
Nearby, there’s an internet cafe that is built in a first-world style. I can’t get a decent connection, but somehow, kids are involved in chat sessions and multi-player games.
To get there, I go around the block, via an alley that sometimes has goats. Beside the alley is what looks like an abandoned construction site. Imagine one floor of a parking garage with rebar sticking out the top of the pillars, and no roof. People are living in it.
Agra is home to the Taj Mahal and the Agra Fort, and it’s not far from the abandoned city of Fatehpur Sikri. But I promised not to say anything about sights…
…except that the souvenir sellers at Fatehpur Sikri were the most aggressive I’ve seen yet. So are the guides, so I hired one. Of course, he was in league with some of the vendors, particularly the ones who sold magical cloths for tying around the pillars when you go into the shrine to make a wish.
But I didn’t believe their claim that all of the money (or any of it) would go to “the orphans”. And anyway, I’m not into the magical power of objects. The concept seems un-Jewish.
On Monday morning I headed out to Allahabad via a train ticket that Dipendra was good enough to buy for me. He even delivered it to me personally when we were both in Germany. The only trouble is, the train departed from Tundla, some distance from Agra. I hate not knowing where I am, so I did a Google search, and the most detailed mention I could find involved a mishap in the travel diary of someone called “Disaster Dave”.
I hired a taxi (always an uncomfortable transaction if you don’t have a sense of the proper price) to Tundla, and made it in good time. At the train platform, I had a shoe shine, and gave money to a few of the many beggars, but stopped when I ran out of small change.
For most of my stay in India, I have not been within sight of any other visible foreigners. But eventually a Japanese man shows up, with a Japanese-speaking Indian guide. After I’ve determined that we’re on the same train, I watch them like an eagle. Otherwise, how can I be sure which train is mine?
Train travel itself can be quite comfortable. “First class” doesn’t mean that the furnishings are luxurious, but it does mean that four people are seated in a space that can easily handle six. For most of the trip, it was just me, a railway worker, a few roaches, and rat: plenty of room for all!
#### Problems of shyness, Part II
My train arrived an hour late, and in darkness. A car was supposed to meet me, but I couldn’t see it, nor was anyone holding a sign. I was immediately set upon by drivers of taxis, auto-rickshaws, and cycle-rickshaws, all of whom wanted to take me to the hotel of my choice (or, more likely, theirs).
“No, thank you” doesn’t work. Neither does “I am waiting for a friend”.
I looked around the station, drivers in tow. I called the institute. The gate-house guard gave me the car’s license plate number, and suggested that I look around the parking area. I did, drivers in tow. Porters, too. It’s kind of hard to search effectively under such conditions. I go back to the phone. “Where exactly are you?” the guard asks. “I’m at the phone booth.” The drivers were surrounding and staring at me the whole time.
The institute sent out another car. Soon after that, I found the first car, and stood beside it, along with the drivers and porters. After a few minutes, my driver saw me there, and off we went.
Shy people should not have to endure this.
#### Promised land
The driver brought me into the loving embrace of the Harish-Chandra Research Institute, where I am writing this. Gardens! Open countryside! It’s as if I’ve never seen them before. Did I mention clean air?
Harish-Chandra is the patron saint of harmonic analysis on reductive groups. He deserves such a place.
My second night here, I attended a Diwali celebration, organized by the students. The first part (which I missed) involved the worship of Lakshmi, the goddess of prosperity. But given that this is a research institute for math and physics, the students added Saraswati, the goddess of knowledge. They had prepared elaboarate Rangolis, which are like paintings on the floor, but made of colored rice.
They organized a fireworks display. This was in the old-fashioned style, where the fireworks are right there in front of you, set off by the grad students and the young children of the faculty. Meanwhile, a continuous chorus of booms could be heard from the nearby villages. (It actually started the previous evening, and continued for several days.) Then followed a meal. Then the students engaged in a sort of Hindi drinking game, but without the drinks.
After a few days, Dipendra and his family arrived. That afternoon, we all took a row-boat trip a few miles upriver, to the confluence of the Ganges and Yamuna rivers. On our way back from the boat, we walked through an ashram.
It’s not every neighborhood that contains an ashram, an estate, and a government-funded research institute. Still, the surrounding villages are quite poor.
Food in India is problematic. Generally speaking, foreigners should only eat food that has been freshly cooked, boiled, or peeled. This rules out salads.
But my diet here at HRI is in other respects better than my usual one. Everything is made fresh from scratch. (Indeed, there’s no other choice.) If you walk into the kitchen at an odd hour, you might see, piled onto a sheet laying on the floor, a huge pile of carrots, onions, and other assorted vegetables.
#### Steinberg Festival
Dipendra used to be on the faculty here. One of his students, Shripad, has graduated and moved to Bombay, but still needs to go through the formality of defending his thesis. He external examiner, Nagaraj, from Chennai, also has to attend.
Given that so many people have to converge on this spot at this time, Dipendra decided some time back to organize an informal symposium on the work of Robert Steinberg. It was for non-experts, by non-experts. Like me: I was responsible for three hours of talks.
It seems that everyone has to use some Steinberg theorem at some point in their lives. Haven’t you?
Not only was the festival festive, but the night before the actual thesis defense, Shripad received an offer of a postdoc in Paris.
#### Sharing keys
At the HRI guest house, I had to share my room with Nagaraj for two days. This was not a problem, even though I only found out when he arrived at 8am.
Interestingly, we only had one key between us. This was also not a problem, as we had a brilliant sharing mechanism. There is a drop box at the reception desk. When you’re not using the key, just drop it in. If you need the key, and no one’s in the room, then ask the receptionist to unlock the box and retrieve your key.
If there is no receptionist on duty, which is often, then pick up the drop box, turn it upside down, and shake.
And this is only necessary when the box is actually locked.
#### Things I did not photograph
• The most beautiful street that I could find in Delhi. It was uncrowded and had clear, tree-lined sidewalks. But when I tried to take a snap, well-armed men asked me not to, and seeing as they were so polite, I elected to comply.
• Squalor. The living conditions in the slums have to be seen to be believed. But you won’t see them in my photos, since that would require me to take close-ups of people and their homes. This seems like too much of a violation of privacy.
• A cremation along the bank of the Ganges. Privacy, again.
Posted 2005/11/17, with three words added later
#### Indian Railways: “150 Years of Glorious Service”
With the Steinberg Festival concluded and school about to start, it was time for Dipendra to return to his home and my next stop: the Tata Institute of Fundamental Research, in Mumbai (colloquially and formerly Bombay). Thus, on Monday and Tuesday, I had a more authentic experience of Indian Railways: a 23-hour journey in “Sleeper Class”, which amounts to third class.
This was easier than my earlier journeys by train, since I wasn’t alone. Although Dipendra’s wife and 4-year-old daughter had left the previous day to prepare for a family event, he and his 7-year-old son Rohit traveled with me. (Or, rather, I traveled with them.)
I have never seen either of his children in a bad mood, and was looking forwarded to seeing if they could sustain this over a 24-hour period. In the case of Malika, I won’t get a chance to find out. But can Rohit?
In a word, yes.
Sleeper class is different from first class in the following ways:
• A compartment that would have held 4 in first class now has places for 6. When we fold down the various sleeping shelves, we get in effect two three-level (not two-level) bunk beds. This means that once the beds are set up, it is not possible to sit up straight, so you might as well go to bed.
• In addition to the six of us, lots of other people without reserved seats are hanging around. Either they stand in the aisles or, if any room appears, they join you in your seat. It was not unusual for me to wake up at night and find that someone was sitting on a free space on my bunk. In short, the trip was sometimes crowded.
• There is no air conditioning. But this is no problem in November. In fact, the night was quite cold. Fortunately, my itinerary includes stays in Berlin and Beijing, so I have plenty of warm clothing.
• There are more beggars.
But there were also some similarities between first and sleeper, such as:
• a rat.
At every stop, passengers get off the train to buy samosas and other snacks on the platform. Meanwhile, sellers of chai and toys pass through the train. Sometimes, they don’t get off until the train is moving at a brisk pace.
There are not as many beggars as you’d find on the street, but there are some. Some have various deformities. For example, one man had a broken forearm that was hanging loose.
Twice, I was approached by bands of hijras. In the West, some of them would be considered MTF transgendered, others intersexed, and others transvestites. Here they are considered to be a third sex, part of a tradition that goes back many generations in both Hindu and Muslim culture.
When out in public, their main function appears to be to act outrageously, with the idea that you will give them money to stop. However, I did not witness this directly. In each of my encounters, a few hijras entered the car, and one came right up to me, ignoring everyone else, clapped once, and put out her hand. (Feminine pronouns are traditional.) Not wanting to play along, I just froze. During the second encounter, she followed up by saying many things in one of the local languages, then touched my cheek and said, “Don’t touch me.” This got a laugh out of the other passengers, but I’m not sure at whose expense, if anyone’s.
Not counting people without reservations who muscled in on whatever personal space they could, the other occupants of our compartment were a couple and their teenaged-looking daughter. She and Rohit spent some time playing Snakes and Ladders, followed by a game that looked like Parchesi but apparently wasn’t. After my second encounter with the hijras the father told Rohit (in English) some of the things he should have said to defend his uncle (“uncle” being a generic term for a child’s male adult friend, or a title that children would use to address male adult strangers).
I didn’t do any reading. It seemed impractical given the rocking of the train, the noise, and (during the night) the poor lighting. I didn’t see anyone else reading, either.
But I wasn’t completely idle: I learned some math.
• Dipendra and I discussed representations of p-adic unitary groups, and their Fourier-Jacobi models.
• Rohit taught me to count to ten in Hindi.
There is no notion of “quiet time”. It’s not some party cruise, and people do try to sleep. However, passengers who board during the middle of the night have no inhibitions concerning loud talk, playing radios, etc. This together with the considerable noise of the train itself would have made it impossible to sleep were it not for my earplugs (thanks for the idea, Laura!).
There were no trash receptacles that I could see. Apparently, it is customary to throw your trash out the window. This includes paper boxes, plastic cups, and even glass bottles. Within and near the stations, I saw employees cleaning this up. But I doubt they can maintain any regular cleaning schedule over tens of thousands of route miles.
Near Bombay, the train passed through several tunnels. In America, it’s traditional to scream when the roller-coaster passes the top of its route. Analogously, here all the children seem to know that they should yell out the window while in tunnels. I suddenly realized that the other compartments of our car held a lot of children with healthy lungs.
#### TIFR
The Tata Institute of Fundamental Research is located near the tip of the Colaba peninsula, in the middle of a restricted naval compound. Thus, photographs are prohibited. According to a sign in my room, naval police will arrest offenders.
What a shame. The campus is quite beautiful, and sits on the shore of the Arabian Sea. I decline to say whether or not I can demonstrate any of this.
I am not allowed into any of the surrounding facilities. However, I am told that one of these contains a jogging track, and that no one will question my right to be there if I wear jogging clothes. (Too bad I don’t have such clothes, or I’d test this out.) It’s another example of Westerners not being taken seriously as security risks.
This is my second trip to TIFR. The previous one was a little over two years ago, during the monsoon season. Most days, I did not see the sky. Think Blade Runner. Rain was frequent and heavy. At least, it seemed heavy to me at the time, but it must have been light compared with this year. Back in July, Bombay saw 37 inches of rain in a single day, and much of the city was shut down. In the city and the surrounding state of Maharashtra, 1000 people died from drowning, mudslides, electrocution, etc. Over the following weeks, well over a hundred died of flood-related diseases.
But now the sky is clear. Perhaps because of this, the city appears more navigable then before, and I am looking forward to doing some exploring. Bombay is often described as “vibrant”, “exciting”, a “land of opportunity”, or a “shopper’s paradise”. I can finally see how this makes sense.
#### On giving to beggars
Since there is no social safety net, begging here is a more legitimate activity than it is at home. However, I am still not sure how I should respond. Some say that you should not give to children, since they are probably working for someone else. But how about elderly women?
One guide is to imitate the Indians around me. When a beggar approaches only me and ignores the Indians, I figure that I’m seen as an easy mark, so I don’t play along. (It’s true that I’m richer than the average person in the street, but most of them can afford to give 5 rupees if they feel like it.) If a beggar approaches many people, and some of them give something, then I might do so, too.
In any case, every time I don’t give to a beggar, I mentally increase the size of my next donation to the American Jewish World Service.
#### How do the poor survive?
I have asked several friends about this, and have formed opinions based on my interpretation of what they have said. But that doesn’t mean that my opinions are accurate. If a foreigner asked me how poor people in America live, I could certainly lay out some facts, but I might not have the whole picture.
I have been given two partly contradictory impressions.
First: The poor are engaged in a constant struggle for survival. If you’re poor, you don’t know how much money you’ll make today. If you don’t make enough money, then you won’t be able to eat, and so you’ll be weaker tomorrow, and even less able to earn money. Thus begins a downward spiral, at the end of which you die.
Second: While there is hunger in some villages, no one needs to go hungry in the cities. Reason: even a menial job like cleaning garbage out of the streets can earn you Rs 10,000 – 20,000 per month, and you can eat reasonably well on only Rs 50 per day.
Shelter, however, is another story. One friend says that in the cities there is no market in decent, middle class housing. “Decent” here means, among other things, that you have electricity and running water 24/7, rather than, say, for a few hours on alternate days. So for an urban worker the choices are as follows:
• Be rich.
• Live in the suburbs, and put up with a long, miserable commute.
• Get a high-enough-level job that it comes with housing. (Example: university student or teacher.)
• Make do with the sort of housing that you could never live in if you were not used to it.
In Bombay, I passed what looked like counterexamples to the above: apartments that looked decent enough on the outside, but that clearly weren’t fancy enough for rich people. But Dipendra said that the residents were probably upper-middle class, or had lived there for a long time.
But don’t take my impressions too seriously. Back in 1986, when I visited the Soviet Union, one of my goals was to get a sense of what ordinary people thought about their own government, Communism, America, etc. So I asked my contacts there (none of them Communists) what people in general thought. Here are three answers I received:
• Most people believe and support the government.
• Everyone hates the government.
• No one thinks about politics. They’re too busy drinking.
So my goal was unrealistic. But I should have known this; if a foreigner asked me what Americans in general think about world affairs, I wouldn’t have a good answer.
#### Giving a talk
In the math department, the colloquium is held on Thursdays. But I can’t give a talk next week, since I’m leaving early on Wednesday. Can I speak today (i.e., with three hours’ notice) on a work I’ve never spoken about before?
Since I am always up for a challenge (Note: This is false), I agreed to do so.
How it went: I think that parts were too elementary, and parts were too advanced. So on the average it was just right. At least, the audience threw no vegetables. Nor meats.
Posted 2005/11/19
The story is becoming more sedate. Since I am among friends, I have fewer opportunities for getting scammed.
(Actually, I’m on my own for a bit. Dipendra is off in the suburbs giving lectures to college teachers. On Saturday he’ll be in Bangalore, and Rohit and a group of children (millions of them, probably) will see the premier of Harry Potter and the Chicken Soup for the Soul, or whatever the latest installment is.)
#### Demons conquered
When I visited Bombay two years ago, I didn’t see much of the city due to a combination of my work schedule and illness. Apart from the beautiful TIFR campus, I mainly saw the area around the Gateway of India, and parts in between, i.e., Colaba peninsula, and my view was colored by the monsoon.
Though Colaba is a tourist destination, it is also crowded, seedy, and dirty. Without clear sunlight, it was hard for me to notice that there were hotels and restaurants that you might actually want to patronize (apart from the luxurious Taj Mahal Hotel, which is impossible to miss).
Not only was my opinion biased by weather and illness, but I extrapolated from it to other parts of town. Thus, I didn’t know if there were places to: sit in a coffee shop and read; have a relaxed dinner on a patio by the street; live in a Western, middle-class style.
Friday evening, I fixed that.
First, I visited a new neighborhood for me: Nariman Point. Here I could find rows of plausible-looking restaurants and shops, and I walked around mostly unmolested. True, the beggars would still walk beside me for a block, and there were a few people sleeping on sidewalks or medians, but no one was yelling at me. [Question: Why would you sleep on the median of a major road when there are broad expanses of quiet, unoccupied sidewalk nearby?] Several people said “Hello”, and I really believe that their only purpose in doing so was to say “Hello”.
There were still few foreigners around, but I was rarely the only one in sight, so I stuck out less.
The restaurant that I visited had a variety of Indian and “Continental” food, so I had a bit of each. There was was a bake shop attached, so I had a meringue, too. When it comes to inducing comfort, a little familiarity goes a long way.
From Nariman Point, I walked all the way to Colaba. Yes, it’s dirtier, and the beggars are more numerous and aggressive. But through some sort of acclimation process, the situation was now most tolerable. Moreover, I could now see the hotels, restaurants, and bars that I had missed two years before. Not as many as at Nariman Point, but enough.
#### Some cultural differences
• When two men hold hands, it only means that they are friends. Other forms of friendly bodily contact are also common, at least among younger people. And this is not confined to India. Three years ago, I saw inter-male hand-holding in Malaysia, a country that is not known for embracing certain kinds of, um, diversity.
• In America, when you lean on the horn, it means, “Get out of my way, you idiot!” But here the horn is rarely used in anger, and means one of the following:
• You are about to veer and/or step into my path. Please note that I have not slowed down, and act accordingly.
• I wish to affirm my existence.
• Please join with me in celebrating our common humanity.
[Note added 2005/11/20: the next posting contains an addendum to this list.] During daytime traffic, expect a cabbie to honk about six times per minute.
• In America, one drives on the right. In India, one drives in the center, but veers to the left when necessary to avoid either a median or a head-on collision.
#### Is India a third-world country?
At first, this question seems absurd. So many of the people live in poverty, and India’s UN Human Development Index is somewhat low. Judging by personal conversations and my reading of the newspapers, the government is widely seen as corrupt and ineffective (and so most of my contacts here don’t bother to vote). And labor is dirt-cheap, a boon to those who can afford to hire some.
Aren’t these all characteristics of third-world countries?
On the other hand:
• India has first-rate science. Not as much as it should have, given the size of the country, but still a lot. Of course, the USSR also had first-rate science, but that was because emigration was difficult, and because in a command economy you have a greater ability to artificially concentrate resources on showcase projects. (Thus Russia today still has good science, but much less of it.) While many of India’s brightest do indeed emigrate, those who stay do so by choice, not compulsion. So whereas the USSR struck me (in 1986, when I visited) as a poor country pretending to be rich, India is a poor country trying to get richer.
• Though written off decades ago as a Malthusian disaster, the country is self-sufficient in food.
• The economy is diverse, producing not just exportable goods but many of its own inputs. If this is also true of individual cities, then Jane Jacobs would approve.
• The economy, the poverty level, and the government could be a lot worse. This is the impression I get from chatting with a visiting neuroscientist who, though she is of Indian origin and speaks two Indian languages, is actually a fourth-generation east African, presently living in Kenya.
So we have a contradictory picture. Perhaps it’s simply too hard to sum up a country with a one-word label, even if it is hyphenated.
Posted 2005/11/20
You might notice that the amount of time between postings decreases by a factor of two each time. Since I write only finitely fast, this is not sustainable.
#### An important omission
Yesterday, I gave several possible meanings of leaning on the horn. But I forgot an important one:
• I am about to pass you.
In fact, many vehicles have “Horn, please” written along the back.
In Ohio, you’re supposed to give a toot when you pass, but you don’t lean on the horn. Not that anyone does either one…
#### Rant: Could the U.S. become a third-world country?
[This item grew large enough that I put it on its own page.] [Update, 2019. I was recently forced to port my website to a new format, and all of the internal links broke. Out of laziness, I’m not repairing the link to my thoughts from 2005, the details of which are of less interest today. To summarize, I thought that we were moving in the wrong direction, and have continued to do so since then in the sense that, more and more, we operate under rules that barely pretend to serve the public interest. But there is still a long way to go down. I don’t advocate burning down the house just because the refrigerator is unreliable.]
#### Another walk through the vibrant city
When I’m in the big city, I like to just walk around, stopping along the way for snacks, meals, drinks, and gawking. Somehow, it always seemed that this was not possible in Bombay; for example, I didn’t know of any comfortable place from which to gawk apart from, say, the hermetically sealed lobby of a luxury hotel (and it’s cheating to pretend to belong to the expense-account set).
This evening, I took another walk around Nariman Point and Colaba, just like last night, though along some different streets. I saw (and sometimes patronised) more and more restaurants, department stores, bakeshops, convenience stores. That is, I functioned in the way that is normal for me.
Well, mostly normal. Once, I was surrounded by beggar children who kept following me. For some reason I cannot fathom, they were satisfied when they pulled two pens from a side pocket of my backpack. What use are pens to a non-nerd? I was too surprised to say something like, “Children, your parents should spank you.”
During a five-minute period soon before I called it a night, various gentlemen offered me:
• something to smoke that probably wasn’t tobacco;
• a room;
• a girl;
• themselves.
However, at least on this particular evening, I wasn’t interested in any of the goods or services listed above, so I declined. But at least none of the gentlemen were pushy.
#### I Win!
After my first trip to India, I was utterly defeated. Normally, I can drop into an unfamiliar city and function just fine, even if I don’t know the language. Why not here?
The present trip is, among other things, a rematch. Towards the end of my stay in Delhi a few weeks ago, back when I was still traveling on my own, I was already starting to feel that I was getting the hang of things. That feeling has only increased.
I now know, for example, some places where local middle-class people (or lower-middle-class people who want to splurge) might go for a good meal, for coffee, or for people-watching. I know when I need to haggle (though I don’t always bother). I know how to get around (at least in the big city; the countryside is another matter entirely). I know how to not get anxious over touts. I know some neighborhoods (at least in Bombay) where I can walk around comfortably. This, despite the fact that I still have not taken a general city tour (which I hope to do Tuesday, making the situation even better.).
I win the rematch.
On the other hand, last time around, Dipendra and I solved the problem that we had set for ourselves, one that had been bugging me for about a dozen years. This time, so far, we have not.
So we’ll call it a draw.
Posted 2005/11/21
#### City tour; baffling incident; India epilogue
In Delhi a few weeks ago, I took a city bus tour offered by the government tourist office. All of the commentary was in English, and at least a third of it was in a form of English that I can understand. So it worked out rather well.
In addition, I managed to have some nice conversations with a fellow passenger.
But despite having spent a lot of time in Bombay, I had only seen the southern part of town, and had yet to take a city tour. I fixed that today.
This time, the commentary was in Hindi, so I understood slightly less than I did in Delhi. More worrisome, every time we stopped somewhere, I had to wonder where and when to meet the bus afterwards. Still, I managed never to get lost, and even had a few halting conversations with other tourists.
In accordance with my policy, I won’t describe the sights we saw. But I was glad to see a wider variety of neighborhoods than I had known before. I’d feel comfortable enough returning to any of these.
Since I was only taking the city tour, rather than the full-day, city-and-suburbs tour, the bus left me off in the northern part of town and continued on its way without me. Rather than taking a taxi all of the way home, I decided to take one only part way, grab a cup of tea, and then walk from there to a familiar place.
(Note: Cup-of-tea prices can range from Rs 5 to Rs 150, depending on the fanciness of the joint. If you go the fancy route, you are like Jennifer Lopez paying $10,000 for a normal-sized hotel room in New York. But you probably look different.) As I was walking toward Mumbai University, something happened that I can’t explain. Two men followed me as I crossed a busy street. At some point, they both touched my sandals. Why? I ignored this. Then they both grabbed my knees and tried to lift me up. I shook them off and shouted (quietly; I was too surprised to be loud) “What are you doing?”, and abruptly reversed direction. Personal space, you know. They gave me a baffled look, and made a gesture that looked to me like a request for money. What were they doing? We were in a crowd, and in the bright sunlight. So this was not an attempted mugging. And when you pick someone’s pocket (not that I would know, but you hear things), you either have to be subtle, so the mark doesn’t even know anything has happened, or you need for a friend to provide some sort of friendly misdirection while you exercise your five-finger stock options. So this wasn’t an attempted pocket picking. What was it? (But to illustrate the fact that India has no monopoly on bafflingness, here is quote from my mother: “Beacon headline today is that Summit County has enacted an indoor smoking ban, sort of, to start February 28. The ban includes restaurants and bars. Exemptions include Northfield Race Track, private homes, retail tobacco stores, part of hotel rooms and bowling alleys, and this interesting drafting: private adult nonprofit members-only clubs in free-standing buildings with a specific class of liquor permit, provided that they have no employees. What do you think is described here?”) I’m leaving India in a few hours. If I have any concluding thoughts about my experience here, I’ll post them (if at all) only after mulling them over for a bit. But for now, I’ll just say that I think that India is indeed manageable for a foreign visitor, provided that you can endure petty inconveniences with good humor. If you’re curious, ask me later what I think are the relevant dos and don’ts for you. Or, to paraphrase from a certain manual, I can tell you “things not to do and how to do them right”. [Return to top] Posted 2005/11/25 #### Table of Contents for today’s posting #### Bangkok: Culture shock of a different kind When you arrive at the airport, there are certainly plenty of taxi touts. I would have found this situation uncomfortable had I not become used to much worse in India. In most other respects, travel here is completely different, and I’m appreciating even pleasures that I had forgotten I was missing. There’s safe food and drink everywhere. I can eat salads even if they haven’t been soaked in a potassium permanganate solution. I can have foods involving cut fruit, even if I didn’t peel and cut it myself. Drinks made with ice are safe. Taxis use their meters. The ladies who yell “MAAAAA-SAAAAZH” take “No, thank you” for an answer. (To be fair: I think that most massage services here are legitimate.) In fact, almost everyone takes “No, thank you” for an answer. Exception: One guy who I couldn’t understand. Eventually, I realized what he was saying. “Younggirlyounggirlyounggirlyounggirl” “No, thank you.” “Youngboyyoungboyyoungboyyoungboy” No, thank you. “Whatyouwant? Whereyougoing?” … #### Don’t follow my nose Having a good sense of direction isn’t all it’s cracked up to be. If you and I are walking in an unfamiliar place, I probably can figure out how to get where we need to go. But: • You have to be willing to be lost for a while. So don’t follow me if you’re in a hurry. • Somehow, I have a knack for wandering into the least interesting parts of town. Once my parents made the mistake of letting me choose the walking direction in Canterbury. Soon, we were strolling beside people’s washing lines. Another time, my cousin Debby and I were walking near the Tower of London. Soon, we were headed down a street that had no retail establishments, and where trucks made up the majority of the traffic. Here’s an illustration of both of the above. I wanted to cross the river along the Rama IV bridge. It’s in sight, so why not just walk? Unfortunately, there’s a canal blocking my way. To get over the canal requires a long diversion. But making this diversion requires another diversion. Soon, I’m in a part of town where there are no signs in English and no visible foreigners. And now it’s completely dark. #### Speaking of my nose The pollution here is probably as bad as that in Indian cities. However, it’s different in character somehow. I’m guessing that it involves more chemicals, and less soot. So while I’m still grateful for snot, it’s less useful here. Meanwhile, I have come down with a bad cold. Could I have a little less snot, please? #### On the ubiquity of certain chain stores You won’t be surprised to hear that Starbucks shops have sprouted up like… well, Starbucks. However, 7-11 shops have sprung up like Starbucks’s much more successful cousin. It is not unusual to see two of them along the same block. Or two across the street from each other. Or both. So you could have three or more shops within sight at once. I have proof! Once, while in a cab, we passed five 7-11s in… fifteen seconds. Of course, we were moving rather fast, but still. #### My first-ever Thanksgiving away from family Thursday was Thanksgiving in the U.S. Some restaurants and hotels prepare a traditional Thanksgiving meal for homesick American expats. However, I didn’t make any effort to get in on any of these, having decided that Thanksgiving is tied not to my local time but to God’s Own Time: Eastern Time. So I didn’t feel that I was missing anything Thursday night. Friday morning, however, I gave the Folks a call. Since they were hosting not only my entire immediate family and the children thereof, but also some of my best friends, calling them was better than eating turkey. #### A taste of home While I had no turkey on Thursday evening, I did experience a taste of home. I was hanging out in a neighborhood where about a third of the people were (judging by overheard accents) European or Australian. Adding to the hominess was a familiar sight: A well-dressed, fresh-faced American-accented white guy shouting about the certain Doom we face if we do not understand the Bible in the correct Way, and take Heed. He made me feel like I was right back at the Universities of Akron and/or Michigan. However, I think that he could have maximized his expected impact by visiting a neighborhood filled with people who were displaying more upside potential. For example, there is a whole district devoted to strip shows and such, but that is elsewhere, and none were visible nearby. And if he didn’t want to go to the trouble of moving to another part of town, he could always have gone around the block and visited Chabad House. [Return to top] Posted 2005/11/27, with one sentence changed the next day There’s an oldie but goodie about an engineer, a physicist, and a mathematician who were traveling in Scotland and saw a black sheep. If you don’t remember it, then you might want to refresh your memory before reading the rest of today’s posting. #### Table of Contents #### In response to a question about that convenience store chain I was asked what the 7-11s carry. Well, they have all the usual flavors of Lay’s potato chips: Cheese ‘n’ Onion, Extra Barbeque, Nori Seaweed, Thai Chili Paste, Grilled Lobster. Many other products are also analogous to familiar ones: lots of instant noodle products, dried snacks (mango, tamarind, “sweeten plum”, salted plum), cereals (like Nestle Koko Krunch), and Asian analogues of Hostess-type products. Most important, they have Slurpees. Otherwise, they wouldn’t be real 7-11s. However, they do not have tofu jerky, and you’d better believe that I looked hard. The closest item I could find had the following list of ingredients: “pork, fat, sugar, salt, preservatives”. #### Churning the Lung Butter Last Friday, apart from getting an evening meal and posting something to this log, I never left my hotel room. My cold was just too severe. But some medication cured my nose and throat problems in the traditional way: by transferring them to the lungs. Still, by Saturday I was well enough to take a day trip out to see Ayuthaya and nearby sights. (I passed on the Day-Long Poultry Farm Tour, even though it was 50% off.) We traveled up by bus, and back by lunch-boat. There was plenty of scenery along the shores, and Mr. Bean on the TVs. A gang of schoolboys interviewed me, something that was apparently part of an assignment. But when they asked what I liked in Thailand, how could explain my answer, “safe food”? Since I’m not commenting here on the sights themselves, let me just remark that, despite being a direct descendant of that guy who was portrayed on Broadway for years, King Bhumibol bears no resemblance whatsoever to Yul Brynner. #### Backing up a statement I made earlier The other day, I said that I thought most massage businesses in Bangkok were legitimate. Here is an actual datum. Upon returing from my day trip, I took a walk through bits of Chinatown and down Silom Road. Then I had a one-hour foot-massage session. Actually, it was foot reflexology. The theory behind reflexology is that you can cure all sorts of aches and pains by manipulating various points on the foot. I neither believe nor disbelieve in this or similar theories (though, come to think of it, my nose-bridge sure is relaxed), but for me all that mattered was that my feet and lower legs felt great. Had I known that something this affordable would have worked so well, I would have had it done during every day of my short Bangkok stay. Strictly in the name of Science, of course. So, in the spirit of the black sheep story that you should have read earlier, I can now unequivocally state that at least one massage business in Bangkok is legitimate, at least some of the time. At least when it comes to massaging certain parts of the body. #### Why I can’t observe Bangkok objectively First of all there was my illness, which caused me to miss every single historic site in town. So it’s a good thing I wasn’t going to write about those anyway. Second, there’s the fact that I’m here for a tad under four days. Third, there’s the fact that I’m here purely as a tourist. I have no local business or local contacts of any kind. Finally, for now I can only see Bangkok in relation to India. I cannot see any reason why this would be considered a third world country. What with the sparkling mass transit system, the almost total lack of beggars, the relative (relative) dearth of scams, the ubiquity of safe food and drink, the general setup that assumes that a certain fraction of people around are foreigners, it’s at the moment hard for me to see anything else. (Like, say, the health system, rural living standards, the tax situation, the level of political corruption. Of these I know nothing.) #### Hong Kong: First three impressions (with more later) 1. Oh. 2. My. 3. God. [Return to top] Posted 2005/11/28 #### Interlude: I owe Judge Samuel Alito a debt of gratitude I am a some-time collector of kook and near-kook literature. Back when I was in college, a dissident alumni group, the Concerned Alumni of Princeton, published an alternative alumni magazine, Prospect. They were good enough to distribute copies to all dorm rooms on campus. I still have several issues in a box somewhere in a storage locker outside Akron, Ohio. According to a New York Times story that appeared on line just before I prepared my previous posting, Samuel Alito, the current Supreme Court nominee, was a member of CAP, at least during the time that I was reading Prospect. I should thank him for helping to finance my habit. Why did I collect Prospect? Since I don’t have access to my copies right now, I will only comment on a few items that I remember best, in order not to confuse CAP with the various alumni cranks who occasionally wrote letters to campus publications. (Sample sentiments that I think come from the latter: I am dismayed by the mongrelization of campus. Let’s have no more than 15% Jews, and 3% Asians and other minorities. Why are we letting in all of these big-SAT kids from New York City? Everything went to hell once they started admitting women. How dare you decline admission to my daughter when I’ve given you money!) Prospect was mostly serious, but occasionally tried to be funny. Once in a while, they succeeded, especially when it came to colorful phrases. I still remember “evangelical lesbians”. Unfortunately, the humor was often undermined by a tone of nastiness. They had a little news item on a woman who had previously obtained her job as a coal miner after a discrimination suit. Now she had become the first American woman to die in a coal mining accident. They linked this event to an ongoing campus controversy in a way that clearly meant, “Served her right”. Perhaps they would say that I am a stereotypical humorless liberal (SHL) for taking offense at this reading. In practice, I find SHLs to be more the exception than the rule. (After all, the term “politically correct” was originally one of liberal self-mockery.) But Prospect did tend to bring them out of the woodwork. One of the many student-run businesses on campus was the Prospect Removal Agency. For a fee, they would remove issues of Prospect from your doorstep within a few hours of delivery. Prospect‘s then-editor, Dinesh D’Souza, who went on to bigger things, responded appropriately, offering to perform the same service for a lower price. [Updated: see the endnote.] The campus humor magazine published a spoof of Prospect whose cover featured a bunch of folks in Klan outfits standing in front of Nassau Hall, the main administration building. The headine: Let’s Put The “Old” Back In “Old Nassau”. This also offended the SHLs. What really got Prospect in trouble was the heartbreaking story, mentioned in the New York Times, of a Puerto Rican mother whose daughter was sleeping with her boyfriend, and the university wasn’t going to do anything about it. On the contrary, if the mother cut her financial support, then the university would raise theirs. Although the article referred to the girl via a pseudonym, they included enough details to make her identity obvious to everyone at my end of campus who had a clue (i.e., probably everyone but me). Then, to make matters worse, in one instance they forgot to use the pseudonym. The article seems to have been based on the mother’s complaints. But judging by the observations of some students, she was not necessarily reliable, and her daughter had good reason to try to separate herself. This is not to say that the daughter was living what you might call a wholesome lifestyle. From what I hear, it was actually worse than anything described in Prospect. By the way: The girl’s boyfriend was the roommate of someone who until recently worked at the University of Akron’s Mathematics Department. If I had access to my literature collection, then I could write more about Prospect. But the two items above (the lady who Got What She Deserved, and the university’s Encouragement of Female Immorality) were not exactly outliers. The Times story has more information. Samuel Alito did not write these articles, or anything else in Prospect. Is his membership relevant? I certainly would not want to be held responsible for every word that has ever appeared in a publication to which I have subscribed. On the other hand, I used to be a financial supporter of an organization that does good work. Once, they engaged in a common fundraising practice that I find objectionable. So I objected, and when I received what I considered an unacceptable response, I withdrew my support. They are still a good cause, but there are many good causes in the world, and since I can support only a tiny fraction of them, I can be as selective as I wish, using whatever criteria I wish, and feel no twinge of conscience. So while I am not saying that Alito’s CAP membership should be a prime consideration, it is relevant, as is the fact that he himself thought his membership was relevant when he mentioned it while applying for a government promotion in 1985. Unfortunately for my habit, Prospect folded as I was finishing college. Later, I almost forgot about them: I moved to Chicago, where the analogous publication was much, much nastier, perhaps because it was run by students, not alumni. Let’s hope that they grew up, because they’re probably all in positions of power now. Sometimes less nasty, and usually more colorful, were the various leftist groups in Chicago. Among others, we (the community at large, not the campus) had the Maoists, the Trotskyites, and the Stalinists, all of whom probably hated each other. Sadly, most of these groups, left and right, stopped publishing in the late ’80s, though the Stalinists held on for a while, continuing to praise the Albanian government as an ideal for all the world to follow. I also heard of a revolutionary group whose members all had code names in preparation for the day when the revolution began and they’d have to go underground. I heard that they had about six members, but this was before they split in two over a doctrinal disagreement. But enough time on Memory Lane for now. Whenever I set up house again, as I’m unpacking my kook literature boxes, I’ll say a word of thanks to Judge Alito, or to Justice Alito, depending. [Return to top] Posted 2005/12/01 The other day, I forgot to mention something important: the Massachusetts-born King Bhumibol plays the saxophone. #### Today’s table of contents: #### Problems of Shyness III: Horror replayed as farce At Ayuthaya, the former capital of Thailand, over 100 schoolchildren were sketching the ruins from various angles, and taking directions from someone who had a loudspeaker. I do not understand Thai, but can interpolate the probable meaning of one of their instructions: “Notice the foreigners walking among us. Remember to say ‘Hello’.” #### Problems of corruption As I wrote earlier, I left Thailand knowing nothing about, say, the level of political corruption. Well, now I’ve learned something. The hugely popular Sky Train offers a quick way to travel around the parts of Bangkok that it serves, giving passengers a panoramic view of the gridlock below. Two extensions to the system are partially built, but have been stalled for several years. Why is that? Apparently, each political party is tied to some corresponding business interest. The Democrat Party is tied to the Sky Train builders. They presently control the city government, but not the central government. Ergo, it’s in the central government’s interest to stall or prevent construction. At least, that’s what the Bangkok newspapers seem to think. But recently, in response to public pressure, the central government had to relent, and approved further construction. Another reminder that the U.S. isn’t in the third world yet. #### Bad Tourist! Bad! No Souvenir! For several weeks after leaving India, my itinerary takes me every 3 or 4 days to another place that I’ve never been before. I do not endorse this mode of travel, at least for people who are like me. Here’s why. When your stay is short, and it’s your first visit, you have to spend proportionally a longer time getting your bearings, learning to say the basics (“Hello”, “Thank You”, “Excuse Me”, “Not In A Million Years”), and taking whatever naps are necessary in order to recover from travel and ward off illness. That leaves much less time for everything else. So I’m not going to have too much to say about the next few stops I make. For proof, go a few lines down. Moreover, I’m getting itchy to return to the Land and Home of, respectively, the Free and the Brave. #### Hong Kong Imagine a cross between New York City and science fiction, but in a Florida climate, and on a topography more jagged than that of San Francisco. #### An important lesson concerning that ubiquitous convenience store Suppose you’re walking around in one of the well-populated districts of Hong Kong, you see a 7-11 across the street, and decide that you have a powerful hankering for a Slurpee. Should you cross the street? No! 1. You’ll soon find another 7-11 on your side of the street. 2. In both of them, the Slurpee machine is broken. But it all other respects, Hong Kong is ahead of us in technology. #### Scam avoided: Hong Kong version Walking along Nathan Road, I was stopped numerous times by gentlemen, all of the same nationality (I won’t say which), who all wanted to make conversation about where I’m from, and who all said that they were tailors, and who all invited me to be fitted for a new suit. If you’ve seen me at a formal occasion, then you know that I could actually use a new suit. However, if I were in the mood to have a suit made for me, I’d choose a tailor based on recommendations, not based on whom I happened to meet on the street. And if I were a tailor, I would not be standing on street corners. Something’s not right about this. I should have thought about suits before I made the trip, and visited a tailor either in Hong Kong or India. Dang. #### My present whereabouts I’m sitting in an internet cafe in Manila. A Heroine of Free Enterprise is standing outside the door. She is waving at me frantically. Perhaps she wants to show me some free-market action. Milton Friedman would be proud. But I’m tired of saying, “No, thank you.” So to stall for a moment, let me just record the fact that, while shopping for snacks in the convenience store a few blocks away, I had a choice between ube bread and mongo bread. Let’s hope that I chose wisely. [Return to top] Posted 2005/12/06 [I have composed my next posting, but internet access is a bit inconvenient here in the People’s Republic, so I’ll wait to post it until I get back. For now, I’ll just say that the ube bread was delicious, and I’ll bet that the mongo bread would have been, too.] [Return to top] Posted 2005/12/13, but mostly composed much earlier, at least in rough form #### Today’s table of contents: #### The Philippines: Still bird flu free! The U. S. State Department is warning people against visiting the Philippines, mainly because of a home-grown terrorist movement. In addition, stories exist of travelers being robbed at gunpoint by taxi drivers. There are precautions that one can take against being a victim of either terrorists or taxi drivers, but it would be nicer not to have to worry. However, there were no terrorist incidents during my visit (though the American embassy was closed two days later because of a bomb threat), and not only did my drivers not rob me, but they even used their meters, a pleasant surprise. Upon arrival at the Manila airport, you learn: • they have the death penalty for drug traffickers; • they are bird flu free, and would like to stay that way; • the mayor of Pasay City, where the airport is located, is named Pee Wee Trinidad; • all major airports have ATMs, but it’s a bad idea to assume that all major airports have working ATMs. #### Economic conditions (Apart from first-hand observations, my information comes from two sources: my local contact at the University of the Philippines, and the tour guide for a day trip I took to the countryside. These two people are not connected, and yet their versions of reality meshed remarkably well.) The Philippines is a third-world country. Not only is the poverty visible, but when I asked my two sources how many people typically go to bed hungry, they both came up with the same figure: 70%! [Updated: see the endnote.] This is much higher than the analogous figure I was given in India. However they are not really comparable, since the Indian observers might be using different definitions of “hungry”. For example, my local contact, when pressed, said that he probably did have enough food growing up, but not enough nutrition. Both contacts also mentioned (with no prompting from me) the deep influence of the Catholic Church, and its opposition to certain reasonably effective forms of family planning. They cited this as one of the causes of poverty. The tour guide even mentioned that her husband’s family have condemned her as a bad Christian because she had a tubal ligation after having her second child. Too much information! Here is something I don’t understand. If the people listen when the church says, “Don’t use birth control”, why don’t they listen when the church says, “Don’t offer or accept bribes”? [Updated: see the endnote.] Manila has some people (including whole families) who sleep on the streets at night. But there are fewer of these than in Delhi and Bombay, and I am told that they generally have adequate lives to return to in the countryside, but are willing to endure street life in exchange for the economic opportunities of the city. #### How I am treated on the street I am less of an oddity here than I was in India, partly because the density of tourists is higher here, and partly because of the long local history of American military occupation. (Of course, I am enough of an oddity even when I’m at home.) Anyway, my treatment on the street here is thus much different than it was in India. For example, drivers do not stop to solicit business, and almost all vendors take “No, thank you” for an answer. The only exceptions are: • a woman who vends herself a few blocks from my hotel, and who feels that if she follows me for a half a block while pleading her case, then I might change my mind; • a guy outside my hotel who is vending other people. When I say, “No, thank you”, he always responds that he can get a “very young” girl. Unfortunately, I think that he’s telling the truth. But reporting him to the authorities would be like reporting Ohioans who disrespect red lights. The tour guide sounded shocked to hear about this. She had previously referred to the neighborhood as the “former” red-light district. By the way, no one in Manila ever offered me drugs. #### Universities and malls I visited the University of the Philippines, Diliman, the mathematical home of my local contact, and the leading university in the country. The campus is quite beautiful, even on a sometimes uncomfortably hot day, and a fleet of jeepneys helps the students get around. As is often the case in tropical architecture, the distinction between indoors and outdoors is sometimes blurred. For example, the hallways at the math department had cats. Among the cats, I got to do a little math, discussing nonunimodular groups as well as deformation quantization. A senior professor here can expect to earn around$600 per month, which is plenty for getting by. However, salaries are several times higher at the few private universities that cater to those children of the rich and influential who cannot pass the UPD entrance exams. (Apparently, wealth and influence only go so far, even here.) But the downside of such a job is having to deal with pressure from above to alter grades. (So wealth and influence do have value, after all.)
Filipinos love malls. (Is it okay to make such a blanket statement?) Here, in this third-world city, they have huge, beautiful shopping malls, built to what appears to be first-world standards. In any major city, you’d expect to see a few such places to cater to the foreigners and the local rich. But here, it seems like ordinary people can afford to hang out, and even shop. You just have to be willing to go through the metal detectors and endure possible pat-downs.
#### Let’s hear it for a skeptical press!
On December 2, the Manila Bulletin (“The Nation’s Leading Newspaper”) had a front-page story about the inaugural convocation of the “Universal Peace Federation” (UPF) in Manila. This was also the subject of the lead editorial, as well as a congratulatory message on the editorial page.
According to the Bulletin, the UPF is a project of that “world peace advocate and staunch supporter of interfaith cooperation”, the Rev. Sun Myung Moon. His entourage includes “peace leaders” such as…… Neil Bush.
#### Holiday cheer
The Philippines is even more Christmassy than Akron. The seasonal music starts in September, and it is relentless. Imagine Leroy Anderson’s Sleighride, but played with a syntho-pop beat, and very loudly. White Christmas is also popular, even though Manila has probably never seen one. There’s also the ever-present Chipmunks roasting on an open fire, or whatever it is.
I swear, every time I hear even one of the lesser-played bits of Handel’s Messiah, it’s so glorious that it’s almost enough to make me a believer. But then I hear yet another version of Jingle-bell Rock, and it’s back to my heathen Jewish ways. In the Philippines, the musical choices are such that my identity is secure.
#### Jeepneys!
The most charming sight in Manila is the constant flow of jeepneys. Imagine a bunch of surplus army jeeps, retrofitted as public transport vehicles by the addition of benches. Each vehicle is decorated differently: the more garishly, the better.
Unfortunately, as the old jeepneys wore out, they were replaced with new, purpose-built vehicles, which thus now have an underlying sameness, and the decorations are less garish than I’m told they used to be. But they’re still impressive.
About the decorations: Expect to see logos of American sports teams; pictures of Tweety Bird, Spider Man, saints, or horses; statements of faith in God or Jesus; miscellaneous slogans; or various combinations of the above. I would have paid money for a nice book of jeepney photos.
#### First impression of Beijing
Imagine glitzy neon lights grafted onto a soulless, wind-swept, Soviet-style police state. But maybe I’m biased, having arrived on a Sunday evening in winter. And as for the “police state” bit, you won’t suffer from repression unless you challenge the government’s authority in some way, and most people are too busy for this: the poor are scrounging for money or food, and the growing middle classes are texting each other at Starbucks.
Government troops did kill some unarmed demonstrators during my visit, but this sort of thing has rarely happened since the Tienanmen Square massacre. (And for Mom’s benefit, the demonstration was nowhere near Beijing.)
#### Communication difficulties
A huge number of people in China are studying English. This is a good thing, since if they didn’t, we’d probably eventually have to learn Chinese, and then we’d be sunk. Still, most people in Beijing know little or no English, and there are some simple ideas that can be difficult to convey with gestures alone, such as:
• Now that you have placed this ten-page menu before me, may I have a moment at least to peruse it before ordering?
• May I have another cup of tea? (This required conversations with three staff members.)
#### Briefly joining the People’s Liberation Army
I participated in a People’s Liberation Army march. Or rather, I was walking down the street past a military installation (remember how I have a talent for finding the least scenic routes?) when suddenly I was among soldiers marching in formation. If anyone got a picture of this, then my political career is shot, at least in America.
#### The Great Well-Known-Sight of China
I visited the part of this that most visitors to Beijing see. Since it’s a long climb to the highest tower, there is now a train that takes you half way up. It’s more like a Disney ride, except that you’re not strapped in securely. In order to make it the rest of the way to the top you have to be
• in good physical shape; or
• pig-headed enough not to quit even when you’re in great pain.
Fortunately, I am one of these.
#### Things not bought
Tourists in Beijing are often urged to visit the Silk Market or the Pearl Market. However, a Swedish woman I met at the Great Well-Known Sight told me that these are the sorts of places where you have to bargain hard. That is, offer 10% of the asking price, and expect to settle on 15%. She enjoyed this, but it doesn’t work for me.
(It’s good that she was around. After we climbed the Well-Known Sight, the nearby coffee shop tried to charge me and her party the equivalent of \$25, many times the going rate, for two tiny teas and three undrinkable coffees. I would have just paid, left, and felt exploited. She refused, plonked down something a bit more than the going rate, and directed us all to leave. No one arrested us.)
I was also told that these markets are the sorts of places where not only do the vendors not take “No” for an answer, but they’ll physically grab you. While it would be easy enough to ignore this, I was getting a bit cranky after almost two months outside my native country, so there was a danger that I might punch someone. Not visiting these markets was my way of promoting peace and nonviolence.
But silk and pearls weren’t the only commodities I failed to buy. Several times, I found myself near the Workers’ Stadium, and each time, I was offered drugs and women.
#### A common, unpleasant feature of tours
In many countries, when you take a tour, you can expect it to include a shopping trip to a place that pays a commision to the tour guide or operator, and that charges correspondingly exhorbitant prices. This is the case in parts of India, particularly Agra, unless you are dealing with the government tourist office. I was surprised to see this phenomenon also in Bangkok (though they tell you this up front, and make it easy for you to opt out), Hong Kong, and Beijing. The difference is that in India, the salespeople outnumber the customers, and the pressure is on.
As part of my trip to the Great Well-Known Sight of China (see above), we visited what was said to be an institute of traditional Chinese medicine. For some reason, they felt a need to display in their lobby pictures of all of the foreign dignitaries (e.g., Dr. Gro Harlem Brundtland) who have supposedly visited, as well as pictures of foreign doctors studying their methods, or something.
There’s something wrong if you scream, “Look! We’re legitimate!” too loudly.
They also had posters extolling the virtues of using the finest, most expensive ingredients, and not cutting corners on quantity.
Anyway, after hearing a brief talk about the wide interest in traditional medicine because of its “perfect results”, we were introduced to three professors (i.e., older guys in white coats), who offered to examine us in the traditional way. This involved taking our pulse in both wrists, and looking at our tongues and eyes.
Each person who submitted to this found that he had some problem that could be cured by herbal medicine, and that such medicine could be bought downstairs on our way out.
My own problem: “Low kidney energy.” I was told that this is causing my hair loss, among other things. Guess I’ll have to stop blaming my father for that. (But I can still blame him for my back troubles. Okay, it’s not his fault that I’m out of shape, but it’s his fault that I’m tall. So let’s split the blame fifty-fifty.)
I did look at the prices downstairs. They were beyond what most Chinese people could afford.
But maybe cheaper substances would also work. Here’s a headline from the December 7 China Daily: Dog Vomit Excites Traditional Doctors.
#### Getting out of a foul mood
During my last full day in Beijing, I visited the Forbidden City and the parks and lakes north of it. The buildings of the F.C. have colorful names, like the Hall of Scrupulous Behavior, the Hall for Observing Military Virtue, and (my favorite) the Hall of Central Extremity. These buildings are all many centuries old, if you don’t count the fact that they have been destroyed and rebuilt several times.
In fact, one creepy aspect that Beijing and Berlin have in common is that they are both old cities that contain almost nothing old. However, between the two cities, the reasons for this are very different.
I skipped Mao’s mausoleum since I’m not into pickled meats. Moreover, I had visited Lenin years ago, and he hadn’t been the thrill-ride-of-a-lifetime that some people expect.
Anyway, it was cold and windy, and I was eager to get back to the States, and was thus in a rather foul mood, which the Forbidden City did nothing to temper. But the parks and lakes heading northward are quite lovely even in winter. Eventually, I heard some syntho-pop Chinese music and came upon a small plaza.
There’s nothing to brighten your mood like a dozen middle-aged Chinese ladies dancing the moral equivalent of the macarena, while several elderly couples practice their ballroom dancing.
#### I’m back in the USA, and shovellin’ snow
No trip is complete without five hours worth of delays at O’Hare, so I made sure to fit that in. (It could have been worse; at Midway, Chicago’s other airport, a plane skidded off the runway and hit a car.) But eventually, I arrived in Detroit, where Loren was good enough to pick me up and take me to Ann Arbor.
Here would be a good place to record the Lessons Learned from my trip. But it’s too soon for me to formulate these, with one exception.
Since Loren’s a junior colleague, I can assign him a task. The next time I make elaborate travel plans, or indeed elaborate plans of any kind, he’s supposed to tell me that I’m too old for this.
He asked if it would be okay just to shout “Dooooooooon’t!”.
“No, whatever you say has to involve the word ‘old’.”
Knowing him, he’ll comply. But knowing me, I won’t listen. I’m a big fan of spending surplus money on experiences rather than on things. So my advice is: Do get out there. But keep it simple, okay?
Endnotes
Here is miscellaneous information I’ve learned since I wrote all of the above.
1. Job, my mathematical contact in the Philippines, has read this page, and wishes to revise his estimate of how many of the people over there are hungry: 80%![Return to main text.]
2. In response to my question about why, if so many people follow the directions of the Catholic Church, can’t the church just stamp out all corruption, Job expresses the opinion that the current president is a “really devout Catholic” and also “one of the most ruthless politicians around”.This doesn’t exactly answer the question, but it provides another counterexample to something or other.[Return to main text.]
3. The founder of the Prospect Removal Agency, Anthony Lovell, identified himself to me, and says:
As I recall, I only put up posters once advertising this service, to cause a stir. I did not care for D’Souza’s mean manner at all, plus he HAD come from Dartmouth. I am actually a conservative person, particularly by contrast here in my Cambridge place.
So the Agency mainly existed in the initial splash and in the reaction from D’Souza. Perhaps I was the one being a stereotypical humorless liberal (SHL) when I assumed that it was a serious operation.[Return to main text.]
4. [2006/03/27]: Muthu, a Chennai native who has read this page, points out that in Bombay he is presented with the same scams that I was. Evidently, some of what I labeled “Treatment of foreigners” is really “Treatment of out-of-towners”, and is analogous to, though more pervasive than, the three-card monte games that you sometimes see in New York City.[Return to main text.] | 2020-05-28 22:48:30 | {"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.34676799178123474, "perplexity": 2370.7649117563055}, "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/1590347400101.39/warc/CC-MAIN-20200528201823-20200528231823-00314.warc.gz"} |
http://worldquotations.com/quotes/Learning/23099/ | The best results are achieved by using the right amount of effort in the right place at the right time. And this right amount is usually less than we think we need. In other words, the less unnecessary effort you put into learning, the more successful you’ll be… the key to faster learning is to use appropriate effort. Greater effort can exacerbate faulty patterns of action. Doing the wrong thing with more intensity rarely improves the situation. Learning something new often requires us to unlearn something old.
The best results are achieved by using the right amount of effort in the right place at the right time. And this right amount is usually less than we think we need. In other words, the less unnecessary effort you put into learning, the more successful you’ll be… the key to faster learning is to use appropriate effort. Greater effort can exacerbate faulty patterns of action. Doing the wrong thing with more intensity rarely improves the situation. Learning something new often requires us to unlearn something old. | 2018-07-16 08:53:22 | {"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.8415354490280151, "perplexity": 1085.3797935182347}, "config": {"markdown_headings": false, "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-2018-30/segments/1531676589237.16/warc/CC-MAIN-20180716080356-20180716100356-00141.warc.gz"} |
http://math.stackexchange.com/questions/15749/stochastic-integral-and-stieltjes-integral?answertab=oldest | # Stochastic integral and Stieltjes integral
My question is on the convergence of the Riemann sum, when the value spaces are square-integrable random variables. The convergence does depend on the evaluation point we choose, why is the case. Here is some background to make this clearer. Suppose $f\colon \Re \mapsto \Re$ is some continuous function on $[a,b]$, the Stieltjes integral of $f$ with respect to itself $f$ is $\int^{b}_{a} f(t)df(t)$ if we take a partition $\Delta_n = \{t_0, t_1, \cdots, t_n \}$ of $[a,b]$ the Riemmans sums is $$L_{n} = \sum^{n}_{i=1} f(t_{i-1})(f(t_{i})-f(t_{i-1}))$$
Now if the limit exists say $\lim \limits_{n\to\infty} L_{n}= A$, then if we choose the evaluation point $t_{i}$ then the sum
$$R_{n} = \sum^{n}_{i=1} f(t_{i})(f(t_{i})-f(t_{i-1}))$$
will also converge to $A$ so $$\lim_{n\to\infty}L_{n} = \lim_{n\to\infty}R_{n} .$$ Now we apply same idea for a stochastic integral. Here $W(t)$ is a wiener process and we wish to find $$\int^{b}_{a}W(t)dW(t)$$ $$L_{n} = \sum^{n}_{i=1} W(t_{i-1})(W(t_{i})-W(t_{i-1}))$$
$$R_{n} = \sum^{n}_{i=1} W(t_{i})(W(t_{i})-W(t_{i-1}))$$ in $L^2$ norm the limits of $L_{n}$ and $R_{n}$ exist but are different $$\lim_{n\to\infty} \Vert R_{n}-L_{n}\Vert = b-a$$ can someone explain why the limits are different ? If the limit exists which in this case it does. I would have expected $\lim_{n\to\infty} \Vert R_{n}-L_{n}\Vert = 0$ in $L^2$ norm.
-
Maybe it has to do with the $L^2$ norm. After all, $||\textbf{x}|| = \sqrt{x_{1}^2+ \cdots + x_{n}^2}$. – PEV Dec 28 '10 at 16:59
I answered a similar question on MO a while ago. Maybe my answer there will help: mathoverflow.net/questions/16664/… – George Lowther Dec 28 '10 at 21:52
@George Lowther thank your answer is indeed very helpful – almost_sure Dec 28 '10 at 23:36
Limits of $R_n$ and $L_n$ coincide when Stieltjes integral exists. Existence of the Stieltjes integral does not follow from the existence of these limits. In general existence and definition of Stieltjes integral can be messy business as the Figure 2.1 in page 6 (page 10 of the ps file) of this document can attest.
-
thank you. I made the naive assumption if the limits $R_n$ and $L_n$ coincide then the stieltjes integral exists. thanks of the document – almost_sure Dec 28 '10 at 20:41
@almost_sure, you are welcome. I did not know that Stieltjes integrals can be complicated until I took a course where the professor was one of the authors of that document. – mpiktas Dec 28 '10 at 20:47
Hint 1:
The basis of the explanation is in the different behaviour of the increments $f(t_i)-f(t_{i-1})$ and $W(t_i)-W(t_{i-1})$. The increments of the first are $O(t_i-t_{i-1})$ those of the second are $O(\sqrt{t_i-t_{i-1}})$.
Hint 2: $$R_n - L_n =\sum_{i=1}^n \left[ f(t_i)-f(t_{i-1}) \right]^2$$ and likewise for $W(t)$.
-
First write $$R_n - L_n = \sum\limits_{i = 1}^n {[W(t_i ) - W(t_{i - 1} )]^2 },$$ then consider Quadratic variation of Brownian motion.
Thanks i understand why $R_n - L_n \to {\rm E}(Z_1^2)$ my question is, why does the evaluation point make such a difference when the sums converge in $L^2$ norm? but not in the real valued function case. like other posters said is it just have to do with the Norm. If the limit existed to me it seemed intuitive for $R_n - L_n \to 0$ in $L^2$ I am still not sure why this is not the case, the hint below have got me thinking it just the norms are different – almost_sure Dec 28 '10 at 20:20 | 2014-03-11 00:39: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.9416083097457886, "perplexity": 226.15645766085714}, "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/1394011070356/warc/CC-MAIN-20140305091750-00036-ip-10-183-142-35.ec2.internal.warc.gz"} |
https://math.stackexchange.com/questions/2194991/deriving-the-mathematical-model-for-augmented-dickey-fuller-test | # Deriving the mathematical model for Augmented Dickey Fuller test
This is a question on the mathematical derivation of the model used in the augmented Dickey Fuller test and hence, I choose not to raise this question in cross-validated.
If a process $\{X_t\}$ follows the AR(p) model with mean $\mu$ given by $$X_t - \mu = \phi_1(X_t-\mu)+ ... + \phi_p(X_{t-p}-\mu) + Z_t$$, where $\{Z_t\} \sim WN(0,\sigma^2)$
Question: How can I show that the above model can be rewritten as $$\nabla X_t = X_t - X_{t-1} = \phi^*_0 + \phi^*_1 X_{t-1} + \phi^*_2\nabla X_{t-1} + ... + \phi^*_p \nabla X_{t-p+1} + Z_t$$ , where $\phi^*_0=\mu(1- \phi_1 - ... - \phi_p), \phi^*_1 = \sum^p_{i=1}\phi_i-1, \phi^*_j = -\sum^p_{i=j} \phi_i, j=2,...p$ | 2019-11-14 13:39:44 | {"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.9516732692718506, "perplexity": 139.89049933935738}, "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-2019-47/segments/1573496668525.62/warc/CC-MAIN-20191114131434-20191114155434-00477.warc.gz"} |
https://stats.stackexchange.com/questions/446605/nested-uniform-distributions-in-monte-carlo-integration | # Nested Uniform Distributions in Monte Carlo Integration
In terms of importance sampling for numerical Monte Carlo integration we can proceed as follows:
\begin{align} \int_{\Omega} p(\mathbf{x}) d\mathbf{x} &= \int_{\Omega} p(\mathbf{x}) \frac{q(\mathbf{x})}{q(\mathbf{x})}d\mathbf{x} \\ & = E_{\mathbf{x} \sim q(\mathbf{x})}\left[\frac{p(\mathbf{x})}{q(\mathbf{x})}\right] \\ & \approx \frac{1}{N} \sum_{i=1}^N \left[\frac{p(\mathbf{x}_i)}{q(\mathbf{x}_i)}\right] \end{align}
Therefore we can empirically estimate the integral by sampling $$\mathbf{x}$$ from some distribution $$q(\cdot)$$.
Now in my problem I know for a fact that my $$\mathbf{x}$$ is a finite vector ($$\mathbf{x}=[x_1,x_2,x_3,...x_n]$$), all values are contained in the interval $$[0,1]$$ (so $$\Omega = [0,1]^d$$), and there is a particular ordering to my $$\mathbf{x}$$, i.e.:
$$x_1 \geq x_2$$
$$x_2\geq x_3$$
$$x_2 \geq x_3$$ etc....
So given the structure of my problem (nested, all values in $$[0,1]$$), my questions are:
Question 1: Given this nested structure to my problem, is it better to choose certain $$q(\cdot)$$ functions over others?
I feel that because all my variables are in the interval $$[0,1]$$, and I have no reason to believe any particular weighting of the points (I am actually evaluating an integral to help find a volume), so should I choose a uniform distribution?
Question 2: If I opt for a uniform distribution for $$q(\cdot)$$, do I need to reflect the prior structure of my variables in the sampling procedure?
i.e. I cannot just sample $$\mathbf{x} \sim U[0,1]^n$$, as this will occasionally violate my required hierarchical/ordering/nested structure.
Question 3: In many importance sampling integration problems, they give the example of uniform 1D, in which case $$q(\cdot) = \frac{1}{b-a}$$, so this term can be removed from the expectation/sum to the front. How can I calculate this same volume, assuming I opt for $$q(\cdot)$$ to have a nested hierarchical structure? How should this scale and be dealt with
Thus ultimately I am unable to understand how to properly include such a prior knowledge of the nested nature of my variables into MC integration.
Question 1: Given this nested structure to my problem, is it better to choose certain $$q(⋅)$$ functions over others?
A generic recommendation is to have the importance function $$q(⋅)$$ supported by the same support as the integrand $$p(⋅)$$. Therefore, if $$\mathbf x$$ belongs to the restricted unit hypercube, the function $$q(⋅)$$ should only be positive over this restricted unit hypercube.
Question 2: If I opt for a uniform distribution for $$q(⋅)$$, do I need to reflect the prior structure of my variables in the sampling procedure?
The constraint on the components of $$\mathbf x\in(0,1)^n$$ can be expressed by a change of variables: \begin{align*} x_1 &= y_1 &y_1\ge 0\\ x_2 &= x_1 + y_2 &y_2\ge 0\\ &\vdots \\ x_n &=x_{n-1}+y_n &y_n\ge0\\ &\qquad\qquad y_1+\ldots+y_n\le 1 \end{align*} which indicates that $$\mathbf y=(y_1,\ldots,y_n)$$ belongs to the simplex of $$\mathbb R^n$$ (or $$\mathbb R^{n+1}$$ depending on the convention). A natural family of distributions on the simplex of $$\mathbb R^{n}$$ is made of the Dirichlet $$\mathcal D(\alpha_1,\ldots,\alpha_{n+1})$$ distributions with density $$f(\mathbf y)=\dfrac{\Gamma(\alpha_1)\cdots\Gamma(\alpha_{n+1})}{\Gamma(\alpha_1+\cdots+\alpha_{n+1})}y_1^{\alpha_1-1}\cdots y_{n+1}^{\alpha_{n+1}-1}$$ over this simplex of $$\mathbb R^{n}$$. The Uniform case corresponds to $$\alpha_1=\cdots=\alpha_{n+1}=1$$
Question 3: In many importance sampling integration problems, they give the example of Uniform 1D, in which case $$q(⋅)=1/(b−a)$$, so this term can be removed from the expectation/sum to the front. How can I calculate this same volume, assuming I opt for $$q(⋅)$$ to have a nested hierarchical structure?
The volume of the simplex of $$\mathbb R^{n}$$ is given by the constant $$\dfrac{\Gamma(\alpha_1+\cdots+\alpha_{n+1})}{\Gamma(\alpha_1)\cdots\Gamma(\alpha_{n+1})}$$
• Thank you! :) Just one follow up. Suppose I perform the proposed change of variables to the integral, I will require the determinant of the Jacobian. For a simple system ($x_1 = y_1, \quad x_2 = x_1 + y_2 = \sum_i^2 y_i, \quad x_3 = x_2 + y_3 = \sum_i^3 y_i$), the jacbian matrix should be (I believe): \begin{matrix} \left[1 $0$0 \\ y_2 $y_1$ 0\\ y_2 + y_3 & y_1 + y_3 & y_1 + y_2 \right] \end{matrix} – tisPrimeTime Jan 28 at 11:23
• The Jacobian is lower triangular with only 1's hence equal to 1. – Xi'an Jan 28 at 11:45
• Sorry, I didn't finish my equation before properly (the time to edit ran out!). I thought the Jacobian should look something like this: \begin{bmatrix} 1 &0 &0 \\ y_2 & y_1 & 0\\ y_2 + y_3 & y_1 + y_3 & y_1 + y_2 \end{bmatrix} I get the lower triangular part, but for each row we would have something like $\partial x_n / \partial y_m$ so wouldn't there need to be some sort of residual sum of the other terms left over (i.e. I don't get how it becomes only 1s (but if it is that is super nice!) – tisPrimeTime Jan 28 at 11:55
• never mind, I was being a bit silly, for some reason I thought $\frac{\partial }{\partial y_1}(y_1 + y_2 + y_3) = y_2 + y_3$ or something ridiculous.... when the answer should be 1, thereby creating the lower triangular matrix of completely 1s. – tisPrimeTime Jan 31 at 2:06 | 2020-04-10 06:56:02 | {"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": 38, "wp-katex-eq": 0, "align": 1, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9946285486221313, "perplexity": 354.086474360028}, "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-16/segments/1585371886991.92/warc/CC-MAIN-20200410043735-20200410074235-00251.warc.gz"} |
https://conomet.com/en/wordpress/mathjax-for-sp-without-plugin.html | # How to keep MathJaX formula from sticking out of the screen of smartphones without using plugins【LaTeX】【WordPress】
Hello, this is Conomet.
You may be troubled by the fact that the mathematical formula written in MathJaX is sticking out of a small screen like a smartphone.
Some people may say, “It’s too much trouble, so I solved it with plugins.
This time, I’ll show you how to make the formula written in MathJaX not protrude horizontally on your smartphone without using plugins (so you can scroll horizontally).
This method works for more than just WordPress.
See the following article on how to introduce MathJaX in WordPress without using plugins.
## Specific steps
Since “without plugins" is the most important point, it is assumed that you have installed MathJaX as described in the previous article.
Some plug-ins seem to have a side-scrolling function beforehand, but since I’m concerned about whether or not the behavior of the website will be heavy, I’ll do this without using plugins.
### Check if MathJaX is working
First, let’s make sure that MathJaX is functioning properly.
If it doesn’t seem to work, then it’s a problem before it doesn’t stick out on your smartphone.
### Add the following code to CSS
After making sure that MathJaX is working, let’s add the following code to the CSS
span.MJXc-display{
overflow-x: auto;
overflow-y: hidden;
}
This will cause the MathJaX formula to scroll sideways if the place where it appears to be is longer on the side.
As a supplement, here’s a brief explanation
“overflow-x: auto" means “scroll horizontally if the content doesn’t fit horizontally".
“overflow-y: hidden" means “vertical scrollbars are hidden".
It has the above implications. (These meanings are not strictly correct, but there’s nothing wrong with this kind of recognition.)
### Let’s check
Let’s check it out after adding it to the CSS.
If you can scroll sideways without protruding, you’re done!
If you’re curious about an example of how it looks in practice, check out some of the articles here.
(It will be a related site I run called “Conomet’s Econometrics“)
It was surprisingly easy, wasn’t it!
It’s good to solve it quickly with a plugin, but I don’t think there’s anything better than being able to solve it without plugins, both in terms of site speed and security.
If you want to keep the MathJaX formula from sticking out to the side, give it a try! | 2022-01-18 07:34: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": 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.38194018602371216, "perplexity": 1281.4541349207334}, "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/1642320300805.79/warc/CC-MAIN-20220118062411-20220118092411-00104.warc.gz"} |
http://blog.sciencenet.cn/blog-306792-958193.html | # Office 365
ÒÑÓÐ 1761 ´ÎÔĶÁ 2016-2-24 06:18 |¸öÈË·ÖÀà:Scientific Writing|ϵͳ·ÖÀà:ÂÛÎĽ»Á÷| office, 365, monthly, Subscription
Last Office software I bought was Office 2011 when I got my first Mac in August 2013. Time went by quickly. Two and half years later, I decided to invest in a new Mac, MacBook Air 11" for travel and as backup Mac. (I didn't have good luck with my first Mac, which crashed six months after I bought it and its trackpad went nuts in 2015, which seemed to fix itself but I bought a mouse as a backup.)
So, I need to bought new Office software again, since the Office 2011 was only for 1 Mac! I quickly went online to read as much as I can, and decided the best thing for my new MacBook Air is monthly subscription (about $7/month). This way, I can cancel after each trip. (I may get tired of doing this, and switch to yearly subscription later on.) Back to my Blog title, Office 365. This Blog is about Office software. Most of us at the SciNet probably don't need to buy Office software with their own money. I didn't, because I got it for free from U. Hawaii. Even though I may have to pay about$70/year for using Office from now on (less if I only pay for it when I travel), I think I can understand the reason behind it.
Sure, Microsoft is making tons of money by this new prectice of subscription. They probably have to work harder to keep the softwares updated and better. I know Microsoft as a monoploy is not good for consumers; but I think they are smart enough not to cause uproars.
I will be testing out the new software in the coming days.
http://blog.sciencenet.cn/blog-306792-958193.html
ÉÏһƪ£ºWi-Fi speed
ÏÂһƪ£ºAmazon (Amazon.com), ÏëºÞÄãÒ²²»ÈÝÒ× | 2020-10-28 14:33:17 | {"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.24228999018669128, "perplexity": 2778.697716509789}, "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/1603107898577.79/warc/CC-MAIN-20201028132718-20201028162718-00085.warc.gz"} |
https://studyqas.com/what-is-the-first-step-to-perform-when-multiplying-or-dividing/ | # What is the first step to perform when multiplying or dividing rational expressions to express them in their simplest form? How does
What is the first step to perform when multiplying or dividing rational expressions to express them in their simplest form? How does this step help in reducing the expression to its simplest form?
## This Post Has 3 Comments
1. ryliepeloquinf says:
$\frac{2(x-1)(2x+9)}{(x-3)(x-2)}$
Step-by-step explanation:
$\frac{4x}{(x-3)}+\frac{6}{(x+2)}$
= $\frac{4x(x+2)}{(x-3)(x+2)}+\frac{6(x-3)}{(x+2)(x-3)}$
Now we have done the denominators of each term of the expression equal.
$\frac{4x(x+2)}{(x-3)(x+2)}+\frac{6(x-3)}{(x+2)(x-3)}$
= $\frac{4x(x+2)+6(x-3)}{(x-3)(x+2)}$
= $\frac{4x^{2}+8x+6x-18}{(x-3)(x+2)}$
= $\frac{4x^{2}+14x-18}{(x-3)(x-2)}$
Now factorize the numerator of the fraction.
4x² + 14x - 18 = 2(2x² + 7x - 9)
= 2(2x² + 9x - 2x - 9)
= 2[x(2x + 9) - 1(2x + 9)]
= 2(x - 1)(2x + 9)
Therefore, $\frac{2(x-1)(2x+9)}{(x-3)(x-2)}$ will be the answer.
2. belindajolete says:
After adding or subtracting two rational expressions, you should put the result in simplest form by reducing it.
3. terrell31 says:
It’s pp | 2022-12-03 16:34: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": 2, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/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.8129050731658936, "perplexity": 876.5124996063768}, "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-49/segments/1669446710933.89/warc/CC-MAIN-20221203143925-20221203173925-00127.warc.gz"} |
https://docs.flexcompute.com/projects/tidy3d/en/latest/notebooks/L3_cavity.html | # Photonic crystal cavity#
Run this notebook in your browser using Binder.
In this notebook, we will simulate the commonly used L3 photonic crystal cavity composed of three missing holes in a hexagonal lattice of holes in a silicon slab.
[1]:
# standard python imports
import numpy as np
import matplotlib.pyplot as plt
# tidy3D import
import tidy3d as td
from tidy3d import web
## Coarse simulation#
We will first run a broadband simulation to examine the spectrum, and zone in on the fundamental mode of the cavity. We start with defining some general parameters. We will use a fairly low spatial resolution for this initaly simulation. It’s worth remembering that the PML extend beyond the simulation domain, so we don’t need to worry about them covering some of the PhC holes. The one thing we have to remember is to extend the slab through the PML.
In structures with (quasi)-periodicity, that is to say with a well-defined notion of a unit cell, it is usually best to use a grid that is commensurate with the periodicity. This is why here we use a uniform grid in x and y, with a different step size to account for the different periodicity of the PhC lattice in these directions. In z, we use an automatic nonuniform mesh which conforms to the slab thickness and is finer in the silicon region.
[2]:
# Number of PhC periods in x and y directions
Nx, Ny = 16, 12
# Lattice constant of the PhC in micron
alattice = 0.4
# Regular PhC lattice parameters
ra = 0.25 * alattice # hole radius
d_slab = 0.22 # slab thickness
n_slab = 3.48 # refractive index of the slab
# Materials - air and silicon
air = td.Medium()
si = td.Medium(permittivity=n_slab**2)
# Mesh step in x, y, z, in micron
steps_per_unit_length = 12
grid_spec = td.GridSpec(
grid_x=td.UniformGrid(dl=alattice / steps_per_unit_length),
grid_y=td.UniformGrid(dl=alattice / steps_per_unit_length * np.sqrt(3) / 2),
grid_z=td.AutoGrid(min_steps_per_wvl=steps_per_unit_length)
)
# Central frequency around which we'll look for the cavity mode (Hz)
freq0 = 2e14
# Source bandwidth (Hz)
fwidth = 4e13
# Simulation run time (s)
run_time = 20/fwidth
# Simulation domain size (micron)
sim_size = [(Nx+2)*alattice, ((Ny+1)*alattice)*np.sqrt(3)/2, 4]
Next, we define the positions of the holes that make the photonic crystal structure.
[3]:
# Define x and y positions in one quadrant of the simulation domain
xp, yp = [], []
nx, ny = Nx//2 + 1, Ny//2 + 1
for iy in range(ny):
for ix in range(nx):
xp.append(ix + (iy%2)*0.5)
yp.append(iy*np.sqrt(3)/2)
# Remove the first two holes to make the L3 defect
xp = xp[2:]
yp = yp[2:]
# Append holes for the other three quadrants
xf, yf = [], []
for x, y in zip(xp, yp):
xf += [x, x, -x]
yf += [y, -y, y]
if x > 0 and y > 0:
xf += [-x]
yf += [-y]
Initialize all structures.
[4]:
slab = td.Structure(
geometry=td.Box(center=[0, 0, 0], size=[td.inf, td.inf, d_slab]),
medium=si
)
holes_geo = []
for x, y in zip(xf, yf):
holes_geo.append(
td.Cylinder(
center = (np.array([x, y, 0])*alattice).tolist(),
axis = 2,
radius = ra,
length = d_slab
)
)
holes = td.Structure(
geometry=td.GeometryGroup(geometries=holes_geo),
medium=air
)
Initialize the source. We are looking for the fundamental mode of the L3 cavity, so we use a y-polarized source at the center of the cavity.
[5]:
source = td.PointDipole(
center=(0, 0, 0),
source_time=td.GaussianPulse(
freq0=freq0,
fwidth=fwidth),
polarization='Ey')
[6]:
source.source_time.plot(np.linspace(0, run_time, 1001))
plt.show()
Finally, we also place a time monitor in the same location as the source. We set the time monitor starting time to be after the source decay, such that we can exclude the source signature from the recorded spectrum.
[7]:
t_start = 1e-13
tmonitor = td.FieldTimeMonitor(center=[0, 0, 0], size=[0, 0, 0], start=t_start, name='field')
Initialize the simulation and visualize the structure. By default, Tidy3D will warn you if you have structures too close to the PML, as this can cause instability in the simulation. In photonic crystals this is sometimes inevitable, however, and it is OK in this case because the fields of the cavity mode are strongly localized around the center of the simulation domain.
[8]:
# Suppress warnings for some of the holes being too close to the PML
td.config.logging_level = 'error'
sim = td.Simulation(
size=sim_size,
grid_spec=grid_spec,
structures=[slab, holes],
sources=[source],
monitors=[tmonitor],
run_time=run_time,
boundary_spec=td.BoundarySpec.all_sides(boundary=td.PML())
)
[9]:
fig, ax = plt.subplots(1, 2, figsize=(12, 4))
sim.plot_eps(z=0, ax=ax[0]);
sim.plot_eps(x=0, ax=ax[1]);
## Run simulation and examine the spectrum#
Now that the simulation is constructed, we can run it using the web API of Tidy3D. First, we submit the project.
[10]:
# Submit a project to the cluster
job = web.Job(simulation=sim, task_name='L3 low res')
job.start()
↑ simulation.json ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 96.6/96.6 kB • ? • 0:00:00
And we can continuously monitor the status until the run is succsessful.
[11]:
job.monitor()
🏃 Finishing 'L3 low res'...
Once the run is successful, we can download the results and load them in the td.SimulationData object.
[12]:
sim_data = job.load(path='data/sim_data.hdf5')
↓ monitor_data.hdf5 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━ 91.3% • 1.3/1.4 MB • 247.1 kB/s • 0:00:01
We finally plot the time dependence of the field in the center of the cavity, and the spectrum computed using a Fourier transform of that field. For the latter, we use the in-built dft_spectrum function.
[18]:
# Get data from the TimeMonitor
tdata = sim_data['field']
time_series = tdata.Ey.squeeze()
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 3))
# Plot time dependence
time_series.plot(ax=ax1)
# ax[0].set_xlabel("Time [s]")
# ax[0].set_ylabel("Electric field [a.u.]");
# ax[0].set_title("Ey vs. time")
# Make frequency mesh and plot spectrum
dt = sim_data.simulation.dt
fmesh = np.linspace(1.6e14, 2.5e14, 101)
dft_matrix = np.exp(2j * np.pi * fmesh[:, None] * time_series.t.values) / np.sqrt(2 * np.pi)
spectrum = dt * dft_matrix @ np.real(time_series.values)
ax2.plot(fmesh, np.abs(spectrum))
ax2.set_xlim(1.7e14, 2.5e14)
ax2.set_xlabel("Frequency [Hz]")
ax2.set_ylabel("Electric field [a.u.]");
ax2.set_title("Spectrum");
We see a big peak close to f = 195THz, which is most likely what we are looking for, because a) the fundamental mode is the longest-lived and b) we use a y-polarized source at the center of the simulation domain, which does not excite some of the other modes. Next, we refine the simulation and compute the field profile of this fundamental mode.
## Refine simulation, apply symmetries, get mode profile#
Now that we’ve seen a clear resonant peak, we can increase the resolution of the simulation to obtain more accurate results, and to get a high-resolution image of the cavity mode. We center the source frequency close to the peak of the spectrum above, and decrease the bandwidth to exclude any other modes. We will also double the spatial resolution, making it 20 pixels per lattice period. Finally, we will also incorporate symmetries to speed up the computation.
[19]:
# New target frequency based on spectrum above
freq0 = 1.95e14
# Narrow-bandwidth source
source = td.PointDipole(
center=(0, 0, 0),
source_time=td.GaussianPulse(
freq0=freq0,
fwidth=fwidth/5),
polarization='Ey')
# Also increase the run time a bit
run_time = 50/fwidth
# 20 pixels per lattice period
steps_per_unit_length = 20
grid_spec = td.GridSpec(
grid_x=td.UniformGrid(dl=alattice / steps_per_unit_length),
grid_y=td.UniformGrid(dl=alattice / steps_per_unit_length * np.sqrt(3) / 2),
grid_z=td.AutoGrid(min_steps_per_wvl=steps_per_unit_length)
)
We can use both a time and a frequency monitor to obtain the field profile, each coming with advantages and disadvantages. The frequency monitor captures accurately the frequency-domain field, but that includes the source signature. On the other hand, examining the time-domain field can capture the “eigenmode” of the system, but only if all the other modes have decayed. This is, to a very large extent, the case in our simulation, so as we’ll see the second approach works very well.
NB: An important thing to note is that a 2D time monitor can result in a very large amount of data. Because of this, we will only record the fields near the last time step, setting start = run_time in the FieldTimeMonitor.
[20]:
# Time and frequency monitors
tmonitor = td.FieldTimeMonitor(
center=[0, 0, 0],
size=[4, 2*np.sqrt(3), 0],
start=run_time,
name='final_time')
fmonitor = td.FieldMonitor(
center=[0, 0, 0],
size=[4, 2*np.sqrt(3), 0],
freqs=[freq0],
name='field')
We initialize the simulation with reflection symmetries defined with respect to the x-, y-, and z-planes. Note that the eigenvalue of the symmetry (plus or minus one) has to be carefully determined, taking into account the vectorial nature of the electric field (and the pseudo-vector nature of the magnetic field). As an extra hint, positive symmetry is equivalent to a PMC plane, where the normal E-field component vanishes, while negative symmetry is equivalent to a PEC plane, where the parallel components of the E-field vanish. The symmetry values can be determined by thinking about a y-polarized electric dipole at the origin: (1, -1, 1).
[21]:
# Initialize simulation
sim = td.Simulation(
size=sim_size,
grid_spec=grid_spec,
structures=[slab, holes],
sources=[source],
monitors=[tmonitor, fmonitor],
run_time=run_time,
boundary_spec=td.BoundarySpec.all_sides(boundary=td.PML()),
symmetry=(1, -1, 1),
)
[22]:
fig, ax = plt.subplots(1, figsize=(8, 6))
sim.plot_eps(z=0, ax=ax);
We run the simulation as above.
[23]:
sim_data = web.run(sim, task_name='L3 high res', path='data/sim_data.hdf5')
↓ monitor_data.hdf5 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━ 80.1% • 1.8/2.3 MB • 2.2 MB/s • 0:00:01
Finally, we plot the field recorded by the frequency monitor, with a rescaled colorbar in order to suppress the strongly dominant feature of the source in the center. On the other hand, the field stored in the time monitor reveals the eigenmode of the cavity.
[28]:
final_time = sim_data['final_time'].Ey.t
fig, ax = plt.subplots(1, 2, figsize=(12, 4))
sim_data.plot_field('final_time', 'Ey', val='abs', z=0, t=final_time, ax=ax[0])
sim_data.plot_field('field', 'Ey', val='abs', z=0, f=freq0, ax=ax[1]);
[ ]: | 2022-09-27 05:25:13 | {"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.5444958806037903, "perplexity": 2889.285295585366}, "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-2022-40/segments/1664030334987.39/warc/CC-MAIN-20220927033539-20220927063539-00644.warc.gz"} |
https://www.nature.com/articles/s41598-020-69012-z?utm_campaign=MultipleJournals_USG_CHEM&utm_source=Nature_community&utm_medium=Community_sites&utm_content=BenJoh-Nature-MultipleJournals-Chemistry-Global&error=cookies_not_supported&code=26d119cc-6b56-47ac-a936-82ff0124009e | Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.
Photocatalytic degradation of industrial acrylonitrile wastewater by F–S–Bi–TiO2 catalyst of ultrafine nanoparticles dispersed with SiO2 under natural sunlight
Abstract
Highly active photocatalyst, having certain anti-ionic interfering function, of F, S and Bi doped TiO2/SiO2 was used for the first time to degrade the organic pollutants in acrylonitrile industrial wastewater under natural sunlight. The photocatalyst were prepared and characterized by UV–Vis, XRD, TEM, EDS, Nitrogen physical adsorption and XPS technique. UV–Vis analysis revealed addition of F, S and Bi into the lattice of TiO2 led to the expansion of TiO2 response in the visible region and hence the efficient separation of charge carrier. The photocatalytic potential of as prepared catalyst to degrade acrylonitrile wastewater under simulated and natural sunlight irradiation was investigated. The extent of degradation of acrylonitrile wastewater was evaluated by chemical oxygen demand (CODCr). CODCr in wastewater decreased from 88.36 to 7.20 mgL−1 via 14 h irradiation of simulated sunlight and achieved regulation discharge by 6 h under natural sunlight, illuminating our photocatalyst effectiveness for refractory industrial wastewater treatment. From TEM results, we found that SiO2 could disperse the photocatalyst with different component distributions between the surface and the bulk phase that should also be responsible for the light absorption and excellent photocatalytic performance. The XPS analysis confirmed the presence of surface hydroxyl group, oxygen vacancies.
Introduction
Acrylonitrile is considered as a significant industrial chemical, originated by the direct oxidation of propylene with ammonia. It is extensively used for the preparation of synthetic rubber and resin, plastic and acrylic fiber1,2. Various types of organic pollutants are formed during the production of acrylonitrile3,4 which has definitely induced serious impact on environmental and public health. Owing to its low bioavailability, high toxicity and mingled composition, acrylonitrile production wastewater has been directed as one type of refractory organic wastewater5. Therefore, it is necessary to develop a safe and efficient technology for the treatment of acrylonitrile wastewater. Various methods have been reported for the treatment of acrylonitrile wastewater, among those methods photocatalysis acquired much attention over the past decade. Since, photocatalytic reaction under sunlight irradiation is more energy-advantageous, and a lot of researchers have made vast efforts to realize the industrialization of photocatalytic treatment of industrial wastewater under sunlight6,7,8. However, there were few successful reports under sunlight because of the complexity of industrial wastewater9,10,11. Thus, photocatalytic treatment of industrial wastewater under sunlight was a great challenge for the researchers. Watanabe12 have reported that photocatalysis would cause a new environment revolution twenty years ago.
It is well known that, semiconductor-based photocatalysts have been investigated as an auspicious material for the solar energy conversion in regard to the breakdown of hazardous organic pollutants13. Across various photocatalysts, titanium dioxide (TiO2) is known as the most determined material because of its chemical stability, high oxidation potential, nontoxicity and physical stability14. However, the use of TiO2 in photocatalysis are limited because of its certain drawbacks like: their large band gap15, which means that in solar energy processes, only UV light can be utilized and their low photocatalytic efficiency because of the fast recombination rate of electron–hole pairs. Therefore, many efforts have been promoted to reduce the bandgap of TiO2 by doping or by band gap engineering12,13,14,15,16,17,18,19. In our previous study, the high photocatalytic activity of F-doped TiO2 was attributed to the increase in the number and strength of surface acid sites20. It was explained that F-doping led to the creation of surface oxygen vacancies17, or the increase of Ti3+ state21. On the other hand, higher photocatalytic activity of S doped sample was attributed to the increase in the surface Bronsted and Lewis acid sites22. Samantaray indicated that sulphate radical impregnation decreases the crystallite size and stabilized the anatase phase of TiO223. In addition, Bi doped TiO2 exhibited a red shift in the optical adsorption and Bi3+δ+ species played a vital role in minimizing the electron hole recombination16. According to Li et al.24, Bi doping into TiO2 generates a new intermediate energy level below the conduction band edge of TiO2, extending the absorption in the visible region and enhanced their photocatalytic efficiency. On the other hand, SiO2 was used usually as a supporter, and its dispersing effect on nanoparticle size as well as that with oxidativity has not been reported.
To improve the photocatalytic activity of TiO2 for the decomposition of organic pollutants in acrylonitrile wastewater under solar light irradiation, we modified TiO2 with the combination of silica and F, S, Bi doping (F–S–Bi–TiO2/SiO2). The dispersion of SiO2 produced ultrafine nanoparticles. We have found that silica dispersion changed the aggregation state, constituent distribution in amount and morphology of the nanocatalyst, which was responsible for light absorption and increased photocatalytic activity20. We first degraded the acrylonitrile simulated wastewater and then degraded the acrylonitrile wastewater. This photocatalyst exhibited excellent performances in both the photocatalytic decompositions of organic pollutants under simulated and natural sunlight. So, our approach is an important attempt for the photocatalytic treatment of industrial wastewater.
Characterization
The valence states on the surface of catalysts were analyzed by a Thermo ESCALAB 250XI X-ray photoelectron spectrometer (America) using Al Kα (hn = 1,486.6 eV) as a radiation source. The irradiation of simulated sunlight and natural sunlight intensity was measured with a FZ-A RADIOMETER irradiance meter (China). From 6 am–8 pm, it was measured at a certain interval as shown in Table S1. Tecnai G2 F30 TEM was used to analyze the physical structural characteristics of the photocatalysts. The samples were ultrasonically dispersed in ethanol. The suspension was deposited on a Lacey-carbon film, which was supported on a copper grid. The particle size distributions of catalysts with or without SiO2 dispersant were calculated with NIH software using TEM image treatment. The crystalline phases of the photocatalysts were determined by X-ray diffractometer (RIGAKU, D/Max 2500PC, Japan) at a scanning rate of 6° min−1 in the 2θ angle range of 10°–80° using Cu Kα radiation combined with nickel filter. The accelerating voltage and the applied current were 40 kV and 200 mA, respectively. Crystallite sizes were calculated according to Scherrer equation:
$$L = K\lambda /B\cos \theta ,\quad B^{2} = B_{mea}^{2} - b_{ins}^{2}$$
(1)
where L, K, λ and θ are the average crystal size, the shape factor for spherical crystallites, the X-ray wavelength and Bragg diffraction angle, respectively. B, Bmea and bins are the breadths of intrinsic diffraction profile, the test sample diffraction integral profile and instrumental diffraction profile, respectively. UV–visible spectra were measured on UV-2450 UV spectrophotometer (Shimadzu Corporation, Japan). The range of the scanning wavelength was 200–800 nm. The BET specific surface area was measured by BELSOROP-MINI II (Japan) adsorption instrument and pore size distribution was analyzed by Barrett–Joyner–Halenda (BJH) method.
GC–MS (Agilent 7890A-5795C, America) was used for the component’s analysis. The instrument was equipped with a DB-5 capillary column (length of 30 m, 0.25 mm i.d., 0.25 mm d.f.). The injector and MS transmission line temperatures were 250 and 310 °C, respectively. The oven temperature initiated at 40 °C (hold for 5 min), and then increased at 5 °C min−1 to 290 °C (hold for 2 min). The electron energy was set at 70 eV and the ion source temperature was 230 °C. The standard spectra in GC–MS database was used to identify the chemical constituents in wastewater. In the present study, refractory acrylonitrile wastewater was obtained from an acrylonitrile manufacturing plant. The acrylonitrile wastewater was pretreated through adsorption with microporous zeolite, HZSM-5 before photocatalytic degradation, CODCr decreased from 582.4 to 88.36 mgL−1, and after that there were no change in the values. The organic pollutants in the wastewater after adsorption were detected and the results were listed in Table 1.
Photocatalytic activities for acrylonitrile simulated wastewater
The photocatalytic activities of the photocatalyst used for acrylonitrile simulated wastewater were evaluated in a photocatalytic reaction system20. The quartz glass reactor was sealed after 180 mL of acrylonitrile wastewater (10 mgL−1) and 300 mg of the catalyst was placed in it. The mixture was magnetically stirred in the dark until the adsorption equilibrium attained. Then, the spherical Xenon short arc lamp (AHD350, 350 W) was turned on for 12 min. In the process of illumination, the reaction solution of 1 mL was taken out at the interval of 2 min, and after that photocatalyst was filtered out through a filter film of 0.45 μm, acrylonitrile concentration was measured by HP-LC with LC-2030 UV detector and Sunfire TM C18 column. The wavelength of detector was 210 nm and the mobile phase volume ratio of methanol to water was 3:7. Triplicate samples from each batch were taken for the tests.
The ion effects on photocatalytic activities of acrylonitrile simulated wastewater
The ion effects were examined by following procedure: appropriate amount of sodium sulfate and sodium chloride were added to 180 mL of solution to obtain 61.8 mgL−1 of sulfate radical and 22 mgL−1 of chloride ion consistent with Table 2. The ion solution containing acrylonitrile was used for the comparative trial.
Activity evaluation by CODCr and TOC measurements for acrylonitrile wastewater after adsorbed by HZSM-5
The catalyst contents and reaction device were used as the same as that in simulated wastewater. After adsorption equilibrium, the spherical Xenon lamp was turned on for 14 h. At given intervals of illumination, 4 mL of reaction solution was taken out and was filtered out through a filter film of 0.45 μm (all detection procedures in this study were performed according to or as per China national standard except for special mention). CODCr values were detected with a Fast COD Detection Instrument (LH-5B-3B(V8)). TOC concentrations of the samples were measured via a Shimadzu TOC analyzer (TOC-L CPN, Japan). Concentration of inorganic ions, BOD and CODCr in acrylonitrile raw wastewater, the wastewater after adsorption measured according to national standard methods were listed in Table 2.
Results
Effect of different ions on the activity and light adsorption performance
Figure 1a shows the photocatalytic performances of the prepared samples for acrylonitrile simulated wastewater under the effect of spherical Xenon short arc lamp. The degradation ratio of F–S–Bi–TiO2/SiO2 catalyst after 4 min was 63%, which was much higher than TiO2–P25 and F–S–Bi–TiO2.
In order to demonstrate the interference of inorganic ions, a certain amounts of sodium sulfate (61.8 mgL−1 sulfate radical) and sodium chloride (22 mgL−1 chloride ion) were added into acrylonitrile simulated wastewater and the degradation was carried out by the catalyst under the same condition mentioned above. These results revealed that free sulfate radical, chloride ions, or sodium ions inhibited the degradation progress. This was similar with our previous studies which illustrated that, certain inhibition effect by free sulfate radical on the degradation process22.
Figure 1b shows the UV–Visible spectra of TiO2 P-25 (Degussa), F–S–Bi–TiO2/SiO2 and F–S–Bi–TiO2 catalysts. The absorption of F–S–Bi–TiO2/SiO2 catalyst was increased in the UV–visible region at 300–600 nm as compared to TiO2 P-25. However, the UV–visible spectrum of F–S–Bi–TiO2 became flat below 335 nm, showing weakest absorbance. Although, F–S–Bi–TiO2/SiO2 exhibited lower absorption ability towards visible region (400–600 nm) than F–S–Bi–TiO2, showing the higher degradation ratio. The higher degradation ratio was attributed to the better dispersion of SiO2, because in F–S–Bi–TiO2/SiO2 photocatalyst TiO2 was well dispersed, reducing the agglomeration and enhancing the absorption in the UV region22. However, both the photocatalysts have the same weight but F–S–Bi–TiO2 contains more S elements and absorbed more visible light. The Photocatalytic reaction mainly depends upon the UV light.
XRD analysis
In order to know the crystal structure of the prepared catalyst, XRD patterns of F–S–Bi–TiO2/SiO2 and F–S–Bi–TiO2 calcinated at 450 °C were recorded as shown in Fig. S2. The crystallite size of the catalysts was calculated with the most predominant peak of the anatase face (101) with the help of Scherrer equation (Table 3). It was clearly revealed from Table 3 that the addition of SiO2 as a dispersant agent decreases the average crystal size, and increases the surface area of the photocatalyst.
TEM and EDS analysis
The TEM images of as prepared photocatalyst without SiO2 were shown in Fig. 2a–c. From Fig. 2a, we observed the crystal with grains size of 11–60 nm, and they might be formed in different aggregated stages. Aggregation of ca. 4 nm of particles were produced on the rough end faces, where borderline disappeared in the interior of the large piece crystal (Fig. 2b). The other type gave out indistinct borderline in Fig. 2c. The crystallite faces of TiO2 (d = 0.356 nm, (101)) and Bi4Ti3O12 (d = 0.364 nm, (009)) were exhibited in Fig. 2b,c. Package morphology has been identified clearly by TEM images (Fig. 2d). The atoms are arranged on irregular crystal planes of several nanometers of out layer films. The core surface was most rough (Fig. 2e). The package morphology was formed after the addition of SiO2. The black parts in the figure represented the pores in SiO2. The other general crystal configurations look like bulk type of TiO2 and Bi4Ti3O12 (Fig. 2f,g). As comparison to Fig. 2b, TiO2 crystal with SiO2 was also constituted by smaller particles of 2–4 nm with identical crystal face (Fig. 2f). Bi4Ti3O12 (d = 0.211 nm, (2010)) crystal with borderline mark aggregated into a large crystal and also possessed identical crystal face (Fig. 2g). The explanation was that crystal growth might influence each other in same aggregate through the interface, connected among gel particles to form relatively larger identical crystal face, like as biomimetic crystallization. Based on the same principle of interaction of end face atoms, different crystal faces were developed at starting on an end face on the basis of total lowest-energy rule of the system (Fig. 2i). Bi2Ti2O7 in Fig. 2j was regarded as the intermediate phase of Bi4Ti3O12 formation25. A large number of bumps were also formed on the rough surfaces (Fig. 2k). The packages were formed by silk ribbon-like film twining (Fig. 2h). This film could be consisting of long identical crystal face and generated from stirring drawing. Relatively large mass of SiO2 promoted drawing in late stage of gelation. The EDS images in Fig. 2 show that Si, O, Ti, F, S and Bi elements were evenly distributed on the surface of S–Bi–F–TiO2/SiO2 catalyst26, which confirmed the conjecture that the elements were not detected in XRD.
The particle size distribution of the catalyst was calculated with NIH software for all particles in random region and was shown in Fig. 3. The catalyst without SiO2 showed a wide particle size distribution. The average diameter was 30.9 nm, which was smaller than crystal grain size (40.4 nm) as calculated by XRD (Table 3). Since the borderline was not identified by the program, we measured the diameters of particles artificially and calculated particle size distribution of the catalyst with SiO2 on the basis of the same rule. The result was shown in Fig. 3b. It has been found that the average diameter of the particles is 12.3 nm, which was in agreement with the XRD result (13.9 nm). Compared to the catalyst without SiO2, nanoparticles sizes are apparently different. Nanoparticles sizes of the major parts were above ca, 20 nm for the catalyst without SiO2, contrarily, they were below 16 nm for the catalyst with SiO2 and the major parts belonged to ultrafine nanoparticles27.
Figure 4 represents the nitrogen adsorption and desorption isotherms of F–S–Bi–TiO2/SiO2 and F–S–Bi–TiO2 calcined at 450 °C. Both F–S–Bi–TiO2/SiO2 and F–S–Bi–TiO2 display type IV isotherm and H2 hysteresis, which indicate the presence of mesoporous materials.
Moreover, the F–S–Bi–TiO2/SiO2 sample has the similar pore structure with F–S–Bi–TiO2. The inset in Fig. 4 shows the plot for the pore size distribution determined by Barrett–Joyner–Halenda (BJH) method from the adsorption branch of the isotherm. The average pore diameters and total pore volume of F–S–Bi–TiO2 were 26.0 nm, 0.30 cm3/g and for F–S–Bi–TiO2/SiO2 are 14.1 nm, 0.67 cm3/g. Both of them exhibit mesopore rich structure. However, at all pressure region, the adsorption amount of N2 on F–S–Bi–TiO2/SiO2 was higher than that of F–S–Bi–TiO2, which indicates that a lot of relatively small mesoporous on the surface of F–S–Bi–TiO2/SiO2 were formed under the action of SiO2. Therefore, the specific surface area of F–S–Bi–TiO2/SiO2 (194.3 m2/g) was higher than that of F–S–Bi–TiO2 (45.9 m2/g). And, greater adsorption capacity will lead to greater degradation rate, which was consistent with the experimental results.
XPS analysis
XPS spectra of F–S–Bi–TiO2/SiO2 and F–S–Bi–TiO2 were shown in Fig. 5. Since fluorine doping converted Ti4+ state to Ti3+, and these Ti3+ state was related to oxygen vacancies28, the content of F changes in both types of the catalysts were investigated. In Fig. 5a the F 1s spectrum of F–S–Bi–TiO2 shows only one peak centered at binding energy 684.4 eV (represented by red color), indicated only surface fluoride species were present in F–S–Bi–TiO2. However, in case of F–S–Bi–TiO2/SiO2, the F 1s XPS spectra shows two peaks centered at binding energy 688.5 and 686.2 eV, respectively (represented by black color). The peak at binding energy 688.5 eV was attributed to the doped F into the substituted sites of TiO2 lattice and produced mixed oxide structure of O–Ti–F18,29,30. The lower binding energy, centered at 686.2 eV was attributed to the surface fluoride species adsorbed on the surface of TiO230. This result shows that silica plays a very important role in stabilizing the dispersion of F ions. Next, the O 1s spectrum of F–S–Bi–TiO2/SiO2 catalyst was shown in Fig. 5b. The peak at binding energy 533.8 eV was attributed to oxygen present in surface hydroxyl species29, while the peak at binding energy 530.4 eV ascribed to lattice oxygen of TiO216. Next, the S 2p spectra of the catalyst was shown in Fig. 5c. A well symmetrical S 2p peak at binding energy 169.5 eV was observed, corresponding to S6+ state of SO42− species31,32. The binding energy at 164.6 eV was attributed to elemental sulfur33, which was overlapped with Bi 4f XPS spectra. Hence, the SO42− species were mainly adsorbed on the catalyst surface, which improved surface acid strength and favored to the adsorption and degradation of the pollutants22,34. The Bi 4f XPS spectrum was shown in Fig. 5d. The peak at binding energy 159.5 eV was attributed to Bi 4f7/2, while the peak at binding energy 164.7 eV belonged to Bi 4f5/2. These values of binding energies were higher than the binding energy of Bi3+, indicating that bismuth existed in Bi3+δ state and formed Bi–O–Ti bond16. The intensities of Bi 4f peaks of F–S–Bi–TiO2/SiO2 were decreased as compared to F–S–Bi–TiO2, which indicate that dispersion function of silica was selective, that was only favorable for the substitution of F for the lattice oxygen but not for the formation Bi oxides. The weight percentages of the elements in the F–S–Bi–TiO2/SiO2 and F–S–Bi–TiO2 were shown in Table S2.
Photocatalytic purification of industrial acrylonitrile wastewater
On the basis of above analysis (Tables 1 and 2) we found that, there were a lot of inorganic and organic substances in the industrial acrylonitrile wastewater and these substances inhibited the catalyst activity (Fig. 1a). Specially, low ratio of BOD to CODCr (Table 2) identified that biochemical treatment could not be used. On the other hand, since there was limitation in amount of adsorption (Fig S1), the use of adsorption to treat was also hardly to reach regulation discharge. Hence, photocatalytic degradation of industrial acrylonitrile wastewater was one of most promising technique. A stable light source was required to keep experimental repeatability as mentioned in Table S1. Figure 6 shows the change in the value of CODCr as a function of illumination time under simulated sunlight. It was found that CODCr value decreased from 88.36 to 7.20 mgL−1 and TOC concentration decreased from 39.45 to 2.57 mgL−1 for 14 h irradiation. F–S–Bi–TiO2/SiO2 catalyst was recycled through filtration after reaction and the recovery ratio was more than 95%. The photocatalytic reaction performance of recycled F–S–Bi–TiO2/SiO2 was demonstrated through repeated rounds under the same reaction conditions. The value of CODCr was 30.67 mgL−1 after 14 h of illumination at the second round. After photocatalysis, the value of CODCr was 45.86 mgL−1 at the fourth round.
Figure 6 shows the photocatalytic activity of fresh F–S–Bi–TiO2/SiO2 catalyst for the degradation of pollutants in industrial acrylonitrile wastewater under natural sunlight irradiation. The value of CODCr decreased to 39 mgL−1 after 6 h irradiation, which has satisfied China national discharge standards.
Discussion
The actual textile dyeing wastewater was effectively oxidized by TiO2 under UV radiation. The degradation percentage of the dye and CODCr were 98.50% and 91.50%, respectively11. Dai et al.25 investigated the adsorption purification of acrylonitrile production wastewater by a microporous zeolite, CS-Z1 and a visible light-driven Ti–β–Bi2O3 photocatalyst. Nanoporous Ti–β–Bi2O3 was prepared via a solvothermal synthesis method in laboratory. Dai et al. was mainly interested in the theory, but not in application. They have not considered the inorganic ions effects. In this paper, we used industrial acrylonitrile wastewater as testing samples. The industrial acrylonitrile wastewater was pretreated by microporous zeolite, HZSM-5. After the treatment, the wastewater contained some inorganic and organic matter, as shown in Tables 1 and 2. Some of them were same or different to the pollutants reported by Dai et al. Table 2 only gives out a part of interfering inorganic ions And the existence of these ions could slow down the reaction rate (Fig. 1a). Our results showed that the prepared catalyst possesses certain anti-interfering ability. From the application point of view, we have used simple SiO2 dispersing sol–gel for the synthesis of highly active ultrafine nanoparticle catalyst with certain anti-ion interfering function and for the first time we successfully degraded industrial acrylonitrile wastewater in only 6 h under natural sunlight. This is the most significant findings for the photocatalysis application in environment.
For most of the pollutants, close to zero discharge is a final goal that people pursue in environment protection. Sixto et al.10 have demonstrated that photocatalytic purification of phenol containing wastewater by TiO2-P25 using sacrificial agent under ultraviolet part of sunlight. In this study, there was not any sacrificial agent, however, we still realized that the values of CODCr and TOC near zero discharge. These results show the potential of as prepared photocatalyst in near zero discharge and high TOC removal efficiency of wastewater treatment.
In our previous study, we found that the reaction rate of the catalyst with SiO2 was several times faster than without SiO2. The later exhibited some general properties of a large bulk aggregate. On the other hand, there were a majority of ultrafine nanoparticles with acidic sites on the catalyst with SiO220. A large number of bumps increased the quantum size effect and UV absorption at 270–380 nm, which should raise activity. Several nanometers package of irregular crystal films have promotion effect on light absorption. Photon were generated by light which can go through several nanometers of irregular Bi4Ti3O12 out layer film and get into TiO2 (Fig. 2e), causes scattering at the rough interface of the both phases. Apparently, it should be favorable to light absorption and to promote the catalytic activity (Fig. 6). The bumps were different with films of packages in morphology, but we think that were consistent in functions, because their sizes were in approximate ranges of several nanometers (Fig. 2e, g). Apparently, there were much more F- ion in the lattice, which could produce holes19 and also contribute the high activity of the catalyst with silica dispersion.
Conclusion
We built up a most simple and low cost approach for the preparation of ultrafine nanocatalyst of F, S and Bi doped TiO2 with SiO2 dispersing sol–gel particles and successively degraded the organic pollutants in acrylonitrile industrial wastewater to reach national discharge standard under 6 h of natural sunlight irradiation. In the prepared photocatalyst the doping of F, S and Bi causes the enhanced absorbance in the visible region. The results of photocatalytic activity evaluation demonstrated that CODCr value reached to discharge standard still after four recycle uses under the simulated sunlight irradiation, and to near zero discharge for the fresh photocatalyst. These results exhibited effectiveness and potential of our photocatalyst for the treatment of complicated and refractory industrial wastewater. The XPS and EDS analysis implied that S and Bi were doped successfully. The photocatalyst size distribution has been identified by visible nano-aggregates, constructed with 2–4 nm of finer gel particles. It indicated the function of SiO2 dispersing to form ultrafine nanoparticles. The nano-aggregates might form an identical lattice faces or different faces when gel particles crystallized. TEM results revealed that, the bump’s numbers may also be responsible for the increase in the light adsorption and photocatalytic activity. The identical face might originate from silk ribbon film of package. The crystals of several nanometers of out layer films and rough core surfaces of packages also increased the light absorption and enhance their photocatalytic activity.
References
1. 1.
Ma, S. M. & Gu, P. Research progress in acrylonitrile wastewater treatment. Ind. Water Treat. 33, 13–17 (2013).
2. 2.
Zheng, D. J. et al. Pilot-scale integrated membrane system for the treatment of acrylonitrile wastewater. Desalination 357, 215–224 (2015).
3. 3.
Chu, Y. Y., Qian, Y. & Bai, M. J. Three advanced oxidation processes for the treatment of the wastewater from acrylonitrile production. Water Sci. Technol. 60(11), 2991–2999 (2009).
4. 4.
Zheng, D. J. et al. Coagulation pretreatment of highly concentrated acrylonitrile wastewater from petrochemical plants. Water Sci. Technol. 70(2), 345–351 (2014).
5. 5.
Yan, G. X., Cai, B., Chen, C. M., Wang, Q. H. & Guo, S. H. Biodegradability evaluation of pollutants in acrylonitrile wastewaters based on particle size distribution. Desalin. Water Treat. 53(10), 2792–2798 (2015).
6. 6.
Yu, C. F. et al. One-pot fabrication of β-Bi2O3@Bi2S3 hierarchical hollow spheres with advanced sunlight photocatalytic RhB oxidation and Cr(VI) reduction activities. Appl. Surf. Sci. 455(15), 8–17 (2018).
7. 7.
Yu, C. F. et al. One-pot facile synthesis of Bi2S3/SnS2/Bi2O3 ternary heterojunction as advanced double Z-scheme photocatalytic system for efficient dye removal under sunlight irradiation. Appl. Surf. Sci. 420(31), 233–242 (2017).
8. 8.
Yu, C. F. et al. Preparation and characterization of sphere-shaped BiVO4/reduced graphene oxide photocatalyst for an augmented natural sunlight photocatalytic activity. J. Alloys Compd. 677(25), 219–227 (2016).
9. 9.
Fujishima, A., Rao, T. N. & Tryk, D. A. Titanium dioxide photocatalysis. J. Photochem. Photobiol. C. 1, 1–21 (2000).
10. 10.
Sixto, M. R., Christoph, R., Julián, B. G. & Martín, V. Photocatalytic degradation of industrial residual waters. Sol. Energy. 56(5), 401–410 (1996).
11. 11.
Hosseini, S. M. B., Fallah, N. & Royaee, S. J. Optimization of photocatalytic degradation of real textile dye house wastewater by response surface methodology. Water Sci. Technol. 74(9), 1999–2009 (2016).
12. 12.
Watanabe, T. et al. Photocatalytic activity and photoinduced hydrophilicity of titanium dioxide coated glass. Thin Solid Films 351(1–2), 260–263 (1999).
13. 13.
Miguel, P. et al. A review on the visible light active titanium dioxide photocatalysts for environmental applications. Appl. Catal. B Environ. 125(21), 331–349 (2012).
14. 14.
Deskins, N. A., Rousseau, R. & Dupuis, M. Defining the role of excess electrons in the surface chemistry of TiO2. J. Phys. Chem. C 114(15), 5891–5897 (2010).
15. 15.
Zhou, X. M., Liu, N. & Patrik, S. Photocatalysis with TiO2 nanotubes: “colorful” reactivity and designing site-specific photocatalytic centers into TiO2 nanotubes. ACS Catal. 7, 3210–3235 (2017).
16. 16.
Reddy, P. A. K., Srinivas, B., Kala, P., Kumari, V. D. & Subrahmanyam, M. Preparation and characterization of Bi-doped TiO2 and its solar photocatalytic activity for the degradation of isoproturon herbicide. Mater. Res. Bull. 46(11), 1766–1771 (2011).
17. 17.
Li, D., Haneda, H., Labhsetwar, N. K., Hishita, S. & Ohashi, N. Visible-light-driven photocatalysis on fluorine-doped TiO2 powders by the creation of surface oxygen vacancies. Chem. Phys. Lett. 401(4–6), 579–584 (2005).
18. 18.
Li, D., Ohashi, N., Hishita, S., Kolodiazhnyi, T. & Haneda, H. Origin of visible-light-driven photocatalysis: a comparative study on N/F-doped and N–F-codoped TiO2 powders by means of experimental characterizations and theoretical calculations. J. Solid State Chem. 178(11), 3293–3302 (2005).
19. 19.
Akpan, U. G. & Hameed, B. H. Enhancement of the photocatalytic activity of TiO2 by doping it with calcium ions. J. Colloid Interface Sci. 357(1), 168–178 (2011).
20. 20.
Pang, D. D., Wang, Y. T., Ma, X. D. & Ouyang, F. Fluorine promoted and silica supported TiO2 for photocatalytic decomposition of acrylonitrile under simulant solar light irradiation. Chem. Eng. J. 258, 43–50 (2014).
21. 21.
Yu, J. C., Yu, J. G., Ho, W. K., Jiang, Z. T. & Zhang, L. Z. Effects of F doping on the photocatalytic activity and microstructures of nanocrystalline TiO2 powders. Chem. Mater. 14(9), 3808–3816 (2002).
22. 22.
Pang, D. D., Qiu, L., Zhu, R. S. & Ouyang, F. Silica supported SO4 2 /TiO2 for photocatalytic decomposition of acrylonitrile under simulant solar light irradiation. Chem. Eng. J. 270, 590–596 (2015).
23. 23.
Samantaray, S. K., Mohapatra, P. & Parida, K. Physico-chemical characterization and photocatalytic activity of nanosized SO4 2−/TiO2 towards degradation of 4-nitrophenol. J. Mol. Catal. A Chem. 198(1–2), 277–287 (2003).
24. 24.
Li, J. J. et al. Solvothermal syntheses of Bi and Zn co-doped TiO2 with enhanced electron–hole separation and efficient photodegradation of gaseous toluene under visible-light. J. Hazard. Mater. 325, 261–270 (2017).
25. 25.
Dai, Y. R., Song, Y. H., Tu, X., Jiang, Y. P. & Yuan, Y. Sequential shape-selective adsorption and photocatalytic transformation of acrylonitrile production wastewater. Water Res. 85, 216–225 (2015).
26. 26.
Li, H. L. et al. Efficient photocatalytic degradation of acrylonitrile by sulfur-bismuth co-doped F–TiO2/SiO2 nanopowder. Chemosphere 249, 126135 (2020).
27. 27.
Hisatomi, T. & Domen, K. Reaction systems for solar hydrogen production via water splitting with particulate semiconductor photocatalysts. Nat. Catal. 2(5), 387–399 (2019).
28. 28.
Yu, C., Zhou, W., Yang, K. & Rong, G. Hydrothermal synthesis of hemisphere-like F-doped anatase TiO2 with visible light photocatalytic activity. J. Mater. Sci. 45(21), 5756–5761 (2010).
29. 29.
Wu, Y. M., Xing, M. Y., Tian, B. Z., Zhang, J. L. & Chen, F. Preparation of nitrogen and fluorine co-doped mesoporous TiO2 microsphere and photodegradation of acid orange 7 under visible light. Chem. Eng. J. 162(2), 710–717 (2010).
30. 30.
Yang, G. D. et al. Study on the photocatalysis of F–S co-doped TiO2 prepared using solvothermal method. Appl. Catal. B Environ. 96(3–4), 458–465 (2010).
31. 31.
Wu, Z. B., Jin, R. B., Wang, H. Q. & Liu, Y. Effect of ceria doping on SO2 resistance of Mn/TiO2 for selective catalytic reduction of NO with NH3 at low temperature. Catal. Commun. 10(6), 935–939 (2009).
32. 32.
Romano, E. J. & Schulz, K. H. A XPS investigation of SO2 adsorption on ceria-zirconia mixed-metal oxides. Appl. Surf. Sci. 246(1–3), 262–270 (2005).
33. 33.
Wei, F. Y., Ni, L. S. & Cui, P. Preparation and characterization of N–S-codoped TiO2 photocatalyst and its photocatalytic activity. J. Hazard. Mater. 156(1–3), 135–140 (2008).
34. 34.
Wang, X. C. et al. Probing of photocatalytic surface sites on SO4 2−/TiO2 solid acids by in situ FT-IR spectroscopy and pyridine adsorption. J. Photochem. Photobiol. A Chem. 179(3), 339–347 (2006).
Acknowledgements
This project was financially supported by Foundation Science and Technology innovation Committee of Shenzhen, PR China (No. JCYJ20150731104949798, No.ZDSYS201603301417588), and China Postdoctoral Science Foundation (FD29100012).
Author information
Authors
Contributions
H.L.L., F.W.D., performed the experimental work and analyzed the results; L.Q. and F.Y.O. performed TEM and STEM measurement and analysis; F.Y.O., G.C. designed experiments and discussed the results; B.B. assisted in the GC–MS and XPS analysis; The paper was co-written by F.Y.O., L.Q., H.L.L., Z.Y.G., D.D.P. and Y.W.
Corresponding authors
Correspondence to Feng Ouyang or Lu Qiu.
Ethics declarations
Competing interests
The authors declare no competing interests.
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Reprints and Permissions
Ouyang, F., Li, H., Gong, Z. et al. Photocatalytic degradation of industrial acrylonitrile wastewater by F–S–Bi–TiO2 catalyst of ultrafine nanoparticles dispersed with SiO2 under natural sunlight. Sci Rep 10, 12379 (2020). https://doi.org/10.1038/s41598-020-69012-z
• Accepted:
• Published:
• Highly Selective Electrochemical Sensor Based on Gadolinium Sulfide Rod-Embedded RGO for the Sensing of Carbofuran
• Vinitha Mariyappan
• , Murugan Keerthi
• & Shen-Ming Chen
Journal of Agricultural and Food Chemistry (2021)
• Fabrication of Titanium Dioxide/Carbon Fiber (TiO2/CF) Composites for Removal of Methylene Blue (MB) from Aqueous Solution with Enhanced Photocatalytic Activity
• Hao Cheng
• , Wenkang Zhang
• , Xinmei Liu
• , Tingfan Tang
• , Jianhua Xiong
• & Andrea Petrella
Journal of Chemistry (2021) | 2021-06-21 05:23:21 | {"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.649023175239563, "perplexity": 8977.233024922794}, "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-2021-25/segments/1623488262046.80/warc/CC-MAIN-20210621025359-20210621055359-00488.warc.gz"} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.