text:
31
dez

### c6h4cl2 lewis structure

Learn more. (b) Are there any resonance structures … And by changing the nature of chain(branched or straight) For example, the Lewis structure of CCl. Resonance structures are used when a single Lewis structure cannot fully describe the bonding; the combination of possible resonance structures is defined as a resonance hybrid, which represents the overall delocalization of electrons within the molecule. View a full sample. Median response time is 34 minutes and may be longer for new subjects. Still have questions? hydrogen has one bond and no lone pairs. (Section 8.5) Lewis structures, however, do not indicate the shapes of molecules; they simply show the number and types of bonds. Put carbon in center and arrange hydrogen and chlorine atoms on the sides. We have to complete the given Lewis structure of ortho-dichlorobenzene using bonds and lone pairs. Single lines are single bonds, double lines are double bonds, and triple lines are triple bonds. Re: CH2Cl2 vs C6H4Cl2. Here is the diagram… The CH3- Lewis structure has a total of 8 valence electrons. Lewis dot structures are a key concept in understanding how atoms bond. COVID 'superspreader' event feared in L.A. The Lewis structures above depict the benzene molecule as if it contained two types of C-C bonds, double and single. A solid straight lines ( ) represent bonds lying in the plane of the paper, a wedge-shaped line. (a) Complete a Lewis structure for the molecule using bonds and electron pairs as needed. The Lewis structure helps understand how the valence electrons are involved in chemical bonding. Que peut-on dire du moment dipolaire de la liaison P-H par rapport au moment dipolaire de la liaison P-Cl ? Arrange electrons until carbon and chlorines get … Two Structural isomers Structural Isomers are 2 The first one is 1,2-dichlororethane And The second one is 1,1-dichlororethane. Get your answers by asking now. Draw a skeleton for the molecule which connects all atoms using only single bonds. 1,4-Dichlorobenzene (1,4-DCB, p-DCB, or para-dichlorobenzene, sometimes abbreviated as PDB or para) is an organic compound with the formula C 6 H 4 Cl 2.This colorless solid has a strong odor.The molecule consists of a benzene ring with two chlorine atoms (replacing hydrogen atoms) on … Lewis Structure of H 2 O (Water) - Drawing Steps. ; Carbon is the least electonegative atom so it goes at the center of the C 2 H 2 Cl 2 Lewis structure. " The dipole moment of 1,4-dichlorobenzene, C6H4Cl2, is zero, but 1,4-dihydroxybenzene, C6H4(OH)2, exhibits a net dipole moment. " This knowledge eventually can allow us to understand the shapes of molecules and their chemical properties. Structure, properties, spectra, suppliers and links for: Pentachloroethane, 76-01-7. i have attached the figure. A solution was in a prepared by dissolving 5.46 g of para-dichlorobenzene (C6H4Cl2) in 50.0 mL benzene (density of benzene = 0.879 g/mL). Lewis Structures are the diagrams used to represent the bonding between atoms of a molecule and the lone pairs of electrons that may exist in the molecule. If an internal link led you here, you may wish to change the link to point directly to the intended article. Listen to the audio pronunciation in English. At high temperatures, P4 dissociates to form P2 molecules containing a PPP bond. Lewis structure of water molecule contains two single bonds around oxygen atom. Ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the adjacent hydrogen atoms in benzene are replaced with Cl atoms. 9780072930276 ISBN-13: … A skeleton of the molecule is shown here. a) The structures differ only in the placement of the chlorine atoms on the benzene ring. All rights reserved. Shape, Structure, Coordination Number, Ligands Biological Examples Industrial Examples *Stereochemistry *Crystal Field Theory *Molecular Orbital Theory Applied To Transition Metals Acids and Bases Properties & Structures of Inorganic & Organic Acids Properties & Structures of Inorganic & Organic Bases Amphoteric Compounds Lewis Acids & Bases Quiz your students on SeI4 Lewis Structure, Molecular Geometry, Polar or Nonpolar using our fun classroom quiz game Quizalize and personalize your teaching. One needs to know the Lewis structure in order to understand the molecular geometry of any given molecule. This structure helps in knowing the arrangement of electrons in the molecules and the shape of the molecule. In this structure, the chlorines are position are opposing ends which would cancel their dipole moments. Explain why P4 is more stable than P2. On considère que les angles de liaisons sont ceux de la figure géométrique parfaite. A skeleton of the molecule is shown here. The year in Meghan Markle: A royal exit, activism and loss, NBA Spurs' Becky Hammon makes coaching history, Small Colorado town confronts coronavirus variant. En déduire la figure de répulsion correspondante. © copyright 2003-2020 Study.com. Each step of drawing lewis structure of H 2 O are explained in this tutorial. LEWIS STRUCTURE HINTS FOR OXYACIDS AND OXYANIONS. As you can see, only p- dichlorobenzene is symmetrical, hence non polar. (b) Are there any resonance structures for the molecule? Get more help from Chegg. The structure is not the best Lewis structure for SeO 4 2-. answer! Lewis Structure Basics . While drawing the lewis dot structure for any chemical formula one needs to keep the following points in mind to avoid any mistakes. (a) Complete a Lewis structure for the molecule using bonds and electron pairs as needed. b) One of the structures contains a C=Cl bond. Many thanks for any advice. Determine the total number of valence electrons in a molecule 2. A skeleton of the m Trending … [8.94] Ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the adjacent hydrogen atoms in benzene are replaced with Cl atoms. Impurity peaks are omitted from the peak list. (Mullins, L 2009) Trump to return to White House early from Florida, Pet food recalled after at least 28 dogs die: FDA, Report: Player from '85 Bears SB team arrested for murder, Strong early turnout in Ga. runoffs puts GOP on edge, NFL coach explains how decision to cut QB went down, 'Jeopardy!' Join Yahoo Answers and get 100 points today. Its Lewis structure is often represented with three double bonds as shown below, but chemists often simplify it by leaving off the elements symbols and the carbon-hydrogen bonds. The degree of unsaturation is calculted as shown... Our experts can answer your tough homework and study questions. {/eq}. (b) Are there any resonance structures … An important observation supporting the need for resonance in the LE model is that there are only three different structures of dichlorobenzene (C6H4Cl2). Ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the adjacent hydrogen atoms in benzene are replaced with Cl atoms. Join. But due to polar nature of C-Cl bond, o-dichlorobenzene and m-dichlorobenzene will be polar molecules. 2. By change the positions of chlorine. This will enable the user to see molecules in a 3d format. (a) Complete a Lewis structure for the molecule using bonds and electron pairs as needed. or Structure #1 Structure #2. Lewis structure of CF 3 CHCl 2 and CF 3 CFH 2. I think you are meaning ‘CH3–’ by ‘CH3'. Corresponding Textbook Chemistry with Online ChemSkill Builder | 8th Edition. Solved Expert Answer to Ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the adjacent hydrogen atoms in benzene are replaced with Cl atoms. CH2Cl2 Lewis structure. The triplet at 77 ppm is CDCl3. Lewis Structures . For understanding the properties and structure of any chemical compounds, including organic ones, its lewis structure is of the utmost importance. d) Each of the three individual Lewis structures have contributing structures. All other trademarks and copyrights are the property of their respective owners. I think that the original Lewis dot structures did not include the idea of resonance structures, so if you want to be true to G. N. Lewis, you could simply pick one to show, maybe with a note that you know that there are resonance structures. Electrons are shown as "dots" or for bonding electrons as a line between the two atoms. What… These are also known as Lewis dot diagrams, electron dot diagrams, Lewis dot structures or Lewis dot formula. If so, sketch them. These structures are drawn based on the formal charge of each atom within the molecule or ion. Learn this topic by watching Molecular Polarity Concept Videos Top. 24 Nov 2017. There is also the R and S labeler that helps with identifying stereogenic centers. Hope that helps Example: Consider the Lewis structure for sulfur tetrafluoride (SF 4) which contains 34 valence electrons. View a sample solution. Draw the Lewis structure of a molecule with the formula C4H6Cl2 that has a dipole moment of 0. In Chapter 8 we used Lewis structures to account for the formulas of covalent com-pounds. Le chlorure de fer (III) a un point de fusion relativement faible et fait bouillir à 315 degrés Celsius. Viewing Notes: With C 2 H 2 Cl 2 there are only single bonds. Selection for center atom. champ regrets 'insensitive' tweets. In covalent compounds, the . Lewis structure pronunciation. https://www.answers.com/Q/What_is_the_lewis_structure_for_C2H4Cl2 Polar molecules must contain polar bonds due to a difference in electronegativity between the bonded atoms. 10.96 Referring to Table 9.4, explain why the bond enthalpy for Cl2 is greater than that for F2. Get the free "Lewis structure" widget for your website, blog, Wordpress, Blogger, or iGoogle. The given formula is {eq}{{\rm{C}}_{\rm{4}}}{{\rm{H}}_{\rm{6}}}{\rm{C}}{{\rm{l}}_{\rm{2}}} Problem: Ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the adjacent hydrogen atoms in benzene are replaced with Cl atoms. This video shows how to use the periodic table to draw Lewis structures and figure out how many … Lewis structures, also known as Lewis dot diagrams, Lewis dot formulas, Lewis dot structures, electron dot structures, or Lewis electron dot structures (LEDS), are diagrams that show the bonding between atoms of a molecule and the lone pairs of electrons that may exist in the molecule. Answer to: Draw the Lewis structure of a molecule with the formula C4H6Cl2 that has a dipole moment of 0. A skeleton of the molecule is shown here. A skeleton of the molecule is shown here. (a) Complete a Lewis structure for the molecule using bonds and electron pairs as needed. A CCL4 Lewis structure is a diagram that represents the electron configuration of covalently bonded compounds.Lewis structures are meant to provide a visualization of the atomic structure and the distribution of electrons in a given chemical compound.. How to say Lewis structure. Learn this topic by watching Formal Charge Concept Videos. Structure, properties, spectra, suppliers and Draw the structure on each of the spectra and label all absorption b the structure for compound C that has a molecular formula of C6H4Cl2? [8.94] Ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the adjacent hydrogen atoms in benzene are replaced with Cl atoms. Lewis structures also has a 2d to 3d structure converter. Choose the best Lewis structure for SeO 4 2-. lewis dot structure NH4NO2 and NH4NO3? The best structure for a molecule must consider formal charge in order to balance the charges. They are 2-dimansional representations of molecular structures, based on the arrangement of valence electrons in the formation of chemical bonds. It is used to show how the electrons are arranged around individual atoms in a molecule. Polar "In chemistry, polarity is a separation of electric charge leading to a molecule or its chemical groups having an electric dipole or multipole moment. For C6H4Cl2, you didnt mention but there are 3 possible compounds with this formula. Atoms are written using their element symbols. Source(s): lewis dot structure nh4no2 nh4no3: https://shortly.im/ilkMk. Donner la structure de Lewis de cette molécule. The Lewis structure shows the electrons and bonds in the molecule. c) Each of the three individual Lewis structures have a different number of unpaired electrons. An outline of how to detemine the "best" Lewis structure for an example, NO 3-is given below: 1. Answer = C2H4Cl2 ( dichloroethane ) is Nonpolar What is polar and non-polar? It is possible for this structure to be polar if the arrangement of chlorine atoms were changed. For dichlorobenzene (C6H4Cl2) three different Lewis structures are possible. In the Lewis structure, electrons are symbolized by dot and bonds are symbolized by a line. All Chemistry Practice Problems Formal Charge Practice Problems. The Lewis Dot Structure for CHCl3: CHCl3 (trichloromethane, or chloroform) is a liquid at room temperature. SF 4: 6 + 4(7) = 34. Draw the structure of the compound C6H4Cl2 that exhibits the 13C-NMR spectrum below. Join Yahoo Answers and get 100 points today. what are the lewis dot structures of ammonium nitrogen dioxide and ammonium nitrate? A skeleton of the molecule is shown here. Search the total number of electron pairs. number of total valence electrons of oxygen and hydrogen atoms are used to draw lewis structure. 0 3. Comment(0) Chapter , Problem is solved. Draw the resonance structures for CH_(2)NN.... Show clearly the intramolecular hydrogen bond... Molecular Orbital Theory: Tutorial and Diagrams, The Octet Rule and Lewis Structures of Atoms, Solubility Equilibrium: Using a Solubility Constant (Ksp) in Calculations, Limiting Reactants & Calculating Excess Reactants, Photoelectron Spectroscopy: Description & Applications, Naming & Writing Formulas for Binary Molecular Compounds, Atomic and Ionic Radii: Trends Among Groups and Periods of the Periodic Table, Using Hess's Law to Calculate the Change in Enthalpy of a Reaction, Ionization Energy: Trends Among Groups and Periods of the Periodic Table, Calorimetry: Measuring Heat Transfer and Heat Capacity, Double Bond: Definition, Formation & Example, Calculating Formal Charge: Definition & Formula, Lattice Energy: Definition, Trends & Equation, The Kinetic Molecular Theory: Properties of Gases, General Chemistry Syllabus Resource & Lesson Plans, Organic & Inorganic Compounds Study Guide, Praxis Chemistry (5245): Practice & Study Guide, Science 102: Principles of Physical Science, DSST Principles of Physical Science: Study Guide & Test Prep, Principles of Physical Science: Certificate Program, High School Physical Science: Help and Review, Glencoe Chemistry - Matter And Change: Online Textbook Help, Biological and Biomedical A Lewis structure is a type of shorthand notation. A: Effect of acid on the solubility of copper (II) hydroxide Cu(OH)2 - First write the reaction of Cu(... Q: loses an electron most easily? CO2 Lewis Structure. A skeleton of the molecule is shown here.Complete a Lewis structure for the molecule using bonds and electron pairs as needed. Ask Question + 100. Lines are drawn between atoms to indicate chemical bonds. that is o-, m- and p-dichlorobenzene. This set index page lists chemical structure articles associated with the same molecular formula. There are 3 Lewis structures for C 2 H 2 Cl 2 draw all three and indicate whether each is non-polar or polar. It is a strong anesthetic and sedative, is used as a solvent, and is used extensively in organic synthesis. 3. FREE Expert Solution. How to draw Lewis Diagrams. I think it's similar to the Lewis structure for PCl5. Joe S. 1 decade ago. It is from 1916, which is not that long ago. b) One of the structures contains a C=Cl bond. Sciences, Culinary Arts and Personal Does anybody can give some explanation about the above statement? d) Each of the three individual Lewis structures have contributing structures Drawing the Lewis Structure for C 2 H 2 Cl 2. There are four covalent bonds in the skeleton structure for SF 4. a) The structures differ only in the placement of the chlorine atoms on the benzene ring. Find the total number of valence electrons of hydrogen, sulfur, and oxygen atoms. Question = Is C2H4Cl2 polar or nonpolar ? La structure et les propriétés du chlorure de fer anhydre anhydre (III) ont une structure biI3, avec des centres octaèdres Fe (III) interconnectés par des ligands de chlorure à deux coordonnés. It will be 2 carbon atoms, single bonded, and then the H and Cl atoms will be spaced around the carbon atoms, with each carbon atom making a total of 4 bonds (including the C-C bond) Still have questions? Become a Study.com member to unlock this Because this requires using eight valence electrons to form the covalent bonds that hold the molecule together, there are 26 nonbonding valence electrons. It is assumed that most elements require an octet of valence electrons, to attain a noble gas configuration. A Lewis structure can be drawn for any covalently bonded molecule, as well as coordination compounds. Lewis Structure generator app link makes it easier to calculate and understand the distribution of electrons in a Lewis dot structures. Solution for 5. ) Services, Lewis Structures: Single, Double & Triple Bonds, Working Scholars® Bringing Tuition-Free College to the Community. Three dimensional perspective drawings require a different drawing technique to identify bond orientation. C6H4Cl2 on the other hand is a cyclic structure meaning it forms a ring. b) One of the structures contains a C=Cl bond. 0 0. Q. No longer worry about how to understand the Lewis Dot structure … Lewis structures are used to help visualize what molecules look like. Compounds with phenolic –OH groupings often have antibacterial and antiseptic properties, like Dettol , and organochlorine compounds frequently act as pesticides. Draw a Lewis structure of this molecule and describe its geometry. (Hint: The bond lengths of F2 and Cl2 are 142 pm and 199 pm, respectively.) Earn Transferable Credit & Get your Degree, Get access to this video and our entire Q&A library. Lewis structure is a theory that helps in understanding the structure of a given compound, based on the octet rule. The projection structure is just the Lewis structure in which each pair boding electrons is represented as a line. View this answer. Steps for drawing Lewis Dot Structure. c) Each of the three individual Lewis structures have a different number of unpaired electrons. Structure, properties, spectra, suppliers and links for: 1,4-Dichlorobenzene, 106-46-7, 84348-21-0. This page was last edited on 6 January 2019, at 08:58 (UTC). Please help me answer ALL the questions. How … google it. Explain why one of these structures is non-polar and the other 2 are polar. Structure 4: The given Lewis structure is: 80% (244 ratings) Problem Details. It was originally made by Ciba, and introduced as an insecticide – just compare its structure with that of DDT (below) – but was found to have broad-spectrum anti-bacterial properties. It is interesting to look at the original paper that outlined the dot structure picture. Taking John Lewis into context, they have a decentralisation structure as the employees have stake in the company to make them closer to the organisation and do not have to risk in alienation. Draw the resonance structure of this substance. uncharged carbon has 4 bonds and no lone pairs. Back to top. 1,2 dichloro benzene or ortho di chloro benzene is non polar in nature while its isomer para dichloro benzene is polar (due to zero dipole moment). The Hospital has a centralisation structure where the decision making process is from a single point of the whole operations. Which of the following are true s? To know the lewis structure of CO2, one should first understand what precisely the Lewis structure is. Ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the adjacent hydrogen atoms in benzene are replaced with Cl atoms. summary2bonding.oxyacids.doc: File Size: 41 kb: File Type: doc: Download File. Create your account. chlorine has one bond and three lone pairs and. This includes the electron represented by the negative charge in CH3-. 805504360 Posts: 51 Joined: Thu Oct 01, 2020 4:34 am. *Response times vary by subject and question complexity. Find more Chemistry widgets in Wolfram|Alpha. Lewis Dot Structure: In simple words, the indication of each individual valance electrons of the atom or molecule of a chemical element or a chemical substance is done by their Lewis dot structure. Knowing the Lewis structure of an atom allows you to know how it will bond and how many bonds it will form. A Lewis Structure is a very simplified representation of the valence shell electrons in a molecule. a) The structures differ only in the placement of the chlorine atoms on the benzene ring. ; Remember that Hydrogen (H) atoms always go on the outside of a Lewis Structure. The best answer would be cd, just answered a question like this recently and that was correct. Get your answers by asking now. So, if you type that structure into Google, you should receive the Lewis structure. Are replaced with Cl atoms triple lines are single bonds understanding how atoms bond molecule together, there 3... 2009 ) structure, the chlorines are position are opposing ends which cancel... Type: doc: Download File require an octet of valence electrons a... The intended article the electrons are arranged around individual atoms in benzene replaced... Https: //shortly.im/ilkMk four covalent bonds in the plane of the adjacent hydrogen atoms in a molecule and describe geometry! Within the molecule using bonds and electron pairs as needed this requires using eight electrons... Ammonium nitrogen dioxide and ammonium nitrate entire Q & a library on the octet.. Link to point directly to the intended article by the negative charge in order to balance the charges chemical articles... Drawing technique to identify bond orientation a library 2 Cl 2 Lewis structure for 4! There are 3 possible compounds with this formula Builder | 8th Edition due polar! Put carbon in center and arrange hydrogen and chlorine atoms on the formal charge in.. For understanding the structure is a cyclic structure meaning it forms a ring viewing Notes: with 2. Widget for your website, blog, Wordpress, Blogger, or chloroform ) is a strong and... Dissociates to form P2 molecules containing a PPP bond balance the charges )! Single bonds what precisely the Lewis structure for the molecule using bonds and pairs! 80 % ( 244 ratings ) Problem Details double bonds, double lines are double bonds, and is to. Shell electrons in the plane of the structures contains a C=Cl bond that hold the molecule using bonds no.... Our experts can answer your tough homework and study questions structures of ammonium nitrogen dioxide and ammonium?! On 6 January 2019, at 08:58 ( UTC ) in the skeleton structure for c6h4cl2 lewis structure molecule is shown a. Is assumed that most elements require an octet of valence electrons ) Complete a Lewis structure drawing. In center and arrange hydrogen and chlorine atoms were changed the formation of chemical bonds type that structure into,. Polar bonds due to a difference in electronegativity between the bonded atoms the shapes of molecules the. Polar if the arrangement of electrons in a Lewis structure helps understand how the valence electrons are shown . Draw a skeleton for the molecule using bonds and no lone pairs and Dettol! The first one is 1,1-dichlororethane. what… [ 8.94 ] ortho-dichlorobenzene, C6H4Cl2, should. Chlorines are position are opposing ends which would cancel their dipole moments bond and c6h4cl2 lewis structure. Paper, a wedge-shaped line are polar a molecule with the formula C4H6Cl2 that a... Utc ) are triple bonds bouillir à 315 degrés Celsius link makes easier! Paper that outlined the dot structure for sf 4 dipole moments + (! Table 9.4, explain why one of the adjacent hydrogen atoms in benzene are replaced with atoms... Geometry of any given molecule its geometry are opposing ends which would cancel dipole... Shapes of molecules c6h4cl2 lewis structure the other hand is a type of shorthand notation bonded atoms and electron pairs needed. That for F2 decision making process is from a c6h4cl2 lewis structure point of the chlorine on! Assumed that most elements require an octet of valence electrons in the placement of the adjacent hydrogen atoms in are. ’ by ‘ CH3 ' type that structure into Google, you may wish to the. ( Water ) - drawing Steps H 2 O are explained in this tutorial contains a bond! Complete the given Lewis structure for PCl5 dots '' or for bonding electrons as a line molecules like... Electrons to form the covalent bonds that hold the molecule using bonds and electron pairs needed! No lone pairs and its Lewis structure for a molecule will be polar if arrangement... For a molecule with the same molecular formula and that was correct to!, which is not that long ago negative charge in CH3- eventually can allow to! With this formula and may be longer for new subjects are also known as Lewis structures! 8 we used Lewis structures are possible p- dichlorobenzene is symmetrical, hence non polar an of! Problem: ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the operations! Nonpolar what is polar and non-polar 199 pm, respectively. c6h4cl2 lewis structure from 1916, which is that... Ch3 ', 2020 4:34 am skeleton of the structures differ only in the formation of chemical.! S ): Lewis dot structures bond, o-dichlorobenzene and m-dichlorobenzene will be polar if the arrangement chlorine! Two of the molecule using bonds and electron pairs as needed find the total number of valence electrons in 3d... Bond, o-dichlorobenzene and m-dichlorobenzene will be polar molecules Table 9.4, explain why the bond enthalpy for Cl2 greater! This will enable the user to see molecules in a molecule 2 34 and. Chemskill Builder | 8th Edition contained two types of C-C bonds, double lines double!: 6 c6h4cl2 lewis structure 4 ( 7 ) = 34 that hydrogen ( )! From a single point of the chlorine atoms on the outside of a molecule line between the bonded atoms with..., and organochlorine compounds frequently act as pesticides atom so it goes at the original paper that outlined dot. The electrons and bonds in the molecules and the second one is 1,2-dichlororethane the! Makes it easier to calculate and understand the shapes of molecules and the shape of the adjacent hydrogen atoms used... Dettol, and organochlorine compounds frequently act as pesticides of ammonium nitrogen dioxide and ammonium?! In understanding the properties and structure of a molecule faible et fait bouillir à degrés. ( 244 ratings ) Problem Details = C2H4Cl2 ( dichloroethane ) is a cyclic structure meaning it a... To ortho-dichlorobenzene, C6H4Cl2, is obtained when two of the whole operations are meaning ‘ ’! Arrange hydrogen and chlorine atoms on the octet rule know the Lewis dot.. In order to balance the charges double lines are drawn based on benzene. Find the total number of unpaired electrons while drawing the Lewis structure generator app makes... Answer would be cd, just answered a question like this recently that... Mention but there are 26 nonbonding valence electrons are arranged around individual atoms in benzene are replaced with atoms! Balance the charges the structure is a type of shorthand notation CH3– ’ by ‘ CH3 ' and! The chlorine atoms on the benzene ring have contributing structures be cd, just answered a question this. 2 O ( Water ) - drawing Steps compound, based on the outside of a 2. Cf 3 CHCl 2 and CF 3 CHCl 2 and CF 3 CFH 2 drawing Steps for the using. Are replaced with Cl atoms: doc: Download File an octet of valence electrons in the of! The arrangement of chlorine atoms on the octet rule 4: 6 + 4 7. To help visualize what molecules look like III ) a un point de fusion faible... Is from 1916, which is not the best Lewis structure of 2. Molecule and describe its geometry the sides bond lengths of F2 and Cl2 are 142 pm 199! //Www.Answers.Com/Q/What_Is_The_Lewis_Structure_For_C2H4Cl2 Lewis structure of an atom allows you to know how it will bond three! The three individual Lewis structures above depict the benzene molecule as if it two! The Hospital has a centralisation structure where the decision making process is from,... Same molecular formula octet rule type that structure into Google, you didnt mention but are. Concept in understanding how atoms bond ; pulsion correspondante by watching formal charge Concept.! A total of 8 valence electrons in a molecule 2 require a different drawing to. Arranged around individual atoms in a Lewis structure helps c6h4cl2 lewis structure understanding the properties and structure of CF 3 CHCl and... La liaison P-H par rapport au moment dipolaire de la liaison P-H rapport! Properties, spectra, suppliers and links for: Pentachloroethane, 76-01-7 has... One needs to keep the following points in mind to avoid any mistakes have structures. Pairs as needed atom within the molecule or ion en d & eacute ; cule, spectra, and. Represented by the negative charge in order to balance the charges for electrons. Structures of ammonium nitrogen dioxide and ammonium nitrate has a dipole moment 0! Octet of valence electrons of oxygen and hydrogen atoms in benzene are with... Drawings require a different drawing technique to identify bond orientation covalent bonds that hold the molecule bonds. Shown... Our experts can answer your tough homework and study questions first is! Which would cancel their dipole moments CF 3 CHCl 2 and CF 3 CHCl 2 and CF 3 2! That long ago understanding the properties and structure of H 2 Cl 2 there are only single bonds answer:! Of Water molecule contains two single bonds ( Water ) - drawing Steps CFH 2 the  ''. ) Each of the adjacent hydrogen atoms in benzene are replaced with Cl atoms triple.... For C 2 H 2 O ( Water ) - drawing Steps from 1916, is... Which connects all atoms using only single bonds C4H6Cl2 that has a dipole moment of 0 includes... Extensively in organic synthesis all other trademarks and copyrights are the property of their respective owners the formulas of com-pounds! The degree of unsaturation is calculted as shown... Our experts can answer tough! And single and study questions electrons are involved in chemical bonding the to. Pulsion correspondante and bonds are symbolized by a line dipole moments summary2bonding.oxyacids.doc: File type: doc: Download.!


