text:
# publicipython/ipython

### Subversion checkout URL

You can clone with HTTPS or Subversion.

# ReST support in notebooks#888

Closed
opened this Issue · 3 comments

### 3 participants

Owner

This is a place to discuss the requirements of ReST support in the notebooks.

We use markdown now, because what we have are light text cells, for annotating your documents. They are essentially rich text + math comment areas. ReST is a great deal more than that, and as such also a great deal more expensive to use (markdown does not require any server communication at all). We initially supported, but removed cell-level ReST support, because it isn't really ReST if each cell is treated as an independent document.

Users should be able to get everything they would expect from ReST when using it in the notebook. That means citations, references, links, and section-levels must be preserved across all cells in a document. As I understand it, this means that all cells must be rendered together. The potential cost of rendering the cells together may mean that render should be a deliberate action, rather than passive on mouseout of every text cell. Further, if ReST has to render the entire document, maybe it should include the code/output as well, and generate the entire document. If we do this, it should probably load in an external preview window, showing the full rendered output, rather than rendering inplace like the markdown cells.

Having markdown as the first-class language for cells, and ReST for full-document output may cause some problems, but it's possible a one-time pass of pandoc for converting md cells to rst would ameliorate that.

referenced this issue
Closed

### ReST support in notebook frontend #873

Owner

I like your idea to have the ReST preview open a new tab/window and it should be a deliberate action on the part of the user.

Owner

Here are my notes about reST support from a recent email discussion (it may repeat some of Min's points, I'm just pasting my whole email for reference). None of this is cast in stone, just putting it out here so we have material for the discussion:

1. There's one nasty problem with reST in that its specification of heading levels is ambiguous and resolved at runtime by looking at the whole document (i.e., ==== doesn't uniquely specify the heading level until the other underline types have been looked at). To solve this problem, we're going to take a slightly different approach: users
will NOT type headings directly into text cells, but instead we will have a 'heading' type of cell, with a level (say 0-9). These cells will determine the document structure, letting us:

• produce output reST that is consistent in its use of heading underlines.

• offer (eventually) document navigation, level folding and structural operations such as moving, promoting and demoting entire sections.

1. Once structural cells are in place, we'll also have reST text cells (in addition to the current markdown ones). These can initially be left completely unrendered, though eventually it would be nice to be able to render them at least cosmetically (i.e. only resolving cell-local markup and links but not trying to render the whole document).

2. There would be a button/menu action to force a server-side render of all the reST in a notebook. This would take longer, but would give fully working cross-references, etc.

3. Given a .ipynb, it should be possible to export it to reST via the command line. This would make it possible to have for example a make rule like:

%.rst : %.ipynb
ipython notebook export-rest $(NBFLAGS)$<

You could then imagine having a complex sphinx document (even a book) where certain parts are hand-written reST files and other sections/chapters are actually written as notebooks. The flags would allow you to control whether the notebook is only exported from the file as-is, or actually re-executed before export (allowing for a much more sophisticated form of tutorial/documentation creation for libraries, as well as a doctest-like capability of a higher degree).

The reST export will require a fair amount of machinery: currently in the notebook all data is inlined (figures, etc) and that will have to go somewhere. I think a sensible solution is to add a directory called _files/ (like browsers do when they download a full html page), where figures and other files get disentangled and saved. The export will then create .. image:: references to these.

1. I think our focus should be on high-quality Sphinx export, and we leave latex/pdf/html generation in sphinx's hands. We may need to produce a few sphinx extensions (such as improving Ondej Certik's dollarmath one for writing TeX like this: $x+1+\gamma$), but that's it. Beyond that, shpinx does a good job and we should use it.

back-and-forth conversion between json and restructuredtext ?

I don't think we should focus too much on lossless roundtrip conversion: ensuring perfect roundtripping is devilishly hard and making such a promise to users is a hard to maintain contract. However, we could certainly implement reST import so that from a reST document, code blocks are read in as cells. That would make it possible for someone to migrate a reST document into a notebook. Basically this would mean writing a docutils writer that outputs ipynb files.

referenced this issue
Open

### Notebook feature requests #977

Owner

Implemented as Plaintext cells in master.

referenced this issue
Closed


text:
# 500 câu trắc nghiệm Kinh tế lượng – 10C

Tổng hợp 500 câu trắc nghiệm + tự luận Kinh tế lượng (Elementary Statistics). Tất cả các câu hỏi trắc nghiệm + tự luận đều có đáp án. Nội dung được khái quát trong 13 phần, mỗi phần gồm 3 bài kiểm tra (A, B, C). Các câu hỏi trắc nghiệm + tự luận bám rất sát chương trình kinh tế lượng, đặc biệt là phần thống kê, rất phù hợp cho các bạn củng cố và mở rộng các kiến thức về Kinh tế lượng. Các câu hỏi trắc nghiệm + tự luận của phần 10C bao gồm:

SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.
Provide an appropriate response.
1) In the chi-square test of independence, the formula used is $${\chi ^2} = \sum {\frac{{{{\left( {O – E} \right)}^2}}}{E}}$$. Discuss the meaning of O and E and explain the circumstances under which the c2 values will be smaller or larger. What is the relationship between a significant c2 value and the values of O and E?

The O represents the observed frequencies. The E represents the expected frequencies based on the assumption of independence. The c2value will be smaller when the difference between observed and expected frequencies is small and will be larger when the difference between observed and expected values is large. The c2value will be significant when there is a significant difference between the observed and expected values.

2) Explain the computation of expected values for contingency tables in terms of probabilities. Refer to the assumptions of the null hypothesis as part of your explanation. You might give a brief example to illustrate.

Suppose A and B are two categories in a contingency table. In probability computations, the P(A and B) would be computed as P(A)œP(B), provided A and B are independent. The assumption of the null hypothesis is that A and B are in fact independent, so we use the formula P(A and B) = P(A).P(B)

Since P(A) = (# occurrences A)/(total occurrences)
and P(B) = (# occurrences B) /(total occurrences), then
P(A and B) = [(# occurrences A)/(total occurrences)].[(# occurrences B)/(total occurrences)]

Then the expected number of outcomes for A and B would be
P(A and B).(total occurrences) = [(# occurrences A)/(total occurrences)].[(# occurrences B)/(total occurrences0].[total occurrences] or P(A and B).(total occurrences) = [(# occurrences A).(# occurrences B)]/(total occurrences)
This is also the formula for the expected frequency for each cell in a contingency table,
E = [(# occurrences A).(# occurrences B)]/(total occurrences)

So the computation of the expected values is based on the assumption of independence. Examples may be given and will vary.

3) Draw an example of a representative chi-square distribution and discuss three characteristics of a chi-square distribution. Show an example of the special case of the chi-square distribution for only 1 or 2 degrees of freedom.

Any drawing such as that shown in Figure 10-1 will suffice. The chi-square distribution is not symmetric. The values of a chi-square distribution can be 0 or positive, but they cannot be negative. The chi-square distribution is different for each number of degrees of freedom. Examples will vary. Possibilities are a 2 x 2 contingency table for one degree of freedom and a goodness-of-fit test of three categories for two degrees of freedom.

Perform the indicated goodness-of-fit test.
4) Among the four northwestern states, Washington has 51% of the total population, Oregon has 30%, Idaho has 11%, and Montana has 8%. A market researcher selects a sample of 1000 subjects, with 450 in Washington, 340 in Oregon, 150 in Idaho, and 60 in Montana. At the 0.05 significance level, test the claim that the sample of 1000 subjects has a distribution that agrees with the distribution of state populations.

H0: The distribution of the sample agrees with the population distribution.
H1: It does not agree.
Test statistic: $${\chi ^2}$$ = 31.938. Critical value: $${\chi ^2}$$ = 7.815. Reject the null hypothesis. There is sufficient evidence to warrant rejection of the claim that the distribution of the sample agrees with the distribution of the state populations.

Provide an appropriate response.
5) An observed frequency distribution of exam scores is as follows:

 Exam Score Under 60 60 – 69 70 – 79 80 – 89 90 – 100 Frequency 30 30 140 60 40

i) Assuming a normal distribution with $$\mu$$ = 75 and $$\sigma$$ = 15, find the probability of a randomly selected subject belonging to each class. (Use boundaries of 59.5, 69.5, 79.5, 89.5.)
ii) Using the probabilities found in part (i), find the expected frequency for each category.

iii) Use a 0.05 significance level to test the claim that the exam scores were randomly selected from a normally distributed population with $$\mu$$ = 75 = 75 and $$\sigma$$ = 15.

i)

 Exam Score Under 60 60 – 69 70 – 79 80 – 89 90 – 100 Probability 0.1515 0.2042 0.2622 0.2161 0.1185

ii)

 Exam Score Under 60 60 – 69 70 – 79 80 – 89 90 – 100 Expected Frequency 45.45 61.26 78.66 64.83 35.55

iii) The value of the test statistic is $${\chi ^2}$$ = 69.954, which is greater than the critical value of $${\chi ^2}$$ = 9.488. We reject the null hypothesis that the exam scores are from a normally distributed population.

### Thuyết Nguyễn

- Giảng dạy Kinh tế lượng ứng dụng, PPNCKH - Chuyên gia phân tích dữ liệu với Stata - Dành hơn 15000 giờ nghiên cứu Kinh tế lượng ứng dụng - Đam mê nghiên cứu, học hỏi cái mới; - Làm việc độc lập & tự học cao.

format: plain


text:
Article | Open | Published:

# Morphology transition of the primary silicon particles in a hypereutectic A390 alloy in high pressure die casting

## Abstract

