text:
# H1. For each function below, construct the third-order Taylor polynomial approximation, using Io 0, and then estimate the error by

###### Question:

H1. For each function below, construct the third-order Taylor polynomial approximation, using Io 0, and then estimate the error by computing an upper bound on the remainder; over the given interval,

#### Similar Solved Questions

##### 3. (20 pt.) Consider non-homogeneous linear differential equation y" _ 4 Y + 3y=r, T > 0verfy that (Y1, Y2) (â‚¬,14) is fundamental set of solutions of its complementary linear homogeneous equation_ b) find the general solution of the original non-homogeneous differential equation.
3. (20 pt.) Consider non-homogeneous linear differential equation y" _ 4 Y + 3y=r, T > 0 verfy that (Y1, Y2) (â‚¬,14) is fundamental set of solutions of its complementary linear homogeneous equation_ b) find the general solution of the original non-homogeneous differential equation....
##### Suppose the correlation between height and weight for adults is +0.40. What proportion (or percent) of...
Suppose the correlation between height and weight for adults is +0.40. What proportion (or percent) of the variability in weight that is related to height? (Hint-coefficient of determination). (1 pt) please show all work and steps a. 40% b. 16% c. 0.40% d. 0.16%...
##### WXeeConsider the following equilibrium: calculate Kc- colg) - 3 Hzlg) =CHalg) _ A,olgl fKe 2.21x 10-5 at 1460.0 K,Qui=Answer:CheckFinishUSpadef
WXee Consider the following equilibrium: calculate Kc- colg) - 3 Hzlg) =CHalg) _ A,olgl fKe 2.21x 10-5 at 1460.0 K, Qui= Answer: Check Finish USpadef...
##### [0/1.92 Points]DETAILSPREVIOUS ANSWERSPOOLELINALG4 3.1.009.MI.Let~5 A = [E= [4 2] F-[-] Compute the indicated matrix. (If this is not possible_ enter DNE in any single blank)_E(AF)Need Help?EudkKaeh_haeer[0/1.92 Points]DETAILSPREVIOUS ANSWERSPOOLELINALG4 3.1.012.LetE=[0 2] F-[-4]Compute the indicated matrix. (If this is not possible_ enter DNE in any single blank)_
[0/1.92 Points] DETAILS PREVIOUS ANSWERS POOLELINALG4 3.1.009.MI. Let ~5 A = [ E= [4 2] F-[-] Compute the indicated matrix. (If this is not possible_ enter DNE in any single blank)_ E(AF) Need Help? Eudk Kaeh_ haeer [0/1.92 Points] DETAILS PREVIOUS ANSWERS POOLELINALG4 3.1.012. Let E=[0 2] F-[-4] Co...
##### 7.22.2synthetic fiber Used in manufacturing carpet has tensile strength that is normally distributed with mean 75,5 psi and standard deviation 3.5 psi. How is the standard deviation of the sample mean changed when the sample size increased from =51 Round intermediate calculations to four decima places (e 0- 12.3456) and round the final answer to three decima places (e.g 98.768)-The standard deviationPSI .reduced increasedStatistica Tables and Chartsthe absolute tolerance +/-0.001Click if you wou
7.22.2 synthetic fiber Used in manufacturing carpet has tensile strength that is normally distributed with mean 75,5 psi and standard deviation 3.5 psi. How is the standard deviation of the sample mean changed when the sample size increased from =51 Round intermediate calculations to four decima pla...
##### Part C: Waterpark case study Wet ‘n Wild is a chain of waterparks operated across Australia,...
Part C: Waterpark case study Wet ‘n Wild is a chain of waterparks operated across Australia, the United States, and now China. The first waterpark in the chain was opened on the Gold Coast in Australia in 1984. Since that time they have expanded to eight locations, including Hawaii and Las Veg...
##### ( =I thent ? ()
( =I thent ? ()...
##### In Matlab A= 3 -5 6 ( 15 7 9 13 5 -4 12 10 2...
In Matlab A= 3 -5 6 ( 15 7 9 13 5 -4 12 10 2 8 11 4 1 For the matrix A in problem-2, use MATLAB to carry out the following instructions a. Find the maximum and minimum values in each column. b. Find the maximum and minimum values in each row. c. Sort each column in ascending order and store the...
##### Consider a real 3 X 3 matrix A 1) Assume that all of the eigenvalues of are real and strictly negative: Compute the following limit lim etAv;where (1,0,0) . 2) Prove Or disprove by a counter example: if one of the eigenvalues of A has non-zero imaginary part, then that always means there is & vector U such that etAv does not converge to zero as t OO _
Consider a real 3 X 3 matrix A 1) Assume that all of the eigenvalues of are real and strictly negative: Compute the following limit lim etAv; where (1,0,0) . 2) Prove Or disprove by a counter example: if one of the eigenvalues of A has non-zero imaginary part, then that always means there is &...
##### We wanted to test a new toothpaste to see if itreduced cavities better than other toothpastes. We also want toknow how many times we needed to brush our teeth, so we will test 3different  of brushings. 1. How many different treatment groups will wehave (remember that we want to test 3 different numbers ofbrushings (once / day, twice / day, and three times /day)?2. What is our control group?3. How many people should be included in thisstudy? How many in each of our groups?4. What are sever
We wanted to test a new toothpaste to see if it reduced cavities better than other toothpastes. We also want to know how many times we needed to brush our teeth, so we will test 3 different  of brushings. 1. How many different treatment groups will we have (remember that we want to test 3 differ...
##### Homework: 5.3 Score: 0 of 1 pt 5.3.3 Use the figure to find the exact value...
Homework: 5.3 Score: 0 of 1 pt 5.3.3 Use the figure to find the exact value of the following trigonometric function tan (20) tan (20) = (Simplify your answer.) Enter your answer in the answer box and then click Check Answer All parts showing Chapter 1-3 B.docx Chapter 1-3 B docx Chapter 1-Bdocx Math...
##### A Moving to the next question prevents changes to this answer. Question 4 Order: Epivir 0.3...
A Moving to the next question prevents changes to this answer. Question 4 Order: Epivir 0.3 g p.o. every day Available: Epivir tablets labeled 150 mg How many tablets will you administer? Moving to the next question prevents changes to this answer. O Type here to search...
##### VThere are Wo major systems in the body that coordinate all of the other organ systems in Ihe human bodycontrolnetvoussystem is comprised of the brain , spinal cord,andThe associatedstimuliFaaendocrineThe action of the nervous systen allows the body to respond t0 both extemal and internalsensoryionsaddition,the systam also regulates the funcilons o the body $other systems Iilke maintenance of the male and iemale reproductive organsunnanhormonesnenvesTnis sksten$ raspons? hov;e = slorer due tot
V There are Wo major systems in the body that coordinate all of the other organ systems in Ihe human body control netvous system is comprised of the brain , spinal cord,and The associated stimuli Faa endocrine The action of the nervous systen allows the body to respond t0 both extemal and internal s...
##### Find y .v-(0 . 3 2x5 3 "2x0 2 + 2x X0 2 + 2xNonc of the given answcrs
Find y . v-( 0 . 3 2x 5 3 "2x 0 2 + 2x X 0 2 + 2x Nonc of the given answcrs...
##### 13 of 25 (21 complete) his Question: 1 pt Find an equation for the line with...
13 of 25 (21 complete) his Question: 1 pt Find an equation for the line with the given properties, Express your answer using either the general form or the slope-intercept form of the equation of a line. Parallel to the line y = 4x containing the point (-6.6) The equation is (Type an equation. Simpl...
##### = Problem tracks radians of elevation per rocket pt ) L the chanachod W vertically the the the groud iuto N the km t I7 atosphere: 1 from that and [ IN pad; Fi45e 1
= Problem tracks radians of elevation per rocket pt ) L the chanachod W vertically the the the groud iuto N the km t I7 atosphere: 1 from that and [ IN pad; Fi 45 e 1...
##### F(b)f (a)f' ()
f(b) f (a) f' ()...
##### In the figure, two particles are aunched from the origin of the coordinate system at time Particle of mass m1 3.20 g is shot directly along the axis (on frictionless floor) Where moves with constant speed of 10.3 m/s. Particle of mass mz .00 is shot with velocity of magnitude 19_ mis, an upward angle such that always stays directly above particle during its flight: (a) What is the maximum height Hmax reached by the com of the two-particle system? In unit-vector notation _ what are the (b) veloci
In the figure, two particles are aunched from the origin of the coordinate system at time Particle of mass m1 3.20 g is shot directly along the axis (on frictionless floor) Where moves with constant speed of 10.3 m/s. Particle of mass mz .00 is shot with velocity of magnitude 19_ mis, an upward angl...
##### Using the following values approximate electronnegativity values ( F=4.0, O=3.5, N=Cl=3.2, C=S=Kr=2.5, H=2.1, I = 2.7 ), predict if the following molecules are polar or non polarBF3CF2=CF2SF2KrF2S=CF2IF2IF5KrF4
Using the following values approximate electronnegativity values ( F=4.0, O=3.5, N=Cl=3.2, C=S=Kr=2.5, H=2.1, I = 2.7 ), predict if the following molecules are polar or non polarBF3CF2=CF2SF2KrF2S=CF2IF2IF5KrF4...
##### Please answer below question (A-C). Thank you 3 attempts lett Check my work te the difference in energy between the n -2 and n-1 states of an electron in a one- (a) Calcula dimensional box with a...
Please answer below question (A-C). Thank you 3 attempts lett Check my work te the difference in energy between the n -2 and n-1 states of an electron in a one- (a) Calcula dimensional box with a length of 0.50 nm. x 10.J (b) Caleulate the difference in energy between the n - 2 and n -1 states fo...
##### Chap Take home Using Ihe Tofmular tile cotnIne an3 els the following problems:just findCICCpt I) (D +1) (D 4) v yk = D"(D+IJ"(D - V(D' + Iy 2 (D" . p"(D Wv (D" +2(D" C0l (D)' 18p" )(D Fv Jur(D' GD" SJ(DI u' GD" J(D"CScurIrI JTS(D: Jv CulrT(D? 4v Giul"D"hir172 + [1(D-20'v13 (D"reU, (D"reroslr15. (D' D" = 1217"1(D +IF (DCnau17.(DCuer(D" + Ju Tiu3r19 (D'Kraar
chap Take home Using Ihe Tofmular tile cotnIne an3 els the following problems: just find CICCpt I) (D +1) (D 4) v yk = D"(D+IJ"(D - V(D' + Iy 2 (D" . p"(D Wv (D" +2(D" C0l (D)' 18p" )(D Fv Jur (D' GD" SJ(DI u' GD" J(D" CScurIr I...
##### WE 34 costs, did you define transaction and duration drivers. DJU) to each type of purse?...
WE 34 costs, did you define transaction and duration drivers. DJU) to each type of purse? Explain. Exercise 4.16 Multiple versus Single Overhead Rates, Activity Drivers Deoro Company has identified the following overhead activities, costs, and activity the coming year: Activity Expected Cost Activit...
##### Something is Amiss in the Purchasing Department at The Wheel Drive The Wheel Drive has been...
Something is Amiss in the Purchasing Department at The Wheel Drive The Wheel Drive has been a profitable company since it was founded 10 years ago. At the start of the last financial year, the company had doubled the number of employees from the year before. Wheel Drive hired and trained employees f...
##### Fill in each blank so that the resulting statement trueConsider the following long division problem:3x - 2/x? + 7x? + 11x - 4Begin the division process by dividingwhich obtainsWrite this result abovein the dividendBegin the division process by dividingwhich obtainsWrite this result abovein the dividendFill in each blank so that the resulting statement trueIn the following long division problem, the first step has been completed_Sx-2h15x +7x _ 7x+13 The next step to multiply the quotientand the d
Fill in each blank so that the resulting statement true Consider the following long division problem: 3x - 2/x? + 7x? + 11x - 4 Begin the division process by dividing which obtains Write this result above in the dividend Begin the division process by dividing which obtains Write this result above in...
Miranda’s Financial aid stipulates that her tuition not exceed $1500. If her college charges a$125 registration fee plus $475 per course, what is the greatest number of courses for which she can register?... 5 answers ##### (15 pointa} Find the eigeufictiollsG=emWalut$Dou;n Wlut moblen42"0) Ar("), / (U)r(L)
(15 pointa} Find the eigeufictiolls G=emWalut\$ Dou;n Wlut moblen 42"0) Ar("), / (U) r(L)...
##### Student randomly sampled the college important for earning a good salary? A business statistics graduated frialaries...
student randomly sampled the college important for earning a good salary? A business statistics graduated frialaries and college grade point averages of t to answer the following questions. The regression printout for his efforts is below. Use ANOVA 126.75 126.75 21.57447 0 003523 Regression Stadist...
##### After you analyze the loop in the following program, find the output. int y = 3;...
After you analyze the loop in the following program, find the output. int y = 3; for (int i = 1; i < 7; ++i) {   y += i; } cout << "The value for y is "<<y ;...
##### Find the length of a rectangular lot with a perimeter of 108 meters if teh length is 8 meters more than the width
Find the length of a rectangular lot with a perimeter of 108 meters if teh length is 8 meters more than the width....
##### QUESTION(a) Consider a product of your choice and write down a multiple regression equation relating the quantity consumed of that product a number of independent variables explanatory variables). For each independent variable included, explain the expected impact on consumption_(b) Distinguish between Type and Type Il elors Provide an example of a case where it would be more important to maintain the likelihood of a Type Error low than to keep the likelihood of & Type II error low.You have
QUESTION (a) Consider a product of your choice and write down a multiple regression equation relating the quantity consumed of that product a number of independent variables explanatory variables). For each independent variable included, explain the expected impact on consumption_ (b) Distinguish be...
##### IedenenHow does uncorrected myopia and hyperopia affect the near point?
Iedenen How does uncorrected myopia and hyperopia affect the near point?...
##### Problem S: Suppose the sales of potato chips generates profit at the rate P (t) Tt In(2t) dollars per [2 marks] weck and production costs accumulate at rate of C (t) 5 dollars per weck What is thc total rcvenuc accumulatcd from weck to wcck 32Problem 5:answer correct to decimals
Problem S: Suppose the sales of potato chips generates profit at the rate P (t) Tt In(2t) dollars per [2 marks] weck and production costs accumulate at rate of C (t) 5 dollars per weck What is thc total rcvenuc accumulatcd from weck to wcck 32 Problem 5: answer correct to decimals...


text:
# WAIT within a WARP block

I came across this combination while testing some clone logic.
I was creating clones and have them process at either "When I start as a clone" or "When I receive ___" blocks.
Also I placed some process completion counters for the clones within the WARP by using "when proc# < 1" type of code.
I noticed that if there is one of these WAITs within a WARP, almost nobody else gets any cycles.
I did not do this on purpose, but came across it while trying to speed things up with WARP blocks.
I did not test this with the older versions. But since there was some WARP speed-up in the v6 release, I wanted to share my experience, so others can be mindful of this.

The thing to do is definitely not have any conditional WAITs within the WARP.

Here is a demo code that grinds to a HALT and completes only after a veeerrryyy LooooNnnnnGgggg time, in my PC.

of course, the whole point of warp is to snatch all the cycles away and prioritize the warped thread over all others with a 500 msecs interval.

Absolutely!
I am not arguing, but I was thinking that there would "some" cycles enough for a modicum of progress left. It is more like almost NOTHING is left.

well, that's the downside of giving users / programmers control of such things, they can abuse it in ways that hardly make sense

IMHO a WAIT should turn off warp until the thread starts again. Even if it's WAIT 0 SECS, or rather especially then, because the user's clear intent is to let everyone run for one display cycle.

did you see the script in question? it's not a timed wait, but a conditional one.

No, I admit, I haven't read the project. But why does that matter? WAIT UNTIL could/should also turn off WARP, especially since many possible conditions can't be met if other threads aren't running.

@ bh. Thank you in a way!
I did not want to argue the merits of the design behind the curtain and kind of stayed quiet.
However, if one considers the steps a user goes thru developing a piece of a script (at least in my case), then it becomes clear that it is not always obvious that such "obviously wrong choice of blocks" should not have been used. (Wow, that was a mouthful !).

It is the simple act of placing a WARP block in an attempt to speed things that leads to such occurrences. In my case at least, I don't "THINK" about analyzing the block sequences before placing them into warp. I just do it to speed it up. When it collapses due to interdependencies of event block's, my first reaction is NOT "oh, I made a mistake", but rather "another weirdness about SNAP! It was working fine without the warp" - should I report it or not. Then the painful analysis of the various reactions have to be considered: stupidity, not knowing CS to a sufficent degree, not understanding the underlying design, being a user without a clue, ...etc.

Long story short, working with Snap is a love-hate relationship that one has to endure for the potentially pleasant results and accolades one might achieve. I guess there is a bit of S&M in some of us!

Oh dear. Is this a hypothetical worry, or have we actually responded that way? If I've done that, I really want to know about it. I'm sure the rest of us feel the same way.

Speaking now just for myself, I am just barely less ignorant of Snap! internals than the newest user. I have a good sense, I think, of the abstraction we want to present to users, but I have no clue, for example, exactly why the new Morphic is better than the old one. So if I'm ever arrogant toward users, that's unacceptable for two reasons.

Oh, looking back, I see this:

Is that what you meant? At least he did put a smiley...

I think that Jens thinks of you as a step above a generic user. So he expects you to interpret that as friendly, treating you like one of the gang. But I shouldn't speak for him. I'm sure he'll respond to this thread, maybe not today because his family has the strange idea that he should spend some time with them on the weekends.

@bh:
Please do not worry too much about what I have said. I have utmost respect for all the SNAP development team members. What you guys try to do and how you go about it speaks volumes about you than any one's comments, mine included. Once in a while, I spew out some subconscience thoughts, which I have to learn to better control. No harm done, all is well !
And here is my favorite emoticon:

Thanks!

Ugh, just noticed this. Hey, @tguneysu, I totally appreciate all your questions and findings! They are exactly the wonderful and useful feedback we look forward to receiving, because, how else would we ever make Snap better and get the bugs out. No, seriously, the smiley was indeed meant as a virtual pat on your shoulder, and yes, as Brian correctly muses, I do consider you to be part of our "core" gang. Thank you for all you've done and all you're going to help Snap!

format: plain


text:
# Web 3.0

## MediaWiki's semantic support

The most well-known integration of MediaWiki with the semantic web is Semantic MediaWiki (SMW), but there is now a strong movement for native support.

First came Wikidata which is a free and open semantic network that can be read and edited by both humans and machines. The information can be exported as RDF, RDFS, OWL and other semantic web formats. Wikidata acts as central storage for the structured data of its Wikimedia sister projects including Wikipedia, Wikivoyage, Wikisource, and others.

Note: The WikiData search doesn't appear to be very useful for general purpose things, for example, I wanted to find properties that had equivalents in the RDFS schema, but the search wouldn't return any results for that. I had to use Google instead.

See Wikibase data model and Property talk:P31 (P31 is "instance of") for more detail.

Next there is a big movement under way to allow MediaWiki to fully support MicroFormats (see the page on MediaWiki progress here). And also native support for MicroData (The schema.org initiative started by Google, Yahoo, Bing and Yandex in 2011) is progressing well - for example the \$wgAllowMicrodataAttributes configuration option has been removed in favour of default native support.

I've added in some custom changes to our skin on the AfterFinalPageOutput hook, which isn't a very efficient way of doing things, but serves as a good test. Before implementing this the search engine results for pages in Organic Design were very disorganised since they included any pages that referred to the query in the sidebar or other areas of the page. After adding schema.org microdata, only pages that include the results in the actual content were shown. This is out general page HTML structure no with the nicrodata highlighted:

 ...

 ...

 ...

 ...

## RDF Triples

RDF is a family of World Wide Web Consortium (W3C) specifications originally designed as a metadata model but which has come to be used as a general method of modeling information, through a variety of syntax formats.

The RDF metadata model is based upon the idea of making statements about resources in the form of subject-predicate-object expressions, called triples in RDF terminology. The subject denotes the resource, and the predicate denotes traits or aspects of the resource and expresses a relationship between the subject and the object. For example, one way to represent the notion "The sky has the color blue" in RDF is as a triple of specially formatted strings: a subject denoting "the sky", a predicate denoting "has the color", and an object denoting "blue".

This mechanism for describing resources is a major component in what is proposed by the W3C's Semantic Web activity: an evolutionary stage of the Web in which automated software can store, exchange, and use machine-readable information distributed throughout the web, in turn enabling users to deal with the information with greater efficiency and certainty. RDF's simple data model and ability to model disparate, abstract concepts has also led to its increasing use in knowledge management applications unrelated to Semantic Web activity.

The subject of an RDF statement is a resource, possibly as named by a Uniform Resource Identifier (URI). Some resources are unnamed and are called blank nodes or anonymous resources. They are not directly identifiable. The predicate is a resource as well, representing a relationship. The object is a resource or a Unicode string literal.

## RDF at Runtime

Before talking about RDF at run time, a quick look at the relationship between XML and the Document Object Model (DOM) may be useful. XML is a standard way of describing hierarchical in textual form for storage and communication, but a textual representation is not very useful at run time because it needs to be converted into a system of objects and references native to the run time environment. The Document Object Model is a standard which defines how an XML document can be described and interacted with at Run time and provides a standard set of methods for navigating and manipulating such data, and how to transform information to and from XML text and DOM objects.

RDF can be described using XML and so can therefore be available within a run time environment that way, but this is not optimal because RDF is far simpler and more general than XML so it could be implemented with a lower-level, more efficient run-time data structure. RDF allows the simple definition of a set of subjects all containing many relationships (effectively key:value pairs). But it does not introduce any other concepts such as elements, attributes or entities.

## URI's & Object References

A Uniform Resource Identifier (URI) is a string of characters used to identify a name or a resource on the Internet. Such identification enables interaction with representations of the resource over the network using specific protocols. Schemes specifying a concrete syntax and associated protocols define each URI.

One can classify URIs as locators (URLs), or as names (URNs), or as both. A Uniform Resource Name (URN) functions like a person's name, while a Uniform Resource Locator (URL) resembles that person's street address. In other words: the URN defines an item's identity, while the URL provides a method for finding it.

## Large-scale organisation

The Semantic Web document by Tim Berners-Lee and a couple of others in 2001 is an excellent introduction to the concepts of how it would be used and how it works. It's set in the not too distant future at a time when the entire internet and its application are semantically structured. But one thing I find wrong with the picture they paint is that although the users experience of internet usage is very different, the physical organisations they're interacting with are completely unchanged in their nature, one example is a profit-driven health insurance company.

What I'm driving at is, if the users experience is so much rich, efficient and productive then so too would be the organisations. Think about some of the large open-source projects we have today. In as environment such as the one discussed in The Semantic Web, large open-source, decentralised projects would form and grow automatically as people supported the ideas with their resource.

Even now many such projects are branching out of the purely informational realm and into real world aspects such as reselling related products or services, or hiring developers and administrators. The corporations will find it harder and harder to compete because they can't be trusted, yet the new decentralised organisations have nothing hidden. Once this way of organisation becomes common-place it will spread into all areas of organisation and will eventually become the preferred method of handling organisation at the largest scale, such as health, transport, finance and industry.

## Foundation Ontology

The N3 notation of the semantic web has one very important aspect in common with the foundation ontology of the nodal model which is that the they describe a data structure similar to standard hash-tables, associative-arrays or dictionaries, except that the keys are global object references (URI's) rather than just names. This allows the relationships themselves to exhibit universal meaning. Spaces whose nodes are all described by N3 triples are called triplespaces. A triplespace's nodes can be used as either objects, or as the relationships connecting other objects.

The optimal runtime data structure of a triplespace cannot be described by the usual hash-table implementations because they expect the key parameter to be a simple datatype, and cannot handle an object reference as a key. Some languages, such as Perl and LISP have implementations of associative arrays that do work with arbitrary types.

In information science, an Upper ontology (top-level ontology, or foundation ontology) is an attempt to create an ontology which describes very general concepts that are the same across all domains of knowledge and application. The aim is to have a large number on ontologies accessible under this upper ontology. It is usually a hierarchy of entities and associated rules (both theorems and regulations) that attempts to describe those general entities that do not belong to a specific problem domain.

Upper ontologies are commercially valuable, creating competition to define them. Peter Murray-Rust has claimed that this leads to "semantic and ontological warfare due to competing standards", and accordingly any standard foundation ontology is likely to be contested among commercial or political parties, each with their own idea of 'what exists' (in the philosophical sense).

No single upper ontology has yet gained widespread acceptance as a de facto standard. Different organisations are attempting to define standards for specific domains. The Process Specification Language (PSL) created by the National Institute for Standards and Technology (NIST) is one example.

• GIST - The minimalist upper ontology
• BFO - Basic Formal Ontology (manual)
• SUMO - Suggested Upper Merged Ontology
• PSL - Process Specification Language
• OpenCYC
• DOLCE - Descriptive Ontology for Linguistic and Cognitive Engineering
• GFO - General Formal Ontology

## TripleSpace (Semantic TupleSpace)

The web and the tuplespace have many things in common. They are both global information spaces for persistent publication. Therefore, they share many of their underlying principles. They differ in their application context. The web is a world wide information space for the human reader and the tuplespace is a local space for parallel computation. We propose to extend the tuplespace into a triple-space, where <subject, predicate, object> describe content and semantics of information. The object can become a subject in a new triple and so defining a graph structure capturing structural information.

- Dieter Fensel, Tim Berners-Lee & Eva Kühn, May 2004

RDF-triples are almost identical to the associative array, or key:value pair-based structure we're used to; triples are just a slightly more atomic way of describing the information. A statement of <subject, predicate, object> can be thought of as saying the subject contains the predicate:object association. See also the Notation3 (N3) format for triples.

### Hydranode

Hydranode is more complete than the nodal reduction algorithm and already supports multiplexed and load-balanced communications over a diverse range of protocols, even though it may no longer be under development. In fact, any content distribution system that is protocol-independent can easily be turned into a work reduction system similar to the nodal model's approach, because any processeses that can be broken up into arbitrarily small work units are completed in the same way as sending or receiving any packet.

### Tripoli

Tripoli is a GPL project written in Python that implements a TripleSpace over the Twisted infrastructure, which is an event-driven network programming framework under the MIT License.

### Perl Object Environment

POE was originally developed as the core of a persistent object server and runtime environment. It has evolved into a general purpose multitasking and networking framework, encompassing and providing a consistent interface to other event loops. POE is a Perl equivalent to Tripoli.

## Web4.0

I've been using the term Web4.0 to mean not only a semantic applicational internet (i.e. web3.0) but combined with p2p technology such as DHT's and Triplespaces - ie a serverless semantic internet. All the components of it are available already but just need to be glued together (which will be an automatic result of web3 anyway).


text:
What is the equation of intersection between a line segment and a square?

If we have a line segment l and an axis-aligned fixed size square s, what is the algebraic equation of length of intersection between l and s? (with respect to center of s)

EDIT: in fact we are searching the length of subsegment of l that is inner the square

• The intersection of a line segment and a square might depend on whether you consider the interior of the square to be included in the definition. If it is, then you are intersecting two convex sets and the result is either empty or a convex subset of the line segment, i.e. a smaller line segment or a point. – hardmath Mar 2 '17 at 13:19
• Not enough information. Is the square centered at the origin or is it on the positive axes or is it anywhere in the plane? Is your line $l$ a line through the origin or is it a general line y = mx + b? – victoria Mar 2 '17 at 13:41
• @victoria line l is in a general line but fixed, and the square can be anywhere in plane. In fact, as I said in question I want an algebraic equation that shows the intersection length with respect to place of square s – JalalJaberi Mar 2 '17 at 14:36
• @hardmath To be clear, I want the length of line segment that is inner the square – JalalJaberi Mar 2 '17 at 14:37
• The problem is that you have four possible cases depending on the slope and intercept of the line, the position of the square, and the side $s$ of the square. There's a fifth and most common result, that they don't intersect at all. There won't be one simple rule but five cases. – victoria Mar 2 '17 at 15:39

Consider the line segment connecting points $(x_0,y_0)$ and $(x_1,y_1)$ in the Cartesian plane, of length $\ell = \sqrt{(x_1-x_0)^2 + (y_1-y_0)^2}$.

The entire length of the line segment is interior to the square if and only if both its endpoints are interior to the square. So it makes sense to begin the determination of length with a check on which of the endpoints (if either) fall inside the square.

Let the (filled) square with axis-parallel sides be $[a,a+s] \times [b,b+s]$. A point $(x,y)$ is in the square if and only if:
$$0 \le x-a \le s \;\text{ and }\; 0 \le y-b \le s$$

There are three cases: both inside, one inside & one outside, both outside. Other than the first of these cases, the length you want will depend on locating intersections between line segments, a topic that has been explored here before.

In the second case (one endpoint inside, one outside), there is always a single intersection to locate (between the given line segment and one edge of the square).

In the third case (both endpoints outside) we have the most difficult checks to perform. The given line segment may have no intersection with edges, it may have distinct intersections with two edges, or it might one intersection at a corner of the square (which zero length you might consider equivalent to missing the square entirely).

There is no apparent value to trying to package all those possible outcomes into one "algebraic equation", but if you explain why you need this, it can be done with a certain amount of complexity.


text:
# What is the corresponding history in Minkowski spacetime of an instanton?

+ 4 like - 0 dislike
502 views

Since this is a subtle and interesting question to me. I will give a rather detailed description. I hope you can keep reading it and find it interesting too.

For simplicity, in the following I will only discuss the one-dimensional instanton, that is, quantum mechanics. But the question applies to more general instantons, such as BPST instanton in $SU(2)$ Yang-Mills theory. Let us begin with a simple quantum mechanical problem $S_M=\int dt\, L_M=\int dt\,[\frac{1}{2}(\frac{dx}{dt})^2-V(x)]$ with the potential being the double-well, shown as following:

Let us denote the state when the particle is located at the left and right minima as $|L\rangle$ and $|R\rangle$, respectively. Let us consider the Euclidean transition amplitude:
$$\lim_{\tau\rightarrow\infty}\langle R|e^{-H\tau}|L\rangle .\tag{1}$$
In the path integral formalism, it is
$$\lim_{\tau\rightarrow\infty}\langle R|e^{-H\tau}|L\rangle=\int\mathcal{D}x\,e^{-\int d\tau[\frac{1}{2}(\frac{dx}{d\tau})^2+V(x)]},\tag{2}$$
with all the paths being fixed at left minimum at initial and right minimum at final Euclidean time $\tau$. Before we talk about how to evaluate it. Let us first compare it to the Minkowski path integral
$$\lim_{t\rightarrow\infty}\langle R|e^{-iHt}|L\rangle=\int\mathcal{D}x\,e^{i\int d t[\frac{1}{2}(\frac{dx}{d t})^2-V(x)]}.\tag{3}$$
Eq.(2) can be obtained by a formal substitution $t=-i\tau$ in Eq.(3). Note that from the Euclidean action
$$S_E=\int d\tau[\frac{1}{2}(\frac{dx}{d\tau})^2+V(x)]\tag{4}$$
we can see that the potential is upside-down now $-V(x)$.

The path integral (2) can be evaluated through the method of steepest descent: expanding around the minima of the Euclidean action $S_E$. One of the minimum of Euclidean action gives a solution in the Euclidean spacetime (since we are discussing quantum mechanical situation, the Euclidean spacetime is one-dimensional):
$$\frac{\delta S_E}{\delta x}=0,\tag{5}$$
which has the well know kink solutioin:
$$\bar{x}(\tau)=\tanh(\tau-\tau_0)\tag{6},$$
where $\tau_0$ is an arbitrary constant, originating from the $\tau-$translation symmetry of $S_E$. In the path integral we need to integrate $\tau_0$ to sum over all translated paths of expression (6). For simplicity, let us take $\tau_0=0$ to look into the profile of the solution. It is shown as following:

Note that there is no classical solution in Minkowski spacetime to
$$\frac{\delta S_M}{\delta x}=0 \tag{7}$$
with the same initial and final conditions because any path will break the energy conservation law. Now we can actually proceed further upon the method of steepest decent and obtain at the leading order:
$$\lim_{\tau\rightarrow\infty}\langle R|e^{-H\tau}|L\rangle\sim e^{-S_E[\bar{x}(\tau)]}.\tag{8}$$

My question is about the tunneling interpretation of the kink solution and the Euclidean transition amplitude. People always say that a kink solution describes that a tunneling process happens from the left minimum at far past to the right minimum at far future. This picture to me is a bit vague. The questions is

(1) Is $\lim_{t\rightarrow\infty}\langle R|e^{-iHt}|L\rangle=\lim_{\tau\rightarrow\infty}\langle R|e^{-H\tau}|L\rangle$? Well, it seems that this is true usually by rough argument of Wick rotation (or I was mistaken), but a rigorous proof is rather missed in most references. I would appreciate it very much if somebody can give a rigorous proof.

(2) Though the Minkowski action does not contain a classical solution. There should be quantum paths that can break the energy conservation law due to the uncertainty principle. What is the (dominant) quantum paths in the tunneling process. Our first guess may be $\bar{x}(t)=\tanh(it)$ with formal substitution $\tau=it$ back to the kink solution $\bar{x}(\tau)=\tanh(\tau)$. But $\tanh(it)$ is imaginary therefore unphysical as the position $x$. Is there any interpretation of the kink solution in Minkowski spacetime?

Of course, if the answer to (1) is yes, then the interpretation of the Euclidean transition amplitude as a tunneling is right even though there is no corresponding interpretation of the kink solution in Minkowski spacetime. But the profile of the kink is so clear such that one can not stop recognizing it as a true (quantum) process in Minkowski spacetime, that is
$$\bar{x}(\tau)=\tanh t,$$
where the substitution is $\tau=t$ rather $\tau=i t$ in the field configuration (viewed as one-dimensional field theory). If this is true, then there is something need to be understood for the Wick rotation.

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysicsO$\varnothing$erflowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.


text:
Help Copy Constructor

Recommended Posts

SmugBoy    122
Hello everyone, I am reading "Beginning C++ Game Programming" and I am stuck with Exersize 1 in chapter 9. I am trying to write a copy constructor and it blows up. What am I doing wrong here?
// Game Lobby 2.0 Exersize Enhancements
// Simulates a game lobby where players wait

#include <iostream>
#include <string>

using std::cout;
using std::cin;
using std::endl;
using std::string;
using std::ostream;

class Player
{
public:
Player(const string& name = "") : m_Name(name), m_pNext(0) {}
string GetName() const {return m_Name;}
Player* GetNext() const {return m_pNext;}
void SetNext(Player* next) {m_pNext = next;}

private:
string m_Name;
Player* m_pNext;	// pointer to the next player in list
};

class Lobby
{
friend ostream& operator<<(ostream& os, const Lobby& aLobby);

public:
~Lobby() {Clear();}
void RemovePlayer();
void Clear();
Lobby(const Lobby& aLobby)		// Copy Constructor
{
cout << "Copy Constructor Called...\n\n";
}
private:
};

{
// create a new player node
cout << "Please enter the name of the new player: ";
string name;
cin >> name;
Player* pNewPlayer = new Player(name);

// if list is empty, make head of list this new player
{
}
// otherwise find the end of the list and add the player there
else
{
while (pIter->GetNext() != 0)
{
pIter = pIter->GetNext();
}
pIter->SetNext(pNewPlayer);
}
}

void Lobby::RemovePlayer()
{
{
cout << "The game lobby is empty. No one to remove!\n";
}
else
{
delete pTemp;
}
}

void Lobby::Clear()
{
{
RemovePlayer();
}
}

ostream& operator<<(ostream& os, const Lobby& aLobby)
{

os << "\nHere's who's in the game lobby:\n";
if (pIter == 0)
{
os << "The lobby is empty.\n";
}
else
{
while (pIter != 0)
{
os << pIter->GetName() << endl;
pIter = pIter->GetNext();
}
}
return os;
}

void testCopy(Lobby aLobby);

int main()
{
Lobby mLobby;
int choice;

do {
cout << mLobby;
cout << "\nGame Lobby\n";
cout << "0 - Exit the program.\n";
cout << "1 - Add a player to the lobby\n";
cout << "2 - Remove a player from the lobby.\n";
cout << "3 - Clear the lobby.\n";
cout << "4 - Copy the Lobby.\n";
cout << endl << "Enter choice: ";
cin >> choice;

switch(choice)
{
case 0: cout << "Good-Bye\n"; break;
case 2: mLobby.RemovePlayer(); break;
case 3: mLobby.Clear(); break;
case 4: testCopy(mLobby); break;
default: cout << "That was not a valid choice.\n";
}
} while(choice != 0);

return 0;
}

void testCopy(Lobby aLobby)
{
cout << "Copy Complete?\n\n";
}

Share on other sites
smart_idiot    1298
Your copy contains the same pointer as the original; you're not copying the player objects.

When the copy gets destroyed, it destroys the Players, and then the original's pointer will be pointing to garbage, as the Players aren't there anymore.

Share on other sites
dimensionX    100
Lobby(const Lobby& aLobby) // Copy Constructor
{
cout << "Copy Constructor Called...\n\n";
}
private:
-------------------------------------------------------------------
Copy Constructor looks good but copy assignment is missing. So the compiler generates one for you. Like this:-

Lobby & operator=(const Lobby& lobby)
{
}

I hope you know the side effect of this (Memory address of lobby.m_pHead is copied, not the contents in the memory address lobby.m_pHead). I think you should be fine if you provide a copy assignment function that copies the contents but not the address.

Share on other sites
SmugBoy    122
Thanks for the quick reply smart_idiot.

How would I properly write the copy constructor?

Share on other sites
SmugBoy    122
I have written a new assignment operator but I still blowup on *m_pHead = aLobby.GetPlayer(); inside the copy constructor.

here is the new assignment operator:

Lobby& operator=(const Lobby& aLobby)	{		if (this == &aLobby) 		{			return *this;		}		else		{			*m_pHead = aLobby.GetPlayer();			return *this;		}	}

Here is the updated source:

// Game Lobby 2.0 Exersize Enhancements// Simulates a game lobby where players wait#include <iostream>#include <string>using std::cout;using std::cin;using std::endl;using std::string;using std::ostream;class Player{public:	Player(const string& name = "") : m_Name(name), m_pNext(0) {}	string GetName() const {return m_Name;}	Player* GetNext() const {return m_pNext;}	void SetNext(Player* next) {m_pNext = next;}private:	string m_Name;	Player* m_pNext;	// pointer to the next player in list};class Lobby{	friend ostream& operator<<(ostream& os, const Lobby& aLobby);public:	Lobby(): m_pHead(0) {}	~Lobby() {Clear();}	void AddPlayer();	void RemovePlayer();	void Clear();	Player GetPlayer() const {return *m_pHead;}	Lobby& operator=(const Lobby& aLobby)	{		if (this == &aLobby) 		{			return *this;		}		else		{			*m_pHead = aLobby.GetPlayer();			return *this;		}	}	Lobby(const Lobby& aLobby)		// Copy Constructor	{			cout << "Copy Constructor Called...\n\n";		m_pHead = 0;		*m_pHead = aLobby.GetPlayer();	}	private:	Player* m_pHead;};void Lobby::AddPlayer(){	// create a new player node	cout << "Please enter the name of the new player: ";	string name;	cin >> name;	Player* pNewPlayer = new Player(name);	// if list is empty, make head of list this new player	if (m_pHead == 0) 	{		m_pHead = pNewPlayer;	}	// otherwise find the end of the list and add the player there	else	{		Player* pIter = m_pHead;		while (pIter->GetNext() != 0)		{			pIter = pIter->GetNext();		}		pIter->SetNext(pNewPlayer);	}}void Lobby::RemovePlayer(){	if (m_pHead == 0) 	{		cout << "The game lobby is empty. No one to remove!\n";	}	else	{		Player* pTemp = m_pHead;		m_pHead = m_pHead->GetNext();		delete pTemp;	}}void Lobby::Clear(){	while (m_pHead != 0)	{		RemovePlayer();	}}ostream& operator<<(ostream& os, const Lobby& aLobby){	Player* pIter = aLobby.m_pHead;	os << "\nHere's who's in the game lobby:\n";	if (pIter == 0) 	{		os << "The lobby is empty.\n";	}	else	{		while (pIter != 0)		{			os << pIter->GetName() << endl;			pIter = pIter->GetNext();		}	}	return os;}void testCopy(Lobby aLobby);int main(){	Lobby mLobby;	int choice;	do {		cout << mLobby;		cout << "\nGame Lobby\n";		cout << "0 - Exit the program.\n";		cout << "1 - Add a player to the lobby\n";		cout << "2 - Remove a player from the lobby.\n";		cout << "3 - Clear the lobby.\n";		cout << "4 - Copy the Lobby.\n";		cout << endl << "Enter choice: ";		cin >> choice;		switch(choice)		{		case 0: cout << "Good-Bye\n"; break;		case 1: mLobby.AddPlayer(); break;		case 2: mLobby.RemovePlayer(); break;		case 3: mLobby.Clear(); break;		case 4: testCopy(mLobby); break;		default: cout << "That was not a valid choice.\n";		}	} while(choice != 0);	return 0;}void testCopy(Lobby aLobby){	cout << "Copy Complete?\n\n";	cout << aLobby;}

Share on other sites
Zahlman    1682
You want the copied Lobby to contain copies of all of the Players in the source Lobby. The basic idea is ok (instead of copying a pointer value, we set the current Lobby head to point at a copy of the other Lobby's first Player), but the implementation is off.

First off, if we're going to do it by "*m_pHead = aLobby.GetPlayer();", then m_pHead has to already point at a Player object so that we can do the assignment. If it's uninitialized or null (and this is a problem in the copy constructor too - heck, it's explicitly set null first!), then the code blows up, because you deref a bad pointer.

Second, we need to make the copying work properly for Players first:

Player& Player::operator= (const Player& other) {  // We need to make a copy of the subsequent players, as well - this happens  // recursively; our base case is when the m_pNext is null.  m_Name = other.m_Name; // the std::string copy ctor and assignment op already  // work the way we want them to :)  // Before we can copy subsequent players, we need to remove any Players the  // current object might already be pointing at:  delete m_pNext; // this is ok whether NULL or not.  // We do this even if there are no players in the other list, so that the  // lists end up being the same.  if (other.m_pNext) {    // then there is a list of players to copy.     // Now we point our player list at a copy of the other player list. Since    // we don't have a valid object to assign into, we have to use the copy    // constructor on the "next" Player of the other:    m_pNext = new Player(*(other.m_pNext));  } }

Oops, we need a copy constructor for the Player, now, too...

STOP.

Notice the similarity in structure here between what is done by assignment operators and copy constructors. It already looks like we're going to make a weird (and redundant!) mess of things if we try and implement each of them separately. Also, we have this annoying explicit 'delete' in the Player assignment op. Wouldn't it be great if we could implement one of these two things in terms of the other?

Enter the copy-and-swap idiom for assignment operators. As it turns out, it makes a lot more sense to implement the copy ctor "fully"; to do assignment, then, all we have to do is create some copy of the object (using the copy ctor, and thus making sure all the pointer ownership etc. stuff gets done properly) and then swap that data in to the current object. We can do that via std::swap, in most cases. This has the effect of setting all the data in the "current" object to the needed values from the copy, and stuffing the bits we're replacing into our temporary object. Finally, at the end of the assignment op code, the temporary falls out of scope, and its destructor is called - therefore cleaning up all the stuff we don't need any more. (Yes, you still have to write a destructor).

So first we will write a proper copy constructor for Players, and then use the copy-and-swap idiom to implement its assignment operator, replacing the mess above:
// First attempt:Player::Player (const Player& other) {  // Here is our code to copy a Player.  // First, copy the name:  m_Name = other.m_Name;  // and now, copy the subsequent players. Since 'this' is a new Player, we  // know there isn't anything in m_pNext that needs to be cleaned up.  if (other.m_pNext) {    m_pNext = new Player(*(other.m_pNext));  } else {    m_pNext = 0; // make sure it's nulled out.  }}// That's not ideal, though: we're only setting data members, so we really// ought to use an initializer list. Here's one place in C++ where the ternary// op really comes in handy ;)Player::Player (const Player& other) : m_Name(other.mName),  // Recursively copy if not null.  m_pNext(other.m_pNext ? new Player(*(other.m_pNext)) : 0) {}// No code within the function any more. :)// Ok, now that we have a nice, neat copy constructor, let's make a nice, neat// assignment operator to go with it, via the copy-and-swap idiom:Player& Player::operator= (const Player& other) {  Player tmp(other);  std::swap(*this, other);  return *this;}

There are many advantages to this idiom. It is clear and exception-safe, and avoids duplication of code. It also automatically guards against self-assignment (the object makes a copy of itself, swaps itself with itself and destroys the copy; that's generally safe as long as your dtor and copy ctor are correct), and lets you make good use of initializer lists.

There's one last step here, of course, which is to make a proper destructor. Otherwise we'll be leaking memory ;)

Player::~Player() {  // If the pointer is null, we're done. Otherwise, we need to delete the  // player that we point at. Of course, that will trigger the destructor for  // that Player, and so on, recursively. Which is all as it should be. Oh, and  // since deleting a null pointer is safe (and does nothing), all we really  // need is:  delete m_pNext;  // If you can't convince yourself that this works, go read up on recursion,  // and try again. :)}

I'm not going to lecture you about variable names, since I assume you picked up most of those conventions from the book you're reading out of. That can wait for another time. :)

1) Apply the provided techniques to write a proper copy constructor for the Lobby (hint: now that you have a proper Player copy constructor, you can rely one it), and use the copy-swap idiom to implement the assignment operator. Also write a proper destructor (this should be easier since you don't have "implicit list" semantics in the Lobby).

2) Research std::list and see how much easier you can make your life by using a std::list<Player> instead. Consider other containers as well, such as std::vector. Do some analysis on what kinds of operations you'll be doing on the Player "list", and choose the container appropriately.

3) Research the concept of pointer "ownership", and the Rule of Three. Googling around for these things should solidify the concepts in your mind.


text:
# Varimax

## Contents

### Description

Input loads is a N by K matrix with orthogonal columns and the output vloads is a N by K matrix with orthogonal columns rotated to maximize the "raw varimax criterion". Optional input options is discussed below.

### Algorithm

Under varimax the total simplicity S is maximized where: $S=\sum_{k=1}^{K}{S_k}$ and the simplicty for each factor (column) is $S_k = \overline {(a_k-\bar{a}_k)^2}$ where the overbar indicates the mean and $a_k$ is the kth column of vloads.

The algorithm is based on Kaiser's VARIMAX Method (J.R. Magnus and H. Neudecker, Matrix Differential Calculus with Applications in Statistics and Econometrics, Revised Ed., pp 373-376, 1999). They note that if the algorithm converges, "which is not guaranteed, then a (local) maximum ... has been found."


text:
# Not fully understanding polynomial quotient rings.

This is my (informal) understanding of a quotient ring. I understand that this is very flimsy, but I hope you can get the main idea.

You have some ring $R$ and you want to quotient out an ideal $I$. Draw out a 'number line' listing all the elements, starting from the zero element. Identify the smallest element of $I$. Take only the elements from the zero element up to that smallest element of the ideal (ideal generator), delete everything else. You now have a 'string' of elements. Connect the ends of the string so the ideal generator $I$ coincides with the zero element. This is your quotient 'ring'.

So going by this, the quotient ring should contain all the elements 'smaller than' the ideal generator. So for example, if the ideal generator is $x^2+1$, then the ring contains only linear factors, hence 'smaller'.

This is the part where I am confused. My understanding is that if we have $$R[x]/(x^2+1) \cong ax+b$$

for $a,b \in R$.

But this excellent answer here says that

$$\mathbb{Q}[x]/(x^2-2) \cong \mathbb{Q}[\sqrt{2}]$$

Why are we finding the roots of the quotient and plugging them into the quotient form (linear factor)?

• The statement $R[X]/(X^2+1)\simeq aX+b$ is meaningless. – Pedro Tamaroff Jun 13 '16 at 3:24
• here, $R_1 \cong R_2$ means that $R_1,R_2$ are two different rings but with a ring isomorphism between the two, that is, there exists $\phi : R_1 \to R_2$ such that $\phi(xy+vw) = \phi(x)\phi(y)+\phi(v)\phi(w)$, and the same for $\phi^{-1}$ – reuns Jun 13 '16 at 3:26
• and $R[x] / (x^2+1)$ is the set of cosets $P+ (x^2+1), P \in R[x]$, for each of those we can choose a representative $ax+b$, with the same $+$ as in $R[x]$, but with a different $\times$ (can you write the multiplication $(ax+b)(cx+d)$ in $R[x] / (x^2+1)$ ?) – reuns Jun 13 '16 at 3:28

When you quotient out by $x^2+1$ you send every multiple of $x^2+1$ to zero. This is the same as making $x^2=-1$ which is the same as making $x=i$ so $R[x]$ is now $R[i]$ It's probably the wrong way to think about it and I'm sure I will be scolded for it, but when you just want to know what the damn ring is that's the easiest way to think about it.
To answer the last part of your question, define a ring homomorphism $\varphi : \mathbb{Q}[x] \to \mathbb{Q}[\sqrt{2}]$ by $\phi(f) = f(\sqrt{2})$. It is easy to see that $\varphi$ is surjective. Since $m(x) = x^2 - 2$ is the minimal polynomial of $\sqrt{2}$, $m$ must divide any polynomial $g \in \mathbb{Q}[x]$ with $g(\sqrt{2}) = 0$. Therefore $\ker\varphi = (x^2 - 2)$. By the first isomorphism theorem, $$\frac{\mathbb{Q}[x]}{(x^2 - 2)} \cong \mathbb{Q}[\sqrt{2}].$$


text:
What's new

# Bond price vs Forward Rate

#### nag_san

##### New Member
Subscriber
Hi, In Part 1 Valuation and Risk Models under 10.4 GARP material states the following. Does this apply only to Forward Rates, as usually Interest Rate (Presumably Spot Rates) and Bond prices are negatively correlated (ie if Interest rate > Coupon rate of the bond, then Bond price falls). The below suggests that if Forward Rate > Coupon, then Bond Price increases. If there is an existing thread on this topic, please advise as I could not locate any.

In the case of an upward-sloping term structure, there will be a tendency for the forward rate to be higher than the coupon so that the bond price rises.

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
Hi @nag_san This is GARP's new re-write of Tuckman's Chapter 2 (Maturity and Price or Present Value) and is trying to explain the first part of this LO ("Assess the impact of maturity on the price of a bond and the returns generated by bonds"). Specifically, this refers to
"Assess the impact of maturity on the price of a bond ..."

I will need to re-read the chapter later because, at the moment, I think I disagree with the emphasized portion of "In the case of an upward-sloping term structure, there will be a tendency for the forward rate to be higher than the coupon so that the bond price rises." But it might be just because it's only in the context and the explanation in this section is weak. I do know what it's trying to say, however, because it's an old LO and the source is effectively Tuckman.

The concept is illustrated here in question #1 https://www.bionicturtle.com/forum/threads/weekly-trivia-4-28-14-duration-dv01-and-convexity.7776/

But here is a simpler example. I will use continuous compounding to make things easier. Assume a upward-sloping term structure, super convenient: 1.0% at 1.0 year, 2.0% at 2.0 years, and 3.0% at 3.0 years (i.e., spot rates with continuous compounding). Annual only, because my bond(s) will be annual payers. The implied forward rate term structure is also convenent: F(1,2) = 3.0% and F(2, 3) = 5.0%. That's our upward-sloping term structure.

Now price two 3-year annual pay bonds:
• 4.0% annual pay coupon bond price (3-year, continuous zero rates) = $102.85; i.e.,$4*exp(-1%*1) + $4*exp(-2%*2) + 4*exp(-3%*3) = 102.85 • 6.0% annual pay coupon bond price (3-year, continuous zero rates) =$108.52
Now let one year expire (forward in time ...) with unchanged term structure:
• 4.0% bond (now 2 years to maturity) price increases to $103.88. The idea is this bond's price rises because the forward rate, F(2,3) = 5% is greater than the 4.0% coupon; but • 6.0% bond price decreases to$107.78 because the 6.0% coupon is higher than the 5% forward rate (the same forward rate over which the bond "elapses" from 3 to 2 years).
The sentence you quoted is confusing because an upward-sloping term structure per se does not imply the forward rate is higher than the coupon rate. I haven't sufficiently analyzed the entire section to validate my perspective, but if were to edit into a logically correct standalone sentence then I would write (eg) the following complicated sentence in order to be precise:
"When the term structure is upward-sloping and our scenario is unchanged term structure, over the next period of time the bond price increases if the final forward rate (e.g., the six-month forward rate beginning in 1.5 years as an initial two-year semi-annual pay bond ages six months; the one-year forward rate beginning in 3.0 years as an initial four-year annual-pay bond ages one year) is greater than the bond's coupon rate as the bond ages (i.e., as its maturity reduces) by one period."
BTW, here is a question to provoke thought: why isn't my 4.0% bond pulling to par?

Last edited:

#### nag_san

##### New Member
Subscriber
@David Harper CFA FRM I know you said you'd review later but this is already incredibly helpful. The sentence unchanged term structure after a year or so is what was missing in the content, I think. Even then I may have still needed some examples to understand better. With your examples and the now clear "Unchanged Term structure" sentence, I believe I got it. I may sound greedy but will wait for your further response whenever you get a chance with anything you may wish to add additionally. Thanks a bunch for your assistance as always.

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
Hi @nag_san thank you! The first sentence of the section (Maturity Effects) reads "What happens to the price of a bond if the term structure remains unchanged over a six-month period?" so that assumption is there, but I will tell you that I could not follow the rest of the new text, on its own, as it is written. It's obviously re-written from Tuckman's Chapter 2 (Maturity and Price or Present Value; Tuckman does give an illustrated example) but I don't see how anybody could get the idea without an illustrated example (this is my view of many concepts in the new material. Some people have observed that it's shorter, as an advantage, but I've argued that it's shorter mostly because many illustrated examples have been omitted; for me, that's a big deduction because I need illustrated examples). I wrote my summary sentence of the dynamic, as best I could, above, but still its dense even when edit-trimmed.... stay tuned!

Last edited:


text:
# Infinite Grassmannians and their coordinate rings

I'm currently thinking about some combinatorics associated to an infinite analogue of the coordinate rings of the Grassmannians $Gr(2,n)$. The combinatorics should be thought of as relating to Plucker coordinates $\Delta^{ij}$ but with $i < j$ arbitrary integers, rather than restricted to $\{1,\ldots ,n\}$. So I've been trying to find the right infinite Grassmannian to have this coordinate ring (or, if the regular functions are a bit more complicated in the infinite case, to at least have these Plucker coordinates in there). I've looked (briefly) into:

(a) Kac's construction of infinite Grassmannians ([Kac, Infinite dimensional Lie algebras, 3rd ed.], Exercise 14.32, p.339)

(b) taking the union of the finite Grassmannians to get a classifying space for $O(n)$ or $U(n)$

(c) infinite Grassmannians coming from Hilbert spaces ([Pressley and Segal, Loop groups])

but none of these seem to quite describe what I want. Some of these are working with $\mathbb{N}$-dimensional space rather than $\mathbb{Z}$-dimensional space (i.e. something more like $\mathbb{C}[t]$ than $\mathbb{C}[t,t^{-1}]$), usually from a colimit of the finite ones, and I can't see how to alter the definition and be sure of keeping the theorems. And with the others that do work with something like $\mathbb{C}[t,t^{-1}]$, I can't see a description that corresponds to planes in that space (and I definitely need just the planes).

I feel sure this is well-known so does anybody know a reference for both the construction I want and also enough information about its coordinate ring?

Edit: Having thought about this a little more, I want to formulate the question more specifically as:

Let $V=\mathbb{C}[t,t^{-1}]$ and define $Gr(2,V)$ to be the set of 2-dimensional subspaces of $V$. Does the finite-dimensional machinery of the Plucker embedding work in this setting and give Plucker coordinates in $\mathbb{C}[Gr(2,V)]$ of the form $\Delta^{ij}$ for integers $i < j$?

-


text:
# [Solutions] Nordic Mathematical Contest 2008

1. Find all reals $A,B,C$ such that there exists a real function $f$ satisfying $$f(x+f(y))= Ax+By+C$$ for all reals $x,y$.
2. Assume that $n\ge 3$ people with different names sit around a round table. We call any unordered pair of them, say $M,N$, dominating if
a) they do not sit in adjacent seats,
b) on one or both arcs connecting $M,N$ along the table, all people have names coming alphabetically after $M,N$.
Determine the minimal number of dominating pairs.
3. Let $ABC$ be a triangle and $D,E$ be points on $BC,CA$ such that $AD,BE$ are angle bisectors of $\triangle ABC$. Let $F,G$ be points on the circumcircle of $\triangle ABC$ such that $AF||DE$ and $FG||BC$. Prove that $$\frac{AG}{BG}= \frac{AB+AC}{AB+BC}.$$
4. The difference between the cubes of two consecutive positive integers is equal to $n^2$ for a positive integer $n$. Show that $n$ is the sum of two squares.
 MOlympiad.NET là dự án thu thập và phát hành các đề thi tuyển sinh và học sinh giỏi toán. Quý bạn đọc muốn giúp chúng tôi chỉnh sửa đề thi này, xin hãy để lại bình luận facebook (có thể đính kèm hình ảnh) hoặc google (có thể sử dụng $\LaTeX$) bên dưới. BBT rất mong bạn đọc ủng hộ UPLOAD đề thi và đáp án mới hoặc liên hệbbt.molympiad@gmail.comChúng tôi nhận tất cả các định dạng của tài liệu: $\TeX$, PDF, WORD, IMG,...


text:
You are currently browsing the monthly archive for December 2010.

On Christmas eve my family and I went around looking at Christmas lights. This is the Balian House in Altadena. We used to go and look at the Christmas lights here when I was much younger and it’s actually exactly as I remember. Apparently the Balian family used to (or still does) own an ice cream company and this was the house they lived in. I’m not sure if anyone lives here now. I think the family just owns it and they still decorate it for Christmas.

The Balian House

The day after Christmas my family went shopping, I decided to go to the Huntington Library in San Marino. It was very crowded. I especially like the Japanese garden they have.

Japanese Garden

Zen Garden

So this is Christmas
And what have you done
Another year over
And a new one just begun
And so this is Christmas
I hope you have fun
The near and the dear one
The old and the young

A very merry Christmas
And a happy New Year
Let’s hope it’s a good one
Without any fear

And so this is Christmas
For weak and for strong
For rich and the poor ones
The world is so wrong
And so happy Christmas
For black and for white
For yellow and red ones
Let’s stop all the fight

A very merry Christmas
And a happy New Year
Let’s hope it’s a good one
Without any fear

And so this is Christmas
And what have we done
Another year over
A new one just begun
And so happy Christmas
We hope you have fun
The near and the dear one
The old and the young

A very merry Christmas
And a happy New Year
Let’s hope it’s a good one
Without any fear

War is over, if you want it
War is over now…

Happy Christmas

Now that I have a little bit of spare time, I’ve been able to catch up on some reading. I’ve been meaning to read the books listed bellow for a long time. I’m glad I finally got around to it.

The Last Lecture by Randy Pausch

Randy Pausch’s story is truly inspiring. I’m sure many are already familiar with it. Randy was a computer science professor at Carnegie Mellon University. In 2006 he was diagnosed with pancreatic cancer and in August 2007 he was given a terminal diagnosis: “three to six months months of good health left.” He gave his “last lecture”, titled Really Achieving Your Childhood Dreams, in September 2007 to an audience of about 400 people at Carnegie Mellon.

This book is full of stories from Randy’s life. I particularly like this one. Randy had just created a new course called “Building Virtual Worlds”. He gave the class its first two-week assignment and was blown away with the results. He called his mentor Andy van Dam. “Andy, I just gave my students a two-week assignment and they came back and did stuff that, had I given them an entire semester to complete it, I would have given them all A’s. What do I do?” Andy’s reply, “OK. Here’s what you do. Go back into that class tomorrow, look them in the eyes and say ‘Guys, that was pretty good, but I know you can do better.’ ” Randy followed his advice and the students continued to impress. Enabling the dreams of others was a main theme in Randy’s life and this story demonstrates one way he was able to do that. Never underestimate people, let them fulfill their potential.

Three Cups of Tea by Greg Mortenson

Another really inspiring story which I’m sure many are already familiar with. While attempting to climb K2, Greg and and three other climbers had their ascent interrupted by the need to rescue of a fifth climber. After getting lost during his descent, Greg takes refuge in the small village of Korphe. Inspired by the their hospitality and shocked by their lack of education, Greg promises to repay the village by building a school.

The book chronicles Greg’s struggles as he attempts to build a school for Korphe. Starting from literally nothing, Greg is able to raise money and purchase supplies for the school. Greg’s work doesn’t go unnoticed, after many hardships people in the US and Pakistan start to see the good that he is doing. With the help of a wealthy philanthropist, Greg becomes a founding board member of the Central Asia Institute (CAI). The CAI’s mission is to build schools and promote education throughout Pakistan. Greg’s story is proof that one man can really make a difference in the world. Although initially met with some resistance, it is amazing how much support he has gotten.

I still have a couple of weeks left on my break. I’ve heard Water for Elephants is good, perhaps I’ll read that. Any other suggestions? NPR has a selection of best books of 2010 here.

The word (almost) every math student hates, “proof”. When teaching a precalculus class I do not introduce the notion of a rigorous mathematical proof, however, I do try to get the students to understand why a particular result is true. I use the phrase “why might this be true” a lot. My goal is to get the class thinking about how we arrive at such a conclusion instead of merely accepting it. This doesn’t always work, in fact it rarely does. Students are too content with just memorizing a formula and knowing how to use it. If it work, it works, who cares why it works. To a certain extent that’s fine, I mean, it is important to know how to apply a result. But my point is this, it’s just as important to ask why something is true and at least try to understand why it is true. Even if you don’t get it completely.

To emphasize my point, I’m trying something new for my class next quarter. In the past when I’ve taught the properties of logarithms, I would simply write a property on the board followed by a brief justification. I had fallen into the mindset of my students. I didn’t care if they knew how to derive the properties of logarithms, I just cared that they could memorize them and know how to use them when solving equations. I know, I’m a hypocrite. For next quarter though, I’ve come up with a worksheet that will combat this.

Section 5.4 Properties of Logarithms

In this worksheet we will derive some important properties of logarithms. These properties will be essential for us when we solve logarithmic and exponential equaitons in section 5.5.

Before we can talk about the properties of logarithms we need to recall a few important facts.

• The definition of a logarithm: $\log_b(x)=y$ is equivalent to $b^y=x$.
• One to one property of logarithms: If $\log_b(x)=\log_b(y)$ then $x=y$.
• One to one property of exponents: If $b^x=b^y$ then $x=y$.

The Inverse Rules

$\log_b(b^x)=\bigstar$

What might $\bigstar$ be? First use the definition of logs to rewrite as an equivalent exponential equation. Then use the one to one property of exponents to find $\bigstar$.

$b^{\log_b(x)}=\bigstar$

What might $\bigstar$ be? First use the definition of logs to rewrite as an equivalent logarithmic equation. Then use the one to one property of logs to find $\bigstar$.

The Logarithm of a Product

$\log_b(MN)=$ ?

To derive a formula we make a substitution. Let $x=\log_b(M)$ and $y=\log_b(N).$

a) Use the definition of logs to rewrite $x=\log_b(M)$ as an equivalent exponential equation. Do the same for $y=\log_b(N)$.

b) Multiply together your results from part (a) and use properties of exponents to simplify.

c) Your result from part (b) should be a single exponential equation. Use the defintion of logs to rewrite that equation as an equivalent logarithmic equation.