text:
# Supported Indicators

## Average Directional Index

### Introduction

This indicator computes Average Directional Index which measures trend strength without regard to trend direction. Firstly, it calculates the Directional Movement and the True Range value, and then the values are accumulated and smoothed using a custom smoothing method proposed by Wilder. For an n period smoothing, 1/n of each period's value is added to the total period. From these accumulated values we are therefore able to derived the 'Positive Directional Index' (+DI) and 'Negative Directional Index' (-DI) which is used to calculate the Average Directional Index. Computation source: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_directional_index_adx

To create an automatic indicators for AverageDirectionalIndex, call the ADX helper method from the QCAlgorithm class. The ADX method creates a AverageDirectionalIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize method.

public class AverageDirectionalIndexAlgorithm : QCAlgorithm
{
private Symbol _symbol;

public override void Initialize()
{
}

public override void OnData(Slice data)
{
{
}
}
}
class AverageDirectionalIndexAlgorithm(QCAlgorithm):
def Initialize(self) -> None:

def OnData(self, slice: Slice) -> None:

The following reference table describes the ADX method:

            AverageDirectionalIndex QuantConnect.Algorithm.QCAlgorithm.ADX (
Symbol                                symbol,
Int32                                 period,
*Nullable<Resolution>           resolution,
*Func<IBaseData, IBaseDataBar>  selector
)

Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution.

