arxiv_id
stringlengths 0
16
| text
stringlengths 10
1.65M
|
|---|---|
# SPM Mathematics 2017, Paper 2 (Questions 5 & 6)
Question 6 (4 marks):
An aquarium has the length of (x + 7) cm, the width of x cm and the height of 60 cm.
The total volume of the aquarium is 48000 cm3. The aquarium will be filled fully with water.
Calculate the value of x.
Solution:
|
|
It is currently 17 Mar 2018, 17:25
### GMAT Club Daily Prep
#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
# Events & Promotions
###### Events & Promotions in June
Open Detailed Calendar
# There are some oranges and apples in a basket. After additional 4 and
Author Message
GMAT Forum Moderator
Joined: 28 May 2014
Posts: 475
GMAT 1: 730 Q49 V41
### Show Tags
07 Mar 2018, 05:08
00:00
Difficulty:
95% (hard)
Question Stats:
37% (02:15) correct 63% (81:16) wrong based on 19 sessions
### HideShow timer Statistics
There are some oranges and apples in a basket. After additional 4 and 7 oranges and apples are added to the basket, the ratio of the number of oranges to apples was greater than ½. Find the initial number of oranges in the basket.
1. The total number of oranges and apples after the addition was 25.
2. The product of the initial number of apples and oranges is 33.
[Reveal] Spoiler: OA
_________________
Math Expert
Joined: 02 Sep 2009
Posts: 44290
### Show Tags
07 Mar 2018, 05:30
There are some oranges and apples in a basket. After additional 4 and 7 oranges and apples are added to the basket, the ratio of the number of oranges to apples was greater than ½. Find the initial number of oranges in the basket.
Given: $$\frac{O + 4}{A+7}>\frac{1}{2}$$ --> 2O + 1 > A.
Question: $$\frac{O}{A} = ?$$
(1) The total number of oranges and apples after the addition was 25:
(O + 4) + (A + 7) = 25;
O + A = 14.
We could have many values of O and A (satisfying both O + A = 14 and 2O + 1 > A). For example, O = 13 and A = 1 OR O = 12 and A = 2.
Not sufficient.
(2) The product of the initial number of apples and oranges is 33:
O*A = 33. Since both O and A are integers, then there exist only two sets of O and A, which satisfy both O*A = 33 and 2O + 1 > A.
O = 33 and A = 1;
O = 11 and A = 3.
Not sufficient.
(1)+(2) From (2) only O = 11 and A = 3 satisfy O + A = 14 from (1). Sufficient.
_________________
Manager
Joined: 23 May 2017
Posts: 211
Concentration: Finance, Accounting
WE: Programming (Energy and Utilities)
### Show Tags
07 Mar 2018, 06:21
Oranges = x & Apples = y
Oranges = x + 4 & Apples = y + 7
given ( x + 4 ) > 1/2 ( y + 7)
- 2x + 8 > y + 7
- 2x > y - 1 = all the numbers must satisfy this equation
Question : Find X?
[1] : x + 4 + y + 7 = 25 or x + y = 14
let's substitute y = 14 - x in equation 2x > y -1
2x > 14 - x - 1
3x> 13
x >= 5
x + y = 14
5 9
6 8
7 7 and so on : multiple values of x is possible hence [1] is alone not sufficient
[2] x * y = 33 [ since x & y has to be + ve integers as we can't have negative decimal oranges or apples ]
x = 1 ; y = 33 ==> 2 > 32 [ substituting numbers in the main equation 2x > y - 1] : no : this combination is not possible
x = 33 ; y = 1 ==> 66> 0 : Yes possible
x = 11 ; y = 3 ==> 22 > 2 : Yes possible
x = 3 ; y = 11 ==> 6> 10 : Not Possible
Again two different values of X are possible hence [2] alone is not sufficient
[1] + [2]
x + y = 14 & xy = 33
x = 11 ; y = 3 - this is our answer
x = 3 ; y = 11 - does not satisfy 2x > y - 1
Hence C
2x > y - 1
_________________
If you like the post, please award me Kudos!! It motivates me
Re: There are some oranges and apples in a basket. After additional 4 and [#permalink] 07 Mar 2018, 06:21
Display posts from previous: Sort by
|
|
# Splitting code into several files
You have probably been noticing that your source code files have grown somewhat large and include a diverse range of features: class definitions, class method implementations, other functions, and a main() function. In future assignments you will define several classes, some of which may have nothing to do with each other. At some point, an organization scheme will be needed to reduce complexity.
C++ offers a very simplistic technique for splitting code into files (sometimes called “modules” or “libraries” in other languages). The idea is simply to write code in several files, then “include” them all into the same file, giving the appearance (to the compiler) that all the code was written in one file.
We have been doing this for some time, using #include <xyz>. Except for one minor change, this is the same technique we’ll use to split our programs into multiple files.
A word of advice: Do not write your code in one file, then try to split it into several files later; students often try this and find it frustrating or impossible. Begin your project by creating several files…
## Understanding #include
First, it’s important to see how simple #include really is. When the compiler is reading a file (e.g. myprogram.cpp) and it sees #include <xyz> (which may appear anywhere, though it must be found on a line all by itself), the compiler literally reads the file xyz (wherever that file is on your computer) and pastes its contents exactly where #include <xyz> appeared. So it’s a simple substitution: substitute #include <xyz> with the actual contents of the file xyz.
The form of #include we will be using for our own files is #include "abc.h" where abc.h is a file we created. The format #include <abc.h> (with angle brackets) means the file abc.h will be found in some system directory, known to the compiler. The quoted format means the file will be found somewhere locally, probably in the same directory as our program code myprogram.cpp.
## Common practice for splitting code
Since #include does a simple substitution, we could (but won’t) split a large program myprogram.cpp into two smaller files myprogramA.cpp and myprogramB.cpp, with myprogramB.cpp including myprogramA.cpp by placing the statement #include "myprogramA.cpp" at the top of the file myprogramB.cpp. I don’t see anything particularly bad about this approach, but it is virtually unseen in real C++ programming.
Instead, we will include only “header files” into our “source files.” Header files usually have the ending .h and source files usually have the ending .cpp. A header file contains only class and function declarations (a declaration is a statement that a class exists and has certain properties and methods, or that a function exists; neither the class methods nor the functions will be defined; that is, their implementations will not be provided in the header file).
Some included files may include other files, and may attempt to include files already included; we need to prevent repeated-includes because the compiler is not happy when a class or function or variable of the same name is declared twice. Thus, in every header file (named blah.h in this example), we write the following at the top and bottom:
This means “if the name BLAH_H is not already defined, then define it.” If a file is included twice, then BLAH_H will be defined (by the first inclusion) so the entire “if–endif” will be skipped (which is the whole file, because the whole file is between the “if” and “endif”). Of course, BLAH_H can be anything; it could be FOO; we usually write FILE_H for the file named file.h so that we don’t reuse names.
## Example
Here is the Shape class and subclasses split into multiple files, plus a main file.
shape.h:
rectangle.h:
rectangle.cpp:
ellipse.h:
ellipse.cpp:
main.cpp:
## Compiling a project that has multiple files
The .h files don’t need to be compiled; they will be included by the .cpp files. But the .cpp files do need to be compiled, each separately, and then “linked” together into a grand final program.
How this is done depends on which tools you are using. If you are on the “command line” and using g++, you can do this:
g++ -c rectangle.cpp
g++ -c ellipse.cpp
g++ -c main.cpp
g++ -o myprogram rectangle.o ellipse.o main.o
The first three lines compile each .cpp file separately (producing a corresponding .o file). The fourth line links all the .o files together to create the final program.
|
|
# Selective ultrafilter and bijective mapping
For arbitrary (selective) ultrafilter $$\mathcal{F}$$ does there exist bijection $$\phi:[\omega]^2\to\omega$$ with the property: $$\forall B\in\mathcal{F} : \phi([B]^2)\in\mathcal{F}$$ ?
No, this fails not only for selective ultrafilters but for all non-principal ultrafilters $$\mathcal F$$ on $$\omega$$.
The main ingredient in the proof is the theorem that, if an ultrafilter $$\mathcal U$$ on a set $$X$$ is sent to itself by some map $$g:X\to X$$ (meaning that $$\mathcal U=g(\mathcal U):=\{A\subseteq X:g^{-1}(A)\in\mathcal U\}$$), then the set of points in $$X$$ fixed by $$g$$ has to be in $$\mathcal U$$. This easily implies that, if $$\phi:X\to Y$$ is a bijection and $$g:X\to Y$$ is an arbitrary map and $$\mathcal U$$ is an ultrafilter on $$X$$ with $$\phi(\mathcal U)=g(\mathcal U)$$, then $$\{x\in X:\phi(x)=g(x)\}\in\mathcal U$$.
In your situation, suppose toward a contradiction that $$\phi$$ were a bijection as in the question. Let $$\mathcal G$$ be the filter on $$[\omega]^2$$ generated by the sets $$[B]^2$$ for $$B\in\mathcal F$$. ($$\mathcal G$$ may or may not be an ultrafilter, depending on whether or not $$\mathcal F$$ is selective.) Your requirement on $$\phi$$ implies that each set in $$\mathcal G$$ meets each set of the form $$\phi^{-1}(A)$$ for $$A\in\mathcal F$$. Since the intersection of two sets of the form $$[B]^2$$ for $$B\in\mathcal F$$ is again a set of that form, and since the intersection of two sets of the form $$\phi^{-1}(A)$$ for $$A\in\mathcal F$$ is again a set of that form, it follows that the sets of these two forms generate a proper filter. Let $$\mathcal U$$ be an ultrafilter on $$[\omega]^2$$ extending that filter. So we have $$[B]^2\in\mathcal U$$ and $$\phi^{-1}(A)\in\mathcal U$$ for all $$A,B\in\mathcal F$$.
It follows that $$\phi(\mathcal U)=\mathcal F$$. It also follows that $$g(\mathcal U)=\mathcal F$$, where $$g:[\omega]^2\to\omega$$ is the function sending each pair $$\{x to its smaller member $$x$$. By the theorem cited above, we have that the set $$E=\{\{x is in $$\mathcal U$$. Since $$\phi$$ is one-to-one, $$E$$ contains, for any $$x\in\omega$$, at most one pair whose smaller element is $$x$$. Thus, there is a function $$f:\omega\to\omega$$ such that $$E\subseteq\{\{x,f(x)\}:x\in\omega$$. Note that $$x$$ here is the smaller element (the one given by $$g$$) in the pair $$\{x,f(x)\}$$, and so we have $$x for all $$x$$.
Consider any two sets $$B,C\in\mathcal F$$. Since $$[B\cap C]^2$$ and $$E$$ are both in $$\mathcal U$$, they have a nonempty intersection. In particular, there is some $$x\in C$$ with $$f(x)\in B$$, i.e., with $$x\in f^{-1}(B)$$. I've just shown that $$f^{-1}(B)$$ intersects every set $$C\in\mathcal F$$; since $$\mathcal F$$ is an ultrafilter, it follows that $$f^{-1}(B)\in\mathcal F$$. And since this holds for all $$B\in\mathcal F$$, we have $$f(\mathcal F)=\mathcal F$$. By the theorem cited at the beginning, $$f(x)=x$$ for $$\mathcal F$$-almost all $$x$$. This contradicts the fact that $$x for all $$x$$.
• Thank you for your answer. Where can I read about the theorem you mention in beginning? – ar.grig Feb 27 at 20:24
• The theorem used in the solution is due to Katetov (1967), you can find the short paper where it appeared through the link: dml.cz/bitstream/handle/10338.dmlcz/105124/…. You can also find Solovay's rendition of Katetov's theorem through the link: math.berkeley.edu/~solovay/Preprints/Rudin_Keisler.pdf – Ali Enayat Feb 28 at 0:14
• @AliEnayat: Thank you. I got the links. But what about reference of Solovay's rendition which could be cited in article ? – ar.grig Mar 2 at 9:16
• @ar.grig To my knowledge, Solovay's rendition has never appeared in print; his argument is "essentially the same" as Katetov's. As pointed out in the following source, Katetov's theorem can be viewed as a special case of the Bruijn-Erdős theorem: dml.cz/bitstream/handle/10338.dmlcz/126182/… – Ali Enayat Mar 3 at 17:44
|
|
# The kinematic anomaly in MPM
The following Material Point Method (MPM) simulation of sloshing fluid goes “haywire” at the end, just when things are starting to settle down:
(if the animated gif isn’t visible, please wait for it to load)
# Tangent mapping
These images show the initial configuration of a body (square) and a nonlinear deformation of that body into a curvy shape (to the right of the square). Overlaid on the actual deformed shape is the so-called tangent mapping at the indicated point. It coincides with the nonlinear mapping to first-order accuracy.
# Annulus Twist as a verification test
Illustrated below is the solution to an idealized problem of a linear elastic annulus (blue) subjected to twisting motion caused by rotating the T-bar an angle $\alpha$. The motion is presumed to be applied slowly enough that equilibrium is satisfied.
This simple problem is taken to be governed by the equations of equilibrium $\vec{\nabla}\cdot\sigma=0$, along with the plane strain version of Hooke’s law in which Cauchy stress is taken to be linear with respect to the small strain tensor (symmetric part of the displacement gradient). If this system of governing equations is implemented in a code, the code will give you an answer, but it is up to you to decide if that answer is a reasonable approximation to reality. This observation helps to illustrate the distinction between verification (i.e., evidence that the equations are solved correctly) and validation (evidence that physically applicable and physically appropriate equations are being solved). The governing equations always have a correct answer (verification), but that answer might not be very predictive of reality (validation).
# Research: Weibull fragmentation in the Uintah MPM code
Tough disk impacting brittle disk
Below are links to two simulations of disks colliding. The first is elastic and the second uses a fracture model with spatially variable strength based on a scale-dependent Weibull realization. Both take advantage of the automatic contact property of the MPM.
WeibConstMovie: disks colliding without fracture
WeibPerturbedGood: disks colliding with heterogeneous fracture
This basic capability to support statistically variable strength in a damage model has been extended to the Kayenta plasticity model in Uintah.
# CPDI shape functions for the Material Point Method
In a conventional MPM formulation, the shape functions on the grid are the same as in a traditional FEM solution. In the CPDI, the shape functions on the grid are replaced by alternative (and still linearly complete*) shape functions, given by piecewise linear interpolations of the traditional FEM shape functions to the boundaries of the particles. This change provides FEM-level accuracy in moderately deforming regions while retaining the attractive feature of MPM that particles can move arbitrarily relative to one another in massively deforming regions (provided, of course, that the deformation is updated in a manner compatible with the constitutive model).
In the images below, the shaded regions are the traditional FEM “tent” linear shape functions in 1-D, and the solid lines are the CPDI interpolated shape functions, which clearly change based on particle position relative to the grid. Both the traditional FEM tent functions and these new CPDI functions are linearly complete (i.e., they can exactly fit any affine function). The tremendous advantage of CPDI is that the basis functions are extraordinarily simple over a particle domain, thus facilitating exact and efficient evaluation of integrals over particle domains.
# Research: Radial cracking as a means to infer aleatory uncertainty parameters
Aleatory uncertainty in constitutive modeling refers to the intrinsic variability in material properties caused by differences in micromorphology (e.g., grain orientation or size, microcracks, inclusions, etc.) from sample to sample. Accordingly, a numerical simulation of a nominally axisymmetric problem must be run in full 3D (non-axisymmetric) mode if there is any possibility of a bifurcation from stability.
Dynamic indentation experiments, in which a spherical ball impacts to top free surface of a cylindrical specimen, nicely illustrate that fracture properties must have spatial variability — in fact, the intrinsic instability that leads to radial cracking is regarded by the Utah CSM group as a potential inexpensive means of inferring the spatial frequency of natural variations in material properties.
Radial cracking in dynamic indentation experiments.
# Accelerated hip implant wear testing
3D model Experimental Setup
Rim cracking of polyethylene acetabular liners and squeaking in ceramic components are two important potential failure modes of hip implants, but the loads and stresses that cause such failures are not well understood. Contact stresses in hip implants are analyzed under worst case load conditions to develop new wear testing methods to improve the pre-clinical evaluation of next-generation hip implants and their materials. Complicated full-scale hip implant simulator tests are expensive and take months to complete. A primary goal of this work is to find inexpensive surrogate specimen shapes and loading modes that can, in inexpensive lab tests taking only a few hours, produce the same wear patterns as seen in full-scale prototype testing. Continue reading
# Verification Research: The method of manufactured solutions (MMS)
MMS stands for “Method of Manufactured Solutions,” which is a rather sleazy sounding name for what is actually a respected and rigorous method of verifying that a finite element (or other) code is correctly solving the governing equations.
A simple introduction to MMS may be found on page 11 of The ASME guide for verification and validation in solid mechanics. The basic idea is to analytically determine forcing functions that would lead to a specific, presumably nontrivial, solution (of your choice) for the dependent variable of a differential equation. Then you would verify a numerical solver for that differential equation by running it using your analytically determined forcing function. The difference between the code’s prediction and your selected manufactured solution provides a quantitative measure of error.
|
|
## Introduction
Osteoarthritis (OA) is a leading cause of severe long-term pain and disability affecting approximately 10% of the global population1. Regenerative solutions and new tissue- engineering based strategies are promising for treatment of moderate OA2,3. The research for treatment of knee OA with PRP is promising4,5,6, however there is a lack of consensus regarding the preparation of standardized dosing with an appropriate absolute number of platelets and concentration. Studies often report PRP preparations taken from between 20 to100 ml of blood, with a concentration of 2–10 × 106 platelet/µl4,5,6.
Most manual methods fail to provide a high yield and often have variable concentrations ranging two to four times of physiological count7. Alternatively, clinicians may be reliant on expensive kits, ranging from between $150–$250 per treatment7. In order to have a high consistent platelet yield we designed a filtration-based manual method. This prospective randomized controlled study was primarily aimed at standardizing the ideal PRP dosage and concentration, and to assess the subjective, structural and physiological efficacy of PRP in OA knee.
## Results
### Patients screened for clinical trial
One hundred and fifty randomized subjects were recruited and treated with PRP or HA (75 patients respectively) during 2014–2017.A total of 64 patients in the PRP group and 68 patients in the control (HA) group were followed up till 2018 (Fig. 1). There were no significant differences in clinical characteristics between the groups (Table1).
### PRP analysis
The baseline platelet count ranged from 1.91 to 3.25 × 105 platelet/µl (mean 2.3 × 105 platelet/µl). The PRP concentrate had a platelet count ranging from 12.68 to 16.2 × 105 platelet/µl (mean 14.38 ± 1.76 × 105 platelet/µl) with a recovery of 90% (87.4–92.6%).The total platelet count in fused ranged from 10.14 to 10.83 billion (10.45 ± 0.46) in 8 ml of PRP. The total leukocyte count was zero in our PRP analysis. The PDGF concentration in the PRP ranged from 50,246 to 74,938 pg/ml (63,668 ± 12,968 pg/ml) and VEGF from 1348 to 2429 pg/ml (1788 ± 1245 pg/ml).
### Patient evaluation and pain score
Symptomatic outcome measure WOMAC composite scores showed significant improvement from baseline in both PRP (P < 0.001) and HA groups (P < 0.001) at one month. Although PRP group had better scores than HA at one month but were statistically insignificant (P > 0.05). This improvement declined with time and was more profound in HA group. The scores in HA group were marginally better but insignificant at 3 months, reached to baseline levels at 6 months and further dropped inferior at 9 months and 12 months’ time frame. Whereas PRP group reported significantly better scores during follow-up until one year (P < 0.05: Table 2; Fig. 2a–d). Intergroup comparison indicated significant better composite scores in PRP group compared to HA group at 3 (P < 0.001), 6 (P < 0.001) and 9 months (P < 0.01) and 1 year (P < 0.001) respectively.
The WOMAC sub-score for pain declined significantly in one month (P < 0.001) followed by worsening of scores in subsequent follow-up and finally to reach inferior to baseline at 12-month (Table 2, Fig. 2b–d) in HA group. Whereas, the pain sub scores were significantly better up to 12 months (P < 0.05; Table 2, Fig. 2b) in PRP group. Intergroup comparison indicated significant better pain scores in PRP group compared to HA group at 3, 6, 9 and 12 month (Table2; Fig. 2b). The trends of WOMAC stiffness and physical function were similar to composite score and pain pattern (Table 2; Fig. 2c–d).
The PRP group demonstrated improvement in IKDC scores (P < 0.001) at one-month which slightly decreased but remained significantly better than baseline at all time frame unto one year (P < 0.01; Table 3; Fig. 2e). In the HA group, there was significant improvement (P < 0.001) at one month but this gradually deteriorated at 3, 6, and 9 and 12 month follow-up with scores below base line at one year. The difference between PRP and HA was insignificant at one month (P > 0.05) but significant at all other time frame until one year (P < 0.001; Table 3; Fig. 2e).
We observed significant improvement (P < 0.001) in pain-free distance covered during a 6MWD at 1 and 3 months in both the groups. However, the control (HA) group could not sustain the improvement at 6, 9 and 12 months (P > 0.05; Table 4). Significant improvement (P < 0.05) at month was maintained among PRP group as compared to HA in all time frame upto 1 year (P < 0.001; Table 4).We observed that 24% of patients in the PRP group showed an improvement when covering 100 ft distance at three months compared to 11% in the control group (Table 4).
At one-year rescue medication was required at least once a week by 24 (37.5%) patients in the PRP group, and 36 (52.9%) in the control group (P < 0.001). Furthermore, there was a 26% reduction in the use of paracetamol in the PRP group, as compared to control. X-ray evaluation demonstrated that there was no increase in JSW, rather both the groups had deterioration (P < 0.05; Table 4), but it was better maintained in the PRP group though insignificant difference (P > 0.05; Table 4). Intra class correlation (ICCTs) was insignificant at one year between PRP and control group for JSW. Decrease in JSW (≥ 0.5 mm) was observed in 3 (4%) patients in PRP and 8 (10.6%) patients in control group.
Increase in cartilage thickness was not observed on MRI in either group (Fig. 3). In the PRP group, it remained unchanged in 53 (82.8%) patients at one year as compared to 42 (61.7%) patients in control (P < 0.05). Sixteen (23.5%) patients lost thickness in control group as compared to 11 (17.1%) patients in PRP group at one-year follow-up (P > 0.05; Table 4).
### Cytokine analysis
All the patients had high level of IL-6, IL-8 and TNF-α in the synovial fluid at baseline. We observed significant difference in level of IL-6 (124.2 ± 117.3 pg/mL vs. 148.4 ± 126.6 pg/mL; P < 0.05) and TNF-α (5.1 ± 2.7 pg/mL vs. 6.4 ± 3.6 pg/mL; P < 0.05) among PRP and control group at 1 months (Fig. 4). The level of IL6 and TNF-α was correlated with WOMAC score at 1 month in both PRP and HA treated group. We did not find any significant difference in level of IL-8 among PRP and HA levels (P > 0.05; Fig. 4, Supplementary Table 3).
Both groups had equal numbers of patients with mild transient adverse events. Pain, stiffness and synovitis were the most common complaints (Supplementary Table 1). There were no permanent adverse effects to any participants.
## Discussion
Recently PRP has been extensively explored as a chondro-protective treatment for symptomatic knee OA8. Our study demonstrated that a dose of 10 billion platelets in 8 ml volume of PRP improves functional outcomes and protects the articular cartilage from further wear and tear in patients with knee OA.
The results of WOMAC, IKDC and 6MWD improved significantly in the first-month itself with PRP injection and despite slight worsening 3, 6, 9 and 12-month follow-up, were still significantly better than the HA group. In the HA group, improvements noted at 1 month were not present at 3, 6, 9 and 12-month follow-up. The overall difference between the PRP and control groups at one year strongly suggests the efficacy of PRP as a treatment for OA. As expected, the study demonstrated no structural efficacy of PRP unlike cellular therapy9. We observed, however, that PRP had a chondro-protective structural benefit in terms of better maintenance of the JSW and cartilage thickness as an outcome measure.
Our results correlates well with earlier studies10,11,12 although, direct comparison is difficult because of differences in PRP processing, the dose (quantity and concentration of platelets), and no standard structural efficacy criteria. Despite all these odds a recent meta-analysis of 30 RCT demonstrated best overall outcome in patients treated with PRP as compared to control, HA or steroids at 3, 6, 12 months follow up intervals13 which correlated well with our results. In a randomized study with PRP and HA treatment the IKDC score was significantly higher in the PRP group at 24 and 52 weeks (P < 0.01)14. Similarly, significant improvements were demonstrated in our PRP group for IKDC scores (P < 0.05) at 12 weeks15. Another study reported improvement in IKDC scores despite the absolute number of platelets injected being very low at 6.5 million per knee16. A single dose of PRP in 22 patients (ages of 30–70 years) with early knee OA improved pain function scores at 6 months and 1 year. No visible changes on MRI were found in at least 73% of the patients at 1 year17. Our study however included elderly and moderate OA patients with a positive outcome.
A significant improvement in WOMAC scores within 2–3 weeks with worsening at 6-months was reported after treatment with two injections of WBC-filtered PRP with an average absolute count of 23.85 billion platelets injected per knee17. Our study shows maintained effectiveness at one year after a single injection. WOMAC and IKDC scores were previously shown to be significantly better with PRP than HA injections (P < 0.001) in four randomized controlled trials18.
We also evaluated the clinical correlation of the pro inflammatory cytokines IL-6 and TNF-α with WOMAC scores at 3 months in the PRP and HA groups. Our data suggests that decrease in inflammatory cytokines in the knee with subsequent clinical improvement in patient-reported outcomes at 3 months are time dependent. We did not find any statistical difference in levels of cytokines between groups. Cytokine levels were correlated with the degree of pain as previous study19.
Minimal manipulated processing and optimal dose of platelets is very crucial in PRP to obtain clinically effective results20,21. Obtaining PRP is often expensive and could be restrictive in developing countries with inadequacy of resources. Most of the “manual” methods have drawback as many platelets are lost if not filtered. Our novel methodology with indigenous one-micron filters recovered them from the PPP improving yield upto 92%.
Whether presence of leukocytes in PRP preparation can damage cartilage is highly debated22. Studies have shown that leucocytes in PRP can damage cartilage whereas leukocyte-poor PRP, promotes chondrogenesis in vivo22 and better functional outcomes23.
The growth factors secreted by the platelets stimulate the proliferation of chondrocytes and mesenchymal stem cells thereby assisting in synthesis of type II collagen21. Suppression of mediators such as IL-1 interaction24 with nociceptors22 brings inflammatory and analgesic effects.
Significant clinical effects were observed in control (HA) group upto 1 month were due to the lubricating and shock-absorbing properties of HA25.
Application of HA in moderate OA has been reported to decrease in the average number of opioid prescriptions as well as overall new prescriptions26, better maintenance of medial and lateral joint space areas27, delay in total knee replacement surgery28,29 in moderate OA. However American academy of orthopedic surgeons AAOS (2013) and American college of Rheumatology ACR (2020) recommended against use of HA and considered that it is not medically necessary for the treatment of pain30. Heterogeneous trial results conflicting conclusions, and flaws in interpreting data make literature interpretations very confusing. However majority have reported clinically important reductions in pain and excellent safety profile31.
We used inactivated PRP as it increases proliferation of the mesenchymal stem cells fivefold32, improves cartilage, and aids in bone formation. Activated PRP may inhibit chondrogenesis and osteogenesis in vivo33. Need of activation of PRP prior to injection is an issue on ongoing Debate. Several studies have reported that activation of PRP before joint injection ensure that signaling elements are released during fibrin retraction and fibrinolysis34 hence better results on degenerative cartilage lesions20.
MRI interpretations methodology of our study for minor improvements in cartilage is too small to be consistently and reliably picked up. In present study MRI evaluation should have beenwithT2wetmaps. Mere addressing the cartilage loss would be unlikely to succeed in OA treatment if not focused on correcting the abnormal mechanics and ligament laxity35. Approximately 50%of the patients with radiological changes of OA are asymptomatic because articular cartilage is not innervated36 hence in many situations despite chondroprotection provided by PRP pain may persist.
The strengths of our study are the structural and physiological evaluation, standardized PRP processing with little variation, and a very high level of consistency in absolute platelet counts (≥ 10 billion) in 8 ml which we hope will help in standardizing the dosage for treatment. “The major limitation of our study was the absence of a true control group using saline. The study did not address implication of PRP in advanced OA. Besides small sample size and assessment in limited time frame, the study was limited by variable doses (different combination of absolute number and concentration of platelets in PRP) evaluation.
Our study provides evidence that clinical outcome does not only depend upon the concentration, but also on the absolute platelet count. We delivered a standardized PRP dose with little variation. Injecting 8 ml PRP in joint space through supra lateral approach does not produce any distension or swelling and is safe as knee joint has large volume and surface area37. Critical dose is important for sustained therapeutic effect. We have observed sustained therapeutic benefit with dose of 10 billion platelets in 8 ml volume of PRP. It can be hypothesized that higher platelet counts will ultimately lead to high growth factors release hence generate better outcome. However further studies are needed to evaluate if still higher doses (more than 10 billion) are more beneficial or counterproductive and similarly higher concentration (less volume of PRP with 10 billion platelets) would yield the same result.
## Conclusion
Application of PRP with absolute counts of 10 billion platelets in a volume of 8 ml provides significant potential chondro-protection and alleviates symptoms compared to control in knee OA.
## Material and methods
### Eligibility and patient selection
This trial was ethically approved by the Institutional Committee for Stem Cell Research and Therapy, Anupam Hospital, Uttarakhand, India. The trial is compliant with consolidated standards of reporting trials (CONSORT). Informed prior consent was obtained from all the patients. The criteria for patients selection was age ≥ 50 years with symptomatic primary knee OA (Supplementary Table 2). The more painful knee was considered in cases where the patient had bilateral OA. (Clinicaltrials.gov-NCT04198467; Date of registration 13/12/2019; ClinicalTrial.gov under URL: https://clinicaltrials.gov/ct2/show/NCT04198467).
### Preparation of PRP
A blood sample (60 ml) with 10% ACD solution was drawn and centrifuged at 600×g for 10 min before the plasma fraction was collected. The plasma fraction was centrifuged at 4000×g for 15 mins9. Supernatant platelet poor plasma (PPP) was then removed, leaving 3 ml PRP9. The PPP was passed through a one-micron special flush-back filter (Alpha Corpuscle, New Delhi, India) so that all the platelets present in PPP fraction were trapped in the filter before being flushed back with 5 ml of PPP to retrieve the captured platelets then mixed with the previous 3 ml PRP. The mixture was passed through a WBC filter (Terumo Imuguard, CO, USA) to remove the leukocytes. Platelet counts were adjusted to 10 billion in 8 ml of volume. We used inactivated PRP. The product was analyzed for total leukocyte and platelet counts. Platelet counts were adjusted to 10 billion in 8 ml of volume by diluting it with PPP in patients having high baseline values hence yielding higher counts. Five samples were selected randomly to assess platelet-derived growth factors (PDGF) and vascular endothelial growth factors (VEGF) by ELISA.
### Control
Four milliliters of high-molecular-weight hyaluronic acid (HA: Brand name: Monovisc from Anika Therapeutics, Inc., MA, USA) with a concentration of 22 mg/ml was selected as treatment for the control group.
### Study design
This prospective, double-blinded, randomized control (parallel designed with allocation 1:1 ratio), 12-month, study of 150 outpatients was conducted following the 1964 Declaration of Helsinki38. All methods were carried out in accordance with relevant guide lines and regulations. Patients were randomly selected based on a computer-generated number to receive one indistinguishable injection of either PRP or HA. Followings kind is infection of the knee joint, PRP (8 ml; we used inactivated PRP) or HA was injected into the joint space through supralteral approach. Participant patients and the physician who assessed the outcome were blinded to treatment arm. Patients were advised to continue with physiotherapy and knee exercises. Paracetamol, to a maximum of up to one gram three times a day, was prescribed as a rescue drug.
### Cytokine analysis
One ml of synovial fluid was aspirated from patients and evaluated for pro-inflammatory cytokines IL-6, IL-8and TNF-α (Quantikine ELISA kits, R & D system, Canada) using ELISA at 0, 1 and 12 months.
### Study assessments
Patients were assessed by WOMAC39, IKDC scores40 and 6-min walking distance (6MWD) at 0, 1, 3, 6, and 12 months. The structural efficacy was evaluated by joint space width (JSW) on X-ray and articular cartilage thickness on MRI at baseline and at 12 months by two experienced radiologists with 5% disagreement. Assessors were blinded to the treatment of PRP or control. The joint space width at the narrowest point of joint41 and Kellgren and Lawrence grade42 were assessed. MRI evaluation was performed as previously described9,43. The patients were initially followed up once weekly during the first month then once a month for the remaining 11 months for reporting of adverse effects, and biochemical and hematological analysis.
### Statistical analysis
All statistical analyses were done as an intention to treat (ITT). Two tailed testing was performed using SPSS 20.0 statistical software package (SPSS Inc., Chicago, USA). The Kolmogorov–Smirnov test was performed to determine the normal distribution of continuous variables44. The repeated variant analysis was performed to assess the time variance of the variables. Statistical significance was P < 0.05.
|
|
Asymptotic behavior of a sequence based on a subsequence II
Let $\{a_{n}\}$ be a non-increasing sequence of positive numbers. if for some positive integers $l,p$ and $R>1$ we have $a_{(ln)^{p}}=O(R^{-n})$ as $n\to\infty$, what can we say about the behavior of $a_{n}$? tkx!!
-
Without further information, such as monotonicity, we cannot say anything further. – sos440 Aug 22 '12 at 13:45
If you consider $a_{i+1}\le a_i$ then
$$f(n)=-\frac{1}{l}\sqrt[p]{n}$$
$$a_n=O(R^{f(n)})$$
DETAILS :
consider $m$ such that $(lm)^p\le n \lt l(m+1)^p$, then $m=\lfloor\,f(n)\rfloor$
As $a_{(ln)^p}=O(R^{-n})$, there exists $k>0$ such that $a_{(ln)^p}\le k(R^{-n})$
So for any $n$ (and $R\ge 1$), $$a_n<a_{l(m+1)^p}\le k.R^{-(m+1)}\le k.R^{-f(n)}$$
and if $(R<1)$
$$a_n<a_{l(m+1)^p}\le k.R^{-(m+1)}\le k.R.R^{-f(n)}$$
-
Could you give some details ? Please? – Dubglass Aug 23 '12 at 3:04
|
|
# A plank is placed on a solid cylinder which rolls on a horizontal surface.The two are of equal mass.There is no slipping in any of the surfaces in contact.Find the ratio of kinetic energy of plank and cylinder.
Kinetic energy of plank:
Kinetic energy of cylinder is
where W is angular velocity
So kinetic energy of cylinder is
???????
### Preparation Products
##### Knockout NEET May 2021
An exhaustive E-learning program for the complete preparation of NEET..
₹ 22999/- ₹ 14999/-
##### Test Series NEET May 2021
Take chapter-wise, subject-wise and Complete syllabus mock tests and get in depth analysis of your test..
₹ 6999/- ₹ 4999/-
##### Rank Booster NEET 2021
This course will help student to be better prepared and study in the right direction for NEET..
₹ 13999/- ₹ 9999/-
##### Knockout NEET May 2022
An exhaustive E-learning program for the complete preparation of NEET..
₹ 34999/- ₹ 24999/-
|
|
# Thread: [SOLVED] Help me to solve this math problems
1. ## [SOLVED] Help me to solve this math problems
Let : $\displaystyle x=\sin \theta$
3. Are you required to use integration by parts? The obvious way to integrate this is to let $\displaystyle y= 1- x^2$ so that $\displaystyle dy= -2x dx$ or $\displaystyle -\frac{1}{2}dy= x dx$, $\displaystyle x^2= 1- y$ and the integral becomes $\displaystyle \int \frac{(x^2)(x dx)}{\sqrt{1- x^2}}= -\frac{1}{2}\int\frac{(1- y)dy}{\sqrt{y}}$$\displaystyle = -\frac{1}{2}\int\frac{(1- y)dy}{y^{\frac{1}{2}}}$$\displaystyle = -\frac{1}{2}\int \left(y^{-\frac{1}{2}}- y^{\frac{1}{2}}\right)dy$.
|
|
# Matplotlib Exercise 3
## Imports
In [9]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
## Contour plots of 2d wavefunctions
The wavefunction of a 2d quantum well is:
$$\psi_{n_x,n_y}(x,y) = \frac{2}{L} \sin{\left( \frac{n_x \pi x}{L} \right)} \sin{\left( \frac{n_y \pi y}{L} \right)}$$
This is a scalar field and $n_x$ and $n_y$ are quantum numbers that measure the level of excitation in the x and y directions. $L$ is the size of the well.
Define a function well2d that computes this wavefunction for values of x and y that are NumPy arrays.
In [10]:
def well2d(x, y, nx, ny, L=1.0):
sine1 = np.sin(nx*np.pi*x/L)
sine2 = np.sin(ny*np.pi*y/L)
eq = 2/L * sine1 * sine2
return(eq)
In [11]:
psi = well2d(np.linspace(0,1,10), np.linspace(0,1,10), 1, 1)
assert len(psi)==10
assert psi.shape==(10,)
The contour, contourf, pcolor and pcolormesh functions of Matplotlib can be used for effective visualizations of 2d scalar fields. Use the Matplotlib documentation to learn how to use these functions along with the numpy.meshgrid function to visualize the above wavefunction:
• Use $n_x=3$, $n_y=2$ and $L=0$.
• Use the limits $[0,1]$ for the x and y axis.
• Customize your plot to make it effective and beautiful.
• Use a non-default colormap.
• Add a colorbar to you visualization.
First make a plot using one of the contour functions:
In [12]:
#Set given variables
nx = 3
ny = 2
L = 1
x = np.linspace(0,1,100)
y = np.linspace(0,1,100)
X, Y = np.meshgrid(x, y)
#We need a 2D matrix, so set a second function
psi2 = well2d(X, Y, nx, ny, L)
#Contour graph
plt.contour(X, Y, psi2)
#Style Graph
plt.xlabel("X")
plt.ylabel("Y")
plt.title("2-D Infinite Well")
ax = plt.gca()
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
In [13]:
assert True # use this cell for grading the contour plot
Next make a visualization using one of the pcolor functions:
In [17]:
res = 70
# Because pcolor resolution depends on the size of psi and psi2 arrays
# I label a new variable "res"
# Greater "res" allows for greater resolution
psi2 = well2d(X, Y, nx, ny, L)
#Create matrix for "z" argument
z = sum(np.meshgrid(psi, psi2))
#Set colors for max/min contours (note: for this problem, this is unnecessary. It defaults the same values.)
maxd = np.amax(psi2)
mind = np.amin(psi2)
#Call the graph x, y are the lengths of the box, z is the function matrix values
plt.pcolor(X, Y, psi2, cmap='RdBu', vmin=mind, vmax=maxd)
#Style Graph
plt.xlabel("X")
plt.ylabel("Y")
plt.title("2D Infinite Well")
ax = plt.gca()
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
plt.show()
In [46]:
assert True # use this cell for grading the pcolor plot
Used matplotlib.org for pcolor example
In [ ]:
|
|
My Math Forum Conceptualising a 2x2 matrix
Linear Algebra Linear Algebra Math Forum
March 17th, 2017, 05:16 PM #1 Newbie Joined: Mar 2017 From: Brisbane Posts: 3 Thanks: 0 Math Focus: linear algebra Conceptualising a 2x2 matrix Hi all I am having trouble conceptualising what a 2x2 matrix implies. For example, can the matrix: A = 2 4 3 7 be represented on a plane as two vectors? I'm thinking about this in the context of a vector being multiplied by this matrix repeatedly, and going to infinity. Thanks for your help=)
March 17th, 2017, 07:41 PM #2 Senior Member Joined: Aug 2012 Posts: 1,247 Thanks: 291 Ooh what a good question. Imagine the unit square in the plane, defined by $\{(x, ~y) \in \mathbb R^2 : 0 \leq x, y \leq 1\}$. Now think of the region of the plane defined by the vectors $(2,3)$ and $(4,7)$. In other words draw the arrow from the origin to $(2,3)$, and the vector from the origin to $(4,7)$, and shade in the paralellogram they define. Now the matrix $A= \left[ {\begin{array}{cc} 2 & 4 \ \\ 3 & 7 \ \end{array} } \right]$ is the matrix of the linear transformation relative to the standard basis that maps the unit square to the shaded paralellogram. Now depending on what class you're in, this may or may not make sense right now. But it's a great thing to know. And the determinant of the matrix? It's just the area of the parallelogram. How can you see this? Multiply the matrix by the standard basis vectors $\left[ \begin{array}{c} 1\\ 0\\ \end{array} \right]$ and $\left[ \begin{array}{c} 0\\ 1\\ \end{array} \right]$ and you'll see how the matrix transforms the standard basis. And everything in between, ends up in between. Thanks from romsek and ChristineJW Last edited by Maschke; March 17th, 2017 at 07:47 PM.
March 17th, 2017, 08:37 PM #3 Newbie Joined: Mar 2017 From: Brisbane Posts: 3 Thanks: 0 Math Focus: linear algebra Thanks Maschke! Also the this is the first time I've heard that the area of the parallelogram being equal to the determinant. Very useful!
March 17th, 2017, 08:46 PM #4
Senior Member
Joined: Aug 2012
Posts: 1,247
Thanks: 291
Quote:
Originally Posted by ChristineJW Thanks Maschke! Also the this is the first time I've heard that the area of the parallelogram being equal to the determinant. Very useful!
You're very welcome. Also note that if the area of the parallelogram is zero, that is if the transformation collapses the square to a line, then the determinant is zero and the transformation's not invertible. The collapse of area and the collapse of dimension are two aspects of the same thing.
Tags 2x2, conceptualising, matrix
Thread Tools Display Modes Linear Mode
Similar Threads Thread Thread Starter Forum Replies Last Post silviatodorof Linear Algebra 2 March 22nd, 2015 05:28 AM mariusmssj Linear Algebra 4 December 28th, 2009 10:46 AM mostafa-sky Linear Algebra 1 December 18th, 2009 03:12 PM
Contact - Home - Forums - Cryptocurrency Forum - Top
|
|
GMAT Question of the Day - Daily to your Mailbox; hard ones only
It is currently 16 Oct 2019, 10:53
### GMAT Club Daily Prep
#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
Your Progress
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
# Question of the Week - 39 (In the x-y plane, PQ is a straight line)
new topic post reply Question banks Downloads My Bookmarks Reviews Important topics
Author Message
TAGS:
### Hide Tags
e-GMAT Representative
Joined: 04 Jan 2015
Posts: 3074
Question of the Week - 39 (In the x-y plane, PQ is a straight line) [#permalink]
### Show Tags
07 Mar 2019, 23:04
1
2
00:00
Difficulty:
95% (hard)
Question Stats:
30% (01:57) correct 70% (01:51) wrong based on 81 sessions
### HideShow timer Statistics
Question of the Week #39
In the x-y plane, PQ is a straight line. The coordinate of point P is (a, b), where a > 0. Does point Q lie in the third quadrant?
Statement 1: The origin bisects PQ in 1: 1 ratio.
Statement 2: The slope m of the line PQ is non-negative.
_________________
Intern
Joined: 15 Dec 2018
Posts: 30
Location: India
GMAT 1: 650 Q45 V35
GMAT 2: 650 Q45 V45
GPA: 3.5
Re: Question of the Week - 39 (In the x-y plane, PQ is a straight line) [#permalink]
### Show Tags
07 Mar 2019, 23:18
IMO E
Both statements do not indicate anything. It could also be that the line can be just the X axis
Posted from my mobile device
Intern
Joined: 11 Dec 2018
Posts: 10
Re: Question of the Week - 39 (In the x-y plane, PQ is a straight line) [#permalink]
### Show Tags
08 Mar 2019, 03:46
IMO C
We know that P has a>0, so point P lie or in the first quadrant or in the fourth quadrant.
1) statment 1 not sufficient, because it tells us that the origin bisects the segment PQ in two equal segments. But Point Q can lie either in the second or in the third quadrant;
2) statment 2 not sufficent. We can only say that point Q cannot be in the second quadrant.
1+2) sufficient.
from 1: origin bisects PQ with ratio 1:1
from 2: the slope isn't negative, so Q can't be in the second quadrant.
IMO P lie in the first quadrant and Q in the third.
Hope my answer is correct.
Intern
Joined: 22 Oct 2017
Posts: 19
Re: Question of the Week - 39 (In the x-y plane, PQ is a straight line) [#permalink]
### Show Tags
10 Mar 2019, 07:11
EgmatQuantExpert wrote:
Question of the Week #39
In the x-y plane, PQ is a straight line. The coordinate of point P is (a, b), where a > 0. Does point Q lie in the third quadrant?
Statement 1: The origin bisects PQ in 1: 1 ratio.
Statement 2: The slope m of the line PQ is non-negative.
1) Only tells us that x-axis will cut the line in 2, but still don't know anything about P and Q positions
2) Only tells us that the line is either horizontal or increasing
1)+2) still ambiguous about which one between P or Q is at the bottom or top of x-axis
e-GMAT Representative
Joined: 04 Jan 2015
Posts: 3074
Re: Question of the Week - 39 (In the x-y plane, PQ is a straight line) [#permalink]
### Show Tags
13 Mar 2019, 01:19
Solution
Given:
• PQ is a straight line.
• Coordinate of point P is (a, b).
• a > 0.
To find:
• In which quadrant Q lies.
Let us assume the coordinate of point Q is (x, y)
To find the quadrant of point Q, we need to find the exact value of the coordinate of point Q.
Analysing statement 1:
The origin bisects PQ in 1: 1 ratio.
Hence, 0 = $$\frac{a + x}{2}$$and 0= $$\frac{b + y}{2}$$
• Therefore. x= -a and y= -b
• However, we still don’t know the exact value of x and y.
Hence, statement 1 is not sufficient to answer the question.
Analysing statement 2:
The slope m of the line PQ is non-negative.
Slope m of a line is $$\frac{y2 – y1}{x2-x1}$$.
Hence, m= $$\frac{y-b}{x-a}$$
However, we still don’t have any information about the values of x and y.
Hence, statement 2 is not sufficient to answer the question.
Combining both the statements together:
From statement 1:
• x= -a and y= -b
From statement 2:
• m= $$\frac{y-b}{x-a}$$
We cannot find the value of x and y even after combining both the statements together.
Hence, option E is the correct answer.
Correct answer: option E.
_________________
Intern
Joined: 21 Apr 2018
Posts: 8
Location: India
Schools: HSG '21
Re: Question of the Week - 39 (In the x-y plane, PQ is a straight line) [#permalink]
### Show Tags
15 Mar 2019, 04:37
EgmatQuantExpert Bunuel
EgmatQuantExpert wrote:
Solution
Given:
• PQ is a straight line.
• Coordinate of point P is (a, b).
• a > 0.
To find:
• In which quadrant Q lies.
Let us assume the coordinate of point Q is (x, y)
To find the quadrant of point Q, we need to find the exact value of the coordinate of point Q.
Analysing statement 1:
The origin bisects PQ in 1: 1 ratio.
Hence, 0 = $$\frac{a + x}{2}$$and 0= $$\frac{b + y}{2}$$
• Therefore. x= -a and y= -b
• However, we still don’t know the exact value of x and y.
Hence, statement 1 is not sufficient to answer the question.
Analysing statement 2:
The slope m of the line PQ is non-negative.
Slope m of a line is $$\frac{y2 – y1}{x2-x1}$$.
Hence, m= $$\frac{y-b}{x-a}$$
However, we still don’t have any information about the values of x and y.
Hence, statement 2 is not sufficient to answer the question.
Combining both the statements together:
From statement 1:
• x= -a and y= -b
From statement 2:
• m= $$\frac{y-b}{x-a}$$
We cannot find the value of x and y even after combining both the statements together.
Hence, option E is the correct answer.
Correct answer: option E.
Can you let me know where I have gone wrong in my reasoning.
I thought C is the answer and my reasoning is given below.
Given a straight line PQ, with co-ordinates of P as (a,b) where a > 0
=> P is either on the 1st quadrant or on x axis or on the 4rth quadrant. Any pattern of line with positive, negative, infinite or zero slope can be drawn using points in these quadrants.
STATEMENT 1 : Origin bisects the line in the ratio 1 : 1
From the set of lines that could possibly be the answer we can eliminate all lines that doesnt pass through the origin.
As line passes through origin and a >0, line y axis and all lines with slope infinity (|| to y axis) can be eliminated.
If point P is in quadrant 1 it has to pass though quadrant 3 to satisfy this condition. This implies that the line will have a positive slope
If b is 0, then PQ is part of the x axis itself, and the point Q will be (-a,0) => Slope is 0 here
If the point P lies in 4rth quadrant, then Q must lie in the 2nd quadrant so that the origin bisects PQ. Here PQ will have negative slope.
HENCE STATEMENT 1 is not enough to answer the question
STATEMENT 2 : slope is non negative.
0 is neither positive nor negative. So I believe this statement essentially means slope is positive. We cannot narrow down the options here. The point Q could be in first quadrant itself
However, combining the 2 we can conclude that Q should pass through origin and should be in third quadrant. Hence both together can answer the question
Re: Question of the Week - 39 (In the x-y plane, PQ is a straight line) [#permalink] 15 Mar 2019, 04:37
Display posts from previous: Sort by
# Question of the Week - 39 (In the x-y plane, PQ is a straight line)
new topic post reply Question banks Downloads My Bookmarks Reviews Important topics
Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne
|
|
Sparse distributed multivariate Laurent polynomials
Every element of the multivariate Laurent polynomial ring $R[x_1, x_1^{-1}, \dots, x_n, x_n^{-1}]$ can be presented as a sum of products of powers of the $x_i$ where the power can be any integer. Therefore, the interface for sparse multivarate polynomials carries over with the additional feature that exponents can be negative.
Generic multivariate Laurent polynomial types
AbstractAlgebra.jl provides a generic implementation of multivariate Laurent polynomials, built in terms of regular multivariate polynomials, in the file src/generic/LaurentMPoly.jl.
The type LaurentMPolyWrap{T, ...} <: LaurentMPolyElem{T} implements generic multivariate Laurent polynomials by wrapping regular polynomials: a Laurent polynomial l wraps a polynomial p and a vector of integers $n_i$ such that $l = \prod_i x_i^{n_i} * p$. The representation is said to be normalized when each $n_i$ is as large as possible (or zero when l is zero), but the representation of a given element is not required to be normalized internally.
The corresponding parent type is LaurentMPolyWrapRing{T, ...} <: LaurentMPolyRing{T}.
Abstract types
Two abstract types LaurentMPolyElem{T} and LaurentMPolyRing{T} are defined to represent Laurent polynomials and rings thereof, parameterized on a base ring T.
Multivate Laurent polynomial operations
Since, from the point of view of the interface, Laurent polynomials are simply regular polynomials with possibly negative exponents, the following functions from the polynomial interface are completely analogous. As with regular polynomials, an implementation must provide access to the elements as a sum of individual terms in some order. This order currently cannot be specified in the constructor.
LaurentPolynomialRing(R::Ring, S::Vector{String}; cached::Bool = true)
LaurentPolynomialRing(R::Ring, n::Int, s::String="x"; cached::Bool = false)
(S::LaurentMPolyRing{T})(A::Vector{T}, m::Vector{Vector{Int}})
MPolyBuildCtx(R::LaurentMPolyRing)
push_term!(M::LaurentMPolyBuildCtx, c::RingElem, v::Vector{Int})
finish(M::LaurentMPolyBuildCtx)
symbols(S::LaurentMPolyRing)
nvars(f::LaurentMPolyRing)
gens(S::LaurentMPolyRing)
gen(S::LaurentMPolyRing, i::Int)
is_gen(x::LaurentMPolyElem)
var_index(p::LaurentMPolyElem)
length(f::LaurentMPolyElem)
coefficients(p::LaurentMPolyElem)
monomials(p::LaurentMPolyElem)
terms(p::LaurentMPolyElem)
exponent_vectors(p::LaurentMPolyElem)
leading_exponent_vector(p::LaurentMPolyElem)
change_base_ring(::Ring, p::LaurentMPolyElem)
change_coefficient_ring(::Ring, p::LaurentMPolyElem)
map_coefficients(::Any, p::LaurentMPolyElem)
evaluate(p::LaurentMPolyElem, ::Vector)
derivative(p::LaurentMPolyElem, x::LaurentMPolyElem)
derivative(p::LaurentMPolyElem, i::Int)
rand(R::LaurentMPolyElem, length_range::UnitRange{Int}, exp_range::UnitRange{Int}, v...)
The choice of canonical unit for Laurent polynomials includes the product $\prod_i x_i^{n_i}$ from the normalized representation. In particular, this means that the output of gcd will not have any negative exponents.
julia> R, (x, y) = LaurentPolynomialRing(ZZ, ["x", "y"]);
julia> canonical_unit(2*x^-5 - 3*x + 4*y^-4 + 5*y^2)
-x^-5*y^-4
julia> gcd(x^-3 - y^3, x^-2 - y^2)
x*y - 1
|
|
# The Solarized Dark Vim
Today, I spent a whole day on reconfigure my Vim. Vim is a powerful monster that needs care. Once you feed it with (your precious) time, Vim will pay you back with a nice and pretty editing experience.
▲ Solarized Dark vim
Two things I’ll talk about today: Solarized Dark and Powerline.
## Solarized Dark
Solarized Dark is a color palette designed by Ethan Schoonover. From my experiences, this color scheme proves to be usable across many kinds of computers and monitors. The colors are smooth and clear. Color settings for most of daily use apps are provided on the official website. Even if it doesn’t provided officially, you usually still can find it somewhere on the Internet. :-p In short, pretty color for your eyes and large userbase. Go get it now!
To use this color scheme (properly) in Vim, some prerequisites must be met.
• A decent terminal emulator with properly configured 256-colors support
• Install vim-colors-solarized plugin
Since there are way too many terminal apps to be introduced one-by-one, I’ll save your time from that. I can tell you that I’m using this color scheme on iTerm2, mintty, gnome-terminal. Oh, Did I mention that I just gave your links to those color scheme files? :-D
P.S. OSX’s Terminal is no good, try iTerm2 if you’re using OSX.
Once you prepared your terminal environment for colorful life, we can get to the business. The vim-colors-solarized plugin can be installed by adding this line to your .vimrc, given that you’re using Vundle, and please do use it.
Bundle 'altercation/vim-colors-solarized'
colorscheme solarized
Save, reopen your vim, and run :BundleInstall. Do reopen your vim again, then Voilà!
## Powerline
Powerline is a plugin designed to power your Vim’s laststatus. It gives you a super pretty and useful statusbar right after installation. If you want to install this plugin, add those to your .vimrc.
Bundle 'Lokaltog/vim-powerline'
let g:Powerline_symbols = 'fancy'
Set g:Powerline_symbols to fancy gives you best look, but it requires you to use a patched font. You can find those fonts here. To use those fonts, simple download it and change your favorite terminal app’s fonts to [Your favorite font name here] for Powerline’’.
## Conclusions
Your Vim should now be look liked mine in the screenshot. However, this is just a start. The real power of vim lies in the plugins. Maybe I’ll write another post to talk about my favorite vim plugins sometimes later. Bon voyage, on the journey of becoming a power Vim user. :-)
|
|
What algorithm to use for this kind of routing optimization?
Let's imagine a situation in order to fully understand the problem : let's say a lone human is walking back home at a very late time. He needs to find the safest path home. He naturally use the GPS with a start point A and a destination point B. Now the data I have may be GPS locations with an information stating the danger of that location, and those datas are usually available for the whole city. How can I actually plot the safest and also (if possible) fastest route from A to B using my datas ?
I actually looked for the way google maps plot it's routes and I understood it used the Dijkstra's algorithm, but it doesn't seem to be adapted to my problem.
I believed google maps could actually send me back every possible routes from A to B, then I could use my datas to calculate the safest route using a TSP algorithm (probably the ACS applied to the TSP) in order to optimize the use of the datas and with edge weights corresponding to the associated safety of the sub-path ?
Or maybe another algorithm should be used ?
• What is "safest"? Nov 16 '17 at 21:02
• Just noticed it could cause confusion. "Safest" here means the route which is the less dangerous for the person to take. Nov 16 '17 at 21:03
• This begs the question. Given two routes, which is more dangerous? Nov 16 '17 at 21:06
• To me, a route is more dangerous when it's danger level is high and the distance between A and B is high as well. Let's take two routes, one that has a danger level of 10 and one of 8. First's distance is 10 km and second is 100 km. To me the second one would be the most dangerous. Nov 16 '17 at 21:20
According to another interpretation, the danger of a route is the maximum of the dangers of the individual stretches. In this case you can use binary search to reduce your problem to shortest path. Given a danger level $D$, you can compute the shortest distance that only goes through edges of danger at most $D$. In this way you can find the minimal $D$ for which it is possible to get from A to B, as well as (for example) the minimal $D$ for which it is possible to get from A to B using a path at most twice the distance from A to B.
|
|
# sympy slice matrix
Here is a matrix of type-, is of , and are of : By definition of matrix product, for the case of our settings, matrix products Examples ===== >>> from sympy import Matrix, I … first file, sin and cos are defined as the SymPy sin and for j in range(0,shapeF[1]): If you want to get the same answer, you can do sympy.Matrix(A_np).n(30).inv().n(16) which uses higher precision floats so that the numerical is reduced. Python-based: SymPy is written entirely in Python and uses Python for its language. If only one parameter is put, a single item corresponding to the index will be returned. class sympy.matrices.matrices.MatrixReductions [source] ¶ Provides basic matrix row/column operations. SymPy provides many special type of matrix classes. If ellipsis is used at the row position, it will return an ndarray comprising of items in rows. That way, some special constants, like , , (Infinity), are treated as symbols and can be evaluated with arbitrary precision: >>> sym. This turned out to be the key to the whole thing. First, let us state the preamble: Syntax: Matrix().diagonalize() Returns: Returns a tuple of matrix where the second element represents the diagonal of the matrix. , , , , and etcetera are allowed: A linear combination of the matrices of the same type is obtained by, As an application of inverse matrix, let us consider simultaneous linear equations, This is represented in terms of matrices as, Its solution is given by an inverse matrix of, (here we assume the existence of for simplicity) by applying which, one finds, For example, simultaneous equations for three variables , and, is solved by finding the inverse of the matrix, Finally, take its product with the vector, To make a comparison with the result using "solve", put, 数学、物理、Maxima、Python、Wolfram言語について勉強したことをまとめます。計算の補助に利用したMaximaなどの入力例もなるべく載せます。 I suppose not too many people need this, but I do. We used nested lists before to write those programs. Identity matrix is a square matrix with elements falling on diagonal are set to 1, rest of the elements are 0. Juan Klopper 2,250 views. Run code block in SymPy Live. echelon_form (iszerofunc=, simplify=False, with_pivots=False) [source] ¶ Returns a matrix row-equivalent to M that is in echelon form. Here are the results--for three implementations of sparse*sparse-- _mulspsp, _mulspsp2, _mulspsp3, on two matrices Example #4 : Find derivative, integration, limits, quadratic equation. Tutorial on points and vectors in linear algebra - Duration: 36:58. Note: if you are going to be working with multiple libraries, and more than one of them defines a certain command, instead of from sympy import all you can do import sympy as sy.If you do this, each SymPy command will need to be appended with sy; for example, you might write sy.Matrix instead of simply Matrix.Let's use SymPy to create a $$2\times 3$$ matrix. I try: import sympy as sy sy.init_printing() # I use Jupyter Lab M = sy.Matrix(6,6,range(36)) M[[3,5],[3,5]] Matrix slicing works fine. Basic slicing is an extension of Python's basic concept of slicing to n dimensions. Three types of indexing methods are available − field access, basic slicing and advanced indexing. SymPy handles matrix-vector multiplication with ease: and tensorflow. Syntax: Matrix().nullspace() Returns: Returns a list of column vectors that span the nullspace of the matrix… These classes are named as eye, zeros and ones respectively. Parameters ===== key : slice The section of this matrix to replace. See reductions.py for some of their implementations. python code examples for sympy.matrices.expressions.matexpr.MatrixElement. "Tutorial de SymPy: Algebra lineal, matrices y gráficos | 7.6 - Curso Python científico".Tutorial de SymPy: Algebra lineal, matrices y representación gráfica [ 1 − 1 3 4 0 2] use. I spent the last couple of days experimenting with alternate implementation of various algorithms. then a list will be returned (if key is a single slice) or a matrix (if key was a tuple involving a slice). This module contains query handlers responsible for calculus queries: infinitesimal, bounded, etc. Let's see how we can do the same task using NumPy array. Slicing can also include ellipsis (…) to make a selection tuple of the same length as the dimension of an array. Above, we gave you 3 examples: addition of two matrices, multiplication of two matrices and transpose of a matrix. A computer algebra system written in pure Python. Week in PSE. For an introduction to how to use SymPy, see, To input matrices in Python (SymPy), put the following. For example, to construct the matrix. A matrix is constructed by providing a list of row vectors that make up the matrix. Python sympy | Matrix.eigenvects() method Last Updated: 26-08-2019 With the help of sympy.Matrix().eigenvects() method, we can find the Eigenvectors of a matrix. For example, Identity matrix, matrix of all zeroes and ones, etc. Example. Here are the examples of the python api sympy.matrices.expressions.slice.MatrixSlice.on_diag taken from open source projects. To make a matrix in SymPy, use the Matrix object. | The above description applies to multi-dimensional ndarray too. Here I'd like to share how to deal with matrix calculation with Python (SymPy). Superclass for Matrix Expressions. 芸術(音楽・美術)の記事もちょっとずつ書いていきたいと思います。, pianofisicaさんは、はてなブログを使っています。あなたもはてなブログをはじめてみませんか?, Powered by Hatena Blog value : Matrix The matrix to copy values from. Examples ===== >>> from sympy import Matrix, I >>> m = Matrix([... [1, 2 + I],... [3, 4 ]]) If the key is a tuple that doesn't involve a slice then that element: is returned: >>> m[1, 0] 3: When a tuple key involves a slice, a matrix … Now, defining a matrix symbol in SymPy is easy, but this did not help me in solving for the matrix, and I kept getting an empty output. Matrix Expressions Core Reference¶ class sympy.matrices.expressions.MatrixExpr (* args, ** kwargs) [source] ¶. Hello! Matrix().nullspace() returns a list of column vectors that span the nullspace of the matrix. Convert sympy matrix objects to numpy arrays. sympy.matrices.sparse.MutableSparseMatrix.row_op, sympy.matrices.sparse.SparseMatrix.col_list row_structure_symbolic_cholesky ( ) [source] ¶ Symbolic cholesky factorization, for pre-determination of the non-zero structure of the Cholesky factororization. This slice object is passed to the array to extract a part of array. Consider a sympy matrix with some symbolic variables in … By voting up you can indicate which … LU decomposition of a matrix using sympy - Duration: 6:34. In the above example, an ndarray object is prepared by arange() function. Example #1 : In this example we can see that by using sympy.evalf() … Before diving in, let’s import and initialize everything we’ll need. Example. I needed a way to iteratively declare each entry of the matrix as a symbol, whilst putting them together as a single matrix. Juan Klopper 53 views. With the help of sympy.Matrix().diagonalize() method, we can diagonalize a matrix. diagonalize() returns a tuple , where is diagonal and . If not, install the same using following command − The plot() function returns an instance of Plot class. Here is a small sampling of the sort of symbolic power SymPy is capable of, to whet your appetite. Example #1: January 6, 2010. For example, Identity matrix, matrix of all zeroes and ones, etc. The same result can also be obtained by giving the slicing parameters separated by a colon : (start:stop:step) directly to the ndarray object. Ensure that Matplotlib is available in current Python installation. The following are 30 code examples for showing how to use sympy.Matrix().These examples are extracted from open source projects. def copyin_matrix(self, key, value): """Copy in values from a matrix into the given bounds. ⎢ ⎥. SymPy uses Matplotlib library as a backend to render 2-D and 3-D plots of mathematical functions. This is mainly for educational purposes and symbolic matrices, for real (or complex) matrices use sympy.mpmath.qr_solve. from sympy.matrices import eye eye(3) Output You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. Contents of ndarray object can be accessed and modified by indexing or slicing, just like Python's in-built container objects. References to other Issues or PRs Closes #19148 Brief description of what is fixed or changed Fixes A[:1, :1] printing as A[, ] and A[:1:2, :1:2] printing as A[:2, :2] Always print using : notation, even if it's a 1x1 slice, to not have it be confused with matrix elements Release Notes NO ENTRY Here I'd like to share how to deal with matrix calculation with Python (SymPy).For an introduction to how to use SymPy, seepianofisica.hatenablog.com Matri manipulation Input matrices Refer matrix elements Operations of matrices (Product, Sum, Scalar multiplication, Power) Find inverse matrix … Then a slice object is defined with start, stop, and step values 2, 7, and 2 respectively. from sympy.matrices import eye eye(3) Output If a : is inserted in front of it, all items from that index onwards will be extracted. sylee957 wants to merge 8 commits into sympy: master from sylee957: improve_matrix_slice Conversation 9 Commits 8 Checks 0 Files changed Conversation How to convert a sympy Matrix to numpy array Filed under: Uncategorized — hdahlol @ 1:18 pm . Lightweight: SymPy only depends on mpmath, a pure Python library for arbitrary floating point arithmetic, making it easy to use. MatrixExprs represent abstract matrices, linear transformations represented within a particular basis. Identity matrix is a square matrix with elements falling on diagonal are set to 1, rest of the elements are 0. Vectors and Matrices in SymPy¶. Matrix Operations. 間違っているところや改善できるところなどお気軽にコメントしていただければと思います。 SymPy uses mpmath in the background, which makes it possible to perform computations using arbitrary-precision arithmetic. Matrices¶. equals(other, failing_expression=False). 6:34. Applies equals to corresponding elements of the matrices, trying to prove that the elements are equivalent, returning True if they are, False if any pair is not, and None (or the first failing expression if failing_expression is True) if it cannot be decided if the expressions are equivalent or not. A library: Beyond use as an interactive tool, SymPy can be embedded in other applications and extended with custom functions. In this lesson, we’ll review some of the basics of linear algebra opertations using SymPy. With the help of sympy.Matrix().nullspace() method, we can find the Nullspace of a Matrix. If two parameters (with : between them) is used, items between the two indexes (not including the stop index) with default step one are sliced. These classes are named as eye, zeros and ones respectively. With the help of sympy.evalf() method, we are able to evaluate the mathematical expressions.. Syntax : sympy.evalf() Return : Return the evaluated mathematical expression. This means that they can be modified in place, as we will see below. See also. A Python slice object is constructed by giving start, stop, and step parameters to the built-in slice function. Should not be instantiated directly. SymPy can simplify expressions, compute derivatives, integrals, and limits, solve equations, work with matrices, and much, much more, and do it all symbolically. The downside to this is that Matrix cannot be used in places that require immutability, such as inside other SymPy expressions or as keys to dictionaries. If the key involves a slice then a list will be returned (if key is a single slice) or a matrix (if key was a tuple involving a slice). One important thing to note about SymPy matrices is that, unlike every other object in SymPy, they are mutable. Then a slice object is defined with start, stop, and step values 2, 7, and 2 respectively. >>> Matrix( [ [1, -1], [3, 4], [0, 2]]) ⎡1 -1⎤. As mentioned earlier, items in ndarray object follows zero-based index. SymPy provides many special type of matrix classes. The output of this program is as follows −. Contribute to sympy/sympy development by creating an account on GitHub. This is, in general, an expensive operation. When this slice object is passed to the ndarray, a part of it starting with index 2 up to 7 with a step of 2 is sliced. When this slice object is passed to the ndarray, a part of it starting with index 2 up to 7 with a step of 2 is sliced. pi ** 2 ブログを報告する, Use Python (SymPy) for matrix calculation, # (k ,l) component of matrix A is given by A[ k-1 , l-1 ], Operations of matrices (Product, Sum, Scalar multiplication, Power). And extended with custom functions used nested lists before to write those programs will an! Putting them together as a symbol, whilst putting them together as a symbol, whilst putting together... Of days experimenting with alternate implementation of various algorithms and vectors in linear opertations! And modified by indexing or slicing, just like Python 's in-built container objects use the matrix as a item! One parameter is put, a single matrix query handlers responsible for queries. Python 's basic concept of slicing to n dimensions entirely in Python and uses Python for its language ... A SymPy matrix to Copy values from a matrix returns a tuple, where is diagonal and available − access! Mentioned earlier, items in ndarray object is constructed by providing a list of row vectors that up... ( * args, * * kwargs ) [ source ] ¶ then a slice object is passed to array! Step values 2, 7, and step parameters to the built-in slice function lu of! In general, an ndarray comprising of items in rows the matrix a... And ones respectively the sort of symbolic power SymPy is capable of to. Are 30 code examples for showing how to deal with matrix calculation with Python ( SymPy ) put! Earlier, items in rows, quadratic equation named as eye, zeros and,! * * kwargs ) [ source ] ¶ Provides basic matrix row/column.... Method, we gave you 3 examples: addition of two matrices for! Module contains query handlers responsible for calculus queries: infinitesimal, bounded, etc: inserted! Commits into sympy slice matrix: master from sylee957: improve_matrix_slice Conversation 9 commits Checks. Defined with start, stop, and 2 respectively on points and vectors in linear -! Current Python installation days experimenting with alternate implementation of various algorithms Python.. If a: is inserted in front of it, all items from that index onwards will be.. That they can be accessed and modified by indexing or slicing, just Python. From a matrix applications and extended with custom functions 8 Checks 0 Files Conversation... With custom functions or complex ) matrices use sympy.mpmath.qr_solve advanced indexing Copy from. And vectors in linear algebra - Duration: 6:34 diagonalize a matrix find the of! Then a slice object is defined with start, stop, and step values 2,,!.Nullspace ( ).nullspace ( ).nullspace ( ) method, we ’ ll need suppose not too people! The whole thing the row position, it will return an ndarray of...: addition of two matrices and transpose of a matrix task using NumPy array various.... Sampling of the elements are 0 a symbol, whilst putting them together as a single corresponding!: 36:58 for an introduction to how to use SymPy, see, to matrices. In linear algebra - Duration: 36:58 pure Python library for arbitrary floating point arithmetic, it... This slice object is constructed by providing a list of column vectors that make up the object! Is, in general, an expensive operation import eye eye ( 3 ) Output matrix operations the slice! Giving start, stop, and 2 respectively can be accessed and modified by indexing or,! A Python slice object is defined with start, stop, and 2 respectively is! Python ( SymPy ), just like Python 's basic concept of to... Lightweight: SymPy is capable of, to input matrices in Python and uses for. Like to share how to use sympy.Matrix ( ).nullspace ( ).nullspace ( ) returns a,. This lesson, we can find the Nullspace of a matrix is a small sampling of the matrix SymPy be! Ensure that Matplotlib is available in current Python installation can do the same task using NumPy array open! The dimension of an array real ( or complex ) matrices use sympy.mpmath.qr_solve can diagonalize a matrix using... And extended with custom functions query handlers responsible for calculus queries: infinitesimal, bounded, etc ) source... We ’ ll need '' '' Copy in values from a matrix SymPy..., for real ( or complex ) matrices use sympy.mpmath.qr_solve Python slice object is constructed by providing a list column. Using SymPy is prepared by arange ( ).These examples are extracted from open source.! Earlier, items in rows Provides basic matrix row/column operations n dimensions same using following command − the plot ). We ’ ll review some of the elements are 0 whet your appetite values from ( self, key value., matrix of all zeroes and ones respectively is diagonal and, use the matrix to NumPy array Filed:. Everything we ’ ll review some of the elements are 0 matrix as a backend to render 2-D and plots! Transformations represented within a particular basis contains query handlers responsible for calculus queries: infinitesimal, bounded, etc rest. Mpmath in the background, which makes it possible to perform computations using arbitrary-precision arithmetic possible to perform computations arbitrary-precision. Initialize everything we ’ ll need Python for its language key: the. Reference¶ class sympy.matrices.expressions.MatrixExpr ( * args, * * kwargs ) [ ]. Which makes it possible to perform computations using arbitrary-precision arithmetic, we ’ ll review some the. Only depends on mpmath, a pure Python library for arbitrary floating arithmetic! Slice function items from that index onwards will be returned embedded in other applications extended... Step parameters to the built-in slice function is a small sampling of the matrix to replace sympy.matrices eye. An introduction to how to use showing how to use sympy.Matrix ( ) returns a tuple, where diagonal! For example, Identity matrix is a square matrix with elements falling on are! For example, Identity matrix is constructed by giving start, stop, and 2 respectively Expressions... Mentioned earlier, items in ndarray object is defined with start, stop and. Expensive operation elements are 0 vectors in linear algebra opertations using SymPy ndarray of! To Copy values from a matrix entry of the elements are 0 be key... Built-In slice function field access, basic slicing is an extension of Python 's basic concept slicing. Symbol, whilst putting them together as a single matrix module contains query handlers for. Of row vectors that make up the matrix as a backend to render 2-D 3-D. As mentioned earlier, items in ndarray object follows zero-based index modified by or. General, an expensive operation of all zeroes and ones, etc of various.. Making it easy to use commits into SymPy: master from sylee957: improve_matrix_slice Conversation 9 8. ( … ) to make a selection tuple of the matrix ) matrices use sympy.mpmath.qr_solve like Python 's concept! Lists before to write those programs built-in slice function mathematical functions Output to make a selection tuple of matrix! 2-D and 3-D plots of mathematical functions which makes it possible to perform computations using arbitrary-precision sympy slice matrix will. In SymPy, use the matrix object, matrix of all zeroes and ones etc! Def copyin_matrix ( self, key, value ): '' '' Copy in values from a matrix following! Opertations using SymPy - Duration: 36:58 i suppose not too many people this... Into the given bounds 30 code examples for showing how to use (... Tuple of the matrix to replace matrix as a single item corresponding to the slice! Linear transformations represented within a particular basis eye ( 3 ) Output make... Out to be the key to the index will be returned be returned program is as −! Matrix row/column operations put, a pure Python library for arbitrary floating arithmetic. Step parameters to the whole thing an instance of plot class 0 Files changed Hello... Python and uses Python for its language a part of array object zero-based! Slice function an ndarray comprising of items in rows limits, quadratic equation transformations represented within a particular basis,! Named as eye, zeros and ones, etc of array sympy slice matrix written entirely in Python ( ). Args, * * kwargs ) [ source ] ¶ − the plot ( ) function returns instance... Accessed and modified by indexing or slicing, just like Python 's in-built container objects zero-based index earlier items! Of all zeroes and ones respectively use sympy.mpmath.qr_solve 9 commits 8 Checks 0 changed! Prepared by arange ( ) method, we gave you 3 examples addition... Slicing is an extension of Python 's in-built container objects i do accessed and by. Python 's basic concept of slicing to n dimensions ) returns a tuple, where is diagonal and make the. Mpmath in the background, which makes it possible to perform computations using arbitrary-precision arithmetic code! With alternate implementation of various algorithms the sort of symbolic power SymPy is written in. ¶ Provides basic matrix row/column operations use the matrix object query handlers responsible for calculus:... Uses mpmath in the above example, an expensive operation parameters ===== key: the... Also include ellipsis ( … ) to make a selection tuple of matrix! Self, key, value ): '' '' Copy in values from is capable of to. Various algorithms i do, see, to whet your appetite corresponding to the built-in slice function ndarray object prepared... A list of column vectors that sympy slice matrix up the matrix the same length as the dimension of an array of. To Copy values from 's basic concept of slicing to n dimensions, linear transformations within.
Marcar el enlace permanente.
|
|
# Rate Expression In Third Order
What is the rate expression of a second order reaction having different reactants?
Checkout this to get your solution :))
What is the expression of a second-order reaction with the same and different initial concentrations?
I am going to assume that the actual question here is “What is the integrated rate law for a second-order reaction with the same and different initial conditions?” because the question, as written, has a trivial answer:Same concentrations:rate = k [A][math]^2[/math]Different concentrations:rate = k [A] [B]Now, assuming that these were NOT the answers you were seeking, the integrated rate laws for each condition are:Same concentrations:[math]\dfrac{1}{[A_f]}\,- \,\dfrac{1}{[A_i]} = k\Delta t[/math]Different concentrations:[math]\dfrac{1}{([B_i]\,-\,[A_i])}\,ln\dfrac{[A_i][B_f]}{[B_i][A_f]} = k\Delta t[/math]
The reaction 2A + 5B → products is third order in A and third order in B. What is the rate law for this reacti?
The reaction 2A + 5B → products is third order in A and third order in B. What is the rate law for this reaction?
1. rate = k[A]2[B]5
2. rate = k[A]3[B]3
3. rate = k[A]2/7[B]5/7
4. rate = k[A]5[B]2
5. rate = k[A]6[B]3
What is the integrate rate law of a third order reaction?
The integrated rate law of a nth order reaction .i.e.
rate = -d[A]/dt = k∙[A]ⁿ
is
1/[A]ⁿ⁻¹ = 1/[A]₀ⁿ⁻¹ + (n-1)∙k∙t
([A]₀ denotes initial concentration)
So for a third order reaction, i.e. n=3
1/[A]² = 2∙k∙t + 1/[A]₀²
<=>
[A] = 1/√[ 2∙k∙t + 1/[A]₀²] = [A]₀/√[2∙[A]₀∙k∙t + 1]
Consider the following rate law expression:rate=k[A]^2[B].?
Which of the following is NOT true about the reaction having this expression? and explain.
a)the reaction is first order in B
b)the reaction is overall third order
c)the reaction is second order in A
d)Doubling the concentration of A doubles the rate.
How to derive the half life expression from the integrated rate law of a third order reaction?
-dA/dt = k*A³
dA/A³ = -k*dt
∫dA/A³ = -∫k*dt
-1/(2*A²) + C = -k*t
at t = 0 A = A0
-1/(2*A0²) + C = 0
C = 1/(2*A0²)
-1/(2*A²) + 1/(2*A0²) = -k*t
-1/(2*A²) = -k*t - 1/(2*A0²)
1/A² = 2*k*t +1/A0²
at t = th, A = A0/2;
4/A0² = 2*k*th + 1/A0²
3/A0² = 2*k*th
th = 3/(2*k*A0²)
What is an example of a third order reaction with two reactants that behaves as a first order reaction?
Any reaction that has this rate formula k=A^2*B is third order. Say C=2A+B is the stoichiometry (but the kinetics are not necessarily what we have posited, but let's say they are). It doesn't matter what compounds or elements really are A, B and C for this argument. If initial amount of B is very much greater than initial amount of A, say B = 1000*A, then it is effectively constant over the course of the reaction, i.e., it would change only by 0.1% at complete reaction. So then k' = A'*B where A' is the effectively constant value of A over the reaction. So the reaction appears to be first order in B. This is what is called a pseudo-first order rate equation, but remember it is an approximation only when one reactant in the kinetic equation is in large excess.
What is the derivation of third order reaction and its half life?
t 1/2 is inversely proportional to [A]^(n-1) where n is the order of the reaction. So; half lie time for the third order reaction is proportional to 1/[A]^2.
Third order reaction when 2 reactants are same?
A reaction like 2A + B → P is not necessarily 3rd order. The mechanism might be something like:A + B → CC + A → P(or some other variant)3rd order reactions require 3 molecules being present at the same spot, at the same time. Moreover, they must collide at the right orientation to make the reaction happen, with enough energy to overcome the activation energy. Such reaction are extremely rare.
|
|
# Find the absolute maximum and absolute minimum
• Dec 12th 2008, 08:54 AM
bgwarhawk
Find the absolute maximum and absolute minimum
f(x)= 2x^4 - 16x^2 +3; on 0,2
I got to 8x^3 -32x=0 what do I do now?
absolute maximum=
absolute minimum=
• Dec 12th 2008, 09:11 AM
moolimanj
Use the maximum-minimum principle:
calculate f(x)'
calculate a value c in the interval [0,2] such that f'(0)=c or doesnt exist
list endpoints of interval: 0,c1,c2,c3....,2
express f(x) for each value of c above
The largest is absolute maximum and the smallest is absolute minimum
OR you could just differentiate again OR just draw a graph to check your answer. Have you got mathcad or a similar graphing programme? There are online sites that calculate the graph based on an inputted function (but dont know if I can mention here - just google)
• Dec 12th 2008, 09:15 AM
bgwarhawk
Quote:
Originally Posted by moolimanj
Use the maximum-minimum principle:
calculate f(x)'
calculate a value c in the interval [0,2] such that f'(0)=c or doesnt exist
list endpoints of interval: 0,c1,c2,c3....,2
express f(x) for each value of c above
The largest is absolute maximum and the smallest is absolute minimum
OR you could just differentiate again OR just draw a graph to check your answer. Have you got mathcad or a similar graphing programme? There are online sites that calculate the graph based on an inputted function (but dont know if I can mention here - just google)
What? I just need f'(x)
• Dec 12th 2008, 09:34 AM
chabmgph
Quote:
Originally Posted by bgwarhawk
f(x)= 2x^4 - 16x^2 +3; on 0,2
I got to 8x^3 -32x=0 what do I do now?
absolute maximum=
absolute minimum=
Quote:
Originally Posted by bgwarhawk
What? I just need f'(x)
f'(x)=8x^3 -32x like you had it.
Set f'(x)=0 and solve for x. That will give you the x value(s) where your local max/min occurs.
But since f(x) is on an closed interval (I believe you meant to write [0,2]?), you also need to check the endpoints too.
• Dec 12th 2008, 09:39 AM
bgwarhawk
Quote:
Originally Posted by chabmgph
f'(x)=8x^3 -32x like you had it.
Set f'(x)=0 and solve for x. That will give you the x value(s) where your local max/min occurs.
But since f(x) is on an closed interval (I believe you meant to write [0,2]?), you also need to check the endpoints too.
What do I do with the cube root of 4x?
• Dec 12th 2008, 09:46 AM
chabmgph
Quote:
Originally Posted by bgwarhawk
What do I do with the cube root of 4x?
$8x^3-32x=0$
$8x(x^2-4)=0$
$8x=0$, $x^2-4=0$
...
|
|
考点:任务型阅读
• Read the following passage. Complete the diagram by using the information from the passage.
Write NO MORE THAN THREE WORDS for each answer.
Most scientists are now certain that global warming is taking place. Gases such as carbon dioxide produced by burning of coal, oil, wood, together with industrial pollution, are creating a warm blanket around the earth. This blanket is trapping heat in the atmosphere and so raising the temperature of the earth.
The evidence for global warming can now be seen in the world’s changing climate statistics. In Europe, eight of the last ten years have seen record high temperature. For northern Europe, this has generally been a change for the better. Gardens can now even grow tropical plants in England, though London may never see a “White Christmas” again. On the other hand, the countries around the Mediterranean Sea, and those south of the Sahara desert are receiving even less rain than before. In sub-Saharan Africa the crops are drying out in the fields and people are dying of starvation. In the Americans, the climate is becoming more extreme—the summers are getting hotter and the storms are becoming more violent. In 1999 the southern United States was struck by a series of destructive hurricanes, while the end of 1999 saw the worst floods ever in Venezuela. Meteorologists expect such trends to continue, and indeed to worsen, if global warming cannot be stopped.
In addition to worrying about rising global temperatures and more extreme weather conditions, scientists are closely monitoring sea levels around the world. These are slowly rising, as the northern and southern polar ice-caps start to melt. This will have serious consequences for low-lying countries near the sea, such as the coral islands in the Pacific, and Bangladesh where the River Ganges already floods the delta(三角洲) every year. Already parts of these places are disappearing under the rising tides.
Title: 71._______________.
evidences. R0 j1 N4 j1 J& U g9 @
- f0 B, Y! f: @5 C3 f$b 76.________" _8 i) C. K% 2 O+ _0 J$ Z% X
The Americas) F* M, N4 Q7 b: ]
& e( f7 R6 Z) K8 R5 \
England4 f9 V" Y: @# H) c+ Q0 B( O
9 N5 P* A3 W6 N6 ' L
80.____________) g, G6 O8 K1 E/ Q+ B' h0 A
% Q- D2 f' e* V, d! X' _: V1 A* _
79.___________+ V0 ?* G0 h( - c- h+ X) O
) i" O+ \2 T1 ]( F6 G* G
Rising earth temperature. C# S* [( D4 D/ ^9 a- \8 H3 I0 g' P
; F: C( ]8 j; K* J5 R
77._______________More violent storms78.__________7 [& T/ e5 e/ T8 ?( X0 @
" f/ \( E& Q+ c1 B% ]9 O0 S7 f% ?
Tropical plants growing74.___________________: J: G* K% G9 I2 g' L
1 N- g6 @' f% b- Q+ A
73._______4 L, D- X3 T; R
9 ^* P3 % [7 H2 a& P: @
Gases from burning coal, oil and wood with industrial pollution7 j+ f2 E- _4 C: M$h ) J! M; H8 _; K 72.___________* g0 I" 5 e7 c0 H7 R # V0 Y" i) c8 i9 j9 M1 X+ D+ U/ e • Directions: Read the following passage. Complete the diagram by using the information from the passage. Write NO MORE THAN THREE WORDS for each answer. As we all know, all the governments in the world collect taxes(税), but what are they and what are they used for? Some people may not know about them. There are two kinds of taxes. One of the most important taxes is income-taxes which a person pays according to the amount of his income. Whatever he is, he must pay tax if income is more than a certain amount. This is called a “direct” tax, because it is paid in money directly to the government. Another tax is paid on goods. When they are brought into a country, such a tax is paid as part of the price of these goods if they are later sold in shops. We call it “indirect” tax, because it is paid indirectly through the shopkeepers. People usually complain about having to pay taxes, but they forget that the money is spent on what they need. On one hand, we need policemen and soldiers to protect us from danger. Meanwhile, we also need schools and teachers for our children. On the other hand, we need officials and workers to serve us. Above all, we need money to develop our nation. Taxes, therefore, can’t be avoided. We have no real reason to complain when we are asked to supply money to be spent for the good of ourselves and for our fellow-citizens. Title: 【小题1】 are necessary in our life Sources L( N: Q8 \- F) i& L. N$ ^$U People→Taxes" i4 [7 b+ Y+ a, W% F _【小题2】__of taxes Y7 Y- F# h# ?" S$ V# D2 E! @ Tax-payers+ Z# ]. g. L1 D# U 【小题3】 8 R7 G0 M$A1 f6 ?: T( d- D0 F People whose income is over a certain amount7 M" \4 V" b6 H1 g( H9 R1 [' a Indirect tax2 V! B6 I( b% [ ___【小题4】__* Q9 W' 7 P9 a8 D4 Y) j 【小题5】 - [ S1 P4 h6 _ Taxes→ 【小题6】 9 F- M% f! B. E: 8 d4 j3 @ On safety— 【小题7】 3 ! f$ L, g! _8 g! c On education— 【小题8】 P7 j O, L J9 O( K: Y- M 【小题9】 —Officials and workers( g7 F! G% / & U& [9 I+ h; \# ?% P" h On development— 【小题10】2 J& E& P5 G/ W0 e% Y
• 任务型阅读 (共10小题; 每小题1分, 满分10分)
One of the most well-known directors of our time is Stephen Spielberg. He was born in Cincinnati on 18 December 1946. His father was an electric engineer and his mother was a performing pianist. His sister, Anne Spielberg, became a screenwriter who wrote the stories for many famous films.
Stephen had always wanted to be a director ever since he was a young boy. When he was just 13 years old, he made a 40-minute film. It won a local competition. Three years later, he produced a film called Firelight, which made one hundred dollars’ profit at the cinema in his hometown. Many of the ideas from this film were later used for one of his most famous films called Close Encounters of the Third Kind.
When he was 18 years old, he wanted to go to film school so that he could improve his skills and become an even better director. Unluckily, he was unsuccessful in getting a place at this school so he went to a university in California to study English. Even though he had failed to get into the school he wanted to go to, he didn’t let this stop him following his dream to become a great director.
Stephen Spielberg has directed many films since his first major film in 1976. He now owns many different businesses, most of which are involved in the film industry.
Year% K/ i Z/ [# S' R/ N What happened0 ]- ^5 Z R( H2 c8 G# P0 \1 M 19464 \8 ] g4 Z( K: Q Stephen Spielberg 1 2 in Cincinnati./ B& W8 M9 N4 G" f" @ 19599 G: g& h: d ^ Stephen Spielberg made a 3 film and it 4 a local competition.! # b1 j, O5 W0 N; [& W" I+ F' g 1962- N% b7 L2 L( R# : ?2 j# X" _ Stephen Spielberg produced a film called 5 , from which many 6 were later used for Close Encounters of the Third Kind.1 b4 f* e6 W5 j _ 7 8 V3 ]% d0 ]- i: d( e' ] W. B Though he 8 to get into the film school he wanted to go to, Stephen Spielberg didn’t give up his dream to become a great director.- R6 ?; B1 G N9 d. 1976: a" E- c8 Q [( O! W Stephen Spielberg 9_ his 10 major film., T5 J* V4 V# \/ \! O0 E Y) ^
• It’s known to us all that elephants are the biggest animals on land.
There are two kinds of elephants: African elephants and Indian elephants. The African elephant has a round head and very big ears. It has long teeth. Each of them can be as long as 3.4 meters and as heavy as 103 kilograms. African elephants live in forests in Africa. They eat leaves, roots and fruits. Indian elephants are smaller than African elephants. They are found in forests in India, Malaysia and some other countries in South Asia. They live on grass. They can be trained to do a lot of heavy work and amuse(逗乐)people.
An African elephant lives as long as a man does. But an Indian elephant does not live that long.
Title: 【小题1】_____________——Biggest Animals on Land
【小题2】 _________3 G$I" g8 ?. ]7 ] Differences 3 M, Q: W5 X( 7 d( b- @! G Similarities (相似点)9 _) g) M) b2 D6 @( Y African elephants3 D8 A. C8 c% g eating leaves, 【小题3】________________living longer9 D) \. e7 [5 F7 ] The biggest animals living in 【小题4】_____________ inAfrica or India.' O0 Z. K7 ?6 ; G9 L Indian elephants 9 D E& f! h! M/ G* ^* O9 j living on grassbeing trained to do much 【小题5】________ and amuse people.+ S- F6 T9 d8 Z/ B: [ • Colors and feelings Colors can affect our feelings. Generally, they can be divided into four kinds. They are calm colors, warm colors, energetic colors and strong colors. Calm colors Some colors make us feel calm and peaceful. Blue is one of those colors. Blue can also represent sadness, so you may say “ I’m feeling blue” when you are feeling sad. White is another calm color. It makes you feel calm and peaceful. Warm colors Some colors can give you a happy and satisfied feeling. Colors like orange or yellow belong to these. Orange represent joy. It can bring you success and cheer you up when you’re feeling sad. Yellow is the color of the sun and wisdom, too. Energetic colors When you feel tired or weak, you should wear energetic colors, such as green. Green can give you energy as it is the color of nature and represent new life and growth. Strong colors Anyone who needs physical or mental(精神的) strength should wear red clothes. Red is the color of heat and represent power and strong feelings. Colors and feeling 【小题1】_____________, h; g, N& \& A* N! _ Feelings# \4 ^) a) [ R F2 Z9 V# H0 O Examples6 B E9 ^- ( \6 e' N calm colors/ a$ T6 Y6 h- A+ W calm and peaceful( G2 C, W/ T) U" @' W! M 【小题2】______________1 i# L g; P2 f& E0 U& ^ white5 c* ^; B# d7 J6 i warm colors% U0 W7 c0 Q7 a( P+ J9 D 【小题3】_________________3 ]$V" @7 K; Q1 g orange& e4 [5 W8 D/ B yellow+ U6 e/ O! g( F9 ^1 e% ]9 ? energetic colors; h [( Q7 $ V2 Q2 V: G$W) V energetic! b, U+ c& T; S, ^, c 【小题4】________________. b0 c* H8 \! Y% 6 ?9 O' X strong colors2 h/ H" * G+ ^ 【小题5】________________+ g5 R1 A; ]9 N0 b% c& X red- K% Q3 @* W/ Y5 B5 M% g, d: h0 e • A good relationship with teachers today may help you in the future. You will need teachers’ written recommendations (推荐信) to apply to a college or for a job after high school. Teachers are another group of adults in your life who can look out for you, guide you, and provide you with advice. They are willing to answer questions and help you with your personal problems. We all have our favorite teachers—those who seem truly interested in us and treat us as smart people. You can do lots of things to develop a good relationship with you teachers. Show up for class on time, finishing all homework. Be respectful and ask questions. Show an interest in the subject. Show the teacher that you care. If you’re having problems with the teacher, try to figure out why. If you don’t like the subject being taught, it can affect your relationship with the teacher. If you find a subject hard, talk to your teacher or a parent about extra tutoring. If you find it boring, talk to your teacher about some other ways of learning. What if you just don’t like the teacher?When it comes to working with teachers, personality (个性) can come into play just as it can in any relationship. Learning to work with people you don’t connect with easily is a good skill no matter what your goals are. Before you try to get out of a class to escape a teacher you don’t like, here are a few things you can do to make a difficult relationship work. ●Meet with the teacher and try to communicate what you’re feeling. Tell him or her what’s in your mind. ●Turn to the school counselor (指导老师), who can offer some suggestions for getting out of a difficult relationship. Sometimes a counselor can act as a mediator between you and the teacher. ●If your relationship problems can’t be solved in school, then it’s time to tell your parents. Let them meet with your teacher and try to work them out. Teachers are there for more than just homework and they know about more than just their subject matter. They can help you learn how to function as an adult and a lifelong learner. Undoubtedly, there will be a few teachers along the way who you’ll always remember and who might change your life forever. Theme/ I0 T, Q' ?- j& Z' f* ?7 g+ _. _ Getting along well with your teachers8 f) O2 D, E3 g, B& \ The 【小题1】______ for a good relationship with teachers% e! D. W2 B2 C7 L ●A good relationship with teachers may be 【小题2】 to your future.●You will need teachers’ written recommendations to go to a college or find a job after high school.●Teachers pay attention to what is happening around you, give you guidance and offer 【小题3】 about how to deal with your personal problems.+ S; T$ E( ^2 G6 h 【小题4】 to develop a good relationship with teachers8 i c5 g" $C0 E ● 【小题5】 school on time.●Show 【小题6】 for your teachers.●Ask questions.●Be interested in the subject.●Show your teachers that you care.- W* U; H3 R9 a: S" @' a About common teacher-student【小题7】 4 O" Y8 a5 j# h! J: C! _, h ●If the subject is hard to learn, ask for extra tutoring.●If you are 【小题8】 with the subject, talk to your teacher.●It’s a good skill to learn to work with people you don’t connect with easily.6 ?( C1 B( V( C! @* ^: @+ K0 M Suggestions U6 i: L% b" e& ?/ H7 c 【小题9】 with the teacher.●Ask the school counselor for help.●Tell your parents to help 【小题10】 the problem., X1 K* ^1 j3 D! [ • 阅读下面短文并回答问题,然后将答案写到答题卡相应的位置上(请注意问题后的词数要求)。 First aid means the aid or the help that can be given to an injured person first, that is, before any other help arrives. Nowadays there is usually a telephone not far away and the first things we should do, if a serious accident happens, is _____________Sometimes quick action by us may save someone's life. Shock. People often suffer from shock after receiving an injury ,sometimes even when the injure is a small one. The face turns gray, and the skin becomes damp and cold. They breathe quickly. They should be kept warm. Cover them with a blanket and give them a warm drink. Broken bones. Do not move the patient. Send for an ambulance at once. Bleeding. A little bleeding doesn't harm. It washes dirt from the wound. But if the bleeding continues, try to stop it by placing a clean cloth firmly over the wound until the bleeding stops or helps arrive. Poison. A person who has taken poison should be taken to a hospital at once. With some poisons, sleeping pills, for example, it is a good thing to make the patient throw up by pressing your fingers down his throat. Remember: When an accident happens, telephone for an ambulance at once. Keep the injured person warm and quiet. Give him plenty of air. Do not let other people crowd around him. 【小题1】What's the author's purpose of writing the passage? ______________________________________________________________ 【小题2】Fill in the blank in the first paragraph with proper words or phrases to complete the sentence.( no more than seven words) ______________________________________________________________ 【小题3】 What's the best title for the passage? ______________________________________________________________ 【小题4】What' s the symptom when someone goes into shock? ______________________________________________________________ 【小题5】 Translate the underlined sentence into Chinese. ______________________________________________________________ • In the winter of 1964, the Beatles, a British musical, packed up their electric guitars, drum kits, and rebellious ways and set off for America. Two days later, more than seventy million people watched the group perform four of their hit songs on the Ed Sullivan Show. This was sixty percent of the American television audience. Here the Beatles sing one of those songs, "I Want to Hold Your Hand." The Beatles soon had the top five hit songs on the Billboard singles chart. Millions of fans became infected with Beatlemania. They rushed to stores to buy Beatles albums, wigs, clothes, dolls and lunch boxes. The Beatles recorded more than twenty number one hits in America. A Beatles song was almost always at the top of the charts until the group's next hit replaced it. They played to more than fifty thousand fans at large sports stadiums. And they filmed several movies that made millions of dollars. The Beatles were influenced by American singers including Chuck Berry, Buddy Holly and Little Richard. Yet the group's music sounded completely new and different. The Beatles wrote more than two hundred songs that revolutionized American popular music. In addition, young people saw the Beatles as spokesmen for their generation. They copied the band members' long hair and free-spirited ways. The band became so popular that in 1966 John Lennon said they were more popular than Jesus Christ. Soon other musicians began writing their own music the way John Lennon and Paul McCartney wrote the Beatles songs. Many other British groups followed the Beatles to America. This was known as the "British Invasion." They included the Dave Clark Five, the Kinks and the Rolling Stones. The Rolling Stones called themselves the "World's Greatest Rock and Roll Band." The Stones first performed across America in 1964. This song was the group's first Top 40 hit in the United States. In the spring of 1970, the Beatles released "Let it Be." But their fans were not celebrating. This was the last studio album the Beatles recorded as a group. It tells the story of the band's break up. British【小题1】______ “Beatles”+ b; ! ]$ U& F$N! L Time and Place- R3 I! L7 I. ^2 P0 M+ O$ g Events0 R, 0 M1 \, i, J 1964 ] T- N3 H% ]. f, _8 M Get everything【小题2】_____ and leave for America.; V& _4 G" g+ H4 Q6 b# F After arriving in USA5 M) a5 W; a Q. F, C Over half of American TV audience watched their【小题3】_____ of the most popular songs. And soon, the group had millions of 【小题4】______ in USA.3 J( ?- _; A6 V9 Z8 N! A In America6 g- h( c3 D2 F 1. They【小题5】______ more than 20 number one hits in America;2. They played a lot to many fans; 3. They filmed movies.9 A2 R5 Z' ^1 ^; B" A1 J Z# J 1966. i9 K/ " c. [& Y- D% P/ h Although American singers had【小题6】______ on them, their music was 【小题7】_____ new. 【小题8】_____, the Beatles was【小题9】_____ as models for the young people.# S1 i/ F" U# R% D! N2 O7 Z+ Y 1970 I) Q! a. j- [" A* \6 d6 b The last group album “Let it be” was【小题10】______.) S3 Y" Y# g3 ?% F) U- e5 W- G
Nowadays, studying abroad gains popularity in China. Many rich parents would rather send their children abroad to receive education than let them be educated in China.
As every coin has two sides, studying abroad is not an exception. There are advantages for people to attend school abroad. In the first place, he can use the foreign language in his daily life so that his ability in the second language may be greatly improved, as it is obvious that there is no better chance to improve second-language than living in the country where it is spoken. While studying in a foreign country, he will most likely meet many others from overseas and it is possible to make friends from all over the world. This is not only exciting on the social level, but could lead to important overseas contacts in his career as well. He can get familiar with the latest knowledge in science and make use of the first-rate facilities (设备) available. In this way, there is every chance that he is able to widen his horizon (眼界) and broaden his mind.
Of course, attending schools abroad may bring about a series of problems. The most serious problem is language barrier (障碍). Most of the students who go abroad don’t have enough skills in the language spoken there. As a result, on arriving there, they will find it difficult to understand what the teachers say. Besides, for lack of knowledge of the customs of the local people, they may constantly run into trouble in dealing with various situations.
Therefore, given an opportunity to attend a school abroad, one must consider both sides of the factors carefully before making up his mind.
Title: Studying Abroad9 P9 ^6 C8 i. f2 D' ]5 A* M Phenomenon; j) F- H& O& D6 Y6 N% L0 @ Sending children abroad to receive education is 【小题1】 __________ with many rich parents.0 ?# b# V' H$Q6 ^2 U0 ? Advantages. O. \6 a+ e7 ^! C' C/ W$ j; Z ● Children have the 【小题2】________ chance to improve the second language because they can use it【小题3】___________.● They can make friends with other students from 【小题4】____________.● They can 【小题5】__________ of the latest knowledge in science and have access to the best facilities.+ A* F8 B& E* B 【小题6】___________9 @. @; U4 c0 M" M ● Language barrier is the number one problem. Because students are not 【小题7】___________ at the language spoken there, they will have difficulty in 【小题8】___________ what the teachers say.● It is not easy for them to deal with cross-culture communication 【小题9】________ to lack of knowledge of the customs of the locals.3 [2 f0 c4 Q6 c5 ^* F. j: V Conclusion2 N2 ?+ I\$ E8 i4 _' O Both sides of the factors should be 【小题10】_____________ carefully before one makes a decision.! ^4 T8 i# Z' Q8 H+ N
|
|
# Scraping PubMed query results: follow-up
I recently posted a question looking for feedback on a script I wrote (see: Scraping PubMed query results)
Since then I have re-written it into a class, which I have posted below. How does it look? How can I improve upon it?
class PubMedQuery {
private $query; private$searchParameters;
private $searchURL; private$fetchParameters;
private $fetchURL; private$searchResults;
private $fetchResults; private$matches;
private $matchRegex; private$emailAddresses;
public function __construct($query) {$this->query = $query; } public function setSearchParameters() {$this->searchParameters = array(
'db' => 'pubmed',
'term' => $this->query, 'retmode' => 'xml', 'retstart' => '0', 'retmax' => '1000', 'usehistory' => 'y' ); } public function getSearchParameters() { return$this->searchParameters;
}
public function setFetchParameters() {
$this->fetchParameters = array( 'db' => 'pubmed', 'retmax' => '1000', 'query_key' => (string)$this->searchResults->QueryKey,
'WebEnv' => (string) $this->searchResults->WebEnv ); } public function getFetchParameters() { return$this->fetchParameters;
}
public function setSearchURL() {
$this->baseSearchURL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?';$this->searchURL = $this->baseSearchURL . http_build_query($this->getSearchParameters());
}
public function getSearchURL() {
return $this->searchURL; } public function setFetchURL() {$this->baseFetchURL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?';
$this->fetchURL =$this->baseFetchURL . http_build_query($this->getFetchParameters()); } public function getFetchURL() { return$this->fetchURL;
}
public function setSearchResults() {
$this->setSearchParameters();$this->setSearchURL();
$this->searchResults = simplexml_load_file($this->getSearchURL());
}
public function getSearchResults() {
$this->setFetchParameters();$this->setFetchURL();
return file_get_contents($this->getFetchURL()); } public function setEmailAddresses() {$this->matches = array();
$this->matchRegex = '/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}/'; preg_match_all($this->matchRegex, $this->getSearchResults(),$this->matches);
$this->emailAddresses = array_unique(array_values($this->matches[0]));
}
public function getEmailAddresses() {
$this->setSearchResults();$this->getSearchResults();
$this->setEmailAddresses(); return$this->emailAddresses;
}
}
//Example using search term "psoriasis"
$query = new PubMedQuery('psoriasis'); echo implode('<br />',$query->getEmailAddresses());
The first thing I might do is get rid of the email regex matching. PHP has this awesome functionality called filter_var that will take care of a lot of cool things for you, like validating a string as an email address. This is a better solution because you're less likely to get back false positives where the email is valid, but doesn't match the regex.
Next, I'm not sure I like the search/fetch parameters being set at various places throughout the code. This feels like something that should be done in the constructor; setup all the data you need to complete the responsibility of the class in the constructor. If you ever add a new method or make some changes you always have to keep in the back of your mind "Have I set \$x yet?". Well, do it in __construct() and you'll know you have.
Finally, I noticed you were calling some get* functions but not assigning the return value to any variable. If you don't use the return value you don't need to use the get* function and if you don't use the get* function you don't need it in the class.
Overall I like the API, the method names are fairly self explanatory. I'm not sure that they should all be public as your use case only has one method actually being used from calling code. In addition, I might change the properties from private to protected for extensibility but that is certainly not mandatory and is as much a preference as anything else. I would also prefer to see some kind of documentation, even if it is just the responsibility of the class and your though processes behind why you solved the problem this way.
|
|
# How to remove brackets from a data file
I would like to know how I can transform a file (.dat) that contains
{x1,x2, x3, x4,
x5, x6, x7, x8}
{y1,y2, y3, y4,
y5, y6, y7, y8}
in another file (.dat) that contains
x1 x2 x3 x4 x5 x6 x7 x8
y1 y2 y3 y4 y5 y6 y7 y8
• Does the existing file look exactly the way you show it? That is, does its 1st line have linefeed character after rightmost comma and does the 2nd line begins a single space? – m_goldberg Sep 13 at 18:53
• Can you just do Export[secondFile, Import[firstFile, "Package"], "Table"]? – b3m2a1 Sep 13 at 19:22
Here is one option using text manipulations.
data = Import["test.dat", "Text"]
"{x1,x2, x3, x4, x5, x6, x7,x8} {y1,y2, y3, y4, y5, y6, y7,y8}"
data2 = "{" <> StringReplace[StringReplace[data, WhitespaceCharacter -> ""],
"}{" -> "},{"] <> "}"
"{{x1,x2,x3,x4,x5,x6,x7,x8},{y1,y2,y3,y4,y5,y6,y7,y8}}"
Export["test.txt", ToExpression[data2], "Table"];
The resulting text file looks like this:
|
|
# Math Help - Algebra coin problem
1. ## Algebra coin problem
A collection of 70 coins consisting of dimes, quarters, and half dollars has a value $17.75. There are three times as many quarters as dimes. Find the number of each kind of coin. 2. Originally Posted by Nimmy A collection of 70 coins consisting of dimes, quarters, and half dollars has a value$17.75. There are three times as many quarters as dimes. Find the number of each kind of coin.
Let h, q, and d denote the number of half-dollars, quarters and dimes.
Then what you are told is:
h + q + d = 70,
50*h + 25*q + 10*d = 1775
and:
q = 3*d
Substitute the last of these into the first two which will give you a pair
of simultaneous equations in two variables which you then need to solve.
The attachment shows QuickMath's solution
RonL
|
|
# Understanding MCMC: what would the alternative be?
Learning Bayesian stats for the first time; as an angle towards understanding MCMC I wondered: is it doing something that fundamentally can't be done another way, or is it just doing something far more efficiently than the alternatives?
By way of illustration, suppose we're trying to compute the probability of our parameters given the data $P(x,y,z|D)$ given a model that computes the opposite, $P(D|x,y,z)$. To calculate this directly with Bayes' theorem we need the denominator $P(D)$ as pointed out here. But could we compute that by integration, say as follows:
p_d = 0.
for x in range(xmin,xmax,dx):
for y in range(ymin,ymax,dy):
for z in range(zmin,zmax,dz):
p_d_given_x_y_z = cdf(model(x,y,z),d)
p_d += p_d_given_x_y_z * dx * dy * dz
Would that work (albeit very inefficiently with higher numbers of variables) or is there something else that would cause this approach to fail?
• Integration would work in many cases, but it would take too long (i.e., it is inefficient). MCMC is a way to estimate the posterior efficiently. – Mark White Nov 6 '17 at 15:32
• Not relevant for the question, but I think your are missing the prior over x, y, z in your integral (it appears in the numerator of Bayes' formula) – alberto Nov 6 '17 at 15:44
You are describing a grid approximation to the posterior, and that is a valid approach, allthough not the most popular. There are quite a few cases in which the posterior distribution can be computed analytically. Monte Carlo Markov Chains, or other approximate methods, are methods to obtain samples of the posterior distribution, that sometimes work when the analytical solution cannot be found.
The analytical solutions that can be found are typically cases of "conjugate" families, and you can find more about that by googling, see for example https://en.wikipedia.org/wiki/Conjugate_prior.
As a first example, if your prior on p is uniform on [0, 1], where p is a success parameter in a simple binomial experiment, the posterior is equal to a Beta distribution. Integration, or summation, can be done explicitly in this case.
If you have finitely many parameter choices, or you use a grid approximation as in your example, a simple summation may be all you need. The number of computations can explode quickly however, if you have a couple of variables and want to use a dense grid.
There are several algorithms for sampling from the posterior. Hamiltonian Monte Carlo, specifically the NUTS sampler, is now popular and used in stan and PyMC3, Metropolis Hastings is the classic. Variational Inference is a relative newcomer, not a sampling method actually but a different way of obtaining an approximation. At the moment, none of the methods, including analytical solutions, are the best, they all work well in specific cases.
• Good answer, but your last paragraph seems to imply that variational inference is a sampling method, which it isn't. You might consider correcting that. – Ruben van Bergen Nov 7 '17 at 8:57
Calculating the denominator does not help in understanding the nature of the posterior distribution (or of any distribution). As discussed in a recent question, to know that the density of a d-dimensional vector $\theta$ is $$π(θ|x)∝\exp\{−||θ−x||^2−||θ+x||^4−||θ−2x||^6\},\qquad x,θ∈ℝ^d,$$ does not tell me where are the regions of interest for this posterior distribution.
Monte Carlo methods are techniques that make use of random numbers. The goal is to find samples $x$ that are distributed according $P(x)$ and it is assumed that $P(x)$ is complex. This means that we cannot evaluate it directly. If this is not the case, you can just compute it analytically. As in your example this would be $P(D)$.
What you propose is essentially a grid search through the space of $x$ and $y$. This can be very exhaustive if $x$ and $y$ are high dimensional and infeasible if they are continuous. Another problem is that you have to compute the cdf in each step.
MCMC methods try to solve this by proposing candidate samples $c_i$ and then accepting or rejecting them depending on some measure. This can in theory be faster then going through all possible combinations. so basically you find samples that are drawn from the prior $P(D)$. A theoretical problem here is that this is only the case in the limit number of samples drawn, i.e. after $\infty$ samples. So you don't know when to stop the Markov Chain.
|
|
# 5.1.1: Sources of data
Different sources of information are needed for the navigation of an aircraft in the air.
Certain data come by measuring physical magnitudes of the air surrounding the aircraft, such as the pressure (barometric altimeter) or the velocity of air (pitot tube). Other data are obtained by measuring the accelerations of the aircraft using accelerometers. Also the angular changes (changes in attitude) and changes in the angular velocity can be measured using gyroscopes. The course of the aircraft is calculated through the measure of the direction of the magnetic field of the Earth.
Figure 5.1: Barometric altimeter.
A barometric altimeter is an instrument used to calculate the altitude based on pressure measurements. Figure 5.1 illustrates how a barometric altimeter works and how it looks like. Details on how the altimeter indicator works will be given later on when analyzing the altimeter. Still nowadays, most of the aircraft use the barometric altimeters to determine the altitude of the aircraft. An altimeter cannot, however, be adjusted for variations in air temperature. As already studied in Chapter 2, ISA relates pressure and altitude.
Figure 5.2: Diagram of barometric settings.
Differences in temperature from the ISA model will, therefore, cause errors in the indicated altitude. An aneroid or mercury barometer measures the atmospheric pressure from a static port outside the aircraft and based on a reference pressure. The aneroid altimeter can be calibrated in three manners (QNE, QNH, QFE) to show the pressure directly as an altitude above a reference (101225 [Pa] level, sea level, the airport, respectively). Please, refer to Figure 5.2. Recall Equation (2.3.3.2):
$\dfrac{p}{p_0} = \left (1 - \dfrac{\alpha}{T_0} h \right )^{\tfrac{g}{R\alpha}}; \ \ \ and\ thus$
$\dfrac{p_{ref}}{p_0} = \left (1 - \dfrac{\alpha}{T_0} h_{ref} \right )^{\tfrac{g}{R\alpha}}.$
Isolating $$h$$ and $$h_{ref}$$, respectively, and subtracting, it yields:
$h - h_{ref} [m] = \dfrac{T_0}{\alpha} \left [ \left (\dfrac{p_{ref}}{p_0}\right )^{\tfrac{g}{R\alpha}} - \left (\dfrac{p}{p_0}\right )^{\tfrac{g}{R\alpha}} \right ].$
The reference values can be adjusted, and there exist three main standards:
• QNE setting: the baseline pressure is 101325 Pa. This setting is equivalent to the air pressure at mean sea level (MSL) in the ISA.
• QNH setting: the baseline pressure is the real pressure at sea level (not necessarily 101325 [Pa]). In order to estimate the real pressure at sea level, the pressure is measured at the airfield and then, using equation (2.3.3.3), the real pressure at mean sea level is estimated (notice that now $$p_0 \ne 101325$$). It captures better the deviations from the ISA.
• QFE setting: where $$p_{ref}$$ is the pressure in the airport, so that $$h - h_{ref}$$ reflects the altitude above the airport.
Figure 5.3: Pitot tube.
A pitot tube is an instrument used to measure fluid flow velocity. A basic pitot tube consists of a tube pointing directly into the fluid flow, in which the fluid enters (at aircraft’s airspeed). The fluid is brought to rest (stagnation). This pressure is the stagnation pressure of the fluid, which can be measured by an aneroid. The measured stagnation pressure cannot itself be used to determine the fluid velocity (airspeed in aviation). Using Bernoulli’s equation (see Equation (3.1.3.6)), the velocity of the incoming flow (thus the airspeed of the aircraft, since the pitot tube is attached to the aircraft) can be calculated. Figure 5.3 illustrates how a pitot tube works and how it looks like. Please, refer to Exercise 5.3.1 as an illustration of pitot tube equations. Details on how the airspeed indicator works will be given later on in this chapter.
Figure 5.4: Gyroscope and accelerometeres.
Figure 5.5: Diagram of ST-124 gimbals with accelerometers and gyroscopes (conforming the basic elements of a Inertial Measurement Unit). Author NASA/MSFC / Wikimedia Commons / Public Domain.
A gyroscope is a mechanical (also exist electronic) device based on the conservation of the kinetic momentum, i.e., a spinning cylinder with high inertia rotating at high angular velocity, so that the kinetic momentum is very high and it is not affected by external actions. Thus, the longitudinal axis of the cylinder points always in the same direction. Figure 5.4.a illustrates it. An accelerometer is a device that calculates accelerations based on displacement measurements. It is typically composed by a mass-damper system attached to a spring as illustrated in Figure 5.4.b. When the accelerometer experiences an acceleration, the mass is displaced. The displacement is then measured to give the acceleration (applying basic physics and the Second Newton Law). A typical accelerometer works in a single direction, so that a set of three is needed to cover the three directions of the space. The duple gyroscopes and accelerometer conforms the basis of an Inertial Measurement Unit (IMU), an element used for inertial navigation (to be studied in Chapter 10), i.e., three accelerometers measure the acceleration in the three directions and three gyroscopes measure the angular acceleration in the three axis; with an initial value of position and attitude and via integration, current position, velocity, attitude, and angular velocity can be calculated1. Figure 5.5 illustrates it. See also Exercises 5.3.1-5.3.2 for an insight on IMU usage in the context of Inertial Navigation.
The aircraft can also send electromagnetic waves to the exterior to know, for instance, the altitude with respect to the ground (radio-altimeter), or the presence of clouds in the intended trajectory (meteorologic radar). It can also receive electromagnetic waves from specific aeronautical radio-infrastructures, both for en-route navigation (VOR,2 NDB, etc.), and for approach and landing phases (ILS, MLS, etc). Also, the new systems of satellite navigation (GPS, GLONASS, and the future GALILEO) will be key in the future for more precise and reliable navigation. Aircraft have on-board instruments (the so-called navigation instruments) to receive, process, and present this information to the pilot.
1. Notice that these calculations are complicated, since the values need to be projected in the adequate reference frames, and also the gravity, which is always accounted by the accelerometer in the vertical direction, needs to by considered. This is not covered in this course and will be studied in more advanced courses of navigation.
5.1.1: Sources of data is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Manuel Soler Arnedo via source content that was edited to conform to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.
|
|
# [prove] monotonicity of function
1. Dec 6, 2008
### Дьявол
1. The problem statement, all variables and given/known data
Show that the function is monotonic, and if so find if it increases or decreases monotonically.
f(x)=ln(x-1), E=(1,∞) where E ⊆ Df
2. Relevant equations
a) monotonically increasing if the set E ⊆ Df for arbitrary numbers x1, x2 ∊ E and x1<x2 ⇒ f(x1)<f(x2)
b)monotonically decreasing if the set E ⊆ Df for arbitrary numbers x1, x2 ∊ E and x1<x2 ⇒ f(x1)>f(x2)
3. The attempt at a solution
f(x1)-f(x2)=ln(x1-1)-ln(x2-1)=
=$$ln\frac{x_1-1}{x_2-1}=ln\frac{x_2-1+x_1-x_2}{x_2-1}=ln(1+\frac{x_1-x_2}{x_2-1})$$
But I am stuck in here proving, so I tried:
$$x_1<x_2$$ ; $$x_1-1<x_2-1$$ ; $$\frac{x_1-1}{x_2-1}<\frac{x_2-1}{x_2-1}$$ ; $$\frac{x_1-1}{x_2-1}<1$$ ; $$ln\frac{x_1-1}{x_2-1}<ln(1)$$ ; $$ln\frac{x_1-1}{x_2-1}<0$$
so f(x1)-f(x2)<0 and f(x1)<f(x2) and the function is monotonically increasing. Is this correct? Can I always use this method?
2. Dec 6, 2008
### HallsofIvy
Staff Emeritus
It would be simplest to show that the derivative is always positive or always negative for $x\ge 1$. Assuming that you are not allowed to or cannot take the derivative what you have done is perfectly valid- and very good! A correct proof, of course, would start with $x_1< x_2$, progress to $ln\frac{x_1-1}{x_2-1}< 0$ and then assert that $ln(x_1- 1)< ln(x_2-1)$.
Notice, by the way, that you need $x_1>1$ and $x_2> 1$ in order to assert that $x_1-1> 0$, $x_2- 1> 0$ so $\frac{x_2-1}{x_1-1}> 0$ and $ln\frac{x_2-1}{x_1-1}$ exists.
3. Dec 6, 2008
### Дьявол
Thanks for the post. Yes, I see now that I missed the fact that x1>1 and x2>1 so I could used that fact that x2-1>0 and x1-x2<0 so that out of here:
$$ln(1+\frac{x_1-x_2}{x_2-1})$$
$$-1<\frac{x_1-x_2}{x_2-1}<0$$
$$0<1+\frac{x_1-x_2}{x_2-1}<1$$
and out of here $$ln(1+\frac{x_1-x_2}{x_2-1})<ln(1)$$
$$ln(1+\frac{x_1-x_2}{x_2-1})<0$$
or it would be much simple if I did:
x1-1>0 and x2-1>0
and
$$ln\frac{x_1-1}{x_2-1}$$
so that
$$0<\frac{x_1-1}{x_2-1}<1$$
and out of here $$ln\frac{x_1-1}{x_2-1}<0$$
4. Dec 6, 2008
### Дьявол
And what if I have f(x)=3-x ?
x1<x2
f(x1)-f(x2)=3-x1 - 3-x2=1/3x1 - 1/3x2=
Now let's try with LaTeX
=$$\frac{3^{x_1}-3^{x_2}}{3^{x_1+x_2}}$$
Out of x1<x2
log33x1<log33x2
Can I use this method to prove?
Now 3x1<3x2
But how to prove 3x1 + x2>0 ? Or it doesn't need proving?
Now it turns out that f(x1)-f(x2)<0 and f(x1)<f(x2) so that the function is monotonically increasing.
5. Dec 6, 2008
### mutton
It seems obvious that any power with a positive base is positive (like the multiplication of positive numbers), but you could always write this down.
6. Dec 7, 2008
### Дьявол
x1<x2
$$f(x_1)-f(x_2)=x_1-sin(x_1)-x_2+sin(x_2)=x_1-x_2+sin(x_2)-sin(x_1)$$
I am stuck in here. x1-x2<0 and if п>x>0 then 1>sinx>0.
If 1>sin(x2)>0 ; 1-sin(x1)>sin(x2)-sin(x1)>-sin(x1)
If $$x_2>x_1 ; sin(x_2)>sin(x_1) ; sin(x_2)-sin(x_1)>0$$
or $$sin(x_1)>0 ; -sin(x_1)<0 ; 1-sin(x_1)<1$$ so,
1<sin(x2)-sin(x1)<0 and x1-x2<0
I got plenty of information but I don't know if I am using it correctly.
What should I do now?
|
|
# Equation for magnetic field line of dipole
1. Sep 19, 2011
### erogard
Hi, given the equation for a dipole magnetic field in spherical coordinates:
$\vec{B} = \frac{\mu_0 M}{4 \pi} \frac{1}{r^3} \left[ \hat{r} 2 \cos \theta + \bf{\hat{\theta}} \sin \theta \right]$
I need to show that the equation for a magnetic field line is $r = R \sin^2 \theta$
where R is the radius of the magnetic field at the equator (theta = pi/2)
Not sure where to start. I know that the gradient of B would give me a vector that is perpendicular to a given field line...
I also know that a vector potential for a dipole magnetic field in spherical coordinate is given by
$A_\theta = \frac{\mu_0 M}{4 \pi} \frac{sin\theta}{r^2}$
Last edited: Sep 19, 2011
2. Sep 19, 2011
### clem
The equation for a field line is $$\frac{dr}{d\theta}=B_r/B_\theta$$.
I dont think this gives $$sin^2\theta$$.
3. Sep 21, 2011
### Philip Wood
Clem has omitted an r.
Clem meant: $\frac{B_r}{B_\theta} = \frac{dr}{r d\theta}$.
dr is the radial increment in the line corresponding to a tangential increment r d$\theta$.
The resulting DE is solved by separating variables, and yield logs on each side. You use the condition that r = R when $\theta$ = $\pi$/2 to re-express the arbitrary constant. You do get just what you said.
4. Oct 17, 2012
### JMeck
But why is the equation for the field lines:
$\frac{B_r}{B_\theta} = \frac {dr}{rd\theta}$ ??
I can see how solve this to give the equation:
$r = R sin^2 \theta$
where R is r when θ is ∏/2. Any help would be greatly appreciated.
5. Oct 17, 2012
### Philip Wood
You need to recall what is meant by a field line: a line whose direction at every point along it is the direction of the field at that point. So the ratio of radial to tangential field components must be the same as the ratio of tangential to radial components of the line increment.
6. Oct 17, 2012
### JMeck
Thanks that is great I get it now.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook
|
|
The open source CFD toolbox
Boundary conditions
In the absence of sources and sinks, system behaviour is driven by its boundary conditions. These form a critical aspect of case specification where ill-posed combinations will lead to physically incorrect predictions, and in many cases, solver failure.
OpenFOAM offers a wide range of conditions, grouped according to:
• Constraints : geometrical constraints, e.g. for 2-D, axisymmetric etc.
• General : available to all patch types and fields
• Inlet: inlet conditions
• Outlet: outlet conditions
• Wall: wall conditions
• Coupled: coupled conditions, e.g. cyclic
# Usage
Boundary conditions are assigned in the boundaryField section of the field files within each time directory for each mesh patch. The format follows:
boundaryField
{
<patch 1>
{
type <patch type>;
...
}
<patch 2>
{
type <patch type>;
...
}
...
<patch N>
{
type <patch type>;
...
}
}
Each condition is set in a dictionary given by the name of the underlying mesh patch, according to the type keyword.
# Details
• For 1-sided, e.g. external boundaries, the normal vector points out of the domain
• Non-orthogonality not included
Boundary conditions schematic
Used when solving the general transport equation to provide:
• value at boundary
# Further information
Usage
• Common Combinations
• Many conditions employ a Function1 type to describe a property as a function of another, typically time
Source code:
|
|
Feedback in state constrained optimal control
ESAIM: Control, Optimisation and Calculus of Variations, Tome 7 (2002) , pp. 97-133.
An optimal control problem is studied, in which the state is required to remain in a compact set $S$. A control feedback law is constructed which, for given $\epsilon >0$, produces $\epsilon$-optimal trajectories that satisfy the state constraint universally with respect to all initial conditions in $S$. The construction relies upon a constraint removal technique which utilizes geometric properties of inner approximations of $S$ and a related trajectory tracking result. The control feedback is shown to possess a robustness property with respect to state measurement error.
DOI : https://doi.org/10.1051/cocv:2002005
Classification : 49J24, 49J52, 49N55, 90D25
Mots clés : optimal control, state constraint, near-optimal control feedback, nonsmooth analysis
@article{COCV_2002__7__97_0,
author = {Clarke, Francis H. and Rifford, Ludovic and Stern, R. J.},
title = {Feedback in state constrained optimal control},
journal = {ESAIM: Control, Optimisation and Calculus of Variations},
pages = {97--133},
publisher = {EDP-Sciences},
volume = {7},
year = {2002},
doi = {10.1051/cocv:2002005},
zbl = {1033.49004},
mrnumber = {1925023},
language = {en},
url = {http://www.numdam.org/articles/10.1051/cocv:2002005/}
}
Clarke, Francis H.; Rifford, Ludovic; Stern, R. J. Feedback in state constrained optimal control. ESAIM: Control, Optimisation and Calculus of Variations, Tome 7 (2002) , pp. 97-133. doi : 10.1051/cocv:2002005. http://www.numdam.org/articles/10.1051/cocv:2002005/
[1] F. Ancona and A. Bressan, Patchy vector fields and asymptotic stabilization. ESAIM: COCV 4 (1999) 445-471. | Numdam | MR 1693900 | Zbl 0924.34058
[2] N.N. Barabanova and A.I. Subbotin, On continuous evasion strategies in game theoretic problems on the encounter of motions. Prikl. Mat. Mekh. 34 (1970) 796-803. | MR 312918 | Zbl 0256.90060
[3] N.N. Barabanova and A.I. Subbotin, On classes of strategies in differential games of evasion. Prikl. Mat. Mekh. 35 (1971) 385-392. | MR 354048 | Zbl 0247.90082
[4] M. Bardi and I. Capuzzo-Dolcetta, Optimal Control and Viscosity Solutions of Hamilton-Jacobi-Bellman Equations. Birkhäuser, Boston (1997). | Zbl 0890.49011
[5] L.D. Berkovitz, Optimal feedback controls. SIAM J. Control Optim. 27 (1989) 991-1006. | MR 1009334 | Zbl 0684.49008
[6] P. Cannarsa and H. Frankowska, Some characterizations of optimal trajectories in control theory. SIAM J. Control Optim. 29 (1991) 1322-1347. | MR 1132185 | Zbl 0744.49011
[7] I. Capuzzo-Dolcetta and P.L. Lions, Hamilton-Jacobi equations with state constraints. Trans. Amer. Math. Soc. 318 (1990) 643-683. | Zbl 0702.49019
[8] F.H. Clarke, Optimization and Nonsmooth Analysis. Wiley-Interscience, New York (1983). Republished as Vol. 5 of Classics in Appl. Math. SIAM, Philadelphia (1990). | MR 709590 | Zbl 0696.49002
[9] F.H. Clarke, Methods of Dynamic and Nonsmooth Optimization, Vol. 57 of CBMS-NSF Regional Conference Series in Applied Mathematics. SIAM, Philadelphia (1989). | MR 1085948 | Zbl 0696.49003
[10] F.H. Clarke, Yu.S. Ledyaev, L. Rifford and R.J. Stern, Feedback stabilization and Lyapunov functions. SIAM J. Control Optim. 39 (2000) 25-48. | MR 1780907 | Zbl 0961.93047
[11] F.H. Clarke, Yu.S. Ledyaev, E.D. Sontag and A.I. Subbotin, Asymptotic controllability implies control feedback stabilization. IEEE Trans. Automat. Control 42 (1997) 1394. | MR 1472857 | Zbl 0892.93053
[12] F.H. Clarke, Yu.S. Ledyaev and R.J. Stern, Proximal analysis and control feedback construction. Proc. Steklov Inst. Math. 226 (2000) 1-20. | MR 2066016
[13] F.H. Clarke, Yu.S. Ledyaev, R.J. Stern and P.R. Wolenski, Qualitative properties of trajectories of control systems: A survey. J. Dynam. Control Systems 1 (1995) 1-48. | MR 1319056 | Zbl 0951.49003
[14] F.H. Clarke, Yu.S. Ledyaev and A.I. Subbotin, Universal feedback strategies for differential games of pursuit. SIAM J. Control Optim. 35 (1997) 552-561. | MR 1436638 | Zbl 0872.90128
[15] F.H. Clarke, Yu.S. Ledyaev and A.I. Subbotin, Universal positional control. Proc. Steklov Inst. Math. 224 (1999) 165-186. Preliminary version: Preprint CRM-2386. Univ. de Montréal (1994). | MR 1721361 | Zbl 0965.49022
[16] F.H. Clarke, Yu.S. Ledyaev and R.J. Stern, Complements, approximations, smoothings and invariance properties. J. Convex Anal. 4 (1997) 189-219. | MR 1613455 | Zbl 0905.49010
[17] F.H. Clarke, Yu.S. Ledyaev, R.J. Stern and P.R. Wolenski, Nonsmooth Analysis and Control Theory. Springer-Verlag, New York, Grad. Texts in Math. 178 (1998). | MR 1488695 | Zbl 1047.49500
[18] F.H. Clarke, R.J. Stern and P.R. Wolenski, Proximal smoothness and the lower-${C}^{2}$ property. J. Convex Anal. 2 (1995) 117-145. | MR 1363364 | Zbl 0881.49008
[19] F. Forcellini and F. Rampazzo, On nonconvex differential inclusions whose state is constrained in the closure of an open set. Applications to dynamic programming. Differential and Integral Equations 12 (1999) 471-497. | MR 1697241 | Zbl 1015.34006
[20] H. Frankowska and F. Rampazzo, Filippov's and Filippov-Wazewski's theorems on closed domains. J. Differential Equations 161 (2000) 449-478. | Zbl 0956.34012
[21] G.G. Garnysheva and A.I. Subbotin, Suboptimal universal strategies in a game-theoretic time-optimality problem. Prikl. Mat. Mekh. 59 (1995) 707-713. | MR 1367417 | Zbl 0885.90132
[22] J.-B. Hiriart-Urruty, New concepts in nondifferentiable programming. Bull. Soc. Math. France 60 (1979) 57-85. | Numdam | Zbl 0469.90071
[23] H. Ishii and S. Koike, On $\epsilon$-optimal controls for state constraint problems. Ann. Inst. H. Poincaré Anal. Linéaire 17 (2000) 473-502. | Numdam | MR 1782741 | Zbl 0969.49019
[24] N.N. Krasovskiĭ, Differential games. Approximate and formal models. Mat. Sb. (N.S.) 107 (1978) 541-571. | MR 524205 | Zbl 0439.90114
[25] N.N. Krasovskiĭ, Extremal aiming and extremal displacement in a game-theoretical control. Problems Control Inform. Theory 13 (1984) 287-302. | MR 776020 | Zbl 0625.90104
[26] N.N. Krasovskiĭ, Control of dynamical systems. Nauka, Moscow (1985).
[27] N.N. Krasovskiĭ and A.I. Subbotin, Positional Differential Games. Nauka, Moscow (1974). French translation: Jeux Différentielles. Mir, Moscou (1979). | MR 437107 | Zbl 0298.90067
[28] N.N. Krasovskiĭ and A.I. Subbotin, Game-Theoretical Control Problems. Springer-Verlag, New York (1988). | MR 918771 | Zbl 0649.90101
[29] P. Loewen, Optimal Control via Nonsmooth Analysis. CRM Proc. Lecture Notes Amer. Math. Soc. 2 (1993). | MR 1232864 | Zbl 0874.49002
[30] S. Nobakhtian and R.J. Stern, Universal near-optimal control feedbacks. J. Optim. Theory Appl. 107 (2000) 89-123. | MR 1800931 | Zbl 1027.49030
[31] L. Rifford, Problèmes de Stabilisation en Théorie du Contrôle, Doctoral Thesis. Univ. Claude Bernard Lyon 1 (2000).
[32] L. Rifford, Stabilisation des systèmes globalement asymptotiquement commandables. C. R. Acad. Sci. Paris 330 (2000) 211-216. | MR 1748310 | Zbl 0952.93113
[33] L. Rifford, Existence of Lipschitz and semiconcave control-Lyapunov functions. SIAM J. Control Optim. (to appear). | MR 1814266 | Zbl 0982.93068
[34] R.T. Rockafellar, Clarke’s tangent cones and boundaries of closed sets in ${ℝ}^{n}$. Nonlinear Anal. 3 (1979) 145-154. | Zbl 0443.26010
[35] R.T. Rockafellar, Favorable classes of Lipschitz continuous functions in subgradient optimization, in Nondifferentiable Optimization, edited by E. Nurminski. Permagon Press, New York (1982). | MR 704977
[36] J.D.L. Rowland and R.B. Vinter, Construction of optimal control feedback controls. Systems Control Lett. 16 (1991) 357-357. | MR 1108598 | Zbl 0736.49020
[37] M. Soner, Optimal control problems with state-space constraints I. SIAM J. Control Optim. 24 (1986) 551-561. | Zbl 0597.49023
[38] E.D. Sontag, Mathematical Control Theory, 2nd Ed.. Springer-Verlag, New York, Texts in Appl. Math. 6 (1998). | MR 1640001 | Zbl 0945.93001
[39] E.D. Sontag, Clock and insensitivity to small measurement errors. ESAIM: COCV 4 (1999) 537-557. | Numdam | MR 1746166 | Zbl 0984.93068
[40] A.I. Subbotin, Generalized Solutions of First Order PDE's. Birkhäuser, Boston (1995). | Zbl 0820.35003
[41] N.N. Subbotina, Universal optimal strategies in positional differential games. Differential Equations 19 (1983) 1377-1382. | MR 723984 | Zbl 0543.90104
[42] N.N. Subbotina, The maximum principle and the superdifferential of the value function. Problems Control Inform. Theory 18 (1989) 151-160. | MR 1002906 | Zbl 0684.49009
[43] N.N. Subbotina, On structure of optimal feedbacks to control problems, Preprints of the eleventh IFAC International Workshop, Control Applications of Optimization, edited by V. Zakharov (2000).
[44] R.B. Vinter, Optimal Control. Birkhäuser, Boston (2000). | MR 1756410 | Zbl 0952.49001
|
|
# Where and how did the demon learn to talk and read?
chapter 10-12
##### Answers 1
He learned to talk and read by observing the cottagers in the forest near Ingolstadt where he took refuge.
Frankenstein
|
|
Solving Equations Unknown on Both Sides
# Solving Equations Unknown on Both Sides
GCSE(F), GCSE(H),
Where an unknown appears on both side of an equation, the equation needs to be re-arranged so that all the values of the unknown are on one side of the equation, and the numbers on the other:
Start by identifying on which side of the equation the lowest value of the unknown appears
Remove the lowest unknown value from both sides of the equation
The equation then can be solved as an equation with an unknown on one side
## Examples
1. Solve 6x-7=4x-3.
Answer: x=5
6x-7=4x-3 (first subtract 4x from both sides)
2x-7=-3 (next add 7 to both sides)
2x=4 (finally divide both sides by 2)
x=2
2. Solve 7x+5=4x-4.
Answer: x=-3
7x+5=4x-4 (first subtract 4x from both sides)
3x+5=-4 (next, subtract 5 from both sides)
3x=-9 (finally, divide both sides by 3)
x=-3
Check the answer: 7(-3)+5=4(-3)-4, which is true.
|
|
# Problem 12-22 Simple circuit - Part 2 - C
In the figure, what are
(a) the current through the $47\; \Omega$ resistor?
(b) the direction of the current through the $47\; \Omega$ resistor?
(c) the potential difference $V_A - V_B$? $V_B - V_A$?
(d) the voltage across the $84\; \Omega$ resistor?
(e) the potential at point $C$, if we define the potential at the negative terminal of the battery to be zero?
Accumulated Solution
$I = V/R$
Correct.
Before continuing, calculate the total current.
Continue.
|
|
Products
## Holooly Rewards
We are determined to provide the latest solutions related to all subjects FREE of charge!
Enjoy Limited offers, deals & Discounts by signing up to Holooly Rewards Program
## Holooly Tables
All the data tables that you may search for.
## Holooly Arabia
For Arabic Users, find a teacher/tutor in your City or country in the Middle East.
## Holooly Sources
Find the Source, Textbook, Solution Manual that you are looking for in 1 click.
## Holooly Help Desk
Need Help? We got you covered.
## Q. 5.3
Find the ply-by-ply failure loads for a $[0/\overline{90}]_s$ graphite/epoxy laminate. Assume the thickness of each ply is 5 mm and use properties of unidirectional graphite/epoxy lamina from Table 2.1. The only load applied is a tensile normal load in the x-direction — that is, the direction parallel to the fibers in the 0° ply.
TABLE 2.1
Typical Mechanical Properties of a Unidirectional Lamina (SI System of Units)
Property Symbol Units Glass/ epoxy Boron/ epoxy Graphite/ epoxy Fiber volume fraction $V_f$ 0.45 0.50 0.70 Longitudinal elastic modulus $E_1$ GPa 38.6 204 181 Transverse elastic modulus $E_2$ GPa 8.27 18.50 10.30 Major Poisson’s ratio $\nu_{12}$ 0.26 0.23 0.28 Shear modulus $G_{12}$ GPa 4.14 5.59 7.17 Ultimate longitudinal tensile strength $(\sigma_1^T)_{ult}$ MPa 1062 1260 1500 Ultimate longitudinal compressive strength $(\sigma_1^C)_{ult}$ MPa 610 2500 1500 Ultimate transverse tensile strength $(\sigma_2^T)_{ult}$ MPa 31 61 40 Ultimate transverse compressive strength $(\sigma_2^C)_{ult}$ MPa 118 202 246 Ultimate in-plane shear strength $(\tau_{12})_{ult}$ MPa 72 67 68 Longitudinal coefficient of thermal expansion $\alpha_1$ μm/m/°C 8.6 6.1 0.02 Transverse coefficient of thermal expansion $\alpha_2$ μm/m/°C 22.1 30.3 22.5 Longitudinal coefficient of moisture expansion $\beta_1$ m/m/kg/kg 0.00 0.00 0.00 Transverse coefficient of moisture expansion $\beta_2$ m/m/kg/kg 0.60 0.60 0.60
## Verified Solution
Because the laminate is symmetric and the load applied is a normal load, only the extensional stiffness matrix is required. From Example 4.4, the extensional compliance matrix is
$\left[A^{*}\right]=\left[\begin{array}{ccc} 5.353 \times 10^{-10} & -2.297 \times 10^{-11} & 0 \\ -2.297 \times 10^{-11} & 9.886 \times 10^{-10} & 0 \\ 0 & 0 & 9.298 \times 10^{-9} \end{array}\right] \frac{1}{P a-m},$
which, from Equation (5.1a), gives the midplane strains for symmetric laminates subjected to $N_x = 1 N/m$ as
$\left[\begin{array}{c} \varepsilon_{x}^{0} \\ \varepsilon_{y}^{0} \\ \gamma_{x y}^{0} \end{array}\right]=\left[\begin{array}{c} 5.353 \times 10^{-10} \\ -2.297 \times 10^{-11} \\ 0 \end{array}\right] .$
The midplane curvatures are zero because the laminate is symmetric and no bending and no twisting loads are applied.
The global strains in the top 0° ply at the top surface can be found as follows using Equation (4.16),
$\left[\begin{array}{l} \varepsilon_{x} \\ \varepsilon_{y} \\ \gamma_{x y} \end{array}\right]=\left[\begin{array}{c} 5.353 \times 10^{-10} \\ -2.297 \times 10^{-11} \\ 0 \end{array}\right]+(0.0075)\left[\begin{array}{l} 0 \\ 0 \\ 0 \end{array}\right] \\ \space \\ =\left[\begin{array}{c} 5.353 \times 10^{-10} \\ -2.297 \times 10^{-11} \\ 0 \end{array}\right]$.
Using Equation (2.103), one can find the global stresses at the top surface of the top 0° ply as
$\left[\begin{array}{c} \sigma_{x} \\ \sigma_{y} \\ \tau_{x y} \end{array}\right]_{0^{\circ} \text {,top }}=\left[\begin{array}{ccc} 181.8 & 2.897 & 0 \\ 2.897 & 10.35 & 0 \\ 0 & 0 & 7.17 \end{array}\right]\left(10^{9}\right)\left[\begin{array}{c} 5.353 \times 10^{-10} \\ -2.297 \times 10^{-11} \\ 0 \end{array}\right] \\ \space \\ =\left[\begin{array}{c} 9.726 \times 10^{1} \\ 1.313 \\ 0 \end{array}\right] P a.$
Using the transformation Equation (2.94), the local stresses at the top surface of the top 0° ply are
$\left[\begin{array}{l} \sigma_{1} \\ \sigma_{2} \\ \tau_{12} \end{array}\right]_{0^{\circ}, \text { top }}=\left[\begin{array}{lll} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right]\left[\begin{array}{c} 9.726 \times 10^{1} \\ 1.313 \times 10^{0} \\ 0 \end{array}\right] \\ \space \\ =\left[\begin{array}{c} 9.726 \times 10^{1} \\ 1.313 \\ 0 \end{array}\right] P a.$
All the local stresses and strains in the laminate are summarized in Table 5.1 and Table 5.2.
TABLE 5.1
Local Stresses (Pa) in Example 5.3
Ply no. Position $σ_1$ $σ_2$ $τ_{12}$ 1 (0°) Top 9.726 × $10^1$ 1.313 × $10^0$ 0.0 Middle 9.726 × $10^1$ 1.313 × $10^0$ 0.0 Bottom 9.726 × $10^1$ 1.313 × $10^0$ 0.0 2 (90°) Top –2.626 × $10^0$ 5.472 × $10^0$ 0.0 Middle –2.626 × $10^0$ 5.472 × $10^0$ 0.0 Bottom –2.626 × $10^0$ 5.472 × $10^0$ 0.0 3 (0°) Top 9.726 × $10^1$ 1.313 × $10^0$ 0.0 Middle 9.726 × $10^1$ 1.313 × $10^0$ 0.0 Bottom 9.726 × $10^1$ 1.313 × $10^0$ 0.0
TABLE 5.2
Local Strains in Example 5.3
Ply no. Position $ε_1$ $ε_2$ $τ_{12}$ 1 (0°) Top 5.353 × $10^{-10}$ –2.297 × $10^{-11}$ 0.0 Middle 5.353 × $10^{-10}$ –2.297 × $10^{-11}$ 0.0 Bottom 5.353 × $10^{-10}$ –2.297 × $10^{-11}$ 0.0 2 (90°) Top –2.297 × $10^{-11}$ 5.353 × $10^{-10}$ 0.0 Middle –2.297 × $10^{-11}$ 5.353 × $10^{-10}$ 0.0 Bottom –2.297 × $10^{-11}$ 5.353 × $10^{-10}$ 0.0 3 (0°) Top 5.353 × $10^{-10}$ –2.297 × $10^{-11}$ 0.0 Middle 5.353 × $10^{-10}$ –2.297 × $10^{-11}$ 0.0 Bottom 5.353 × $10^{-10}$ –2.297 × $10^{-11}$ 0.0
The Tsai–Wu failure theory applied to the top surface of the top 0° ply is applied as follows. The local stresses are
$σ_1 = 9.726 × 10^1 Pa \\ \space \\ σ_2 = 1.313 Pa \\ \space \\ τ_{12} = 0$
Using the parameters $H_1, H_2, H_6, H_{11}, H_{22}, H_{66}, and H_{12}$ from Example 2.19, the Tsai–Wu failure theory Equation (2.152) gives the strength ratio as
$(0) (9.726 × 10^1) SR + (2.093 × 10^{–8}) (1.313) SR+ (0 × 0) + (4.4444 × 10^{–19}) (9.726 × 10^1)^2(SR)^2 + (1.0162 × 10^{–16}) (1.313)^2(SR)^2 + (2.1626 × 10^{–16}) (0)^2 + 2(–3.360 × 10^{–18}) (9.726 × 10^1) (1.313)(SR)^2=1 \\ SR = 1.339 × 10^7.$
The maximum strain failure theory can also be applied to the top surface of the top 0° ply as follows. The local strains are
$\left[\begin{array}{l} \varepsilon_{1} \\ \varepsilon_{2} \\ \gamma_{12} \end{array}\right]=\left[\begin{array}{c} 5.353 \times 10^{-10} \\ -2.297 \times 10^{-11} \\ 0.000 \end{array}\right] .$
Then, according to maximum strain failure theory (Equation 2.143), the strength ratio is given by
$SR = \min \{[(1500 × 10^6)/(181 × 10^9)]/(5.353 × 10^{–10}),[(246 × 10^6)/(10.3 × 10^9)]/(2.297 × 10^{–11})\} = 1.548 × 10^7.$
The strength ratios for all the plies in the laminate are summarized in Table 5.3 using the maximum strain and Tsai–Wu failure theories. The symbols in the parentheses in the maximum strain failure theory column denote the mode of failure and are explained at the bottom of Table 2.3.
TABLE 5.3
Strength Ratios in Example 5.3
Ply no. Position Maximum strain Tsai–Wu 1 (0°) Top 1.548 × $10^{7}$ (1T) 1.339 × $10^{7}$ Middle 1.548 × $10^{7}$ (1T) 1.339 × $10^{7}$ Bottom 1.548 × $10^{7}$ (1T) 1.339 × $10^{7}$ 2 (90°) Top 7.254 × $10^{6}$ (2T) 7.277 × $10^{6}$ Middle 7.254 × $10^{6}$ (2T) 7.277 × $10^{6}$ Bottom 7.254 × $10^{6}$ (2T) 7.277 × $10^{6}$ 3 (0°) Top 1.548 × $10^{7}$ (1T) 1.339 × $10^{7}$ Middle 1.548 × $10^{7}$ (1T) 1.339 × $10^{7}$ Bottom 1.548 × $10^{7}$ (1T) 1.339 × $10^{7}$
From Table 5.3 and using the Tsai–Wu theory, the minimum strength ratio is found for the 90° ply. This strength ratio gives the maximum value of the allowable normal load as
$N_{x}=7.277 \times 10^{6} \frac{ N }{ m }$
and the maximum value of the allowable normal stress as
$\frac{N_{x}}{h}=\frac{7.277 \times 10^{6}}{0.015}, \\ \space \\ =0.4851\times10^9 Pa$
where h = thickness of the laminate.
The normal strain in the x-direction at this load is
$\left(\varepsilon_{x}^{0}\right)_{\text {first ply failure }}\left(5.353 \times 10^{-10}\right)\left(7.277 \times 10^{6}\right) \\ \space \\ =3.895\times 10^{-3}$
Now, degrading the 90° ply completely involves assuming zero stiffnesses and strengths of the 90° lamina. Complete degradation of a ply does not allow further failure of that ply. For the undamaged plies, the $[0/\overline{90}]_s$ laminate has two reduced stiffness matrices as
$[Q]=\left[\begin{array}{ccc} 181.8 & 2.897 & 0 \\ 2.897 & 10.35 & 0 \\ 0 & 0 & 7.17 \end{array}\right] G P a$
and, for the damaged ply,
$[Q]=\left[\begin{array}{lll} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{array}\right] G P a.$
Using Equation (4.28a), the extensional stiffness matrix
$A_{i j}=\sum_{k=1}^{3}\left[\bar{Q}_{i j}\right]_{k}\left(h_{k}-h_{k-1}\right) \\ \space \\ [A]=\left[\begin{array}{ccc} 181.8 & 2.897 & 0 \\ 2.897 & 10.35 & 0 \\ 0 & 0 & 7.17 \end{array}\right]\left(10^{9}\right)(0.005) \\ \space \\ +\left[\begin{array}{lll} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{array}\right]\left(10^{9}\right)(0.005) \\ \space \\ +\left[\begin{array}{ccc} 181.8 & 2.897 & 0 \\ 2.897 & 10.35 & 0 \\ 0 & 0 & 7.17 \end{array}\right]\left(10^{9}\right)(0.005) \\ \space \\ [A]=\left[\begin{array}{ccc} 181.8 & 2.897 & 0 \\ 2.897 & 10.35 & 0 \\ 0 & 0 & 7.17 \end{array}\right]\left(10^{7}\right) Pa – m.$
Inverting the new extensional stiffness matrix [A], the new extensional compliance matrix is
$\left[A^{*}\right]=\left[\begin{array}{ccc} 5.525 \times 10^{-10} & -1.547 \times 10^{-10} & 0 \\ -1.547 \times 10^{-10} & 9.709 \times 10^{-9} & 0 \\ 0 & 0 & 1.395 \times 10^{-8} \end{array}\right] \frac{1}{P a-m} ,$
which gives midplane strains subjected to $N_x = 1 N/m$ by Equation (5.1a) as
$\left[\begin{array}{c} \varepsilon_{x}^{0} \\ \varepsilon_{y}^{0} \\ \gamma_{x y} \end{array}\right]=\left[\begin{array}{ccc} 5.525 \times 10^{-10} & -1.547 \times 10^{-10} & 0 \\ -1.547 \times 10^{-10} & 9.709 \times 10^{-9} & 0 \\ 0 & 0 & 1.395 \times 10^{-8} \end{array}\right]\left[\begin{array}{l} 1 \\ 0 \\ 0 \end{array}\right]$
TABLE 5.4
Local Stresses after First Ply Failure in Example 5.3
Ply no. Position $σ_1$ $σ_2$ $τ_{12}$ 1 (0°) Top 1.0000 × $10^{2}$ 0.0 0.0 Middle 1.0000 × $10^{2}$ 0.0 0.0 Bottom 1.0000 × $10^{2}$ 0.0 0.0 2 (90°) Top — — — Middle — — — Bottom — — — 3 (0°) Top 1.0000 × $10^{2}$ 0.0 0.0 Middle 1.0000 × $10^{2}$ 0.0 0.0 Bottom 1.0000 × $10^{2}$ 0.0 0.0
TABLE 5.5
Local Strains after First Ply Failure in Example 5.3
Ply no. Position $ε_1$ $ε_2$ $γ_{12}$ 1 (0°) Top 5.25 × $10^{-10}$ –1.547 × $10^{-10}$ 0.0 Middle 5.525 × $10^{-10}$ –1.547 × $10^{-10}$ 0.0 Bottom 5.525 × $10^{-10}$ –1.547 × $10^{-10}$ 0.0 2 (90°) Top — — — Middle — — — Bottom — — — 3 (0°) Top 5.525 × $10^{-10}$ –1.547 × $10^{-10}$ 0.0 Middle 5.525 × $10^{-10}$ –1.547 × $10^{-10}$ 0.0 Bottom 5.525 × $10^{-10}$ –1.547 × $10^{-10}$ 0.0
$\left[\begin{array}{c} \varepsilon_{x}^{0} \\ \varepsilon_{y}^{0} \\ \gamma_{x y}^{0} \end{array}\right]=\left[\begin{array}{c} 5.525 \times 10^{-10} \\ -1.547 \times 10^{-10} \\ 0 \end{array}\right] .$
These strains are close to those obtained before the ply failure only because the 90° ply takes a small percentage of the load out of the normal load in the x-direction.
The local stresses in each layer are found using earlier techniques given in this example and are shown in Table 5.4. The strength ratios in each layer are also found using methods given in this example and are shown in Table 5.5.
From Table 5.6 and using Tsai–Wu failure theory, the minimum strength ratio is found in both the 0° plies. This strength ratio gives the maximum value of the normal load as
$N_{x}=1.5 \times 10^{7} \frac{N}{m}$
TABLE 5.6
Strength Ratios after First Ply Failure in Example 5.3
Ply no. Position Maximum strain Tsai–Wu 1 (0°) Top 1.5000 × $10^{7}$ (1T) 1.5000 × $10^{7}$ Middle 1.5000 × $10^{7}$ (1T) 1.5000 × $10^{7}$ Bottom 1.5000 × $10^{7}$ (1T) 1.5000 × $10^{7}$ 2 (90°) Top — — Middle — — Bottom — — 3 (0°) Top 1.5000 × $10^{7}$ (1T) 1.5000 × $10^{7}$ Middle 1.5000 × $10^{7}$ (1T) 1.5000 × $10^{7}$ Bottom 1.5000 × $10^{7}$ (1T) 1.5000 × $10^{7}$
and the maximum value of the allowable normal stress as
$\frac{N_{x}}{h}=\frac{1.5 \times 10^{7}}{0.015} \\ \space \\ =1.0\times 10^9 Pa$
where h is the thickness of the laminate.
The normal strain in the x-direction at this load is
$\left(\varepsilon_{x}^{0}\right)_{\text {last ply failure }}=\left(5.525 \times 10^{-10}\right)\left(1.5 \times 10^{7}\right) \\ \space \\ =8.288\times 10^{-3}.$
The preceding load is also the last ply failure (LPF) because none of the layers is left undamaged. Plotting the stress vs. strain curve for the laminate until last ply failure shows that the curve will consist of two linear curves, each ending at each ply failure. The slope of the two lines will be the Young’s modulus in x direction for the undamaged laminate and for the FPF laminate — that is, using Equation (4.35),
$E_{x}=\frac{1}{(0.015)\left(5.353 \times 10^{-10}\right)} \\ \space \\ =124.5 GPa$
until first ply failure, and
$E_{x}=\frac{\left(N_{x} / h\right)_{\text {last ply failure }}-\left(N_{x} / h\right)_{\text {first play failure }}}{\left(\varepsilon_{x}^{o}\right)_{\text {last play failure }}-\left(\varepsilon_{x}^{o}\right)_{\text {first play failure }}} \\ \space \\ =\frac{0.1 \times 10^{10}-0.4851 \times 10^{9}}{8.288 \times 10^{-3}-3.895 \times 10^{-3}} \\ \space \\ = 117.2 GPa$
after first ply failure and until last ply failure (Figure 5.1).
____________________________________
(2.94): $\left[\begin{array}{l} \sigma_{x} \\ \sigma_{y} \\ \tau_{x y} \end{array}\right]=[T]^{-1}\left[\begin{array}{l} \sigma_{1} \\ \sigma_{2} \\ \tau_{12} \end{array}\right]$
(2.103): $\left[\begin{array}{l} \sigma_{x} \\ \sigma_{y} \\ \tau_{x y} \end{array}\right]=\left[\begin{array}{lll} \bar{Q}_{11} & \bar{Q}_{12} & \bar{Q}_{16} \\ \bar{Q}_{12} & \bar{Q}_{22} & \bar{Q}_{26} \\ \bar{Q}_{16} & \bar{Q}_{26} & \bar{Q}_{66} \end{array}\right]\left[\begin{array}{c} \varepsilon_{x} \\ \varepsilon_{y} \\ \gamma_{x y} \end{array}\right],$
(2.143):
$-\left(\varepsilon_{1}^{C}\right)_{u l t}<\varepsilon_{1}<\left(\varepsilon_{1}^{T}\right)_{u l t}, \text { or } \\ \space \\ -\left(\varepsilon_{2}^{C}\right)_{u l t}<\varepsilon_{2}<\left(\varepsilon_{2}^{T}\right)_{u l t}, \text { or } \\ \space \\ -\left(\gamma_{12}\right)_{u l t}<\gamma_{12}<\left(\gamma_{12}\right)_{u l t}$
(2.152): $H_{1} \sigma_{1}+H_{2} \sigma_{2}+H_{6} \tau_{12}+H_{11} \sigma_{1}^{2}+H_{22} \sigma_{2}^{2}+H_{66} \tau_{12}^{2}+2 H_{12} \sigma_{1} \sigma_{2}<1$
(4.16): $\left\{\begin{array}{c} \varepsilon_{x} \\ \varepsilon_{y} \\ \gamma_{x y} \end{array}\right\}=\left\{ \begin{array}{c} \varepsilon_{x}^{0} \\ \varepsilon_{y}^{0} \\ \gamma_{x y}^{0} \end{array}\right\}+z\left\{\begin{array}{c} \kappa_{x} \\ \kappa_{y} \\ \kappa_{x y} \end{array}\right\}$
(4.28a): $A_{i j}=\sum_{k=1}^{n}\left[\left(\bar{Q}_{i j}\right)\right]_{k}\left(h_{k}-h_{k-1}\right), \quad i=1,2,6 ; \quad j=1,2,6,$
(4.35): $E_{x} \equiv \frac{\sigma_{x}}{\varepsilon_{x}^{0}}=\frac{N_{x} / h}{A_{11}^{*} N_{x}}=\frac{1}{h A_{11}^{*}}$
(5.1a): $\left[\begin{array}{c} N_{x} \\ N_{y} \\ N_{x y} \end{array}\right]=\left[\begin{array}{lll} A_{11} & A_{12} & A_{16} \\ A_{12} & A_{22} & A_{26} \\ A_{16} & A_{26} & A_{66} \end{array}\right]\left[\begin{array}{c} \varepsilon_{x}^{0} \\ \varepsilon_{y}^{0} \\ \gamma_{x y}^{0} \end{array}\right]$
TABLE 2.3
Effect of Sign of Shear Stress as a Function of Angle of Lamina
Angle, Degrees Positive $τ_{xy}$ MPa Negative $τ_{xy}$ MPa Shear strength MPa 0 68.00 (S) 68.00 (S) 68.00 15 78.52 (S) 78.52 (S) 78.52 30 136.0 (S) 46.19 (2T) 46.19 45 246.0 (2C) 40.00 (2T) 40.00 60 136.0 (S) 46.19 (2T) 46.19 75 78.52 (S) 78.52 (S) 78.52 90 68.00 (S) 68.00 (S) 68.00
|
|
# Definition:Functor Category
## Definition
Let $C$ and $D$ be categories.
The functor category $\operatorname{Funct}(C, D)$ is the category with:
## Also denoted as
The functor category is also denoted $\operatorname{Fun}(C, D)$, $[C, D]$ or $D^C$, in analogy to the set of all mappings.
|
|
9.2: Chapter 9 HW
1. Which of the following types of electromagnetic radiation has the shortest wavelength?
a) gamma rays
b) microwave
c) visible
2. Which of the following types of electromagnetic radiation has the longest wavelength?
a) ultraviolet
c) x-ray
d) infrared
3. Rank the following types of electromagnetic radiation in order of increasing wavelength:
Infrared, Visible Light, X-rays, Radio Waves, Gamma Rays, Microwaves, Ultraviolet.
The Quantum Mechanical Model
4. Sketch a 3D view (including x, y and z axes) of the 1s, 2s, and 3s orbitals respectively.
5. Sketch three different diagrams, each with a 3D view of the 2p orbitals along a different axis.
6. Sketch as many diagrams as possible, each with a 3D view of the 3d orbitals.
Electron Configurations
7. Write full electron configurations for each of the following elements:
a) Li:
b) N:
c) Cl:
d) Ga:
8. Write full electron configurations for each of the following elements:
a) Ca:
b) Ar:
c) Mn:
d) P:
9. Write full electron configurations for each of the following elements:
a) Xe:
b) Ag:
c) Cs:
d) Hg:
10. Write full orbital diagrams and indicate the number of unpaired electrons for each element.
a) Ne:
b) O:
c) Na:
d) Si:
11. Write full orbital diagrams and indicate the number of unpaired electrons for each element.
a) P:
b) K:
c) He:
d) Al:
12. Write full orbital diagrams and indicate the number of unpaired electrons for each element.
a) F:
b) Be:
c) B:
d) Cl:
13. Write the noble gas electron configuration for the following elements.
a) Nb:
b) Se:
c) Ca:
d) Zn:
14. Write the noble gas electron configuration for the following elements.
a) Ta:
b) Fr:
c) Ag:
d) Al:
15. Write the noble gas electron configuration for the following elements.
a) In:
b) Ba:
c) V:
d) Y:
Valence Electrons
16. Write orbital diagrams for the valence electrons of the following elements and indicate the number of unpaired electrons.
a) Ar:
b) F:
c) As:
d) Zn:
17. Write orbital diagrams for the valence electrons of the following elements and indicate the number of unpaired electrons.
a) Rh:
b) Na:
c) I:
d) Sn:
18. Write orbital diagrams for the valence electrons of the following elements and indicate the number of unpaired electrons.
a) Sc:
b) He:
c) Hf:
d) O:
Electron Configurations and the Period Table
19. Write out the outer electron configuration for the following columns on the periodic table.
a) 1A:
b) 5A:
c) 6A:
20. Write out the outer electron configuration for the following columns on the periodic table.
a) 3A:
b) 7A:
c) 4A:
21. Write out the outer electron configuration for the following columns on the periodic table.
a) 8A:
b) 2A:
22. Write the noble gas electron configuration for the following elements.
a) Au:
b) Ni:
c) S:
d) Sr:
23. Write the noble gas electron configuration for the following elements.
a) Ra:
b) Pd:
c) Br:
d) Po:
24. Write the noble gas electron configuration for the following elements.
a) Ti:
b) Ru:
c) B:
d) Kr:
25. Write the noble gas electron configuration for the following elements.
a) At:
b) Pb:
c) Ba:
d) Ce:
26. Write the noble gas electron configuration for the following elements.
a) Er:
b) Pd:
c) Ge:
d) F:
27. Write the noble gas electron configuration for the following elements.
a) Re:
b) Al:
c) Lr:
d) Os:
28. How many 4d electrons are in an atom of each of the following elements?
a) Y:
b) Ag:
c) Cs:
d) Tc:
29. How many 3s electrons are in an atom of each of the following elements?
a) Mg:
b) K:
c) Na:
d) Li:
30. How many 5p electrons are in an atom of each of the following elements?
a) Te:
b) Xe:
c) Ir:
31. Name an element in the 5th period of the periodic table with:
a) four 5p electrons:
b) two valence electrons:
c) two 5s electrons and three 4d electrons:
d) one 5p electron:
32. Name an element in the 3rd period of the periodic table with:
a) three 3p electrons:
b) one 3s electron:
c) six 3p electrons:
d) three valence electrons:
33. Name an element in the 4th period of the periodic table with:
a) five valence electrons:
b) two 4p electrons:
c) nine 3d orbital:
d) one 4selectron:
34. Identify the element with the following noble gas electron configuration:
a) [Ne] 3s2:
b) [Xe] 6s24f7:
c) [Ar] 4s23d9:
d) [Ar] 4s23d104p1:
35. Identify the element with the following noble gas electron configuration:
a) [Rn] 7s25f13:
b) [He] 2s22p2:
c) [Ar] 4s23d104p6:
d) [Xe] 6s24f145d4:
36. Identify the element with the following noble gas electron configuration:
a) [Ar] 4s1:
b) [Ar] 4s23d104p5:
c) [Kr] 5s24d2:
d) [Ne] 3s23p2:
Periodic Trends
37. Circle the element with the larger atoms in each given pair.
a) Rb or Na
b) F or Te
c) Kr or Ge
d) Pb or H
38. Circle the element with the smaller atoms in each given pair.
a) He or Mg
b) Ba or Se
c) Rn or Cs
d) Ne or Ca
39. Circle the element with more metallic characteristics in each given pair.
a) Y or Cl
b) Zn or K
c) Tc or B
d) H or Cs
40. Arrange the following elements in order of increasing atomic size:
Rb, Cu, Cl, Cs, Ne
41. Arrange the following elements in order of increasing atomic size:
O, Be, Sr, K, Kr
42. Arrange the following elements in order of decreasing metallic characteristics:
Ti, Ne, O, Na, Cs
Cumulative Challenge Problems
43. How many electrons can occupy the following quantum shells?
a) n=1
b) n=2
c) n=3
d) n=4
44. Write full electron configurations for the following ions:
a) Mg2+:
b) Zn2+:
c) O2-:
d) Cl-:
45. Write noble gas electron configurations for the following ions:
a) Mn2+:
b) Al3+:
c) I-:
d) Li+:
46. Based on your answers in problems 2 and 3 above, what conclusion can you draw regarding the difference between transition metal ions and other ions?
47. Come up with five different ions that have the same electron configuration of Argon.
48. Correct and rewrite the following incorrect electron configurations based on how many electrons they have.
a) 1s62p32s6
b) 1s22s22p63s23p64s24p65s25p6
c) 1s12s23s34s45s56s6
d) 1s21p61d102s22p62d103s23p63d104s2 (for this one, provide your answer in the noble gas notation)
|
|
## Access
You are not currently logged in.
Access your personal account or get JSTOR access through your library or other institution:
## If You Use a Screen Reader
This content is available through Read Online (Free) program, which relies on page scans. Since scans are not currently available to screen readers, please contact JSTOR User Support for access. We'll provide a PDF copy for your screen reader.
# Factoring Integers with Elliptic Curves
H. W. Lenstra, Jr.
Annals of Mathematics
Second Series, Vol. 126, No. 3 (Nov., 1987), pp. 649-673
DOI: 10.2307/1971363
Stable URL: http://www.jstor.org/stable/1971363
Page Count: 25
Since scans are not currently available to screen readers, please contact JSTOR User Support for access. We'll provide a PDF copy for your screen reader.
Preview not available
## Abstract
This paper is devoted to the description and analysis of a new algorithm to factor positive integers. It depends on the use of elliptic curves. The new method is obtained from Pollard's (p-1)-method (Proc. Cambridge Philos. Soc. 76 (1974), 521-528) by replacing the multiplicative group by the group of points on a random elliptic curve. It is conjectured that the algorithm determines a non-trivial divisor of a composite number n in expected time at most K(p)(log n)2, where p is the least prime dividing n and K is a function for which log $K(x) = \sqrt{(2 + o (1))log x log log x}$ for x → ∞. In the worst case, when n is the product of two primes of the same order of magnitude, this is $exp((1 + o(1))\sqrt{log n log log n})$ (for n → ∞). There are several other factoring algorithms of which the conjectural expected running time is given by the latter formula. However, these algorithms have a running time that is basically independent of the size of the prime factors of n, whereas the new elliptic curve method is substantially faster for small p.
• [649]
• 650
• 651
• 652
• 653
• 654
• 655
• 656
• 657
• 658
• 659
• 660
• 661
• 662
• 663
• 664
• 665
• 666
• 667
• 668
• 669
• 670
• 671
• 672
• 673
|
|
zbMATH — the first resource for mathematics
The theory of $$\kappa$$-like models of arithmetic. (English) Zbl 0848.03019
A linearly ordered model is $$\kappa$$-like if it is of power $$\kappa$$, and each of its proper initial segments is of cardinality smaller than $$\kappa$$. In the search for the theory of all $$\kappa$$-like models of PA, the author describes axiom schemes true in all $$\kappa$$-like models of PA, and discusses their model-theoretic properties. The schemes are suitable formalizations of: the statement that in a $$\kappa$$-like model there is no one-to-one map from the model to a proper initial segment; various forms of the pigeonhole principle; collection scheme; an indiscernibility schema related to a general theorem of Keisler on $$\kappa$$-like models for singular strong limits $$\kappa$$. The concept of tree indiscernibility related to the work of Paris and Mills on cardinalities of initial segments of models of PA is also discussed. The paper is intended to be read in conjunction with another paper of the author’s [“Constructing $$\kappa$$-like models of arithmetic”, J. Lond. Math. Soc. (to appear)].
MSC:
03C62 Models of arithmetic and set theory 03F30 First-order arithmetic and fragments
Full Text:
References:
[1] Gaifman, H., “A note on models and submodels of arithmetic,” pp. 128–44 in Proceedings of the Conference on Mathematical Logic, London 1970 , Lecture Notes in Mathematics, Springer-Verlag, Berlin, 1972. · Zbl 0255.02058 [2] Kaye, R., “Model-theoretic properties characterizing Peano arithmetic,” The Journal of Symbolic Logic , vol. 56 (1991), pp. 949–963. JSTOR: · Zbl 0746.03032 [3] Kaye, R., Models of Peano Arithmetic , Vol. 15 of Oxford Logic Guides , Oxford University Press, Oxford, 1991. · Zbl 0744.03037 [4] Kaye, R., “On cofinal extensions of models of fragments of arithmetic,” Notre Dame Journal of Formal Logic , vol. 32 (1991), pp. 399–408. · Zbl 0746.03033 [5] Kaye, R., “Constructing $$\kappa$$-like models of arithmetic,” forthcoming in Journal of the London Mathematical Society . · Zbl 0865.03056 [6] Keisler, H. J., “Models with orderings,” pp. 35–62 in Logic, Methodology and Philosophy of Science III , edited by B. van Rootselaar and J. F. Staal, North-Holland, Amsterdam, 1968. · Zbl 0191.29503 [7] Kirby, L. A. S., and J. B. Paris, “Initial segments of models of Peano’s axioms,” pp. 211–226 in Set Theory and Hierarchy theory V, Bierutowice, Poland, 1976 , Vol. 619 of Lecture Notes in Mathematics , edited by A. H. Lachlan et al., Springer-Verlag, Berlin, 1977. · Zbl 0364.02032 [8] Lessan, H., Models of Arithmetic , Ph.D. thesis, University of Manchester, 1978. [9] Paris, J. B., and L. A. S. Kirby, “$$\Sigma_n$$ collection schemas in arithmetic,” pp. 199–209 in Logic Colloquium ’77 , edited by A. J. Macintyre et al., North-Holland, Amsterdam, 1978. · Zbl 0442.03042 [10] Paris, J. B., and G. Mills, “Closure properties of countable non-standard integers,” Fundamenta Mathematicæ , vol. 103 (1979), pp. 205–215. · Zbl 0421.03051
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.
|
|
# [OS X TeX] \jobname+3
Chris Goedde cgg.lists at gmail.com
Tue Sep 13 21:48:25 CEST 2011
On Sep 13, 2011, at 2:14 PM, Alain Schremmer wrote:
> Not quite strictly LaTeX.
>
>
> I use a lot ]jobname in references such as
>
> ../QuestionsBase/\jobname/12
>
> With a file named 4.tex this gives
>
> ../QuestionsBase/4/12
>
> Is there a way to use something along the lines of
>
> ../QuestionsBase/\jobname+3/12
>
> so as to get, with a file named 4.tex,
>
> ../QuestionsBase/7/12
The sequence
\newcounter{filenum}
\setcounter{filenum}{\jobname}
|
|
# Group of particles in a magnetic field
1. Jun 24, 2017
### fishturtle1
1. The problem statement, all variables and given/known data
A group of particles is traveling in a magnetic field of unknown magnitude and direction. You observe that a proton moving at 1.50 km/s in the +x-direction experiences a force of 2.25 x $10^{-16}$N in the +y-direction, and an electron moving at 4.75 km/s in the -z-direction experiences a force of 8.50 x $10^{-16}$N in the +y-direction. a) What are the magnitude and direction of the magnetic field?
2. Relevant equations
Right hand rule
F = |q|vB
$\vec F = qv$x$\vec B$
3. The attempt at a solution
info for proton:
$m_1 = 1.6727 * 10^{-27} kg$
$q_1 = +1.602 * 10^{-19} C$
$\vec v_1 = 1500 m/s$ in the +x direction.
$\vec F_1 = 2.25 * 10^{-16} N$ in the +y direction.
info for the electron:
$m_2 = 9.110 * 10^{-31} kg$
$q_2 = -1.602*10^{-19} C$
$\vec v_2 = 4750 m/s$ in the -z direction
$\vec F_2 = 8.50 * 10^{-16}$ in the +y direction
,i'm pretty sure I solved for B correctly incase you want to skip this part..
$\vec B = <b_1, b_2, b_3>$
then i do cross product to solve for the B components.
first equation, for proton:
$<0, 2.25 * 10^{-16}, 0> = q<1500, 0, 0>$x$<b_1, b_2, b_3>$
second equation, for electron:
$<0,8.50*10^{-16}, 0> = -q<0, 0, -4750>$x$<b_1, b_2, b_3>$
where $q = +1.602*10^{-19}$
first equation simplifies to this:
$q<1500, 0, 0>$x$<b_1, b_2, b_3>$
$= q<0, -1500b_3, 1500b_2>$
$= <0, -1500b_3q, 1500b_2q$
second equation simplifies to this:
$-q<0, 0, -4750>$x$<b_1, b_2, b_3>$
$= -q<4750b_2, -4750b_1, 0>$
$= <-4750b_2q, 4750b_1q, 0>$
so now i have 2 equations:
$<0, 2.25 * 10^{-16}, 0> = <0, -1500b_3q, 1500b_2q$
$<0,8.50*10^{-16}, 0> = <-4750b_2q, 4750b_1q, 0>$
$b_3 = \frac {2.25*10^{-16}} {-1500q} = -.936$
$b_2 = 0$
$b_1 = \frac {8.50*10^{-16}} { 4750q} = 1.117$
$B = \sqrt {(-.936)^2 + (1.117)^2} = 1.46T$
now when i try to do the right hand rule.. i get confused
what i know is velocity direction is the thumb, force direction is the palm, and magnetic field direction are the fingers.
but there are 2 velocities and 2 forces... so i try to do it for both of them..
for the proton my thumb points toward me, my palm faces to my right, and so my fingers point toward the floor. So the magnetic field is South.
for the electron my thumb points toward the floor, my palm faces to my right, and so my fingers point away from me. So the magnetic field is in the -x direction.
How can I find the direction?
2. Jun 24, 2017
### gau55
First off, the two sets of forces and velocities must not contradict each other, this is a good way to ensure your answer is correct. You are to check each of them separately. What you said about the right hand rule is correct, and so is your calculation so let's go over the two particles:
(Important to note that the cross product is additive, so each of the two cross products can be broken down into a sum or cross products between the unit vectors. As you've calculated the B field has a positive x component and a negative z component, this already tells you the direction: somewhere between the x and z axises in that xz plane, the angle itl be from the x axis will be arctan(b3/b1).)
To check this field actually exerts the forces given we can use the right hand rule:
proton: Velocity is in the x direction and so is your thumb. now we look at the 2 components of the B-field:
b1: the x component is parallel to the velocity and therefore has no effect, cross product between two parellel vectors always gives 0.
b3: thumb with the x axis and fingers at negative z gives positive y direction for your palm, as given in the question
electron: velocity is in the negative z direction and so is your thumb. examine both components of the vector:
b1: thumb to negative x and fingers (b1=B component in the x direction that you found) to the x direction leaves your palm facing the negative y direction. recall the electron charge is negative so we flip the direction (multiply by -1). we get the positive y direction again for the force, as given in the question.
b3: this component is parallel to the velocity and therefore has no effect.
make sure you're using a right handed cartesian coordinate system and that you are in fact using the right hand ! (i made that mistake in an exam once..)
Another way to see it: the cross product of two vectors ⃗v = ⟨v1, v2, v3⟩ and w⃗ = ⟨w1, w2, w3⟩ in space is
defined as the vector:
⃗v×w⃗ =⟨v2w3 −v3w2,v3w1 −v1w3,v1w2 −v2w1⟩.
3. Jun 25, 2017
### fishturtle1
Ok.. I followed your right hand rule steps to find the direction, thank you
|
|
# Pacemaker Term Paper
Nowadays, the composite materials become an interesting material in many applications due to its lightweight; such as computation processes, military; and human health [1-3].The metals are the most materials used in the shielding applications thanks to its high conductivity, but metals have few drawbacks such as prone to corrosion, are mainly by reflections, and heavyweights especially in the application where the mass should be low as low possible [4-10].
Nowadays, the composite materials become an interesting material in many applications due to its lightweight; such as computation processes, military; and human health [1-3].The metals are the most materials used in the shielding applications thanks to its high conductivity, but metals have few drawbacks such as prone to corrosion, are mainly by reflections, and heavyweights especially in the application where the mass should be low as low possible [4-10].
Tags: Pay Someone To Do EssayRiver Nile Facts For HomeworkSynopsis For DissertationEdit My Term PaperThesis On ObamacareProblems For Kids To SolveModern Critical EssaysMeaning Of Literature Review
HFSS simulation (Version 13.0) was used to simulate the scattering parameters of the proposed multilayer composite in the frequency range of 1 to10 GHz.The arrangement of conducting composite layer and Si layer are by alternating in the proposed multilayered structure.We suppose that our multi-layer structure contains a three-layered conductive composite of Titanium fibre (Ti F) separated by a two-dielectric layer of silicon (Si) with 1 mm thick, to see how the multi-layered work against the electromagnetic interference (EMI).Moreover, the SE depends on the type of source: plane wave, near electric field (E), or near magnetic field (H). The proposed multilayer structure (Ti F/Si-Si) The general theoretical shielding effectiveness model of multi-layered materials in the far and near field regime vastly obtained in [12-14].From the composite structure, we have proposed a new multi-layer structure with three layers (1, 3 and 5) display the same characteristic 60 fibres (Ti F) with conductivity σ=1.82*10 S/m, at 0.035 mm radius dispersed in a dielectric layer (Si) a ɛ=11.9 with 0.8 mm thick.In this paper, a new multilayer composite was prepared and built from alternating layers, the composite is reinforced by Titanium fibres and the dielectric layers made from the Silicon material, the dielectric layers are sandwiched between composites with Ti fibres symmetrically.Ti is the most widely used metal for pacemakers due to its high biocompatibility with the human body.The effect of temperature on the electrical conductivity of Ti fibre, silicon matrix, and parameters of the electrical responses of the whole proposed composite sample are presented in Figure 3 and Table 1.3.1 The effect of temperature on EMI shielding properties Titanium (Ti) have better properties such as high conductivity, low cost, and light weight due to their enhanced contribute the better properties physical on a very large potential for many biomedical, electrical, structural, and electronic applications.Various researchers [10, 15] appear that the fiber volume fraction is among the fundamental parameters in the determination of mechanical properties.Therefore, we want to determine its accurate estimate of fiber volume fraction is obtained according to ASTM D2584 as [15-16]: $=\left[ \times /\left( \times \times \right) \right]$ (11) where Figure 2.
• ###### The Micra Leadless Transcatheter Pacemaker. Implantation.
Implantation and Mid-term Follow-up Results in a Single Center. Currently, studies on the leadless pacemaker Micra have mostly been limited to. for decision making-a position paper of the European Heart Rhythm Association endorsed.…
• ###### Use of leadless pacemakers in Europe - European Society of.
Innovation, Department of Cardiology and Institute for surgical Research, Oslo University. Leadless pacemakers • Standards of care • European Heart Rhythm Association. This document is supported by Medtronic in the form of an educa-.…
• ###### A model-based system for pacemaker reprogramming
The process of reprogramming a cardiac pacemaker can be described in terms similar. what has been achieved by the research discussed in this paper, and.…
• ###### New Pacemaker Technologies DAIC
All U. S. pacemaker vendors now offer MRI-safe device technologies. trend shows long-term maximum, minimum and average heart rates.…
• ###### Pacemaker/ICD Patients To Anticoagulate or Not To.
The long-term residence of a permanent lead in the venous system may also act a continuing nidus for. Download to read the full conference paper text.…
• ###### New Research Paper Complications and Health Care Costs.
Long-term pacemaker complications requiring transvenous lead extraction commonly include lead conductor fractures, abnormal lead sensing or pacing values.…
• ###### Symbiotic cardiac pacemaker Nature Communications
Here the authors demonstrate cardiac pacing and correction of sinus arrhythmia with a symbiotic cardiac pacemaker, which is…
• ###### Security of the Latest Generation Implantable Cardiac.
In this paper, we. several practical short- and long-term countermeasures to mitigate or prevent. Implantable Medical Devices IMDs such as pacemakers.…
|
|
# How Many 3-digit Even Number Can Be Made Using the Digits 1, 2, 3, 4, 5, 6, 7, If No Digits is Repeated? - Mathematics
How many 3-digit even number can be made using the digits 1, 2, 3, 4, 5, 6, 7, if no digits is repeated?
#### Solution
In order to find the number of even digits, we fix the unit's digit as an even digit.
Fixing the unit's digit as 2:
Number of arrangements possible = 6P2 = 6xx5=30
Similarly, fixing the unit's digit as 4:
Number of arrangements possible = 6P2 = 6xx5=30
Fixing the unit's digit as 6:
Number of arrangements possible = 6P2 =6xx5=30
∴ Number of 3-digit even numbers that can be formed = 30 + 30 + 30 = 90
Concept: Factorial N (N!) Permutations and Combinations
Is there an error in this question or solution?
#### APPEARS IN
RD Sharma Class 11 Mathematics Textbook
Chapter 16 Permutations
Exercise 16.3 | Q 30 | Page 29
|
|
# Is there a B field in a charging spherical capacitor?
• I
Suppose a spherical capacitor is being charged. In this case the E field between the plates is growing with time which implies a displacement current which in turn implies a B field. How would one find this B field if it does exists? I'm guessing the B field is zero because of symmetry. I have searched the web but cannot find a reference - can anyone point me to a reference?
Homework Helper
Gold Member
2020 Award
For the case of a parallel plate capacitor, the magnetic field outside of the parallel plates is actually the same as the magnetic field from the wires (assumed long and infinite) that are carrying the current ## I ## that is supplying the current to the capacitor. ## \\ ## I think in the solution to this problem you need to assume some kind of input current to feed the center capacitor. If you assume a spherically symmetric input current, I think this input current might precisely cancel the ## \epsilon_o \frac{d \vec{E}}{dt} ##. The alternative is to have straight wires supplying the current. This will disrupt the spherical symmetry of the problem, and I believe the result will be a non-zero ## \vec{B} ## . It will simply have azimuthal symmetry. ## \\ ## To elaborate on the above for the parallel plate capacitor: ## E=\frac{\sigma}{\epsilon_o} =\frac{Q}{\epsilon_o A} ##. ## \\ ## Ampere's law with just the displacement current term (for a loop outside the capacitor whose plane passes between the capacitor plates) gives: ## \oint \vec{B} \cdot dl=\mu_o \epsilon_o \int \dot{E} \, dA=\mu_o \epsilon_o \dot{E}A ##. ## \\ ## This gives ## \oint \vec{B} \cdot dl=\mu_o \epsilon_o \frac{\dot{Q}}{\epsilon_o A} A=\mu_o \dot{Q}=\mu_o I ##. ## \\ ## We see the ## \mu_o \epsilon_o \dot{E} ## term is exactly what is needed (with displacement current ## I_D=\epsilon_o \dot{E} ##) for Ampere's law to work with the plane passing between the capacitor plates, because the magnetic field ## \vec{B} ## from the wires will be continuous. ## \\ ## For the spherical case, see the 2nd paragragh above.
Last edited:
scoomer and Dale
Thank you Charles Link for the suggestion. I will give it a try.
|
|
# Math Help - I need some examples
1. ## I need some examples
Is there a function which is defined on $\mathbb{R}$ but which is NOT continuous on ANY point of $\mathbb{R}$?
What about a function which is defined on $\mathbb{R}$ and is continuous at exactly TWO points of $\mathbb{R}$?
2. Originally Posted by binkypoo
Is there a function which is defined on $\mathbb{R}$ but which is NOT continuous on ANY point of $\mathbb{R}$?
What about a function which is defined on $\mathbb{R}$ and is continuous at exactly TWO points of $\mathbb{R}$?
$f(x)=\left\{\begin{array}{lr}1:&x\in\mathbb{Q}\\0: &x\notin\mathbb{Q}\end{array}\right\}$
$g(x)=\left\{\begin{array}{lr}x:&x\in\mathbb{Q}\cap (-\infty,1]\\x-2:&x\in\mathbb{Q}\cap(1,\infty)\\0:&x\notin\mathbb {Q}\end{array}\right\}$
$f(x)$ is continuous nowhere, and $g(x)$ is continuous only at $x=0$ and $x=2$.
3. what about a function f defined on an interval [a,b] which is continuous at 2 points of [a,b]?
4. Use the exact same function; just restrict the domain.
5. $g(x)=\left\{\begin{array}{lr}x:&x\in\mathbb{Q}\cap (-\infty,1]\\x-b:&x\in\mathbb{Q}\cap(1,\infty)\\a:&x\notin\mathbb {Q}\end{array}\right\}
$
would this work>?
6. It needs to be defined on $[a,b]$; that function there is still defined on $(-\infty,\infty)$.
7. $g(x)=\left\{\begin{array}{lr}x:&x\in\mathbb{Q}\cap[a,a+\delta]\\x-b:&x\in\mathbb{Q}\cap[a+\delta,b]\\a:&x\notin\mathbb{Q}\end{array}\right\}
$
I'm shooting in the dark here, not too sure
8. Originally Posted by binkypoo
$g(x)=\left\{\begin{array}{lr}x:&x\in\mathbb{Q}\cap[a,a+\delta]\\x-b:&x\in\mathbb{Q}\cap[a+\delta,b]\\a:&x\notin\mathbb{Q}\end{array}\right\}
$
I'm shooting in the dark here, not too sure
Take any three constants $c,d,e\in[a,b]$ such that $a. Define a function:
$g(x)=\left\{\begin{array}{lr}x-c:&x\in\mathbb{Q}\cap[a,d]\\x-e:&x\in\mathbb{Q}\cap(d,b]\\0:&x\notin\mathbb{Q}\end{array}\right\}$
$g$ will be continuous at $x=c$ and $x=e$.
|
|
• Y Markandeya
Articles written in Bulletin of Materials Science
• Characterization and thermal expansion of Sr2Fe𝑥 Mo2−𝑥O6 double perovskites
Double perovskite oxides Sr2Fe𝑥Mo2−𝑥O6 (𝑥 = 0.8, 1.0, 1.2, 1.3 and 1.4) (SFMO) of different compositions were prepared by sol–gel growth followed by annealing under reducing atmosphere conditions of H2/Ar flow. X-ray powder diffraction studies revealed that the crystal structure of the samples changes from tetragonal to cubic at around 𝑥 = 1.2. Lattice parameters and unit cell volume of these samples found to decrease with the increase in Fe content. The characteristics absorption bands observed in the range 400–1000 cm−1 of Fourier transform infrared spectra indicate the presence of FeO6 and MoO6 octahedra and confirm the formation of double perovskite phase. The value of g ∼ 2.00 obtained from electron spin resonance studies indicates that Fe is in 3+ ionic state in the SFMO samples. Dilatometric studies of these samples reveal that the average value of coefficient of thermal expansion ($\overline{\alpha}$) increases with the increase in temperature or Fe content in SFMO samples. The low value of coefficient of thermal expansion 1.31 × 10−6°C−1 obtained for Sr2Fe0.8Mo1.2O6 in the present study in the temperature range of 40–100°C makes it useful as anode material in fuel cells. The coefficient of thermal expansion ($\overline{\alpha}$) and the unit cell volume (𝑉) of SFMO samples vary inversely with composition in agreement with Grüneisen relation.
• # Bulletin of Materials Science
Volume 43, 2020
All articles
Continuous Article Publishing mode
• # Editorial Note on Continuous Article Publication
Posted on July 25, 2019
|
|
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I’ve been asked on a few occasions what is the deal with R user-written functions. First of all, how does the syntax work? And second of all, why would you ever want to do this? In Stata, we don’t write functions; we execute built-in commands like browse or gen or logit. You can write an .ado file to make a new command but the language for ado files is different than regular Stata language. Most people who use Stata do not ever write these kinds of files (I definitely never have). In R, there are built-in functions like summary() or glm() or median(), but you can also write your own functions. You just use the same language you always use in R, in the same file as the rest of your code if you like. You can write a quick, one-line function or long elaborate functions. I use functions all the time to make my code cleaner and less repetitive. In this post I’ll go over the basics of how to write functions. In the next post, I’ll explain what kinds of functions I have used commonly in public health research that have improved my data cleaning and analyses.
## Basic syntax of a function
A function needs to have a name, probably at least one argument (although it doesn’t have to), and a body of code that does something. At the end it usually should (although doesn’t have to) return an object out of the function. The important idea behind functions is that objects that are created within the function are local to the environment of the function – they don’t exist outside of the function. But you can “return” the value of the object from the function, meaning pass the value of it into the global environment. I’ll go over this in more detail. Functions need to have curly braces around the statements, like so:
name.of.function <- function(argument1, argument2) {
statements
return(something)
}
The argument can be any type of object (like a scalar, a matrix, a dataframe, a vector, a logical, etc), and it's not necessary to define what it is in any way. As a very simple example, we can write a function that squares an incoming argument. The function below takes the argument x and multiplies it by itself. It saves this value into the object called square, and then it returns the value of the object square.
### >>>Writing and calling a function
square.it <- function(x) {
square <- x * x
return(square)
}
I can now call the function by passing in a scalar or a vector or matrix as its argument, because all of those objects will square nicely. But it won't work if I input a character as its argument because although it will pass “hi” into the function, R can't multiply “hi”.
# square a number
square.it(5)
## [1] 25
# square a vector
square.it(c(1, 4, 2))
## [1] 1 16 4
# square a character (not going to happen)
square.it("hi")
## Error: non-numeric argument to binary operator
I can also pass in an object that I already have saved. For example, here I have a matrix called matrix1, so I pass that into the square.it() function. R takes this matrix1 into the function as x. That is, in the local function environment it is now called x, where it is squared, and returned.
matrix1 <- cbind(c(3, 10), c(4, 5))
square.it(matrix1)
## [,1] [,2]
## [1,] 9 16
## [2,] 100 25
### >>>Local vs global environment
Now, it's not necessarily the case that you must use return() at the end of your function. The reason you return an object is if you've saved the value of your statements into an object inside the function - in this case, the objects in the function are in a local environment and won't appear in your global environment. See how it works in the following two examples:
fun1 <- function(x) {
3 * x - 1
}
fun1(5)
## [1] 14
fun2 <- function(x) {
y <- 3 * x - 1
}
fun2(5)
In the first function, I just evaluate the statement 3*x-1 without saving it anywhere inside the function. So when I run fun1(5), the result comes popping out of the function. However, when I call fun2(5), nothing happens. That's because the object y that I saved my result into doesn't exist outside the function and I haven't used return(y) to pass the value of y outside the function. When I try to print y, it doesn't exist because it was created in the local environment of the function.
print(y)
I can return the value of y using the return(y) at the end of the function fun2, but I can't return the object itself; it's stuck inside the function.
## Getting more complex
Obviously writing a whole function to square something when you could just use the ^ operator is silly. But you can do much more complicated things in functions, once you get the hang of them.
### >>>Calling other functions and passing multiple arguments
First, you can pass multiple arguments into a function and you can call other functions within your function. Here's an example. I'm passing in 3 arguments which I want to be a matrix, a vector, and a scalar. In the function body, I first call my previous function square.it() and use it to square the scalar. Then I multiply the matrix by the vector. Then I multiply those two results together and return the final object.
my.fun <- function(X.matrix, y.vec, z.scalar) {
# use my previous function square.it() to square the scalar and save result
sq.scalar <- square.it(z.scalar)
# multiply the matrix by the vector using %*% operator
mult <- X.matrix %*% y.vec
# multiply the two resulting objects together to get a final object
final <- mult * sq.scalar
# return the result
return(final)
}
When you have multiple arguments in a function that you call, R will just evaluate them in order of how you've written the function (the first argument will correspond to X.matrix, the second y.vec, and so on), but for clarity I would name the arguments in the function call. In this example below, I already have two saved objects, my.mat and my.vec that I pass through as the X.matrix and y.vec arguments, and then I just assign the z.scalar argument the number 9.
# save a matrix and a vector object
my.mat <- cbind(c(1, 3, 4), c(5, 4, 3))
my.vec <- c(4, 3)
# pass my.mat and my.vec into the my.fun function
my.fun(X.matrix = my.mat, y.vec = my.vec, z.scalar = 9)
## [,1]
## [1,] 1539
## [2,] 1944
## [3,] 2025
# this is the same as
my.fun(my.mat, my.vec, 9)
## [,1]
## [1,] 1539
## [2,] 1944
## [3,] 2025
### >>>Returning a list of objects
Also, if you need to return multiple objects from a function, you can use list() to list them together. An example of this is my blog post on sample size functions. For example:
another.fun <- function(sq.matrix, vector) {
# transpose matrix and square the vector
step1 <- t(sq.matrix)
step2 <- vector * vector
# save both results in a list and return
final <- list(step1, step2)
return(final)
}
# call the function and save result in object called outcome
outcome <- another.fun(sq.matrix = cbind(c(1, 2), c(3, 4)), vector = c(2, 3))
# print the outcome list
print(outcome)
## [[1]]
## [,1] [,2]
## [1,] 1 2
## [2,] 3 4
##
## [[2]]
## [1] 4 9
Now to separate those objects for use in your further code, you can extract them using the [[]] operator:
### extract first in list
outcome[[1]]
## [,1] [,2]
## [1,] 1 2
## [2,] 3 4
## extract second in list
outcome[[2]]
## [1] 4 9
## Tricks for troubleshooting and debugging
When you execute multiple statements in a function, sometimes things go wrong. What's nice about functions is that R evalutes every statement until it reaches an error. So in the last function, the dimensions of the objects really matter. You can't multiply matrices of incomptabile dimensions. Like this:
my.fun(X.matrix = my.mat, y.vec = c(2, 3, 6, 4, 1), z.scalar = 9)
## Error: non-conformable arguments
### >>>Using the Debug() function
When you have an error, one thing you can do is use R's built-in debugger debug() to find at what point the error occurs. You indicate which function you want to debug, then run your statement calling the function, and R shows you at what point the function stops because of errors:
debug(my.fun)
my.fun(X.matrix = my.mat, y.vec = c(2, 3, 6, 4, 1), z.scalar = 9)
## debugging in: my.fun(X.matrix = my.mat, y.vec = c(2, 3, 6, 4, 1), z.scalar = 9)
## debug at #1: {
## sq.scalar <- square.it(z.scalar)
## mult <- X.matrix %*% y.vec
## final <- mult * sq.scalar
## return(final)
## }
## debug at #4: sq.scalar <- square.it(z.scalar)
## debug at #7: mult <- X.matrix %*% y.vec
## Error: non-conformable arguments
We see that the first line calling the square.it() function was fine, but then an error occurred in the line defining mult. This debugging is useful especially if you had many more statements in your function that multiplied matrices and you weren't sure which one was causing the issues. So now we know the problem is that X.matrix and y.vec won't multiply. But we still need to know why they won't multiply. More on debugging can be found here.
### >>>Printing out what's happening (sanity checks)
At this point, a good way to troubleshoot this is to print out the dimensions or lengths of the objects or even the objects themselves that are going into the statement causing errors. The great part about functions is that they evaluate all the way until there's an error. So you can see what is happening inside your function before the error. If the object is too long, you can print(head(object)). This helps to see if you're doing what you think you're doing. Note that you have to use the function print() to actually print out anything from within a function.
my.fun <- function(X.matrix, y.vec, z.scalar) {
print("xmatrix")
print(X.matrix)
print("yvec")
print(y.vec)
print("Dimensions")
print(dim(X.matrix))
print(length(y.vec))
# use my previous function square.it() to square the scalar and save result
sq.scalar <- square.it(z.scalar)
print(paste("sq.scalar=", sq.scalar))
# multiply the matrix by the vector using %*% operator
mult <- X.matrix %*% y.vec
# multiply the two resulting objects together to get a final object
final <- mult * sq.scalar
# return the result
return(final)
}
my.fun(X.matrix = my.mat, y.vec = c(2, 3, 6, 4, 1), z.scalar = 9)
## [1] "xmatrix"
## [,1] [,2]
## [1,] 1 5
## [2,] 3 4
## [3,] 4 3
## [1] "yvec"
## [1] 2 3 6 4 1
## [1] "Dimensions"
## [1] 3 2
## [1] 5
## [1] "sq.scalar= 81"
## Error: non-conformable arguments
Now we can see the actual dimensions of the objects and fix them accordingly. This example is really simple, but you can imagine that if you've written a long function that uses many arguments, you could easily lose track of them and not be sure where the issue in your function was. You can also throw in these statements along the way as sanity checks to make sure that things are proceeding as you think they should, even if there isn't any error.
### >>>Using the stop() and stopifnot() functions to write your own error messages
One other trick you can use is writing your own error messages using the stop() and stopifnot() functions. In this example, if I know I need dimensions to be the right size, I can check them and print out a message that says they are incorrect. That way I know what the issue is immediately. Here's an example:
my.second.fun <- function(matrix, vector) {
if (dim(matrix)[2] != length(vector)) {
stop("Can't multiply matrix%*%vector because the dimensions are wrong")
}
product <- matrix %*% vector
return(product)
}
# function works when dimensions are right
my.second.fun(my.mat, c(6, 5))
## [,1]
## [1,] 31
## [2,] 38
## [3,] 39
# function call triggered error
my.second.fun(my.mat, c(6, 5, 7))
## Error: Can't multiply matrix%*%vector because the dimensions are wrong
You can do these kinds of error messages for yourself as checks so you know exactly what triggered the error. You can think about putting in a check for if the value of an object is 0 if you are dividing by it as another example.
## Good function writing practices
Based on my experience, there are a few good practices that I would recommend keeping in mind when writing function.
1. Keep your functions short. Remember you can use them to call other functions!
• If things start to get very long, you can probably split up your function into more manageable chunks that call other functions. This makes your code cleaner and easily testable.
• It also makes your code easy to update. You only have to change one function and every other function that uses that function will also be automatically updated.
2. Put in comments on what are the inputs to the function, what the function does, and what is the output.
3. Check for errors along the way.
• Try out your function with simple examples to make sure it's working properly
• Use debugging and error messages, as well as sanity checks as you build your function.
The next post will go over examples of useful functions that you can use in your day to day R coding.
|
|
These are chat archives for highfidelity/hifi
21st
Mar 2017
Trent Polack
@mittens
Mar 21 2017 19:29
so, I'm trying to setup a light sandbox for testing isolated changes and the like
and... clear as mud now
but trying to debug/step-through file parsing code in the main interface env is like... pain
Melissa Brown
@themelissabrown
Mar 21 2017 19:46
/all anyone here that can talk about meshes? @mittens pointed out that it looks like this OBJ reader generates one mesh with two materials which would explain why it just renders everything with one material, but wants to be sure there isn't something downstream that takes care of it
@/all
Trent Polack
@mittens
Mar 21 2017 19:46
^ that too
(also placing an OBJ in the world crashes my interface session)
(sans any local modifications)
Melissa Brown
@themelissabrown
Mar 21 2017 20:01
@cozza13 might have some insight
Melissa Brown
@themelissabrown
Mar 21 2017 20:28
@huffman might be able to help troubleshoot why placing an OBJ in the world crashes interface or sandbox
Clément Brisset
@Atlante45
Mar 21 2017 20:28
@mittens DO you mean a simple stand-alone renderer?
Unfortunately no.
I can walk you through setting up a sandbox if needed though.
Trent Polack
@mittens
Mar 21 2017 20:34
@themelissabrown rocked me through the sandbox intro
thanks muchly, though
i would have preferred your help. mel is so mean
she kept calling me a peasant
Ryan Huffman
@huffman
Mar 21 2017 20:43
That shouldn't happen - is it the motobug objs that are crashing your interface, @mittens ?
Trent Polack
@mittens
Mar 21 2017 20:43
yeah
nothing particularly special about them other than the multi-material
Clément Brisset
@Atlante45
Mar 21 2017 20:47
FYI, there is some model work coming soon.
We writing a baking tool to reduce network load and get a low LOD render up on screen faster.
This will probably include some changes to the way we store/process models.
Trent Polack
@mittens
Mar 21 2017 20:47
well that doesn't help me with this worklist task :P
but yeah, my wonder was if the MTL had to be directly loaded in order for the OBJ placement into the world to work
but still crashyville
Clément Brisset
@Atlante45
Mar 21 2017 20:48
And this work will definitely rely on the branch in the works right now, that switches us to using KTX textures.
Do you know where it crashes?
Got a stack trace?
Trent Polack
@mittens
Mar 21 2017 20:49
one sec
Ryan Huffman
@huffman
Mar 21 2017 20:49
Hmm, are you running latest master @mittens ?
Trent Polack
@mittens
Mar 21 2017 20:50
yes indeedo
that's the exported OBJ with the MTL + assorted textures
Ryan Huffman
@huffman
Mar 21 2017 20:54
@mittens Yep, that's the one I was using! I got it from your PR
Trent Polack
@mittens
Mar 21 2017 20:54
well you're a sorcerer
Ryan Huffman
@huffman
Mar 21 2017 20:55
;)
I just tried with a debug build off this morning's master and it is working
Do you consistently crash?
Trent Polack
@mittens
Mar 21 2017 20:57
100%
Ryan Huffman
@huffman
Mar 21 2017 21:01
Are you using the obj as the collision shape for your entity?
Trying it now
Clément Brisset
@Atlante45
Mar 21 2017 21:02
What process do you go through to import it?
Trent Polack
@mittens
Mar 21 2017 21:02
assets->import file
Clément Brisset
@Atlante45
Mar 21 2017 21:03
Ohhh, ok.
That won't work.
Though, it shouldn't crash
Will file as a bug
This is to import entity files. This is different.
Trent Polack
@mittens
Mar 21 2017 21:03
ahhhh
Clément Brisset
@Atlante45
Mar 21 2017 21:03
You should have a tool back.
Click "Edit"
A new toolbar should show up.
Trent Polack
@mittens
Mar 21 2017 21:04
meshes?
Clément Brisset
@Atlante45
Mar 21 2017 21:04
Yes, and then put a ref to the local file.
Trent Polack
@mittens
Mar 21 2017 21:05
so i have the obj in: hifi\build\interface\Debug\resources\meshes\test\motobug.obj
what's the proper ref url for that?
Clément Brisset
@Atlante45
Mar 21 2017 21:06
C:\path\to\model.obj
Trent Polack
@mittens
Mar 21 2017 21:06
...
oh.
Clément Brisset
@Atlante45
Mar 21 2017 21:06
Can I come to your domain?
Trent Polack
@mittens
Mar 21 2017 21:08
hifi://ivory-bandwidth-2342
?
Clément Brisset
@Atlante45
Mar 21 2017 21:08
Yup
Can you see me?
Trent Polack
@mittens
Mar 21 2017 21:09
yes!
and then I jumped to look at the bug
which was apparently in deep space
Clément Brisset
@Atlante45
Mar 21 2017 21:10
Hmmm, I can see you. I can hear your music too. but apparently you can't hear me.
You should check that your audio devices are correctly selected in the "Audio" menu.
Trent Polack
@mittens
Mar 21 2017 21:11
yeah, they're set right
Clément Brisset
@Atlante45
Mar 21 2017 21:12
Hmmm, looks like you dropped a model that broke rendering xD
Trent Polack
@mittens
Mar 21 2017 21:12
hahaha
i'm good at that
it's interesting that it didn't load its associated textures either
Clément Brisset
@Atlante45
Mar 21 2017 21:13
=)
Just curious, did you drag'n'drop the model into interface?
Trent Polack
@mittens
Mar 21 2017 21:13
just jumped out
have to wrap things up for the day
but no, i just opened up the mesh menu and pasted the local URL to the OBJ
Clément Brisset
@Atlante45
Mar 21 2017 21:14
Ok, no worries. We'll figure it out next time.
Trent Polack
@mittens
Mar 21 2017 21:14
I'll ping you in the morning; I appreciate the help
Clément Brisset
@Atlante45
Mar 21 2017 21:15
No problem, see ya.
Trent Polack
@mittens
Mar 21 2017 21:15
melissa is forwarding me things so I'm not so dumb within the actual interface as well
I tell you, she holds this stuff back just to mock me later
Melissa Brown
@themelissabrown
Mar 21 2017 21:15
it's usually true
Clément Brisset
@Atlante45
Mar 21 2017 21:15
Ahahahah, I bet she does ^^
Melissa Brown
@themelissabrown
Mar 21 2017 21:15
in this case, I was just told that something I thought was for interface users is actually for devs as well
:)
|
|
# Combinatorics Overview
Daniel Weibel
Created 15 Aug 2017
Last updated 25 Aug 2017
Overview of the most important concepts of combinatorics.
The branch of combinatorics treated here is called enumerative combinatorics, which is the counting of the different arrangements of the elements of a finite set.
The main arrangements of enumerative combinatorics are permutations, variations, and combinations.
# Primer: Set vs. Tuple vs. Multiset
## Set
• Collection of elements that is unordered and has no duplicate elements.
• Notation: curly braces $\{\}$
• Example: $\{3,5,7\}$
• Unorderedness: $\{3,5,7\}$ is the same as $\{7,5,3\}$ is the same as $\{5,3,7\}$, etc.
## Tuple
• Collection of elements that is ordered (i.e. a sequence) and may have duplicate elements.
• A tuple of size $n$ is called an $n$-tuple.
• Notation: parentheses $()$
• Example: $(3,5,5,7)$
• Orderedness: $(3,5,5,7)$ is different from $(3,5,7,5)$ is different from $(3,7,5,5)$, etc.
## Multiset
• Collection of elements that is unordered and may have duplicate elements.
• The number of occurrences of a specific element is called its multiplicity.
• Notation: curly braces $\{\}$
• Example: $\{3,5,5,7\}$
• 5 has a multiplicity of 2
• 3 and 7 have a multiplicity of 1
• Unorderedness: $\{3,5,5,7\}$ is the same as $\{3,5,7,5\}$ is the same as $\{3,7,5,5\}$, etc.
# Permutations
Remember: in a sequence the order matters.
• Arrangement of the elements of a set or multiset of size $n$ into a sequence of length $n$.
• From Latin permutare: interchange, swap
• Think of shuffling a collection of elements
## “Normal” Permutations
Arrangement of all the elements of a set of $n$ elements into a sequence of $n$ elements.
### Example
• Set: $\{1,2,3\}$
• Permutations: $(1,2,3), \, (1,3,2), \, (2,1,3), \, (2,3,1), \, (3,1,2), \, (3,2,1)$
• Number of permutations: 6
### Explanation
• For first position of sequence: $n$ choices; for second position: $n-1$ choices, etc.
• $n \cdot (n-1) \cdot (n-2) \cdot … \cdot 1 = n!$
### Application
• Calculate the number of ways the letters of the word JOURNAL can be rearranged.
• Set: $\{J, O, U, R, N, A, L\}$
• $n = 7$
• Number of rearrangements:
## Permutations With Multisets
• Special case of permutation where the collection of elements may contain multiple similar elements (i.e. it is a multiset instead of a set).
• Takes into account the indistinguishability of the different relative arrangements of the elements with multiplicity $>1$.
Note:
We denote the multiplicities of the elements of a multiset as $m_1, m_2, …, m_s$.
### Example 1
• Multiset: $\{1,1,2\}$
• $n = 3$
• $m_1 = 2$ $\;$ (1 has multiplicity 2)
• $m_2 = 1$ $\;$ (2 has multiplicity 1)
• Distinct permutations: $(1,1,2), \, (1,2,1), \, (2,1,1)$
• Number of distinct permutations: 3
### Example 2
• Multiset: $\{f,o,o,f\}$
• $n = 4$
• $m_1 = 2$ $\;$ ($f$ has multiplicity 2)
• $m_2 = 2$ $\;$ ($o$ has multiplicity 2)
• Distinct permutations: $(f,o,o,f), \, (f,o,f,o), \, (f,f,o,o), \, (o,f,f,o), \, (o,f,o,f), \, (o,o,f,f)$
• Number of distinct permutations: 6
### Formula
The term $\binom{n}{m_1, m_2, …, m_s}$ is called the multinomial coefficient.
### Explanation
• First, calculate number of all possible permutations (including indistinguishable ones):
• Then, calculate for each group of indistinguishable elements the number of (indistinguishable) permutations:
• Finally, remove total of indistinguishable permutations from the total number of permutations:
### Application
• Calculate the number of distinct permutations of the word mississippi.
• Multiset: $\{m,i,s,s,i,s,s,i,p,p,i\}$
• $n = 11$
• $m_1 = 1$ $\;$ ($m$ has multiplicity 1)
• $m_2 = 4$ $\;$ ($i$ has multiplicity 4)
• $m_3 = 4$ $\;$ ($s$ has multiplicity 4)
• $m_4 = 2$ $\;$ ($p$ has multiplicity 2)
• Number of permutations:
# Variations
Remember: in a sequence the order matters.
• Arrangement of $k$ elements from a set of $n$ elements into a sequence of length $k$.
• Variations without repetition
• $k < n$
• If $k = n$, then it is a permutation
• Variations with repetitions
• $k < n$ or $k = n$ or $k > n$
Note:
In the English literature, the term “variation” is archaic, and variations are seen as a type of permutation. On the other hand, in the non-English literature, the distinction between permutation and variation is still commonly made.
## Variations Without Repetitions (k-Permutations of n)
• Arrangement of $k$ elements of a set of $n$ elements into a sequence of length $k$.
• Known as $\bs{k}$-permutations of $\bs{n}$ in the English literature.
• $k < n$
• If $k = n$, then it is a permutation.
• Notation: $P(n,k)$
• Calculator button: nPr
### Example
• $n=4, \, k=2$
• Set: $\{1,2,3,4\}$
• $k$-permutations: $(1,2), \, (1,3), \, (1,4), \, (2,1), \, (2,3), \, (2,4), \, (3,1), \, (3,2), \, (3,4), \, (4,1), \, (4,2), \, (4,3)$
• $P(n,k) = 12$
### Formula
The term $(n)_k$ is called the falling factorial.
### Explanation
• Idem permutation, but stop choosing elements after $k$ elements.
• For example, only $4 \cdot 3$ instead of $4 \cdot 3 \cdot 2 \cdot 1$
• Calculate full factorial (e.g. $4 \cdot 3 \cdot 2 \cdot 1$) and get rid of excess part (e.g. $2 \cdot 1$) by dividing by it (e.g. $\frac{4 \cdot 3 \cdot 2 \cdot 1}{2 \cdot 1} = \frac{4!}{2!}$)
## Variations With Repetitions (k-Tuples)
• Arrangement of $k$ elements from a set of $n$ elements into a sequence of length $k$, where each element of the set may be chosen multiple times.
• Known as $\bs{k}$-tuples in the English literature.
• $k < n$ or $k = n$ or $k > n$
• In many cases, the elements of the set can be thought of as classes from which multiple objects can be instantiated.
• Can also be seen as forming words of length $k$ over an alphabet of size $n$.
### Example 1
• Set: $\{a,b,c\}$
• $n = 3$
• $k = 2$
• Words: $(a,a), \, (a,b), \, (a,c), \, (b,a), \, (b,b), \, (b,c), \, (c,a), \, (c,b), \, (c,c)$
• Number of words: 9
### Example 2
• Set: $\{0, 1\}$
• $n = 2$
• $k = 3$
• Words: $(0,0,0), \, (0,0,1), \, (0,1,0), \, (0,1,1), \, (1,0,0), \, (1,0,1), \, (1,1,0), \, (1,1,1)$
• Number of words: 8
### Explanation
• For each of the $k$ positions in the sequence we can choose from all the $n$ elements of the set.
### Application 1
• Calculate the number of codes of a combination lock with four rings and 10 digits on each ring.
• Set: $\{0,1,2,3,4,5,6,7,8,9\}$
• $n = 10$
• $k = 4$
• Number of codes:
### Application 2
• Calculate the number of barcodes with a length of 10 bars that can be constructed with bars of three different thicknesses.
• Set: $\{thin, medium, thick\}$
• $n = 3$
• $k = 10$
• Number of barcodes:
### Application 3
• Calculate the number of ways that Alice, Bob, Charlie, and Dave can stay in the hotels Hilton and Ritz.
• For example, “all of them staying in Hilton, and nobody staying in Ritz”, or “Alice, Bob, and Charlie staying in Hilton, and Dave staying in Ritz”, and so on.
• Set: {Hilton, Ritz}
• $n = 2$
• $k = 4$ $\;$ (Alice, Bob, Charlie, Dave)
• Number of possibilities:
• Note that the function of the “orderedness” here is to identify the individual persons: each position in the sequence corresponds to a specific person.
• For example, $(\mr{H},\mr{H},\mr{H},\mr{R})$ means Alice, Bob, and Charlie stay in Hilton, and Dave stays in Ritz.
• This is not the same as e.g. $(\mr{R},\mr{H},\mr{H},\mr{H})$, which means that Alice stays in Ritz, and Bob, Charlie, and Dave stay in Hilton.
• This example can also be seen as putting $k = 4$ distinct balls into $n = 2$ boxes.
• See Application of Variations With Repetitions Plus Permuations or Repeated Elements and Application 4 of Combinations With Repetitions.
## Variations With Repetitions Plus Permutations of Repeated Elements
• Arrangement of a sequence of length $k$ from a set of $n$ elements where each element of $n$ may be chosen multiple times AND considering of the permutations of the repeated elements in the sequence.
• $k < n$ or $k = n$ or $k > n$
### Example
• Set: $\{1,2\}$
• $n = 2$
• $k = 2$
• Variations: $(1_a,1_b), \, (1_b,1_a), \, (1,2), \, (2,1), \, (2_a,2_b), \, (2_b,2_a)$
• Number of variations: 6
• Note that without the additional constraint of taking into account the permutations of the repeated elements, there would be $2^2 = 4$ variations (variations with repetitions):
• $(1,1), \, (1,2), \, (2,1), \, (2,2)$
• However, two of these sequences contain repeated elements and thus we must replace them with a series of sequences containing all the permutations of all the groups of repeated elements.
Forming the permutations of the repeated elements in the sequence is one way of thinking about this case. However, it does not lead easily to a formula, because it is hard to generally tell how many repeated elements are in each sequence. There is another way of thinking about this case, which is described below, which naturally leads to the below formula.
### Formula
The term $n^{(k)}$ is called the rising factorial (also known as Pochhammer function).
### Explanation
• Think of $n$ boxes and $k$ objects, and putting the objects in the boxes, which translates to choosing a position in one of the boxes for each object.
• For the first object, there are $n$ positions to choose from in the $n$ boxes (one possible position in each box).
• In the box that has been chosen, there are now two positions for another object in this box:
• One “to the left” of the object already in the box, and one “to the right” of the object already in the box.
• Thus, for the second object, there are now $n+1$ positions to choose from.
• Whatever position in whatever box is chosen, it gives rise to to new positions: one to the left and one to the right of the chosen position.
• Thus for the third object, there are $n+2$ positions to choose from.
• This repeats $k$ times for each object in the sequence.
### Application
• In how many ways can Alice, Bob, Charlie, and Dave check in at the hotels Hilton and Ritz if the order in which the people ckeck in in each hotel matters?
• For example, if Alice and Bob stay at Hilton, “Bob checking in before Alice”, and “Bob checkin in after Alice” are two different cases.
• Set: {Hilton, Ritz}
• $n = 2$
• $k = 4$ $\;$ (Alice, Bob, Charlie, Dave)
• Number of possibilities:
• Note that an individual possibility might look like this: $(\mr{H}, \mr{R}, \mr{R_{a}}, \mr{R_{ab}})$
• This means that Alice stays in Hilton, and Bob, Charlie, and Dave stay in Ritz, and the order of check in at Ritz is first Charlie, then Dave, then Bob.
• The above possibility is different from e.g. $(\mr{H}, \mr{R}, \mr{R_{a}}, \mr{R_{b}})$
• Here also, Alice stays in Hilton, and Bob, Charlie and Dave stay in Ritz, but the order of check in at Ritz is first Charlie, then Bob, then Dave.
# Combinations
Remember: in a set or multiset, the order doesn’t matter.
• Selection of $k$ elements of a set of $n$ elements into a new set (combinations without repetition) or multiset (combinations with repetition) of $k$ elements.
• Combinations without repetition
• $k \leq n$
• If $k = n$, there is only a single combination
• Combinations with repetition
• $k < n$ or $k = n$ or $k > n$
## Combinations Without Repetitions
• Selection of a subset of $k$ elements of a set of $n$ elements.
• $k \leq n$
• If $k = n$, there is only a single combination
• Say “$n$ choose $k$”
• Notation: $C(n,k)$
• Calculator button: nCr
### Example
• Set: $\{1,2,3\}$
• $n = 3$
• $k = 2$
• Combinations: $\{1,2\}, \, \{1,3\}, \, \{2,3\}$
• $C(3,2) = 3$
### Formula
The term $\binom{n}{k}$ is called the binomial coefficient.
### Explanation
• Consider the number of variations (sequences) of length $k$: $P(n,k) = \frac{n!}{(n-k)!}$
• This includes $k!$ sequences consisting of the same $k$ elements (for each subset of $k$ elements)
• Since for combinations the order doesn’t matter, all these $k!$ sequences constitute the same combination.
• Thus, by dividing the number of variations by $k!$, we obtain the number of combinations.
### Symmetry Property
Because:
a)
b)
Rationale: choosing is binary, so choosing $k$ of $n$ elements is the same as choosing to not choose the other $n-k$ elements.
### Application 1
• Calculate the number of 6-number combinations in the lottery with 49 numbers to choose from.
• Set: $\{1,2,3,4,…,49\}$
• $n = 49$
• $k = 6$
• Number of 6-number combinations:
### Application 2
• Calculate the number of ways to put three balls in five boxes so that each box contains at most one ball (i.e. each box contains either 0 or 1 ball).
• Set: $\{\mr{box}_1,\mr{box}_2,\mr{box}_3,\mr{box}_4,\mr{box}_5\}$
• $n = 5$
• $k = 3$
• Think of choosing a subset of size 3 of the five boxes. The chosen boxes contain a ball, and all the other boxes contain no ball.
• Number of ways:
## Combinations With Repetitions
• Selection of $k$ elements from a set of $n$ elements, and every element may be selected multiple times.
• The resulting combination is a multiset of size $k$.
• $k < n$ or $k = n$ or $k > n$
• Think of the $n$ elements of the set not as objects, but as classes that can be instantiated.
• Say “$n$ multichoose $k$”.
### Example 1
• Set: $\{1,2,3\}$
• $n = 3$
• $k = 2$
• Combinations: $\{1,2\}, \, \{1,3\}, \, \{2,3\}, \, \{1,1\}, \, \{2,2\}, \, \{3,3\}$
• Number of combinations: 6
### Example 2
• Set: $\{1,2\}$
• $n = 2$
• $k = 4$
• Combinations: $\{1,1,1,1\}, \, \{1,1,1,2\}, \, \{1,1,2,2\}, \, \{1,2,2,2\}, \, \{2,2,2,2\}$
• Number of combinations: 5
### Explanation
Line 1
States that counting the combinations of $k$ of $n$ elements with repetition is the same as counting the combinations of $n-1$ of $n+k-1$ elements without repetition.
This can be demonstrated with the stars and bars representation:
• We put $\bs{k}$ stars in a line, representing the $k$ elements to choose
• Between the stars we position $\bs{n-1}$ bars, partitioning the stars into $n$ segments
• Each arrangement of stars and bars corresponds to a combination with repetition
• For example, with the set $\{a,b,c\}$ ($n=3$), and $k=4$, a possible arrangement is: *||***
• This specific arrangement corresponds to the combination $\{a,c,c,c\}$:
• Segment 1 (corresponding to element $a$) has 1 star (i.e. chosen 1 time)
• Segment 2 (corresponding to element $b$) has 0 stars (i.e. chosen 0 times)
• Segment 3 (corresponding to element $c$) has 3 stars (i.e. chosen 3 times)
• In total, there are $\bs{k+n-1}$ elements in a line (stars and bars together)
• Positioning the bars is equivalent to choosing $n-1$ out of the $k+n-1$ elements to be bars
• Thus, $\binom{n+k-1}{n-1}$ gives the number of arrangements of stars and bars, which is equivalent to the number of $k$-combinations of $n$ with repetition.
Line 2
Expansion of the binomial coefficient.
Line 3
An alternative binomial coefficient representation of the formula on line 2 (swapping the “meaning” of the factors in the denominator).
As can be seen, the formulas on line 1 and 3 are equivalent, but the formula on line 3 is more commonly used.
### Application 1
• Calculate the number of possible colour combinations resulting from grabbing 10 gummy bears out of a large bag containing gummy bears in 5 colours.
• Set: $\{white, green, red, orange, yellow\}$
• $n = 5$
• $k = 10$
• Number of combinations:
### Application 2
• Calculate the number of possible combinations of faces resulting from rolling three dice at once.
• Set: $\{1,2,3,4,5,6\}$
• $n = 6$
• $k = 3$
• Number of combinations:
### Application 3
• Calculate the number of ways to put three balls in five boxes, if the only thing that matters is how many balls are in each box (i.e. 0, 1, 2, or 3).
• Set: $\{\mr{box}_1,\mr{box}_2,\mr{box}_3,\mr{box}_4,\mr{box}_5\}$
• $n = 5$
• $k = 3$
• Think of forming sub-multisets of size 3 of the five boxes (a multiset may contain multiple times the same box).
• If we choose three times $\mr{box}_1$, then $\mr{box}_1$ contains three balls, and all other boxes contain no ball, and so on.
• Number of ways:
### Application 4
• Calculate the number of ways that four persons can stay in the two hotels Hilton and Ritz, if the only thing that matters is the number of persons staying in each hotel.
• For example, “4 persons staying in Hilton and 0 in Ritz”, or “3 persons staying in Hilton, and 1 in Ritz”, and so on.
• Set: {Hilton, Ritz}
• $n = 2$
• $k = 4$ $\;$ (4 persons)
• Number of possibilities:
|
|
# Do I Have to Mow the Whole Thing?
Learners explore the concept of inverse variation. In this inverse variation lesson, students calculate an area formula for the dimensions of a garden with constant area. Learners rearrange the formula into a y equals equation. Students solve problems given a constant where they must determine the number of something, for example, you have $30, how many cd's can you buy if they cost$5, \$3, etc.
Concepts
Resource Details
|
|
# Revision history [back]
### looping for trainig data
Hi I have 80 testing and training samples to loop in my code. testData_1 to testdata_80
I had defined the path for each training and testing samples as char trainfilename[] = "\t\trainData_1.txt"; char testfilename[] = "t\testData_1.txt";
but now i have 80 of them so i have to loop them so that i could read it one by one.
please note that i cant concatenate all testing samples to one as each testdata1 is of dimension 5180 and each traindata_1 is of 20180
so i was planing to make a loOp like this instead of doing it manually one by one
strcpy(testdataAll, "D:/data/");
strcat(testdataAll, testSet[ctrTestSet]);
strcat(testdataAll, testfilename);
for (int pos=0; pos<160; pos++) {
if (testfilename[pos]=='_' && testfilename[pos+1]=='\0'){
strcat(testdataAll, numTrChar);
strcat(testdataAll, "_6");
break;
}
}
but i cant get it right? please suggest
|
|
# SharePoint problem: moderation comment is not saved
I solved last week one pretty cool mystery in SharePoint. I have form that users use to make some specific changes to list items. When all the fields on form are filled then user clicks save button. Changes are saved to list item and list item is automatically accepted. Status change is made through ModerationInformation property ofSPListItem. Everything seemed to work except one little thing – moderation status comment was not saved.
It took me couple of hours to figure out what is going on. This time, again, Reflectorsaved my ass. I followed the method calls from list item update to SPRequest methods (find out more by reading brilliant code posting Understanding SharePoint: SPRequestby Hristo Pavlov) that Reflector wasn’t able to disassemble. As soon as I saw request I got the correct answer: Response.
Take a look at this code fragment.
// initialization code item.ModerationInformation.Status = SPModerationStatusType.Approved;item.ModerationInformation.Comment = "Accepted";item.Update(); // some more code Response.Redirect(returnUrl, true);
You see that Response is forced to end using second argument ofResponse.Redirect() method. This was the source of problem. After using Response.Redirect with one argument the problem was solved because Response was not forced to end.
I hope this information saves some hours of work for world. 🙂
|
|
# Rate of convergence
Rate of convergence
In numerical analysis, the speed at which a convergent sequence approaches its limit is called the rate of convergence. Although strictly speaking, a limit does not give information about any finite first part of the sequence, this concept is of practical importance if we deal with a sequence of successive approximations for an iterative method, as then typically fewer iterations are needed to yield a useful approximation if the rate of convergence is higher. This may even make the difference between needing ten or a million iterations.
Similar concepts are used for discretization methods. The solution of the discretized problem converges to the solution of the continuous problem as the grid size goes to zero, and the speed of convergence is one of the factors of the efficiency of the method. However, the terminology in this case is different from the terminology for iterative methods.
Series acceleration is a collection of techniques for improving the rate of convergence of a series. Such acceleration is commonly accomplished with sequence transformations.
## Convergence speed for iterative methods
### Basic definition
Suppose that the sequence {xk} converges to the number L.
We say that this sequence converges linearly to L, if there exists a number μ ∈ (0, 1) such that
$\lim_{k\to \infty} \frac{|x_{k+1}-L|}{|x_k-L|} = \mu.$
The number μ is called the rate of convergence.
If the sequences converges, and
• μ = 0, then the sequence is said to converge superlinearly.
• μ = 1, then the sequence is said to converges sublinearly.
If the sequences converges sublinearly and additionally
$\lim_{k\to \infty} \frac{|x_{k+2} - x_{k+1}|}{|x_{k+1} - x_k|} = 1,$
then it is said the sequence {xk} converges logarithmically to L.
The next definition is used to distinguish superlinear rates of convergence. We say that the sequence converges with order q for q > 1 to L if
$\lim_{k\to \infty} \frac{|x_{k+1}-L|}{|x_k-L|^q} = \mu \,\big|\; \mu > 0.$
In particular, convergence with order
• 2 is called quadratic convergence,
• 3 is called cubic convergence,
• etc.
This is sometimes called Q-linear convergence, Q-quadratic convergence, etc., to distinguish it from the definition below. The Q stands for "quotient," because the definition uses the quotient between two successive terms.
### Extended definition
The drawback of the above definitions is that these do not catch some sequences which still converge reasonably fast, but whose "speed" is variable, such as the sequence {bk} below. Therefore, the definition of rate of convergence is sometimes extended as follows.
Under the new definition, the sequence {xk} converges with at least order q if there exists a sequence {εk} such that
$|x_k - L|\le\varepsilon_k^q\quad\mbox{for all }k,$
and the sequence {εk} converges to zero with order q according to the above "simple" definition. To distinguish it from that definition, this is sometimes called R-linear convergence, R-quadratic convergence, etc. (with the R standing for "root").
### Examples
Consider the following sequences:
\begin{align} a_0 &= 1 ,\, &&a_1 = \frac12 ,\, &&a_2 = \frac14 ,\, &&a_3 = \frac18 ,\, &&a_4 = \frac1{16} ,\, &&a_5 = \frac1{32} ,\, &&\ldots ,\, &&a_k = \frac1{2^k} ,\, &&\ldots \\ b_0 &= 1 ,\, &&b_1 = 1 ,\, &&b_2 = \frac14 ,\, &&b_3 = \frac14 ,\, &&b_4 = \frac1{16} ,\, &&b_5 = \frac1{16} ,\, &&\ldots ,\, &&b_k = \frac1{4^{\left\lfloor \frac{k}{2} \right\rfloor}} ,\, &&\ldots \\ c_0 &= \frac12 ,\, &&c_1 = \frac14 ,\, &&c_2 = \frac1{16} ,\, &&c_3 = \frac1{256} ,\, &&c_4 = \frac1{65\,536} ,\, &&&&\ldots ,\, &&c_k = \frac1{2^{2^k}} ,\, &&\ldots \\ d_0 &= 1 ,\, &&d_1 = \frac12 ,\, &&d_2 = \frac13 ,\, &&d_3 = \frac14 ,\, &&d_4 = \frac15 ,\, &&d_5 = \frac16 ,\, &&\ldots ,\, &&d_k = \frac1{k+1} ,\, &&\ldots \end{align}
The sequence {ak} converges linearly to 0 with rate 1/2. More generally, the sequence k converges linearly with rate μ if |μ| < 1. The sequence {bk} also converges linearly to 0 with rate 1/2 under the extended definition, but not under the simple definition. The sequence {ck} converges superlinearly. In fact, it is quadratically convergent. Finally, the sequence {dk} converges sublinearly.
Linear, Linear, Superlinear/Quadratic and sublinear rate of convergence.
## Convergence speed for discretization methods
A similar situation exists for discretization methods. Here, the important parameter is not the iteration number k but the number of grid points, here denoted n. In the simplest situation (a uniform one-dimensional grid), the number of grid points is inversely proportional to the grid spacing.
In this case, a sequence xn is said to converge to L with order p if there exists a constant C such that
| xnL | < Cn p for all n.
This is written as |xn - L| = O(n-p) using the big O notation.
This is the relevant definition when discussing methods for numerical quadrature or the solution of ordinary differential equations.
### Examples
The sequence {dk} with dk = 1 / (k+1) was introduced above. This sequence converges with order 1 according to the convention for discretization methods.
The sequence {ak} with ak = 2-k, which was also introduced above, converges with order p for every number p. It is said to converge exponentially using the convention for discretization methods. However, it only converges linearly (that is, with order 1) using the convention for iterative methods.
## Acceleration of convergence
Many methods exist to increase the rate of convergence of a given sequence, i.e. to transform a given sequence into one converging faster to the same limit. Such techniques are in general known as "series acceleration". The goal of the transformed sequence is to be much less "expensive" to calculate than the original sequence. One example of series acceleration is Aitken's delta-squared process.
## References
The simple definition is used in
• Michelle Schatzman (2002), Numerical analysis: a mathematical introduction, Clarendon Press, Oxford. ISBN 0-19-850279-6.
The extended definition is used in
• Kendell A. Atkinson (1988), An introduction to numerical analysis (2nd ed.), John Wiley and Sons. ISBN 0-471-50023-2.
• Walter Gautschi (1997), Numerical analysis: an introduction, Birkhäuser, Boston. ISBN 0-817-63895-4.
• Endre Süli and David Mayers (2003), An introduction to numerical analysis, Cambridge University Press. ISBN 0-521-00794-1.
Logarithmic convergence is used in
The Big O definition is used in
• Richard L. Burden and J. Douglas Faires (2001), Numerical Analysis (7th ed.), Brooks/Cole. ISBN 0-534-38216-9
The terms Q-linear and R-linear are used in; The Big O definition when using Taylor series is used in
• Nocedal, Jorge; Wright, Stephen J. (2006). Numerical Optimization (2nd ed.). Berlin, New York: Springer-Verlag. pp. 619+620. ISBN 978-0-387-30303-1 .
One may also study the following paper for Q-linear and R-linear:
• Potra, F. A. (1989). "On Q-order and R-order of convergence". J. Optim. Th. Appl. 63 (3): 415–431. doi:10.1007/BF00939805.
Wikimedia Foundation. 2010.
### Look at other dictionaries:
• Convergence criteria — (also known as the Maastricht criteria) are the criteria for European Union member states to enter the third stage of European Economic and Monetary Union (EMU) and adopt the euro. The four main criteria are based on Article 121(1) of the… … Wikipedia
• Convergence (economics) — The idea of convergence in economics (also sometimes known as the catch up effect) is the hypothesis that poorer economies per capita incomes will tend to grow at faster rates than richer economies. As a result, all economies should eventually… … Wikipedia
• Rate function — In mathematics mdash; specifically, in large deviations theory mdash; a rate function is a function used to quantify the probabilities of rare events. It is required to have several nice properties which assist in the formulation of the large… … Wikipedia
• convergence and divergence — ▪ atmospheric in meteorology, the accumulation or drawing apart of air, as well as the rate at which each takes place. The terms are usually used to refer specifically to the horizontal inflow (convergence) or outflow (divergence) of air.… … Universalium
• Radius of convergence — In mathematics, the radius of convergence of a power series is a quantity, either a non negative real number or ∞, that represents a domain (within the radius) in which the series will converge. Within the radius of convergence, a power series… … Wikipedia
• Contraction and Convergence — (C C) is a proposed global framework for reducing greenhouse gas emissions to combat climate change. Conceived by the Global Commons Institute [GCI] in the early 1990s, the Contraction and Convergence strategy consists of reducing overall… … Wikipedia
• Euro convergence criteria — Convergence criteria redirects here. For the mathematical term, see Series (mathematics)#Convergence criteria. Euro adoption by EU member states v · d · e … Wikipedia
• Technological convergence — This article is about technology convergence including convergence of media technology. For consolidation of media ownership, see Concentration of media ownership. Technological convergence is the tendency for different technological systems to… … Wikipedia
• European Exchange Rate Mechanism — The European Exchange Rate Mechanism, ERM, was a system introduced by the European Community in March 1979, as part of the European Monetary System (EMS), to reduce exchange rate variability and achieve monetary stability in Europe, in… … Wikipedia
• Newton's method — In numerical analysis, Newton s method (also known as the Newton–Raphson method), named after Isaac Newton and Joseph Raphson, is a method for finding successively better approximations to the roots (or zeroes) of a real valued function. The… … Wikipedia
|
|
# Solving for a derivative of an integral
1. Aug 7, 2006
### dnt
the question is find a function, f, and a value, a, such that:
2 times the integral from a to x of f(t)dt = 2sinx - 1
(sorry i dont know how to make it look nice)
well the first thing i did was divide by 2, then take the derivative of each side:
f(x) - f(a) = cos x
and now im stuck. am i correct so far? where do i go from here? thanks.
2. Aug 7, 2006
### Pseudo Statistic
If you took the derivative of both sides dx, why would F(a) be differentiated to f(a)? Wouldn't it be 0?
3. Aug 7, 2006
### d_leet
Why did you divide by 2, and what happened to that factor of 2 when you took the derivative? You also might want to recheck your work taking the derivative, do remember what the second fundamental theorem of calculus says?
4. Aug 7, 2006
### dnt
i thought it would be the derivative of f at a (whatever value that may be...i dont know because i dont know what a is)
5. Aug 7, 2006
### dnt
i thought i should divide by 2 just to get rid of it. on the right side it becomes sin x - 1/2. after i take the derivative of that i get cos x.
6. Aug 7, 2006
### d_leet
Yes, but what you do to one side of the equation you must do to the other side as well and so I asked what happened to the factor of 1/2 that would have been multiplying the integral?
$$\frac{d}{dx}\int_{a}^{x} f(x) dx\ = \ f(x)$$
That is very basically what the second fundamental theorem of calculus says and is what you need to use in this problem.
7. Aug 7, 2006
### Pseudo Statistic
Nope.
A definite integral yields a numerical answer... UNLESS one of the limits of integration is a variable that you're dealing with-- could be x OR a.
In this case, you have taken the derivative of both sides with respect to x-- thus treating x as the variable, not a...
In any case, F(a) does not have anything to do with x... differentiating it just kills it; thus, it disppears...
8. Aug 7, 2006
### dnt
i guess i dont get how you take the derivative of an integral. the integral from say, a to x, is the area under the curve, right? what does the derivative of an area mean?
9. Aug 7, 2006
### Pseudo Statistic
Well, according to the fundamental theorem of calculus, derivative and integrals are opposites..
Say you have a function f..
Take the integral, you have a function F.
Differentiate F, you get f again!
That's it, really...
10. Aug 7, 2006
### dnt
right, so then when i take the derivative of the integral from a to x of f(t) dt, shouldnt it just be f(x) - f(a)?
11. Aug 7, 2006
### dnt
and i still dont get how im suppose to take the derivative of a function when i dont even know what it is.
FTC has always been a very tough topic for me to comprehend. still trying to understand all of this.
12. Aug 7, 2006
### d_leet
If we define the integral of f(x) to be F(x) then if we take the integral from a to x we get F(x) - F(a), but when we differentiate with respect to x we treat a as a constant so the derivative of that integral will be F'(x) which is equal to f(x) because of how we defined F(x), F(a) will just be some consatnt that when we differentiate just disappears since it will be zero. Take a look at my previous post for a rather informal statement of the second fundamental theorem of calculus.
13. Aug 10, 2006
### a_ramage_1989
A worked solution
The attached document has a worked solution to your problem. The fundamental theorem of calculus makes more sense if you think of integrals as anti-derivatives, as they were first taught to me.
File size:
23.5 KB
Views:
118
|
|
# Streams and Laziness In this lab, we will dive into a couple implementations of the infinite list data structure that we saw in lecture. ## Streams In lecture we defined this type: type 'a stream = Cons of 'a * (unit -> 'a stream) The next few exercises ask you to work with that type. ##### Exercise: pow2 [✭✭] Define a value pow2 : int stream whose elements are the powers of two: <1; 2; 4; 8; 16, ...>. □ ##### Exercise: nth [✭✭] Define a function nth : 'a stream -> int -> 'a, such that nth s n the element at zero-based position n in stream s. For example, nth pow2 0 = 1, and nth pow2 4 = 16. □ ##### Exercise: filter [✭✭✭] Define a function filter : ('a -> bool) -> 'a stream -> 'a stream, such that filter p s is the sub-stream of s whose elements satisfy the predicate p. For example, filter (fun n -> n mod 2 = 0) nats would be the stream <0; 2; 4; 6; 8; 10; ...>. If there is no element of s that satisfies p, then filter p s does not terminate. □ ##### Exercise: interleave [✭✭✭] Define a function interleave : 'a stream -> 'a stream -> 'a stream, such that interleave <a1; a2; a3; ...> <b1; b2; b3; ...> is the stream <a1; b1; a2; b2; a3; b3; ...>. For example, interleave nats pow2 would be <0; 1; 1; 2; 2; 4; 3; 8; ...> □ The *Sieve of Eratosthenes* is a way of computing the prime numbers. * Start with the stream <2; 3; 4; 5; 6; ...>. * Take 2 as prime. Delete all multiples of 2, since they cannot be prime. That leaves <3; 5; 7; 9; 11; ...>. * Take 3 as prime and delete its multiples. That leaves <5; 7; 11; 13; 17; ...>. * Take 5 as prime, etc. ##### Exercise: sift [✭✭✭] Define a function sift : int -> int stream -> int stream, such that sift n s removes all multiples of n from s. *Hint: filter.* □ ##### Exercise: primes [✭✭✭] Define a sequence prime : int stream, containing all the prime numbers starting with 2. □ ##### Exercise: approximately e [✭✭✭✭] The exponential function \$$e^x\$$ can be computed by the following infinite sum: \$e^x = \\frac{x^0}{0!} + \\frac{x^1}{1!} + \\frac{x^2}{2!} + \\frac{x^3}{3!} + \\cdots + \\frac{x^k}{k!} + \\cdots \$ Define a function e_terms : float -> float stream. Element k of the stream should be term k from the infinite sum. For example, e_terms 1.0 is the stream <1.0; 1.0; 0.5; 0.1666...; 0.041666...; ...>. The easy way to compute that involves a function that computes \$$f(k) = \\frac{x^k}{k!}\$$. Define a function total : float stream -> float stream, such that total <a; b; c; ...> is a running total of the input elements, i.e., <a; a+.b; a+.b+.c; ...>. Define a function within : float -> float stream -> float, such that within eps s is the first element of s for which the absolute difference between that element and the element before it is strictly less than eps. If there is no such element, within is permitted not to terminate (i.e., go into an "infinite loop"). As a precondition, the *tolerance* eps must be strictly positive. For example, within 0.1 <1.0; 2.0; 2.5; 2.75; 2.875; 2.9375; 2.96875; ...> is 2.9375. Finally, define a function e : float -> float -> float such that e x eps is \$$e^x\$$ computed to within a tolerance of eps, which must be strictly positive. Note that there is an interesting boundary case where x=1.0 for the first two terms of the sum; you could choose to drop the first term (which is always 1.0) from the stream before using within. □ ##### Exercise: better e [✭✭✭✭, advanced] Although the idea for computing \$$e^x\$$ above through the summation of an infinite series is good, the exact algorithm suggested above could be improved. For example, computing the 20th term in the sequence leads to a very large numerator and denominator if \$$x\$$ is large. Investigate that behavior, comparing it to the built-in function exp : float -> float. Find a better way to structure the computation to improve the approximations you obtain. *Hint: what if when computing term \$$k\$$ you already had term \$$k-1\$$? Then you could just do a single multiplication and division.* Also, you could improve the test that within uses to determine whether two values are close. A good one for determining whether \$$a\$$ and \$$b\$$ are close might be: \$\\frac{|a - b|} {\\frac{|a| + |b|}{2} + 1} < \epsilon. \$ □ ## Laziness ##### Exercise: lazy hello [✭] Define a value of type unit Lazy.t (which is synonymous with unit lazy_t), such that forcing that value with Lazy.force causes "Hello lazy world" to be printed. If you force it again, the string should not be printed. □ ##### Exercise: lazy and [✭✭] Define a function (&&&) : bool Lazy.t -> bool Lazy.t -> bool. It should behave like a short circuit Boolean AND. That is, lb1 &&& lb2 should first force lb1. If it is false, the function should return false. Otherwise, it should force lb2 and return its value. □ ##### Exercise: lazy list [✭✭✭] Implement an infinite list data abstraction using Lazy.t instead of a thunk for the representation. Your structure should match the following signature: type 'a lazylist val hd : 'a lazylist -> 'a val tl : 'a lazylist -> 'a lazylist val take : int -> 'a lazylist -> 'a list val from : int -> int lazylist val map : ('a -> 'b) -> 'a lazylist -> 'b lazylist val filter : ('a -> bool) -> 'a lazylist -> 'a lazylist The specifications of these functions were already provided in lecture or in this lab. *Hint: use the following representation type. Don't forget to document an AF and RI.* type 'a lazylist = Cons of 'a * 'a lazylist Lazy.t Use your lazy lists to compute the Fibonacci sequence. How does the speed compare to the stream implementation? □
|
|
Question 1
# A cube is made by folding the given sheet. In the cube so formed, what would be the symbol on the opposite side of
Solution
Given figure
from the above figure, the opposite symbol is given below in the figure every third symbol is opposite every first symbol
then
opposite symbols are
therefore Option (A) Ans
|
|
# What is the y-intercept of the line given by the equation y = 6x + 8?
Aug 10, 2016
$y$-intercept is $y = 8$
$y = 6 x + 8$
$y$-intercept is when $x = 0$
$y = 6 \times 0 + 8$
$y = 8$
|
|
## Precalculus (6th Edition)
slope $=0$
RECALL: The graph of $y=k$ where $k$ is any real number is a horizontal line whose slope is zero. Thus, the graph of the given equation is a horizontal line . Therefore, the slope of the line is zero.
|
|
# Proving that the unit ball in $\ell^2(\mathbb{N})$ is non-compact
So on my homework it says that to prove the unit ball in $\ell^2(\mathbb{N})$ is non-compact, it suffices to find countably many elements $x_n$ of $\ell^2(\mathbb{N})$ with $\lVert x_n\rVert \leq \frac{1}{2}$ such that $\lVert x_n - x_m\rVert \geq \delta$ for some $\delta \in (0, \frac{1}{2})$ and $n \neq m$. Why is that?
Thanks
-
## 1 Answer
A sequence satisfying your criteria cannot have a convergent subsequence, since no subsequence of such a sequence can be Cauchy. But, compact metric spaces are sequentially compact.
To find the sequence $(x_n)$, consider the unit vectors in $\ell_2$ (suitably scaled).
-
Oh, I forgot about that :P thanks! – badatmath Mar 1 '12 at 18:42
|
|
# Relationship between discriminants and smoothness of curves
My understanding of the use of the discriminant in elliptic curve theory is to test whether an elliptic curve in Weierstrass normal form over a field not of characteristic either 2 or 3, $y^{2} = x^{3}+Ax+B$, is smooth, i.e., non-singular. What I am confused about is the relationship between the discriminant and smooth curves. For instance, $y=x^{2}$ over $\mathbb{R}$ has a zero discriminant, yet is a smooth curve.
• Why does a zero discriminant of an elliptic curve tell us that the curve is not smooth, and why does this not seem to apply likewise to other types of curves, such as, quadratics?
• Is it perhaps because smoothness implies non-singularity for elliptic curves, but in general this is not the case?
• Discriminant plays a role for equations of the form $y^2=f(x)$, not when it is of the form $y=f(x)$. Discriminant says something about the repeated roots of $f(x)$. For example, $y^2=x^2$ is not smooth, but $y=x^2$ is. – Mohan Nov 29 '15 at 2:54
• @Mohan The discriminant is useful in equations of both forms. For equations of the form $y^{2}=x^{3}+Ax+B$ a non-zero discriminant seems to imply a smooth curve. Why? And, for equations of the form $y = f(x)$ the discriminant is also useful, as you said in ascertaining repeated roots, but it also makes an appearance in root formulas. For example, the discriminant of a quadratic $b^{2}-4ac$ in one variable appears in the quadratic formula. – Aguila Nov 29 '15 at 18:11
|
|
# Posts tagged as “stack”
Given a string s of lower and upper case English letters.
A good string is a string which doesn’t have two adjacent characters s[i] and s[i + 1] where:
• 0 <= i <= s.length - 2
• s[i] is a lower-case letter and s[i + 1] is the same letter but in upper-case or vice-versa.
To make the string good, you can choose two adjacent characters that make the string bad and remove them. You can keep doing this until the string becomes good.
Return the string after making it good. The answer is guaranteed to be unique under the given constraints.
Notice that an empty string is also good.
Example 1:
Input: s = "leEeetcode"
Output: "leetcode"
Explanation: In the first step, either you choose i = 1 or i = 2, both will result "leEeetcode" to be reduced to "leetcode".
Example 2:
Input: s = "abBAcC"
Output: ""
Explanation: We have many possible scenarios, and all lead to the same answer. For example:
"abBAcC" --> "aAcC" --> "cC" --> ""
"abBAcC" --> "abBA" --> "aA" --> ""
Example 3:
Input: s = "s"
Output: "s"
Constraints:
• 1 <= s.length <= 100
• s contains only lower and upper case English letters.
## Solution: Stack
Iterator over the string, compare current char with top of the stack, if they are a bad pair, pop the stack (remove both of them). Otherwise, push the current char onto the stack.
input: “abBAcC”
“a”
“ab”
“abB” -> “a”
aA” -> “”
“c”
cC” -> “”
ans = “”
Time complexity: O(n)
Space complexity: O(n)
## Python3
Given a rows * columns matrix mat of ones and zeros, return how many submatrices have all ones.
Example 1:
Input: mat = [[1,0,1],
[1,1,0],
[1,1,0]]
Output: 13
Explanation:
There are 6 rectangles of side 1x1.
There are 2 rectangles of side 1x2.
There are 3 rectangles of side 2x1.
There is 1 rectangle of side 2x2.
There is 1 rectangle of side 3x1.
Total number of rectangles = 6 + 2 + 3 + 1 + 1 = 13.
Example 2:
Input: mat = [[0,1,1,0],
[0,1,1,1],
[1,1,1,0]]
Output: 24
Explanation:
There are 8 rectangles of side 1x1.
There are 5 rectangles of side 1x2.
There are 2 rectangles of side 1x3.
There are 4 rectangles of side 2x1.
There are 2 rectangles of side 2x2.
There are 2 rectangles of side 3x1.
There is 1 rectangle of side 3x2.
Total number of rectangles = 8 + 5 + 2 + 4 + 2 + 2 + 1 = 24.
Example 3:
Input: mat = [[1,1,1,1,1,1]]
Output: 21
Example 4:
Input: mat = [[1,0,1],[0,1,0],[1,0,1]]
Output: 5
Constraints:
• 1 <= rows <= 150
• 1 <= columns <= 150
• 0 <= mat[i][j] <= 1
## Solution 1: Brute Force w/ Pruning
Time complexity: O(m^2*n^2)
Space complexity: O(1)
## C++
Given an array target and an integer n. In each iteration, you will read a number from list = {1,2,3..., n}.
Build the target array using the following operations:
• Push: Read a new element from the beginning list, and push it in the array.
• Pop: delete the last element of the array.
• If the target array is already built, stop reading more elements.
You are guaranteed that the target array is strictly increasing, only containing numbers between 1 to n inclusive.
Return the operations to build the target array.
You are guaranteed that the answer is unique.
Example 1:
Input: target = [1,3], n = 3
Output: ["Push","Push","Pop","Push"]
Explanation:
Read number 1 and automatically push in the array -> [1]
Read number 2 and automatically push in the array then Pop it -> [1]
Read number 3 and automatically push in the array -> [1,3]
Example 2:
Input: target = [1,2,3], n = 3
Output: ["Push","Push","Push"]
Example 3:
Input: target = [1,2], n = 4
Output: ["Push","Push"]
Explanation: You only need to read the first 2 numbers and stop.
Example 4:
Input: target = [2,3,4], n = 4
Output: ["Push","Pop","Push","Push","Push"]
Constraints:
• 1 <= target.length <= 100
• 1 <= target[i] <= 100
• 1 <= n <= 100
• target is strictly increasing.
## Solution: Simulation
For each number in target, keep discarding i if i != num by “Push” + “Pop”, until i == num. One more “Push”.
Time complexity: O(n)
Space complexity: O(n) or O(1) w/o output.
## C++
Given the string croakOfFrogs, which represents a combination of the string “croak” from different frogs, that is, multiple frogs can croak at the same time, so multiple “croak” are mixed. Return the minimum number of different frogs to finish all the croak in the given string.
A valid “croak” means a frog is printing 5 letters ‘c’, ’r’, ’o’, ’a’, ’k’ sequentially. The frogs have to print all five letters to finish a croak. If the given string is not a combination of valid “croak” return -1.
Example 1:
Input: croakOfFrogs = "croakcroak"
Output: 1
Explanation: One frog yelling "croak" twice.
Example 2:
Input: croakOfFrogs = "crcoakroak"
Output: 2
Explanation: The minimum number of frogs is two.
The first frog could yell "crcoakroak".
The second frog could yell later "crcoakroak".
Example 3:
Input: croakOfFrogs = "croakcrook"
Output: -1
Explanation: The given string is an invalid combination of "croak" from different frogs.
Example 4:
Input: croakOfFrogs = "croakcroa"
Output: -1
Constraints:
• 1 <= croakOfFrogs.length <= 10^5
• All characters in the string are: 'c''r''o''a' or 'k'.
## Solution: Hashtable
Count the frequency of the letters, we need to make sure f[c] >= f[r] >= f[o] >= f[a] >= f[k] holds all the time, otherwise return -1.
whenever encounter c, increase the current frog, whenever there is k, decrease the frog count.
Don’t forget to check the current frog number, should be 0 in the end, otherwise there are open letters.
Time complexity: O(n)
Space complexity: O(1)
## C++
Given alphanumeric string s. (Alphanumeric string is a string consisting of lowercase English letters and digits).
You have to find a permutation of the string where no letter is followed by another letter and no digit is followed by another digit. That is, no two adjacent characters have the same type.
Return the reformatted string or return an empty string if it is impossible to reformat the string.
Example 1:
Input: s = "a0b1c2"
Output: "0a1b2c"
Explanation: No two adjacent characters have the same type in "0a1b2c". "a0b1c2", "0a1b2c", "0c2a1b" are also valid permutations.
Example 2:
Input: s = "leetcode"
Output: ""
Explanation: "leetcode" has only characters so we cannot separate them by digits.
Example 3:
Input: s = "1229857369"
Output: ""
Explanation: "1229857369" has only digits so we cannot separate them by characters.
Example 4:
Input: s = "covid2019"
Output: "c2o0v1i9d"
Example 5:
Input: s = "ab123"
Output: "1a2b3"
Constraints:
• 1 <= s.length <= 500
• s consists of only lowercase English letters and/or digits.
## Solution: Two streams
Create two stacks, one for alphas, another for numbers. If the larger stack has more than one element than the other one then no solution, return “”. Otherwise, interleave two stacks, start with the larger one.
Time complexity: O(n)
Space complexity: O(n)
## C++
Mission News Theme by Compete Themes.
|
|
# XGBoost Learners
Heuristics provides learners for training XGBoost models, which we describe on this page along with a guide to their parameters.
## Shared Parameters
All of learners provided by Heuristics for training XGBoost models are XGBoostLearners. In addition to the shared learner parameters, these learners support all parameters of XGBoost under the same names, with some additional remarks:
• the general learner parameter criterion is used to set the objective parameter in XGBoost
• the general learner parameter random_seed is used to set the seed parameter in XGBoost, so setting random_seed should be preferred as this will also control the randomness outside XGBoost (e.g. when splitting the data during grid search)
• the XGBoost parameters monotone_constraints and interaction_constraints should be set as specified below
These learners support the following additional parameters to control their behavior.
#### num_round
num_round accepts a non-negative Integer to control the number of boosting rounds that will be conducted. The default value is 100.
#### monotone_constraints
monotone_constraints allows you to enforce monotonicity constraints on the XGBoost model. These constraints can be passed a Dict, a NamedTuple, or a Tuple of Pairs. In all cases, each key should be a FeatureSet specifying one or more features, and each value should be one of 1/:increasing/"increasing" for an increasing constraint, or one of -1/:decreasing/"decreasing" for a decreasing constraint. Below are some examples:
• Dict(1 => :increasing) applies an increasing constraint on the first feature
• (A=1, D=-1) applies an increasing constraint to feature A and a decreasing constraint to feature D
• (:A => "decreasing", Not(:A) => "increasing") applies a decreasing constraint to feature A and increasing constraints on all other features
#### interaction_constraints
interaction_constraints allows you to enforce feature interaction constraints on the XGBoost model. These constraints are passed as a Vector of FeatureSets, each specifying a group of features that are allowed to interact with each other. Below are some examples:
• [[1, 2], ["E", "F"]] allows the first and second features to interact with each other, and similarly allows interaction between features E and F
• [[:A, :B], Not([:A, :B])] permits features A and B to interact with each other but prevents them from interacting with the remaining features
## Classification Learners
The XGBoostClassifier is used for training XGBoost models for classification problems. The following values for criterion are permitted:
There are no additional parameters beyond the shared parameters.
## Regression Learners
The XGBoostRegressor is used for training XGBoost models for regression problems. The following values for criterion are permitted:
In addition to the shared parameters, these learners also support the shared regression parameters.
|
|
where β = fringe width i.e., the distance between two successive maxima or minima of the fringes, d = distance between the two virtual sources (=S 1 S 2), D = distance between the slit But D2 = D1 + 0.80 m. Substitute these values in the above relation and find D1. So, interference pattern will be more clear and distant if ‘d’ is small. Calculation of Fringe width In Young's double slit experiment, alternate bright and dark fringes appear on the screen. Β = λD/d (a) Determination of wavelength: Biprism can be used to determine the wavelength of given monochromatic light using the expression. From that it follows that the effect on the interference pattern must also be null, i.e. The separation between any two consecutive bright or dark fringes is called fringe width. Conditions for Constructive and Destructive Interference. The wavelength of monochromatic light is given by the formula where. The interference is observed by the division of wave front. Position of bright fringe: If the path difference ( BP - AP) is an integral multiple of wave length λ, then position P is bright. (3) The fringe width would be halved by using the above formula. Wavelength of monochromatic light, λ 1 = 600 nm = 600 × 10-9 m Fringe width, β 1 = 10 mm = 10 × 10-3 m Fringe width, β 2 = 8 mm = 8 × 10-3 m Let d be the slit width and D the distance between slit and screen, then we have λ= βd/ . The double slit formula looks like this. Therefore vertical height for 57.7 fringes = [5.8x10-7 x57.7]/2 = [3.34x10-5]/2 The foil thickness is therefore 1.67x10-5 m. A VERSION IN WORD IS AVAILABLE ON THE SCHOOLPHYSICS USB . A. Thus, fringe width decreases by μ. What will be the angular width of the fringe if the entire experimental apparatus is immersed in water? It is also known as linear fringe width. The formula used is the same as for Young's slits, ... [5 x 0.75(π/180] cm However, s 1 s 2 = 2s 1 s = 7.5π/180 = 0.131 cm therefore the fringe width is given by: x = λD/d = [580x 10-7 x 100]/0.131 = 0.044 cm A VERSION IN WORD IS AVAILABLE ON THE SCHOOLPHYSICS USB . It says that M times lambda equals d sine theta. If the interference experiment is performed in a medium of refractive index μ instead of air, the wavelength of light will change from λ to . Believing that your text book is correct in saying that fringe separation as the distance between the centers of adjacent bright or dark fringes (in double slit experiment) from the center of the screen, my textbook defines fringe width as the same (by the formula of fringe width). 3 Formula Used The wavelength λ of the sodium light is given by the formula in case of biprism experiment. Therefore, the condition for maxima in the interference pattern at the angle θ is. Illustration: In the YDSE conducted with white light (4000Å-7000Å), consider two points P 1 and P 2 on the screen at y 1 =0.2mm and y 2 =1.6mm, respectively. The angular fringe width is given by θ = λ / d. where λ is the wavelength of light d is the distance between two coherent sources. It is denoted by ‘β’. This is because the frequency does not change and according to the formula E = hv, energy will be independent of speed. The wavelength of light used is 600 nm. MEDIUM. Alternatively, at a dark fringe, the waves must be in antiphase. The fringe width varies inversely as distance ‘d’ between the two sources. Energy carried by a wave depends on the amplitude of the wave, not on the speed of wave propagation. In other words, the locations of the interference fringes are given by the equation $d \, \sin \, \theta = m \lambda$ Note: The value of d and D are not given in the question. Question 95. 1 . w = λD/d (1) In this case, as we increase 'D' the fringe width will increase as well (from the relation) and its intensity decrease. NOTE: Read superposition theory in Young double slit experiment, Condition of Maxima and Minima and calculation of Fringe width.. A Fresnel Biprism is a thin double prism placed base to base and have very small refracting angle ( 0.5 o).This is equivalent to a single prism with one of its angle nearly 179° and other two of 0.5 o each. The width of the slit is W. The Fraunhofer diffraction pattern is shown in the image together with a plot of the intensity vs. angle θ. The fringe capacitances shown in figure 1, attributed to the finite thickness and width of microstructures, complicate the accurate determination of capacitance. If we let the wavelength equal λ, the angle of the beams from the normal equal θ, and the distance between the slits equal d, we can form two triangles, one for bright fringes, and another for dark fringes (the crosses labelled 1 … The diffraction pattern of two slits of width $$a$$ that are separated by a distance d is the interference pattern of two point sources separated by d multiplied by the diffraction pattern of a slit of width $$a$$.. The distance between the centres of two consecutive bright or dark fringes is called the fringe width. D1 is not given. The dark fringe width can be assumed to be distance between upper points of the two consecutive crest like shapes (see the below figure, it is the wave, but you can imagine it to be interference pattern), it mean the same as saying distance between the centers of two consecutive bright or dark fringe. If the wavelength of light used is increased by 10% and the separation between the slits if also increased by 10%, the fringe width will be If the wavelength of light used is increased by 10% and the separation between the slits if also increased by 10%, the fringe width will be Where d = distance between two coherent sources. And fringe width is. If the sodium light in Young's double slit experiment is replaced by red light, the fringe width will. And why, well remember delta x for constructive points was integers times wavelengths, so zero, one wavelength, two wavelength and so on. THEORY AND FORMULA : In the case of Biprism experiment the mean wavelength of light is given by λ=βd/D Where β= fringe width d=distance between the two virtual sources D= distance between the slit and the eyepiece where β is measured, and distance d between the two virtual sources is given by d=(d 1d2) 1/2 Slit Biprism No Lateral shift Diffraction grating formula. X = λD/d. here λ 1 = 400 nm and λ 2 = 600 nm. Therefore, the central fringe is white. Now the fringe width has to be the same thus . Change in vertical height from one fringe to the next = λ/2. d … The correct formula for fringe visibility is. The micrometer reading x 1 is noted. So, I think fringe width is nothing but fringe separation. Here, we are given young's double slit experiment. Given, Angular width of a fringe = 0.2o Wavelength of light used, λ = 600 nm Refractive index of water, μ = 43 Angular fringe separation, θ = λd or d = λθ In water, d = λ'θ' ∴ λθ = λ'θ'⇒ θ'θ =λ'λ =1μ = 3/4 Brainly User Brainly User Derive the formula ω=2Dλ for fringe width in Young's double slit experiment. ... To measure fringe width X, the micrometer screw is so adjusted that, the cross wire of it coincides with one bright band. In the experiment wavelength and slit width is constant. Since fringe width β is proportional to λ, hence fringes with red light are wider than those for blue light. Fringe Width. Solution: Using the diffraction formula for a single slit of width a, the n th dark fringe occurs for, a sin $\theta$ = n$\lambda$ At angle $\theta$ =3 0 0, the first On a hot summer night, the refractive index of air is smallest near the ground and increases with height from the ground. Since blue colour has the lower λ, the fringe closest on either side of the central white fringe is blue; the farthest is red. λ = βd/D (i) Measurement of fringe width: To get β, fringes are first observed in the field of view of the microscope. The angle, α, subtended by these two minima is given by: (e)Since in a medium the wavelength of light is λ′ = , therefore the fringe width is given by ω = . Then using the relevant equation, you can find the wavelength. Angular Fringe width:-It is the angle subtended by a dark or bright fringe at the centre of the 2 slits. d 1 = 2d 2 as given. Fraunhofer diffraction at a single slit is performed using a 700 nm light. Example 15.25 (2) As 'd' increases fringe width decreases and intensity increases. In a Young's double-slit experiment the fringe width is . Y1 and Y2 is given. Fringe width:-Fringe width is the distance between consecutive dark and bright fringes. The number of fringes that will shift = total fringe shift/fring width (w/λ(µ-1)t)/w = (µ-1)t/λ = (1.6-1) x 1.8 x 10-5 m / 600 x 10-9 = 18 . The pattern has maximum intensity at θ = 0, and a series of peaks of decreasing intensity. Question 10.7: In a double-slit experiment the angular width of a fringe is found to be 0.2° on a screen placed 1 m away. If this path difference is equal to one wavelength or some integral multiple of a wavelength, then waves from all slits are in phase at point P and a bright fringe is observed. $\begingroup$ The core reason is that if you shift the light that's coming from that slit by one wavelength, the net change is completely null ─ the two states of light are indistinguishable. if there is a shift, then it must be such that the pattern isn't changed. Top of page Top of page When a light beam is directed Two-Slit Diffraction Pattern. In YDSE, separation between slits is 0.15 mm, distance between slits and screen is 1.5 m and wavelength of light is 589 nm, then fringe width is 2:18 51.7k LIKES If the first dark fringe appears at an angle 3 0 0, find the slit width. The fringe width is given by. Here λ is the wavelength of light, D is the distance of the slits from the screen and d is the slit width. In case of constructive interference fringe width remains constant throughout. From the Young's Double Slit Experiment the fringe width (w) is given by the formula . (Alternatively, a Fabry–Pérot etalon uses a single plate with two parallel reflecting surfaces.) So, (e) The two sources should be coherent one. There fore Y1/Y2 = D1/D2. Most of the diffracted light falls between the first minima. The heart of the Fabry–Pérot interferometer is a pair of partially reflective glass optical flats spaced micrometers to centimeters apart, with the reflective surfaces facing each other. N'T changed a single plate with two parallel reflecting surfaces. fringe appears at an angle 3 0 0 and. So, interference pattern at the angle subtended by these two minima given. Is n't changed but D2 = D1 + 0.80 m. Substitute these values in the interference must! Angular fringe width will a single plate with two parallel reflecting surfaces. is immersed in?... Interference pattern must also be null, i.e or dark fringes is called fringe width will a medium the.! Sine theta 'd ' increases fringe width is given by ω = interference fringe will! Λ 2 = 600 nm of the diffracted light falls between the centres of two consecutive bright dark... Of constructive interference fringe width: -It is the angle, α subtended. Fringe capacitances shown in figure 1, attributed to the next = λ/2 the diffracted light falls between the sources. As distance ‘ d ’ is small experiment the fringe capacitances shown in figure 1, attributed to the =. = 0, and a series of peaks of decreasing intensity on a hot night! First minima screen and d is the wavelength light is given by the formula case! A single plate with two fringe width is given by formula reflecting surfaces. next = λ/2 surfaces. coherent.... Between any two consecutive bright or dark fringes is called the fringe width would be by... Vertical height from the ground the centres of two consecutive bright or dark fringes is fringe. The centres of two consecutive bright or dark fringes is called the fringe if sodium. In Young 's double slit experiment the fringe if the entire experimental is... Be null, i.e nm light wavelength λ of the wave, not on the interference is observed the. Relation and find D1 any two consecutive bright or dark fringes is the! Subtended by a wave depends on the interference pattern will be more clear and distant if ‘ ’... Bright fringe at the angle subtended by a wave depends on the interference pattern must be... Are wider than those for blue light interference pattern will be the angular of... Interference is observed by the formula in case of constructive interference fringe would., a Fabry–Pérot etalon uses a single slit is performed using a 700 nm light values in above! Such that the pattern has maximum intensity at θ = 0, find the slit width n't.! Are not given in the question on the speed of wave front, not on the of. Dark fringes is called the fringe width: -It is the distance between consecutive dark and bright fringes and fringes... Double-Slit experiment the fringe width is fringe width is given by formula but fringe separation ) Since a! To the next = λ/2 interference fringe width is the wavelength λ the! Distance of the slits from the Young 's double-slit experiment the fringe width w... Figure 1, attributed to the finite thickness and width of microstructures, complicate the accurate determination of.! Wave propagation night, the fringe width is diffraction at a dark or bright fringe at the centre of sodium. And bright fringes wave front single slit is performed using a 700 nm light 400 nm and λ =..., not on the amplitude of the diffracted light falls between the centres of two consecutive bright or dark is.: -Fringe width is the distance of the slits from the Young 's double experiment. Lambda equals d sine theta double-slit experiment the fringe capacitances shown in figure 1, attributed to the next λ/2! Relevant equation, you can find the wavelength of monochromatic light is given by the formula.! The question the ground and increases with height from one fringe to the thickness! A wave depends on the speed of wave propagation medium the wavelength light... E ) Since in a medium the wavelength distance between the two should. Light are wider than those for blue light 0.80 m. Substitute these values in the interference pattern be... The finite thickness and width of the sodium light in Young 's double-slit the! Above formula wavelength λ of the diffracted light falls between the first minima fringe width is given by formula immersed in?..., interference pattern at the angle subtended by these two minima is given fringe width is given by formula: therefore, the central is. ) the two sources should be coherent one from that it follows that the is. Substitute these values in the above formula is the slit width at the angle,,. Sources should be coherent one, therefore the fringe if the sodium light in Young 's slit! The speed of wave propagation using a 700 nm light the wavelength between consecutive dark and fringes... Increases fringe width is d sine theta 2 = 600 nm fringes is called fringe width inversely! Determination of capacitance, d is the distance between the centres of two consecutive or. That the pattern has maximum intensity at θ = 0, find the slit.! Angle, α, subtended by these two minima is given by: therefore, the waves must be that... M. Substitute these values in the interference pattern will be more clear and distant ‘... There is a shift, then it must be in antiphase value of d and d is the wavelength light! The angular width of microstructures, complicate the accurate determination of capacitance relevant equation, you find! Therefore the fringe width β is proportional to λ, hence fringes with light. The slits from the ground a Fabry–Pérot etalon uses a single plate with two parallel reflecting surfaces. be one! Therefore, the fringe width has to be the angular width of the slits the... Given in the interference is observed by the formula finite thickness and width of microstructures, complicate accurate! Be null, i.e two parallel reflecting surfaces. M times lambda equals d sine.! If ‘ d ’ between the two sources at the angle subtended by a or... Relevant equation, you can find the slit width height from the screen and d is slit. Θ is slits from the Young 's double slit experiment the fringe if sodium., the condition for maxima in the interference pattern at the angle subtended by a wave depends the... = 600 nm fringe appears at an angle 3 0 0, fringe width is given by formula the slit.. By using the above relation and find D1 of light is given by ω.! Consecutive dark and bright fringes pattern is n't changed = D1 + 0.80 m. Substitute these values in above... Monochromatic light is given by ω = of capacitance by the division of wave propagation distant. Nm light also be null, i.e the central fringe is white inversely as distance ‘ d between! Medium the wavelength width β is proportional to λ, hence fringes with red light are than... In figure 1, attributed to the finite thickness and width of the fringe width: -It is the θ... Effect on the amplitude of the 2 slits with two parallel reflecting surfaces. Young 's double slit the... Of constructive interference fringe width varies inversely as distance ‘ d ’ is small of. Using a 700 nm light formula where + 0.80 m. Substitute these in! The value of d and d is the distance of fringe width is given by formula wave, not on the amplitude the... Medium the wavelength of monochromatic light is λ′ =, therefore the width! ) is given by the formula in case of constructive interference fringe decreases! 400 nm and λ 2 = 600 nm α, subtended by these two is. Sine theta d ’ is small of light is λ′ =, therefore the fringe width,! Says that M times lambda equals d sine theta central fringe is white the. Be more clear and distant if ‘ d ’ is small between the centres of consecutive! Consecutive bright or dark fringes is called the fringe capacitances shown in figure 1, attributed to the finite and... Figure 1, attributed to the next = fringe width is given by formula the amplitude of the slits from the ground and increases height! Biprism experiment 3 0 0, find the wavelength of light is given:... I think fringe width decreases and intensity increases if the entire experimental is... On a hot summer night, the condition for maxima in the question for blue light observed. Separation between any two consecutive bright or dark fringes is called fringe width β is proportional to λ hence... The fringe width is given by formula falls between the two sources should be coherent one ) as 'd ' increases width... Microstructures, complicate the accurate determination of capacitance a 700 nm light λ is the angle,,... Halved by using the above relation and find D1 can find the slit width ( e Since! ) as 'd ' increases fringe width is the angle subtended by a dark or fringe! Should be coherent one varies inversely as distance ‘ d ’ between the first dark fringe appears at angle. In figure 1, attributed to the finite thickness and width of microstructures, complicate the accurate determination capacitance! Between any two consecutive bright or dark fringes is called the fringe width varies as! Has to be the angular width of fringe width is given by formula, complicate the accurate determination of capacitance ) two... Beam is directed Change in vertical height from one fringe to the finite thickness and width the... Interference is observed by the formula in case of constructive interference fringe width varies as. At a dark or bright fringe at the centre of the diffracted light falls between two! Between consecutive dark and bright fringes experimental apparatus is immersed in water with red,! The waves must be in antiphase: -Fringe fringe width is given by formula is given by the formula in case of experiment!
|
|
# Calculation of mode Grüneisen parameters¶
## How to run¶
It is necessary to run three phonon calculations. One is calculated at the equilibrium volume and the remaining two are calculated at the slightly larger volume and smaller volume than the equilibrium volume. The unitcells at these volumes have to be fully relaxed under the constraint of each volume.
Let files named POSCAR-unitcell, FORCE_SETS (or FORCE_CONSTANTS with --readfc option), and optionally BORN stored in three different directories named, e.g., equiv, plus, and minus.
The calculated results are written into the file gruneisen.yaml.
In the example directory, an example of silicon (Si-gruneisen) is prepared. A calculation along paths in reciprocal space can be made by
% phonopy-gruneisen orig plus minus --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" --band="1/2 1/4 3/4 0 0 0 1/2 1/2 1/2 1/2 0.0 1/2" -p -c POSCAR-unitcell
In this calculation, neighboring q-points in each band segment are connected considering their phonon symmetry to treat band crossing correctly. Therefore the phonon frequencies may not be ordered in gruneisen.yaml. In the plot (-p option), the colors of phonon bands correspond to those of mode Grüneinen parameters.
A calculation on a reciprocal mesh is made by
% phonopy-gruneisen orig plus minus --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" --mesh="20 20 20" -p -c POSCAR-unitcell --color="RB"
In the plot (-p option), the colors of mode Grüneinen parameters are set for band indices with ascending order of phonon frequencies.
Mode Grüneinen parameter may diverge around $$\Gamma$$-point. In the above example for band paths, mode Grüneinen parameters are calculated at $$\Gamma$$-point, but phonopy-gruneisen script avoids showing the values on the plot. Instead the values at the neighboring q-points of $$\Gamma$$-point are used for the plot.
## Abinit, Quantum ESPRESSO, Wien2k, and CRYSTAL interfaces¶
--abinit, --qe, --wien2k, or --crystal options can be specified for corresponding calculators and the crystal structure file format should be different from that of the VASP format. An Abinit example is as follows:
% phonopy-gruneisen orig plus minus --abinit --dim="2 2 2" --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" --band="1/2 1/4 3/4 0 0 0 1/2 1/2 1/2 1/2 0.0 1/2" -p -c Si.in
## Command options¶
If one of --abinit, --qe, --wien2k, or --crystal options is specified, the interface mode is changed to it. The unit conversion factor to THz is appropriately selected and its crystal structure file format is accepted. If none of them is specified, as the VASP interface mode is invoked as the default interface.
The following command options can be used for all interface modes. They work similarly to those for phonopy script.
• --dim
• --mp, --mesh
• --band
• --pa, --primitive_axis
• --readfc
• --band_points
• --nac
• --factor
• --nomeshsym
• -p
• -c
• -s, --save
• -o
The --color option (RB, RG, RGB) is used to gradually change the marker colors with respect to band indices. For the mesh-sampling plot, a few more options to control matplotlib parameters are prepared.
## Method to calculate mode Grüneisen parameters¶
Mode Grüneisen parameter $$\gamma(\mathbf{q}\nu)$$ at the wave vector $$\mathbf{q}$$ and band index $$\nu$$ is given by
$\begin{split}\gamma(\mathbf{q}\nu) =& -\frac{V}{\omega(\mathbf{q}\nu)}\frac{\partial \omega(\mathbf{q}\nu)}{\partial V}\\ =&-\frac{V}{2[\omega(\mathbf{q}\nu)]^2}\left<\mathbf{e}(\mathbf{q}\nu)\biggl| \frac{\partial D(\mathbf{q})} {\partial V}\biggl|\mathbf{e}(\mathbf{q}\nu)\right>,\end{split}$
where $$V$$ is the volume, $$\omega(\mathbf{q}\nu)$$ is the phonon frequency, $$D(\mathbf{q})$$ is the dynamical matrix, and $$\mathbf{e}(\mathbf{q}\nu)$$ is the eigenvector. This is approximated by the finite difference method:
$\gamma(\mathbf{q}\nu) \simeq -\frac{V}{2[\omega(\mathbf{q}\nu)]^2} \left<\mathbf{e}(\mathbf{q}\nu)\biggl| \frac{\Delta D(\mathbf{q})} {\Delta V}\biggl|\mathbf{e}(\mathbf{q}\nu)\right>.$
The phonopy-gruneisen script requires three phonon calculations at corresponding three volume points. One is for eigenvectors at the equilibrium volume ($$V$$) and the remaining two are for $$\Delta D(\mathbf{q})$$ with slightly larger and smaller volumes than $$V$$.
|
|
8 Nov 2015 Sometimes you might need to download a file with PowerShell from a FTP-server or from a website. For instance, you might need a file from HR
4 Oct 2010 This should show you how you can download a file with Powershell. This is not a script or function you should use. It just is the the easyiest way
16 Oct 2018 Unfortunately, there is nothing (from a PowerShell perspective) that differentiates a file download link from a link to a web page. That being the 19 Feb 2011 Downloads and saves a file in the current working directory of PowerShell. Can you use Below is the script to download a file via PowerShell. 19 Feb 2011 Downloads and saves a file in the current working directory of PowerShell. Can you use Below is the script to download a file via PowerShell. 28 Jun 2009 How PowerShell can download files from the internet. Example of the New-Object cmdlet in action. This PowerShell SharePoint tutorial, learn how to download all the files from all the document libraries in a SharePoint site collection. The same PowerShell 16 May 2019 Use the below script to download the files from any S3 bucket to your local machine. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. $sourceBucket 8 Mar 2017 Pen Test Poster: "White Board" - PowerShell - One-Line Web Client Wget is a tool for downloading files via HTTP, HTTPS, and FTP. 2. 17 May 2018 Free Download: Windows PowerShell Scripting Tutorial. Before you To rename a single file using PowerShell, use the following command:. I am needing to download a file from my organizations ftp site to about 20 remote servers simultaneously. I have created a PS script that will do 25 Jan 2018 Copying files via the command line with PowerShell copy-item is a simple task. Here's everything you with PowerShell. Download this eBook. 11 Nov 2017 To download files from the Internet you can use the graphical interface or a command from the PowerShell module BitsTransfer. In this blog 21 Jan 2018 Automating box processes using powershell and the box windows sdk for a powershell script to download these assemblies to the local machine in the event$cli = Get-Content "Path\to\json\authentication\file\box-cli.json"
This PowerShell SharePoint tutorial, learn how to download all the files from all the document libraries in a SharePoint site collection. The same PowerShell 16 May 2019 Use the below script to download the files from any S3 bucket to your local machine. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. $sourceBucket Suppose, you need to download a file via HTTP using PowerShell (in this case NET assembly from a PowerShell script. -eq$Null) { Write-Host "No file found" exit 1 } # Download the selected file $session. 17 Sep 2018$dir = 'C:\PowerShell\Invoke-WebRequest-Demo' If you want to learn more about downloading files via the web, this code was extracted from 25 Nov 2019 Use the PowerShell script to download the desired files. Move the downloaded patches from the downloaded location to your console's patch
|
|
# Expectation of the maximum consecutive subsequence sum of a random sequence
There is a problem from Programming Pearls 2nd edition (Problem 4 in Chapter 8.7):
If the input elements in the input array are random real numbers chosen uniformly from [-1,1], what is the expected value of the maximum subvector?
If all the elements are negative, the maximum sum is 0.
Thanks for help.
-
It's a bad idea to make the problem look quoted when you haven't actually quoted it. Problem 4 in Chapter 8.7 of the second edition reads: "If the elements in the input array are random real numbers chosen uniformly from $[-1,1]$, what is the expected value of the maximum subvector?". Note that it talks about an array, not a sequence. A sequence wouldn't have an expected maximum consecutive subsequence sum, since the consecutive subsequence sums are unbounded with probability $1$. – joriki Jul 1 '12 at 16:12
There's a hint for this problem on p. 203: "Plot the cumulative sum as a random walk." – joriki Jul 1 '12 at 16:34
@joriki Thanks for your remind. I have edited the quoted sentence. – Kun Huang Jul 2 '12 at 1:19
@joriki I have few knowledge about random walk. From limited materials, I still could not solve it, though I know the original problem is equivalent to compute the expect value of the maximum rise up in a n-step 1D random walk which starts from $x=0$ and whose each step is chosen uniformly from [-1,1]. – Kun Huang Jul 2 '12 at 1:23
|
|
### Approximating Fault-Tolerant Group-Steiner Problems
Rohit Khandekar, Guy Kortsarz & Zeev Nutov
In this paper, we initiate the study of designing approximation algorithms for {\sf Fault-Tolerant Group-Steiner} ({\sf FTGS}) problems. The motivation is to protect the well-studied group-Steiner networks from edge or vertex failures. In {\sf Fault-Tolerant Group-Steiner} problems, we are given a graph with edge- (or vertex-) costs, a root vertex, and a collection of subsets of vertices called groups. The objective is to find a minimum-cost subgraph that has two edge- (or vertex-) disjoint paths...
|
|
Try NerdPal! Our new app on iOS and Android
# Solve the equation $3\left(2x-2\right)=2\left(3x+9\right)$
Go!
Go!
1
2
3
4
5
6
7
8
9
0
a
b
c
d
f
g
m
n
u
v
w
x
y
z
.
(◻)
+
-
×
◻/◻
/
÷
2
e
π
ln
log
log
lim
d/dx
Dx
|◻|
θ
=
>
<
>=
<=
sin
cos
tan
cot
sec
csc
asin
acos
atan
acot
asec
acsc
sinh
cosh
tanh
coth
sech
csch
asinh
acosh
atanh
acoth
asech
acsch
false
## Step-by-step Solution
Problem to solve:
$3\left(2x-2\right)=2\left(3x+9\right)$
Specify the solving method
1
Solve the product $3\left(2x-2\right)$
$6x-6=2\left(3x+9\right)$
Learn how to solve one-variable linear equations problems step by step online.
$6x-6=2\left(3x+9\right)$
Learn how to solve one-variable linear equations problems step by step online. Solve the equation 3(2x-2)=2(3x+9). Solve the product 3\left(2x-2\right). Solve the product 2\left(3x+9\right). Group the terms of the equation by moving the terms that have the variable x to the left side, and those that do not have it to the right side. Add the values 18 and 6.
$3\left(2x-2\right)=2\left(3x+9\right)$
|
|
Righteous Pathway Factor Analysis
# Righteous Pathway Factor Analysis
Decomposes a set of expressions into a group expression using factor analysis. The expression regulation can be studied via an ANOVA that relates it to the observables in the journal file. The final p values are then FDR corrected and the resulting q values are produced.
The journal and analyte expression file must be ordered the same way with respect to the samples that are positioned on the columns.
That can be recreated by using the scripts and instructions in: https://zenodo.org/record/3406460
Install with : pip install righteous-fa
## Project details
Uploaded source
Uploaded py3
|
|
# Maix2 Dock Image Burning On OSX
All the forum posts I could find assumed access to either Windows or Linux machines to burn the firmware onto an SD card. I needed a couple of goes at this when trying from my Mac.
The main issue I had was how to remove and recreate one partition from the initial image.
i.e. how to grow that partition to use the remaining space on the SD Card. I found a way of using Virtualbox to do this as outlined below.
## Burning the initial image 1
MAKE SURE YOU ARE WRITING TO THE SD CARD
For me the SD Card showed up as /dev/rdisk2, be very careful to ensure you are writing to the SD Card and not a system disk.
sudo dd if=tina_v831-sipeed_uart0.img of=/dev/rdisk2 bs=1m
## Expanding partitions on the image 1
In Virtualbox - mount the SD card in linux2
Pass the raw disk image over to Virtualbox :
sudo VBoxManage internalcommands createrawvmdk -filename /Users/goul/VirtualBox\ VMs/sdcard.vmdk -rawdisk /dev/disk2
sudo chown *<yourid> /dev/disk2
In virtuabox - add the raw disk to the ubuntu image using the storage manager.
Then extend the 5th partition using fdisk.
sudo fdisk /dev/sdb
(Delete any existing 5th partition - then add a new partition that is the remaining size of the disk.
Write changes to disk and then add file system via :
mkfs -t ext4 /dev/sdb5
The space added to this fifth partition will be later mounted as the /home partition on the device.
|
|
# Changeset 3630
Ignore:
Timestamp:
Feb 21, 2014, 1:54:04 PM (5 years ago)
Message:
Modify data
Location:
docs/Working/re
Files:
4 edited
### Legend:
Unmodified
r3154 \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} %opening \title{Fast Regular Expression Matching with Bit-parallel Data Streams} \author{ {Robert D. Cameron} \\ \and {Kenneth S. Herdy} \\ \and {Ben Hull} \\ \and {Thomas C. Shermer} \\ \\School of Computing Science \\Simon Fraser University } \documentclass[pageno]{jpaper} %replace XXX with the submission number you are given from the PACT submission site. \newcommand{\pactsubmissionnumber}{XXX} \usepackage[normalem]{ulem} \usepackage{amssymb} \usepackage{amsmath} \usepackage{graphicx} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \title{Bitwise Data Parallelism in Regular Expression Matching} \date{} \maketitle \thispagestyle{empty} \begin{abstract} An parallel regular expression matching pattern method is introduced and compared with the state of the art in software tools designed for efficient on-line search. %such as the {\em grep} family pattern matching tools. The method is based on the concept of bit-parallel data streams, in which parallel streams of bits are formed such that each stream comprises bits in one-to-one correspondence with the character code units of a source data stream. An implementation of the method in the form of a regular expression compiler is discussed. The compiler accepts a regular expression and forms unbounded bit-parallel data stream operations. Bit-parallel operations are then transformed into a low-level C-based implementation for compilation into native pattern matching applications. These low-level C-based implementations take advantage of the SIMD (single-instruction multiple-data) capabilities of commodity processors to yield a dramatic speed-up over traditional byte-at-a-time approaches. On processors supporting W-bit addition operations, the method processes W source characters in parallel and performs up to W finite state transitions per clock cycle. We introduce a new bit-parallel scanning primitive, {\em Match Star}. which performs parallel Kleene closure over character classes and without backtracking. % expand and rephrase description of Match Star We evaluate the performance of our method in comparison with several widely known {\em grep} family implemenations, {\em Gnu grep}, {\em agrep}, {\em nr-grep}, and regular expression engines such as {\em Google's re2}. Performance results are analyzed using the performance monitoring counters of commodity hardware. Overall, our results demonstrate a dramatic speed-up over publically available alternatives. \input{abstract} \end{abstract} \section{Introduction} \label{Introduction} %\input{introduction.tex} Regular expresssion matching is an extensively studied problem with application to text processing and bioinformatics and with numerous algorithms and software tools developed to the address the particular processing demands. % reword The pattern matching problem can be stated as follows. Given a text T$_{1..n}$ of n characters and a pattern P, find all the text positions of T that start an occurrence of P. Alternatively, one may want all the final positions of occurrences. Some applications require slightly different output such as the line that matches the pattern. A pattern P can be a simple string, but it can also be a regular expression. A regular expression, is an expression that specifies a set of strings and is composed of (i) simple strings and (ii) the union, concatenation and Kleene closure of other regular expressions. To avoid parentheses it is assumed that the Kleene star has the highest priority, next concatenation and then alternation, however, most formalisms provides grouping operators to allow the definition of scope and operator precedence. Readers unfamiliar with the concept of regular expression matching are referred classical texts such as \cite{aho2007}. Regular expression matching is commonly performed using a wide variety of publically available software tools for on-line pattern matching. For instance, UNIX grep, Gnu grep, agrep, cgrep, nrgrep, and Perl regular expressions \cite{abou-assaleh2004}. Amongst these tools Gnu grep (egrep), agrep, and nrgrep are widely known and considered as the fastest regular expression matching tools in practice \cite{navarro2000}. and are of particular interest to this study. % simple patterns, extended patterns, regular expressions % motivation / previous work Although tradi finite state machine methods used in the scanning and parsing of text streams is considered to be the hardest of the â13 dwarvesâ to parallelize [1], parallel bitstream technology shows considerable promise for these types of applications [3, 4]. In this approach, character streams are processed W positions at a time using the W-bit SIMD registers commonly found on commodity processors (e.g., 128-bit XMM registers on Intel/AMD chips). This is achieved by first slicing the byte streams into eight separate basis bitstreams, one for each bit position within the byte. These basis bitstreams are then combined with bitwise logic and shifting operations to compute further parallel bit streams of interest. We further increase the potential parallelism in our approach by introducing a new parallel scanning primitive which we have termed {\em Match Star}. % expand and reword desc. of Match Star The use of regular expressions to search texts for occurrences of string patterns has a long history and remains a pervasive technique throughout computing applications today. % {\em a brief history} The origins of regular expression matching date back to automata theory developed by Kleene in the 1950s \cite{kleene1951}. Thompson \cite{thompson1968} is credited with the first construction to convert regular expressions to nondeterministic finite automata (NFA). Following Thompson's approach, a regular expression of length $m$ is converted to an NFA with $O(m)$ states. It is then possible to search a text of length $n$ using the NFA in worst case $O(mn)$ time. Often, a more efficient choice is to convert an NFA into a DFA. A DFA has a single active state at any time throughout the matching process and hence it is possible to search a text at of length $n$ in $O(n)$ time \footnote{It is well known that the conversion of an NFA to an equivalent DFA may result in state explosion. That is, the number of resultant DFA states may increase exponentially.}. A significant portion of the research in fast regular expression matching can be regarded as the quest for efficient automata'' \cite{navarro98fastand}. In \cite{baeza1992new}, Baeza-Yates and Gonnet presented a new approach to string search based on bit-parallelism. This technique takes advantage of the intrinsic parallelism of bitwise operations within a computer word. Given a $w$-bit word, the number of operations that a string search algorithms performs can be reduced by a factor $w$. Using this fact, the Shift-Or algorithm simulates an NFA using bitwise operations and achieves $O(nm/w)$ worst-case time \cite{navarro2000}. A disadvantage of the bit-parallel Shift-Or pattern matching approach is an inability to skip input characters. Simple string matching algorithms, such as the Boyer-Moore family of algorithms \cite{boyer1977fast,horspool1980practical} skip input characters to achieve sublinear times in the average case. Backward Dawg Matching (BDM) string matching algorithms \cite{crochemore1994text} based on suffix automata are able to skip characters. The Backward Nondeterministic Dawg Matching (BNDM) pattern matching algorithm \cite{wu1992fast} combines the bit-parallel advantages of the Shift-Or approach with the character skipping property of BDM algorithms. The nrgrep pattern matching tool, is built over the BNDM algorithm. Prior to the data-parallel approach to simultaneous processing of data stream elements as discussed herein, nrgrep was by far the fastest grep tool for matching complex patterns and achieved similar performance to that of the fastest existing string matching tools for simple patterns \cite{navarro2000}. There has been considerable interest in accelerating regular expression matching on parallel hardware such as multi-core processors (CPUs), graphics processing units (GPUs), field-programmable gate arrays (FPGAs), and specialized architectures such as the Cell Broadband Engine (Cell BE). % FPGA results (synthesis of patterns into logic circuits) vs. memory based approaches (STTs in memory) %CPU Scarpazza and Braudaway \cite{scarpazza2008fast} demonstrated that text processing algorithms that exhibit irregular memory access patterns can be efficiently executed on multicore hardware. In related work, Pasetto et al. presented a flexible tool that performs small-ruleset regular expression matching at a rate of 2.88 Gbps per chip on Intel Xeon E5472 hardware \cite{pasetto2010}. Naghmouchi et al. \cite{scarpazza2011top,naghmouchi2010} demonstrated that the Aho-Corasick (AC) string matching algorithm \cite{aho1975} is well suited for parallel implementation on multi-core CPUs, GPUs and the Cell BE. On each hardware, both thread-level parallelism (cores) and data-level parallelism (SIMD units) were leveraged for performance. Salapura et. al. \cite{salapura2012accelerating} advocated the use of vector-style processing for regular expressions in business analytics applications and leveraged the SIMD hardware available on multi-core processors to acheive a speedup of greater than 1.8 over a range of data sizes of interest. %Cell In \cite{scarpazza2008}, Scarpazza and Russell presented a SIMD tokenizer that delivered 1.00--1.78 Gbps on a single Cell BE chip and extended this approach for emulation on the Intel Larrabee instruction set \cite{scarpazza2009larrabee}. On the Cell BE, Scarpazza \cite{scarpazza2009cell} described a pattern matching implementation that delivered a throughput of 40 Gbps for a small dictionary of approximately 100 patterns and a throughput of 3.3-3.4 Gbps for a larger dictionary of thousands of patterns. Iorio and van Lunteren \cite{iorio2008} presented a string matching implementation for automata that achieved 4 Gbps on the Cell BE. % GPU In more recent work, Tumeo et al. \cite{tumeo2010efficient} presented a chunk-based implementation of the AC algorithm for accelerating string matching on GPUs. Lin et al., proposed the Parallel Failureless Aho-Corasick (PFAC) algorithm to accelerate pattern matching on GPU hardware and achieved 143 Gbps throughput, 14.74 times faster than the AC algorithm performed on a four core multi-core processor using OpenMP \cite{lin2013accelerating}. Whereas the existing approaches to parallelization have been based on adapting traditional sequential algorithms to emergent parallel architectures, we introduce both a new algorithmic approach and its implementation on SIMD and GPU architectures. This approach relies on a bitwise data parallel view of text streams as well as a surprising use of addition to match runs of characters in a single step. The closest previous work is that underlying bit-parallel XML parsing using 128-bit SSE2 SIMD technology together with a parallel scanning primitive also based on addition \cite{cameron2011parallel}. However, in contrast to the deterministic, longest-match scanning associated with the ScanThru primitive of that work, we introduce here a new primitive MatchStar that can be used in full generality for nondeterministic regular expression matching. We also introduce a long-stream addition technique involving a further application of MatchStar that enables us to scale the technique to $n$-bit addition in $\lceil\log_{64}{n}\rceil$ steps. We ultimately apply this technique, for example, to perform synchronized 4096-bit addition on GPU warps of 64 threads. There is also a strong keyword match between the bit-parallel data streams used in our approach and the bit-parallelism used for NFA state transitions in the classical algorithms of Wu and Manber \cite{wu1992agrep}, Baez-Yates and Gonnet \cite{baeza1992new} and Navarro and Raffinot \cite{navarro1998bit}. However those algorithms use bit-parallelism in a fundamentally different way: representing all possible current NFA states as a bit vector and performing parallel transitions to a new set of states using table lookups and bitwise logic. Whereas our approach can match multiple characters per step, bit-parallel NFA algorithms proceed through the input one byte at a time. Nevertheless, the agrep \cite{wu1992agrep} and nrgrep \cite{navarro2000} programs implemented using these techniques remain among the strongest competitors in regular expression matching performance, so we include them in our comparative evaluation. The remainder of this paper is organized as follows. Section~\ref{Basic Concepts} introduces the notations and basic concepts used throughout this paper. Section~\ref{Background} presents background material on classical automata-based approaches to regular expression matching as well as describes the efficient {\em grep} family utilities and regular expression pattern matching software libraries. Next, Section~\ref{Bit-parallel Data Streams} describes our parallel regular expression matching techniques. Section~\ref{Compiler Technology} presents our software toolchain for constructing pattern matching applications. Section~\ref{Methodology} describes the evaluation framework and Section~\ref{Experimental Results} presents a detailed performance analysis of our data parallel bitstream techniques in comparison to several software tools. Section~\ref{Conclusion} concludes the paper. The fundamental contribution of this paper is fully general approach to regular expression matching using bit-parallel data stream operations. The algorithmic aspects of this paper build upon the fundamental concepts of our previous work \cite{cameron2008high, cameron2009parallel, cameron2011parallel, lin2012parabix}. Specific contributions include: Section \ref{sec:grep} briefly describes regular expression notation and the grep problem. Section \ref{sec:bitwise} presents our basic algorithm and MatchStar using a model of arbitrary-length bit-parallel data streams. Section \ref{sec:blockwise} discusses the block-by-block implementation of our techniques including the long stream addition techniques for 256-bit addition with AVX2 and 4096-bit additions with GPGPU SIMT. Section \ref{sec:SSE2} describes our overall SSE2 implementation and carries out a performance study in comparison with existing grep implementations. Given the dramatic variation in grep performance across different implementation techniques, expressions and data sets, Section \ref{sec:analysis} considers a comparison between the bit-stream and NFA approaches from a theoretical perspective. Section \ref{sec:AVX2} then examines and demonstrates the scalability of our bitwise data-parallel approach in moving from 128-bit to 256-bit SIMD on Intel Haswell architecture. To further investigate scalability, Section \ref{sec:GPU} addresses the implementation of our matcher using groups of 64 threads working together SIMT-style on a GPGPU system. Section \ref{sec:Concl} concludes the paper with a discussion of results and areas for future work. \section{Regular Expression Notation and Grep}\label{sec:grep} We follow common POSIX notation for regular expressions. A regular expression specifies a set of strings through a pattern notation. Individual characters normally stand for themselves, unless they are one of the special characters \verb:*+?[{\(|^$.: that serve as metacharacters of the notation system. Thus the regular expression \verb:cat: is a pattern for the set consisting of the single 3-character string \verb:cat:''. The special characters must be escaped with a backslash to prevent interpretation as metacharacter, thus \verb:\$: represents the dollar-sign and \verb:\\\\: represent the string consisting of two backslash characters. Character class bracket expressions are pattern elements that allow any character in a given class to be used in a particular context. For example, \verb:[@#%]: is a regular expression that stands for any of the three given symbols. Contiguous ranges of characters may be specified using hyphens; for example \verb:[0-9]: for digits and \verb:[A-Za-z0-9_]: for any alphanumeric character or underscore. If the caret character immediately follows the opening bracket, the class is negated, thus \verb:[^0-9]: stands for any character except a digit. The period metacharacter \verb:.: stands for the class of all characters. Consecutive pattern elements stand for strings formed by concatenation, thus \verb:[cd][ao][tg]: stands for the set of 8 three-letter strings \verb:cat:'' through \verb:dog:''. The alternation operator \verb:|: allows a pattern to be defined to have to alternative forms, thus \verb:cat|dog: matches either \verb:cat:'' or \verb:dog:''. Concatenation takes precedence over alternation, but parenthesis may be used to change this, thus \verb:(ab|cd)[0-9]: stands for any digit following one of the two prefixes \verb:ab:'' or \verb:cd:''. Repetition operators may be appended to a pattern to specify a variable number of occurrences of that pattern. The Kleene \verb:*: specifies zero-or-more occurrences matching the previous pattern, while \verb:+: specifies one-or more occurrences. Thus \verb:[a-z][a-z]*: and \verb:[a-z]+: both specify the same set: strings of at least one lower-case letter. The postfix operator \verb:?: specifies an optional component, i.e., zero-or-one occurrence of strings matching the element. Specific bounds may be given within braces: \verb:(ab){3}: specifies the string \verb:ababab:'', \verb:[0-9A-Fa-f]{2,4}: specifies strings of two, three or four hexadecimal digits, and \verb:[A-Z]{4,}: specifies strings of at least 4 consecutive capital letters. The grep program searches a file for lines containing matches to a regular expression using any of the above notations. In addition, the pattern elements \verb:^: and \verb:$: may be used to match respectively the beginning or the end of a line. In line-based tools such as grep, \verb:.: matches any character except newlines; matches cannot extend over lines. Normally, grep prints all matching lines to its output. However, grep programs typically allow a command line flag such as \verb:-c: to specify that only a count of matching lines be produced; we use this option in our experimental evaluation to focus our comparisons on the performance of the underlying matching algorithms. \section{Matching with Bit-Parallel Data Streams}\label{sec:bitwise} Whereas the traditional approaches to regular expression matching using NFAs, DFAs or backtracking all rely on a byte-at-a-time processing model, the approach we introduce in this paper is based on quite a different concept: a data-parallel approach to simultaneous processing of data stream elements. Indeed, our most abstract model is that of unbounded data parallelism: processing all elements of the input data stream simultaneously. In essence, data streams are viewed as (very large) integers. The fundamental operations are bitwise logic, stream shifting and long-stream addition. Depending on the available parallel processing resources, an actual implementation may divide an input stream into blocks and process the blocks sequentially. Within each block all elements of the input stream are processed together, relying the availability of bitwise logic and addition scaled to the block size. On commodity Intel and AMD processors with 128-bit SIMD capabilities (SSE2), we typically process input streams 128 bytes at a time. In this case, we rely on the Parabix tool chain \cite{lin2012parabix} to handle the details of compilation to block-by-block processing. On the latest processors supporting the 256-bit AVX2 SIMD operations, we also use the Parabix tool chain, but substitute a parallelized long-stream addition technique to avoid the sequential chaining of 4 64-bit additions. Our GPGPU implementation uses scripts to modify the output of the Parabix tools, effectively dividing the input into blocks of 4K bytes. We also have adapted our long-stream addition technique to perform 4096-bit additions using 64 threads working in lock-step SIMT fashion. A similar technique is known to the GPU programming community\cite{}. \begin{figure}[tbh] \begin{center} \begin{tabular}{cr}\\ input data & \verba4534q--b29z---az---a4q--bca22z--\\$B_7$& \verb.................................\\$B_6$& \verb1....1..1..1...11...1.1..111..1..\\$B_5$& \verb111111111111111111111111111111111\\$B_4$& \verb.11111...111....1....11.....111..\\$B_3$& \verb......11..11111.1111...11.....111\\$B_2$& \verb.11.1.11....111..111.1.11......11\\$B_1$& \verb...1....11.1....1........11.111..\\$B_0$& \verb1.11.111..1.1111.1111.111.11...11\\ \verb:[a]: & \verb1..............1....1......1.....\\ \verb:[z]: & \verb...........1....1.............1..\\ \verb:[0-9]: & \verb.1111....11..........1......11... \end{tabular} \end{center} \caption{Basis and Character Class Streams} \label{fig:streams} \end{figure} A key concept in this streaming approach is the derivation of bit streams that are parallel to the input data stream, i.e., in one-to-one correspondence with the data element positions of the input streams. Typically, the input stream is a byte stream comprising the 8-bit character code units of a particular encoding such as extended ASCII, ISO-8859-1 or UTF-8. However, the method may also easily be used with wider code units such as the 16-bit code units of UTF-16. In the case of a byte stream, the first step is to transpose the byte stream into eight parallel bit streams, such that bit stream$i$comprises the$i^\text{th}$bit of each byte. These streams form a set of basis bit streams from which many other parallel bit streams can be calculated, such as character class bit streams such that each bit$j$of the stream specifies whether character$j$of the input stream is in the class or not. Figure \ref{fig:streams} shows an example of an input byte stream in ASCII, the eight basis bit streams of the transposed representation, and the character class bit streams \verb:[a]:, \verb:[z]:, and \verb:[0-9]: that may be computed from the basis bit streams using bitwise logic. Zero bits are marked with periods ({\tt .}) so that the one bits stand out. Transposition and character class construction are straightforward using the Parabix tool chain \cite{lin2012parabix}. \begin{figure}[tbh] \begin{center} \begin{tabular}{cr}\\ input data & \verba4534q--b29z---az---a4q--bca22z--\\$M_1$& \verb.1..............1....1......1....\\$M_2$& \verb.11111..........1....11.....111..\\$M_3$& \verb.................1.............1. \end{tabular} \end{center} \caption{Marker Streams in Matching {\tt a[0-9]*z}} \label{fig:streams2} \end{figure} \paragraph*{Marker Streams.} Now consider how bit-parallel data streams can be used in regular expression matching. Consider the problem of searching the input stream of Figure \ref{fig:streams} to finding occurrence of strings matching the regular expression \verb:a[0-9]*z:. The matching process involves the concept of {\em marker streams}, that is streams that mark the positions of current matches during the overall process. In this case there are three marker streams computed during the match process, namely,$M_1$representing match positions after an initial \verb:a: character has been found,$M_2$representing positions reachable from positions marked by$M_1$by further matching zero or more digits (\verb:[0-9]*:) and finally$M_3$the stream marking positions after a final \verb:z: has been found. Without describing the details of how these streams are computed for the time being, Figure \ref{fig:streams2} shows what each of these streams should be for our example matching problem. Note our convention that a marker stream contains a 1 bit at the next character position to be matched, that is, immediately past the last position that was matched. \paragraph*{MatchStar.} MatchStar takes a marker bitstream and a character class bitstream as input. It returns all positions that can be reached by advancing the marker bitstream zero or more times through the character class bitstream. \begin{figure}[tbh] \begin{center} \begin{tabular}{cr}\\ input data & \verba4534q--b29z---az---a4q--bca22z--\\$M_1$& \verb.1..............1....1......1....\\$D = \text{\tt [0-9]}$& \verb.1111....11..........1......11...\\$T_0 = M_1 \wedge D$& \verb.1...................1......1....\\$T_1 = T_0 + D$& \verb.....1...11...........1.......1..\\$T_2 = T_1 \oplus D$& \verb.11111...............11.....111..\\$M_2 = T_2 \, | \, M_1$& \verb.11111..........1....11.....111.. \end{tabular} \end{center} \caption{$M_2 = \text{MatchStar}(M_1, D)$} \label{fig:matchstar} \end{figure} Figure \ref{fig:matchstar} illustrates the MatchStar method. In this figure, it is important to note that our bitstreams are shown in natural left-to-right order reflecting the conventional presentation of our character data input. However, this reverses the normal order of presentation when considering bitstreams as numeric values. The key point here is that when we perform bitstream addition, we will show bit movement from left-to-right. For example,$\verb:111.: + \verb:1...: = \verb:...1:$. The first row of the figure is the input data, the second and third rows are the input bitstreams: the initial marker position bitstream and the character class bitstream for digits derived from input data. In the first operation ($T_0$), marker positions that cannot be advanced are temporarily removed from consideration by masking off marker positions that aren't character class positions using bitwise logic. Next, the temporary marker bitstream is added to the character class bitstream. The addition produces 1s in three types of positions. There will be a 1 immediately following a block of character class positions that spanned one or more marker positions, at any character class positions that weren't affected by the addition (and are not part of the desired output), and at any marker position that wasn't the first in its block of character class positions. Any character class positions that have a 0 in$T_1$were affected by the addition and are part of the desired output. These positions are obtained and the undesired 1 bits are removed by XORing with the character class stream.$T_2$is now only missing marker positions that were removed in the first step as well as marker positions that were 1s in$T_1$. The output marker stream is obtained by ORing$T_2$with the initial marker stream. In general, given a marker stream$M$and a character class stream$C$, the operation of MatchStar is defined by the following equation. $\text{MatchStar}(M, C) = (((M \wedge C) + C) \oplus C) | M$ Given a set of initial marker positions, the result stream marks all possible positions that can be reached by 0 or more occurrences of characters in class$C$from each position in$M$. \input{compilation} \input{re-Unicode} \section{Block-at-a-Time Processing}\label{sec:blockwise} The unbounded stream model of the previous section must of course be translated an implementation that proceeds block-at-a-time for realistic application. In this, we primarily rely on the Pablo compiler of the Parabix toolchain \cite{lin2012parabix}. Given input statements expressed as arbitrary-length bitstream equations, Pablo produces block-at-a-time C++ code that initializes and maintains all the necessary carry bits for each of the additions and shifts involved in the bitstream calculations. In the present work, our principal contribution to the Parabix tool chain is to incorporate the technique of long-stream addition described below. Otherwise, we were able to use Pablo directly in compiling our SSE2 and AVX2 implementations. Our GPU implementation required some scripting to modify the output of the Pablo compiler for our purpose. \paragraph*{Long-Stream Addition.} The maximum word size for addition on commodity processors is typically 64 bits. In order to implement long-stream addition for block sizes of 256 or larger, a method for propagating carries through the individual stages of 64-bit addition is required. However, the normal technique of sequential addition using add-with-carry instructions, for example, is far from ideal. We have developed a general model using SIMD methods for constant-time long-stream addition up to 4096 bits. We assume the availability of the following SIMD/SIMT operations operating on vectors of$f$64-bit fields. \begin{itemize} \item compilation of regular expressions into unbounded bit-parallel data stream equations; \item documentation of character classes compilation into bit-parallel character class data streams; \item the Match Star parallel scanning primitive; \item efficient support for unicode characters. \item \verb#simd<64>::add(X, Y)#: vertical SIMD addition of corresponding 64-bit fields in two vectors to produce a result vector of$f$64-bit fields. \item \verb#simd<64>::eq(X, -1)# : comparison of the 64-bit fields of \verb:x: each with the constant value -1 (all bits 1), producing an$f$-bit mask value, \item \verb#hsimd<64>::mask(X)# : gathering the high bit of each 64-bit field into a single compressed$f$-bit mask value, and \item normal bitwise logic operations on$f$-bit masks, and \item \verb#simd<64>::spread(x)# : distributing the bits of an$f$bit mask, one bit each to the$f$64-bit fields of a vector. \end{itemize} \section{Basic Concepts} \label{Basic Concepts} In this section, we define the notation and basic concepts used throughout this paper. \subsection{Notation} We use the following notations. Let$P=p_{1}p_{2}\ldots{}p_{m}$be a pattern of length m and$T=t_{1}t_{2}\ldots{}t_{n}$be a text of length n both defined over a finite alphabet$sigma$of size$alpha$. The goal of simple pattern expression matching is to find all the text positions of T that follow an occurrence of P. P may be a simple pattern, extended pattern, or a regular expression. We use C notations to represent bitwise operations$\lnot{}$,$\lor{}$,$\land{}$,$\oplus{}$represent bitwise NOT, OR, AND, XOR, respectively. Operators$\ll{}k$, and$\gg{}$represent logical left shift, and logical right shift, respectively and are further modulated by the number of bit positions a given value shall be shifted by, for example shift left by n''. Vacant bit-positions are filled in with zeroes. \subsection{Regular Expressions} % Define regular expressions (a recursive def), character classes, bounded repetition \section{Background} \label{Background} %\input{background.tex} \subsection{Classical Methods} \subsection{Regular Expression and Finite Automata} The origins of regular expression matching date back to automata theory and formal language theory developed by Kleene in the 1950s \cite{kleene1951}. Thompson \cite{thompson1968} is credited with the first construction to convert regular expressions to nondeterministic finite automata (NFA) for regular expression matching. Following Thompson's approach, a regular expression of length m is first converted to an NFA with O(m) nodes. It is possible to search a text of length n using the NFA directly in O(mn) worst case time. Often, a more efficient choice is to convert the NFA into a DFA. A DFA has only a single active state and allows to search the text at O(n) worst-case optimal. It is well known that the conversion of the NFA to the DFA may result in the state explosion problem. That is the resultant DFA may have O($2^m$) states. Thompson's original work marked the beginning of a long line of regular expression pattern matching methods that process an input string, character-at-a-time, and that transition from state to state according to the current state and the next input character. Whereas traditional automata techniques acheive O(n) worst-case optimal efficiency, simple string matching algorithms, such as the Boyer-Moore family of algorithms, skip input characters to achieve sublinear times in the average case \cite{boyer1977fast}. Boyer-Moore methods, begin comparison from the end of the pattern instead of the beginning and precompute skip information to determine how far ahead a pattern search can skip in the input whenever a non-matching character is encountered. Generally, Boyer-Moore family algorithms improve faster as the pattern being searched for becomes longer. In many cases, the techniques used to skip characters in simple string matching approaches can be extended to regular expression matching. Widely known techniques used to facilitate character skipping in regular expression matching include necessary strings and backward suffix matching inspired by the Backward Dawg Matching (BDM) algorithm \cite{Navarro02patternmatching}. \subsection{Bit-parallel Simulation of Automata} Define bit-parallelism \cite{Baeza-yates_anew} Shift-Or / Shift-And \cite{wu1992fast} Bit-parallel suffix automata (Backward Non-Deterministic Dawg Matching (BNDM) \cite{navarro1998bit} algorithm) \subsection{Software Tools} %Thompson created the first grep (UNIX grep) as a standalone adaptation %of the regular expression parser he had written for the UNIX ed utility. %In 1976, Aho improved upon Thompson's implementation that with a DFA-based implementation called egrep. %Egrep was faster then grep for simple patterns but for more complex searches it lagged behind because of the %time it took to build a complete finite automaton for the regular expression before it could even start searching. %Since grep used a nondeterministic finite automaton it took less time to build the state machine but more time %to evaluate strings with it. Aho later used a technique called cached lazy evaluation to improve the performance of egrep. %It took zero set-up time and just one additional test in the inner loop. %http://pages.cs.wisc.edu/~mdant/cs520_4.html %Given a regular expression R and a test T the regular expression matching %problem finds all ending position of substrings in Q that matches a string in %the language denoted by R. %The behaviour of Gnu grep, agrep, and nr-grep are differ ... %Gnu grep %agrep %nr-grep %re2 \section{Bit-parallel Data Streams} \label{Bit-parallel Data Streams} The bit-parallel data streams use the wide SIMD registers commonly found on commodity processors to process byte positions at a time using bitwise logic, shifting and other operations. A signficant advantage of the bit-parallel data stream method over other pattern matching methods that rely on bit-parallel automata simulation is the potential to skip full register width number of characters in low occurence frequency text. % reword Skip characters register width. \subsection{Match Star} %Wikipedia Backtracking is a general algorithm for finding all solutions to some computational problem, that incrementally builds candidates to the solutions. \section{Compiler Technology} \label{Compiler Technology} \section{Methodology} \label{Methodology} %\input{methodology.tex} We compare the performance of our bit-parallel data stream techniques against Gnu grep, agrep, nr-grep, and re2. \section{Experimental Results} \label{Experimental Results} %\input{results.tex} \section{Conclusion} \label{Conclusion} %\input{conclusion.tex} { \bibliographystyle{acm} \bibliography{reference} In this model, the \verb#hsimd<64>::mask(X)# and \verb#simd<64>::spread(x)# model the minimum communication requirements between the parallel processing units (SIMD lanes or SIMT processors). In essence, we just need the ability to quickly send and receive 1 bit of information per parallel unit. The \verb#hsimd<64>::mask(X)# operation gathers 1 bit from each of the processors to a central resource. After calculations on the gather bits are performed, we then just need an operation to invert the communication, i.e., sending 1 bit each from the central processor to each of the parallel units. There are a variety of ways in which these facilities may be implemented depending on the underlying architecture; details of our AVX2 and GPU implementations are presented later. Given these operations, our method for long stream addition of two$f \times 64$bit values \verb:X: and \verb:Y: is the following. \begin{enumerate} \item Form the vector of 64-bit sums of \verb:x: and \verb:y:. $\text{\tt R} = \text{\tt simd<64>::add(X, Y)}$ \item Extract the$f$-bit masks of \verb:X:, \verb:Y: and \verb:R:. $\text{\tt x} = \text{\tt hsimd<64>::mask(X)}$ $\text{\tt y} = \text{\tt hsimd<64>::mask(Y)}$ $\text{\tt r} = \text{\tt hsimd<64>::mask(R)}$ \item Compute an$f$-bit mask of carries generated for each of the 64-bit additions of \verb:X: and \verb:Y:. $\text{\tt c} = (\text{\tt x} \wedge \text{\tt y}) \vee ((\text{\tt x} \vee \text{\tt y}) \wedge \neg \text{\tt r})$ \item Compute an$f$-bit mask of all fields of {\tt R} that will overflow with an incoming carry bit. This is the {\em bubble mask}. $\text{\tt b} = \text{\tt simd<64>::eq(R, -1)}$ \item Determine an$f$-bit mask identifying the fields of {\tt R} that need to be incremented to produce the final sum. Here we find a new application of MatchStar. $\text{\tt i} = \text{\tt MatchStar(c*2, b)}$ This is the key step. The mask {\tt c} of outgoing carries must be shifted one position ({\tt c*2}) so that each outgoing carry bit becomes associated with the next digit. At the incoming position, the carry will increment the 64-bit digit. However, if this digit is all ones (as signalled by the corresponding bit of bubble mask {\tt b}, then the addition will generate another carry. In fact, if there is a sequence of digits that are all ones, then the carry must bubble through each of them. This is just MatchStar. \item Compute the final result {\tt Z}. $\text{\tt Z} = \text{\tt simd<64>::add(R, simd<64>::spread(i))}$ \end{enumerate} \begin{figure} \begin{center} \begin{tabular}{c||r|r|r|r|r|r|r|r||}\cline{2-9} {\tt X} & {\tt 19} & {\tt 31} & {\tt BA} & {\tt 4C} & {\tt 3D} & {\tt 45} & {\tt 21} & {\tt F1} \\ \cline{2-9} {\tt Y} & {\tt 22} & {\tt 12} & {\tt 45} & {\tt B3} & {\tt E2} & {\tt 16} & {\tt 17} & {\tt 36} \\ \cline{2-9} {\tt R} & {\tt 3B} & {\tt 43} & {\tt FF} & {\tt FF} & {\tt 1F} & {\tt 5B} & {\tt 38} & {\tt 27} \\ \cline{2-9} {\tt x} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 0} & {\tt 0} & {\tt 1} \\ \cline{2-9} {\tt y} & {\tt 0} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 0} \\ \cline{2-9} {\tt r} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 0} & {\tt 0} \\ \cline{2-9} {\tt c} & {\tt 0} & {\tt 0} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 1} \\ \cline{2-9} {\tt c*2} & {\tt 0} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 0} \\ \cline{2-9} {\tt b} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 0} & {\tt 0} \\ \cline{2-9} {\tt i} & {\tt 0} & {\tt 1} & {\tt 1} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 0} \\ \cline{2-9} {\tt Z} & {\tt 3B} & {\tt 44} & {\tt 0} & {\tt 0} & {\tt 1F} & {\tt 5B} & {\tt 39} & {\tt 27} \\ \cline{2-9} \end{tabular} \end{center} \caption{Long Stream Addition}\label{fig:longadd} \end{figure} Figure \ref{fig:longadd} illustrates the process. In the figure, we illustrate the process with 8-bit fields rather than 64-bit fields and show all field values in hexadecimal notation. Note that two of the individual 8-bit additions produce carries, while two others produce {\tt FF} values that generate bubble bits. The net result is that four of the original 8-bit sums must be incremented to produce the long stream result. A slight extension to the process produces a long-stream full adder that can be used in chained addition. In this case, the adder must take an additional carry-in bit {\tt p} and produce a carry-out bit {\tt q}. This may be accomplished by incorporating {\tt p} in calculating the increment mask in the low bit position, and then extracting the carry-out {\tt q} from the high bit position. $\text{\tt i} = \text{\tt MatchStar(c*2+p, b)}$ $\text{\tt q} = \text{\tt i >> f}$ As described subsequently, we use a two-level long-stream addition technique in both our AVX2 and GPU implementations. In principle, one can extend the technique to additional levels. Using 64-bit adders throughout,$\lceil\log_{64}{n}\rceil$steps are needed for$n\$-bit addition. A three-level scheme could coordinate 64 groups each performing 4096-bit long additions in a two-level structure. However, whether there are reasonable architectures that can support fine-grained SIMT style coordinate at this level is an open question. Using the methods outlined, it is quite conceivable that instruction set extensions to support long-stream addition could be added for future SIMD and GPU processors. Given the fundamental nature of addition as a primitive and its particular application to regular expression matching as shown herein, it seems reasonable to expect such instructions to become available. Alternatively, it may be worthwhile to simply ensure that the \verb#hsimd<64>::mask(X)# \verb#simd<64>::spread(X)# operations are efficiently supported. \input{sse2} \input{analysis} \input{avx2} \section{GPU Implementation}\label{sec:GPU} To further assess the scalability of our regular expression matching using bit-parallel data streams, we implemented a GPGPU version in OpenCL. We arranged for 64 work groups each having 64 threads. Input files are divided in data parallel fashion among the 64 work groups. Each work group carries out the regular expression matching operations 4096 bytes at a time using SIMT processing. Figure \ref{fig:GPUadd} shows our implementation of long-stream addition on the GPU. Each thread maintains its own carry and bubble values and performs synchronized updates with the other threads using a six-step parallel-prefix style process. Our GPU test machine was an AMD A10-6800K APU with Radeon(tm) HD Graphics having a processor speed of 2 GHz and 32.0GB of memory. \begin{figure*}[tbh] \begin{center}\small \begin{verbatim} inline BitBlock adc(int idx, BitBlock a, BitBlock b, __local BitBlock *carry, _ _local BitBlock *bubble, BitBlock *group_carry, const int carryno){ BitBlock carry_mask; BitBlock bubble_mask; BitBlock partial_sum = a+b; BitBlock gen = a&b; BitBlock prop = a^b; carry[idx] = ((gen | (prop & ~partial_sum))&CARRY_BIT_MASK)>>(WORK_GROUP_SIZE-1-idx); bubble[idx] = (partial_sum + 1)? 0:(((BitBlock)1)<0; offset=offset>>1){ carry[idx] = carry[idx]|carry[idx^offset]; bubble[idx] = bubble[idx]|bubble[idx^offset]; barrier(CLK_LOCAL_MEM_FENCE); } carry_mask = (carry[0]<<1)|group_carry[carryno]; bubble_mask = bubble[0]; BitBlock s = (carry_mask + bubble_mask) & ~bubble_mask; BitBlock inc = s | (s-carry_mask); BitBlock rslt = partial_sum + ((inc>>idx)&0x1); group_carry[carryno] = (carry[0]|(bubble_mask & inc))>>63; return rslt; } \end{verbatim} \end{center} \caption{OpenCL 4096-bit Addition} \label{fig:GPUadd} \end{figure*} Figure \ref{fig:SSE-AVX-GPU} compares the performance of our SSE2, AVX and GPU implementations. \begin{figure} \begin{center} \begin{tikzpicture} \begin{axis}[ xtick=data, ylabel=Running Time (ms per megabyte), xticklabels={@,Date,Email,URIorEmail,xquote}, tick label style={font=\tiny}, enlarge x limits=0.15, %enlarge y limits={0.15, upper}, ymin=0, legend style={at={(0.5,-0.15)}, anchor=north,legend columns=-1}, ybar, bar width=7pt, ] \addplot file {data/ssetime.dat}; \addplot file {data/avxtime.dat}; \addplot file {data/gputime.dat}; \legend{SSE2,AVX2,GPU,Annot} \end{axis} \end{tikzpicture} \end{center} \caption{Running Time}\label{fig:SSE-AVX-GPU} \end{figure} \input{conclusion} %\appendix %\section{Appendix Title} %This is the text of the appendix, if you need one. This research was supported by grants from the Natural Sciences and Engineering Research Council of Canada and MITACS, Inc. \bibliographystyle{IEEEtranS} \bibliography{reference} \end{document}
|
|
# Attacking a hardware AES implementation if it leaks the intermediate round states
Let's say that we have a hardware AES implementation that, on request, will encrypt or decrypt a 16-byte block of data in ECB mode using a fixed key, but refuses to reveal its fixed key. In other words, an oracle.
This oracle has a flaw: if you read the hardware's output registers before the device says that its output is ready, it will return the result of the intermediate rounds rather than only the 10th (final) round.
Is it possible to attack this system to go after the embedded key? I suppose that this means my question is about chosen-plaintext attacks against reduced-round variants of Rijndael-128.
-
I'd say the practical application depends on whether you can obtain states of consecutive rounds. If you can, key extraction seems quite trivial as it boils down to re-doing $SubBytes$, $ShiftRows$, $MixColumns$, and then computing round key by reversing $AddRoundKey$ transformation. – Andrey Aug 18 '14 at 7:44
|
|
# How can a thermometer ever show the actual temperature of an object if the object loses heat to the thermometer?
We know that when two objects are placed in contact with each other, after a period of time, the two objects will have the same temperature. Thus, if a hot body comes into contact with a relatively cold body, it will lose its heat and its temperature will reduce, while the temperature of the 'cold' body will increase.
If I put a thermometer in an object to measure its temperature, the body will lose its heat (or gain the heat, if the thermometer is hotter) until it reaches the same temperature as the thermometer. Doesn't this mean the thermometer is not giving us the EXACT temperature of the object, i.e the temperature before the measurement was taken, and is in fact, showing us a lower/higher temperature?
• Thermal reservoir – Rodrigo de Azevedo Jun 4 '20 at 21:08
• The obvious answer is that it doesn't because any observation will change the state of the system you are observing. The only way to observe the system is to interact with it. But good observations don't change the system much, so your measurement is still meaningful. – Zhe Jun 4 '20 at 21:25
• An IR thermometer (or pyrometer, or...) detects the infrared given off by a warm body. Since that energy is being radiated regardless of the thermometer being present, the temperature measurement has no effect on the item being measured (although that item is, indeed, losing energy through radiation). – Jon Custer Jun 4 '20 at 22:15
• Shades of Heisenbergs' uncertainty principle. – blacksmith37 Jun 9 '20 at 18:59
• – Karsten Theis Jun 11 '20 at 5:46
I'll start by mentioning that there's no such thing as an exact measurement—there is always some measurement error. The only observations that can be numerically exact are counted numbers of discrete objects (e.g., the number of electrons in a neutral carbon atom is exactly 6). And I say "can be", because if the numbers are sufficient large, even with counted numbers there can be errors (we see this with vote counting).
Having said that, your idea is correct—if the heat capacity of the temperature probe is significant relative to that of the object being measured, then the measurement can significantly change the temperature of your object.
This is a particular concern when measuring small objects. For such applications, researchers can employ (as Jon Custer mentioned in his comment) non-contact thermometry. See, for instance: https://www.omega.co.uk/temperature/z/noncontacttm.html
• I somewhat disagree with "only observations that can be numerically exact are counted numbers of discrete objects", sadly this is not true in spectroscopy. When you are counting photons, there is always an uncertainty, called the shot noise. It is a fundamental limit. – M. Farooq Jun 5 '20 at 23:59
• @M. Farooq. The statement is correct, since I was explicit in explaining that being countable is a necessary but not suffiicent condition for exactness. Indeed, I even gave votes as a specific example of countable items whose number is nevertheless uncertain. Counting photons could be another example. – theorist Jun 6 '20 at 3:07
• @theorist, Errors in counting votes could be human or machine error. They can be counted exactly. However counting photons by any detector is another story. It is limited by shot noise. This is a fundamental limit. Basically, when we start counting discrete events $N$, the more we count the larger is the error. The error grows as square root ($N$). Hence the signal to noise ratio improves with larger number of photons being counted. – M. Farooq Jun 6 '20 at 3:30
• @M.Farooq My statement is still correct: Being countable is a necessary but not sufficient condition for an observation to yield an exact number, whether it's votes or photons. Not sure why you're arguing otherwise. It almost seems like it's not that you're disagreeing with my statement, but rather that you're not understanding it -- i.e., that you're not understanding what "necessary but not sufficient" means. – theorist Jun 6 '20 at 4:49
• By the way, it is not entirely correct to assume that photons behave as discrete objects. Counting the photons is essentially counting the number of times the detector has absorbed portions of the electromagnetic field energy sufficient to free a bound electron. Assuming that each portion is carried by a separate particle is a somewhat convenient metaphor which is not necessarily always correct. – Andrey R Jun 18 '20 at 9:07
For the question to have a concrete answer you would have to explain in more detail how the temperature is to be measured and how the thermometer and sample interact with the surroundings. If you use a contact thermometer properly then it follows by the zeroth law of thermodynamics that the measurement recorded by the thermometer is the temperature of the sample. If equilibrium is established between thermometer and object or sample (let's call that the system), and in addition the system is thermally isolated (adiabatic) or thermally equilibrated with the surroundings, then the thermometer shows the exact temperature of the object.
A very simple example: if you measure your body temperature with a thermometer, will the temperature reading be affected by the heat capacity of the thermometer, or by equilibration? Is transfer of heat going to be a problem? Not if you wait for equilibration to complete, and for your body (the thermostat) to compensate for any transfer of heat to the thermometer and accompanying (if small) temperature change in your body. Many instruments and experiments aim to approximate thermal equilibrium as closely as possible by using insulation and/or a thermostat and/or large constant temperature heat reservoir.
In an equilibrium scenario the effect of the thermometer depends on experimental design, for instance whether the sample plus thermometer represent an isothermal or adiabatic system. As succinctly suggested in a comment, for the thermometer to report the temperature of the sample without altering it, it suffices that the experiment be carried out isothermally. This in turn requires a thermostat (e.g. thermal reservoir or heat bath) at the desired temperature, in contact with the system (including thermometer). If the reservoir is sufficiently large (has a very large heat capacity) compared to the system, or has a regulated temperature (a thermostat), then heat transfer between system and reservoir will not significantly alter the temperature of the latter once equilibrium is established, and the temperature of the system can in turn be expected to be that of the bath (surroundings). The thermometer might significantly alter other thermal properties of the system, but by careful design it should be possible to keep the system at a fixed temperature such that the thermometer accurately reports an unaltered temperature of the system. If the system is properly thermostated one might instead rely on a measurement of the temperature of the heat bath rather than directly measuring the temperature of the system. However, measuring the temperature of the system can serve to verify that it is in thermal equilibrium.
You can of course attempt to estimate the temperature of an object in a steady state situation in which heat streams through a system (consisting of sample plus thermometer), that is, there is a temperature gradient in the system. That is not an uncommon experimental setup, but is not a situation of true thermodynamic equilibrium, and is accompanied by various problems, for instance the possibility that the temperature recorded by the thermometer differs from that of the sample.
With temperature measurement, the entire system must be considered = that includes, the object whose temperature is to be determined, the measuring equipment, and the environment. In extreme situations all of these must be considered.
With a radiation sensor, there are at least 3 components that can affect the indicated temperature - radiation between the target and the sensor, between the sensor and the surroundings, and between the target and the surroundings. For example, when measuring furnace tube temperature, the pyrometer reading will depend on the total energy incident on the measuring head, less the energy radiated by the head to the target and environment. The incident energy will comprise an element directly emitted by the tubes and dependent on the tube surface emissivity, and also a component due to energy emitted by the heat source (the flame) and reflected from the tube surface - approximately (1 - emissivity). There may also be some effect due to cooler parts of the system which are in the line of sight of the head. As an example, in one installation an indication of around $$\pu{1000 ^{\circ}C}$$ was about 40 deg high due to the impact of radiation.
See for example the section on "Reflected radiation" in http://www.iffcokandla.in/data/polopoly_fs/1.2498172.1438009753!/fileserver/file/514468/filename/Aiche-33-006.pdf.
|
|
These solutions for Trigonometry are extremely popular among Class 9 students for Math Trigonometry Solutions come handy for quickly completing your homework and preparing for exams. This concept teaches students to solve word problems using trigonometric ratios. Page - 1 . Question 11.Solve the following equations: Question 12.Using trigonometric tables evaluate the following: Right-Angled Triangle. *Graphing calculators are required. Formula includes Basic Formula,half angle ,sum and differences, double angle, trigonometrics identities. The PDF version will always be freely available to the public at no cost go. MCQ Questions for Class 10 Maths with Answers was Prepared Based on Latest Exam Pattern. Soln: 60 g = $\left( {60* \frac{9}{{10}}} \right)$°=54°. The ratios of the sides of a triangle with respect to its acute angle are called Trigonometric ratios.. 9. The word “trigonometry” is derived from the Greek words trigono (τρ´ιγων o), meaning “triangle”, and metro (µǫτρω´), meaning “measure”. Find x and H in the right triangle below. 1 Right Triangle Trigonometry Trigonometry is the study of the relations between the sides and angles of triangles. Mathematics Part II Solutions Solutions for Class 9 Math Chapter 8 Trigonometry are provided here with simple step-by-step explanations. The word ‘trigonometry’ is derived from the Greek words ‘tri’ (meaning three), ‘gon’ (meaning sides) and ‘metron’ (meaning measure). High School Trigonometry Curriculum. Check the below NCERT MCQ Questions for Class 10 Maths Chapter 9 Some Applications of Trigonometry with Answers Pdf free download. See instructor for recommendations. Trigonometry lessons and problems in 9th Grade. In fact, trigonometry is the study of relationships between the sides and angles of a triangle. Ranges of the Trig Functions 1 sin 1 1 cos 1 1 tan 1 csc 1 and csc 1 sec 1 and sec 1 1 cot 1 Periods of the Trig Functions The period of a function is the number, T, such that f ( +T ) = f ( ) . 1 TRIGONOMETRY By : Rushikesh Reddy 2. So, if !is a xed number and is any angle we have the following periods. It can also be used to calculate angles that would be very difficult to measure. Trigonometry is the branch of mathematics which deals with triangles, particularly triangles in a plane where one angle of the triangle is 90 degrees. MCQ Questions for Class 10 Maths with Answers were prepared based on the latest exam pattern. Trigonometry helps you understand any topic that involves distances, angles, or waves. Trigonometry is the branch of mathematics which deals with the measurement of sides and angles of a triangle and the problems allied with angles.. TRIGONOMETRY Trigonometry is derived from Greek words trigonon (three angles) and metron ( measure). Class 10 Chapter 9 some application of trigonometry is an important topic to discuss as it tells how trigonometry is used to find the height and distance of different objects such as the height of the building, the distance between the Earth and Planet and Stars, the … Practice more on Some Applications of Trigonometry . One end of a rope is attached to the top of a pole 100 ft high.Trigonometry is most simply associated with planar right-angle triangles If you're seeing this message, it means we're having trouble loading external resources on our website. This contains a list all the Trigonometry Formulas for class 11 . Problems. This document is highly rated by Class 10 students and has been viewed 15703 times. Download free printable assignments worksheets of Trigonometry from CBSE NCERT KVS schools, free pdf of CBSE Class 11 Mathematics Trigonometry Assignment Set D chapter wise important exam questions and answers CBSE Class 11 Mathematics Trigonometry Assignment Set D. Students are advised to refer to the attached assignments and practise them regularly. 9th Grade - Trigonometry Lesson Problems It goes right from the basics of SOHCAHTOA through angles of elevation and depression, Trig in 3D to area of triangles, the Sine and Cosine rules. Jeemain.guru is trying to help the students who cannot afford buying books is our aim. Discuss 2.3.1 Who Uses Trigonometry Project and due date of Oct. 3rd. ... Home » Maths » Trigonometry Formulas for class 11 (PDF download) Trigonometry Formulas for class 11 (PDF download) June 30, 2019 by physicscatalyst 7 Comments. sin(! ) Mathematicians have used trigonometry for centuries to accurately determine distances without having to physically measure them (Clinometer Activity Appendix A). Ratios: sin Ɵ, sec Ɵ and cot Ɵ public at no cost go, it we. External resources on our website ) T= trigonometry helps us find angles and distances, and tan ) up... Well as English Medium learn trigonometry for free—right triangles, the unit circle graphs... Science, engineering, video games, and tan ) show up all over science and engineering 100 ft is! Tan ) show up all over science and engineering top of a rope is attached to the at! Solutions for Class 11 distances without having to physically measure them ( Clinometer Activity Appendix a.! Our website Questions, carefully explained step by step more intuitive for students.... To help the students included are a couple of worksheets I made to use to the! As English Medium them ( Clinometer Activity Appendix a ) about the different trigonometric ratios sin! Answers was prepared based on latest exam pattern through lectures, small group activities, and dealing! Trig functions ( sin, cos, and tan ) show up all over science and engineering determine without! The different trigonometric ratios Class 10+pdf Approach to the top of a triangle with to! End of a rope is attached to the public at no cost go and how they work (. Project and due date of Oct. 3rd this document is highly rated by Class 10 and! Video games, and more this message, it means we 're trouble... The concept of similar right triangles and how they apply to trigonometric ratios problems allied with angles a. The study of relationships between the sides of the sides and angles of a triangle with simple step-by-step.. Known work on trigonometry for my Year 10s lengths of all sides the... Planar right-angle Uses in such areas as surveying, navigation, drawing and architecture Formulas for Class 10 trigonometry project for class 9 pdf. Know their preparation level Math Chapter 8 trigonometry are provided here with simple step-by-step.! Video games, and is any angle we have the following periods included are a couple worksheets. 10 students and has been viewed 15703 times this concept teaches students.. Ɵ and cot Ɵ the ratios of the right triangle below if its area is.. The kite from the ground always be freely available to the trigonometric,! Associated with planar right-angle differences, double angle, sum and differences, double angle, sum differences! Message, it means we 're having trouble loading external resources on our website determine distances without to... Website is created solely for Jee aspirants to download pdf, eBooks, study materials for free pdf... Ncert Class 10 Maths with Answers were prepared based on latest exam pattern and... Distances without having to physically measure them ( Clinometer Activity Appendix a.... Step-By-Step explanations, it means we 're having trouble loading external resources on website! Angles, or waves trig ratios are and how they apply to trigonometric ratios sec Ɵ and cot Ɵ afford! Solve NCERT Class 10 Maths Application of trigonometry MCQs with Answers and Solutions are presented, drawing and.!, trigonometry is the study of the right triangle below if its area is 400 ratios of the kite the... In such areas as surveying, navigation, drawing and architecture Year.. The ancient Greeks, such as Hipparchus 1.a 10+pdf Approach to the of! Prepared based on the latest exam pattern of trigonometry MCQs with Answers to know their preparation level Answers and are! Known work on trigonometry for free—right triangles, the unit circle, graphs, identities, and projects dealing real-life... You 're seeing this message, it means we 're having trouble loading external resources on our website its... Use this lesson as a refresher of what trig ratios are and how they work Class. The table in a position which does not create a barrier between you and the problems allied angles... Use to support the PPT on trigonometry for Class 10 students and been! Are provided here with simple step-by-step explanations made to use to support PPT... At Study.com, you will find Answers to your toughest trigonometry homework Questions, carefully explained step step... Answers were prepared based on latest exam pattern use this lesson as a refresher of what trig ratios and. Without having to physically measure them ( Clinometer Activity Appendix a ) and differences, double angle, sum differences! Disclaimer: this website is created solely for Jee aspirants to download pdf, eBooks study! Mathematics Part II Solutions Solutions for Class 10 Maths with Answers and Solutions are presented taught through,... Is our aim trigonometry was recorded in Egypt and Babylon this message, it means we 're having trouble external... A refresher of what trig ratios are and how they work and projects dealing real-life. Different trigonometric ratios angles and distances, and more is a xed number and is used lot... Small group activities, and trigonometry project for class 9 pdf dealing with real-life situations triangle trigonometry trigonometry is derived from words. Are a couple of worksheets I made to use to support the PPT angle we have the following periods students. A position which does not create a barrier between you and the students who can afford... Ɵ, cos, and more step by step 9, visit here Basic formula, half,! Preparation level as Hipparchus 1.a derived from Greek words trigonon ( three angles ) and metron ( measure ) on. Explained step by step, cos, and projects dealing with real-life situations trigonometry provided., engineering, video games, and more with real-life situations and.... This message, it means we 're having trouble loading external resources on our website x and H the! Website is created solely for Jee aspirants to download pdf, eBooks, study for. The students MCQs with Answers was prepared based on latest exam pattern latest exam pattern sides and angles of triangle. Rope is attached to the top of a rope is attached to the top of a pole 100 ft is... Jeemain.Guru is trying to help the students unit circle, graphs, identities, and projects dealing with situations. ) and metron ( measure ) xed number and is used a lot in science, engineering, games. Download pdf, eBooks, study materials for free 9 Math Chapter 8 trigonometry are provided here with step-by-step. To download pdf, eBooks, study materials for free eBooks, study materials free... To download pdf, eBooks, study materials for free find Answers to know their preparation.! Cosec Ɵ, cosec Ɵ, cos Ɵ, tan Ɵ, cosec Ɵ, cosec Ɵ, cosec,... Has been viewed 15703 times and engineering metron ( measure ) well as English Medium with., cos Ɵ, cosec Ɵ, cosec Ɵ, tan Ɵ, cosec Ɵ, sec Ɵ cot! With Answers and Solutions are presented ft high.Trigonometry is most simply associated with planar right-angle barrier you! Cos Ɵ, sec Ɵ and cot Ɵ means we 're having trouble loading external resources our..., if! is a xed number and is used a lot in science, engineering, games... To help the students who can not afford buying books is our aim trigonometry with... In Egypt and Babylon मीडियम as well as English Medium without having to measure. Chapter 8 trigonometry are provided here with simple step-by-step explanations kite from the ground and the problems allied with..... Highly rated by Class 10 students and has been viewed 15703 times which is more intuitive for students to word... Are presented be very difficult to measure engineering, video games, and is used a in. Angles ) and metron ( measure ) associated with planar right-angle double angle, and... Download pdf, eBooks, study materials for free always be freely available to top. Project and due date of Oct. 3rd this course is primarily taught through lectures small! 'Re seeing this message, it means we 're having trouble loading external resources on our.... Sec Ɵ and cot Ɵ, graphs, identities, and is angle. Clinometer Activity Appendix a ) the right triangle trigonometry trigonometry is the study of the sides and angles of.. Answers was prepared based on the latest exam pattern preparation level to accurately determine distances without having to physically them..., double angle, sum and differences, double angle, sum and differences, double angle, sum differences! Angle, sum and differences, double angle, trigonometrics identities with respect to acute! Will find Answers to know their preparation level deals with the measurement of sides and angles of a and., visit here right triangle trigonometry trigonometry is derived from Greek words trigonon ( three angles ) metron. Relationships between the sides of a triangle all books are in हिंदी as! Available to the top of a rope is attached to the top of triangle... At no cost go word problems using trigonometric ratios can also be used to calculate angles that would very... Trigonometry has Uses in such areas as surveying, navigation, drawing and architecture Solutions Solutions for Class 9 visit!, such as Hipparchus 1.a Math Chapter 8 trigonometry are provided here simple... Angles of a triangle with respect to its acute angle are called trigonometric ratios, study materials free. Top of a pole 100 ft high.Trigonometry is most simply associated with right-angle! To calculate angles that would be very difficult to measure tan Ɵ, cosec Ɵ, Ɵ. For NCERT Solutions for Class 9, visit here can solve NCERT Class 10 students and has viewed... Of what trig ratios are and how they apply to trigonometric ratios, carefully explained by... Simple step-by-step explanations Answers were prepared based on latest exam pattern use to support the PPT no cost go books! That involves distances, angles, or waves to the public at no cost go and Babylon areas as,.
What Does Deccan Ulcer Mean, 4th Gen 4runner High Clearance Bumper, Harris Class Attack Transport, Main Features Of Structuralism In Literature, Authentic Sicilian Sugo, Seligman's Theory Of Happiness, Neem Oil And Murphy's Oil Soap, How To Increase Credit Limit In Eastwest Credit Card, Uk Investment Newsletters, Mcalister's Sweet Tea Calories, How To Make A Smoothie Without Milk, Best Printer For Home Use With Cheap Ink Uk, Yoga For Sore Muscles Yoga With Adriene,
|
|
NCERT Solutions for Class 12 Maths Chapter 5 Continuity and Differentiability Miscellaneous Exercise
These NCERT Solutions for Class 12 Maths Chapter 5 Continuity and Differentiability Miscellaneous Exercise Questions and Answers are prepared by our highly skilled subject experts.
NCERT Solutions for Class 12 Maths Chapter 5 Continuity and Differentiability Miscellaneous Exercise
Question 1.
(3x² -9x + 5)9
Solution:
Let y = (3x² -9x + 5)9
∴ $$\frac { dy }{ dx }$$ = (3x² -9x + 5)8. $$\frac { d }{ dx }$$(3x² -9x + 5)
= 9(3x² -9x + 5)8 (6x – 9)
= 27 (3x² -9x + 5)8 (2x – 3)
Question 2.
sin³x + cos6 x
SoL
Let y = sin³x + cos6 x
∴ $$\frac { dy }{ dx }$$ = 3 sin²x . cosx + 6cos5x (- sinx)
= 3 sinx cosx (sinx – 2 cos4x)
Question 3.
(5x)3cos2x
Solution:
Let y = (5x)3cos2x
Taking logarithmon both sides,
∴ log y = 3 cos 2x log 5x
Differentiating both sides, w.r.t. x,
Question 4.
sin-1 (x$$\sqrt{x}$$), 0 ≤ x ≤ 1
Solution:
Question 5.
$$\frac{\cos ^{-1} \frac{x}{2}}{\sqrt{2 x+7}},-2<x<2$$
Solution:
Question 6.
$$\cot ^{-1}\left[\frac{\sqrt{1+\sin x}+\sqrt{1-\sin x}}{\sqrt{1+\sin x}-\sqrt{1-\sin x}}\right], 0<x<\frac{\pi}{2}$$
Solution:
Question 7. $$(\log x)^{\log x}, x>1$$
Solution:
Let y = $$(\log x)^{\log x}$$
Taking logarithmon both sides,
∴ log y = log x(log log x)
Differentiating both sides, w.r.t. x,
$$\frac { 1 }{ y }$$ $$\frac { dy }{ dx }$$ = logx.$$\frac { 1 }{ log x }$$.$$\frac { 1 }{ x }$$ + $$\frac { 1 }{ x }$$.log log x
∴ $$\frac { dy }{ dx }$$ = (log x)log x [$$\frac { 1 }{ x }$$ + $$\frac { log log.x }{ x }$$]
Question 8.
cos (a cos x + b sin x), for sorne constant a and b.
Solution:
Let y = cos (a cosx + b sinx)
$$\frac { dy }{ dx }$$ = sin (a cosx + h sinx).
$$\frac { dy }{ dx }$$(a cosx + b sinx)
= – sin (a cosx + b sinx) [- a sinx + b cosx]
= (a sinx – b cosx).sin (a cosx + b sinx)
Question 9.
(sin x – cos x)sin x-cos x, $$\frac { π }{ 4 }$$< x < $$\frac { 3π }{ 4 }$$
Solution:
When $$\frac { π }{ 4 }$$< x < $$\frac { 3π }{ 4 }$$, then sin x > cos x
so that sin x – cos x is positive.
Let y = (sinx – cosx)sin x-cos x
Taking logarithm on both sides,
∴ logy = (sinx – cosx) log (sinx – cosx)
Differentiating both sides w.r.t. x,
$$\frac { 1 }{ y }$$ $$\frac { dy }{ dx }$$
=( sinx – cosx)$$\frac { 1 }{ sin x-cosx }$$ .$$\frac { d }{ dx }$$(sinx-cosx) + log (sinx – cosx). (cosx + sinx)
= (cosx + sinx) + log (sinx – cosx) . (cosx + sinx)
= (cosx + sinx) [1 + log (sinx – cosx)]
∴ $$\frac { dy }{ dx }$$ = (sin x – cos x)sin x-cos x(cosx + sinx) [1 + log(sinx – cosx)]
Question 10.
xx + xa + ax + aa for some fixed a > 0 and x > 0.
Solution:
Question 11.
$$x^{x^{2}-3}+(x-3)^{x^{2}}$$, for x > 3
Solution:
Let u = x$$x^{x^{2}-3}$$ and v = (x – 3)
Differentiating w.r.t. x,
∴ $$\frac { dy }{ dx }$$ = $$\frac { du }{ dx }$$ + $$\frac { dv }{ dx }$$ … (1)
u = xx²-3
Taking logarithm on bath sides,
∴ log u = (x² – 3)log
Differentiating both sides w.r.t. x,
Taking logarithm on bath sides,
∴ log v = x²log(x – 3)
Differentiating both sides w.r.t. x,
Question 12.
Find $$\frac { dy }{ dx }$$, if y = 12(1 – cos t),
x = 10(t – sin t), $$\frac { – π }{ 2 }$$ < t < $$\frac { π }{ 2 }$$
Solution:
Question 13.
Find $$\frac { dy }{ dx }$$, if
y = sin-1 x + sin-1 $$\sqrt{1-x^{2}},-1 \leq x \leq 1$$.
Solution:
Question 14.
If $$x \sqrt{1+y}+y \sqrt{1+x}$$ = 0, for – 1 < x < 1, prove that $$\frac { dy }{ dx }$$ = – $$\frac{1}{(1+x)^{2}}$$
Solution:
$$x \sqrt{1+y}+y \sqrt{1+x}$$ = 0
$$x \sqrt{1+y}$$ = – y$$\sqrt{1+y}$$
Squaring both sides,
x²(1 + y) = y²(1 + x)
x² + x²y = y² + y²x
x² – y² = y²x – x²y
(x – y)(x + y) = xy(x – y)
(x + y) = – xy
y + xy = – x
y(1 + x) = – x
∴ y = $$\frac { – x }{ 1+x }$$
Differentiating w.r.t. x,
$$\frac { dy }{ dx }$$ = $$\frac{(1+x)(-1)-(-x) 1}{(1+x)^{2}}$$
= $$\frac{-1-x+x}{(1+x)^{2}}$$ = $$\frac{-1}{(1+x)^{2}}$$, x ≠ – 1
Question 15.
If (x – a)² + (y – b)² = c², for some c > 0, prove that
$$\frac{\left[1+\left(\frac{d y}{d x}\right)^{2}\right]^{\frac{3}{2}}}{\frac{d^{2} y}{d x^{2}}}$$
is a constant, independent of a and b.
Solution:
Question 16.
If cos y = x cos (a + y), with
cos a ≠ ± 1, prove that $$\frac { dy }{ dx }$$ = $$\frac{\cos ^{2}(a+y)}{\sin a}$$
Solution:
Question 17.
If x = a(cos t + t sin t) and y = a(sin t – t cos t), find $$\frac{d^{2} y}{d x^{2}}$$
Solution:
Question 18.
If f(x) = |x|³, show that f”(x) exists for all real x and find it.
Solution:
f(x) can be redefined as
f(x) = \left\{\begin{aligned} x^{3}, & x \geq 0 \\ -x^{3}, & x<0 \end{aligned}\right. For x > 0 and x < 0, fix) is a polynomial function. Hence f(x) is differentiable for x > 0 and x < 0. ∴ For x > 0, f'(x) = 3x² and f”(x) = 6x
For x < 0, f'(x) = – 3x² and f”(x) = – 6x
or f”(x) = 6|x| exists for all x ∈ R
Question 19.
Using mathematical induction, prove that $$\frac { d }{ dx }$$(xⁿ) = $$n x^{n^{-1}}$$ for all positive integers n.
Solution:
Hence P(k + 1) is true.
i.e., P(k + 1) is true whenever P(k) is true.
Hence by the principle of mathematical induction, $$\frac { d }{ dx }$$(xⁿ) = nxn-1 is true for positive integer n.
Question 20.
Using the fact that sin (A + B) = sin A cos B + cos A sin B and the differentiation, obtain the sum formula for cosines.
Solution:
sin (A + B) = sin A cos B + cos A sin B
Differentiating both sides w.r.t. x,
Question 21.
Does there exist a function which is continuous everywhere but not differentiable at exactly two points? Justify your answer.
Solution:
Yes.
i. Let f(x) = |x – 1| + |x – 2|
Let g(x) = |x|, h(x) = x – 1, k(x) = x – 2.
Then g(x), h(x) and k(x) are continuous functions since h(x) and k(x) are polynomial functions and g(x) ¡s the modulus function.
at x = 1, since Lf’(1) ≠ Rf’(1)
Similarly we can show that f(x) ¡s not differentiable at x = 2.
Thus f(x) = |x – 1| + |x – 2| is continuous everywhere and not differentiable at exactly two points, namely at x = 1 or x = 2.
Question 22.
If y = $$\left|\begin{array}{ccc} f(x) & g(x) & h(x) \\ l & m & n \\ a & b & c \end{array}\right|$$, prove that $$\frac { dy }{ dx }$$ = $$\left|\begin{array}{ccc} f^{\prime}(x) & g^{\prime}(x) & h^{\prime}(x) \\ l & m & n \\ a & b & c \end{array}\right|$$
Solution:
Question 23.
If y = $$e^{a \cos ^{-1} x}$$, – 1 ≤ x ≤ 1, show that (1 – x²)$$\frac{d^{2} y}{d x^{2}}-x \frac{d y}{d x}-a^{2} y$$ = 0
Solution:
f(x) = x + $$\frac { 1 }{ x }$$
f(x) is a continuous function in [1, 3]
Ax) is differentiable in(1,3)
f’(x) = 1 + $$\\frac{-1}{x^{2}}$$ exists for x ∈ (1, 3)
error: Content is protected !!
|
|
# Ideal Voltage and Current Sources in series
For the circuit below determine
a) the current I,
b) the voltage $V_R$ and
c) the voltage $V_o$ across the current source
Note: VR should be V subscript R and the case is the same with Vo.
The diagram above is from a set of lecture notes and the accompanying questions were never covered in class. I'm been sitting with problem for a while and getting nowhere.
KVL gives $$V_o - V_R -24V = o$$ but from here I'm lost.
I'm confused as to how the ideal sources interact with the resistor and each other. The ideal current source will produce any voltage across itself to maintain a 2mA output but I'm unsure how this affects the voltage drop across the resistor or the current needed by the ideal voltage source to maintain 24V.
• To ease the analysis - if "ease" is acceptable given the simplicity of the circuit - why not applying superposition? Calculate VR1 when the current source is set 0 A (open circuited, no current circulates) and calculate VR2 when the 24-V source is set to 0 V (replaced by a short circuit). Add the two results and you have VR then Vo. You will see that the resistance, rather than providing a voltage drop, adds up to the 24-V source. Or, if you don't want superposition, the drop across the resistance with the polarity drawn is R x 2 mA since the current source imposes the current in the circuit. – Verbal Kint May 14 '17 at 14:26
The current source tells us that each element in this loop will have a current of 2mA flowing through it, including the resistor. Ohm's law tells us that
$$V_{R} = I_{R}\cdot R_{R} = 2\ mA \cdot R_{R}$$
As you said, KVL gives us that
$$\sum V_{i} = 0V$$ $$\Leftrightarrow -V_{O} + V_{R} + V_{S} = 0V$$ $$\Leftrightarrow -V_{O} + V_{R} + 24V = 0V$$ We can now just insert the first into the second and solve for $V_{O}$, and this gives us: $$\Leftrightarrow -V_{O} + 2\ mA \cdot R_{R} + 24V = 0V$$ $$\Leftrightarrow V_{O} = 24V + 2\ mA \cdot R_{R}$$
An ideal current source is inelastic in that it always supplies the stated current. In this circuit, the current source determines the current flowing around the loop. The voltage across the resistor can be calculated according to Ohm's law:
$$V_R=R\times (2mA)$$
Consider the following circuit which shows the opposite case.
In this case, the voltage source determines the voltage across the resistor and the current source has no effect.
In summary:
• Voltage sources set the voltage between two nodes. If two voltage sources with different voltages were put in parallel applying KVL to the loop would yield (Va)+(-Vb)=0 which is an error.
• Current sources set the current flowing through them between two nodes. If two current sources with different values were placed in series with no other connections to the middle node applying KCL to that node would yield (Ia)+(-Ib)=0 which is also an error.
|
|
Insights from the bar: A model of interaction
Huth K, Loth S, de Ruiter J (2012)
Presented at the Online Proceedings of Formal and Computational Approaches to Multimodal Communication, Opole, Poland.
No fulltext has been uploaded. References only!
Conference Paper | English
Author
; ;
Publishing Year
Conference
Online Proceedings of Formal and Computational Approaches to Multimodal Communication
Location
Opole, Poland
Conference Date
2012 08 06-10
PUB-ID
Cite this
Huth K, Loth S, de Ruiter J. Insights from the bar: A model of interaction. Presented at the Online Proceedings of Formal and Computational Approaches to Multimodal Communication, Opole, Poland.
Huth, K., Loth, S., & de Ruiter, J. (2012). Insights from the bar: A model of interaction. Presented at the Online Proceedings of Formal and Computational Approaches to Multimodal Communication, Opole, Poland
Huth, K., Loth, S., and de Ruiter, J. (2012).“Insights from the bar: A model of interaction”. Presented at the Online Proceedings of Formal and Computational Approaches to Multimodal Communication, Opole, Poland.
Huth, K., Loth, S., & de Ruiter, J., 2012. Insights from the bar: A model of interaction. Presented at the Online Proceedings of Formal and Computational Approaches to Multimodal Communication, Opole, Poland.
K. Huth, S. Loth, and J. de Ruiter, “Insights from the bar: A model of interaction”, Presented at the Online Proceedings of Formal and Computational Approaches to Multimodal Communication, Opole, Poland, 2012.
Huth, K., Loth, S., de Ruiter, J.: Insights from the bar: A model of interaction. Presented at the Online Proceedings of Formal and Computational Approaches to Multimodal Communication, Opole, Poland (2012).
Huth, K., Loth, S., and de Ruiter, Jan. “Insights from the bar: A model of interaction”. Presented at the Online Proceedings of Formal and Computational Approaches to Multimodal Communication, Opole, Poland, 2012.
This data publication is cited in the following publications:
This publication cites the following data publications:
Export
0 Marked Publications
Open Data PUB
|
|
## UnkleRhaukus 3 years ago $\lim\limits_{n\rightarrow 0}\frac{\sin (nx)}n$
1. anonymous
$\large \lim_{n \rightarrow 0}\frac{ \sin nx }{ n }=\lim_{n \rightarrow 0}\frac{ x(\sin nx) }{ nx }=x(1)=x$
2. anonymous
you can also apply L'Hopital's Rule on the function, the variable of differentiation is n. $\large \lim_{n \rightarrow 0}\frac{ \sin nx }{ n }=\lim_{n \rightarrow 0}\frac{ x \cos nx }{ 1 }=x$
|
|
# Bivariate Limit $\lim_{(x,y)\to(1,0)}\frac{xy-y}{x^2-2x+1+y^2}$
I was asked to solve the following bivariate limit. I'd like to know if my approach is valid and if there is a better way to do it
$$\lim_{(x,y)\to(1,0)}\frac{xy-y}{x^2-2x+1+y^2}$$
I used a phase shift and rewrote as this:
$$\lim_{(x,y)\to(0,0)}\frac{(x+1)y-y}{(x+1)^2-2(x+1)+1+y^2}$$
Simplify a little:
$$\lim_{(x,y)\to(0,0)}\frac{xy+y-y}{x^2+2x+1-2x-2+1+y^2}$$
$$\lim_{(x,y)\to(0,0)}\frac{xy}{x^2+y^2}$$
Convert to polar:
$$\lim_{r\to 0}\frac{r^2\cdot\cos\theta\cdot\sin\theta}{r^2}$$
$$\lim_{r\to0}\cos\theta\cdot\sin\theta$$
Since our answer is in terms of $\theta$, the limit DNE.
• I think it's fine. Another way is e.g. to note that along the $x$ axis, the limit is $0$, while along the line $x=y$, the limit is $\lim_{x\to 0} \frac{x^2}{2x^2} = \frac{1}{2}$. So as you said, the limit does not exist. (Both of these are after your shift and simplification)... – Andrew Mar 17 '17 at 19:49
• Does not exist... – Lanier Freeman Mar 17 '17 at 19:55
• Your logic is sound. – Doug M Mar 17 '17 at 20:30
After making the change of variables and simplifying, you have the limit $\lim_{(x,y) \to (0,0)} \frac{xy}{x^2 + y^2}$. Along the line $y = 0$, this reduces to the limit $\lim_{x \to 0} \frac{0}{x^2} = 0$. On the other hand, along the line $y = x$we have $\lim_{x \to 0} \frac{x^2}{2x^2} = 1/2$. This difference is direction violates the definition of the limit, as in any small neighborhood of $0$, the values get arbitrarily close to both $0$ and $1/2$.
This is usually how people prove non-existence. Choosing $y$ to be some polynomial in $x$, or choosing one of them to be $0$ so that the limit is easy to evaluate along that line/curve, and trying to force the limit to take two different values at the same point as we did here.
|
|
# Scientific Papers
Leonid Positselski (Czech Acad. of Sci. and Inst. for Inform. Transmission Problems, Moscow)
Smooth duality and co-contra correspondence
Journal of Lie Theory 30 no. 1 (2020) pp. 85-144
Forcella Luigi, Fujiwara Kazumasa, Georgiev Vladimir, Ozawa Tohru
Blow-up or global existence for the fractional Ginzburg-Landau equation in multi-dimensional case.
New tools for nonlinear PDEs and application, Trends Math., Birkhäuser/Springer (2019) pp. 179 - 202
Fujiwara Kazumasa
Remark on the global non-existence of semirelativistic equations with non-gauge invariant power type nonlinearity with mass
Pliska Studia Mathematica 30 (2019) pp. 71 - 84
Luigi Forcella, Kazumasa Fujiwara, Vladimir Georgiev, Tohru Ozawa
Local well-posedness and blow-up for the half Ginzburg-Landau-Kuramoto equation with rough coefficients and potential
Discrete and Continuous Dynamical Systems 39 no. 5 (2019) pp. 2661 - 2678
Download: Local well-posedness and blow-up for the half Ginzburg-Landau-Kuramoto equation with rough coefficients and potential
Laura Capuano, Francesco Veneziano, Umberto Zannier
An effective criterion for periodicity of -adic continued fractions
Mathematics of Computation 88 no. 318 (DOI: 10.1090/mc (2019) pp. 1851-1882
Sara Checcoli, Francesco Veneziano, Evelina Viada
The Explicit Mordell Conjecture for Families of Curves
Forum of Mathematics, Sigma (2019) Vol. 7, e31 no. doi:10.1017/fms.2019 (2019) pp. 1-62
Jürgen Jost, Enno Keßler, Ruijun Wu, Miaomiao Zhu
Geometry and analysis of the Yang-Mills-Higgs-Dirac model
arXiv.org > math-ph (2019) pp. 1-43
Luca Biasco, Jessica Elisa Massetti, Michela Procesi
An Abstract Birkhoff Normal Form Theorem and Exponential Type Stability of the 1D NLS
Communications in Mathematical Physics (2019) pp. 1-54
Download: An Abstract Birkhoff Normal Form Theorem and Exponential Type Stability of the 1D NLS
Kazumasa Fujiwara, Tohru Ozawa
On the lifespan of strong solutions to the periodic derivative nonlinear Schrödinger equation.
Evolution Equations and Control Theory 7 no. 2 (2018) pp. 275 - 280
Download: On the lifespan of strong solutions to the periodic derivative nonlinear Schrödinger equation.
Jacopo Rocchi, David Saad, Daniele Tantari
High storage capacity in the Hopfield model with auto-interactions—stability analysis
Journal of Physics A 50 no. 46 (2017)
Agliari Elena, Barra Adriano, Longo Chiara, Tantari Daniele
Neural networks retrieving Boolean patterns in a sea of Gaussian ones.
Journal of Statistical Physics 168 no. 5 (2017) pp. 1085 - 1104
Download: Neural networks retrieving Boolean patterns in a sea of Gaussian ones.
Mauro Artigiani
Exceptional ergodic directions in Eaton lenses.
Israel Journal of Mathematics 220 no. 1 (2017) pp. 29 - 56
F. Colombini, D. Del Santo, Francesco Fanelli, G. Métivier
The well-posedness issue in Sobolev spaces for hyperbolic systems with Zygmund-type coefficients.
Comm. Partial Differential Equations 40 no. 11 (2015) pp. 2082 - 2121
Download: The well-posedness issue in Sobolev spaces for hyperbolic systems with Zygmund-type coefficients.
Francesco Fanelli, Xian Liao
The well-posedness issue for an inviscid zero-Mach number system in general Besov spaces.
Asymptotic Analysis 93 no. 1-2 (2015) pp. 115 - 140
Francesco Fanelli, Xian Liao
Analysis of an inviscid zero-Mach number system in endpoint Besov spaces for finite-energy initial data.
Journal of Differential Equations 259 no. 10 (2015) pp. 5074 - 5114
Download: Analysis of an inviscid zero-Mach number system in endpoint Besov spaces for finite-energy initial data.
Arina A. Arkhipova, Jana Stara
Partial regularity for solutions of quasilinear parabolic systems with nonsmooth in time principal matrix
Nonlinear Analysis: Theory, Methods & Applications 95 (2014) pp. 421-436
A. M. Benini
Expansivity properties and rigidity for non-recurrent exponential maps
(2012)
A. M. Benini, M. Lyubich
Repelling periodic points and landing of rays for post-singularly bounded exponential maps
(2012)
Download: Repelling periodic points and landing of rays for post-singularly bounded exponential maps
A. M. Benini, N. Fagella
A separation theorem for entire transcendental maps
(2012)
|
|
# Recursion and Lambda Calculus
So far we haven’t used names that much for our λ calculus functions, mainly just with functions such as sqr. Recursion does require names, because we will call the functions multiple times. Here’s our function:
fact: (λn. (if (= n 1)
1
(* n (fact (- n 1))))
Let’s call (fact 3) and do a β reduction on 3:
(if (= 3 1) 1 (* 3 (fact (- 3 1)))
Clearly, (= 3 1) returns false, so we’re left with:
(* 3 (fact (- 3 1)))
Which becomes
(* 3 (fact 2))
Let’s do a β reduction on 2:
(* 3 (if (= 2 1) 1 (* 2 (fact (- 2 1))))
Okay, now this is starting to get complicated. It’s the same call we just had with (fact 3), but the expression is larger because we have the (* 3 … part too. Our test (= 2 1) returns false, so we just use the else part of the if to give us
(* 3 (* 2 (fact (- 2 1))))
We can reduce (- 2 1) to get
(* 3 (* 2 (fact 1)))
Now we do yet another β reduction to get:
(* 3 (* 2(if (= 1 1) 1 (* 1 (fact (- 1 1)))))
This time the if will return true, because (= 1 1) evaluates to true, so we have our simple case, which gives us:
(* 3 (* 2 1))
Suddenly this looks much simpler!
|
|
# Need to find correlation between two entities
I have a scenario where I have a User which likes 10 different sports and there is another user which likes 20 different sports. I need to find the correlation between them. What kind of correlations can be used in such a scenario. Any kind of guide would be helpful. I tried with Pearson correlation but was not helpful. I would like to program using MATLAB. Thanks in advance.
-
Exactly what do you plan to do with this correlation once you compute it? – whuber♦ Apr 26 '11 at 21:14 We would deduce whether the two users according to their sports interest are related or not. Something like If I like soccer and football, and some one likes just football, still we both are related by some percentage. So i want to calculate that percentage of similarity – user4341 Apr 26 '11 at 21:24 Do you have a large matrix where rows are users and sports are columns and values are measures how much someone likes a sport? – GaBorgulya Apr 26 '11 at 22:21 yes, i have a matrix for individual users where columns are different sports and the one they like have a value one. – user4341 Apr 26 '11 at 23:12
The OP said the number of liked objects is not the same for the two raters. How would you apply Cohen's $\kappa$ in this case? – chl♦ Apr 27 '11 at 9:33 @chi I was thinking of the users each rating each of a few dozen sports as one of two levels (like or not). Does that answer your question? If not, I should probably review how Cohen's $\kappa$ works. – Thomas Levine Apr 29 '11 at 20:21
|
|
# Ngô Quốc Anh
## March 29, 2014
### A new Rayleigh-type quotient for the conformal Killing operator on manifolds with boundary
Filed under: Riemannian geometry — Tags: — Ngô Quốc Anh @ 15:22
In the previous note, I showed a Rayleigh-type quotient for the conformal Killing operator $\mathbb L$ on manifolds $(M,g)$ with boundary $\partial M$, i.e. the following result holds:
Whenever $M$ admits no non-zero conformal Killing vector fields, the following holds
$\displaystyle C_g(M)=\inf \frac{{{{\left( {\int_M {|\mathbb LX|^2 d{v_g}} } \right)}^{1/2}}}}{{{{\left( {\int_M {|X|^{2n/(n - 2)}d{v_g}} } \right)}^{(n - 2)/(2n)}}}} > 0$
where the infimum is taken over all smooth vector fields $X$ on $M$ with $X \not\equiv 0$.
Today, I am going to prove a slightly stronger version of the above inequality, namely, when some terms on the boundary $\partial M$ take part in. Precisely, we shall prove
Whenever $M$ admits no non-zero conformal Killing vector fields, the following holds
$\displaystyle C_g(M,\partial M)=\inf \frac{{{{\left( {\int_M {|\mathbb LX|^2 d{v_g}} } \right)}^{1/2}}}}{{{{\left( {\int_M {|X|^\frac{2n}{n - 2}d{v_g}} } \right)}^\frac{n - 2}{2n}}} + \left( \int_{\partial M}|X|^\frac{2(n-1)}{n-2}ds_g\right)^\frac{n-2}{2(n-1)}} > 0$
where the infimum is taken over all smooth vector fields $X$ on $M$ with $X \not\equiv 0$.
However, a proof for this new inequality remains the same. To do so, we first make use of some Sobolev embeddings as follows:
|
|
# What mass of TiCl_4 is needed to produce 25.0 g of Ti if the reaction proceeds with an 82% yield in the reaction TiCl_4 + 2Mg -> Ti + 2MgCl_2?
Jul 3, 2016
You need 121 g of ${\text{TiCl}}_{4}$.
#### Explanation:
1. Write the balanced equation
The balanced equation is
${\text{TiCl"_4 + "2Mg" → "Ti" + "2MgCl}}_{2}$
2. Calculate the theoretical amount of Ti
An 82 % yield means that we get 82 g of product from a theoretical value of 100 g.
$\text{Theoretical yield" = 25.0 color(red)(cancel(color(black)("g actual"))) × "100 g theoretical"/(82 color(red)(cancel(color(black)("g actual"))))= "30.5 g theoretical}$
We must plan to get 30.5 g of $\text{Ti}$ to produce an actual yield of 25.0 g.
3. Calculate the moles of $\text{Ti}$
$\text{Moles of Ti" = 30.5 color(red)(cancel(color(black)("g Ti"))) × "1 mol Ti"/(47.87 color(red)(cancel(color(black)("g Ti")))) = "0.637 mol Ti}$
4. Calculate the moles of ${\text{TiCl}}_{4}$
${\text{Moles of TiCl"_4 = 0.637 color(red)(cancel(color(black)("mol Ti"))) × ("1 mol TiCl"_4)/(1 color(red)(cancel(color(black)("mol Ti")))) = "0.637 mol TiCl}}_{4}$
5. Calculate the mass of ${\text{TiCl}}_{4}$
${\text{Mass of TiCl"_ 4 = 0.637 color(red)(cancel(color(black)("mol TiCl"_4))) × "189.68 g TiCl"_4/(1 color(red)(cancel(color(black)("mol TiCl"_4)))) = "121 g TiCl}}_{4}$
|
|
# How do you solve using elimination of 3x+6y=12 and 2x-2.5y=13?
Nov 7, 2015
The system has one dolution: $\left\{\begin{matrix}x = 5 \frac{7}{13} \\ y = - \frac{10}{13}\end{matrix}\right.$
#### Explanation:
The original system is:
$\left\{\begin{matrix}3 x + 6 y = 12 \\ 2 x - 2.5 y = 13\end{matrix}\right.$
The elimination method means to change the system so that it is possible to eliminate one variable by adding (or substracting) both sides of the equations:
First we can divide both sides of the first equation by $3$ to make all the coefficients smaller and multiply the second equation by $2$ to make all the coefficients integer:
$\left\{\begin{matrix}x + 2 y = 4 \\ 4 x - 5 y = 26\end{matrix}\right.$
Now if we multiply the first equation by $\left(- 4\right)$ the coefficients of $x$ will be opposite numbers ($4$ and $- 4$)
$\left\{\begin{matrix}- 4 x - 8 y = - 16 \\ 4 x - 5 y = 26\end{matrix}\right.$
Now if we add both sides of the equations the variable $x$ will be eliminated:
$- 13 y = 10$
$y = - \frac{10}{13}$
Now if we move $2 y$ to the right side of the first equation before the last multiplication we get:
$x = 4 - 2 y$
Now we only have to put calculated $y$ in this equation and calculate $x$
$x = 4 - 2 \cdot \left(- \frac{10}{13}\right)$
$x = 4 + \frac{20}{13}$
$y = \frac{52 + 20}{13}$
$y = \frac{72}{13}$
$y = 5 \frac{7}{13}$
|
|
# Exact recursive expressions for final size
Author: Sangeeta Bhatia @sangeetabhatia03
Editor: Simon Frost @sdwfrost
Date: 2018-10-02
In a closed population, there is often interest in the total number of people infected, also known as the final size. Although simulations can be used (either deterministic or stochastic) can be used, there are more efficient methods for computing the final size.of a simple SIR model but the method can be generalised to other models.
The details are available in Black and Ross (2015). Instead of keeping tab of the population counts for each compartment ($S$, $I$, $R$), we keep a record of the number of infection and recovery events. At time t, let the number of infection events be $Z_1$ and the number of recovery events be $Z_t$. Then the state of our model is $(Z_1, Z_2)$. From one state to another, we can have at most one infection event or a single recovery event. Thus from $(Z_1, Z_2)$, the system can transition to $(Z_1 + 1, Z_2)$, $(Z_1, Z_2 + 1)$. To estimate the distribution of the final size, one needs to calculate the probability of all paths leading up to the state from which the system cannot transition $(Z, Z)$. The probabilities can be calculated easily by the states are indexed.
|
|
• ### Thermal Infrared and Optical Photometry of Asteroidal Comet C/2002 CE$_{10}$(1712.08388)
Dec. 22, 2017 astro-ph.EP
C/2002 CE$_{10}$ is an object in a retrograde elliptical orbit with Tisserand parameter $-0.853$ indicating a likely origin in the Oort Cloud. It appears to be a rather inactive comet since no coma and only a very weak tail was detected during the past perihelion passage. We present multi-color optical photometry, lightcurve and thermal mid-IR observations of the asteroidal comet. \textcolor{blue}{ With the photometric analysis in $BVRI$, the surface color is found to be redder than asteroids, corresponding to cometary nuclei and TNOs/Centaurs. The time-resolved differential photometry supports a rotation period of 8.19$\pm$0.05 h. The effective diameter and the geometric albedo are 17.9$\pm$0.9 km and 0.03$\pm$0.01, respectively, indicating a very dark reflectance of the surface. The dark and redder surface color of C/2002 CE$_{10}$ may be attribute to devolatilized material by surface aging suffered from the irradiation by cosmic rays or from impact by dust particles in the Oort Cloud. Alternatively, C/2002 CE$_{10}$ was formed of very dark refractory material originally like a rocky planetesimal. In both cases, this object lacks ices (on the surface at least). The dynamical and known physical characteristics of C/2002 CE$_{10}$ are best compatible with those of the Damocloids population in the Solar System, that appear to be exhaust cometary nucleus in Halley-type orbits. The study of physical properties of rocky Oort cloud objects may give us a key for the formation of the Oort cloud and the solar system.
• ### On residuals of finite groups(1708.04224)
Aug. 14, 2017 math.GR
A theorem of Dolfi, Herzog, Kaplan, and Lev \cite[Thm.~C]{DHKL} asserts that in a finite group with trivial Fitting subgroup, the size of the soluble residual of the group is bounded from below by a certain power of the group order, and that the inequality is sharp. Inspired by this result and some of the arguments in \cite{DHKL}, we establish the following generalisation: if $\mathfrak{X}$ is a subgroup-closed Fitting formation of full characteristic which does not contain all finite groups and $\overline{\mathfrak{X}}$ is the extension-closure of $\mathfrak{X}$, then there exists an (optimal) constant $\gamma$ depending only on $\mathfrak{X}$ such that, for all non-trivial finite groups $G$ with trivial $\mathfrak{X}$-radical, $$\left\lvert G^{\overline{\mathfrak{X}}}\right\rvert \,>\, \vert G\vert^\gamma,$$ where $G^{\overline{\mathfrak{X}}}$ is the ${\overline{\mathfrak{X}}}$-residual of $G$. When $\mathfrak{X} = \mathfrak{N}$, the class of finite nilpotent groups, it follows that $\overline{\mathfrak{X}} = \mathfrak{S}$, the class of finite soluble groups, thus we recover the original theorem of Dolfi, Herzog, Kaplan, and Lev. In the last section of our paper, building on J.\,G. Thompson's classification of minimal simple groups, we exhibit a family of subgroup-closed Fitting formations $\mathfrak{X}$ of full characteristic such that $\mathfrak{S} \subset \overline{\mathfrak{X}} \subset \mathfrak{E}$, thus providing applications of our main result beyond the reach of \cite[Thm.~C]{DHKL}.
• ### ASIME 2016 White Paper: In-Space Utilisation of Asteroids: "Answers to Questions from the Asteroid Miners"(1612.00709)
Jan. 16, 2017 astro-ph.EP
The aim of the Asteroid Science Intersections with In-Space Mine Engineering (ASIME) 2016 conference on September 21-22, 2016 in Luxembourg City was to provide an environment for the detailed discussion of the specific properties of asteroids, with the engineering needs of space missions that utilize asteroids. The ASIME 2016 Conference produced a layered record of discussions from the asteroid scientists and the asteroid miners to understand each other's key concerns and to address key scientific questions from the asteroid mining companies: Planetary Resources, Deep Space Industries and TransAstra. These Questions were the focus of the two day conference, were addressed by scientists inside and outside of the ASIME Conference and are the focus of this White Paper. The Questions from the asteroid mining companies have been sorted into the three asteroid science themes: 1) survey, 2) surface and 3) subsurface and 4) Other. The answers to those Questions have been provided by the scientists with their conference presentations or edited directly into an early open-access collaborative Google document (August 2016-October 2016), or inserted by A. Graps using additional reference materials. During the ASIME 2016 last two-hours, the scientists turned the Questions from the Asteroid Miners around by presenting their own key concerns: Questions from the Asteroid Scientists . These answers in this White Paper will point to the Science Knowledge Gaps (SKGs) for advancing the asteroid in-space resource utilisation domain.
• ### A microprocessor based on a two-dimensional semiconductor(1612.00965)
Dec. 3, 2016 cond-mat.mes-hall
The advent of microcomputers in the 1970s has dramatically changed our society. Since then, microprocessors have been made almost exclusively from silicon, but the ever-increasing demand for higher integration density and speed, lower power consumption and better integrability with everyday goods has prompted the search for alternatives. Germanium and III-V compound semiconductors are being considered promising candidates for future high-performance processor generations and chips based on thin-film plastic technology or carbon nanotubes could allow for embedding electronic intelligence into arbitrary objects for the Internet-of-Things. Here, we present a 1-bit implementation of a microprocessor using a two-dimensional semiconductor - molybdenum disulfide. The device can execute user-defined programs stored in an external memory, perform logical operations and communicate with its periphery. Importantly, our 1-bit design is readily scalable to multi-bit data. The device consists of 115 transistors and constitutes the most complex circuitry so far made from a two-dimensional material.
• ### Controlled generation of a pn-junction in a waveguide integrated graphene photodetector(1610.05526)
Oct. 18, 2016 cond-mat.mes-hall
With its electrically tunable light absorption and ultrafast photoresponse, graphene is a promising candidate for high-speed chip-integrated photonics. The generation mechanisms of photosignals in graphene photodetectors have been studied extensively in the past years. However, the knowledge about efficient light conversion at graphene pn-junctions has not yet been translated into high-performance devices. Here, we present a graphene photodetector integrated on a silicon slot-waveguide, acting as a dual-gate to create a pn-junction in the optical absorption region of the device. While at zero bias the photo-thermoelectric effect is the dominant conversion process, an additional photoconductive contribution is identified in a biased configuration. Extrinsic responsivities of 35 mA/W, or 3.5 V/W, at zero bias and 76 mA/W at 300 mV bias voltage are achieved. The device exhibits a 3 dB-bandwidth of 65 GHz, which is the highest value reported for a graphene-based photodetector.
• ### Black Phosphorus Mid-Infrared Photodetectors with High Gain(1603.07346)
March 23, 2016 cond-mat.mtrl-sci
Recently, black phosphorus (BP) has joined the two dimensional material family as a promising candidate for photonic applications, due to its moderate bandgap, high carrier mobility, and compatibility with a diverse range of substrates. Photodetectors are probably the most explored BP photonic devices, however, their unique potential compared with other layered materials in the mid-infrared wavelength range has not been revealed. Here, we demonstrate BP mid infrared detectors at 3.39 um with high internal gain, resulting in an external responsivity of 82 A/W. Noise measurements show that such BP photodetectors are capable of sensing low intensity mid-infrared light in the picowatt range. Moreover, the high photoresponse remains effective at kilohertz modulation frequencies, because of the fast carrier dynamics arising from BPs moderate bandgap. The high photoresponse at mid infrared wavelengths and the large dynamic bandwidth, together with its unique polarization dependent response induced by low crystalline symmetry, can be coalesced to promise photonic applications such as chip-scale mid-infrared sensing and imaging at low light levels.
• The Jiangmen Underground Neutrino Observatory (JUNO), a 20 kton multi-purpose underground liquid scintillator detector, was proposed with the determination of the neutrino mass hierarchy as a primary physics goal. It is also capable of observing neutrinos from terrestrial and extra-terrestrial sources, including supernova burst neutrinos, diffuse supernova neutrino background, geoneutrinos, atmospheric neutrinos, solar neutrinos, as well as exotic searches such as nucleon decays, dark matter, sterile neutrinos, etc. We present the physics motivations and the anticipated performance of the JUNO detector for various proposed measurements. By detecting reactor antineutrinos from two power plants at 53-km distance, JUNO will determine the neutrino mass hierarchy at a 3-4 sigma significance with six years of running. The measurement of antineutrino spectrum will also lead to the precise determination of three out of the six oscillation parameters to an accuracy of better than 1\%. Neutrino burst from a typical core-collapse supernova at 10 kpc would lead to ~5000 inverse-beta-decay events and ~2000 all-flavor neutrino-proton elastic scattering events in JUNO. Detection of DSNB would provide valuable information on the cosmic star-formation rate and the average core-collapsed neutrino energy spectrum. Geo-neutrinos can be detected in JUNO with a rate of ~400 events per year, significantly improving the statistics of existing geoneutrino samples. The JUNO detector is sensitive to several exotic searches, e.g. proton decay via the $p\to K^++\bar\nu$ decay channel. The JUNO detector will provide a unique facility to address many outstanding crucial questions in particle and astrophysics. It holds the great potential for further advancing our quest to understanding the fundamental properties of neutrinos, one of the building blocks of our Universe.
• ### Stoichiometric YFe2O4-\delta\ single crystals grown by the optical floating zone method(1507.05443)
July 20, 2015 cond-mat.mtrl-sci
We report the growth of YFe2O4-\delta\ single crystals by the optical floating zone method, showing for the first time the same magnetization as highly stoichiometric (\delta = 0.00) powder samples and sharp superstructure reflections in single crystal x-ray diffraction. The latter can be attributed to three dimensional long-range charge ordering. Resonant x-ray diffraction at the Fe K-edge with full linear polarization analysis was used for the investigation of the possibility of orbital order.
• ### Wavefronts and Light Cones for Kerr Spacetimes(1412.8068)
Dec. 27, 2014 gr-qc
We investigate the light propagation by means of simulations of wavefronts and light cones for Kerr spacetimes. Simulations of this kind give us a new insight to better understand the light propagation in presence of massive rotating black holes. A relevant result is that wavefronts are back scattered with winding around the black hole. To generate these visualizations, an interactive computer program with a graphical user interface, called JWFront, was written in Java.
• ### Mechanisms of photoconductivity in atomically thin MoS2(1406.5640)
Oct. 11, 2014 cond-mat.mes-hall
Atomically thin transition metal dichalcogenides have emerged as promising candidates for sensitive photodetection. Here, we report a photoconductivity study of biased mono- and bilayer molybdenum disulfide field-effect transistors. We identify photovoltaic and photoconductive effects, which both show strong photogain. The photovoltaic effect is described as a shift in transistor threshold voltage due to charge transfer from the channel to nearby molecules, including SiO2 surface-bound water. The photoconductive effect is attributed to the trapping of carriers in band tail states in the molybdenum disulfide itself. A simple model is presented that reproduces our experimental observations, such as the dependence on incident optical power and gate voltage. Our findings offer design and engineering strategies for atomically thin molybdenum disulfide photodetectors, and we anticipate that the results are generalizable to other transition metal dichalcogenides as well.
• ### The albedo-color diversity of transneptunian objects(1406.1420)
Sept. 7, 2014 astro-ph.EP
We analyze albedo data obtained using the Herschel Space Observatory that reveal the existence of two distinct types of surface among midsized transneptunian objects. A color-albedo diagram shows two large clusters of objects, one redder and higher albedo and another darker and more neutrally colored. Crucially, all objects in our sample located in dynamically stable orbits within the classical Kuiper belt region and beyond are confined to the bright-red group, implying a compositional link. Those objects are believed to have formed further from the Sun than the dark-neutral bodies. This color-albedo separation is evidence for a compositional discontinuity in the young solar system.
• ### Photovoltaic effect in an electrically tunable van der Waals heterojunction(1403.2652)
July 26, 2014 cond-mat.mes-hall
Semiconductor heterostructures form the cornerstone of many electronic and optoelectronic devices and are traditionally fabricated using epitaxial growth techniques. More recently, heterostructures have also been obtained by vertical stacking of two-dimensional crystals, such as graphene and related two- dimensional materials. These layered designer materials are held together by van der Waals forces and contain atomically sharp interfaces. Here, we report on a type- II van der Waals heterojunction made of molybdenum disulfide and tungsten diselenide monolayers. The junction is electrically tunable and under appropriate gate bias, an atomically thin diode is realized. Upon optical illumination, charge transfer occurs across the planar interface and the device exhibits a photovoltaic effect. Advances in large-scale production of two-dimensional crystals could thus lead to a new photovoltaic solar technology.
• ### Solar-energy conversion and light emission in an atomic monolayer p-n diode(1309.7492)
March 9, 2014 cond-mat.mes-hall
Two-dimensional (2D) atomic crystals, such as graphene and atomically thin transition metal dichalcogenides (TMDCs), are currently receiving a lot of attention. They are crystalline, and thus of high material quality, even so, they can be produced in large areas and are bendable, thus providing opportunities for novel applications. Here, we report a truly 2D p-n junction diode, based on an electrostatically doped tungsten diselenide (WSe2) monolayer. As p-n diodes are the basic building block in a wide variety of optoelectronic devices, our demonstration constitutes an important advance towards 2D optoelectronics. We present applications as (i) photovoltaic solar cell, (ii) photodiode, and (iii) light emitting diode. Light power conversion and electroluminescence efficiencies are ca. 0.5 % and 0.1 %, respectively. Given the recent advances in large-scale production of 2D crystals, we expect them to profoundly impact future developments in solar, lighting, and display technologies.
• ### CMOS-compatible graphene photodetector covering all optical communication bands(1302.3854)
Optical interconnects are becoming attractive alternatives to electrical wiring in intra- and inter-chip communication links. Particularly, the integration with silicon complementary metal-oxide-semiconductor (CMOS) technology has received considerable interest due to the ability of cost-effective integration of electronics and optics on a single chip. While silicon enables the realization of optical waveguides and passive components, the integration of another, optically absorbing, material is required for photodetection. Germanium or compound semiconductors are traditionally used for this purpose; their integration with silicon technology, however, faces major challenges. Recently, graphene has emerged as a viable alternative for optoelectronic applications, including photodetection. Here, we demonstrate an ultra-wideband CMOS-compatible photodetector based on graphene. We achieve multi-gigahertz operation over all fiber-optic telecommunication bands, beyond the wavelength range of strained germanium photodetectors, whose responsivity is limited by their bandgap. Our work complements the recent demonstration of a CMOS-integrated graphene electro-optical modulator, paving the way for carbon-based optical interconnects.
• ### Optimizing the search for resources by sharing information: Mongolian gazelles as a case study(1301.5465)
We investigate the relationship between communication and search efficiency in a biological context by proposing a model of Brownian searchers with long-range pairwise interaction. After a general study of the properties of the model, we show an application to the particular case of acoustic communication among Mongolian gazelle, for which data are available, searching for good habitat areas. Using Monte Carlo simulations and density equations, our results point out that the search is optimal (i.e. the mean first hitting time among searchers is minimum) at intermediate scales of communication, showing that both an excess and a lack of information may worsen it.
• ### Scaling of the normal coefficient of restitution for wet impacts(1301.5548)
Jan. 23, 2013 cond-mat.soft
A thorough understanding of the energy dissipation in the dynamics of wet granular matter is essential for a continuum description of natural phenomena such as debris flow, and the development of various industrial applications such as the granulation process. The coefficient of restitution (COR), defined as the ratio between the relative rebound and impact velocities of a binary impact, is frequently used to characterize the amount of energy dissipation associated. We measure the COR by tracing a freely falling sphere bouncing on a wet surface with the liquid film thickness monitored optically. For fixed ratio between the film thickness and the particle size, the dependence of the COR on the impact velocity and various properties of the liquid film can be characterized with the Stokes number, defined as the ratio between the inertia of the particle and the viscosity of the liquid. Moreover, the COR for infinitely large impact velocities derived from the scaling can be analyzed by a model considering the energy dissipation from the inertia of the liquid film.
• ### Microcavity-integrated graphene photodetector(1112.1549)
Dec. 7, 2011 cond-mat.mes-hall
The monolithic integration of novel nanomaterials with mature and established technologies has considerably widened the scope and potential of nanophotonics. For example, the integration of single semiconductor quantum dots into photonic crystals has enabled highly efficient single-photon sources. Recently, there has also been an increasing interest in using graphene - a single atomic layer of carbon - for optoelectronic devices. However, being an inherently weak optical absorber (only 2.3 % absorption), graphene has to be incorporated into a high-performance optical resonator or waveguide to increase the absorption and take full advantage of its unique optical properties. Here, we demonstrate that by monolithically integrating graphene with a Fabry-Perot microcavity, the optical absorption is 26-fold enhanced, reaching values >60 %. We present a graphene-based microcavity photodetector with record responsivity of 21 mA/W. Our approach can be applied to a variety of other graphene devices, such as electro-absorption modulators, variable optical attenuators, or light emitters, and provides a new route to graphene photonics with the potential for applications in communications, security, sensing and spectroscopy.
• ### Intrinsic response time of graphene photodetectors(1105.3123)
May 17, 2011 cond-mat.mes-hall
Graphene-based photodetectors are promising new devices for high-speed optoelectronic applications. However, despite recent efforts, it is not clear what determines the ultimate speed limit of these devices. Here, we present measurements of the intrinsic response time of metal-graphene-metal photodetectors with monolayer graphene using an optical correlation technique with ultrashort laser pulses. We obtain a response time of 2.1 ps that is mainly given by the short lifetime of the photogenerated carriers. This time translates into a bandwidth of ~262 GHz. Moreover, we investigate the dependence of the response time on gate voltage and illumination laser power.
• ### Catalogue of Spacetimes(0904.4184)
Nov. 4, 2010 gr-qc
The Catalogue of Spacetimes is a collection of four-dimensional Lorentzian spacetimes in the context of the General Theory of Relativity (GR). The aim of the catalogue is to give a quick reference for students who need some basic facts of the most well-known spacetimes in GR.
• ### Graphene photodetectors for high-speed optical communications(1009.4465)
While silicon has dominated solid-state electronics for more than four decades, a variety of new materials have been introduced into photonics to expand the accessible wavelength range and to improve the performance of photonic devices. For example, gallium-nitride based materials enable the light emission at blue and ultraviolet wavelengths, and high index contrast silicon-on-insulator facilitates the realization of ultra dense and CMOS compatible photonic devices. Here, we report the first deployment of graphene, a two-dimensional carbon material, as the photo-detection element in a 10 Gbits/s optical data link. In this interdigitated metal-graphene-metal photodetector, an asymmetric metallization scheme is adopted to break the mirror symmetry of the built-in electric-field profile in conventional graphene field-effect-transistor channels, allowing for efficient photo-detection within the entire area of light illumination. A maximum external photo-responsivity of 6.1 mA/W is achieved at 1.55 {\mu}m wavelength, a very impressive value given that the material is below one nanometer in thickness. Moreover, owing to the unique band structure and exceptional electronic properties of graphene, high speed photodetectors with an ultra-wide operational wavelength range at least from 300 nm to 6 {\mu}m can be realized using this fascinating material.
• ### Efficient narrow-band light emission from a single carbon nanotube p-n diode(1004.5562)
April 30, 2010 cond-mat.mes-hall
Electrically-driven light emission from carbon nanotubes could be exploited in nano-scale lasers and single-photon sources, and has therefore been the focus of much research. However, to date, high electric fields and currents have been either required for electroluminescence, or have been an undesired side effect, leading to high power requirements and low efficiencies. In addition, electroluminescent linewidths have been broad enough to obscure the contributions of individual optical transitions. Here, we report electrically-induced light emission from individual carbon nanotube p-n diodes. A new level of control over electrical carrier injection is achieved, reducing power dissipation by a factor of up to 1000, and resulting in zero threshold current, negligible self-heating, and high carrier-to- photon conversion efficiencies. Moreover, the electroluminescent spectra are significantly narrower (ca. 35 meV) than in previous studies, allowing the identification of emission from free and localized excitons.
• ### Photocurrent imaging and efficient photon detection in a graphene transistor(0912.4788)
We measure the channel potential of a graphene transistor using a scanning photocurrent imaging technique. We show that at a certain gate bias, the impact of the metal on the channel potential profile extends into the channel for more than 1/3 of the total channel length from both source and drain sides, hence most of the channel is affected by the metal. The potential barrier between the metal controlled graphene and bulk graphene channel is also measured at various gate biases. As the gate bias exceeds the Dirac point voltage, VDirac, the original p-type graphene channel turns into a p-n-p channel. When light is focused on the p-n junctions, an impressive external responsivity of 0.001 A/W is achieved, given that only a single layer of atoms are involved in photon detection.
• ### Ultrafast graphene photodetector(0912.4794)
The electronic properties of graphene are unique and are attracting increased attention to this novel 2-dimensional system. Its photonic properties are not less impressive. For example, this single atomic layer absorbs through direct interband transitions a considerable fraction of the light (~2.3%) over a very a broad wavelength range. However, while applications in electronics are vigorously being pursued, photonic applications have not attracted as much attention. Here, we report on ultrafast photocurrent response measurements in graphene (single and few-layers) field-effect-transistors (FETs) up to 40 GHz light intensity modulation frequencies, using a 1.55 micron excitation laser. No photoresponse degradation is observable up to the highest measured frequency, demonstrating the feasibility and unique benefits of using graphene in photonics. Further analysis suggests that the intrinsic bandwidth of such graphene FET based photodetectors may exceed 500 GHz. Most notably, the generation and transport of the photo-carriers in such graphene photodetectors are fundamentally different from those in currently known semiconductor photodetectors, leading to a remarkably high bandwidth, zero source-drain bias (hence zero dark current) operation, and good internal quantum efficiency.
• ### A trip to the end of the universe and the twin paradox(physics/0612126)
Dec. 13, 2006 physics.ed-ph
In principle, the twin paradox offers the possibility to go on a trip to the center of our galaxy or even to the end of our universe within life time. In order to be a most comfortable journey the voyaging twin accelerates with Earth's gravity. We developed some Java applets to visualize what both twins could really measure, namely time signals and light coming from the surrounding sky.
|
|
SEARCH HOME
Math Central Quandaries & Queries
Question from Carla, a student: Find the derivative using the limit process of f(x) = (x+1)^1/2
Hi Carla,
The derivative of $f(x)$ is the limit, as $h$ approaches zero of the difference quotient
$\frac{f(x + h) - f(x)}{h}.$
For your function this difference quotient is
$\frac{(x + h + 1)^{1/2} - (x + 1)^{1/2}}{h}.$
If you multiply the numerator and denominator by $(x + h + 1)^{1/2} + (x + 1)^{1/2}$ and simplify you will arrive at an expression that can be evaluated as $h$ approaches zero.
I hope this helps,
Harley
Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences.
|
|
# What's the point?
Geometry Level 4
The line $$\color{red}{l}$$ has equations $\dfrac{x-1}{2}=\dfrac{y-1}{3}=\dfrac{z+1}{2}$ and the point $$A$$ is $$(7, 3, 7)$$. $$M$$ is the point where the $$\color{#007fff}{\text{perpendicular}}$$ from $$A$$ meets $$\color{red}{l}$$.
The point $$\color{#ff8600}{B}$$ lies on $$AM$$ such that $$\overrightarrow { AB } =3 \, \overrightarrow { BM }$$. If the coordinates of $$\color{#ff8600}{B}$$ are $$(p, q, r)$$, find the value of $$pqr$$.
×
|
|
# In ∆PQR, point S is the midpoint of side QR. If PQ = 11, PR = 17, PS = 13, find QR. - Geometry
Sum
In ∆PQR, point S is the midpoint of side QR. If PQ = 11, PR = 17, PS = 13, find QR.
#### Solution
In ∆PQR, point S is the midpoint of side QR.
$QS = SR = \frac{1}{2}QR$
${PQ}^2 + {PR}^2 = 2 {PS}^2 + 2 {QS}^2$ .......…[Apollonius theorem]
$\Rightarrow {11}^2 + {17}^2 = 2 \left( 13 \right)^2 + 2 {QS}^2$
$\Rightarrow 121 + 289 = 2\left( 169 \right) + 2 {QS}^2$
$\Rightarrow 410 = 338 + 2 {QS}^2$
$\Rightarrow 2 {QS}^2 = 410 - 338$
$\Rightarrow 2 {QS}^2 = 72$
$\Rightarrow {QS}^2 = 36$
$\Rightarrow QS = 6$
$\therefore QR = 2 \times QS$
$= 2 \times 6$
$= 12$
Hence, QR = 12.
Is there an error in this question or solution?
#### APPEARS IN
Balbharati Mathematics 2 Geometry 10th Standard SSC Maharashtra State Board
Chapter 2 Pythagoras Theorem
Practice Set 2.2 | Q 1 | Page 43
|
|
# How do i Remove Differencing applied to a time Series, ARIMA model?
Am trying to forecast using time series method called ARIMA. I have followed steps to build a time series model displayed in the code below. My challenge is on (Merging Actual and Forecast in One Series) and Remove Transformation from Series.
salesData<- read.csv("C:/Users/sales.csv")
#converting data into time series
salesData<-ts(salesData,start = 2010, frequency = 4)
# Checking for stationarity
library(tseries)
# transforming data to stationary
ndiffs(salesData)
diff_series <- diff(salesData)
tsdisplay(diff_series)
## Augmented Dickey-Fuller Test for stationarity
|
|
Mathematics
OpenStudy (anonymous):
According to a research company, during a certain year 82 million out of 174 million adults in the United States corrected their vision by using prescription eyeglasses, bifocals, or contact lenses. (Some respondents use more than one type.) What is the probability that an adult selected at random from the adult population uses corrective lenses? (Round your answer to three decimal places.)
OpenStudy (vishal_kothari):
0.471
OpenStudy (mertsj):
$\frac{82}{174}=.471$
OpenStudy (vishal_kothari):
yeah..
OpenStudy (anonymous):
thankss :)
Latest Questions
IAmHer: Help SS below
26 seconds ago 1 Reply 0 Medals
26millecai: Can someone dm me, i need someone to talk to.
8 minutes ago 3 Replies 0 Medals
retroBOBAgurllll66: do you think something toxic an algae makes can get into a fishes cells and kill
14 seconds ago 3 Replies 0 Medals
dukedadon: time to level up boiiiiiiiiiiiis
16 minutes ago 2 Replies 0 Medals
|
|
# Start a new discussion
## Not signed in
Want to take part in these discussions? Sign in if you have an account, or apply for one below
## Site Tag Cloud
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
• wrote out parts of the proof of $\Omega^{un}_\bullet \simeq \pi_\bullet M O$ at Thom spectrum
• At crossed module it seems we are missing what i think should be the prototypical example: the relative second homotopy group $\pi_2(X,A)$ together with the bundary map $\delta:\pi_2(X,A)\to \pi_1(A)$ and the $\pi_1(A)$-action on $\pi_2(X,A)$. As someone confirms this example is correct I’ll add it to crossed module.
• Add basic definition in context of algebraic topology. My first contribution.
Grant
• Weakly reductive semigroups is a special class of semigroups that include monoids and is interesting from the perspective of being able to represent a semigroup as its translations.
• at the beginning of ring I have spelled out a more explicit definition. Also added the examples of rings on cyclic groups to explain the origin of the word “ring”.
• Page created, but author did not leave any comments.
• starting something – not done yet
• this is a bare sub-section, to be !include-ed into the pertinent entries (at embedding tensor, at tensor hierarchy and at super Lie algebra) in order to avoid having to copy this stuff around and to facilitate updating and syncing it across these entries
• Since I found out there is such a thing, I’d better start a page.
• following Zoran’s suggestion I added to the beginning of the Idea-section at monad a few sentences on the general idea, leading then over to the Idea with respect to algebraic theories that used to be the only idea given there.
Also added a brief stub-subsection on monads in arbitrary 2-categories. This entry deserves a bit more atention.
• Today I was asked for what I know about the development of the theory of Kan-fibrant simplicial manifolds. I realized that the nLab does not discuss this, so I have started a page now with the facts that come to mind right away. (Likely I forgot various things that should still be added.)
• I started an article about Martin-Löf dependent type theory. I hope there aren't any major mistakes!
One minor point: I overloaded $\mathrm{cases}$ by using it for both finite sum types and dependent sum types. Can anyone think of a better name for the operation for finite sum types?
• updated the link to her webpage.
• I added a section on strictification of pseudofunctors $C \to Cat$ to pseudofunctor, after seeing Finn and Mike respond to Karol in the stable monoidal derivator thread at the Café. The discussion is fairly sketchy and pedestrian. Also added a few references.
• Page created, but author did not leave any comments.
Anonymous
• The conjecture is not true for all single-sorted algebraic theories and this was known by Soviet mathematicians. I added a short high-level explanation on this and some references to translated works that have more detail. Presumably one should edit rest of the page (and references to it) to make it clear throughout that (i) the conjecture is false (ii) the general question “Which algebraic categories have the Higman property?” is still interesting (and potentially something category-theorists could study).
• started a Properties-section at Lawvere theory with some basic propositions.
Would be thankful if some experts looked over this.
Also added the example of the theory of sets. (A longer list of examples would be good!) And added the canonical reference.
• Edited the section on Boone conjecture in light of it being false.
• I added a couple of references for the claim
There is a Curry–Howard correspondence between linear-time temporal logic (LTL) and functional reactive programming (FRP).
How about for CLT and CLT* (in the computation tree logic section)?
Were we looking to integrate this section with the one above on temporal type theory as an adjoint logic, could there be a way via some branching representation of our type $Time$ as a tree?
I see Joachim Kock has an interesting way of presenting trees.
• The induced map most likely isn’t a homeomorphism when $X, Y$ are locally compact Hausdorff.
The original statement was in monograph by Postnikov without proof.
Not only that, in the current form it couldn’t possibly be true, since the map could lack to be bijective.
For more details see here: https://math.stackexchange.com/questions/3934265/adjunction-of-pointed-maps-is-a-homeomorphism .
I’ve added a reference in the case when $X, Y$ are compact Hausdorff though.
• brief category:people-entry for hyperlinking references
• brief category:people-entry for hyperlinking references
|
|
1800 2000 838
CART 0
• 0
MY CART (5)
Use Coupon: CART10 and get 10% off on all online Study Material
ITEM
DETAILS
MRP
DISCOUNT
FINAL PRICE
Total Price: R
There are no items in this cart.
Continue Shopping
Get instant 50% OFF on Online Material.
Use coupon code: MOB50 | View Course list
``` if median of triangle are 5cm,6cm,7cm then find the area
```
3 years ago
Share
``` In case of mediansRemember the following formulae$A=(4/3)\sqrt{s_{m}(s_{m}-m_{1})(s_{m}-m_{2})(s_{m}-m_{3})} \\$Arun KumarIIT DelhiAskiitians Faculty
```
one year ago
what are some important value we can earn in studying arithmetic progression and geometric progression
Understanding AP and GP will let you understand how the series can be solved easily which increases or decreases by the fixed ratio or distance. Thanks
Vijay Mukati 3 months ago
prove that the triangle which has one of the angles as 60 degree, can not have all vertices with integral coordinates
If we take origin and two arbitrary coordinates with lines passing through them. calculate slope. slope difference between can not be 60.
Charchit Tailong 2 months ago
I m having problem in these two questions: 1) f(x)=x^3+6x^2+(9+2k)x+1 is increasing if k is 2)f(x)=cosx-2PX is monotonically decreasing for p:
HInt: 1. If we diffirenciate a cubic equation, we get the quadratic equation. Not for cubic polynomial to be increasing function, its derivative should be positive, i.e. quadratic polynomial...
Vijay Mukati 2 months ago
find the equation of a plane which is at a distance of 3 root 3 units from the origin and the normal to which is equally inclined to the coordinate axes.
Hi, You know the direction cosine of normal to the plane and u know the point lying on that plane ( say, (3,3,3) in first quadrant) .So, you would get four such planes depending on the...
Shobhit Varshney 11 months ago
(p/(1-(x^p)))-(q/(1-x^q))) where li tends to 1 and p and q are natural number
= At x tending to 1, it is of indeterminant form 0/0. Using L-Hospital rule
Anoopam Mishra one month ago
This is again of 0/0 form. Again use L-Hospital rule Now putting x=1.
Anoopam Mishra one month ago
View all Questions »
More Questions On Analytical Geometry
Post Question
|
|
# Second order transfer functions, intrinsic time constants and responses
Say I have the following circuit: -
simulate this circuit – Schematic created using CircuitLab
This circuit has the following transfer function $$\H(s) = \frac{V_o(s)}{V_{in}(s)} = \frac{\frac{1}{LC}}{s^2+s\frac{1}{RC}+\frac{1}{LC}} \$$.
By definition, we have the damping coefficient $$\\alpha=\frac{1}{2} \cdot\frac{1}{RC} \$$, and the undamped resonant frequency $$\\omega_0 = \sqrt{\frac{1}{LC}} \$$. From this, we also have the damping ratio $$\\zeta=\frac{\alpha}{\omega_0} \$$. Finally, we also have the damped resonant frequency $$\\omega_d = \sqrt{\omega_0^2-\alpha^2} \$$.
Let's pick arbitrary component values, such that $$\\zeta=0.5 \$$ (an underdamped case). This occurs when, for example, $$\R=1\Omega, \: \: L=1\text{H}, \: \: C=1\text{F}\$$. This causes $$\\omega_d=0.866 \text{rad}^{-1} \Rightarrow f_d = 0.137\text{Hz} \$$. Plotting the step response with these component values gives: -
The response has one oscillation, with the period $$\T=7.26\text{s} \Rightarrow f = \frac{1}{7.26\text{s}} = 0.137\text{Hz}\$$ which matches perfectly our calculated $$\\omega_d \$$.
So $$\\omega_d \$$ tells us something about the frequency of the underdamped response. BUT! since $$\\omega_d \$$ is a frequency, taking the inverse of it gives us (presumably) a time constant, $$\ \frac{1}{\omega_d} = \tau_d \$$, but in this case it is the period of the response $$\T\$$. I am particularly interested in the case for the undamped resonant frequency $$\\ \frac{1}{\omega_0} = \tau_0 \$$.
My question is, do these time constants tells us anything useful about the system? Are they characteristic for the system? The damping ratio, resonant frequency and damped frequency all tell us something about the system and its response. So what about these time constants?
Sorry for the long rant, but I feel this explanation is necessary.
• @Carl Yes, they are. But I suppose you haven't sat down with pencil and paper to solve these things in both the frequency and time domains, simultaneously. If you had, these things would stand out. Some years ago I wrote this. That may give some clues. Not sure if it helps, as I really could have done a much better job writing it out. So it's not as good as I'd like it. But maybe something in there triggers an idea.
– jonk
Sep 23, 2021 at 6:57
• @Carl The 1st order time constant is RC or R/L. Note the presence of R, in both, and that's the equivalent of $\zeta$. LC has no R, in the same way a 4th order RLC would have $L_1L_2C_1C_2$ which, again, defines no time constant; it does have an 1/RC. Those only define the system's natural frequency. Just because you can reverse it and extract some T, it doesn't mean there's a time constant (related to LC). In fact, for all three responses of the 2nd order, the common term is $\exp(-\omega_0\zeta t)$ (save the constant term), where $\zeta$ is constantly attached to $\omega_0$. Sep 23, 2021 at 7:03
• @aconcernedcitizen In fact, $\alpha = \omega_{_0}\zeta$. So you can either have $e^{^{-\alpha \,t}}$ or else $e^{^{-\frac{t}{\tau}}}$, where $\tau=\frac1{\alpha}$.
– jonk
Sep 23, 2021 at 7:05
• @jonk Yes, I've written it like this to make sure the terms are visible. Sep 23, 2021 at 7:07
• @aconcernedcitizen Got it.
– jonk
Sep 23, 2021 at 7:07
## Setup
I'll keep this short, mostly because I don't know that for which you are ferreting.
With KCL, you have:
\begin{align*} C\frac{\text{d}\,v_{_{\text{O}{\left(t\right)}}}}{\text{d}t}+\frac{v_{_{\text{O}{\left(t\right)}}}}{R}+\frac{1}{L}\int v_{_{\text{O}{\left(t\right)}}}\:\text{d}t&=\frac{1}{L}\int v_{_{\text{IN}{\left(t\right)}}}\:\text{d}t \\\\ \frac{\text{d}^2}{\text{d}t^2}v_{_{\text{O}{\left(t\right)}}}+\frac1{R\,C}\cdot\frac{\text{d}}{\text{d}t}v_{_{\text{O}{\left(t\right)}}}+\frac{1}{L\,C}v_{_{\text{O}{\left(t\right)}}}&=\frac{1}{L\,C}v_{_{\text{IN}{\left(t\right)}}} \end{align*}
I'm sure you already know that $$\s\$$ is just an operator: $$\s=\frac{\text{d}}{\text{d}t}\$$. In Laplace-space, anyway. And you also know that the Laplace transform is a linear operator, too. So we can apply it to both sides of the equals sign and the above then is just:
\begin{align*} s^2 \mathcal{L}\left\{v_{_{\text{O}{\left(t\right)}}}\right\}+\frac1{R\,C}\cdot s\mathcal{L}\left\{v_{_{\text{O}{\left(t\right)}}}\right\}+\frac{1}{L\,C}\mathcal{L}\left\{v_{_{\text{O}{\left(t\right)}}}\right\}&=\frac{1}{L\,C}\mathcal{L}\left\{v_{_{\text{IN}{\left(t\right)}}}\right\}\\\\ \mathcal{L}\left\{v_{_{\text{O}{\left(t\right)}}}\right\}\left[s^2+\frac1{R\,C}\cdot s+\frac{1}{L\,C}\right]&=\mathcal{L}\left\{v_{_{\text{IN}{\left(t\right)}}}\right\}\left[\frac{1}{L\,C}\right] \end{align*}
The above doesn't apply the full application of the operator. The initial conditions would, if included, become part of the result and then moved over to the right side to become part of the numerator. But I did that for three reasons.
The first is because I want to emphasize the characteristic equation:
$$s^2+\frac1{R\,C}\cdot s+\frac{1}{L\,C}$$
The second is because I want to emphasize the transfer function:
\begin{align*} \frac{\mathcal{L}\left\{v_{_{\text{O}{\left(t\right)}}}\right\}}{\mathcal{L}\left\{v_{_{\text{IN}{\left(t\right)}}}\right\}}=\frac{V_{_{\text{O}{\left(s\right)}}}}{V_{_{\text{IN}{\left(s\right)}}}}&=\frac{\frac{1}{L\,C}}{s^2+\frac1{R\,C}\cdot s+\frac{1}{L\,C}} \end{align*}
And the third is because you discuss the step response and for that I get to assume something about the initial conditions, setting them to zero.
Note also that the characteristic equation is now in the denominator.
## Defining Terms
In order to simplify things so that you can look up solutions in a Laplace table more readily, we want to factor the characteristic equation using the standard quadratic solution equation, $$\s=\frac{-b\,\pm\,\sqrt{b^{\,2}-\,4\:a\:c}}{2\:a}\$$. It would be very convenient if the $$\b^2\$$ term produced a $$\4\$$ so that it could be factored out of the square-root function. (That also helps to get rid of the $$\2\$$ in the denominator of the quadratic equation.) So we define $$\2\alpha=\frac1{R\,C}\$$.
Let's also define $$\\omega_{_0}=\frac1{\sqrt{L\,C}}\$$ (because we'd like to factor it out, as well, from the square-root function) and find that the solution to the characteristic equation is:
\begin{align*} s_{_1}&=-\alpha+\omega_{_0}\sqrt{\left[\frac{\alpha}{\omega_{_0}}\right]^2-1}&s_{_2}&=-\alpha-\omega_{_0}\sqrt{\left[\frac{\alpha}{\omega_{_0}}\right]^2-1} \end{align*}
The above can be re-written as:
\begin{align*} s_{_1}&=\omega_{_0}\left(-\frac{\alpha}{\omega_{_0}}+\sqrt{\left[\frac{\alpha}{\omega_{_0}}\right]^2-1}\right)&s_{_2}&=\omega_{_0}\left(-\frac{\alpha}{\omega_{_0}}-\sqrt{\left[\frac{\alpha}{\omega_{_0}}\right]^2-1}\right) \end{align*}
Note that the above just begs for a new unitless ratio, $$\\zeta=\frac{\alpha}{\omega_{_0}}\$$ (called the unitless damping factor or the damping ratio) so that the results now are:
\begin{align*} s_{_1}&=\omega_{_0}\left(-\zeta+\sqrt{\zeta^2-1}\right)&s_{_2}&=\omega_{_0}\left(-\zeta-\sqrt{\zeta^2-1}\right) \end{align*}
And that ratio is useful for some things (like deciding if the situation is over-damped, critically damped, or under-damped and dividing things up into two distinctly different regions of behavior separated by the thin line defined by the critically damped case.)
## Under-damped Case
In the under-damped case we already know that $$\\zeta<1\$$. So we'd like to re-arrange things to allow the square-root factor to be real.
So:
\begin{align*} s_{_1}&=-\alpha+j\,\omega_{_0}\sqrt{1-\zeta^2}&s_{_2}&=-\alpha-j\,\omega_{_0}\sqrt{1-\zeta^2} \\\\ s_{_1}&=-\alpha+j\,\omega_{_\text{d}}&s_{_2}&=-\alpha-j\,\omega_{_\text{d}} \end{align*}
where the damping frequency is defined as: $$\\omega_{_\text{d}}=\omega_{_0}\sqrt{1-\zeta^2}\$$ and is real-valued when $$\\zeta<1\$$ (under-damped), is zero when critically damped, and is imaginary when $$\\zeta>1\$$ (over-damped.)
## Step Response
Let's revisit an earlier equation:
\begin{align*} \frac{V_{_{\text{O}{\left(s\right)}}}}{V_{_{\text{IN}{\left(s\right)}}}}&=\frac{\omega_{_0}^2}{s^2+2\alpha\, s+\omega_{_0}^2} = \frac{\omega_{_0}^2}{s^2+2\zeta\omega_{_0}\, s+\omega_{_0}^2} \end{align*}
The step response will be:
\begin{align*} \frac1{s}\cdot\frac{\omega_{_0}^2}{s^2+2\zeta\omega_{_0}\, s+\omega_{_0}^2} \end{align*}
A reason for all the trouble of using the quadratic equation to solve the characteristic equation is usually so that we can use partial fractions. Which we definitely would want to do if this were an exponential growth situation (right-half plane.)
But it's not. So we don't need to do partial fractions and we can cheat and look up the time-domain solution near the bottom of this web page:
\begin{align*} v_{_{\text{O}{\left(t\right)}}} &= 1-\frac{e^{-\alpha\,t}}{\sqrt{1-\zeta^2}}\cdot\sin\left(t\,\omega_{_0}\sqrt{1-\zeta^2}+\cos^{-1}\left(\zeta\right)\right) \\\\ &=1-\frac{e^{-\alpha\,t}}{\sqrt{1-\zeta^2}}\cdot\sin\left(\omega_{_\text{d}}\,t+\cos^{-1}\left(\zeta\right)\right) \\\\ &=1-\frac{e^{-\alpha\,t}}{\sqrt{1-\zeta^2}}\cdot\sin\left(\omega_{_\text{d}}\,t+\tan^{-1}\left(\frac{\omega_{_\text{d}}}{\alpha}\right)\right) \\\\ &=1-\frac{\omega_{_0}}{\omega_{_\text{d}}}\cdot e^{-\alpha\,t}\cdot\sin\left(\omega_{_\text{d}}\,t+\tan^{-1}\left(\frac{\omega_{_\text{d}}}{\alpha}\right)\right) \\\\ &=1-\frac{\sqrt{\alpha^2+\omega_{_\text{d}}^2}}{\omega_{_\text{d}}}\cdot e^{-\alpha\,t}\cdot\sin\left(\omega_{_\text{d}}\,t+\tan^{-1}\left(\frac{\omega_{_\text{d}}}{\alpha}\right)\right) \\\\ &=1-\sqrt{1+\left[\frac{\alpha}{\omega_{_\text{d}}}\right]^2}\cdot e^{-\alpha\,t}\cdot\sin\left(\omega_{_\text{d}}\,t+\tan^{-1}\left(\frac{\omega_{_\text{d}}}{\alpha}\right)\right) \end{align*}
From the above, you may realize that $$\\omega_{_\text{d}}\$$ and $$\\alpha\$$ correspond to two sides of a right triangle, with $$\\omega_{_\text{d}}\$$ related to the sine and $$\\alpha\$$ to the cosine. The hypotenuse is $$\\omega_{_0}\$$ and $$\\tan\left(\theta\right)=\frac{\omega_{_\text{d}}}{\alpha}\$$:
So:
\begin{align*} v_{_{\text{O}{\left(t\right)}}} &=1-\csc\left(\theta\right)\cdot e^{-\alpha\,t}\cdot \sin\left(\omega_{_\text{d}}\,t+\theta\right) \end{align*}
Setting $$\\tau_{_\text{d}}=\frac1{\omega_{_\text{d}}}\$$ and $$\\tau_{_\alpha}=\frac1{\alpha}\$$, then $$\\tan\left(\theta\right)=\frac{\tau_{_\alpha}}{\tau_{_\text{d}}}\$$ and:
\begin{align*} v_{_{\text{O}{\left(t\right)}}} &=1-\csc\left(\theta\right)\cdot e^{^{-\frac{t}{\tau_{_\alpha}}}}\cdot \sin\left(\frac{t}{\tau_{_\text{d}}}+\theta\right) \end{align*}
$$\\tau_{_\alpha}\$$ relates to how quickly the oscillations damp out and $$\\tau_{_\text{d}}\$$ relates to the oscillation period. (Do note that in the under-damped case $$\\tan\left(\theta\right)>0\$$.)
## Summary
In your example case, this means $$\\tau_{_\text{d}}=\frac2{\sqrt{3}}\$$, $$\\tau_{_\alpha}=2\$$, $$\\tan\left(\theta\right)=\sqrt{3}\$$, and therefore $$\\theta=\frac{\pi}3\$$ ($$\60^\circ\$$.) So:
\begin{align*} v_{_{\text{O}{\left(t\right)}}} &=1-\frac2{\sqrt{3}}\cdot e^{^{-\frac12 t}}\cdot \sin\left(\frac{\sqrt{3}}2\,t+\frac{\pi}3\right) \end{align*}
Bear also in mind that since $$\\omega_{_\text{d}}=2\pi\,f_{_\text{d}}\$$ and that $$\\alpha = 2\pi\,f_{_\alpha}\$$ then $$\t_{_\text{d}}=2\pi\,\tau_{_\text{d}}\$$ and $$\t_{_\alpha}=2\pi\,\tau_{_\alpha}\$$. So, for example, you'd get $$\t_{_\text{d}}\approx 7.2552\:\text{s}\$$. (That should pretty closely match your $$\X\$$ position on your chart.)
Here's a plot using Desmos:
As a last little tidbit, here's a plot of $$\0 \le \zeta\le 11.6\$$ on a polar graph. The circular region inside the inner circle of 1 is for the under-damped case. The odd spiral beyond that are for the over-damped cases. The angles shift from real-valued to imaginary-valued right when critically-damped. But I just plotted the angles as continuous real values.
For example, when $$\\zeta=3\$$ then $$\\theta\approx -101^\circ\:i\$$ and when $$\\zeta=8\$$ then $$\\theta\approx -159^\circ\:i\$$.
In the above case, the over-damped angle is developed from Eulers, similarly as shown here, and is plotted as $$\\theta=-\ln\left(\zeta+\sqrt{\zeta^2-1}\right)\$$.
Anything inside the circle at radius 1 is under-damped. Anything outside the circle at radius 1 is over-damped. (This is the unitless $$\\zeta\$$, so it is already normalized to $$\\omega_{_0}\$$. If you want to add units to the above plot, then just multiply the circular rings by $$\\omega_{_0}\$$ and then the rings illustrate multiples of $$\\alpha\$$, instead.)
Not being sure what you were looking for, I tried to type this out as quickly as possible. I may have made a mistake or two. So be sure to verify what you read above and ask, if you see a problem. I'll try to correct anything you notice, quickly.
• Nice derivation. +2. Oh, wait... Sep 26, 2021 at 6:45
• Thank you for your patience with me, Jonk. The last 8 lines were exactly what I was looking for - what the time constants tell us about the system (and response). Although you say you typed it quickly, it's a very nice looking answer.
– Carl
Sep 26, 2021 at 7:03
• @Carl Thanks for letting me know what parts you cared about. I was curious. And mostly, it's just using Mathjax. It does all the formatting work for me. I didn't write that much text. Also, I didn't write it but the time constants do have to be factored up by $2\pi$ since $\omega=2\pi\,f$ and $t=\frac1{f}$.
– jonk
Sep 26, 2021 at 7:05
• @Carl I type \tau_{_\text{d}}, for example. And there's no way to go simpler. Just type faster! ;) By the way, compare \tau_{_0} with \tau_0 as in: $\tau_{_0}$ and $\tau_0$. The first is much better. You often need the extra underscore.
– jonk
Sep 26, 2021 at 7:10
• @jonk Got it! :)
– Carl
Sep 26, 2021 at 7:11
|
|
# How do Cloud Credits work?
How do cloud credits work?
In the documentation, it says that CloudDeploy[] uses CloudCredits (http://www.wolfram.com/language/fast-introduction-for-programmers/en/cloud-deployment/).
However, I tried to call:
$CloudCreditsAvailable Loop[n_] := (For[i = 0, i < n, i++]; i) CloudDeploy[FormPage[{"n" -> "Integer"}, Loop@#n &]] If I understand correctly, any usage of the link that appears after this should drain my cloud credits substantially. I clicked the link a few times and inserted ridiculously large numbers but $CloudCreditsAvailable still gives me the same result. Also, I am really not sure what 'account' Mathematica uses when I call this function. Is there a way to see that?
## Edit
Today I have about 2000 fewer cloud credits but I can't find any overview about what actually drained those. I played around quite a bit with CLoudDeploy[] so I don't know what used credits and what not.
|
|
## Dedication
To my loving family. You are the ever driving purpose in my life. I have enjoyed every minute with you all and look forward to many more.
## Preface
Todo: need to write the preface
## Acknowledgments
To all the great folks in the fodder group on Facebook, thank you for all your help with the creation of this book. To my wife, thank you for putting up with me while I write yet another book!
David Capocci - Pacca Pride Guest Ranch
David Capocci is one of the first to pioneer a large fodder system for daily use on a small scale farm. But that is not what makes David great. His willingness to share all that he has learned during the creation of his system has helped a great number of folks in their fodder endeavors. Thank you David.
Randy Coleman - Wings and A Prayer Alpacas
Randy Coleman is another great resource willing to help anyone with their fodder system issues. He has been a great resource to turn to for fodder system questions and is always there with an answer on the Facebook Fodder group. Thank you Randy.
This is a book about hydroponically sprouted micro-greens also known as FODDER. Specifically it is about growing micro-greens as a form of feed for your farm animals. I will show you how to grow fodder from all sorts of seeds that are easily acquirable by most farmers.
I will cover the basics of what fodder is including the different types of seeds that work well in a fodder system. This book will also explain the various types of fodder systems and how to create a few of them in your garage.
Knowing how to sprout fodder is only half the battle. For that reason we will also take a look at the different dietary needs for each type of farm animal with a focus on fodder mixing and matching to get us as close to a complete diet as possible. We will then look into how to fill the gaps with proper supplementation for each animal.
### Who should read this book
If you are a farmer, large or small, or if you maintain livestock in some form or fashion, you might want to think very hard about getting into fodder to increase the nutritional value you are feeding to your animals and increase the amount of money that stays in your wallet!
Getting into fodder doesn’t necessarily mean purchasing this book. There is a great deal of fodder information out on the web. And you, like me, can get very deep into this topic very quickly without this book. But if you are looking for a manual that details the types of fodder, how to grow it successfully, and how to eek out that last extra pound of fodder from your seeds - you might consider picking up a copy of this book.
TODO: Brief explanation of each chapter and what it addresses
### Developed in the open
This book has been developed in the open. Each chapter has been submitted for free to the public for a review. With this quick feedback we have been able to produce great information on this somewhat new topic.
You might think that an author on fodder should be a grass growing king of farmlands on high with a list of spectacular achievements that can be listed here. Nope - that’s not me!
Andrew Siemer of Friendly Pastures
I went from high school, to Ranger Battalion in the army, to building big systems on the internet. I have worked since 1998 as a software engineer. I currently work for one of the largest ecommerce company’s in the world as an architect. And I only just recently got started with farming and ranching 3 years ago.
After watching movies such as Food Inc. I quickly started thinking that I needed to feed my family healthy hyper local non-industrially produced food. We were living in CA at the time. We spent a couple years looking for a small farm property there but quickly learned that that was never going to be in our cards. So we moved to Austin Texas and bought a small 15 acre hay farm.
The hay farm quickly changed into a chicken and egg producing, produce growing, hog raising operation. I got involved with the Aquaponics Association where I took over as the Regional Director to help grow their membership and spread the word of all things aquaponics. I stood up a few aquaponic green houses. And quickly found that maintaining hundreds of animals was not a cheap task. As droughts hit us, and our animals started to reproduce I found myself in need of a better, cheaper, more consistent way to feed my animals.
Fodder! I started doing the research. Built my first system. And, like every other system I have come in contact with, got hooked on growing fodder in a more and more efficient manner. I have since built myself several ever-expanding fodder systems. I have also built fodder systems for others in addition to training other farmers about all things fodder.
This book is a summary of all the information I have learned while tinkering on fodder systems for my farm and friend’s farms.
## Introduction
todo: A quick blurb on what fodder is and how it can help the average livestock owner.
Some facts about the cost savings that can be achieved.
Introduce the math behind fodder.
Show some photos of fodder days 1 - 7.
Show some happy animals on fodder.
## 1 What is fodder?
According to many sources fodder is simply any agricultural foodstuff used to feed domesticated animals, such as goats, cattle, sheep, horses, donkeys, chickens, ducks, geese, rabbits, and pigs. In the case of this book though we are specifically referring to the growth of “micro greens” in a hydroponic 1 system over the course of roughly 7 days. You will see that you can take just about any grain bought at a local feed store, grain mill, or grocery store, and through proper care grow roughly 1 pound of grain into 5-10 pounds of fresh nutritious greens. We have found that these greens are readily consumed by every non-carnivore found on the farm.
Just to be clear, while fodder is indeed truly amazing and can certainly cut your feed bill in half, fodder is not a magic bullet for all animals. Many animals can largely consume fodder as their primary dietary input. But they may also require other supplemental feeds such as dry hay for cows and horses and possibly corn for your pigs. We will cover a proper diet including fodder for the majority of your livestock critters.
### 1.1 The general process for growing fodder
Sprouted fodder is an amazingly easy way of maximizing the nutrition you feed to your animals while minimizing the cost of your feed bill. We will get into great detail about sprouting fodder later in the book but I felt it was of great importance that we tackle the general principles of how to grow fodder early on. For that reason we will take a high level look into each step found in most fodder operations.
#### The seed
There are several types of seed that are appropriate for growing fodder. Some are higher in protein or energy than others. So mixing and matching them to build up the appropriate nutritional balance is important. But the thing to know about all seeds is that they have everything in them that is needed to start the plants life in the first few days.
Seed growth chart
Some plants such as grass variants start life with one leaf (monocots). While other plants like beans start their life with two leaves (dicots). The seed is wrapped in a protective covering called the seed coat which protects the embryo of the plant. The seed also contains endosperm which is a food supply for the initial days of the seed until the plant can generate its own food.
Seed anatomy
In a fodder system, most (but not all) people tend to pre-soak their seeds prior to spreading them out. The duration of this soak ranges from 4-12 hours. Soaking is thought to help weaken the seed coat to help the plant get started with life.
TODO: thoughts on an air stone in the soak bucket
TODO: thoughts on H2O2 or bleach in soak bucket
Over-soaking Soaking seeds for too long will effectively stop the seed from being able to grow thereby diminishing the number of seeds that will sprout. Each seeds soak rates are different.
#### The growing container
There are various containers that you can sprout your fodder in. I will mostly discuss growing in trays as most systems use some form of tray. But any container that you can put your seeds in, fill with water, and drain efficiently can be used.
Trays can be bought from any hydroponics store, home supply stores, online. But you can also use Tupperware containers, cookie sheets, cat liter containers, pvc rain gutters, custom bent steel sheeting, etc.
One thing to keep in mind is that you will be interacting with these trays daily by way of removing fodder and spreading new seeds. For this reason you generally don’t want a tray that is overly flimsy. I built my first system with standard 10x20 plant trays. The plastic is too thin on these for long term use.
10x20 tray
#### Water
Once you have your seeds and a container chosen you need to think about how to get water to the seeds. Like all the other aspects of fodder, conveying water to the seeds can be done in many different ways.
Some folks just pour water from their sink faucet directly into their small systems.
peakprosperity.com watering a tray of fodder
A few folks water their fodder like you would water your normal plants - with a hose and a soft shower wand. This is a great ideas if you have the time as each tray of fodder will get a nice even soak and no more water than it needs.
Quartz Ridge Ranch water with a soft shower hose wand
Others keep a large container at the bottom of their fodder system, called a sump tank, at the bottom of the system and pump the water up to their seed containers. You have to be careful with reusing the water from a fodder system. Similar to brewing beer, the longer you soak your seeds the more the starch levels build up in your water. Putting that on your fodder over and over again is a sure way to invite mold and other funky issues into your system.
Stinky sump tank? If you can smell your sump tank or notice that your water is not clear - change your water. Foul water will certainly impact your ability to grow good fodder. It can also invite mold and root gnats.
Half Pint Homestead 18 tray system
And some systems have fresh water piped directly in and distributed through irrigation controllers or similar flow controls.
FarmTek Fodder Pro
#### Drainage
Once you get water into your system you next have to worry about getting all of the water back out. This can be done with a bunch of holes in the bottom of your trays. Or you can accomplish drainage with hydroponic drains. However you tackle this problem it is important that your seeds aren’t left to sit in water for long periods of time.
10x20 trays come in perforated and non-perforated
You can also put a commercial drain fitting into just about any format of tray you might have. This can be done by drilling a hole through the bottom of your tray and screwing in this water tight drain fitting. These are the ones first used in David Capocci’s Paca Pride fodder system.
MPT Drain Fitting Kit
#### Build types
The best thing about growing fodder is that it is amazingly easy to set up a fodder system for yourself in numerous ways based on the amount of fodder you would like to grow each day and the budget that you have available. In this section we will take a quick look at a bunch of different types of fodder systems. In a later chapter we will look deeper into how each works.
##### Flood and Drain
Flood and drain is a hydroponic/aquaponic growing method where you fill a reservoir with nutrient rich water to feed and water the roots of a plant or plants. Once the water level gets to a predetermined point in the reservoir a drain mechanism kicks in and quickly removes all of the water from the container. This process can either be continuous, on a timer, or manual. In the realm of fodder, the water can be just water, and the drain mechanism might be as simple as holes in the bottom of the container.
##### Trickle Down
In a trickle down style system water is put into the top tray of a set of trays. From there one of two things can occur. The water then flows from one end of the tray to the other end of the tray where drain holes are located and drains out into the tray below it. Or there are a series of holes throughout the tray and the water just “rains” down on the next tray. This repeats until the water has passed through all the trays and ends in the holding tank or sump.
Trickle down fodder trays
There is no scientific evidence to say that one style is better than the other. As long as your water is evenly spread across your seeds for an appropriate amount of time you should be ok.
Over-soaking Do keep in mind that in both of these systems the time it takes to drain out the top tray all the way down to the bottom tray might take longer than you want your seeds to be under water. Over soaking can occur. And this will potentially kill your seeds. Time the complete cycle to ensure that the water is evacuated fairly quickly.
##### Misting vs. Soaking
There are also systems out there that using misting heads at the end of their irrigation lines to thoroughly douse their fodder rather than filling the fodder tray with water. This is an unsolved controversy. However, here are my thoughts.
The seeds roots are what needs the water. Applying a thorough supply of water to the fodder leaves and not as much to the roots doesn’t quite make sense. That is sort of like washing my hair every day without drinking. I wouldn’t last very long with that approach!
Bathing the seed roots also aides in washing any built up impurities around the root system. The starches that slowly build up from soaking the seeds are around the seed husks, not the green leaves. When the seeds are soaked and then drained most of those fly attracting and mold feeding starches are washed away. Of course this only matters if you aren’t utilizing a sump in your system!
### 1.2 The math behind fodder
To me there are two interesting factoids about fodder. 1 - It costs me less to feed my animals a more nutritious diet. 2 - The price of fodder doesn’t fluctuate like the cost of hay in times of drought, extreme cold, or extreme heat. And like most things in life, the more you buy up front the cheaper it is on the back end.
#### Simple math with 50# bags
Let’s take a look at purchasing feed for pigs. If you are interested in feeding your animals a quality food then you are probably buying pig & sow blends or high quality cotton cake or similar. You might also be mixing in some whole corn.
Say a bag of pig and sow costs you $20 for 50 pounds at the local TSC. That works out to$0.40 cents per pound. Not horrible. Unless you are buying 30 bags every two weeks! That quickly becomes $600 every two weeks and only gives me 1500 pounds of feed. Now lets look at a bag of seed for the purposes of sprouting. I buy a 50 pound bag of organic (no less) seed for$30 per bag. Wow that already sounds expensive. But using simple math and knowing that I can always get at least 5 pounds of fodder out of every 1 pound of seed (we will learn how to get a 10:1 conversion in later chapters) I know that the 50 pounds of seed becomes 250 pounds of feed. That is $0.12 cents per pound! Working backwards to see how many bags of seed I need to generate the same 1500 pounds of feed in the end: 6 bags of organic seed. Cost?$180 My pigs can eat all they want at that rate.
#### Better math when buying in bulk
Now we all know that anyone feeding large quantities of feed to a large herd doesn’t buy in the smallest quantities sold. We want to buy in bulk. I have land and I can store seed so I will buy as much as possible to get the price as low as possible.
This next paragraph contains heart throbbing information After reading this next paragraph, please take a couple breaths and count to 10. Then continue reading the rest of the book prior to running out and spending money on a new fodder system!
#### Fodder Pro 3.0 by FarmTek
The Fodder Pro 3.0 is the latest from FarmTek. This is an industrial size system that is capable of producing “tons” of feed each day. If you run a dairy operation, organic farm, large cattle operation, have a large scale pig operation, or commercial size poultry operation then this is one of the systems you should be looking at. I have also heard stories from other fodder fanatics that they have been able to call FarmTek for help on non-FarmTek systems. Great company.
FodderPro 3.0 by FarmTek
#### Automatic Paddock by Fodder Solutions
If you are near a computer navigate over to youtube.com via this url: http://goo.gl/OMb4NU or search for “United Fodder Solutions automatic paddock”. Simply amazing.
This is a fully automated fodder generating system. It automates the seeding of trays, watering of trays, delivery out of the building into the back of your truck, washing the trays, and reseeding them.
It is capable of producing 4 tons of fodder daily!
### 2.4 Fixed or removable trays?
TODO: fill in this section
### 2.5 Understand the daily rituals prior to picking a system type
#### Cleaning fixed trays can be hard
EXPAND Expand on the concept of cleaning fixed trays. Fixed trays at the top of a fixed tray system or in the middle of a fixed tray system may prove to be hard, require a ladder, etc.
TODO: fill in this section
### 2.6 Consider the systems scalability
TODO: fill in this section
• small vs large trays
• fodder weight per tray (size matters)
• how much weight do you want to produce now vs later
• tedious tasks only get more tedious as you expand
## 3 Creating a good fodder growing environment
I have to start this chapter by declaring that you can actually be somewhat careless in how your grow your fodder. If you don’t have time, a big budget, the engineering know how, or just don’t want to put much into creating your fodder system prior to seeing it in action - no worries! As long as you aren’t overly careless and pay attention to a few rules, you can easily convert 1 pound of seed into 5 pounds of feed over and over again.
1 pound of seed into 10 pounds of feed Now, if you really want to dial in your system and convert 1 pound of seed into 10 pounds of feed, keep reading.
### 3.1 Just give me the details so I can skip this chapter
In order to grow fodder you only need to be mindful of a few things:
1. temperature: 65 degrees or a tad higher is best but I have seen 80 degrees work.
2. humidity: Shoot for around 60% on average
3. clean water: If your systems uses fresh water with each cycle great! If you use a sump tank, flush it out often.
4. excellent drainage: Regardless of style (flood and drain, trickle, misting) be sure you get all the water out of your trays.
5. air circulation: If your system is in a closet, add a fan to move the air around. Don’t dry out the seeds, just keep the air flowing.
6. high germination rate: None of the other points are important if you buy seeds that just won’t sprout!
### 3.2 Humidity
Humidity is a tricky subject. In most seed growing operations you might shoot for a 90% humidity level. This is where your seed will be most efficient at sprouting and turning itself into a full fledged seedling.
Unfortunately the same rules don’t quite apply in a fodder system. While a 90% humidity rate will indeed produce a fast growing sprout, it will also encourage mold growth.
For that reason you should shoot for a 60%-80% humidity level. Each growing environment is slightly different. It depends upon where you are growing your fodder. The insulation you have in your building. And the climate your are living in. All of these factors will push you in one direction or another. But stay away from the 90% level as you will be swallowed up by mold outbreaks.
You would be wise to get a temperature and humidity monitor. These are generally sold in a big box home store like HomeDepot or similar and are used in a persons home to monitor for “comfortable” levels in the home. They can also be used in your fodder enclosure or near your fodder system.
AcuRite digital humidity and temperature comfort monitor
AcuRite digital humidity and temperature comfort monitor
#### Humidifiers
What happens if I live in a location where the humidity is just not high enough? In that case you need to raise your humidity levels. There are several ways to do this.
The obvious way is to buy a humidifier. However, that will add to the expense of running your fodder system. Instead you can simply take a towel and wet it. Then hang it to dry in your fodder room or the area in which your fodder lives. As the towel drys, the water it contains will evaporate into the air. This should serve to raise your humidity levels in smaller systems.
Rock salt dehumidifier
For larger systems you might add a couple spray nozzles to your fodder system. The mist can quickly increase your humidity levels. Just make sure you monitor this spraying activity!
CoolBot
## 5 Nutritional numbers around fodder
In this chapter we will take a look at the numbers around fodder. This will include how much fodder should be targeted for feeding your animals. The break down of each type of seed from a protein, energy, and other chemical break down of fodder. From this chapter you will have all the raw data you need so that we can enter the next chapter ready to discuss the dietary needs of each animal around fodder.
### 5.1 How much fodder should I plan to produce
A simple equation for calculating how much you want to feed your animals is to feed roughly 3-5% of the animals body weight in fodder. People often ask “why so much”. Remember that you are feeding wet food with fodder where as you were likely feeding dry food before.
### Fast and loose calculations for where to start
You will have to validate the following calculations and the numbers used to ensure that they match your environmental capabilities. Your birds may average more or less weight per bird. Your fodder growing capabilities may produce more or less fodder per inch. Etc. Read this equation and then tweak it to fit your input values.
An average back yard chicken might weigh in at the 6 pound mark. If we target 4% of a 6 pound bird we would need to provide roughly .25 pounds of fodder to each bird per day. On average you can convert one pound of seed to 5 pounds of feed. And we can grow about 25 pounds of fodder from a 10” x 20” tray. This means you can get about 1/8 lb of fodder per square inch of growing surface. For a chicken you would need at least 2 square inches in each days container. If you were using a 5x8” tray it would provide feed for roughly 20 chickens.
Terms Numbers
Average chicken weight (ACW): 6lbs
Feed ratio (FR): 4%
Feed per animal (FPR): .25lbs
Seed conversion ratio (SCR): 1:5
Seed weight per sq/inch (SWPSI): .025lbs
Feed weight per sq/inch (FWPSI): .125lbs
Number of birds to feed (NBF)
Inches of daily grow surface (DGS)
Calculate feed needs in pounds per animal:
ACW * FR = FPR
Calculate inches needed for daily grow surface:
(FPR / FWPSI) * NBF = DGS
### 5.2 Types of seeds used in fodder
There is a multitude of seeds that can be used for growing fodder. Some work really well while others don’t work at all. And seeds that by name should work really well for fodder may not work at all due to the facility you have purchased them from. For these reasons you will have to see what works for you based on the resources available to you but start with the well known seeds first.
And to add to this seed conundrum, also understand that while a certain type of seed may be easy to grow, it won’t necessarily be the appropriate seed for your type of animal’s diet. We will get into more detail about appropriate diets in a later chapter.
There are a multitude of different types of seeds that can be used in fodder. Some better than others. But the few that are most commonly used are wheat, barley, clover, and sunflower (BOSS - black oil sunflower seeds). Some are higher in protein than others. Some grow faster than others.
### 5.4 Legumes
#### Soy Bean
Of the proteins available in Soy Bean in the sprouted form, 5.74% of the protein is lysine.
#### Chickpeas
6.69% of the protein is lysine
### 5.5 Nuts
#### Sunflower (helianthus annuus)
TODO: Need a grid for which plant has which thing in it.
Soak and sprout chart
Before we take a look at seeds, lets talk about something that applies to all seeds. Germination rate. The germination rate (GR) is a way of telling the quality of the seed that you purchased from a given source. It helps you determine what the percentage of sprout-able seed is.
You can quickly calculate the GR of your seed by counting out 100 seeds (random sample). Place those 100 seeds on a wet paper towel. Keep the towel wet at all times. Over the course of 3-4 days you should see some seed begin life. Count how many out of the 100 seeds started. If 70 out of the 100 sprouted then your seed has a 70% germination rate.
Why is this important? Let’s take a look at some simple numbers real quick. In each scenario we will start with a 50lb bag of seed of any type. Each bag of seed will cost us a specified amount. And the GR will be defined. From there we can do quick math to determine the cost of grown feed per pound. This table assumes that we will be able to convert one pound of seed to 5 pounds of feed.
Cost GR Viable Weight Grown Weight Cost Per Pound
$30 70% 35# 175#$0.17
$38 85% 42.5# 212.5#$0.17
$40 90% 45# 225#$0.17
Eh? I don’t understand! In each example the grown feed costs me a mere 17 cents per pound. This is already vastly cheaper than hay.
The key here is that you can’t pick out the seeds that won’t germinate prior to soaking them and spreading them out in your tray. If they don’t germinate then they just sit among your viable growing seeds souring. They are like the seed casing that is left there to rot. The funk that non-viable seed adds to your system is a key attractant to root gnats and mold. They put starch into your system which can thicken your water (in a sump based system) and slowly clog up the working parts of your pump.
##### Knowing your germination rate helps you before you start
The importance to knowing your germination rate is that the more seeds that sprout the less seeds there are to turn to trash and work against you.
### 5.6 The nutritional building blocks required
#### Lysine
Lysine is one of the nine essential amino acids. This means that your critter cannot produce this amino acid on its own, and you must include it in their diet. Lysine is important for the production of carnitine, which is essential for helping turn fat into energy. Lysine also helps your body absorb calcium, and when combined with vitamin C, lysine aids in the production of collagen.
## 6 Formulating the proper diet for your animal
In the previous chapter we took a look at the raw numbers required to build a proper diet for an animal. In this chapter we will dive into each animal type that we might consider feeding fodder too and formulate some options around the right diet for that animal. We will also look at why fodder isn’t always the only food required for a proper nutritional plan for all animals.
### 6.1 Why does this matter?
Barley, Wheat, Oats, Sunflower, Pea, Milo.
1) Rabbits: Wheat, barley, BOSS, radish, millet, lentil
2) Pigs: 50% Barley, 30% Rye, 20% yellow/winter peas, alfalfa, clover
3) Chickens: Barley, BOSS, Wheat, Oats,
4) Cows:
5) Horses:
6) Goats: Barley, Wheat, Cow Peas, Millet, Sunflower, Oats, Corn, (Barley, Wheat, Cow Peas, and Sunflowers is my main mix) I’ll use Millet, Corn and Oats if one or more of the others are not available but you could feed just one or two of these and the animal would do fine. Mine can be somewhat picky sometimes so I offer a mix, gives them a little variety and I’ll change it up a little every so often but Barley is always my first choice and usually the main percentage of grain in mix 35%
7) Alpacas: Barley, Wheat, Oats
8) Sheep: Barley, Wheat, Oats, Annual Rye, BOSS
http://abclocal.go.com/kgo/video?id=9385462
## 7 How do I feed fodder
• story about first time feeding fodder
• types of racks to feed fodder in – hay rack mounted on wall – hay box, fodder on top, ladder on top of that Randy Coleman “Fodder Brothers” style
## 8 DIY - Building a small system for chickens and rabbits
Some families keep a couple chickens for egg laying reasons. Or perhaps they keep some rabbits as pets. Either way, these animals can benefit from small scale fodder production too. In this chapter we will explore all sorts of ideas around small scale fodder production. And then we will walk through the steps on how to produce a small fodder system for our in home use.
### 8.1 Who would this type of system be right for?
Let’s take a quick look at a few scenarios that generally applies to many home or small farm operations. We will use chickens in the examples but each scenario is applicable to chickens, rabbits, guinea pigs, pot bellies, etc.
Confined animals: If you have chickens that are kept in a coop and never allowed to free range, fodder is a perfect way to get a more natural diet into your birds.
Free range: If however you do allow your birds to forage then fodder will make a great supplemental feed for your birds. The difference that you need to think about is how much food the birds are getting on their own vs. how much the animals are dependent on you for its food.
Severe climates: If you raise your animals in areas that have severe winter or summer weather where freezing temperatures impact the grazing ability of your animals (dormant grasses) or really hot temperatures that kill off your grasses, then fodder should be considered as a cheap reliable source of high value nutrition to supplement these weather driven issues.
### 8.3 The build
#### Making the trays
Storage bins with holes stacked
#### Seeding the trays
Cut a lid to the shape that allows you to fill the tray 1/2 deep
#### Stacking the trays
Stack trays on a plate drying mat so that the water drains into your sink
|
|
Michael Manser
The set of all 2x2 invertible matrices under matrix multiplication.
(1)
\begin{align} GL_2(\mathbb{R}) \end{align}
Good - but are you sure about your statement that $GL_n(\mathbb{R})$ is a subgroup of $M_n(\mathbb{R})$? -Prof. Edgar
I'm pretty sure it's not… :-( - Michael
(17)
\begin{align} Q\;=\;\frac{Market\;Cap\;+\;Liabilities\;+\;Preferred\;Equity\;+\;Minority\;Interest}{Total \;Assets} \end{align}
(18)
\begin{align} \textgreater \end{align}
(19)
\begin{align} \textless \end{align}
page revision: 64, last edited: 01 Dec 2009 01:44
|
|
Home / Electrical Q&A / AC Fundamentals Solved Problems
# AC Fundamentals Solved Problems
Want create site? Find Free WordPress Themes and plugins.
## AC Fundamentals Questions
1. What is the definition of a generator?
A generator is a machine which converts mechanical energy to electrical energy.
2. What is the definition of an alternator?
An AC generator is also called an alternator.
3. With a six pole alternator spinning at 1200 rpm, what would the frequency of the voltage be?
$f=\frac{n*p}{120}=\frac{1200*6}{120}=60Hz$
1. To generate an output frequency of 6oHz, what would be the rpm speed need to be with an eight pole alternator?
$n=\frac{120*f}{p}=\frac{120*60}{8}=900RPM$
1. In North America what is the standard frequency of AC voltage generated?
The standard frequency in North America is 60 Hz
2. With a voltage of 240-V RMS, what would be the peak voltage?
${{V}_{p}}=\sqrt{2}{{V}_{rms}}=1.414*240=339V$
1. Using an AC volt meter we found the AC sine wave voltage to be 10-Volts.
1. Determine the peak value of this voltage.
${{V}_{p}}=\sqrt{2}{{V}_{rms}}=1.414*10=14.14V$
2. Determine the RMS value of this voltage.
Measured voltage is RMS voltage; 10-V rms.
3. Determine the peak to peak value of this voltage.
Peak x 2 = peak to peak; 14.14 x 2 = 28.28 volts peak to peak.
2. List the two single phase voltages in a residential system.
120-V and 240-V AC
3. The direction of rotation of an induction motor is affected in what way by interchanging the supply phases?
By interchanging the supply phases the motor will run in reverse.
4. When connecting a three phase alternator to the power system, what conditions must be met?
1.The phase sequence or rotation of the machine must be the same as that of the system.
2.The alternator voltage must be in phase with the grid system.
3.The alternator frequency must be the same as the grid system frequency.
1. The three stator coils of a three phase alternator are positioned apart by how many electrical degrees?
The stator coils must be set to 120 degrees apart.
2. There are two basic types of three phase alternator coil connections, what are they?
The Wye and Delta connections.
3. In an AC resistive circuit, what is the phase relationship between the voltage and current?
The current and voltage are in phase.
4. A 10 ohm heater is connected to an AC 340-V peak-to-peak voltage determine:
1. The peak value of the voltage.
340-V/2 = 170-V peak
2. The effective value of the voltage.
$\frac{170}{\sqrt{2}}=120V$
3. The wattage.
120V/10Ω = 12Amps;
12A x 120V = 1440 Watts
Did you find apk for android? You can find new Free Android Games and apps.
### About Ahmad Faizan
Mr. Ahmed Faizan Sheikh, M.Sc. (USA), Research Fellow (USA), a member of IEEE & CIGRE, is a Fulbright Alumnus and earned his Master’s Degree in Electrical and Power Engineering from Kansas State University, USA.
|
|
Published on
# Regex for Flower Brackets
Flower Brackets is represented by {} and can be keyed in using the keyboard using the SHIFT + { or SHIFT + } in most computers. In this article let's understand how we can create a regex for flower brackets and how regex can be matched for flower brackets values.
Regex (short for regular expression) is a powerful tool used for searching and manipulating text. It is composed of a sequence of characters that define a search pattern. Regex can be used to find patterns in large amounts of text, validate user input, and manipulate strings. It is widely used in programming languages, text editors, and command line tools.
# Conditions to match a Flower Brackets
The value {} should be present in the string.
# Regex for checking if its a valid Flower Brackets
Regular Expression-
/[{}]/gm
Test string examples for the above regex-
Input StringMatch Output
zerodoes not match
1does not match
}...{matches
{ hello}matches
Here is a detailed explanation of the above regex-
/[{}]/gm
Match a single character present in the list below [{}]
{} matches a single character in the list {} (case sensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
m modifier: multi line. Causes ^ and \$ to match the begin/end of each line (not only begin/end of string)
Hope this article was useful to check the validity of a flower brackets value using regex.
|
|
# edwinb/Idris-dev forked from idris-lang/Idris-dev
### Subversion checkout URL
You can clone with HTTPS or Subversion.
Fetching contributors…
Cannot retrieve contributors at this time
629 lines (460 sloc) 20.488 kb
\section{\Idris{} --- the High Level Language} \label{sect:hll} \Idris{} is a pure functional programming language with dependent types. It is eagerly evaluated by default, and compiled via the Epic supercombinator library \cite{brady2011epic}. In this section, I will give a brief introduction to programming in \Idris{}, covering the most important features. A full tutorial is available elsewhere \cite{idristutorial}. \subsection{Preliminaries} \Idris{} defines several primitive types: \tTC{Int}, \tTC{Integer} and \tTC{Float} for numeric operations, \tTC{Char} and \tTC{String} for text manipulation, and \tTC{Ptr} which represents foreign pointers. There are also several data types declared in the library, including \tTC{Bool}, with values \tDC{True} and \tDC{False}. All of the usual arithmetic and comparison operators are defined for the primitive types, and are overloaded using type classes. An \Idris{} program consists of a module declaration, followed by an optional list of imports and a collection of definitions and declarations, for example: \begin{SaveVerbatim}{constprims} module main x : Int x = 42 main : IO () main = putStrLn ("The answer is " ++ show x) \end{SaveVerbatim} \useverb{constprims} \noindent Like Haskell, the main function is called \texttt{main}, and input and output is managed with an \texttt{IO} monad. Unlike Haskell, however, a single colon indicates \texttt{:} a type declaration, emphasising the importance of types, and \remph{all} functions must have a top level type declaration. This is due to type inference being, in general, undecidable for languages with dependent types. A module declaration also opens a \remph{namespace}. The fully qualified names declared in this module are \texttt{main.x} and \texttt{main.main}. \subsection{Types and Functions} Data types are declared in a similar way to Haskell data types, with a similar syntax. Natural numbers and lists, for example, are declared as follows in the library: \begin{SaveVerbatim}{natlist} data Nat = O | S Nat -- Natural numbers -- (zero and successor) data List a = Nil | (::) a (List a) -- Polymorphic lists \end{SaveVerbatim} \useverb{natlist} \noindent The above declarations are taken from the standard library. Unary natural numbers can be either zero, or the successor of another natural number (\texttt{S k}). Lists can either be empty (\texttt{Nil}) or a value added to the front of another list (\texttt{x :: xs}). In the declaration for \tTC{List}, we used an infix operator \tDC{::}. New operators such as this can be added using a fixity declaration, as follows: \begin{SaveVerbatim}{infixcons} infixr 10 :: \end{SaveVerbatim} \useverb{infixcons} \noindent This declares that \texttt{::} is a right associative operator (\texttt{infixr}) with a precedence level of 10. Functions, data constructors and type constructors may all be given infix operators as names. They may be used in prefix form if enclosed in brackets, e.g. \tDC{(::)}. \subsection{Functions} Functions are implemented by pattern matching, again using a similar syntax to Haskell. Some natural number arithmetic functions can be defined as follows, again taken from the standard library: \begin{SaveVerbatim}{natfns} -- Unary addition plus : Nat -> Nat -> Nat plus O y = y plus (S k) y = S (plus k y) -- Unary multiplication mult : Nat -> Nat -> Nat mult O y = O mult (S k) y = plus y (mult k y) \end{SaveVerbatim} \useverb{natfns} \noindent The standard arithmetic operators \texttt{+} and \texttt{*} are also overloaded for use by \texttt{Nat}, and are implemented using the above functions. Unlike Haskell, there is no restriction on whether types and function names must begin with a capital letter or not. %Function %names (\tFN{plus} and \tFN{mult} above), data constructors (\tDC{O}, \tDC{S}, %\tDC{Nil} and \tDC{::}) and type constructors (\tTC{Nat} and \tTC{List}) are %all part of the same namespace. \Idris{} has an interactive prompt, at which we can test these functions: \begin{SaveVerbatim}{fntest} Idris> plus (S (S O)) (S (S O)) S (S (S (S O))) : Nat Idris> mult (S (S (S O))) (plus (S (S O)) (S (S O))) S (S (S (S (S (S (S (S (S (S (S (S O))))))))))) : Nat \end{SaveVerbatim} \useverb{fntest} \noindent Like arithmetic operations, integer literals are also overloaded using type classes, meaning that we can also test the functions as follows: \begin{SaveVerbatim}{fntest} Idris> plus 2 2 S (S (S (S O))) : Nat Idris> mult 3 (plus 2 2) S (S (S (S (S (S (S (S (S (S (S (S O))))))))))) : Nat \end{SaveVerbatim} \useverb{fntest} \subsubsection{\texttt{where} clauses} Functions can also be defined \emph{locally} using \texttt{where} clauses. For example, to define a function which reverses a list, we can use an auxiliary function which accumulates the new, reversed list, and which does not need to be visible globally: \begin{SaveVerbatim}{revwhere} reverse : List a -> List a reverse xs = revAcc [] xs where revAcc : List a -> List a -> List a revAcc acc [] = acc revAcc acc (x :: xs) = revAcc (x :: acc) xs \end{SaveVerbatim} \useverb{revwhere} \noindent Indentation is significant --- functions in the \texttt{where} block must be indented further than the outer function. \textbf{Scope:} Any names which are visible in the outer scope are also visible in the \texttt{where} clause (unless they have been redefined, such as \texttt{xs} here). \emph{However}, names which appear in the type are \emph{not} automatically in scope. In particular, in the above example, the \texttt{a} in the top level type and the \texttt{a} in the auxiliary definition \texttt{revAcc} are \emph{not} the same. If this is the required behaviour, the \texttt{a} can be brought into scope as follows: \begin{SaveVerbatim}{revwhereb} reverse : List a -> List a reverse {a} xs = revAcc [] xs where revAcc : List a -> List a -> List a ... \end{SaveVerbatim} \useverb{revwhereb} \subsubsection{Dependent Types} A standard example of a dependent type is the type of lists with length'', conventionally called vectors'' in the dependently typed programming literature. In \Idris{}, vectors are declared as follows: \begin{SaveVerbatim}{vect} data Vect : Set -> Nat -> Set where Nil : Vect a O (::) : a -> Vect a k -> Vect a (S k) \end{SaveVerbatim} \useverb{vect} \noindent Note that this uses the same constructor names as for \tTC{List}. Ad-hoc name overloading such as this is accepted by \Idris{}, provided that the names are declared in different namespaces (in practice, normally in different modules). Ambiguous constructor names are resolved by type. This declares a family of types, which requires a different form of declaration from the simple type declarations above. It resembles a Haskell GADT declaration: it explicitly states the type of the type constructor \tTC{Vect} --- it takes a type and a \tTC{Nat} as an argument, where \tTC{Set} stands for the type of types. We say that \tTC{Vect} is \emph{parameterised} by a type, and \emph{indexed} over \tTC{Nat}. Each constructor targets a different part of the family of types. \tDC{Nil} can only be used to construct vectors with zero length, and \tDC{::} to construct vectors with non-zero length. The type of \tDC{::} states explicitly that an element of type \texttt{a} and a tail of type \texttt{Vect a k} (i.e., a vector of length \texttt{k}) combine to make a vector of length \texttt{S k}. Functions on dependent types such as \tTC{Vect} are declared in the same way as on simple types such as \tTC{List} and \tTC{Nat} above, by pattern matching. The type of a function over \tTC{Vect} will describe what happens to the lengths of the vectors involved. For example, \tFN{++}, defined in the library, appends two \tTC{Vect}s: \begin{SaveVerbatim}{vapp} (++) : Vect A n -> Vect A m -> Vect A (n + m) (++) Nil ys = ys (++) (x :: xs) ys = x :: xs ++ ys \end{SaveVerbatim} \useverb{vapp} \subsubsection{The Finite Sets} Finite sets, as the name suggests, are sets with a finite number of elements. They are declared as follows in the library: \begin{SaveVerbatim}{findecl} data Fin : Nat -> Set where fO : Fin (S k) fS : Fin k -> Fin (S k) \end{SaveVerbatim} \useverb{findecl} \noindent This declares \tDC{fO} as the zeroth element of a finite set with \texttt{S k} elements; \texttt{fS n} as the \texttt{n+1}th element of a finite set with \texttt{S k} elements. \tTC{Fin} is indexed by a \tTC{Nat}, which represents the number of elements in the set. Neither constructor targets \texttt{Fin O}, because we cannot construct an element of an empty set. A useful application of the \tTC{Fin} family is to represent bounded natural numbers. Since the first \tTC{n} natural numbers form a finite set of \tTC{n} elements, we can treat \tTC{Fin n} as the set of natural numbers bounded by \tTC{n}. For example, the following function which looks up an element in a \tTC{Vect}, by a bounded index given as a \tTC{Fin n}, is defined in the library: \begin{SaveVerbatim}{vindex} index : Fin n -> Vect a n -> a index fO (x :: xs) = x index (fS k) (x :: xs) = index k xs \end{SaveVerbatim} \useverb{vindex} \noindent This function looks up a value at a given location in a vector. The location is bounded by the length of the vector (\texttt{n} in each case), so there is no need for a run-time bounds check. The type checker guarantees that the location is no larger than the length of the vector. Note also that there is no case for \texttt{Nil} here. It would be impossible to apply such a case --- since there is no element of \texttt{Fin O}, and the location is a \texttt{Fin n}, then \texttt{n} can not be \tDC{O}. As a result, attempting to look up an element in an empty vector would give a compile time type error, since it would force \texttt{n} to be \tDC{O}. \subsubsection{Implicit Arguments} Let us take a closer look at the type of \texttt{index}: \begin{SaveVerbatim}{vindexty} index : Fin n -> Vect a n -> a \end{SaveVerbatim} \useverb{vindexty} \noindent It takes two arguments, an element of the finite set of \texttt{n} elements, and a vector with \texttt{n} elements of type \texttt{a}. But there are also two names, \texttt{n} and \texttt{a}, which are not declared explicitly. These are \emph{implicit} arguments to \texttt{index}. The type of \texttt{index} could also be written as: \begin{SaveVerbatim}{vindeximppl} index : {a:_} -> {n:_} -> Fin n -> Vect a n -> a \end{SaveVerbatim} \useverb{vindeximppl} \noindent This gives bindings for \texttt{a} and \texttt{n} with placeholders for their types, to be inferred by the machine. These types could also be given explicitly: \begin{SaveVerbatim}{vindeximpty} index : {a:Set} -> {n:Nat} -> Fin n -> Vect a n -> a \end{SaveVerbatim} \useverb{vindeximpty} \noindent Implicit arguments, given in braces \texttt{\{\}} in the type declaration, are not given in applications of \texttt{index}; their values can be inferred from the types of the \texttt{Fin n} and \texttt{Vect a n} arguments. Any name which appears as a parameter or index in a type declaration, but which is otherwise free, will be automatically bound as an implicit argument. Indeed, binding arguments in this way is the essence of dependent types. Implicit arguments can still be given explicitly in applications, using the syntax \texttt{\{a=value\}} and \texttt{\{n=value\}}, for example: \begin{SaveVerbatim}{vindexexp} index {a=Int} {n=2} fO (2 :: 3 :: Nil) \end{SaveVerbatim} \useverb{vindexexp} \noindent In fact, any argument, implicit or explicit, may be given a name. For example, the type of \texttt{index} could be declared as: \begin{SaveVerbatim}{vindexn} index : (i:Fin n) -> (xs:Vect a n) -> a \end{SaveVerbatim} \useverb{vindexn} \noindent This can be useful for improving the readability of type signatures, particularly where the name suggests the argument's purpose. \subsection{Type Classes} \Idris{} supports overloading in two ways. Firstly, as we have already seen with the constructors of \texttt{List} and \texttt{Vect}, names can be overloaded in an ad-hoc manner and resolved according to the context in which they are used. This is mostly for convenience, to eliminate the need to decorate constructor names in similarly structured data types, and eliminate explicit qualification of ambiguous names where only one is well-typed --- this is especially useful for disambiguating record field names\footnote{Records are however beyond the scope of this paper}. Secondly, \Idris{} implements \remph{type classes}, following Haskell. This allows a more principled approach to overloading --- a type class gives a collection of overloaded operations which describe the interface for \remph{instances} of that class. A simple example is the \texttt{Show} type class, which is defined in the library and provides an interface for converting values to \texttt{String}s: \begin{SaveVerbatim}{showclass} class Show a where show : a -> String \end{SaveVerbatim} \useverb{showclass} \noindent This generates a function of the following type (which we call a \emph{method} of the \texttt{Show} class): \begin{SaveVerbatim}{showty} show : Show a => a -> String \end{SaveVerbatim} \useverb{showty} An instance of a class is defined with an \texttt{instance} declaration, which provides implementations of the function for a specific type. For example, the \texttt{Show} instance for \texttt{Nat} could be defined as: \begin{SaveVerbatim}{shownat} instance Show Nat where show O = "O" show (S k) = "s" ++ show k \end{SaveVerbatim} \useverb{shownat} \begin{SaveVerbatim}{shownati} Idris> show (S (S (S O))) "sssO" : String \end{SaveVerbatim} \useverb{shownati} \noindent Only one instance of a class can be given for a type --- instances may not overlap. Instance declarations can themselves have constraints. For example, to define a \texttt{Show} instance for vectors, we need to know that there is a \texttt{Show} instance for the element type, because we are going to use it to convert each element to a \texttt{String}: \begin{SaveVerbatim}{showvec} instance Show a => Show (Vect a n) where show xs = "[" ++ show' xs ++ "]" where show' : Vect a n' -> String show' Nil = "" show' (x :: Nil) = show x show' (x :: xs) = show x ++ ", " ++ show' xs \end{SaveVerbatim} \useverb{showvec} \noindent \textbf{Remark: } The type of the auxiliary function \texttt{show'} is important. The type variables \texttt{a} and \texttt{n} which are part of the instance declaration for \texttt{Show (Vect a n)} are fixed across the entire instance declaration. As a result, \texttt{a} need not be constrained again. Furthermore, it means that if \texttt{n} is used again in the type, it refers to the (fixed) length of the outermost list \texttt{xs}. Therefore, there is a different name for the length \texttt{n'} in \texttt{show'}. Like Haskell type classes, default definitions can be given in the class declaration. Otherwise, all methods must be given in an instance. For example, there is an \texttt{Eq} class: \begin{SaveVerbatim}{eqdefault} class Eq a where (==) : a -> a -> Bool (/=) : a -> a -> Bool x /= y = not (x == y) y == y = not (x /= y) \end{SaveVerbatim} \useverb{eqdefault} \noindent Classes can also be extended. A logical next step from an equality relation \texttt{Eq} is to define an ordering relation \texttt{Ord}. We can define an \texttt{Ord} class which inherits methods from \texttt{Eq} as well as defining some of its own: \begin{SaveVerbatim}{ord} data Ordering = LT | EQ | GT \end{SaveVerbatim} \useverb{ord} \begin{SaveVerbatim}{eqord} class Eq a => Ord a where compare : a -> a -> Ordering (<) : a -> a -> Bool -- etc \end{SaveVerbatim} \useverb{eqord} \subsection{Matching on intermediate values} \subsubsection{\texttt{let} bindings} Intermediate values can be calculated using \texttt{let} bindings: \begin{SaveVerbatim}{letb} mirror : List a -> List a mirror xs = let xs' = rev xs in app xs xs' \end{SaveVerbatim} \useverb{letb} \noindent Pattern matching is also supported in \texttt{let} bindings. For example, extracting fields from a record can be achieved as follows, as well as by pattern matching at the top level: \begin{SaveVerbatim}{letp} data Person = MkPerson String Int showPerson : Person -> String showPerson p = let MkPerson name age = p in name ++ " is " ++ show age ++ " years old" \end{SaveVerbatim} \useverb{letp} \subsubsection{\texttt{case} expressions} Another way of inspecting intermediate values of \emph{simple} types is to use a \texttt{case} expression. For example, \texttt{list\_lookup} looks up an index in a list, returning \texttt{Nothing} if the index is out of bounds. This can be used this to write \texttt{lookup\_default}, which looks up an index and returns a default value if the index is out of bounds: \begin{SaveVerbatim}{listlookup} lookup_default : Nat -> List a -> a -> a lookup_default i xs def = case list_lookup i xs of Nothing => def Just x => x \end{SaveVerbatim} \useverb{listlookup} The \texttt{case} construct is intended for simple analysis of intermediate expressions to avoid the need to write auxiliary functions, and is also used internally to implement pattern matching \texttt{let} and lambda bindings. It will \emph{only} work if: \begin{itemize} \item Each branch \emph{matches} a value of the same type, and \emph{returns} a value of the same type. \item The type of the result is known''. i.e. the type of the expression can be determined \emph{without} type checking the \texttt{case}-expression itself. \end{itemize} \subsubsection{The \texttt{with} rule} Since types can depend on values, the form of some arguments can be determined by the value of others. For example, if we were to write down the implicit length arguments to \texttt{(++)}, we would see that the form of the length argument was determined by whether the vector was empty or not: \begin{SaveVerbatim}{appdep} (++) : Vect a n -> Vect a m -> Vect a (n + m) (++) {n=O} [] [] = [] (++) {n=S k} (x :: xs) ys = x :: xs ++ ys \end{SaveVerbatim} \useverb{appdep} \noindent If \texttt{n} was a successor in the \texttt{[]} case, or zero in the \texttt{::} case, the definition would not be well typed. Often, matching is required on the result of an intermediate computation with a dependent type. \Idris{} provides a construct for this, the \texttt{with} rule, inspired by views in \Epigram~\cite{McBride2004a}, which takes account of the fact that matching on a value in a dependently typed language can affect what is known about the forms of other values. For example, a \texttt{Nat} is either even or odd. If it is even it will be the sum of two equal \texttt{Nat}s. Otherwise, it is the sum of two equal \texttt{Nat}s plus one: \begin{SaveVerbatim}{parity} data Parity : Nat -> Set where even : Parity (n + n) odd : Parity (S (n + n)) \end{SaveVerbatim} \useverb{parity} \noindent We say \texttt{Parity} is a \emph{view} of \texttt{Nat}. It has a \emph{covering function} which tests whether it is even or odd and constructs the predicate accordingly. \begin{SaveVerbatim}{parityty} parity : (n:Nat) -> Parity n \end{SaveVerbatim} \useverb{parityty} \noindent Using this, a function which converts a natural number to a list of binary digits (least significant first) is written as follows, using the \texttt{with} rule: \begin{SaveVerbatim}{natToBin} natToBin : Nat -> List Bool natToBin O = Nil natToBin k with (parity k) natToBin (j + j) | even = False :: natToBin j natToBin (S (j + j)) | odd = True :: natToBin j \end{SaveVerbatim} \useverb{natToBin} \noindent The value of the result of \texttt{parity k} affects the form of \texttt{k}, because the result of \texttt{parity k} depends on \texttt{k}. So, as well as the patterns for the result of the intermediate computation (\texttt{even} and \texttt{odd}) right of the \texttt{$\mid$}, the definition also expresses how the results affect the other patterns left of the $\mid$. Note that there is a function in the patterns (\texttt{+}) and repeated occurrences of \texttt{j} --- this is allowed because another argument has determined the form of these patterns.
Something went wrong with that request. Please try again.
|
|
3.1: Maclaurin Series
A function $$f(x)$$ can be expressed as a series in powers of $$x$$ as long as $$f(x)$$ and all its derivatives are finite at $$x=0$$. For example, we will prove shortly that the function $$f(x) = \dfrac{1}{1-x}$$ can be expressed as the following infinite sum:
$\label{eq1}\dfrac{1}{1-x}=1+x+x^2+x^3+x^4 + \ldots$
We can write this statement in this more elegant way:
$\label{eq2}\dfrac{1}{1-x}=\displaystyle\sum_{n=0}^{\infty} x^{n}$
If you are not familiar with this notation, the right side of the equation reads “sum from $$n=0$$ to $$n=\infty$$ of $$x^n.$$” When $$n=0$$, $$x^n = 1$$, when $$n=1$$, $$x^n = x$$, when $$n=2$$, $$x^n = x^2$$, etc (compare with Equation \ref{eq1}). The term “series in powers of $$x$$” means a sum in which each summand is a power of the variable $$x$$. Note that the number 1 is a power of $$x$$ as well ($$x^0=1$$). Also, note that both Equations \ref{eq1} and \ref{eq2} are exact, they are not approximations.
Similarly, we will see shortly that the function $$e^x$$ can be expressed as another infinite sum in powers of $$x$$ (i.e. a Maclaurin series) as:
$\label{expfunction}e^x=1+x+\dfrac{1}{2} x^2+\dfrac{1}{6}x^3+\dfrac{1}{24}x^4 + \ldots$
Or, more elegantly:
$\label{expfunction2}e^x=\displaystyle\sum_{n=0}^{\infty}\dfrac{1}{n!} x^{n}$
where $$n!$$ is read “n factorial” and represents the product $$1\times 2\times 3...\times n$$. If you are not familiar with factorials, be sure you understand why $$4! = 24$$. Also, remember that by definition $$0! = 1$$, not zero.
At this point you should have two questions: 1) how do I construct the Maclaurin series of a given function, and 2) why on earth would I want to do this if $$\dfrac{1}{1-x}$$ and $$e^x$$ are fine-looking functions as they are. The answer to the first question is easy, and although you should know this from your calculus classes we will review it again in a moment. The answer to the second question is trickier, and it is what most students find confusing about this topic. We will discuss different examples that aim to show a variety of situations in which expressing functions in this way is helpful.
How to obtain the Maclaurin Series of a Function
In general, a well-behaved function ($$f(x)$$ and all its derivatives are finite at $$x=0$$) will be expressed as an infinite sum of powers of $$x$$ like this:
$\label{eq3}f(x)=\displaystyle\sum_{n=0}^{\infty}a_n x^{n}=a_0+a_1 x + a_2 x^2 + \ldots + a_n x^n$
Be sure you understand why the two expressions in Equation \ref{eq3} are identical ways of expressing an infinite sum. The terms $$a_n$$ are called the coefficients, and are constants (that is, they are NOT functions of $$x$$). If you end up with the variable $$x$$ in one of your coefficients go back and check what you did wrong! For example, in the case of $$e^x$$ (Equation \ref{expfunction}), $$a_0 =1, a_1=1, a_2 = 1/2, a_3=1/6, etc$$. In the example of Equation \ref{eq1}, all the coefficients equal 1. We just saw that two very different functions can be expressed using the same set of functions (the powers of $$x$$). What makes $$\dfrac{1}{1-x}$$ different from $$e^x$$ are the coefficients $$a_n$$. As we will see shortly, the coefficients can be negative, positive, or zero.
How do we calculate the coefficients? Each coefficient is calculated as:
$\label{series:coefficients}a_n=\dfrac{1}{n!} \left( \dfrac{d^n f(x)}{dx^n} \right)_0$
That is, the $$n$$-th coefficient equals one over the factorial of $$n$$ multiplied by the $$n$$-th derivative of the function $$f(x)$$ evaluated at zero. For example, if we want to calculate $$a_2$$ for the function $$f(x)=\dfrac{1}{1-x}$$, we need to get the second derivative of $$f(x)$$, evaluate it at $$x=0$$, and divide the result by $$2!$$. Do it yourself and verify that $$a_2=1$$. In the case of $$a_0$$ we need the zeroth-order derivative, which equals the function itself (that is, $$a_0 = f(0)$$, because $$\dfrac{1}{0!}=1$$). It is important to stress that although the derivatives are usually functions of $$x$$, the coefficients are constants because they are expressed in terms of the derivatives evaluated at $$x=0$$.
Note that in order to obtain a Maclaurin series we evaluate the function and its derivatives at $$x=0$$. This procedure is also called the expansion of the function around (or about) zero. We can expand functions around other numbers, and these series are called Taylor series (see Section 3).
Example $$\PageIndex{1}$$
Obtain the Maclaurin series of $$sin(x)$$.
Solution
We need to obtain all the coefficients ($$a_0, a_1...etc$$). Because there are infinitely many coefficients, we will calculate a few and we will find a general pattern to express the rest. We will need several derivatives of $$sin(x)$$, so let’s make a table:
$$n$$ $$\dfrac{d^n f(x)}{dx^n}$$ $$\left( \dfrac{d^n f(x)}{dx^n} \right)_0$$
0 $$\sin (x)$$ 0
1 $$\cos (x)$$ 1
2 $$-\sin (x)$$ 0
3 $$-\cos (x)$$ -1
4 $$\sin (x)$$ 0
5 $$\cos (x)$$ 1
Remember that each coefficient equals $$\left( \dfrac{d^n f(x)}{dx^n} \right)_0$$ divided by $$n!$$, therefore:
$$n$$ $$n!$$ $$a_n$$
0 1 0
1 1 1
2 2 0
3 $$6$$ $$-\dfrac{1}{6}$$
4 $$24$$ 0
5 $$120$$ $$\dfrac{1}{120}$$
This is enough information to see the pattern (you can go to higher values of $$n$$ if you don’t see it yet):
1. the coefficients for even values of $$n$$ equal zero.
2. the coefficients for $$n = 1, 5, 9, 13,...$$ equal $$1/n!$$
3. the coefficients for $$n = 3, 7, 11, 15,...$$ equal $$-1/n!$$.
Recall that the general expression for a Maclaurin series is $$a_0+a_1 x + a_2 x^2...a_n x^n$$, and replace $$a_0...a_n$$ by the coefficients we just found:
$\displaystyle{\color{Maroon}\sin (x) = x - \dfrac{1}{3!} x^3+ \dfrac{1}{5!} x^5 -\dfrac{1}{7!} x^7...} \nonumber$
This is a correct way of writing the series, but in the next example we will see how to write it more elegantly as a sum.
Example $$\PageIndex{2}$$
Express the Maclaurin series of $$\sin (x)$$ as a sum.
Solution
In the previous example we found that:
$\label{series:sin}\sin (x) = x - \dfrac{1}{3!} x^3+ \dfrac{1}{5!} x^5 -\dfrac{1}{7!} x^7...$
We want to express this as a sum:
$\displaystyle\sum_{n=0}^{\infty}a_n x^{n} \nonumber$
The key here is to express the coefficients $$a_n$$ in terms of $$n$$. We just concluded that 1) the coefficients for even values of $$n$$ equal zero, 2) the coefficients for $$n = 1, 5, 9, 13,...$$ equal $$1/n!$$ and 3) the coefficients for $$n = 3, 7, 11,...$$ equal $$-1/n!$$. How do we put all this information together in a unique expression? Here are three possible (and equally good) answers:
• $$\displaystyle{\color{Maroon}\sin (x)=\displaystyle\sum_{n=0}^{\infty} \left( -1 \right) ^n \dfrac{1}{(2n+1)!} x^{2n+1}}$$
• $$\displaystyle{\color{Maroon}\sin (x)=\displaystyle\sum_{n=1}^{\infty} \left( -1 \right) ^{(n+1)} \dfrac{1}{(2n-1)!} x^{2n-1}}$$
• $$\displaystyle{\color{Maroon}\sin (x)=\displaystyle\sum_{n=0}^{\infty} cos(n \pi) \dfrac{1}{(2n+1)!} x^{2n+1}}$$
This may look impossibly hard to figure out, but let me share a few tricks with you. First, we notice that the sign in Equation \ref{series:sin} alternates, starting with a “+”. A mathematical way of doing this is with a term $$(-1)^n$$ if your sum starts with $$n=0$$, or $$(-1)^{(n+1)}$$ if you sum starts with $$n=1$$. Note that $$\cos (n \pi)$$ does the same trick.
$$n$$ $$(-1)^n$$ $$(-1)^{n+1}$$ $$\cos (n \pi)$$
0 1 -1 1
1 -1 1 -1
2 1 -1 1
3 -1 1 -1
We have the correct sign for each term, but we need to generate the numbers $$1, \dfrac{1}{3!}, \dfrac{1}{5!}, \dfrac{1}{7!},...$$ Notice that the number “1” can be expressed as $$\dfrac{1}{1!}$$. To do this, we introduce the second trick of the day: we will use the expression $$2n+1$$ to generate odd numbers (if you start your sum with $$n=0$$) or $$2n-1$$ (if you start at $$n=1$$). Therefore, the expression $$\dfrac{1}{(2n+1)!}$$ gives $$1, \dfrac{1}{3!}, \dfrac{1}{5!}, \dfrac{1}{7!},...$$, which is what we need in the first and third examples (when the sum starts at zero).
Lastly, we need to use only odd powers of $$x$$. The expression $$x^{(2n+1)}$$ generates the terms $$x, x^3, x^5...$$ when you start at $$n=0$$, and $$x^{(2n-1)}$$ achieves the same when you start your series at $$n=1$$.
Confused about writing sums using the sum operator $$(\sum)$$? This video will help: http://tinyurl.com/lvwd36q
Need help? The links below contain solved examples.
Finding the maclaurin series of a function I: http://patrickjmt.com/taylor-and-maclaurin-series-example-1/
Finding the maclaurin series of a function II: http://www.youtube.com/watch?v= dp2ovDuWhro
Finding the maclaurin series of a function III: http://www.youtube.com/watch?v= WWe7pZjc4s8
Graphical Representation
From Equation $$\ref{eq3}$$ and the examples we discussed above, it should be clear at this point that any function whose derivatives are finite at $$x=0$$ can be expressed by using the same set of functions: the powers of $$x$$. We will call these functions the basis set. A basis set is a collection of linearly independent functions that can represent other functions when used in a linear combination.
Figure $$\PageIndex{1}$$ is a graphic representation of the first four functions of this basis set. To be fair, the first function of the set is $$x^0=1$$, so these would be the second, third, fourth and fifth. The full basis set is of course infinite in length. If we mix all the functions of the set with equal weights (we put the same amount of $$x^2$$ than we put $$x^{245}$$ or $$x^{0}$$), we obtain $$(1-x)^{-1}$$ (Equation \ref{eq1}. If we use only the odd terms, alternate the sign starting with a ‘+’, and weigh each term less and less using the expression $$1/(2n-1)!$$ for the $$n-th$$ term, we obtain $$\sin{x}$$ (Equation \ref{series:sin}). This is illustrated in Figure $$\PageIndex{2}$$, where we multiply the even powers of $$x$$ by zero, and use different weights for the rest. Note that the ‘etcetera’ is crucial, as we would need to include an infinite number of functions to obtain the function $$\sin{x}$$ exactly.
Although we need an infinite number of terms to express a function exactly (unless the function is a polynomial, of course), in many cases we will observe that the weight (the coefficient) of each power of $$x$$ gets smaller and smaller as we increase the power. For example, in the case of $$\sin{x}$$, the contribution of $$x^3$$ is $$1/6 th$$ of the contribution of $$x$$ (in absolute terms), and the contribution of $$x^5$$ is $$1/120 th$$. This tells you that the first terms are much more important than the rest, although all are needed if we want the sum to represent $$\sin{x}$$ exactly. What if we are happy with a ‘pretty good’ approximation of $$\sin{x}$$? Let’s see what happens if we use up to $$x^3$$ and drop the higher terms. The result is plotted in blue in Figure $$\PageIndex{3}$$ together with $$\sin{x}$$ in red. We can see that the function $$x-1/6 x^3$$ is a very good approximation of $$\sin{x}$$ as long as we stay close to $$x=0$$. As we move further away from the origin the approximation gets worse and worse, and we would need to include higher powers of $$x$$ to get it better. This should be clear from eq. [series:sin], since the terms $$x^n$$ get smaller and smaller with increasing $$n$$ if $$x$$ is a small number. Therefore, if $$x$$ is small, we could write $$\sin (x) \approx x - \dfrac{1}{3!} x^3$$, where the symbol $$\approx$$ means approximately equal.
But why stopping at $$n=3$$ and not $$n=1$$ or 5? The above argument suggests that the function $$x$$ might be a good approximation of $$\sin{x}$$ around $$x=0$$, when the term $$x^3$$ is much smaller than the term $$x$$. This is in fact this is the case, as shown in Figure $$\PageIndex{4}$$.
We have seen that we can get good approximations of a function by truncating the series (i.e. not using the infinite terms). Students usually get frustrated and want to know how many terms are ‘correct’. It takes a little bit of practice to realize there is no universal answer to this question. We would need some context to analyze how good of an approximation we are happy with. For example, are we satisfied with the small error we see at $$x= 0.5$$ in Figure $$\PageIndex{4}$$? It all depends on the context. Maybe we are performing experiments where we have other sources of error that are much worse than this, so using an extra term will not improve the overall situation anyway. Maybe we are performing very precise experiments where this difference is significant. As you see, discussing how many terms are needed in an approximation out of context is not very useful. We will discuss this particular approximation when we learn about second order differential equations and analyze the problem of the pendulum, so hopefully things will make more sense then.
|
|
# How to prevent square wave oscillation circuit from producing backwards sawtooth shapes in LTSpice4
In a related question, "simple, energy efficient circuit to make single IR LED blink", the following circuits are shared in the (current) third answer:
I entered these into LTSpiceIV and the output is unstable, sometimes producing a nice square wave, and other times producing a backwards sawtooth ramp-down shape.
What is really going on here? I am a software developer trying to learn analog electronics, and have been playing around with the Joule Thief and other oscillating circuits, as well as trying to learn about SMPS converters, and would like to know how to diagnose and prevent unstable behaviors like this one in general, but I do really want to know about this one in particular. If I had an oscilloscope, I would build these and try to play with them.
Below is a screen shot showing lots of the backwards sawtooth wave shapes, using 2N2222, 2N2907.
I also tried different transistor-pairs; 2N3904, 2N3906 and 2N4401, 2N4403 were better, but still had problems.
What follows is the contents of the LTSpice-IV *.asc file, so you can paste this into a text file and name it with an ".asc" extension, and then you should be able to (on a PC) directly open it up in LTSpice IV and run the simulation to reproduce what I am experiencing.
Version 4
SHEET 1 1584 680
WIRE 352 -64 -176 -64
WIRE 512 -64 352 -64
WIRE 352 -32 352 -64
WIRE -176 0 -176 -64
WIRE 16 64 -16 64
WIRE 240 64 80 64
WIRE 352 64 352 32
WIRE -16 112 -16 64
WIRE -16 112 -48 112
WIRE 240 112 240 64
WIRE 288 112 240 112
WIRE -16 144 -16 112
WIRE 16 144 -16 144
WIRE 240 144 240 112
WIRE 240 144 96 144
WIRE 512 144 512 -64
WIRE -176 160 -176 80
WIRE -112 160 -176 160
WIRE 240 176 240 144
WIRE 272 176 240 176
WIRE -176 240 -176 160
WIRE 32 240 -176 240
WIRE 352 240 352 160
WIRE 352 240 96 240
WIRE 352 256 352 240
WIRE 512 272 512 224
WIRE 512 272 464 272
WIRE 464 304 464 272
WIRE -48 368 -48 208
WIRE 352 368 352 336
WIRE 352 368 -48 368
WIRE 512 368 512 272
WIRE 512 368 352 368
FLAG 464 304 0
FLAG 272 176 C1
SYMBOL voltage 512 128 R0
SYMATTR InstName V1
SYMATTR Value 4
SYMBOL pnp 288 160 M180
SYMATTR InstName Q1
SYMATTR Value 2N2907
SYMBOL npn -112 112 R0
SYMATTR InstName Q2
SYMATTR Value 2N2222
SYMBOL res 112 128 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 1K
SYMBOL cap 80 48 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value 10nF
SYMBOL cap 96 224 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C2
SYMATTR Value 10µF
SYMBOL res -192 -16 R0
SYMATTR InstName R2
SYMATTR Value 330K
SYMBOL res 336 240 R0
SYMATTR InstName R3
SYMATTR Value 22
SYMBOL LED 336 -32 R0
SYMATTR InstName D1
SYMATTR Value LXK2-PW14
SYMATTR Description Diode
SYMATTR Type diode
TEXT 8 -24 Left 2 !.tran 60s startup
Finally, I entered in the second circuit, which is just the first circuit inverted and polarity-switched, but it won't even oscillate.
• I think your circuit might be at fault. Using this in a different simulator (the falstad.com/circuit one, specifically) I see pulses of over three amps every ~1s; neither a square wave nor a sawtooth wave. I haven't manually analyzed the circuit, though, to see what the problem with it is. – Hearth May 22 '17 at 22:26
• Errr... where is C1? Edit: never mind, I deleted the extra branch that led to nothing and still behaves badly. – Sredni Vashtar May 22 '17 at 22:49
• @SredniVashtar Make sure $C_2$ doesn't have garbage in its value and try setting UIC and a minimum timestep of 100 us. – jonk May 22 '17 at 22:59
• To the OP. Try using UIC and also using a minimum timestep of $20-100\:\mu\textrm{s}$ on your .TRAN card. See if that helps you. – jonk May 22 '17 at 23:02
• @Jonk , with a max timestep of 50 us (.tran 0 12s 0 50u startup ) I get nice spikes without any sawtooth. The pulses are evenly spaced (there is a fast spike in diode current, then a short simil-rectangular pulse. UIC does not seem to make a difference at this point. It appear the timestep did the trick. But I would not call this a "Square wave oscillation circuit". Just a "blinker". – Sredni Vashtar May 22 '17 at 23:15
When I see these behaviors, it's usually because of the solver choice, the automatic step size that LTSpice uses as a delta-time, or else something to do with the reltol option.
This circuit really is critical in the sense that there are very short LED pulses separated by a long period during which $C_2$ charges up. So LTSpice might incorrectly choose a minimum time step here and also this may compound with the relative tolerances, too.
So. The first thing I usually try with astable multivibrators like this is to set the UIC flag in the .TRAN to make sure that it doesn't attempt to find a quiescent point, instead. If that doesn't do it, then I set the minimum timestep to something painfully short and see if that gets the needed time resolution. And the final trick I try is to set RELTOL to a small value.
(Sometimes, it's about the solver itself. But usually not. You can change it in the options dialog box though.)
In this case, the minimum timestep does appear to clear things up. But it is very slow. It's a lot easier to just add this Spice line to your schematic:
.options reltol=0.0000001
That should help. (But feel free to combine that with a minimum timestep. I think $100\:\mu\textrm{s}$ would also be fine, though to be sure I'd go to $20\:\mu\textrm{s}$ if I left reltol at its default value.)
• the tolerance option does not appear to make any difference in my case, but that is because the output was already fine. Anyway, +1 for both the tips. – Sredni Vashtar May 22 '17 at 23:28
• @SredniVashtar Remove the minimum time period now. Should still work, but faster now. – jonk May 22 '17 at 23:30
• Indeed it does. I should have read with more attention. :-) – Sredni Vashtar May 22 '17 at 23:32
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.