d) Your result from part (c) should be a logarithmic equation that has an $x$ and a $y$ in it. Plug in $x=\log_b(M)$ and $y=\log_b(N)$ into that equation.

e) What can you say about $\log_b(MN)=$ ?

The Logarithm of a Power

$\log_b(M^p)=$ ?

To derive a formula we again make a substitution. Let $x=\log_b(M)$.

a) Use the definition of logs to rewrite $x=\log_b(M)$ as a equivalent exponential equation.

b) Your result from part (a) should be a single exponential equation. Raise both side of that equaiton to the $p^{th}$ power.

c) Use the definition of logs to rewrite your result from part (b) into an equivalent logarithmic equation.

d) Your result from part (c) should be a logarithmic equation that has an $x$ in it. Plug in $x=\log_b(M)$ into that equation.

e) What can you say about $\log_b(M^p)=$ ?

The Logarithm of a Quotient

$\log_b\left(\frac{M}{N}\right)=$ ?

a) Use the properties of exponents to rewrite $\log_b\left(\frac{M}{N}\right)$ as the logarithm of a product.

b) Use the product rule to split up your result from part (a).

c) Use the power rule to simplify your result from part (b).

d) What can you say about $\log_b\left(\frac{M}{N}\right)=$ ?

I still don’t care if the students know how to derive these properties. Rather, my goal here is to help them understand why these properties hold. In doing that I hope that they will also remember the properties better.