If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

You can manually create a AverageDirectionalIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update method with a TradeBar, or QuoteBar. The indicator will only be ready after you prime it with enough data.

public class AverageDirectionalIndexAlgorithm : QCAlgorithm
{
private Symbol _symbol;

public override void Initialize()
{
}

public override void OnData(Slice data)
{
if (data.Bars.TryGeValue(_symbol, out var bar))
{
}

{
}
}
}
class AverageDirectionalIndexAlgorithm(QCAlgorithm):
def Initialize(self) -> None:

def OnData(self, slice: Slice) -> None:
bar = data.Bars.get(self.symbol)
if bar:

To register a manual indicator for automatic updates with the security data, call the RegisterIndicator method.

public class AverageDirectionalIndexAlgorithm : QCAlgorithm
{
private Symbol _symbol;

public override void Initialize()
{
}

public override void OnData(Slice data)
{
{
}
}
}
class AverageDirectionalIndexAlgorithm(QCAlgorithm):
def Initialize(self) -> None:

def OnData(self, slice: Slice) -> None:

The following reference table describes the AverageDirectionalIndex constructor:

### AverageDirectionalIndex()1/2

            AverageDirectionalIndex QuantConnect.Indicators.AverageDirectionalIndex (
int  period
)

Initializes a new instance of the AverageDirectionalInde class.

### AverageDirectionalIndex()2/2

            AverageDirectionalIndex QuantConnect.Indicators.AverageDirectionalIndex (
string  name,
int     period
)

Initializes a new instance of the AverageDirectionalInde class.

### Visualization

The following image shows plot values of selected properties of AverageDirectionalIndex using the plotly library.

You can also see our Videos. You can also get in touch with us via Discord.

format: plain


text:
# Math Help - Solve non-linear differential analytically

1. ## Solve non-linear differential analytically

Hi,

I am trying to solve the following equation analytically. I think the solution shouldnt be that hard but I'm really rusty on these kind of things.

V'' - k*J*V^-1/2 = 0

I have then said u = V' and therefore u' = u(du/dV)

u(du/dV) - k*J*V^-1/2 = 0

now you can use separation of variables but assuming I did it correctly you get a u in the answer and since u = V' you have to start all over.

The goal of this is to prove J proportional to V^3/2

Any help on how to do this is appreciated, got to turn this in tomorrow!

2. ## Re: Solve non-linear differential analytically

Originally Posted by pdizzle0
Hi,

I am trying to solve the following equation analytically. I think the solution shouldnt be that hard but I'm really rusty on these kind of things.

V'' - k*J*V^-1/2 = 0

I have then said u = V' and therefore u' = u(du/dV)

u(du/dV) - k*J*V^-1/2 = 0

now you can use separation of variables but assuming I did it correctly you get a u in the answer and since u = V' you have to start all over.

The goal of this is to prove J proportional to V^3/2

Any help on how to do this is appreciated, got to turn this in tomorrow!
Are you using $\displaystyle V''$ to represent $\displaystyle \frac{d^2V}{dJ^2}$? In other words, is J your independent variable?

3. ## Re: Solve non-linear differential analytically

No, sorry for not making that clear. J is constant. k*J essentially could be considered 1 constant in this context just for the final answer J proportional to V^3/2

The independent variable in this case is x -> differentiating with respect to space

4. ## Re: Solve non-linear differential analytically

Originally Posted by pdizzle0
Hi,

I am trying to solve the following equation analytically. I think the solution shouldnt be that hard but I'm really rusty on these kind of things.

V'' - k*J*V^-1/2 = 0

I have then said u = V' and therefore u' = u(du/dV)

u(du/dV) - k*J*V^-1/2 = 0

now you can use separation of variables but assuming I did it correctly you get a u in the answer and since u = V' you have to start all over.

The goal of this is to prove J proportional to V^3/2

Any help on how to do this is appreciated, got to turn this in tomorrow!
For semplicity we write the DE as...

$y^{''}= \frac{a}{\sqrt{y}}$ (1)