The microstructure of a high-pressure die-cast hypereutectic A390 alloy, including PSPs, pores, α-Al grains and Cu-rich phases, was characterized using synchrotron X-ray tomography, together with SEM, TEM and EBSD. The Cu-rich phases exhibited a net morphology and distributed at the boundaries of the α-Al grains, which in turn surrounded the PSPs. Statistical analysis of the reconstructed 1000 PSPs showed that both equivalent diameter and shape factor of the PSPs exhibited a unimodal distribution with peaks corresponding to 25 μm and 0.78, respectively.) PSPs morphology with multiple twinning were observed and morphological or growth transition of the PSPs from regular octahedral shape (with a shape factor of 0.85 was mainly caused by the constraint of the Cu-rich phases. In particular, the presence of the Cu-rich phases restricted the growth of the α-Al grains, inducing stress on the internal silicon particles, which caused multiple twinning occurrence with higher growth potential and consequently led to growth transitions of the PSPs.

## Introduction

The wear property of the hypereutectic Al-Si alloys could be significantly improved by the primary silicon particles (PSPs)1,2,3,4. Massive production of the Al-Si engine blocks was mostly achieve by high pressure die casting (HPDC). Because of fast filling and rapid solidification in HPDC, the PSPs exhibit quite different morphologies from these in other casting processes5,6,7.

The morphology of the PSPs could be altered using different approaches, including high current pulsed electron beams8, electromagnetic stirring9, ultrasonic vibration10, squeeze casting11, spray deposition12, friction stirring13, selective laser melting14, modification in casting process15, and alloying (phosphorus16,17,18 or rare element19,20,21,22). Taghiabadi et al.1 showed that an addition of 0.7wt.% Fe increased the hardness and improved the wear resistance of the F332 Al-Si alloy. Bidmeshki et al.20 found that adding Mn could improve the wear performance of the alloy by changing the morphology of the Fe-rich intermetallic. Shi et al.23 found that the dominant wear mechanisms for Al–20%Si–0.3%Nd alloy were abrasive wear, adhesive wear and oxidative wear, while for Al–20%Si alloy only abrasive wear and adhesive wear were presented. Raghukiran et al.24 found that the Al-Si-Sc alloy exhibited significantly high wear performance because both morphology and size of silicon particles were altered by adding Sc. However, to the best knowledge of authors, very limited work has been performed to investigate the Cu effect on the PSPs, e.g. in a A390 alloy which is extensively applied in aerospace and automotive industries.

The synchrotron X-ray image technique makes it possible to characterize the 3-D morphology of the microstructure without damaging the sample, and extensive studies have been performed to investigate dendrites25,26, defects27,28, PSPs29 and other phases30.

In this study, we employed synchrotron X-ray tomography to characterize the 3-D morphology of the PSPs in a hypereutectic A390 alloy processed using HPDC. Further analysis via SEM, TEM and EBSD was performed on the solidification microstructure with particular attention focused on the interaction between PSPs, α-Al dendrites and Cu-rich phases to disclose the underlying mechanism that controls the morphological transition of the PSPs.

## Experiment

In experiment, a commercial hypereutectic Al-Si alloy, namely A390 was employed, nominal composition of which is shown in Table 1. A TOYOBD–350V5 cold chamber die casting machine was applied to produce standard tensile testing bars (ø 6.4 mm) and Fig. 1 shows the sample configuration, together with the processing parameters27,28.

The metallographic samples were extracted from the tensile testing bar (see Fig. 1), mounted in a holder, grinded using SiC papers (400–2000 grit size) and then polished with ethyl alcohol based colloidal silica suspension (0.5 μm). The specimens were then etched by a hot aqueous solution of 20wt.% NaOH at 80 °C for 100 seconds, which helped to reveal the silicon particles by removing the rest microstructure. The 0.5wt.% HF solution was used to remove eutectic and Cu-rich phases so that the PSPs and α-Al dendrites could be clearly rendered. After ultrasonic cleaning in the ethanol solution, the stereo morphologies were observed using a Zeiss Merlin FESEM equipped with energy dispersive X-ray spectrometer (EDX). The polished cylinder was subjected to an electron probe micro-analyzer (EPMA, JXA-8530F) to determine the distribution of Al, Si and Cu. For the EBSD analysis, the specimens were ground with SiC paper, polished for 15 minutes and then cleaned in the ethanol solution with ultrasound. The EBSD experiment was performed using a TESCAN MIRA3 LMH scanning electron microscope with HKL Channel 5 system, which allowed to determine the twin grain boundaries (TGB). Samples for the TEM observation were prepared by mechanical grinding sections from 1 mm to ~100 μm in thickness, and 3 mm in diameter. These samples were then milled by ion beam (Ar+) with Gatan 691 ion milling machine after dimpling. Characterization of the grain boundaries (including TGB) of PSPs was performed using TecnaiG2 F20 TEM.

The synchrotron X-ray tomography experiment was performed at Shanghai Synchrotron Radiation Facility (SSRF) using the beamline namely BL13W1. A high speed CCD camera was used to record the penetrable intensity of the monochromatic X-ray beam via rotating the sample over 180°. The sample, i.e. a ø1 mm cylinder, was retrieved from the casting center. The X-ray energy was set to be 18.5 keV and the distance between the specimen and camera was 20 cm. After scanning, a total of 720 projections of image were collected. Dark field (without X-ray penetration) and flat field images (without samples) were also collected for image processing. The raw 32 bit images were then converted to 16 bit using a software namely PITRE developed by INFN Trieste31,32. The 3D reconstruction and rendering of the images were then performed on a sub-volume of 780 × 780 × 1200 voxels with a voxel size of 0.65 μm using the software namely Avizo®33.

Image processing techniques such as contrast conditioning, thresholding and smoothing were applied during the data processing25,26,29. Figure 2 shows a detailed image processing procedure. After phase retrieval using PITRE, the image contrast was strengthened to distinguish the different microstructure. After converted to 16-bit, the image data was imported into a software namely Avizo® for microstructure extraction. In particular, pores and Cu-rich phases were extracted using threshold filtering and smoothing, while PSPs were extracted using threshold filtering and line separation method. If the extracted area could not be clearly resolved, both shrinking or expanding method was used, together with the sharpening method. The microstructure such as pores, Cu-rich phases and PSPs could thus be clearly identified. The 3-D morphology of the microstructures were then reconstructed based on the processed 2-D images. Further smoothing or sharpening modules were applied to remove the zigzag surfaces for the 3-D morphology.

## Results

### Typical microstructure of A390 alloy

Figure 3a shows a typical microstructure of the HPDC A390 alloy, in which PSPs, α-Al dendrites, Cu-rich phases and pores could be clearly identified. Comparing with the microstructure under slow cooling conditions29,34,35, the morphology of the PSPs in HPDC were quite different. The elongated PSPs exhibited tetragons, which were not cross-sections of a typical octahedron or twinned morphology. After etched by a HF solution to remove both eutectic and Cu-rich phases, the microstructure was further observed via optical micrograph and SEM. As shown in Fig. 3b and c, the PSPs were closely surrounded by the α-Al dendrites, and most α-Al dendrites exhibited a spherical morphology instead of the commonly observed tree-like shape (or dendrite)36. Such morphology of the α-Al dendrite was similar to that of the Al-20%Si alloy, i.e. when Cu element was not present35. Figure 3d shows the EPMA result for the Al, Si and Cu elements. The PSPs were surrounded by spherically distributed Al element, i.e. representing the α-Al dendrite. The Cu-rich phases were distributed in a net morphology at the α-Al dendrite boundaries. The EPMA result shown in Fig. 3d revealed that the Cu element or the Cu-rich phase was mainly distributed at the grain boundaries of the α-Al dendrite. The Cu-rich phases, mainly comprising Al2Cu, Al3CuNi37, Al5Cu2Mg8Si6, Al7Cu4Ni and Al7(Cu,Ni)2Fe38, exhibited bright color in both SEM and synchrotron X-ray tomography images.

### Reconstructed microstructure using X-ray tomography

Figure 4a showed the reconstructed 3-D morphology of the Cu-rich phases, pores and PSPs in a domain of 507 × 507 × 780 μm3, detail of which was shown in Fig. 4b,c and d–j, respectively. As shown in Fig. 4a, the PSPs could be classified into seven categories according to the equivalent diameter. As shown in Fig. 4a and b, the Cu-rich phases exhibited a typical inter-connected net morphology, which was quite different from that of the plate shape Fe-rich intermetallics38,39 or Ni aluminides30. Most pores tended to locate and distribute inside the Cu-rich phases.

Comparing with other hypereutectic alloys29,34, the PSP morphology of the current alloy exhibited much less octahedral or twinned shapes, and asymmetrical or irregular PSPs of 40–80 μm were commonly observed, as shown in Fig. 4k–n. The PSPs in Fig. 4k and l exhibited irregular octahedral shapes, possibly caused by inhibited growth of certain {111} planes. Fig. 4m shows a hexagonal prim shape formed due to the inhibition growth of both planar and vertex directions. Figure 4n shows a “Y” shape PSP formed due to significant growth difference between <111> and <11$$\overline{2}$$> directions.

### The size and geometry distribution of PSPs

Here, the equivalent diameter d equ and shape factor S F 40 were employed to characterize the morphology of the PSPs:

$${d}_{equ}=\sqrt[3]{6V/\pi }$$
(1)
$${S}_{F}=\sqrt[3]{36\pi {V}^{2}}/A$$
(2)

where V and A are volume and surface area of a particle. Figure 5a and b show the morphology distribution of the PSPs. Both equivalent diameter and shape factor exhibited a unimodal distribution and most PSPs had an equivalent diameter of 25 μm. The most probable PSPs had a shape factor of 0.78, i.e. smaller than that of a regular octahedral shape, which was 0.85 based on its geometry configuration. The deviation of the shape factor from the theoretical value of regular shapes indicated large distortion of the morphology, which was mostly induced by rapid solidification during HPDC.

Figure 5c shows the distribution of the shape factor versus equivalent diameter for all PSPs. For the PSPs over 18 μm, the shape factor decreased with the increasing size, as marked by the dash line. Besides, larger PSPs always had lower shape factor, indicating less symmetry, or in other words, the PSPs tended to grow along particular directions. For instance, the two large PSPs (~70 μm) shown in Fig. 4j exhibited clear branches and consequently had lower shape factor. For PSPs of 45 μm–70 μm, half of PSPs had a shape factor of ~0.5, also indicating an irregular growth. On the other hand, smaller size PSPs (4 μm–10 μm) had a shape factor of 0.4–0.9, indicating a rather diverse morphological features.

## Discussion

### Irregular growth of the PSPs

Figure 6 shows PSPs with irregular shapes, i.e., different from typical octahedral or twinned shapes. Figure 6a and b show plate-like PSPs, formation of which was mostly due to growth inhibition on the two {111} planes. Figure 6c to e show PSPs with similar twinned shape. Beside {111} plane, twinning also occurred near both corner and vertex. Multiple twinning, including parallel twinning (based on the {111} planes) and twinning along central axis, could also be observed, as shown in Fig. 6e and f. The parallel twinning offered parallel re-entrant groove for atom absorption and thus promoted the growth of edges. For the twinning along central axis, Pei and Hosson41 employed the twin plane re-entrant edge (TPRE) mechanism to explain radial branching and growth along <110> . They found that tiny small-angle grain boundaries (SAGBs) exhibited because the total twinning angle was 352.5° (70.5° × 5). In Fig. 6g–i, clustering PSPs was observed and exhibited multi-time twinning. This explained the existence of large PSPs with low shape factor as shown in Fig. 4h–j. The growth of smaller PSPs was easily constrained by the {111} planes and a facetted morphology, e.g. plate-like shape was formed. On the other hand, for larger PSPs twinning offered new growth directions when PSPs were constrained, which consequently led to branch-like (see Fig. 6h) or chain-like morphology (see Fig. 6i).

Figure 7 shows the EBSD result on the distribution of crystal orientation and high density coherent twin boundary of the PSPs. Figure 7a shows thin layer twinning at the center or edge of the plate-like PSPs. Figure 7b and c show other polyhedral shape PSPs with thin layer twinning. Multiple twinning could also be observed for some octahedral shape PSPs. As one of the main growth mechanisms of PSPs40, twinning could decrease the surface energy but increase the bulk strain energy.

Table 2 shows the measured contact area between PSPs (pores) and the Cu-rich phases. The contact area percentage was the contact area between PSPs (pores) and Cu-rich phases divided by the overall surface area of the PSPs (pores). As shown in Table 2, the contact area between PSPs and Cu-rich phases increased with the number of PSPs but the contact area percentage remained at ~1%, indicating that the Cu-rich phases had no direct effect on the size or morphology transition of PSPs. The morphology of PSPs was quite different from that when the additional element was P17, Nd42, Ce36 or Er43. For the latter cases, the growth of PSPs was restricted and twinning was induced because the solute atoms worked as obstacles at the solid-liquid interface. The pinning effect of solute atoms retarded the silicon growth and altered the particle morphology. As shown in Fig. 3, both eutectic and Cu-rich phases were distributed in-between neighboring α-Al dendrites instead of contacting the PSPs. Because of indirect contact, the influence of Cu element on the PSP morphology was different from that of P, Nd, Ce or Er.

### Solidification path with rapid cooling rate

The specimen was extracted in the center of the bar to avoid the surface chilling effect. According to the thermal analysis in37, the growth of PSPs during solidification comprised three stages: large-scale silicon agglomeration, nucleation and growth of the PSPs. In silicon, the diffusion coefficient of Cu was ~10−8 m2/s (~600 °C), which was much higher than that of Al, indicating during silicon agglomeration, Cu diffused much faster than Al. As solidification, both Al and Cu elements was rejected in the melt, promoting the nucleation and growth of PSPs. Comparing with Cu, Al diffused much slower and tended to remain at the boundary of PSPs, which consequently led to the formation of α-Al dendrites. The Cu element on the other hand would remain at the external boundary of the α-Al dendrites. The spheroidisation of the α-Al dendrites was caused by dendritic fragmentation and coarsening44,45,46, and the presence of the Cu-rich phases restricted the microstructure for further growth, like α-Al dendrites and PSPs.

### The driving force for twinning

Al has a fcc lattice structure with a = 4.0490 Å while for Si, it is diamond with a = 5.4282 Å47. The growth mode for the α-Al dendrite was cubic with preferred growth directions like <100> but for silicon, it was layered based on the close-packed {111} planes40,48,49. Accordingly, the absorption of Al atoms to promote α-Al dendrite growth was more efficient than that of Si for PSPs. Further growth of the α-Al dendrites hindered the growth of PSPs by isolating Si atoms. At the phase boundary between α-Al dendrite and PSP, the lattice mismatch caused the formation of thin-stacking-layer Al-Si eutectics and twinning, in particular layer-like twinning based on {111} planes50. As restricted by the surrounding microstructure, twin boundaries of PSPs like Σ3, Σ9 and Σ27 could be identified in the EBSD map. The twinning could also induce higher order parasitic twinning or parallel twinning based on {111} planes. The morphology of PSPs, either reconstructed via synchrotron X-ray tomography or etched via SEM, showed parallel {111} planes with polyhedron shape. The silicon facets promoted nucleation of twins when they were located at the edge of the sample or at grain boundary grooves51.

Figure 8 shows the TEM images of Cu-rich phases and the α-Al dendrites. The inter-connected Cu-rich phases were normally located at the boundaries of the α-Al dendrite, which was similar to the situation for the A319 alloy52. Further growth of either α-Al dendrites or PSPs was constrained by the interconnected Cu-rich phases. Accordingly, the PSPs tended to change the growth direction via twinning on the {111} plane, or constrained completely with a limited size.

Figure 9 shows a schematic illustration of the irregular growth of PSPs. The growth of the octahedral shape was mainly achieved via atom absorption according to the diamond cubic structure. However, such growth was inhibited due to lack of Si atoms caused by the presence of aluminum dendrites. In this respect, it was difficult for PSPs to grow symmetrically along <111> directions in an octahedral shape but rather in a plate-like shape because certain {111} planes were hindered, as shown in the Fig. 9a. However, if twinning occurred, the growth of PSPs was promoted due to the enhanced growth ability along the three <11$$\overline{2}$$> directions by increasing possible the re-entrant grooves. In Fig. 9b, the typical twinning occurred and the three equivalent <11$$\overline{2}$$> directions (or six when the opposite directions were included) tripled the growth chance with three re-entrant edges. The alternation growth of direction helped further growth of PSP which consequently formed into a plate-like morphology. Besides, enough inhibition on the {111} plane would cause the occurrence of twinning, especially multiple parallel twinning, and the re-entrant grooves increased. In this respect, the growth potential along the three <11$$\overline{2}$$> directions was enhanced with increasing possibility to absorb silicon atom in the grooves, comparing with that on an atomically flat {111} plane40. The twinning might occurred in such way that twinning planes were based on the revolved axis. Accordingly, possible growth directions for PSPs increased because of multiple twinning though defects would exist in the PSP due to assembling misfit of different twinning parts.

As the growth along <111> was inhibited, twinning offered ways via plate-like expansion, such as the triangular prism mechanism in Fig. 6c when three twinning directions grew in a similar speed, or the hexagonal prism mechanism in Fig. 4l when six twinning directions grew similarly. The twinning also offered ways to create more steps or “defects” to lower the total free energy of the system via two multiple twining mechanisms. As shown in Figs 6e and 9c, during twinning, the {111} planes piled up one by one, creating more steps with parallel re-entrant grooves53. Twinning could also take place when the five {111} planes revolved over certain axis, achieving a star-like morphology with a 7.5° misfit angle41. Further growth of this shape proceeded by absorbing atoms at the five re-entrant grooves and/or even the defect grooves54. Other types of twinning also took place on certain {111} planes and the PSPs would exhibited crystal-like shapes as shown in Fig. 6g–i.

### Evidence of microstructure stress

Figure 10a and b show the intersecting plane twinning and multiple layer twinning. Figure 10c shows high-density stacking faults in PSPs of size ~1 μm. According to the EPMA and TEM observation, inside the PSP was almost pure Si and few other element exhibited, indicating a zero influence of the heterogeneous element on the stacking fault. The stress, on the other hand, could be the most probable reason for the stacking faults. If the stress was caused by macro external forces, deformation defects could also be induced for ductile microstructure like α-Al dendrites. However, further microstructure analysis indicated that this is not the case. In this respect, the stress must be local and induced by surrounding microstructure, e.g. the squeezing from α-Al dendrites, which was also observed in55. Comparing with the Al-20wt.%Si alloys29,34, the additional squeezing effect from the α-Al dendrites on the PSPs could be induced by the inclusion of Cu in the alloy. The net-like Cu-rich phases constrained the further growth of both α-Al dendrites and the PSPs.

## Conclusion

In this work, the microstructure of a high-pressure die-cast hypereutectic A390 alloy was characterized using synchrotron X-ray tomography, together with SEM, TEM and EBSD. Particular attention was focused on the morphology and distribution of PSPs, pores and Cu-rich phases inside the solidification microstructure. Accordingly, the following conclusions can be drawn:

1. (1)

The microstructure of the A390 alloy in HPDC comprised PSPs, pores, α-Al dendrites and net-like Cu-rich phases. For PSPs, both equivalent diameter and shape factor exhibited a unimodal distribution and most PSPs had an equivalent diameter of 25 μm and shape factor of 0.78. The net-like Cu-rich phases distributed uniformly in the microstructure at the grain boundaries of the α-Al dendrites.

2. (2)

Comparing with typical octahedral and twinned shapes, the morphology of the PSPs in the current A390 alloy changed significantly. Statistical analysis revealed that most PSPs exhibited a shape factor of S F  = 0.78, which was different from that of a regular octahedral shape, i.e., S F  = 0.85. The morphology transition of the PSPs was mainly attributed to twinning (multiple and/or parallel).

3. (3)

The net-like Cu-rich phases restricted the growth of α-Al dendrites, which further constrained and caused morphological transition of the PSPs. High density stacking faults exhibited in PSPs (<1 μm) but for α-Al dendrites no deformation defect was observed. The restriction of the Cu-rich phases on PSPs was believed to be the most significant reason for the stacking fault.

Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

1. 1.

Jasim, K. M. & Dwarakadasa, E. S. Wear in Al-Si alloys under dry sliding conditions. Wear 119, 119 (1987).

2. 2.

Mahato, A., Xia, S., Perry, T., Sachdev, A. & Biswas, S. K. Role of silicon in resisting subsurface plastic deformation in tribology of aluminium–silicon alloys. Tribol Int 43, 381 (2010).

3. 3.

Stoyanov, P., Linsler, D., Schlarb, T., Scherge, M. & Schwaiger, R. Dependence of tribofilm characteristics on the running-in behavior of aluminum–silicon alloys. J Mater Sci 50, 5524 (2015).

4. 4.

Warmuzek, M., Aluminum-silicon casting alloys: atlas of microfractographs. Scitech Book News 4–5 (2004).

5. 5.

Birol, Y. & Birol, F. Wear properties of high-pressure die cast and thixoformed aluminium alloys for connecting rod applications in compressors. Wear 265, 590 (2008).

6. 6.

Hekmat-Ardakan, A., Liu, X., Ajersch, F. & Chen, X. G. Wear behaviour of hypereutectic Al–Si–Cu–Mg casting alloys with variable Mg contents. Wear 269, 684 (2010).

7. 7.

W. Kasprzak, M. A., Sokolowski, J. H., Kurita, H. & Yamagata, H., In Die Casting Congress & Tabletop (North American Die Casting Association, Columbus, OH USA, 2011).

8. 8.

Gao, B. et al. Study on the nanostructure formation mechanism of hypereutectic Al–17.5Si alloy induced by high current pulsed electron beam. Appl Surf Sci 346, 147 (2015).

9. 9.

Kaur, P., Dwivedi, D. K. & Pathak, P. M. Effects of electromagnetic stirring and rare earth compounds on the microstructure and mechanical properties of hypereutectic Al–Si alloys. The International Journal of Advanced Manufacturing Technology 63, 415 (2012).

10. 10.

Lin et al. Effects of ultrasonic vibration and manganese on microstructure and;mechanical properties of hypereutectic Al-Si alloys with 2%Fe. Intermetallics 32, 176 (2013).

11. 11.

Li, R. et al. Effect of squeeze casting on microstructure and mechanical properties of hypereutectic Al-xSi alloys. J Mater Sci Technol 33, 404 (2017).

12. 12.

Wang, F., Ma, Y., Zhang, Z., Cui, X. & Jin, Y. A comparison of the sliding wear behavior of a hypereutectic Al–Si alloy prepared by spray-deposition and conventional casting methods. Wear 256, 342 (2004).

13. 13.

Rao, A. G., Deshmukh, V. P., Prabhu, N. & Kashyap, B. P. Enhancing the machinability of hypereutectic Al-30Si alloy by friction stir processing. Journal of Manufacturing Processes 23, 130 (2016).

14. 14.

Kang, N. et al. Microstructure and wear behavior of in-situ hypereutectic Al–high Si alloys produced by selective laser melting. Mater Design 99, 120 (2016).

15. 15.

Sun, Y., Wang, Q. & Geng, H. Effects of complex modificating technique on microstructure and mechanical properties of hypereutectic Al–Si alloys. J Mater Sci 47, 2104 (2012).

16. 16.

He, K., Yu, F., Zhao, D. & Zuo, L. Effect of phosphorus modification on the microstructure and mechanical properties of DC cast Al-17.5Si-4.5Cu-1Zn-0.7Mg-0.5Ni alloy. T Indian I Metals 62, 367 (2009).

17. 17.

Wu, Y., Wang, S., Li, H. & Liu, X. A new technique to modify hypereutectic Al–24%Si alloys by a Si–P master alloy. J Alloy Compd 477, 139 (2009).

18. 18.

Zuo, M., Jiang, K. & Liu, X. Refinement of hypereutectic Al–Si alloy by a new Al–Zr–P master alloy. J Inorg Organomet P 503, 64 (2012).

19. 19.

Abouei, V., Shabestari, S. G. & Saghafian, H. Dry sliding wear behaviour of hypereutectic Al–Si piston alloys containing iron-rich intermetallics. Mater Charact 61, 1089 (2010).

20. 20.

Bidmeshki, C., Abouei, V., Saghafian, H., Shabestari, S. G. & Noghani, M. T. Effect of Mn addition on Fe-rich intermetallics morphology and dry sliding wear investigation of hypereutectic Al-17.5%Si alloys. Journal of Materials Research and Technology 5, 250 (2016).

21. 21.

Chang, J., Moon, I. & Choi, C. Refinement of Cast Microstructure of Hypereutectic Al-Si Alloys Through the Addition of Rare Earth Metals. J Mater Sci 33, 5015 (1998).

22. 22.

Kasprzak, W., Kurita, H., Birsan, G. & Amirkhiz, B. S. Hardness control of Al–Si HPDC casting alloy via microstructure refinement and tempering parameters. Mater Design 103, 365 (2016).

23. 23.

Shi, W. X., Gao, B., Tu, G. F. & Li, S. W. Effect of Nd on microstructure and wear resistance of hypereutectic Al–20%Si alloy. J Alloy Compd 508, 480 (2010).

24. 24.

Raghukiran, N. & Kumar, R. Effect of scandium addition on the microstructure, mechanical and wear properties of the spray formed hypereutectic aluminum–silicon alloys. Materials Science and Engineering A 641, 138 (2015).

25. 25.

Yang, M., Xiong, S. M. & Guo, Z. Characterisation of the 3-D dendrite morphology of magnesium alloys using synchrotron X-ray tomography and 3-D phase-field modelling. Acta Mater 92, 8 (2015).

26. 26.

Yang, M., Xiong, S. M. & Guo, Z. Effect of different solute additions on dendrite morphology and orientation selection in cast binary magnesium alloys. Acta Mater 112, 261 (2016).

27. 27.

Li, X., Xiong, S. M. & Guo, Z. Failure behavior of high pressure die casting AZ91D magnesium alloy. Materials Science and Engineering A 672, 216 (2016).

28. 28.

Li, X., Xiong, S. M. & Guo, Z. On the porosity induced by externally solidified crystals in high-pressure die-cast of AM60B alloy and its effect on crack initiation and propagation. Materials Science and Engineering A 633, 35 (2015).

29. 29.

Wang, J., Guo, Z. & Xiong, S. M. Characterization of the morphology of primary silicon particles using synchrotron X-ray tomography. Mater Charact 123, 354 (2017).

30. 30.

Asghar, Z., Requena, G., Degischer, H. P. & Cloetens, P. Three-dimensional study of Ni aluminides in an AlSi12 alloy by means of light optical and synchrotron microtomography. Acta Mater 57, 4125 (2009).

31. 31.

Chen, R. et al. PITRE: software for phase-sensitive X-ray image processing and tomography reconstruction. J Synchrotron Radiat 19, 836 (2012).

32. 32.

INFN Trieste: PITRE software, https://webint.ts.infn.it/en/research/exp/beats2/pitre.html. (2013).

33. 33.

FEI Company: Amira-Avizo 3D Software, https://www.fei.com/software/avizo3d/ (2017).

34. 34.

Xu, C. L., Wang, H. Y., Liu, C. & Jiang, Q. C. Growth of octahedral primary silicon in cast hypereutectic Al–Si alloys. J Cryst Growth 291, 540 (2006).

35. 35.

Yamagata, H., Kasprzak, W., Aniolek, M., Kurita, H. & Sokolowski, J. H. The effect of average cooling rates on the microstructure of the Al–20% Si high pressure die casting alloy used for monolithic cylinder blocks. J Mater Process Tech 203, 333 (2008).

36. 36.

Li, Q. et al. Effect of rare earth cerium addition on the microstructure and tensile properties of hypereutectic Al–20%Si alloy. J Alloy Compd 562, 25 (2013).

37. 37.

Robles Hernández, F. C. & Sokolowski, J. H. Thermal analysis and microscopical characterization of Al–Si hypereutectic alloys. J Alloy Compd 419, 180 (2006).

38. 38.

Terzi, S. et al. In situ study of nucleation and growth of the irregular α-Al/β-Al5FeSi eutectic by 3-D synchrotron X-ray microtomography. Acta Mater 58, 5370 (2010).

39. 39.

Puncreobutr, C. et al. Influence of Fe-rich intermetallics on solidification defects in Al–Si–Cu alloys. Acta Mater 68, 42 (2014).

40. 40.

van de Waal, B. W. Cross-twinning model of fcc crystal growth. J Cryst Growth 158, 153 (1996).

41. 41.

Pei, Y. T. & De Hosson, J. Five-fold branched Si particles in laser clad AlSi functionally graded materials. Acta Mater 49, 561 (2001).

42. 42.

Xu, C. L., Jiang, Q. C., Yang, Y. F., Wang, H. Y. & Wang, J. G. Effect of Nd on primary silicon and eutectic silicon in hypereutectic Al–Si alloy. J Alloy Compd 422, L1 (2006).

43. 43.

Li, Q., Xia, T., Lan, Y., Li, P. & Fan, L. Effects of rare earth Er addition on microstructure and mechanical properties of hypereutectic Al–20% Si alloy. Materials Science and Engineering A 588, 97 (2013).

44. 44.

Limodin, N. et al. In situ and real-time 3-D microtomography investigation of dendritic solidification in an Al–10wt.% Cu alloy. Acta Mater 57, 2300 (2009).

45. 45.

Limodin, N., Salvo, L., Suéry, M. & DiMichiel, M. In situ investigation by X-ray tomography of the overall and local microstructural changes occurring during partial remelting of an Al–15.8wt.% Cu alloy. Acta Mater 55, 3177 (2007).

46. 46.

Ruvalcaba, D., Mathiesen, R. H., Eskin, D. G., Arnberg, L. & Katgerman, L. In situ observations of dendritic fragmentation due to local solute-enrichment during directional solidification of an aluminum alloy. Acta Mater 55, 4287 (2007).

47. 47.

Cullity, B. D., Elements of X-ray diffraction (1st edition) 484–485 (1978).

48. 48.

Kutsukake, K. et al. Formation mechanism of twin boundaries during crystal growth of silicon. Scripta Mater 65, 556 (2011).

49. 49.

Pohl, J., Müller, M., Seidl, A. & Albe, K. Formation of parallel (111) twin boundaries in silicon growth from the melt explained by molecular dynamics simulations. J Cryst Growth 312, 1411 (2010).

50. 50.

Lu, S. Z. & Hellawell, A. The mechanism of silicon modification in aluminum-silicon alloys: Impurity induced twinning. Metallurgical and Materials Transactions A 18, 1721 (1987).

51. 51.

Riberi-Béridot, T. et al. On the impact of twinning on the formation of the grain structure of multi-crystalline silicon for photovoltaic applications during directional solidification. J Cryst Growth 418, 38 (2015).

52. 52.

Puncreobutr, C., Phillion, A. B., Fife, J. L. & Lee, P. D. Coupling in situ synchrotron X-ray tomographic microscopy and numerical simulation to quantify the influence of intermetallic formation on permeability in aluminium–silicon–copper alloys. Acta Mater 64, 316 (2014).

53. 53.

Stokkan, G. Twinning in multicrystalline silicon for solar cells. J Cryst Growth 384, 107 (2013).

54. 54.

Cao, Y., Zhang, L. C. & Zhang, Y. Twinning interactions induced amorphisation in ultrafine silicon grains. Materials Science and Engineering A 658, 321 (2016).

55. 55.

Xie, D. Y. et al. Ordered stacking faults within nanosized silicon precipitates in aluminum alloy. Mater Lett 190, 225 (2017).

## Acknowledgements

The work was financially supported by the National Natural Science Foundation of China (Grant No. 51775297), the National Science and the Tsinghua University Initiative Scientific Research Program (20151080370) and UK Royal Academy of Engineering/Royal Society through the Newton International Fellowship Scheme. The authors also appreciate the help provided by Shanghai Synchrotron Radiation Facility and their provision of beam time.

## Author information

### Affiliations

1. #### School of Materials Science and Engineering, Tsinghua University, Beijing, 100084, China

• J. Wang
• , Z. Guo
•  & S. M. Xiong
2. #### Key Laboratory for Advanced Materials Processing Technology, Ministry of Education, Beijing, China

• Z. Guo
•  & S. M. Xiong
3. #### R&D Center, China FAW Group Corporation, Changchun, 130011, China

• J. L. Song
• , W. X. Hu
•  & J. C. Li

### Contributions

Each author has participated sufficiently in the work to take public responsibility for appropriate portions of the content. All the authors make substantial contributions to the study conception and design, sample preparation, acquisition of data, analysis and interpretation of data and drafting the article or revising it critically for important content. In general, authors share the responsibility as follows: Study conception and design: Shoumei Xiong; Jianlong Song; Weixing Hu; Jincheng Li Sample preparation: Shoumei Xiong; Jun Wang; Jianlong Song; Weixing Hu; Jincheng Li Acquisition of data: Jun Wang; Shoumei Xiong; Zhipeng Guo Analysis and interpretation of data: Jun Wang; Shoumei Xiong; Zhipeng Guo Drafting of manuscript: Jun Wang Critical revision: Jun Wang; Zhipeng Guo; Shoumei Xiong

### Competing Interests

The authors declare that they have no competing interests.

### Corresponding authors

Correspondence to Z. Guo or S. M. Xiong.


text:
## Geometry: Common Core (15th Edition)

Published by Prentice Hall

# Chapter 2 - Reasoning and Proof - 2-1 Patterns and Inductive Reasoning - Practice and Problem-Solving Exercises: 40

0.0001, 0.00001

#### Work Step by Step

Divide each term by 10 to get the next term. $\underset{\div10}{\underset\Rightarrow{0.1}}, \underset{\div10}{\underset\Rightarrow{0.01}},\underset{\div10}{\underset\Rightarrow{0.001}}, \underset{\div10}{\underset\Rightarrow{0.0001}}, 0.00001$, . . .

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
# Representing non-contiguous memory regions as a standard vector with O(1) access

What interesting alternatives are there for constructing an arbitrarily large static array from smaller scattered blocks of fixed-sized non-contiguous blocks of memory?

This is similar to the problem solved by hardware MMU pagetable mappings from virtual memory to physical memory, but in this particular case the scale is different, and it needs to be implemented in software, with virtual memory, and also in userland.

To clarify a bit, I'm using baker's treadmill as my GC, but it only supports fixed sized allocations (the current chunk size is 128 bytes, but I have some slight flexibility in re-defining it). The language I'm implementing requires arbitrary sized vectors with something close to O(1) access/write.

Currently I'm just building a pyramid of chunks, which gives something like log12(n) lookups, but the memory overhead sucks. Are there any interesting hashing solutions for mapping monotone index ranges to pointers?

What about run-time generation of a minimal perfect hash function? It seems they require at minimum 1.44 bits per key. If we bump the allocation block size to 512, we can support vectors with up to 1454080 elements, since we only need to map block numbers and not vector indices.

Edit:

See the paper "Z-rays: divide arrays and conquer speed and flexibility" (http://dl.acm.org/citation.cfm?id=1806596.1806649&coll=DL&dl=GUIDE) for more information regarding optimization of this array format:

These scattered blocks are sometimes called arraylets and are used by other GC algorithms: https://www.ibm.com/developerworks/websphere/techjournal/1108_sciampacone/1108_sciampacone.html

Also related: the Staccato GC: http://researcher.watson.ibm.com/researcher/files/us-groved/rc24504.pdf

A simple approach is to have a one-level lookup table that maps each block of the array to where it is stored. In other words, for a logical array $A[0\dots n-1]$ containing $n$ bytes, we have a lookup table $T[0\dots \frac{n}{128}-1]$ containing $n/128$ pointers; the bytes $A[128k \dots 128k+127]$ are stored at the physical address $T[k]$. To look up $A[i]$, we compute $p = T[i \gg 7]$ (where $\gg$ indicates logical right shift), then read the byte at address $p + (i \bmod 128)$.
This does require a single contiguous region large enough to store $n/128$ pointers (e.g., holding $n/32$ or $n/16$ bytes, depending on whether you're on a 32-bit or 64-bit system). Given that, array operations become fast: you basically have one extra table lookup and indirection.
Rather than looking for a better data structure to handle this kind of arbitrarily-bad fragmentation, a cleaner solution is probably to design your memory management system to avoid creating worst-case memory fragmentation in the first place. One architecture that can help deal with this is a buddy allocator. The entire memory address space can be divided into 128-bit chunks, but we then impose a binary tree structure on it: the 128-byte chunk at address $256k$ is the sibling/buddy of the 128-byte chunk at address $256k+128$. Those two chunks, if they're both available, can be coalesced into a (fused) 256-byte chunk. Each 256-byte chunk has a buddy, and if they're both available, they too can be merged to obtain a 512-byte chunk. And so on. This allows you flexibility to deal with small 128-byte chunks when you need them, but also provides a way to build up larger chunks of contiguous memory and try to avoid arbitrarily-bad fragmentation.


text:
# Gravitational potential energy problem

Tags:
1. Oct 30, 2016

### Buffu

1. The problem statement, all variables and given/known data

Question :-
Two stars, each of a solar mass and radius $10^7 m$ are at a distance of $10^{12} m$ from each other. Find the speed of each star before collision if initial speed is negligible.

2. Relevant equations

$$V(r) = {-G Mm \over r}$$

3. The attempt at a solution

Initial total energy of a star would be $${-G m^2 \over 10^{26}}$$
and final energy would be $${-G m^2 \over 10^{14}} + {1 \over 2 }mv^2$$

use conservation of energy i got

$${-G m^2 \over 10^{26}} = {-G m^2 \over 10^{14}} + {1 \over 2 }mv^2$$

Solving for $v$ i got, $3.6 \times 10^6 m/s$. But, the given answer is $2.6 \times 10^6 m/s$.

Now i can get the given answer by solving of $v$ in equation $${-G m^2 \over 10^{26}} = {-G m^2 \over 10^{14}} + mv^2$$

I am not getting the concept that why i should drop the half from equation ? Please help me.

2. Oct 30, 2016

### BvU

How many stars are moving at impact time ?

3. Oct 30, 2016

### Buffu

Two stars. But how does that help ?

4. Oct 30, 2016

### BvU

So how many times ${1\over 2}mv^2$ ?

5. Oct 30, 2016

### PeroK

Can you explain this fomula? What is $V(r)$ in this case?

6. Oct 30, 2016

### Buffu

Gravitational potential energy.

7. Oct 30, 2016

### PeroK

... of what?

8. Oct 30, 2016

### Buffu

Of any one star.

9. Oct 30, 2016

### PeroK

10. Oct 30, 2016

### Buffu

But why do we add the Kinetic energy of other star, i am only considering Potential energy of one star.

11. Oct 30, 2016

### Buffu

I think yes but i am getting a feel that i am wrong. But why ?

12. Oct 30, 2016

### PeroK

If $m \ne M$ do both stars have the same PE? Think about $M >> m$.

13. Oct 30, 2016

### Buffu

The bigger one will have less P.E, right ? But that does not answer why $V(r)$ is P.E of both stars combined.

14. Oct 30, 2016

### PeroK

You can derive it by looking at the force on each object and how that varies with the distance between them. That's a different exercise.

For the time being:

$$V(r) = {-G Mm \over r}$$

Is the combined total PE of both stars.

15. Oct 30, 2016

### Buffu

So if we have 3 stars of equal mass, then total PE would still be $V(r) = {-G m^2 \over r}$ or $V(r) = {-3G m^2 \over r}$ or $V(r) = {-3G m^2 \over 2r}$. I think it is the third one.

16. Oct 30, 2016

### PeroK

What's $r$ if you have 3 stars?

17. Oct 30, 2016

### Buffu

Distance between them. Like a vertices of a equilateral triangle. I just thought of this problem now.

18. Oct 30, 2016

### PeroK

Derivation of PE for two masses, $m_1$ and $m_2$:

$F_1 = F_2 = \frac{Gm_1 m_2}{r^2}$

$dKE_1 + dKE_2 = \frac{Gm_1 m_2}{r^2}(-dr_1 - dr_2) = -\frac{Gm_1 m_2}{r^2}dr$ (where $r = r_1 + r_2$)

$dV = \frac{Gm_1 m_2}{r^2}dr$

$V(r) = -\frac{Gm_1 m_2}{r}$

19. Oct 30, 2016

### PeroK

By symmetry, the PE of each star due to each of the others is $-\frac{Gm^2}{2r}$, so yes the total is $-\frac{3Gm^2}{2r}$

20. Oct 30, 2016

### Buffu

Ok i got this.

Ok imagine three objects like $$\underbrace{\star}_{m_1} \overbrace{------}^{r} \underbrace{\star}_{m_2}\overbrace{------}^{r} \underbrace{\star}_{m_3}$$
What should be the total PE of middle star ?

it is not $$- {Gm_1m_2\over r} - {Gm_3m_2\over r}$$.
We can't use symmetry argument here because masses are different.

So how can i know the PE of mid star w.r.t to first star and w.r.t to third star separately ?


text:
Use adaptive quiz-based learning to study this topic faster and more effectively.

Types of wave

Progressive waves

A wave which travels through space is called a progressive (or travelling) wave (e.g. light waves, ocean waves).

• A progressive wave causes a net transfer of energy between two points in space.

• This is because each oscillation has a fixed total energy which is transferred as the wave moves in space.

An ocean wave which collides with a seawall transfers the energy of the water particles to the wall.

• There is no net transfer of mass by a progressive mechanical wave as there is no permanent displacement of the particles of the wave.

A standing wave (such as a wave on a guitar string) does not move through space. It vibrates in place. Standing waves are not progressive waves.

A progressive wave travelling from left to right causes the oscillation of a particle at a particular position.

Mechanical waves

A mechanical wave is a series of oscillations in a physical medium such as air or water.

Sound waves, ocean waves and earth waves (in an earthquake) are mechanical waves

Mechanical waves require the interaction of the particles of a physical medium to transfer energy. They cannot travel through a vacuum.

Sound does not travel through vacuum. An explosion in space will generate no sound.

Sound waves are mechanical waves.

Electromagnetic waves

Electromagnetic waves are generated by oscillations in the electric and magnetic fields of charged particles. Unlike mechanical waves, electromagnetic waves do not require a medium. They can move in a vacuum.

Microwaves, x-rays, visible light and radio waves are all electromagnetic waves.

The speed at which electromagnetic waves move depends on the medium. In a vacuum, they move at the speed of light (approximately 300,000,000 m/s).

The variation of the electric ($\vecphy{E}$) field and the magnetic ($\vecphy{B}$) field of an electromagnetic wave moving from left to right.

Transverse and longitudinal waves

Waves can be categorised as transverse or longitudinal, depending on the direction of vibration (oscillation) of the wave.

A transverse wave is a wave in which the direction of vibration of the wave elements is perpendicular to the direction of motion of the wave.

Ocean waves: the ocean level rises and falls (vertically) but the wave travels horizontally.

A longitudinal wave is a wave in which the direction of vibration is parallel to the direction of motion of the wave.

Sound waves: the air molecules vibrate in the same direction as the motion of the wave from a speaker.

View looking down on the table. Top: a transverse wave. Bottom: a a longitudinal wave.

Waves on a rope

A rope that is swung upwards and downwards creates a series of upwards-and-downwards movements along the entire length of the rope. These are collectively called a wave.

The energy that is given to one end of the rope by moving it upwards and downwards is transferred through the length of the rope to the other end.

However, each section of the rope still has the same mass (no mass was transferred to the other end along with the energy).

Two girls holding a rope. If the rope is swung with greater energy, a larger number of upwards-and-downwards repetitions are generated.

Waves in a ripple tank

The behaviour of waves is often studied using a ripple tank.

A ripple tank is a glass container filled with water. To create different types of water waves, a vibrating dipper or bar is placed within the tank.

These create ripples in the water. Each ripple of a water wave in a ripple tank is a wavefront.

A vibrating dipper creates circular wavefronts in the ripple tank while the vibrating bar creates linear wavefronts.

Linear wavefronts could be used to model a straight beam of light while circular wavefronts could be used to model light spreading out from a lamp.

A vibrating dipper in a ripple tank creates circular wavefronts. The wavefronts spread out in all directions away from the source of the disturbance.

Waves on a slinky spring

To show examples of different waves, a "slinky" spring can be fixed at one end of a horizontal table.

A slinky spring (a type of spring which is long and easily stretched).

Moving the free end of the spring back-and-forth in a direction perpendicular to its length produces transverse waves along the spring.

Moving the free end of the spring back-and-forth in a direction parallel to its length produces longitudinal waves along the spring.

View looking down on the table. Top: a slinky being used to make a transverse wave. Bottom: a slinky being used to make a longitudinal wave.


text:
# Ex.12.2 Q12 Areas Related to Circles Solution - NCERT Maths Class 10

Go back to  'Ex.12.2'

## Question

To warn ships for underwater rocks, a lighthouse spreads a red coloured light over a sector of angle $$80^\circ$$ to a distance of $$\text{16.5 km.}$$ Find the area of the sea over which the ships are warned.

(Use \begin{align}\pi=3.14\end{align})

## Text Solution

What is known?

A lighthouse spreads a red coloured light over a sector of angle of \begin{align}80^{\circ}\end{align} to a distance of $$16.5 \,\rm{km}$$ to warn ships for underwater rock.

(Use \begin{align}\pi=3.14\end{align})

What is unknown?

Area of the sea over which the ships are warned.

Reasoning:

Since the lighthouse spreads red coloured light over a sector  of a circle with radius $$\text{= 16.5 km}$$ and angle with degree measure \begin{align}80^{\circ}\end{align}.

Area of sea over which the ship are warned = area of the sector of the circle with radius 16.5km and angle with degree measure\begin{align}80^{\circ}\end{align}.

\begin{align}&={\frac{\theta}{360^{\circ}} \times \pi r^{2}} \\ &={\frac{80^{\circ}}{360^{\circ}} \times \pi r^{2}} \\ &={\frac{2}{9} \times \pi r^{2}} \end{align}

Steps:

Area of sea over which the ships are warned = Area of a sector of the circle with radius, $$\rm{}r=16.5\,km$$ and angle with degree measure\begin{align}80^{\circ}\end{align}.

\begin{align} &= \frac{{{{80}^\circ }}}{{{{360}^\circ }}} \times \pi {r^2}\\ &= \frac{2}{9} \times 3.14 \times 16.5 \times 16.5\\ &= 189.97\,\,{\text{k}}{{\text{m}}^2}\end{align}

Learn from the best math teachers and top your exams

• Live one on one classroom and doubt clearing
• Practice worksheets in and after class for conceptual clarity
• Personalized curriculum to keep up with school


text:
O. Davydov and L. L. Schumaker, Interpolation and scattered data fitting on manifolds using projected Powell-Sabin splines, IMA J. Numer. Anal., 28 (2008), 785--805. DOI 10.1093/imanum/drm033

Abstract: We present methods for either interpolating data or for fitting scattered data on a two-dimensional smooth manifold $\Omega$. The methods are based on a local bivariate Powell-Sabin interpolation scheme, and make use of a family of charts $\{(U_\xi,\phi_\xi)\}_{\xi\in\Omega}$ satisfying certain conditions of smooth dependence on $\xi$. If $\Omega$ is a $C^2$-manifold embedded into $\RR^3$, then projections into tangent planes can be employed. The data fitting method is a two-stage method. We prove that the resulting function on the manifold is continuously differentiable, and establish error bounds for both methods for the case when the data are generated by a smooth function.

Preprint version:    pdf

Free-access link to the journal version:    pdf

Homepage


text:
Today, we’ll close our exploration of Gradient Boosting. First, we looked into a simplified form of the approach, and saw how to combine weak learners into a decent predictor. Then, we implemented a very basic regression tree. Today, we will put all of this together. Instead of stumps, we will progressively fit regression trees to the residuals left by our previous model; and rather than using plain residuals, we will leverage DiffSharp, an F# automatic differentiation library, to generalize the approach to arbitrary loss functions.

I won’t go back over the whole setup again here; instead I will just recap what we have at our disposition so far. Our goal is to predict the quality of a bottle of wine, based on some of its chemical characteristics, using the Wine Quality dataset from the UCI Machine Learning repository. (References: P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis. Modeling wine preferences by data mining from physicochemical properties. In Decision Support Systems, Elsevier, 47(4):547-553, 2009.)

Gist available here

We are using a couple of types to model our problem:

type Wine = CsvProvider<"data/winequality-red.csv",";",InferRows=1500>

type Observation = Wine.Row
type Feature = Observation -> float
type Example = Observation * float
type Predictor = Observation -> float

To predict wine quality, we extracted 10 features from the dataset:

let features = [
Alcohol Level
Chlorides
Citric Acid
Density
Fixed Acidity
Free Sulfur Dioxide
PH
Residual Sugar
Total Sulfur Dioxide
Volatile Acidity
]

We have available a basic regression tree implementation, learnTree, which, given a sample, a list of Feature, will learn a tree to a given depth.

Our goal now is to revisit our initial simplified boosting implementation, but use a regression tree instead of stumps. In other words, in the original version, at each iteration, we were trying to find the stump that fitted the residuals best; now we want to find the tree that fits the residuals best.

The problem statement suggests an obvious direction: we don’t really care what approach we are using, we simply want to learn the best possibly predictor given a sample. It could be stumps, or trees, or whatever you fancy. Let’s create a type to represent that:

type Learner = Example seq -> Predictor

Given a set of examples, that is, observations, and the value to predict, a Learner will do its magic, and return to us the best Predictor it can find.

All we need to do then is rearrange a bit our original code, and inject an arbitrary Learner:

let learn (sample:Example seq) (learner:Learner) (depth:int) =

let rec next iterationsLeft predictor =

// we have reached depth 0: we are done
if iterationsLeft = 0
then predictor
else
// compute new residuals,
let newSample =
sample
|> Seq.map (fun (obs,y) -> obs, y - predictor obs)

// learn a predictor against residuals,
let newPredictor = learner newSample

// create new predictor
let newPredictor = fun obs -> predictor obs + newPredictor obs

// ... and keep going
next (iterationsLeft - 1) newPredictor

// initialize with a predictor that
// predicts the average sample value
let baseValue = sample |> Seq.map snd |> Seq.average
let basePredictor = fun (obs:Observation) -> baseValue

next depth basePredictor

That’s pretty much it. If we want to learn a Tree, the only thing we need is to create a function with the appropriate signature; given that the trees appeared to overfit after depth 3, that’s the limit we will give them:

let treeLearner (sample:Example seq) =
learnTree (evenSplitter 5,sumOfSquaresCost) sample features 3
|> predict

The treeLearner function has signature sample:seq<Example> -> (Observation -> float), so all we need to do now is to “inject” it into our learn function.

[ 1 .. 5 ]
|> List.map (fun depth ->
let model = learn redSample treeLearner depth
depth, averageSquareError redSample model)

In this case, we run our learning procedure at deeper and deeper levels, recording the depth and prediction quality at each step:

val it : (int * float) list =
[(1, 0.472892841); (2, 0.4591086941); (3, 0.4564827282); (4, 0.4553268525);
(5, 0.4550962347)]

The results are not amazing, but that’s OK, our goal here is not to create the best model for that particular problem. We just want to confirm that things are working, and this appears to be the case: as we increase depth, the average prediction error does go down.

You might have wondered by now “why is this called Gradient Boosting”? So far, there hasn’t been a single reference to a gradient. Where does this fit in?

Note that at each step of the algorithm, we are fitting a predictor to the residuals left by the current best predictor. In other words, for observation i, with a current best predictor $F(x)$, we are computing residuals $r_i$ as

This makes sense on an intuitive level: we are trying to learn a new model that will adjust for whatever our current best predictor “misses”. However, there is another way to look at this. If you consider the loss function:

… then the residuals as we are computing them happen to be the gradient of that particular loss function.

This is interesting, for 2 reasons. First, this connects gradient boosting to gradient descent: what we have been doing so far can be seen as gradient descent, implicitly using the sum-of-square residuals (or SSR), as a loss function, and trying at each step to find a predictor that most closely matches the gradient. Then, this allows us to generalize our algorithm. Rather than using the “plain residuals”, we can decide on any arbitrary loss function, and compute the pseudo residuals at each step as the gradient of the loss function we are interested in.

This also opens a new problem: if we do not use the SSR as a loss function, simply stacking up the predictors we get at each iteration will not necessarily give us the smallest overall loss. So instead of building our aggregate predictor as

where $F_m(x)$ is our best predictor at stage m and $h_m(x)$ is the predictor we fitted against the residuals, we need to now construct,

… where $\gamma$ is the value that minimizes the loss function for $F_m(x)$.

Replacing residuals by pseudo-residuals

Let’s leave it at that for theory, and see if we can get this to work. As a first step, we will stick with SSR as a loss function, so that we can ignore “the gamma problem”, and simply use our current algorithm, replacing the manual residuals computation by using the gradient.

Fortunately, the gradient computation is a simple problem to solve here, thanks to an awesome F# library, DiffSharp. In a nutshell, DiffSharp will take any F# function, and automatically differentiate it for you.

For simplicity, I used version 0.6.3 of DiffSharp here (by setting up the Paket dependenty to nuget diffsharp < 0.7.0). Versions 0.7 and higher support BLAS/LAPACK, which yields better performance, but is potentially more complicated. I went for ease.

Let’s add a reference to DiffSharp to our script first:

#r "fsalg/lib/fsalg.dll"
#r "diffsharp/lib/diffsharp.dll"
open DiffSharp.Numerical

What does this buy us? Let’s define a Loss type to represent a loss function:

type Loss = float -> float

The Loss will take as an input y - predictor x, and return the corresponding loss / penalty. For instance, we can define

let squareLoss : Loss = fun x -> 0.5 * pown x 2

The beauty of DiffSharp is that I can take that function, and differentiate it:

let diffSquareLoss = diff squareLoss
>
val diffSquareLoss : (float -> float)

I immediately get back a function, which I can plot:

[ - 5.0 .. 0.1 .. 5.0 ]
|> List.map (fun x -> x, diffSquareLoss x)
|> Chart.Line
|> Chart.Show

This is not the most thrilling chart, but proves our point. If we were to use squareLoss as a Loss function, then differentiating it gives us back the residuals themselves. All we have to do then is to replace our manual residuals computation, by injecting a Cost function and computing the pseudo-residuals using DiffSharp:

type Loss = float -> float

let draftBoostedLearn (sample:Example seq) (learner:Learner) (loss:Loss) (depth:int) =

let pseudoResiduals = diff loss

let rec next iterationsLeft predictor =

// we have reached depth 0: we are done
if iterationsLeft = 0
then predictor
else
// compute new residuals,
let newSample =
sample
|> Seq.map (fun (obs,y) ->
obs,
pseudoResiduals (y - predictor obs))

// learn a tree against residuals,
let residualsPredictor = learner newSample

// create new predictor
let newPredictor =
fun obs ->
predictor obs + residualsPredictor obs

// ... and keep going
next (iterationsLeft - 1) newPredictor

// initialize with a predictor that
// predicts the average sample value
let baseValue = sample |> Seq.map snd |> Seq.average
let basePredictor = fun (obs:Observation) -> baseValue

next depth basePredictor

If we pass in the squareLoss function, we should get exactly the same results as before. Let’s confirm this:

let squareLoss : Loss = fun x -> 0.5 * pown x 2

[ 1 .. 5 ]
|> List.map (fun depth ->
let model = draftBoostedLearn redSample treeLearner squareLoss depth
depth, averageSquareError redSample model)

The evaluation of our model at various depths is identical to what we had previously - it looks like we are in business:

>
val it : (int * float) list =
[(1, 0.472892841); (2, 0.4591086941); (3, 0.4564827282); (4, 0.4553268525);
(5, 0.4550962347)]

Optimal model combination

Let’s tackle now the problem of finding the “right” value gamma to combine our predictors. What we want is the following: given 2 predictors f1 and f2 and a Loss function, we need to find a value gamma, such that f1 + gamma * f2 minimizes the value of the loss, summed across a sample.

let combination f1 f2 gamma : Predictor =
fun obs -> f1 obs + gamma * f2 obs

If f1 and f2 are given, combination is simply a function of gamma. What we need is an algorithm that will find a value of gamma that minimizes Loss. Let’s use a slightly simplified version of the gradient descent implementation provided on the DiffSharp page:

let gradientDescent f x0 eta epsilon =
let rec desc x =
let g = diff f x
if abs g < epsilon
then x
else
desc (x - eta * g)
desc x0

Explaining gradient descent would take us a bit more time than we want to spend here; in a nutshell, the algorithm takes a function and, starting from an initial value, follows the direction of steepest descent, given by the gradient. The step size is given by the parameter eta, and, once the changes become small and fall under a given threshold value epsilon, the algorithm stops.

The nice thing here is that, thanks to DiffSharp, we have a generic algorithm that will identify the minimum value for any function. As an example of usage,

let foo x = pown x 2
let min_foo = gradientDescent foo 10. 0.1 0.0001

… will find the minimum 0.0 of $f(x) = x^2$ , starting from x = 10.0.

All we need to do then is to use gradient descent to find the “best gamma”:

let optimalGamma (sample:Example seq) f1 f2 (penalty:Loss) =

let combine gamma = combination f1 f2 gamma
let costOf gamma =
sample
|> Seq.sumBy (fun (obs,y) ->
combine gamma obs - y |> penalty)

We create a combine function, with a single argument gamma, and a costOf function that computes, for a given value of gamma, the total cost (as measured by the loss function) summed across the sample. We can then pass that function costOf to our gradient descent implementation - if everything goes according to plan, this will spit out the optimal value of gamma.

I set the values for eta and epsilon to 0.001 and 0.01 quite arbitrarily here. Poorly chosen values for eta can cause issues: if it is too large, gradient descent will not converge. I simply tuned it by hand to work on my example - be warned that if you want to use this code, you may have to adjust it!

Let’s re-arrange again our learning algorithm, and incorporate that bit:

let boostedLearn (sample:Example seq) (learner:Learner) (loss:Loss) (depth:int) =

let pseudoResiduals = diff loss

let rec next iterationsLeft predictor =

// we have reached depth 0: we are done
if iterationsLeft = 0
then predictor
else
// compute new residuals,
let newSample =
sample
|> Seq.map (fun (obs,y) ->
obs,
pseudoResiduals (y - predictor obs))

// learn a tree against residuals,
let residualsPredictor = learner newSample

// find optimal gamma
let gamma = optimalGamma sample predictor residualsPredictor loss

// create new predictor
let newPredictor =
fun obs ->
predictor obs + gamma * residualsPredictor obs

// ... and keep going
next (iterationsLeft - 1) newPredictor

// initialize with a predictor that
// predicts the average sample value
let baseValue = sample |> Seq.map snd |> Seq.average
let basePredictor = fun (obs:Observation) -> baseValue

next depth basePredictor

If everything is working as we expect, nothing should have changed. Let’s confirm that:

[ 1 .. 5 ]
|> List.map (fun depth ->
let model = boostedLearn redSample treeLearner squareLoss depth
depth, averageSquareError redSample model)
>
val it : (int * float) list =
[(1, 0.472892841); (2, 0.4591086941); (3, 0.4564827282); (4, 0.4553268525);
(5, 0.4550962347)]

Example using the Huber loss function

So what did we gain here? So far, nothing: the net result is an added dependency, and a slower and more complex algorithm.

Stated that way, this might not appear as a great success. However, we now have the ability to plug in virtually any loss function we want.

Why would you want to do that? Using the sum-of-squares as a loss function has its benefits, but it won’t always be what you want. One of its drawbacks is that it penalizes very heavily outliers. If you have a couple of observations in your sample which your model struggles to predict, and cause large errors, using SSR as a loss function will put a very large penalty on these, and will try its best to reduce the error, at the expense of the overall sample.

That is one reason why it is sometimes convenient to use different loss functions. As an example, let’s consider the Huber loss function (thanks @evelgab for the pointer!):

In a nutshell, what this function does is the following: for errors under a certain level delta, it applies a square penalty; beyond that level, the penalty becomes linear. In other words, small errors will get the same penalty as with the SSR, but after a certain point, the cost stops growing as aggressively. As a result, large outliers will not get slammed as hard as with SSR.

Let’s implement that function in F#:

let huber delta x =
if abs x <= delta
then 0.5 * pown x 2
else delta * (abs x - 0.5 * delta)

… and take a look at its profile:

[ - 5.0 .. 0.1 .. 5.0 ]
|> List.map (fun x -> x, huber 1.0 x)
|> Chart.Line
|> Chart.Show

Another angle on the Huber function, perhaps more intuitive, is to consider what the pseudo-residuals would look like under Huber loss. Taking a value of 1.0 for delta, this is what we get:

let diffHuber = diff (huber 1.0)

[ - 5.0 .. 0.1 .. 5.0 ]
|> List.map (fun x -> x, diffHuber x)
|> Chart.Line
|> Chart.Show

What this chart shows is that when errors go beyond +/- 1.0 the pseudo residuals flattens out. As a result, when we try to fit a predictor to the pseudo-residuals, it will treat large and very large prediction errors as equivalent.

This loss function is much more complex than the SSR. And yet, all we had to do is to write it, and DiffSharp differentiated it without blinking. We can take that function, pass it to our learning algorithm, and let diffSharp handle the differentiation work:

let huber delta x =
if abs x <= delta
then 0.5 * pown x 2
else delta * (abs x - 0.5 * delta)

let huberPredictor = boostedLearn redSample treeLearner (huber 1.0) 5

And… that’s it - it just works. No need to change anything, the algorithm will now use that loss function to compute the pseudo-residuals and gammas, all by itself.

Conclusion

That concludes our exploration of gradient boosting.

First, I want to state that the code presented here is far from optimal. Zero consideration has been given to performance, gradient descent might violently diverge, and it’s quite plausible that bugs are present. In other words, you’ve been warned, use this for inspiration, and not in production :)

My objective here was purely to explore Gradient Boosting, building the algorithm from the ground up to better understand how it works. I am glad I did; first, I find the algorithm quite interesting. It is both quite general, and fairly simple conceptually: fit your model, look at what the model didn’t catch (the residuals), try to fit another model to that, and combine the models together. I also found the idea of looking at the residuals in terms of gradient very insightful - definitely an a-ha moment.

The other interesting part to me was DiffSharp. I had spent some time with the library in the past, but hadn’t quite realized how flexible it is. When I first started writing this post, I initially used the pseudo-Huber loss function, because I assumed DiffSharp would need a continuous function to work with. I was quite surprised when, “just for fun”, I tried to differentiate the regular version I had written in plain F#, and it just worked. I guess the moral of the story is, make sure to do things “just for fun” with code - there is something waiting to be learnt there!

That’s it for me - I hope you got something out of the exercise, too!

Gist available here


text:
Search by Topic

Resources tagged with Interactivities similar to Path to the Stars:

Filter by: Content type:
Stage:
Challenge level:

There are 220 results

Broad Topics > Information and Communications Technology > Interactivities

Magic Potting Sheds

Stage: 3 Challenge Level:

Mr McGregor has a magic potting shed. Overnight, the number of plants in it doubles. He'd like to put the same number of plants in each of three gardens, planting one garden each day. Can he do it?

Countdown

Stage: 2 and 3 Challenge Level:

Here is a chance to play a version of the classic Countdown Game.

Stage: 2 Challenge Level:

If you have only four weights, where could you place them in order to balance this equaliser?

A Dotty Problem

Stage: 2 Challenge Level:

Starting with the number 180, take away 9 again and again, joining up the dots as you go. Watch out - don't join all the dots!

Number Differences

Stage: 2 Challenge Level:

Place the numbers from 1 to 9 in the squares below so that the difference between joined squares is odd. How many different ways can you do this?

Domino Numbers

Stage: 2 Challenge Level:

Can you see why 2 by 2 could be 5? Can you predict what 2 by 10 will be?

Got it Article

Stage: 2 and 3

This article gives you a few ideas for understanding the Got It! game and how you might find a winning strategy.

Stars

Stage: 3 Challenge Level:

Can you find a relationship between the number of dots on the circle and the number of steps that will ensure that all points are hit?

Which Symbol?

Stage: 2 Challenge Level:

Choose a symbol to put into the number sentence.

Cycling Squares

Stage: 2 Challenge Level:

Can you make a cycle of pairs that add to make a square number using all the numbers in the box below, once and once only?

Multiplication Tables - Matching Cards

Stage: 1, 2 and 3 Challenge Level:

Interactive game. Set your own level of challenge, practise your table skills and beat your previous best score.

Junior Frogs

Stage: 1 and 2 Challenge Level:

Have a go at this well-known challenge. Can you swap the frogs and toads in as few slides and jumps as possible?

See the Light

Stage: 2 and 3 Challenge Level:

Work out how to light up the single light. What's the rule?

Cuisenaire Environment

Stage: 1 and 2 Challenge Level:

An environment which simulates working with Cuisenaire rods.

Multiplication Square Jigsaw

Stage: 2 Challenge Level:

Can you complete this jigsaw of the multiplication square?

Difference

Stage: 2 Challenge Level:

Place the numbers 1 to 10 in the circles so that each number is the difference between the two numbers just below it.

Colour Wheels

Stage: 2 Challenge Level:

Imagine a wheel with different markings painted on it at regular intervals. Can you predict the colour of the 18th mark? The 100th mark?

More Carroll Diagrams

Stage: 2 Challenge Level:

How have the numbers been placed in this Carroll diagram? Which labels would you put on each row and column?

One Million to Seven

Stage: 2 Challenge Level:

Start by putting one million (1 000 000) into the display of your calculator. Can you reduce this to 7 using just the 7 key and add, subtract, multiply, divide and equals as many times as you like?

Fifteen

Stage: 3 Challenge Level:

Can you spot the similarities between this game and other games you know? The aim is to choose 3 numbers that total 15.

Got It

Stage: 2 and 3 Challenge Level:

A game for two people, or play online. Given a target number, say 23, and a range of numbers to choose from, say 1-4, players take it in turns to add to the running total to hit their target.

Factor Lines

Stage: 2 Challenge Level:

Arrange the four number cards on the grid, according to the rules, to make a diagonal, vertical or horizontal line.

Code Breaker

Stage: 2 Challenge Level:

This problem is based on a code using two different prime numbers less than 10. You'll need to multiply them together and shift the alphabet forwards by the result. Can you decipher the code?

Noughts and Crosses

Stage: 2 Challenge Level:

A game for 2 people that everybody knows. You can play with a friend or online. If you play correctly you never lose!

Multiples Grid

Stage: 2 Challenge Level:

What do the numbers shaded in blue on this hundred square have in common? What do you notice about the pink numbers? How about the shaded numbers in the other squares?

Diamond Mine

Stage: 3 Challenge Level:

Practise your diamond mining skills and your x,y coordination in this homage to Pacman.

A Square of Numbers

Stage: 2 Challenge Level:

Can you put the numbers 1 to 8 into the circles so that the four calculations are correct?

Flip Flop - Matching Cards

Stage: 1, 2 and 3 Challenge Level:

A game for 1 person to play on screen. Practise your number bonds whilst improving your memory

First Connect Three for Two

Stage: 2 and 3 Challenge Level:

First Connect Three game for an adult and child. Use the dice numbers and either addition or subtraction to get three numbers in a straight line.

First Connect Three

Stage: 2 and 3 Challenge Level:

The idea of this game is to add or subtract the two numbers on the dice and cover the result on the grid, trying to get a line of three. Are there some numbers that are good to aim for?

Fault-free Rectangles

Stage: 2 Challenge Level:

Find out what a "fault-free" rectangle is and try to make some of your own.

Times Tables Shifts

Stage: 2 Challenge Level:

In this activity, the computer chooses a times table and shifts it. Can you work out the table and the shift each time?

Lost

Stage: 3 Challenge Level:

Can you locate the lost giraffe? Input coordinates to help you search and find the giraffe in the fewest guesses.

Cops and Robbers

Stage: 2 and 3 Challenge Level:

Can you find a reliable strategy for choosing coordinates that will locate the robber in the minimum number of guesses?

Coded Hundred Square

Stage: 2 Challenge Level:

This 100 square jigsaw is written in code. It starts with 1 and ends with 100. Can you build it up?

More Transformations on a Pegboard

Stage: 2 Challenge Level:

Use the interactivity to find all the different right-angled triangles you can make by just moving one corner of the starting triangle.

Top Coach

Stage: 3 Challenge Level:

Carry out some time trials and gather some data to help you decide on the best training regime for your rowing crew.

Sliding Puzzle

Stage: 1, 2, 3 and 4 Challenge Level:

The aim of the game is to slide the green square from the top right hand corner to the bottom left hand corner in the least number of moves.

Ratio Pairs 2

Stage: 2 Challenge Level:

A card pairing game involving knowledge of simple ratio.

Tubular Path

Stage: 2 Challenge Level:

Can you make the green spot travel through the tube by moving the yellow spot? Could you draw a tube that both spots would follow?

Online

Stage: 3 Challenge Level:

A game for 2 players that can be played online. Players take it in turns to select a word from the 9 words given. The aim is to select all the occurrences of the same letter.

Combining Cuisenaire

Stage: 2 Challenge Level:

Can you find all the different ways of lining up these Cuisenaire rods?

Coordinate Cunning

Stage: 2 Challenge Level:

A game for 2 people that can be played on line or with pens and paper. Combine your knowledege of coordinates with your skills of strategic thinking.

Stage: 1 and 2 Challenge Level:

Our 2008 Advent Calendar has a 'Making Maths' activity for every day in the run-up to Christmas.

Cogs

Stage: 3 Challenge Level:

A and B are two interlocking cogwheels having p teeth and q teeth respectively. One tooth on B is painted red. Find the values of p and q for which the red tooth on B contacts every gap on the. . . .

Train for Two

Stage: 2 Challenge Level:

Train game for an adult and child. Who will be the first to make the train?

Coordinate Tan

Stage: 2 Challenge Level:

What are the coordinates of the coloured dots that mark out the tangram? Try changing the position of the origin. What happens to the coordinates now?

Power Crazy

Stage: 3 Challenge Level:

What can you say about the values of n that make $7^n + 3^n$ a multiple of 10? Are there other pairs of integers between 1 and 10 which have similar properties?

Colour in the Square

Stage: 2 Challenge Level:

Can you put the 25 coloured tiles into the 5 x 5 square so that no column, no row and no diagonal line have tiles of the same colour in them?

Archery

Stage: 3 Challenge Level:

Imagine picking up a bow and some arrows and attempting to hit the target a few times. Can you work out the settings for the sight that give you the best chance of gaining a high score?


text:
cordova

11 thoughts
last posted Feb. 20, 2017, 12:04 a.m.

9 earlier thoughts

0

There a few ways to add plugins that are under development.

1. Specific git hash, against an accessible repo:

meteor add cordova:com.phonegap.plugins.facebookconnect@https://github.com/Wizcorp/phonegap-facebook-plugin.git#5dbb1583168558b4447a13235283803151cb04ec

2. From the local file system:

meteor add cordova:cordova-plugin-underdevelopment@file://../plugins/cordova-plugin-underdevelopment

When adding from the git repo, the plugin files are copied to the local build directory, and all the processors/compilers do their thing.

It seems when added from the local filesystem, the plugin isn't actually copied to your build. A symbolic link goes in instead, which mostly behaves the same way.

Only difference is in the generated XCode project.

The build doesn't create iOS binaries. Some licensing / tooling dramas, or something... Instead, an XCode project is created, and you fire up your copy of XCode, using your own developer certificates, etc, and compile that project yourself.

For the sym-linked version of the project, all the paths to your plugin's source files seem to be wrong. For "properly" copied plugins (eg. from the git repo), the XCode paths end up correct.

This screwed me up for so long...

When all else fails, fetch it from git.

1 later thought


text:
# MultiChoice

New to Analytica 5.0

## MultiChoice( I, n..., allowNone, separator, returnList, returnSet )

A user-input control showing the MultiChoice popup with separators and multiple items selected.

MultiChoice creates a user-input control that lets you select one, none, some, or All from a list of options, unlike the similar Choice control that lets you select only one or All. It returns the list of selected options. MultiChoice must appear as the top-level of a Definition or in a Table. In a Table, it returns a Set -- a reference to a list of the selected values,

It doesn't work as a user input when the legacy Preference setting Domain acts as self index is on.

### Parameters

• «I»: Either an index identifier, or the keyword Self. When it is an index identifier, the index elements are the possible options. When the keyword Self is used, the possible options are obtained from the Domain.
• «n»: The currently selected options, listed by position. For example, MultiChoice( I, 2, 3, 7 ) records that the 2nd, 3rd, and 7th items are selected.
• «allowNone»: (Optional) A Boolean that specifies whether the empty selection is allowed. By default, the empty selection is disallowed. To allow the empty selection, use named-parameter syntax, e.g., MultiChoice(Self, allowNone:True). When the empty selection is disallowed and «n» contains no valid options, the first item is returned.
• «separator»: (Optional) When an element in the list of options matches the value specified here, it displays as a non-selectable separator (a horizontal line between items).
• «returnList»: (Optional) When true, returns a list even when a single item is selected. It that case, the result is a one-element list. This is useful when you define an index with the Multichoice. When «returnList» is false or omitted, «returnSet» is not true, and only a single item is selected, then the single item is returned.
• «returnSet»: (Optional) When true, returns a reference to a list (i.e., a set). When MultiChoice appears in a table cell, this is the default, since it avoids the combination of dimensions from every cell with a multichoice selector.

## Examples

In these examples, the index Option contains the possible choices.

Index Option := ['Apple', 'Pear', 'Orange']

A Multichoice with one option selected returns the value of that option:

MultiChoice(Option, 3) → 'Orange'

A Multichoice with multiple options selected returns the values of those options as a list, indexed by the variable containing the Multichoice:

MultiChoice(Option, 1, 3) → ['Apple', 'Orange']

A Multichoice with no options selected returns the first item by default:

MultiChoice(Option) →

Unless you specify optional parameter «allowNone» as True, in which case it lets the user choose no option, and returns an empty list indexed by the variable containing the Multichoice:

MultiChoice(Option, allowNone: True) → []

In this case, the options come from the variable or index's own Domain. Two items are selected.

MultiChoice(Self, 7,12)

This example uses separators, specified as '--', to group the options. Currently 'cherry', 'egg plant' and 'peanut' are selected.

Index Produce_item := ['apple', 'banana', 'cherry', '--', 'egg plant', 'lettuce', 'squash', '--', 'almond', 'peanut', 'walnut']
Domain of Produce := {Copy from index} Produce_item
Index Produce := MultiChoice( Self, 3, 5, 10, separator:'--' )

## Using the MultiChoice control

Usually, if you define a variable or index to be a MultiChoice, you will create an input node for that variable. The input node then displays the control on your diagram. The control looks pretty much the same as a Choice control. When a single item is selected, the selected item appears in the control. When multiple items are selected, the control displays «Multiple» or «All», and if no items are selected, it displays «None».

When you click on the control, the list of options pops up. Keyboard actions include:

• [ESC] key: Cancels the current input and closes the popup, restoring the original selection.
• [Enter] key: Closes the popup, accepting the current selections.
• [Up] and [Down] arrows: Moves the highlighted selection (no impact on which items are selected).
• [Space] key: Toggles the highlighted selection. Leaves popup open.
• [Ctrl+A]: Selects all, or if all options are already selected, deselects all (but leaves one selected if «allowNone» is not on).

Mouse actions include:

• Click on item: Toggles item. Leaves popup open.
• Click outside the control: Accepts selections and closes popup.
• Click - drag - release: Select or deselect several items. The item where the mouse down occurs determines whether the drag selects or deselects.

When «allowNone» is not on, the actions that toggle the selection state will not deselect the last selected item.

## Handles

When the options are handles to variables (or other objects), it shows the Title or Identifier of each object in the menu (as with Choice) and returns the handle, not the value of the variable.


text:
Properties

 Label 43350dd Number of curves 8 Conductor 43350 CM no Rank 1 Graph

Related objects

Show commands for: SageMath
sage: E = EllipticCurve("43350.cv1")

sage: E.isogeny_class()

Elliptic curves in class 43350dd

sage: E.isogeny_class().curves

LMFDB label Cremona label Weierstrass coefficients Torsion structure Modular degree Optimality
43350.cv8 43350dd1 [1, 0, 0, 10687, 1306617] [2] 221184 $$\Gamma_0(N)$$-optimal
43350.cv6 43350dd2 [1, 0, 0, -133813, 17057117] [2, 2] 442368
43350.cv7 43350dd3 [1, 0, 0, -97688, -38467008] [2] 663552
43350.cv5 43350dd4 [1, 0, 0, -495063, -115521633] [2] 884736
43350.cv4 43350dd5 [1, 0, 0, -2084563, 1158245867] [2] 884736
43350.cv3 43350dd6 [1, 0, 0, -2409688, -1437227008] [2, 2] 1327104
43350.cv1 43350dd7 [1, 0, 0, -38534688, -92074852008] [2] 2654208
43350.cv2 43350dd8 [1, 0, 0, -3276688, -310994008] [2] 2654208

Rank

sage: E.rank()

The elliptic curves in class 43350dd have rank $$1$$.

Modular form 43350.2.a.cv

sage: E.q_eigenform(10)

$$q + q^{2} + q^{3} + q^{4} + q^{6} - 4q^{7} + q^{8} + q^{9} + q^{12} - 2q^{13} - 4q^{14} + q^{16} + q^{18} - 4q^{19} + O(q^{20})$$

Isogeny matrix

sage: E.isogeny_class().matrix()

The $$i,j$$ entry is the smallest degree of a cyclic isogeny between the $$i$$-th and $$j$$-th curve in the isogeny class, in the Cremona numbering.

$$\left(\begin{array}{rrrrrrrr} 1 & 2 & 3 & 4 & 4 & 6 & 12 & 12 \\ 2 & 1 & 6 & 2 & 2 & 3 & 6 & 6 \\ 3 & 6 & 1 & 12 & 12 & 2 & 4 & 4 \\ 4 & 2 & 12 & 1 & 4 & 6 & 3 & 12 \\ 4 & 2 & 12 & 4 & 1 & 6 & 12 & 3 \\ 6 & 3 & 2 & 6 & 6 & 1 & 2 & 2 \\ 12 & 6 & 4 & 3 & 12 & 2 & 1 & 4 \\ 12 & 6 & 4 & 12 & 3 & 2 & 4 & 1 \end{array}\right)$$

Isogeny graph

sage: E.isogeny_graph().plot(edge_labels=True)

The vertices are labelled with Cremona labels.


text:
## Friday, April 27, 2012

### First Line Viernes

Alas, it's time to look at a first line from a reputable novel once again.  And this novel is very reputable.  Of course, it's none other than Faulkner's "As I Lay Dying," which commences as follows:

"Jewel and I came up from the field, following the path in single file."

Now, I have the same sentiments toward this first line as I do the rest of the novel; indifference.  This first line does nothing for me, although I find it acceptable.  Simply acceptable.  Not stellar, not intriguing, not even interesting.  I struggle with ol Faulkner (perhaps because I am a self-proclaimed Hemingway-phile).  Perhaps I have lost my mind and am just now exposing my literary merit as weak, but Faulkner, to me, is simply bleh.