Check it out here.

The Cal Poly Math Department has a newsletter they publish annually called Polymath. I was fortunate enough to be featured in this years edition. My research partner and I wrote the article on minimal surfaces. You can check it out here.

1. Finish grad applications (by this week at the latest or I’m not going anywhere)
2. Study for algebra qual (now!)
3. Relax (or try to)

This list is in order of importance. One is the most important, four is the least.

Today is the 30th anniversary of John Lennon’s death. A truly inspirational human being, he is missed by many. The letter above was written by Yoko Ono in which she sent her blessings to the hundreds of thousands around the world who kept a silent vigil of affection and respect for her husband on Dec. 14, 1980. In celebration of his life, I encourage you to listen to your favorite Lennon songs and share them in the comments.

A few of my favorites:

• Imagine
• In My Life
• Love
• Watching the Wheels

P.S. November 29 was the 9th anniversary of George Harrison’s death. So be sure to listen to lots of George Harrison songs too!

I don’t watch much tv but I really like MythBusters. Science is about asking questions and making hypotheses and then testing them. And the MythBusters have so much fun doing that. For this week’s episode the MythBusters got an invitation to the White House and a personal request from President Obama himself. You can listen to a really cool interview from NPR’s Talk of the Nation here.

Richard Feynman on the rationale for scientific investigation.