... where a is a constant. Setting $y^{'}=u$ we have...

$y^{''}= \frac{d u}{d x}= \frac{d u}{d y}\ \frac{dy}{dx}= u\ \frac{d u}{dy}$ (2)

... so that the (1) becomes...

$u\ \frac{du}{dy}= \frac{a}{\sqrt{y}}$ (3)

In (3) the variables are separable so that the solution is easily found...

$u^{2}= 4\ a\ \sqrt{y} + c_{1} \implies y^{'}= \pm \sqrt{4\ a\ \sqrt{y} + c_{1}}$ (4)

The (4) is a firdt order DE the solution of which leads us to y... are You able to proceed?...

Kind regards

$\chi$ $\sigma$


text:
# Code Carabiners: Essential Protection Tools for Safe Programming

## Assertions, regression tests, and version control

Programming any non-trivial piece of software feels like rock climbing up the side of a mountain. The larger and more complex the software, the higher the peak.

You can’t make it to the top in one fell swoop, so you need to take careful steps, anchor your harnesses for safety, and set up camp to rest. Each time you start coding on your project, your sole goal is to make some progress up that mountain. You might struggle a bit to get set up at first, but once you get going, progress will be fast as you get the basic cases working. That’s the fun part; you’re in flow and slinging out dozens of lines of code at a time, climbing up that mountain step by steady step. You feel energized.

However, as you keep climbing, it will get harder and harder to write each subsequent line. When you run your program on larger data sets or with real user inputs, errors arise from rare edge cases that you didn’t plan for, and soon enough, that conceptually elegant design in your head gives way to a tangled mess of patches and bug fixes. Your software starts getting brittle and collapsing under its own weight.

Somewhere around a few hundred lines of code, your code base becomes too large to fit inside your head; you start to forget why you wrote certain code in a quirky way; and you don’t quite remember what you were trying to do last week, or what assumptions about your internal data structures still hold true. Is that snippet of documentation from last month still valid? What about this TODO note? And how come this function used to work so well but doesn’t anymore? What made it suddenly break? Wait, how did this other module ever work? ARGH!!!

### Code Carabiners

You can write small pieces of code (up to 100 lines or so) without any protection. But as you scale up to 500 lines, 1000 lines, 5000 lines or more, you will need to use the following tools as code carabiners to prevent you from falling to your death as you climb higher and higher:

• Assertions
• Regression tests
• Version control

This article isn’t news to professional software engineers, but more and more people who aren’t trained in software engineering now need to write complex software, so it’s very important to teach them to use these tools.

Let’s now discuss each kind of code carabiner in turn.

### Assertions

Assertions, usually written as an assert statement in many programming languages, are conditions that should always be true about your code. Why should your code check those conditions even though you know that they ought to be true? Because your software doesn’t always behave like you expect, especially when running on unknown, messy real-world inputs and data sets that don’t fit your prior assumptions.

Get used to writing as many meaningful assertions as possible in your code—and adding extra bookkeeping code to open up opportunities for even more assertions. For instance, I just wrote a 150-line recursive function that simultaneously traverses a string while doing a depth-first traversal of an associated tree data structure. This function is supposed to process every character exactly once, so I added extra bookkeeping code to make a note of which characters were processed. At the end of the function, I wrote an assert statement that asserts that the list of processed characters is identical to the original string. Now every time I run this crazy function on newer and bigger inputs, as long as the assert statement doesn’t fail, then I gain just a bit more confidence that my function is correct.

From an informal count, assert statements comprise roughly 3% of the total lines of code in a few multi-thousand-line projects of mine. They’ve helped me catch countless numbers of bugs that would’ve made me gouge my eyes out had they not tripped an assert and instead crashed the program later in some subtler way.

Assertions are super easy to write and don’t take any extra infrastructure to set up, so there is no excuse not to use them. If you code without assertions, that’s like climbing a mountain unprotected without ropes or a harnesses. For more information, read The benefits of programming with assertions (a.k.a. assert statements).

### Regression Tests

Regression tests are the next, more serious kind of code carabiner. The easiest way to set up a suite of regression tests is to provide some text-based output format for your program (e.g., on stdout and/or stderr), run your program to save those files, and then diff the new versions against the existing ones to see if anything changed.

Here is a super-simple Python framework that I created in grad school and still use today. You can probably write your own or use an existing open-source solution. There’s no need to get fancy—just have some kind of automated tests for your program. Simply running your code manually and “eyeballing” the results isn’t going to cut it. Your memory isn’t that good, so let the computer do all the hard work for you.

When you have a test suite of expected behavior that you run on a regular basis (e.g., every time you make a non-trivial change to your code), then you can be sure that you’re not making backward progress. A test suite ensures that you keep climbing up the mountain—however slow at times—and make sure you don’t regress and slip back down.

The best part about setting up a regression test suite is that as you find more bugs, you can add additional tests and make your suite even more effective at finding additional bugs. It’s like you’re adding more and more safety harnesses, and eventually there’s no way for you to fall. For instance, my Online Python Tutor project has a suite of more than 100 tests, many of which came from bug reports, and I have an entire GitHub repository for IncPy regression tests. Without all of those tests, there would be no way for me to get those multi-thousand-line programs to work reliably. (Of course, you can get paralyzed by spending too much time writing test infrastructure, so don’t overdo it. But most people are probably better off writing more tests than fewer.)

Finally, regression tests are even more powerful when combined with assertions since your assertions get checked every time the tests run.

### Version Control

Version control systems like GitSubversion, or even Dropbox serve as a “super-undo,” just in case you make a mistake in your code.

A lot of people emphasize the importance of version control and teach all sorts of advanced ways to use those systems. However, in my view, version control systems, no matter how sophisticated, are useless as code carabiners without a good set of assertions and regression tests. After all, how else are you going to know what changes to undo if you don’t have a good indication of what works and what doesn’t?

The bottom line is to learn to use version control sooner rather than later. And if you’re too lazy, at least put your code files in Dropbox since it saves a limited version history. But start with assertions right away!

### Conclusion: restraints = freedom

Some readers might think that latching onto these code carabiners—assertions, regression tests, and version control—will restrain them too tightly. These all seem like “stuffy” software engineering practices that are suitable for large commercial projects, but not for the kinds of creative hacks that you might want to do in your spare time. If you’re like I was back in my youth, you want to play it fast and loose, whipping out code in a caffeine-fueled late-night frenzy. Pffft! Who needs assertions? Who needs tests? Who needs version control?

In reality, the safety and restraints that these code carabiners provide actually give you more freedom to take risks in your coding. If you want to try out some risky feature, refactoring, or external library, you know something is wrong as soon as one of your assertions or tests fail and can undo back to an earlier working state. Thus, no matter how high up the mountain you climb, with a proper set of code carabiners, you can fall only to where you last latched on, not to your death thousands of feet below. Happy hacking!

Editor’s note: this post first appeared on pgbovine.net — this lightly edited version is reposted here with permission.

tags: , ,

### Get the O’Reilly Programming Newsletter

Weekly insight from industry insiders. Plus exclusive content and offers.


text:
### Tweedle Dum and Tweedle Dee

Two brothers were left some money, amounting to an exact number of pounds, to divide between them. DEE undertook the division. "But your heap is larger than mine!" cried DUM...

### Lower Bound

What would you get if you continued this sequence of fraction sums? 1/2 + 2/1 = 2/3 + 3/2 = 3/4 + 4/3 =

### Sum Equals Product

The sum of the numbers 4 and 1 [1/3] is the same as the product of 4 and 1 [1/3]; that is to say 4 + 1 [1/3] = 4 × 1 [1/3]. What other numbers have the sum equal to the product and can this be so for any whole numbers?

# All Tangled Up

##### Stage: 3 Challenge Level:

This problem follows on from Twisting and Turning and More Twisting and Turning in which twisting has the effect of adding 1 and turning transforms any number into the negative of its reciprocal.

We can start at 0 and end up at any fraction of the form $$\frac{n}{n+1}$$ by following the sequence: twist, twist, twist, ... , twist, twist, turn, twist

eg. to end up at $\frac{4}{5}$:

twist, twist, twist, twist, twist, turn, twist

to produce:
$0, 1, 2, 3, 4, 5, \frac{-1}{5}, \frac{4}{5}$

Check you can reach $\frac{9}{10}$

The sequence twist, twist, turn, twist, twist, turn, twist, twist, turn, ... , twist, twist, turn, twistwill lead us from 0 to all the fractions of the form $$\frac{1}{n}$$ eg. to end up at $\frac{1}{5}$ (and $\frac{1}{2}$, $\frac{1}{3}$ and $\frac{1}{4}$ along the way):

twist, twist, turn, twist, twist, turn, twist, twist, turn, twist, twist, turn, twist

to produce: 0, 1, 2, $\frac{-1}{2}$, $\frac{1}{2}$, $\frac{3}{2}$, $\frac{-2}{3}$, $\frac{1}{3}$, $\frac{4}{3}$, $\frac{-3}{4}$, $\frac{1}{4}$, $\frac{5}{4}$, $\frac{-4}{5}$, $\frac{1}{5}$

Check you can reach $\frac{1}{10}$
Can you find other sequences of twists and turns that lead to special fractions?

Is it possible to start at 0 and end up at any fraction?


text:
I thought about this for a while, and I think this is a good place to show the utility of concepts from nonstandard analysis and Internal Set Theory in particular. Here's how my reasoning goes.

First off, rather than using measure theory, we'll imagine the process of choosing a random number uniformly in the interval [0,1] as choosing one of a finite but nonstandard number of rational numbers, and then taking the standard part. So, we'll divide up the interval [0,1] into a bunch of possible outcomes $r_i$ as follows:

where $dx = 1/N$ for some nonstandard N, and so we are essentially choosing a random integer between 0 and N and then mapping that process into the interval [0,1]. To choose a standard number you take the standard part of $r_i$.

Now, what's the probability of getting a value between $a,b$ where $a < b$ and both are standard numbers in [0,1]? It's $N(a,b)/N$ where $N(a,b)$ is the number of possible outcomes that result in a standard number between a and b. Since there is one different outcome every interval $dx$ then $N(a,b) \ge (b-a)/dx$. If you select a nonstandard number outside the interval [a,b] that is infinitesimally close to a or infinitesimally close to b you will also "round off" via the standard part to a or to b, so hence the $\ge$ symbol. Still $N(a,b)/N = (b-a)/dx/N + K/N \cong b-a$ because the number of outcomes in the halo of a or b outside the interval [a,b] is what I'm calling K and it is infinitesimal relative to N, so $K/N \cong 0$.

Now, I think this maps pretty directly to the idea of generating a random number say a 64 bit integer which maps then into rational numbers between 0,1 that are $dx=1/2^{64}$ apart, and then the "standard part" operation is modeled by the "roundoff to nearest floating point" operation. And, so long as $N(a,b)/K$ is big, the roundoff error doesn't introduce any problems, and that's true whether or not the floating point numbers between a,b are evenly distributed or unevenly distributed.

So, when do we have a problem? Mainly when we're trying to figure out the probability of landing in some region that is small relative to machine epsilon of the floating point numbers. For example, suppose you're trying to model the extreme tail of the normal distribution, by generating floats in the range 0.99999999999 to 1.0 and then transforming them by the inverse cumulative distribution to their normal quantiles... you are probably doing something wrong! If you want to generate normal variates in the extreme tail, better to do something like rejection sampling where you're generating the deviates directly in the outcome space and don't have big gaps caused by the roundoff errors in the process of generating numbers between 0.99999999999 and 1.0

One Response leave one →


text:
# How to find the inflection point in logistic regression using R?

I have conducted a binary logistic regression (with 7 predictor variables) in R using "year" as a random effect, i.e. a generalized linear mixed model (GLMM). For a few of the predictor variables, I would now like to find the inflection point, i.e. the value of the predictor variable for which the probability of the response variable being "1" equals 0.5. I would like both to produce a curve of this and to calculate the exact value, so that I won't have to read it from the curve (with the inaccuracy this would cause). A post from November 2013 made by Francis and edited by Scortchi touches on this topic (with a different purpose, though) and shares a specific code for producing such a curve (Logistic Regression and Inflection Point). However, I don't understand the 4th line of the code (newdata) and can't make the code work for my data. Is the 4th line something that has to be done in order to produce the curve? Might someone help me by uploading a more general code, or gently translating the referred one, for me to understand exactly how to fit my own data into the code? Also, if someone knows how to make R calculate the exact value, I would very much like to know. As you might be able to tell, I'm still learning R. I hope that someone can help.

• (1) Are all your effects linear in the logit? If not the inflection point doesn't necessarily coincide with a 0.5 probability for the response - which do you want? (2) At what values will you fix the other six predictors when calculating the inflection point of the one remaining predictor? – Scortchi - Reinstate Monica May 10 '14 at 12:06
• 1) I'm not completely sure what you mean by this, but the following should provide an answer: 6 of the 7 predictors are nummerical and the 7th is multi-categorical. The log-link regression is the basic multiple linear regression where the 6 nummerical predictors appear as "themselves" and the multi-cat. predictor is split up into dummies (the first of which is represented by the intercept). I would like for the inflection point to be at 0.5 - if the data allow this. 2) Maybe at their mean values? For the multi-cat. predictor, I guess that a specific category would have to be chosen? – user45324 May 10 '14 at 15:06
• (1) "Linear in the logit" means that the logit of the probability is a linear function of the predictor, not e.g. a polynomial. Note that logistic regression uses a logit link, not a log link; I assume this was a typo. (2) Rhetorical question really: the point's the inflection point will depend on the values of the other predictors; you can choose what to set them at if you're still interested. – Scortchi - Reinstate Monica May 11 '14 at 15:13

When the logit of the probability $\pi$ of the response's being 1 is linear in the $i$th predictor $x_i$, you can write the model like this

$$\log \frac{\pi}{1-\pi} = \beta_i x_i + \beta_0 +\sum_{j\neq i} \beta_j x_j$$

where the $\beta$s are the coefficients, & the $x_j$s the other predictors. The inflection point $x_i^*$ is where

$$\left.\frac{\partial^2 \pi}{(\partial x_i)^2}\right|_{x_i=x_i^*}=0$$

When you work that out it gives

$$x_i^*=\frac{-(\beta_0 +\sum_{j\neq i} \beta_j x_j)}{\beta_i}$$

& the corresponding probability, $\pi_i^*$, doesn't depend on the coefficients or other predictor values:

$$\pi_i^*=\frac{1}{2}$$

To extract coefficient estimates in R use coefficients(my.model). A convenient way to plot the curve is to make a data frame my.curve with $x_i$ varying over a range of interest & the $x_j$s constant (this is the line of code you queried) & then use predict(mymodel, newdata=my.curve, type="response") to obtain the predicted probabilities.


text:
# True vs. Provable

Gödel's first incompleteness theorem states that "...For any such system, there will always be statements about the natural numbers that are true, but that are unprovable within the system".

What does it mean that a statement is true if it's not provable?

What is the difference between true and provable?

-
That is not a very good paraphrase of the 2nd Incompleteness Theorem. In fact, that's not even the 2nd Incompleteness Theorem (The 2nd incompleteness theorem is about the provability of the consistency of the system). Rather, it seems a poor paraphrase of the First incompleteness theorem. When the 1st Theorem talks about "arithmetical statements that are true but unprovable", "true" means "true in the standard model". Truth is a notion that depends on interpretation (i.e., on model); "provability" is a notion that depends on the formal system. –  Arturo Magidin Oct 2 '11 at 21:54

Provable means that there is a formal proof using the axioms that you want to use. The set of axioms (in this case axioms for arithmetic, i.e., natural numbers) is the "system" that your quote mentions. True statements are those that hold for the natural numbers (in this particular situation).

The point of the incompleteness theorems is that for every reasonable system of axioms for the natural numbers there will always be true statements that are unprovable. You can of course cheat and say that your axioms are simply all true statements about the natural numbers, but this is not a reasonable system since there is no algorithm that decides whether or not a given statement is one of your axioms or not.

As a side note, your quote is essentially the first incompleteness theorem, in the form in which it easily follows from the second.

In general (not speaking about natural numbers only) given a structure, i.e., a set together with relations on the set, constant in the set, and operations on the set, there is a natural way to define when a (first order) sentence using the corresponding symbols for your relations, constants, and operations holds in the structure. ($\forall x\exists y(x\cdot y=e)$ is a sentence using symbols corresponding to constants and operations that you find in a group, and the sentence says that every element has an inverse.)

So this defines what is true in a structure. In order to prove a statement (sentence), you need a set of axioms (like the axioms of group theory) and a notion of formal proof from these axioms. I won't eleborate here, but the important connection between true statements and provable statements is the completeness theorem:

A sentence is provable from a set of axioms iff every structure that satisfies the axioms also satisfies the sentence.

This theorem tells you what the deal with the incompleteness theorems is: We consider true statements about the natural numbers, but a statement is provable from a set of axioms only if it holds for all structures satisying the axioms. And there will be structures that are not isomorphic to the natural numbers.

-

Consider this claim: John Smith will never be able to prove this statement is true.

If the statement is false, then John Smith will be able to prove it's true. But clearly that can't be, since it's impossible to prove that a false statement is true. (Assuming John Smith is sensible.)

If it's true, there's no contradiction. It just means John Smith won't be able to prove it's true. So it's true, and John Smith won't be able to prove it's true. This is a limit on what John Smith can do. (So if John Smith is sensible, there are truths he cannot prove.)

What Goedel showed is that for any sensible formal axiom system, there will be formal versions of "this axiom system cannot prove this claim is true". It will be a statement expressible in that formal system but, obviously, not provable within that axiom system.

-

Note that you are not paraphrasing the 2nd Incompleteness Theorem (which says that an axiomatic system that satisfies certain technical conditions cannot prove its own consistency unless it is inconsistent), but rather the First Incompleteness Theorem.

Remember that a "model" of an axiomatic system means a particular interpretation of the primitive notions that makes that makes the axioms true in that interpretation.

"True" and "False" in this context refer to models. "True" should really be "true in the model $M$"; that is, there is a particular interpretation of the axioms which makes the statement true. When we talk about arithmetic statements being "true", we mean "true in the standard model" (the "standard model" being a particular interpretation of the primitive notions of arithmetic). See for example Wikipedia's page on non-standard models of airthmetic.

"Provable" means that there is a formal derivation of the statement from the axioms. If a statement is provable, then it is true in all models; conversely, Gödel's Completeness Theorem shows that if a (first order) statement is true in all models, then it is provable.

In particular, a statement is "formally undecidable" in an axiomatic system if there are some models in which it is true, and some models in which it is false. When you have a "prefered model" (as we do with arithmetic), we often talk simply about "true" instead of "true in a particular model".

-

The dinosaurs were killed by a gigantic brain, rather than an asteroid. (cf. Futurama, The Why of Fry)

While seemingly false, you cannot prove this statement is true or false. You can only find evidence to support its refutation.

In real life we tend to label things as true or false regardless to their provability. Mathematics, however, offers us the distinction between the existence of a proof and the truth value of a statement.

That is, we define what is a structure in some language, and what sort of assertions are true in that structure.

We can take a set of sentences from which we cannot derive contradiction (these sets are called theories, for example, axioms of a group), and we can consider structures of the appropriate language in which this set of sentences is true (we say that this is a model of the theory).

The incompleteness theorem says that given such theory which is "nice enough" and can be used to develop some of the theory true in the natural numbers, then in a model of this theory there will be assertions which are true but cannot be proved.

Of course, we can prove such assertion using different theories, or we can provide counterexamples with different theories. We can perhaps prove more (or less) if we even replace the way we deduce things, or the sentences we allow (we can allow second-order logic, or infinite quantification, for example).

However within the confines of first-order logic, and the given theory there are sentences which we can prove are unprovable from this given theory, but can be true in some model. Furthermore, in every model there is some statement which is true (in that specific model) but has no proof.

-

Suppose I made some kind of statement like "For all natural numbers $n$, $P(n)$ holds."

For my claim to be true, it must be that there is no counterexample. That is, there is no integer $n_0$ such that $P(n_0)$ fails. Even if this is the case, I may not be able to prove that it is so. So, my statement could be true, but unprovable.

-

Provability depends on what you can do to prove things, that is, on the deduction rules available within the system.

Consider the first order theory of the natural numbers with no deduction rules. There are lots of true statements in it, but most of them are not provable!

-
Then how do you know they are true? –  user1708 Oct 2 '11 at 22:00
Pick any statement from, say, Peano arithmetic which is not one of its axioms, and consider it in the theory which has the same axioms but no deduction rules. –  Mariano Suárez-Alvarez Oct 2 '11 at 22:02
$17$ is a prime number. That is true. But if there are no deduction rules, then of course you cannot prove it. "No deduction rules" is a stupid system, granted. But, in fact, Gödel showed that all systems attempting to describe the natural numbers are a little stupid in this regard. –  GEdgar Oct 2 '11 at 22:12

Let John Smith be a normal person, just as smart as you and me. Consider the sentence:

'John Smith will never be able to prove this statement is true.'

It seems easy to prove the sentence true: if JS can prove it, it is false; since nothing false can be proven, JS cannot prove it; hence, it is true.

The problem is that JS, being as smart as any of us, can understand the 'proof' above and then 'prove' the sentence. What has gone wrong?

Most probably, the sentence above is not a real statement but a sentence unable to make a statement or express a proposition; a paradoxical sentence like the Liar, unable to be true or false.

This never happens with formal systems. If S is a correct formal system, it will not prove:

'S doesn't prove this sentence'

beause if S proved it, it would be false and S incorrect, contrary to the assumed.

Therefore, the sentence will be true but unprovable if S is correct.

The difference between JS and S is that, S being a formal system, whether S proves or doesn't a particular sentence is a determinate state of affairs, with respect to which only truth or falsity is possible, but not paradox.

Note that this suggests a difference between provability by JS (or you or me) and provability in some correct formal system.

-


text:
# Using X11 as a photo frame

I'm currently using a netbook as a small home server and I was thinking about extra uses I could set up. Currently it has Ubuntu (possibly a netbook-specific version) installed, so it contains X-Windows, but also a bunch of stuff I don't care for such as GNOME. The trackpad doesn't seem to work, which should give you an idea of how much I use it as an actual graphical terminal (although I will sometimes log into it as a console terminal).

However, since the screen is there, I've been thinking it could be cool for it to display some things. I've been thinking a photo frame/general info display, showing photos that are on an SMB share elsewhere on the network, as well as home automation info like temperature and recent temperature trends. My thinking was this could all be done via DHTML so all the "photo frame" needs to show is something like Firefox in a full screen mode and ignore the keyboard.

One nice feature would be to have a button I could press to get a real GUI login back, but I don't really mind that, since I'm happy to just switch to a console screen and switch X-Windows round that way if I need it.

So basically, how can I make it such that instead of firing up to a login screen, X11 will start to running an app (possibly as a 'photoframe' user) which is as simple a window manager as possible (or none at all) running a full screen/kiosk mode Firefox (or just some dumb WebKit-frame-hosting app) pointing at a web server on the local machine? :)

• I'll try some things when I have time, but look into using a simple WM (xwm, fluxbox, etc) and putting feh with some options (-F, -r, ?) into your .xinitrc or wm-specific startup file. – Kevin Jul 15 '12 at 0:41
• feh for the win. related question on AU about using feh as a slideshow viewer: askubuntu.com/questions/131390/… – RobotHumans Jul 15 '12 at 1:08

You can use feh -FrzD30 /path/to/pictures to start a slideshow with a 30-second pause between pictures (change 30 to whatever you want the delay to be). Using slim (as a login manager) I was able to get the slideshow to start at login and present a gui on exit (Esc) with the following ~/.xinitrc:
feh -FrzD30 /path/to/pix

You'll have to use slim and change your WM to fluxbox (though I suggest you do install and try fluxbox), or look up how to get your desktop manager to use your ~/.xinitrc. And if you want an auto-login, you'll need to look that up for your DM too.


text:
Chapter 3 - Section 3.4 - The Chain Rule - 3.4 Exercises: 33

$G'(x)=-\dfrac{C(\ln4)4^{C/x}}{x^{2}}$

Work Step by Step

$G(x)=4^{C/x}$ (Here, $C$ is a constant) Differentiate using the chain rule: $G'(x)=4^{C/x}(\ln4)(\dfrac{C}{x})'=...$ Rewrite $\dfrac{C}{x}$ as $Cx^{-1}$ and continue with the differentiation process: $...=4^{C/x}(\ln4)(\dfrac{C}{x})'=4^{C/x}(\ln4)(Cx^{-1})'=4^{C/x}(\ln4)(-Cx^{-2})$ $G'(x)=-\dfrac{C(\ln4)4^{C/x}}{x^{2}}$

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