text:
# What's the best way to generate all the upper triangular matrix whose singular values are given?

For example, given $\lambda_1 = 1, \lambda_2 = 2, \lambda_3 = 3$, what's the best way to generate all the upper triangular matrix ($3\times 3$) whose singular values are $\lambda_i$?

Note:Given a matrix $A$, if the eigenvalues of $A^HA$ are $\lambda_i \geq 0$, then $\sqrt{\lambda_i}$ are the singular values of $A$. $A^H$ is the conjugate transpose of $A$. Generally, If $B = U A V$ where $U,V$ are all unitary matrix, then $B$ have the same singular values of $A$.

-

One can proof that QRDecomposition[m][[2]] returns the upper triangular matrix with the same singular values

e = {1, 2, 3};
n = Length[e];

q := Orthogonalize[RandomReal[NormalDistribution[], {n, n}] +
I RandomReal[NormalDistribution[], {n, n}]];

r = QRDecomposition[q.DiagonalMatrix[e].q][[2]];

SingularValueDecomposition[r][[2]] // Diagonal
(* {3., 2., 1.} *)

MatrixForm@Chop[r]

Here q is the generator of the random unitary matrix (note the := sign).

-
Thanks! Generally, If $B = U A V$ where $U,V$ are all unitary matrix, then $B$ have the same singular values of $A$. But here only consider the case q.DiagonalMatrix[e].q. –  Eden Harder Dec 15 '13 at 2:35
e*q suffices, because QRDecomposition[eq = e*q][[2]] == QRDecomposition[q.eq][[2]]. –  Ray Koopman Dec 15 '13 at 8:42
My earlier comment was made too hastily, before actually checking. The two versions of r are not necessarily equal, because r is determined only to within a multiplier of ±1 for each row. The test is And @@ MapThread[#1 == #2 || #1 == -#2 &, {r1, r2}]. –  Ray Koopman Dec 15 '13 at 10:43
@EdenHarder I think that q.DiagonalMatrix[e].q is the general case. It is equivalent to $UAV$ with the diagonal matrix $A$. Each q is different because I use the delayed set (:=). –  ybeltukov Dec 15 '13 at 13:17
The QR decompositions of $AV$ and $UAV$ give equivalent $R$ matrices, so $U$ is not necessary. n = Length[e = {1, 2, 3}]; q := Orthogonalize[RandomReal[NormalDistribution[], {n, n}] + I*RandomReal[NormalDistribution[], {n, n}]]; r1 = Last@QRDecomposition[eq = e*q]; r2 = Last@QRDecomposition[q.eq]; And @@ MapThread[#1 == #2 || #1 == -#2 &, {r1, r2}] (* True *) –  Ray Koopman Dec 16 '13 at 0:56

Not a full answer but perhaps something you can work from. Thinking of a matrix as the action it does on the unit sphere $\{Ax ,\|x\| == 1\}$ which is an ellipsoid centered at 0, as it is the image of a linear transformation. The singular values represent the length of the semiaxes, the only freedom that remains is picking the orthonormal basis representing the direction of the semiaxes. Whatever is picked it should be possible to upper triangularize.

unitSphere[θ_, ϕ_] := {Cos[θ] Sin[ϕ], Sin[θ] Sin[ϕ], Cos[ϕ]};
λ = {1, 2, 3};
Manipulate[
m = RotationMatrix[{{0, 0, 1}, unitSphere[θ, ϕ]}].DiagonalMatrix[λ];
{u, w, v} = SingularValueDecomposition[m];

Show[
ParametricPlot3D[
m.unitSphere[a, b], {a, 0, 2 Pi}, {b, 0, Pi}, PlotStyle -> Opacity[0.3], Mesh -> None],
Graphics3D[{Arrow[{{0, 0, 0}, #}] & /@ Transpose[u.w]}],
PlotRange -> {{-3, 3}, {-3, 3}, {-3, 3}},
PlotLabel -> Diagonal[w]
],
{θ, 0, 2 Pi}, {ϕ, 0, Pi}]

-
Thanks! I also want to reduce the variables. –  Eden Harder Dec 15 '13 at 3:22


text:
# Calculating Enthalpy

I’m typing this from my phone...sorry if the quality is sub par.

I have a very involved spreadsheet from a colleague of mine that was put together in 1994. The spreadsheet calculates the excess air involved in combusting landfill gas in an enclosed flare. I’m trying to step my way through it little by little.

At one point in the spreadsheet, there is a calculation for enthalpy of the inlet gas stream. For the methane portion of the inlet stream, assumed to be 50% of the LFG stream, the formula being done is very clearly:

$$MC_p\Delta{T}$$

The inlet gas stream is assumed to be $$\pu{60 ^\circ F}$$. The $$C_p$$ value for methane is assumed to be at $$\pu{77 ^\circ F}$$.

My question is: Why is $$\Delta{T} = \pu{60-77 ^\circ F}$$ and not $$\pu{77-60 ^\circ F}$$? My understanding is that it doesn’t matter as the change in temperature is an absolute value.

## EDIT 1

The following image is the particular place in the workbook where I am having difficulty understanding what is happening. How does the inlet stream have any enthalpy at all? Nothing has happened to it yet, it hasn't undergone any reaction.

• Adding a negative value is equal to subtracting a positive value. Feb 6 at 8:31
• I guess I’m asking why have it 60-77 as appears to 77-60. It matters because in one case you get an exothermic reaction and in the other way it’s endothermic. Feb 6 at 17:24
• If you want help with this, you're going to need to provide a much more complete and precise description of your system. For instance is your "inlet stream" a mixture of 50% air and 50% methane from a landfill that you are combusting? And what is the entire system whose temperature is being increased by 17F? Feb 6 at 18:14
• 50% methane, 50% CO2 for simplicity. Combustion air is obviously oxygen and nitrogen. Don’t think I need to provide a balanced combustion reaction for everyone. The temperature increases in the entire system. System consists of CO2, CH4, O2, N2. Basic combustion reaction. Feb 6 at 18:19
• Stilll doesn't make sense. If you combust a 50% air/methane mixture adiabatically, the temp increase is going to be far more than 17F. So you're not just heating up the air/methane mixture, you're heating up a bunch of stuff around it as well. That's the system to which I'm referring. Feb 6 at 18:22

I'm going to take a guess at an answer based on the OP's limited description of the set-up:

I'm going to switch terminology from my comments above. Let's let the system be the reacting mixture, and the surroundings be everything that's in thermal contact with the reacting mixture.

The way calorimetry usually works is you burn (or otherwise react) a small quantity of a substance (the system) in a large heat bath (the surroundings). You ignore the heat capacity of the system, and calculate the thermal energy released by the reaction from $$q_{p, surr} = m_{surr} C_{p, surr} \Delta T_{surr}$$. [I've added the "$$p$$" subscript to indicate you have a constant-pressure system, which is implied by the fact that you are calculating $$\Delta H$$, rather than $$\Delta U$$, from the heat flow.]

In an exothermic reaction, $$\Delta T_{surr} >0$$, and thus $$q_{p, surr} = \Delta H_{surr} > 0$$. But whatever heat flowed into the surroundings must have flowed out of the reacting mixture (the system), and thus $$q_{p, sys} = \Delta H_{sys} = -q_{p, surr}$$.

It sounds like your colleague just reversed the sign of $$\Delta T$$, changing it from positive to negative, to get the correct sign for the heat flow relative to the system (negative) from the direction of heat flow relative to the surroundings (positive).

• I just added a screenshot to my original post in an attempt to get into more of the specifics. Feb 7 at 14:19

If I had to guess, I think your colleague was trying to set $$\pu{77 ^\circ F}$$, the value $$C_p$$ was for, as the "reference state." The full equation for enthalpy at a point is: $$H - H_{ref} = mC_p(T - T_{ref})$$

At your reference point, the enthalpy is $$0$$, so in that stream, you get: $$H - 0 = mC_p(T - 77^\text{o} F)$$

This is okay to do because enthalpy is a state function, meaning that you're always focused on the change between states (by increasing or decreasing temperature/pressure/volume), not necessarily how it was done. For instance, if you wanted to get from point $$\ce{A -> B}$$ and you went $$\ce{A -> B or A -> C -> D -> B}$$, the change in enthalpy would be the same in both scenarios.

The value that you get in that cell is the enthalpy of methane relative to the reference state.

In your energy balance calculations, the reference states typically cancel out. Here's a quick example for flow in and out of a "box" (note that since this would be a steady flow through the box, the mass flow in would equal the mass flow out, so $$m_{in} = m_{out} = m$$): $$(H_{in} - H_{ref}) - (H_{out} - H_{ref}) = mC_p(T_{in} - T_{ref}) - mC_p(T_{out} - T_{ref})$$ $$H_{in} - H_{ref} - H_{ref} + H_{ref} = mC_p(T_{in} - T_{out} - T_{ref} + T_{ref})$$ $$H_{in} - H_{out} = mC_p(T_{in} - T_{out})$$

You can find more information for this by googling something like "enthalpy reference state", but I hope that clears some of it up.

Update 1 based on Edit 1 Enthalpy tells you how much energy your stream has at a specific state compared to the reference. You don't need to have a reaction or something happening in that stream to get the enthalpy. The only way it would be $$0$$ is if it was pure methane at the same reference state, $$\pu{77 ^\circ F}$$ and I'm assuming $$\pu{1 atm}$$.


text:
# Thread: Trigonometry Help

1. ## Trigonometry Help

I have done part of this question but need help finishing it off

also first time i am using the math code so excuse if i go wrong

$I={4\sin\theta}-{3\cos\theta}$
$I={R\sin(\theta-\alpha)}$

Part (a) was to find R and $\alpha$ for which i got
$R = 5$
$\alpha = 36.9$

Part (b) Hence solve the equation ${4\sin\theta}-{3\cos\theta}=3$ to find values of $\theta$ between 0 and 360

Part (c) write down greatest value for I

2. Hello, Stylis10!

$I\:=\:{4\sin\theta}-{3\cos\theta}$
$I\:=\:R\sin(\theta-\alpha)$

(a) Find $R$ and $\alpha$

I got: . $R \:= \:5,\;\;\alpha \:\approx \:36.9^o$ . . . . . Good!
(b) Hence solve the equation: . $4\sin\theta-3\cos\theta \:=\:3 \;\;\text{ for }0^o \leq \theta < 360^o$
Divide by 5: . $\frac{4}{5}\sin\theta - \frac{3}{5}\cos\theta \:=\:\frac{3}{5}$

Let $\tan\alpha \:=\:\frac{3}{4}\quad\hdots\quad\text{Then: }\:\cos\alpha \:=\:\frac{4}{5},\;\;\sin\alpha \:=\:\frac{3}{5}\:=\:0.6$

Then we have: . $\cos\alpha\sin\theta - \sin\alpha\cos\theta \:=\:\frac{3}{5}\quad\Rightarrow\quad \sin(\theta -\alpha) \:=\:0.6$

. . $\theta - \alpha \;=\;\sin^{-1}(0.6) \quad\Rightarrow\quad\theta \;=\;\sin^{-1}(0.6) + \alpha$

Since $\alpha \:=\:\sin^{-1}(0.6)$, we have: . $\theta \;=\;2\sin^{-1}(0.6)$

Since $\sin^{-1}(0,6) \:\approx\:36.9^o,\;143.1^o,\;\;\theta \;=\;73.8^o,\;286.2^o$

(c) Find the greatest value for $I.$
In part (a), we had: . $I \;=\;5\sin(\theta-36.9^o)$

The maximum value is: . $I \:=\:5$

3. thank you


text:
# How to make correct shading with hsb color model?

I want to use hsb color model to shading.

First rectangle shows a shading using rgb color model.

Second rectangle shows a shading using hsb color model. But I don't understand why I don't obtain the same shading that with my third rectangle.

\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}   % create some hsb colors   \colorlet{redhsb}[hsb]{red}%   \colorlet{bluehsb}[hsb]{blue}%   \colorlet{greenhsb}[hsb]{green}%    % first shading with rgb color model   \fill[left color=red,right color=blue] (0,1) rectangle (2,0);    % second shading with hsb color model   \fill[left color=redhsb,right color=bluehsb] (0,0) rectangle (2,-1);    % third shading with hsb color model   \fill[left color=redhsb,right color=greenhsb] (0,-1) rectangle (1,-2);   \fill[left color=greenhsb,right color=bluehsb] (1,-1) rectangle (2,-2); \end{tikzpicture} \end{document}

Edit: In fact, TikZ calculates the middle color (using color model of the left color). Then, it converts all three colors to rgb model and make shading...

% fourth shading with rgb color model \fill[left color=red,right color=green] (0,-2) rectangle ++(1,-1); \fill[left color=green,right color=blue] (1,-2) rectangle ++(1,-1);

So, my question is: Can TikZ do real hsb (HSV) shading?

Replay

The following happens when you do \fill[left color=redhsb,right color=bluehsb] (0,0) rectangle (2,-1);

• TikZ sets three internal colors:
• [email protected]@bottom=bluehsb
• [email protected]@middle=redhsb!50!bluehsb
• [email protected]@top=redhsb

The middle color is calculated by xcolor, which does the mixing in the first color model (HSB in this case).

• TikZ uses a shading declared by
\pgfdeclareverticalshading[[email protected]@top,[email protected]@middle,[email protected]@bottom]{axis}{100bp}{%
color(0bp)=([email protected]@bottom);
color(25bp)=([email protected]@bottom);
color(50bp)=([email protected]@middle);
color(75bp)=([email protected]@top);
color(100bp)=([email protected]@top)}

• pgf basically passes this through to \[email protected].
• The definition of this command depends on the output driver. For PDF it is
\def\[email protected]#1#2#3{%
{%
\[email protected]{#3}%
\pgfmathparse{#2}%
\setbox\[email protected]=\hbox to\pgfmathresult pt{\vbox to\[email protected]{\vfil\[email protected]{/Sh sh}}\hfil}%
\[email protected]{\pgfpoint{#2}{\[email protected]}}%
\pdfxform resources {%
/ColorSpace /DeviceRGB
/Domain [\[email protected]]
/Coords [0 \[email protected]\space0 \[email protected]]
/Function \[email protected]
/Extend [false false] >> >>}\[email protected]% <<
}%
}

I won't pretend to understand everything that is going on, but as far as I can tell, pgf only writes the 3 computed colors and tells the PDF-viewer to do the shading by linear interpolation. In other words, TikZ doesn't seem to do the shading calculations itself.

As you see above, the color space is set to DeviceRGB. Indeed I think that PDF doesn't support HSL (though I haven't checked to PDF documentation).

As far as I understand, the only way to get HSL interpolation is to write a PostScript shader that does the interpolation and then converts the result to RGB.

Category: tikz pgf Time: 2012-06-09 Views: 4
Tags: color tikz pgf