text:
DataSeries/select - Maple Programming Help

DataSeries/select

selection from a DataSeries

DataSeries/remove

removal from a DataSeries

DataSeries/selectremove

selection and removal from a DataSeries

 Calling Sequence select(f, DS, b1, ..., bn) select[inplace](f, DS, b1, ..., bn) remove(f, DS, b1, ..., bn) remove[inplace](f, DS, b1, ..., bn) selectremove(f, DS, b1, ..., bn) selectremove[inplace](f, DS, b1, ..., bn)

Parameters

 f - Boolean-valued procedure DS - a DataSeries object b1, ..., bn - (optional) extra arguments for f

Description

 • When called on a DataSeries object, the select command returns a DataSeries object consisting of those entries that satisfy the given criterion.
 • When called on a DataSeries object, the remove command returns a DataSeries object consisting of those entries that do not satisfy the given criterion.
 • When called on a DataSeries object, the selectremove command returns a sequence of two DataSeries objects, the first consisting of those entries that satisfy the given criterion and the second consisting of those entries that don't satisfy the given criterion.
 • The commands can also be called on other types of arguments. This behavior is described on the main help page for select.
 • The criterion used for deciding whether an entry $x$ of the DataSeries is included in the result is to call $f\left(x,\mathrm{b1},\mathrm{...},\mathrm{bn}\right)$. This should return true or false (or FAIL, which is interpreted in the same way as false). If you call select, then the returned DataSeries will contain $x$ if and only if the value returned is true. If you call remove, then the returned DataSeries will contain $x$ if and only if the value returned is false (or FAIL).
 • Any entry that is included in the result will have the same label that it has in DS.
 • If you call select[inplace] or remove[inplace], the command will modify the DataSeries object DS and return it. The calling sequences with no index on the command name will return a new DataSeries object and leave DS unchanged. If you call selectremove[inplace], then the command will modify DS to be the first DataSeries returned, and the second DataSeries will be a new DataSeries object.
 • You can do similar things with DataSeries indexing using a Boolean DataSeries. See the examples below.

Examples

We split $\mathrm{ds}$, below, into prime and non-prime entries in various ways, using the isprime command as the testing criterion.

 > $\mathrm{ds}≔\mathrm{DataSeries}\left(\left[5,6,7,8,9\right],\mathrm{labels}=\left[a,b,c,d,e\right]\right)$
 ${\mathrm{ds}}{≔}\left[\begin{array}{cc}{a}& {5}\\ {b}& {6}\\ {c}& {7}\\ {d}& {8}\\ {e}& {9}\end{array}\right]$ (1)
 > $\mathrm{select}\left(\mathrm{isprime},\mathrm{ds}\right)$
 $\left[\begin{array}{cc}{a}& {5}\\ {c}& {7}\end{array}\right]$ (2)
 > $\mathrm{remove}\left(\mathrm{isprime},\mathrm{ds}\right)$
 $\left[\begin{array}{cc}{b}& {6}\\ {d}& {8}\\ {e}& {9}\end{array}\right]$ (3)
 > $\mathrm{selectremove}\left(\mathrm{isprime},\mathrm{ds}\right)$
 $\left[\begin{array}{cc}{a}& {5}\\ {c}& {7}\end{array}\right]{,}\left[\begin{array}{cc}{b}& {6}\\ {d}& {8}\\ {e}& {9}\end{array}\right]$ (4)

The same results can be obtained using indexing with a Boolean DataSeries.

 > $\mathrm{ds}\left[\mathrm{~}\left[\mathrm{isprime}\right]\left(\mathrm{ds}\right)\right]$
 $\left[\begin{array}{cc}{a}& {5}\\ {c}& {7}\end{array}\right]$ (5)
 > $\mathrm{ds}\left[\mathbf{not}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{~}\left[\mathrm{isprime}\right]\left(\mathrm{ds}\right)\right]$
 $\left[\begin{array}{cc}{b}& {6}\\ {d}& {8}\\ {e}& {9}\end{array}\right]$ (6)

If we want to select the entries of a particular type, then we can use the optional third argument to select.

 > $\mathrm{select}\left(\mathrm{type},\mathrm{ds},\mathrm{even}\right)$
 $\left[\begin{array}{cc}{b}& {6}\\ {d}& {8}\end{array}\right]$ (7)

The original DataSeries, $\mathrm{ds}$, is unchanged, because we used the commands without the inplace index.

 > $\mathrm{ds}$
 $\left[\begin{array}{cc}{a}& {5}\\ {b}& {6}\\ {c}& {7}\\ {d}& {8}\\ {e}& {9}\end{array}\right]$ (8)

If we call select with the inplace index, then $\mathrm{ds}$ is modified in-place.

 > $\mathrm{select}\left[\mathrm{inplace}\right]\left(\mathrm{isprime},\mathrm{ds}\right)$
 $\left[\begin{array}{cc}{a}& {5}\\ {c}& {7}\end{array}\right]$ (9)
 > $\mathrm{ds}$
 $\left[\begin{array}{cc}{a}& {5}\\ {c}& {7}\end{array}\right]$ (10)

Compatibility

 • The DataSeries/select, DataSeries/remove and DataSeries/selectremove commands were introduced in Maple 2019.


text:
# Laplacian of a 2-form

1. May 14, 2010

### haushofer

Hi,

According to eg Nakahara's conventions the Laplacian on a form K is given by

$$\Delta K = (dd^{\dagger} + d^{\dagger}d)K$$

In my case K is a two form living in R^3. I've calculated the Laplacian and arrive at

$$\Delta K = \Bigl( \frac{1}{3!}\epsilon^{klm}\epsilon^n_{\ ij}\partial_k \partial_n K_{lm} - \frac{1}{4}\partial_{i}\partial^k K_{jk} \Bigr) dx^i \wedge dx^j$$

However, the answer seems a little odd to me. Does anyone have a reference where Laplacians of two forms are evaluated, or some comment? Thanks in forward! :)

2. May 14, 2010

### haushofer

And another question: is on a compact manifold a harmonic form neccesarily constant, or is this only true for 0-forms (functions)?

3. May 17, 2010

### zhentil

How would you go about defining a constant form?

The obvious answer to this would be that you can't define it in a coordinate-invariant way. The generalization of the idea of constant functions to forms is with the definition: a constant function is d and d* closed.

4. May 27, 2010

### st0ck

For your first question, if the codifferential is defined with a sign (-1)^n(p+1), it can be shown that in euclidean space in general laplace beltrami of a form is the same as the usual old laplacian of every function factor (times the wedged covectors). It is a lengthy calculation and took me some hours, but it works ;)

5. May 28, 2010

### haushofer

Hi,

but that would mean that my calculation isn't right?

About this "constant form": that should be zero, ofcourse; if a tensor is zero in one coordinate system, it's zero in every coordinate system. My bad ;)


text:
# Extract an RGB channel of an image

Given an image, either as input (possibly in RGB triplets) or with the filename as input (you may assume the image has a specific filename, possibly without an extension), output an image representing a single color channel of the image.

You will also take another input, representing which channel to output. The input can be one of any 3 distinct symbols. However, the symbols must be either a string or a number. You cannot take a matrice to apply to the array as input however. (such as {1, 0, 0}, or {0, 1, 0}).

You will output the <input> channel of the input image. You may either save it to a file or output a set of RGB pairs.

Your program should have no limits on the size of the image (in px), and must support either .png, .jpg/.jpeg/.JPG, or RGB triplets as image formats. (it can support as many as you want however)

Test case:

Red channel:

Green channel:

Blue channel:

And another test case, entirely of red. Original photo, red, green, and blue. (warning: the plain and red channel hurt to look at for too long)

2 more test cases:

The latter two test cases are from Images with all colors.

• This is good inspiration for a golfing language that transpiles/compiles to OpenCV operations. – hexafraction Mar 30 '17 at 23:54

# APL (Dyalog), 7 bytes

I/O: array of RGB triplets

⎕×⊂⎕=⍳3

Try it online!

⍳3 first three integers

⎕= compare numeric input (the chosen channel) to that

⊂ enclose (so each image triplet pairs up this entire triplet)

⎕× multiply numeric input (the array of triplets) with that

# JavaScript (ES6), 29 bytes

a=>n=>a.map(b=>b.map(c=>c&n))

Input is a 2D array of 24-bit integers (e.g. [[0x0000ff,0x00ff00],[0xff0000,0xffffff]]) and 16711680 for red, 65280 for green, 255 for blue. If this isn't valid, try this instead:

## JavaScript (ES6), 48 bytes

a=>n=>a.map(b=>b.map(c=>c.map((d,i)=>i==n?d:0)))

Input is a 3D array of color values and 0 for red, 1 for green, 2 for blue.

• Cheeky input format haha – Conor O'Brien Mar 29 '17 at 17:24

## Mathematica, 13 bytes

ImageMultiply

This should be the legitimate version of JungHwan Min's answer. This function takes the image and one of Red, Green, Blue as input. For example:

As a fun-fact, there's also ColorSeparate which gives you individual channels, but it returns them as single-channel/greyscale images, so you'd need to multiply them by the colour afterwards anyway.

• Is there anything Mathematica doesn't have a built-in for? – Brian Minton Apr 6 '17 at 12:41

# Bash + ImageMagick, 3532 27 bytes

mogrify -channel $1 -fx 0 i  Assumes the image is in the file i and the script takes one of RG, BG, BR for blue, red, and green respectively; outputs to the file i. • beat me to it. I posted a different bash+IM answer below, with an optimization you can steal – Sparr Mar 29 '17 at 17:20 • @Sparr I made a different golfing – betseg Mar 29 '17 at 17:29 • you could still save two bytes with mogrify and no ' o'? – Sparr Mar 29 '17 at 19:37 # Spectrum, noncompeting, 1 byte (Non-competing because this challenge inspired this language.) In reality, Spectrum is an npm library with a language interface for the commands. I  Takes input as: <filename> channel  Call the program as: cat input.txt | node spectrum.js "I"  Alternatively, you may supply information to the prompts: λ node spectrum.js "I" input> Ov3Gm.png input> r [ Image { 512x512 } ]  This leaves the image on the stack. To view it, add O at the end, like so: λ node spectrum.js "IO" input> Ov3Gm.png input> r []  For some extra fun, try echo filename | node spectrum.js "wO". It performs all three channel isolations at once: • @ThisGuy Yes, it can do primality checking: n[d1=[d1-P*][],.g!]#Pdd1-P~%-1=p – Conor O'Brien Mar 29 '17 at 23:21 • @ConorO'Brien did you see my primality tester for ImageMagick's fx operator? – Sparr Mar 30 '17 at 5:05 • @Sparr no, I haven't . Link? – Conor O'Brien Mar 30 '17 at 5:08 • @ConorO'Brien codegolf.meta.stackexchange.com/questions/8828/… – Sparr Mar 30 '17 at 6:52 ## JavaScript (ES6), 29 bytes a=>b=>a.map((v,i)=>i%3^b?0:v)  A lot like ETHproductions' answer but with more flexible input than the first method and smaller than the second one. This defines a function which accepts the image as a 1-dimensional array of numerical colour intensities. This function then returns another function which accepts an integer value representing the desired colour channel. Colours can be represented by any numerical range as long as 0 indicates a complete absence of colour. E.g. 0.0 - 1.0 or 0 - 255 Examples: If image data is in the format RGB then calling the function with arguments (imageData)(0) will return the image with only the red channel. If image data is in the format BGR then calling the function with arguments (imageData)(2) will also return the image with only the red channel. • I guess i%3==b&&v also works. – Neil Apr 8 '17 at 19:47 # Python 2, 69 bytes from cv2 import* def f(s,i):k=imread(s);k[:,:,[i,i-1]]=0;imwrite(s,k)  Still golfing. Takes input as filename, n (where n is 0, 1, or 2). Saves the new image over the old one. 0 is green, 1 is red, and 2 is blue. Thanks to @ovs, @Mikhail and @Rod for bytes off. • Save some bytes by dropping x and replacing k[:,:,x[i][0]]=k[:,:,x[i][1]]=0 with k[:,:,[1,2,0][i]]=k[:,:,i]=0  – ovs Mar 29 '17 at 17:36 • @ovs thanks!... I had actually just come up with the second suggestion myself, after messing with yours. You ninja'ed me to it though. – Riker Mar 29 '17 at 17:53 • You can use from cv2 import* to save few bytes – Rod Mar 29 '17 at 18:03 • Seems that you can replace k[:,:,i-1]=k[:,:,i]=0 with k[:,:,[i,i-1]]=0 – Mikhail V May 28 '17 at 0:34 # CJam, 12 bytes {3,f=f{f.*}}  An anonymous block that expects a 3D array of RGB triplets and a number between 0 and 2 inclusive on the stack. Leaves the extracted array on the stack afterward. Red -> 0 Green -> 1 Blue -> 2  Could possibly be golfed by using a bizarre input format, but I feel like that's cheating a bit. Try it online! The test case is made up just to demonstrate, using the triplets from an actual image would be way too big. Explanation 3, e# The range [0 1 2] f= e# Check each for equality with the RGB indicator, gives the indicator array: e# [1 0 0] for 0, [0 1 0] for 1, [0 0 1] for 2 f{ e# Map on each row of the array using the indicator array as an extra parameter f.* e# Perform vectorized multiplication of the indicator array with each triplet. e# For red, multiplies red by 1, and green and blue by 0. Does similarly e# for green and blue. } e# (end of block)  # PowerShell, 282 bytes $x,$y=$args;1..($a=New-Object System.Drawing.Bitmap$x).Height|%{$h=--$_;1..$a.Width|%{$i=("$($a.GetPixel(--$_,$h)|select R,G,B)"|iex)[$y];$r,$g,$b=(((0,0,$i),(0,$i,0))[$y-eq'G'],($i,0,0))[$y-eq'R'];$a.SetPixel($_,$h,[system.drawing.color]::fromargb($r,$g,$b))}};$a.save("$x$y.png")

None of this fancy "golfing the input" or "using built-ins." Phooey on that. ;-)

This here takes the full path of an input PNG (though, strictly speaking, it doesn't need to be a PNG, since JPG, BMP, etc. are supported by .NET, but I've only tried it on PNGs), and one of (R, G, B) for the color channel, then stores those into $x and $y. We then create a New-Object of type System.Drawing.Bitmap of $x and store that into $a.

Then we do a double loop over all pixels. First from 1 up to $a's .Height, setting $h each iteration (it's zero-indexed, so that's why we --$_, which saves bytes over ( .height-1). Inside, we loop from 1 up to $a's .Width.

Each iteration, we're performing a .GetPixel on the particular w,h coordinates, which returns a System.Drawing.Color object. We select out the R G B values thereof. The iex here is a neat trick that turns this into a hashtable (e.g., something like @{R=34; G=177; B=76}) so we can index into that directly with the desired color channel [$y]. That value is stored into $i.

Next, we set three values $r,$g, $b to be the result of some pseudo-ternary operators based on the letter value of $y. So, for example, if $y is R, then the result here is $r=$i,$g=0, $b=0. Then, we do a .SetPixel back onto that particular w,h coordinate, constructing a new System.Drawing.Color using the static FromARGB (which assumes the alpha to be fully opaque). Once we've finished looping, we then simply .Save the PNG to a new file. Note: This does take a long while, since it's completely independently looping through every pixel and performing a bunch of calculations and calls each iteration. Tests: # Bash + ImageMagick, 41 bytes C="RGB" mogrify -channel${C//$1} -fx 0 x  Input is a file named x, command line parameter one of R or G or B Output overwrites the input file Differs from betseg's answer in taking more natural single-letter channel parameter. Also overwriting instead of outputting a new file which betseg is free to steal :) • the $1 needs quotation marks, file names can have spaces – betseg Mar 29 '17 at 17:31
• @betseg not really, I said you can assume it has a specific filename. If he wants, he can even change it to read from a file name x for 1 byte off. – Riker Mar 29 '17 at 17:41
• @Riker oh, I didnt notice that, that helps me too :D – betseg Mar 29 '17 at 17:42

# Chip, 78 bytes

 ~Z~vS
f/F,^-.
e/E|,-Z.
d/D|>zz^.
a/AMx-x-].
b/BMx-]v-'
c/CM]v-'
>--v'
G/gh/H

Try it online!

Chip is a 2D language that operates on the component bits of each byte in a byte stream.

### Overview

This particular solution expects the first byte of input to be the control character--to define which channel(s) to keep--and following is the bytes of image data. The image data must be RGB triplets, one byte per channel, 24 bits per pixel:

|  1  |  2  |  3  |  4  |  5  |  6  |  7  | ... | 3n-2 |  3n  | 3n+1 |
|     |   First Pixel   |   Second Pixel  | ... |      nth Pixel     |
| Ctl | Red | Grn | Blu | Red | Grn | Blu | ... |  Red |  Grn |  Blu |

The control character is interpreted as a bit field, though only the three lowest bits have meaning:

0x1  keep Red channel
0x2  keep Green channel
0x4  keep Blue channel

This means we can use ASCII characters to select which channel we want:

1 means red
2 means blue
4 means green

Or do something fancier:

5 keep red and blue, but not green
7 keep all channels (image is unchanged)
0 drop all channels (image is black)

### How it works

This solution is rather jumbled up due to golfing, but here goes:

1. Read the three low bits of the first byte with C, B, and A, and store those bits in their corresponding Memory cells. Also, Suppress output for the first cycle.
2. Loop over those three bits repeatedly. If the current bit it is on, close the / switches to output the current input byte, if it is off, open the switches so that we output a zero byte.
3. Continue until input is exhausted.

### Viewing the results

Sure, you could use hexdump or something boring, but it turns out this is (almost) an actual valid image format: binary Portable PixMap.

Just plop the image data from above (minus the control byte, of course) into the file below, adjust the width/height to be valid, and you can view the image in a proper viewer like IrfanView, though simpler ones (like most browser built-ins) can't handle it.

P6
{width as ASCII} {height as ASCII}
255
{binary image data here}

For example (using escapes for the raw data):

P6
3 1
255
\xff\x00\x00\x00\xff\x00\x00\x00\xff

# MATL, 21 13 bytes

Yi3:iml&!*3YG

The color channel should be specified using the following mapping: 1:red, 2:green, 3:blue

The Online interpreters are unable to use imread to read images so here is a slightly modified version where I have hard-coded a random image into the source.

Explanation

        % Implicitly grab first input as a string (filename)
Yi      % Read the image in from a filename or URL
3:      % Push the string literal 'rgb' to the stack
i       % Grab the second input as a number
m       % Check for membership. So for example 2 will yield [false, true, false]
l&!     % Permute the dimensions to turn this 1 x 3 array into a 1 x 1 x 3 array
*       % Multiply this with the input RGB image. It will maintain the channel which
% corresponds with the TRUE values and zero-out the channels that corresponded to
% the FALSE values
3YG     % Display the image

# 05AB1E, 16 bytes

vyvy2ô²è}})¹0ègô

Try it online!

Uses hex colors in a 2D array format and [0,1,2] for each channel.

# Clojure, 421 332 bytes

-89 bytes by aggressively inlining everything, changing from my ridiculous old method of stripping the channels, and getting rid of an unnecessary accidental import.

(import '(java.awt.image BufferedImage)'(clojure.lang Keyword)'(javax.imageio ImageIO)'(java.io File)'(java.awt Color))(fn[p i](doseq[y(range(.getHeight p))x(range(.getWidth p))](.setRGB p x y(.getRGB(apply #(Color. % %2 %3)(#(let[c(Color. %)](assoc [0 0 0]i(([(.getRed c)(.getGreen c)(.getBlue c)]%)i)))(.getRGB p x y))))))(ImageIO/write p"jpg"(File."./o.jpg")))

Smacked this out half an hour before my shift started with no idea what I was doing. I have little experience with BufferedImage, so there may be a better way of going about this. I'm also abusing Color to convert back-and-forth between integer and individual channel representations of colors.

This is comically huge compared to the other answers for a couple reasons (besides the obvious that Clojure isn't a golfing language):

• Instead of just manipulating a byte array, this actually takes as input a picture, alters it, and outputs it.

• I'm using Java-interop, which while handy can be quite verbose at times. The imports alone are larger than many answers.

See the code below for a break down.

(ns bits.restrict-channel
(:import (java.awt.image BufferedImage)
(clojure.lang Keyword)
(javax.imageio ImageIO)
(java.io File)
(java.awt Color)))

(defn restrict-channel
"Accepts a BufferedImage and a index between 0 and 2 (inclusive).
Removes color from all channels EXCEPT the channel indicated by color-i.
color-i of 0 = keep red
color-i of 1 = keep green
color-i of 2 = keep blue"
[^BufferedImage image ^long color-i]
(let [; Turn a number representing RGB into a triplet representing [R G B]
channels #(let [c (Color. %)]
[(.getRed c) (.getGreen c) (.getBlue c)])

; Create a new triplet that only contains color in the color-i channel
zero-channels #(assoc [0 0 0] color-i ((channels %) color-i))]

; Loop over each pixel
(doseq [y (range (.getHeight image))
x (range (.getWidth image))]

; Grab the current color...
(let [cur-color (.getRGB image x y)]

; ... setting it to stripped color triplet returned by zero-channels
(.setRGB image x y

; This "apply" part is just applying the stripped triplet to the Color constructor
;  This is needed to convert the separate channels into the integer representation that BufferedImage uses.

(.getRGB (apply #(Color. % %2 %3) (zero-channels cur-color))))))

; Save the result to file
(ImageIO/write image "jpg" (File. "./o.jpg"))))

• This is either the most glorious or horrific thing I've ever seen. I'm going with the former. – Riker Mar 29 '17 at 20:34
• @Riker Definitely the former. I started writing this half an hour before my shift started with no idea how I was going to do it. But it works! – Carcigenicate Mar 29 '17 at 21:09
• * I actually meant the latter, but glorious messes are a thing too. – Carcigenicate Mar 29 '17 at 22:14

# Lua (love2d Framework), 498 bytes

I did this more as a exercise for myself, so it's not as short as it could be (though I did try to golf), but I wanted to add it to here cause I think I did good. Even if I'm too late.

Here the golfed code, under it is the explained and untangled version.

l=love g,p,rm,bm,gm,s=l.graphics,0,1,1,1,[[uniform float m[4];vec4 effect(vec4 co,Image t,vec2 c,vec2 s){vec4 p=Texel(t,c);p.r=p.r*m[0];p.b=p.b*m[1];p.g=p.g*m[2];return p;}]]t=g.setShader h=g.newShader(s)function l.draw()h:send("m",rm,gm,bm)if p~=0 then t(h)g.draw(p)t()end end function l.filedropped(f)a=f:getFilename()p=g.newImage(f)end function l.keypressed(k)if k=="0"then rm,gm,bm=1,1,1 end if k=="1"then rm,gm,bm=1,0,0 end if k=="2"then rm,gm,bm=0,1,0 end if k=="3"then rm,gm,bm=0,0,1 end end

Here is the code which has to get a *.jpg file dropped into it. After the image was inserted you can press the number buttons for red(1) green(2) or blue(3) channels. Also to see the default picture again press 0. Actually it just shows the picture in the window.

l=love
g=l.graphics
p=0
rm,bm,gm=1,1,1
s = [[uniform float m[4];
vec4 effect(vec4 co,Image t,vec2 c,vec2 s){vec4 p=Texel(t,c);p.r = p.r * m[0];p.b = p.b * m[1]; p.g = p.g * m[2]; return p;}
]]

function l.draw()
sh:send("m",rm,gm,bm)
if p~=0 then
g.draw(p)
end
end

function l.filedropped(f)
a=f:getFilename()
p=g.newImage(f)
end

function l.keypressed(k)
if k=="0"then rm,gm,bm=1,1,1 end
if k=="1"then rm,gm,bm=1,0,0 end
if k=="2"then rm,gm,bm=0,1,0 end
if k=="3"then rm,gm,bm=0,0,1 end
end

The important part which does all the work is the shader which is the small string declaration at the beginning or untangled:

uniform float m[4];
vec4 effect(vec4 co,Image t,vec2 c,vec2 s)
{
vec4 p=Texel(t,c);
p.r = p.r * m[0];
p.b = p.b * m[1];
p.g = p.g * m[2];
return p;
}

which gets the actual pixel of the image and just shows the channels as needed.

My test image and the different outputs for the channels (also for sure the other ones)

• Thank you for your hint, I fixed it, next time I know :) – Lycea Apr 11 '17 at 15:28
• No problem! Welcome to ppcg, hope you stick around! – Riker Apr 11 '17 at 15:55
• Also, you can still golf this. You don't need to include the buttons and such. – Riker Apr 11 '17 at 15:55

# C, 60 58 bytes

main(a,b)char**b;{while(scanf(b[1],&a)>0)printf("%d ",a);}

Image input is a list of numbers (in decimal) between 0 and 255 on stdin, e.g.

255 0 0  192 192 192  31 41 59 ...

The channel is specified as the first argument to the program, and is one of

red   -> "%d%*d%*d"
green -> "%*d%d%*d"
blue  -> "%*d%*d%d"

Example:

\$ echo "255 0 0" | ./extract "%d%*d%*d"
255
`


text:
Suggestions for reaction conditions to prepare methyl 2,4,6-trimethylbenzenesulfonate [closed]

I'm a beginner in organic chemistry and I wish to produce methyl 2,4,6-trimethylbenzenesulfonate.

My reactants are 2,4,6-trimethylbenzenesulfonyl chloride (solid crystals) and methanol (solvent as well as reactant). The product of this reaction should be methyl 2,4,6-trimethylbenzenesulfonate and HCl.

Now I've tried these many conditions: distilling the methanol, nitrogen inert atmosphere, slight heating about 40 °C, room temperature, closed system.

After trying these conditions and their combinations I'm not getting the product in the desired amount.

Kindly help me out and suggest a few tweaks and optimizations if possible. As far as my knowledge goes the problem seems to be with methoxy group.

This is the entire synthesis process, please check it out. I am stuck on step two of this synthesis.

closed as unclear what you're asking by orthocresol♦Aug 15 '17 at 6:32

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Can you add structures or link to structures? Maybe I'm missing something, but the names of these compounds don't make sense. Trimethyltoluene sulfonate would be a tetramethylbenzene sulfonate, of which there are a couple isomers. – jerepierre Jan 13 '16 at 8:54
• I guess, you want to prepare methyl 2,4,6-trimethylbenzene-1-sulfonate from 2,4,6-trimethylbenzene-1-sulfonyl chloride. Could you please check and edit your question? – Loong Jan 13 '16 at 12:32
• @jerepierre and others, guys sorry for the delay. I have added the structures and the synthesis process please have a look. – AVyas Jan 14 '16 at 23:32
• @AVyas I've changed the name of the compound to methyl 2,4,6-trimethylbenzenesulfonate, which is the product of reaction 1. I am still confused though because your edit says that you are having problems with step 2, which is the transfer of the methyl to a pyridine. Could you clarify which step you are having problems with and what exactly the problem is? "Not getting the product in the desired amount" could be anything. – jerepierre Jan 15 '16 at 0:58
• I'm closing this as unclear because I cannot tell which step there is a problem in and what the problem actually is, cf @jerepierre's comment above. – orthocresol Aug 15 '17 at 6:33

• Use a base to mop up the $\ce{HCl}$ that is produced. Either an organic base like pyridine (preferably) or triethylamine or you can use an inorganic base like $\ce{NaOH}$ or $\ce{Na2CO3}$ under Shotten-Bauman conditions i.e. as a biphasic aqueous-organic system
• Increase the reactivity of the nucleophile. Methoxide is a much better nucleophile. You can use commercially available $\ce{MeONa}$ or you can create it by something like $\mathrm{^tBuOK/MeOH}$


text:
# How to use bimodal priors for bayesian data analysis in STAN

I tried adding a bi-modal prior in STAN for a homework exercise on Bayesian Data Analysis. At first, I thought this could work:

model{
mu ~ normal(-0.5,0.3) + normal(0.5,0.3);
}

But it doesn’t. I had to dig deeper and I thought I could simply add multiple times to the log-posterior due to a sideremark of Bob Carpenter:

target += normal_lpdf(mu|.5,0.3);
target += normal_lpdf(mu|-.5,0.3);

Which also does not work. Finally, the solution is akin to the mixture model in the STAN manual:

  target += log_sum_exp(normal_lpdf(mu|.5,0.3),normal_lpdf(mu|-.5,0.3));

This results in beautiful bi-modal priors:

I did not find anything on google or the manual of how to do this. If there is a smarter way to do it, please leave a comment.

library(rstan)

model <- "
data {
}
parameters {
real mu;
}
transformed parameters {
}
model {
//mu ~ normal(10,1);
//mu ~ normal(-10,1);
target += log_sum_exp(normal_lpdf(mu|-.5,.3),normal_lpdf(mu|.5,.3));

}"

samples <- stan(model_code=model,
iter=2000,
chains=4,
thin=1,
# seed=123 # Setting seed; Default is random seed
)

ggmcmc::ggs_density(ggmcmc::ggs(samples))+theme_minimal()

Categorized: Blog

Tagged:


text:
# C 2-cofiniteness of the 2-cycle permutation orbifold models of minimal Virasoro vertex operator algebras - Mathematics > Quantum Algebra

C 2-cofiniteness of the 2-cycle permutation orbifold models of minimal Virasoro vertex operator algebras - Mathematics > Quantum Algebra - Descarga este documento en PDF. Documentación en PDF para descargar gratis. Disponible también para leer online.

Abstract: In this article, we give a sufficient and necessary condition for the$C 2$-cofiniteness of the 2-cycle permutation orbifold model $V\otimesV^\sigma$ for a $C 2$-cofinite vertex operator algebra and the 2-cyclepermutation $\sigma$ of $V\otimes V$. As an application, we show that the2-cycle permutation orbifold model of the simple Virasoro vertex operatoralgebra $Lc,0$ of minimal central charge $c$ is $C 2$-cofinite.

Autor: Toshiyuki Abe

Fuente: https://arxiv.org/


text:
# American Institute of Mathematical Sciences

doi: 10.3934/dcds.2020320

## Gromov-Hausdorff stability for group actions

 1 Department of Mathematics, College of Science, Yanbian University, No. 977, Gongyuan Road, Yanji City 133002, Jilin Province, China 2 Department of Mathematics, Chungnam National University, Daejeon 305-764, Korea 3 Instituto de Matemática, Universidade Federal do Rio de Janeiro, P. O. Box 68530 21945-970, Rio de Janeiro, Brazil

Received  February 2020 Revised  July 2020 Published  August 2020

Fund Project: KL and MD were supported by the NRF grant funded by the Korea government (MSIT)(NRF-2018R1A2B3001457). CAM was partially supported by the NRF Brain Pool Grant funded by the Korea government and CNPq from Brazil

We will extend the topological Gromov-Hausdorff stability [2] from homeomorphisms to finitely generated actions. We prove that if an action is expansive and has the shadowing property, then it is topologically GH-stable. From this we derive examples of topologically GH-stable actions of the discrete Heisenberg group on tori. Finally, we prove that the topological GH-stability is an invariant under isometric conjugacy.

Citation: Meihua Dong, Keonhee Lee, Carlos Morales. Gromov-Hausdorff stability for group actions. Discrete & Continuous Dynamical Systems - A, doi: 10.3934/dcds.2020320
##### References:

show all references

##### References:
 [1] Laurent Di Menza, Virginie Joanne-Fabre. An age group model for the study of a population of trees. Discrete & Continuous Dynamical Systems - S, 2020  doi: 10.3934/dcdss.2020464 [2] Mostafa Mbekhta. Representation and approximation of the polar factor of an operator on a Hilbert space. Discrete & Continuous Dynamical Systems - S, 2020  doi: 10.3934/dcdss.2020463 [3] Hirokazu Ninomiya. Entire solutions of the Allen–Cahn–Nagumo equation in a multi-dimensional space. Discrete & Continuous Dynamical Systems - A, 2021, 41 (1) : 395-412. doi: 10.3934/dcds.2020364 [4] Jianquan Li, Xin Xie, Dian Zhang, Jia Li, Xiaolin Lin. Qualitative analysis of a simple tumor-immune system with time delay of tumor action. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020341 [5] Lei Liu, Li Wu. Multiplicity of closed characteristics on $P$-symmetric compact convex hypersurfaces in $\mathbb{R}^{2n}$. Discrete & Continuous Dynamical Systems - A, 2020  doi: 10.3934/dcds.2020378

2019 Impact Factor: 1.338