text:
August 6, 2021

## Largest product in a grid

Euler problem 11 solution using R. You can capture table data from a connection (a generalised file), one of which is the clipboard, to a data frame.

problem.matrix <-
as.matrix(read.table("clipboard",sep=" "))

This gives a 20×20 matrix. Awesome. Although this all goes askew once Visual Studio is involved – I added a text file containing the data to the solution explorer and discovered it gets encoded in some fantastic way introducing a Byte Order Mark (BOM) so I needed to specify the encoding scheme.

problem.matrix <-
sep = " ",
fileEncoding = "UTF-8-BOM"))

The problem is to find the greatest product of four adjacent numbers (horizontally, vertically or diagonally) in a 20×20 grid. I’m approaching this by considering the products of multiple matrices.

The solution cannot lie, for example, in the last 3 columns because we need 4 numbers. So let’s consider a 17×17 matrix being moved along and down the data.

Remember to repeat this from right to left as there are two diagonal directions. The same approach can be taken for the rows, using a 17×20 matrix and for the columns using a 20×17 matrix.

problem.matrix <-
sep = " ",
fileEncoding = "UTF-8-BOM"))

diagonal.ltor <-
problem.matrix[1:17, 1:17] *
problem.matrix[2:18, 2:18] *
problem.matrix[3:19, 3:19] *
problem.matrix[4:20, 4:20]

diagonal.rto1 <-
problem.matrix[4:20, 1:17] *
problem.matrix[3:19, 2:18] *
problem.matrix[2:18, 3:19] *
problem.matrix[1:17, 4:20]

horizontal <-
problem.matrix[, 1:17] *
problem.matrix[, 2:18] *
problem.matrix[, 3:19] *
problem.matrix[, 4:20]

vertical <-
problem.matrix[1:17,] *
problem.matrix[2:18,] *
problem.matrix[3:19,] *
problem.matrix[4:20,]

print(max(diagonal.ltor, diagonal.rto1, horizontal, vertical))

format: plain


text:
# Biological Physics (physics.bio-ph)

• Nanoscopic protein machines can store and manipulate information. We show that it happens if their intramolecular stochastic dynamics of conformational transitions enable performing the work in many randomly selected ways. A sample model of such dynamics, specified by a critical complex network, is investigated by computer simulations. For this model, the generalized fluctuation theorem is proven to be held with a possible entropy reduction at the expense of information creation. Information creation and storage takes place in the transient, nonergodic stages of dynamics before completing the free energy transduction cycle. From the biological perspective, the suppositions could be of especial importance that (1) a partial compensation of entropy production by information creation is the reason for most protein machines to operate as dimers or higher organized assemblies and (2) nonergodicity is essential for transcription factors in search for the target on DNA. From a broader physical perspective, it is worth emphasizing the guess that, similarly as work and heat are changes in energy, information could be considered as a change in fluctuating organization, which is also an adequately defined thermodynamic function of state.
• We explore a model of metapopulation genetics which is based on a more ecologically motivated approach than is frequently used in population genetics. The size of the population is regulated by competition between individuals, rather than by artificially imposing a fixed population size. The increased complexity of the model is managed by employing techniques often used in the physical sciences, namely exploiting time-scale separation to eliminate fast variables and then constructing an effective model from the slow modes. Remarkably, an initial model with 2$\mathcal{D}$ variables, where $\mathcal{D}$ is the number of islands in the metapopulation, can be reduced to a model with a single variable. We analyze this effective model and show that the predictions for the probability of fixation of the alleles and the mean time to fixation agree well with those found from numerical simulations of the original model.
• In this work, we develop a two-component coarse-grained molecular dynamics (CGMD) model for simulating the erythrocyte membrane. This proposed model possesses the key feature of combing the lipid bilayer and the erythrocyte cytoskeleton, thus showing both the fluidic behavior of the lipid bilayer and elastic properties of the erythrocyte cytoskeleton. The proposed model facilitates simulations that span large length-scales (~ micrometer) and time-scales (~ ms). By tuning the interaction potential parameters, diffusivity and bending rigidity of the membrane model can be controlled. In the study of the membrane under shearing, we find that in low shear strain rate, the developed shear stress is mainly due to the spectrin network, while the viscosity of the lipid bilayer contributes to the resulting shear stress at higher strain rates. In addition, the effects of the reduction of the spectrin network connectivity on the shear modulus of the membrane are investigated.
• Plants monitor their surrounding environment and control their physiological functions by producing an electrical response. We recorded electrical signals from different plants by exposing them to Sodium Chloride (NaCl), Ozone (O3) and Sulfuric Acid (H2SO4) under laboratory conditions. After applying pre-processing techniques such as filtering and drift removal, we extracted few statistical features from the acquired plant electrical signals. Using these features, combined with different classification algorithms, we used a decision tree based multi-class classification strategy to identify the three different external chemical stimuli. We here present our exploration to obtain the optimum set of ranked feature and classifier combination that can separate a particular chemical stimulus from the incoming stream of plant electrical signals. The paper also reports an exhaustive comparison of similar feature based classification using the filtered and the raw plant signals, containing the high frequency stochastic part and also the low frequency trends present in it, as two different cases for feature extraction. The work, presented in this paper opens up new possibilities for using plant electrical signals to monitor and detect other environmental stimuli apart from NaCl, O3 and H2SO4 in future.


text:
# Can a photon move at another speed that's not the speed of light?

I was reading an article about the new collider photon-photon, and the writer says "the scientists accelerate photons in a very high speed".

It's non sense to me, because as far I know a photon only moves on the speed of light.

So my question is: Can a photon move at another speed that's not the speed of light?

EDIT:

This is the article about photon-photon collider:

http://www.theverge.com/2014/5/18/5724658/photon-collider-could-turn-light-into-matter

I found the snippet about accelerating photons at a very high speed in this Portuguese article:

http://meiobit.com/287429/colison-foton-foton-proposta-transformar-luz-em-materia/

• Photons only move with the speed of light. Can you give the link to the article please? May 19, 2014 at 19:30
• probably protons not photons May 19, 2014 at 19:34
• Photons, not protons May 19, 2014 at 20:05
• I put the link of portuguese article in the question May 19, 2014 at 20:12
• I don't speak Portuguese well, but the sentence "a colisão de dois fótons a uma velocidade altíssima resultaria na criação de um elétron e um pósitron" seems to phrase the collision as being "high-speed"; it probably was supposed to be "high-energy", but the writer just mixed the words. May 19, 2014 at 20:30

Yes, normally $c$ is for speed of light in vacuum at which light travels at its maximum speed. However if I were to put, say, atmosphere or diamond in from of a light beam, the light would travel slower than $c$, therefore I conclude yes its possible to travel slower than the TRUE speed of light. Next, to elaborate, in 1905, Einstein's miracle year, he proposed his mass-energy equivalence theory which is $E=mc^2$. This must mean, with some simple rearranging, we understand that mass can be converted in energy and vice-versa. That in mind, a photon is an packet of energy in basic definition. That in mind, we can convert the photons into mass using the formula rearranged: $m=E/c^2$ which means we can even make light travel even at 0 indirectly.


text:
# The Hessian and Eigenvalues

i am wondering if it is necessary to find the eigenvalues of the Hessian matrix in dimensions > 2 when we are looking for the extrema of a function in the case that one wants to resolve this problem through the way of considering the definitiness of the Hessian.

In other words how do i prove if the Hessian is negative definite if i wouldn't like to go through the eigenvalue problem ?

Thanks for the comment.

What you probably want is Sylvester's criterion: a Hermitian (and hence symmetric, which is sufficient for the Hessian) matrix $$\begin{pmatrix} a_{11} & a_{12} & a_{13} & \cdots \\ a_{21} & a_{22} & a_{23} & \cdots \\ a_{31} & a_{32} & a_{33} & \cdots \\ \vdots & \vdots & \vdots & \ddots \end{pmatrix}$$ is positive-definite if and only if the determinants of the principal minors, $$a_{11}, \begin{vmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{vmatrix}, \begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix}, \dotsc$$ are all positive. This is obviously much easier to calculate than doing all the eigenvalues.


text:
# Do we need multiple instances for each namepace when using following php SplClassLoader.php

Well I am just bit confused after comparing the two version of the SplClassLoader

One is here: https://gist.github.com/jwage/221634

Which I think need multiple instances if we have multiple namespaces ,as the implementation suggests

The other one is https://wiki.php.net/rfc/splclassloader , which seems pretty nice but I don't find a git version somewhere.It seems straight forward with add() method to add multiple include paths.

I ll appreciate if someone confirm what I am thinking and suggest me one of the above or better one.

thanks

-
I was wondering the same: when using SplClassLoader is it required to create an instance for and register() each root namespace? Seems like an odd design. –  Mark Fox Apr 23 '13 at 5:44
@MarkFox I decided to use Zend 2 autoloader github.com/zendframework/zf2/tree/master/library/Zend/Loader , its nice and clean with multiple interfaces to do this kind of things.This is nice tutorial to start with akrabat.com/zend-framework-2/using-zendloaderautoloader –  sakhunzai Apr 23 '13 at 6:23
that one does look nice. Check my answer, you may like both. –  Mark Fox Apr 23 '13 at 6:37

It turns out that you if you pass null for the namespace (the first argument), you're able to load any namespace under the include path (the second argument):

$loader = new SplClassLoader( null, 'src');$loader->register();

Typically I've seen example usages of SplClassLoader like this:

$loader = new SplClassLoader( 'Mine', 'path\to\libs');$loader->register();

use Mine\Craft;
$c = new Craft;  Which is fine if you only want to load classes under the Mine namespace. But what if you wanted to use the Yours namespace? You could rightly do: $loader = new SplClassLoader( 'Mine', 'path\to\libs');
$loader->register();$loader = new SplClassLoader( 'Yours', 'path\to\libs');
$loader->register(); use Mine\Craft; use Your\Hovercraft;$c = new Craft;
$h = new Hovercraft;  But that seems long winded doesn't it? Especially since they are stored in the same place. What if we had three or four namespaces to work with? If all of your namespaces are in the same directory you can be lazy. Here is the complete example, root.php: require 'SplClassLoader.php';$loader = new SplClassLoader( null, 'path\to\libs');
$loader->register(); use Mine\Craft; use Your\Hovercraft;$c = new Craft;
\$h = new Hovercraft;

This assumes your directory structure is like this:

- path
- to
- libs
- Mine
- Craft.php
- Yours
- Hovercraft.php
root.php

And of course your classes namespacing follows the standard:
Craft.php

namespace Mine;

class Craft
{
…
}

Now, I can't comment on the security of this approach. I suppose it's nice to be able to whitelist certain namespaces? Not sure it's a security feature, seems more like some built-in flexibility so you don't have to put all of your libraries in one spot. For my money though, it's all about brevity and simplicity. Consolidated dependencies, pass null and move on with your code.

-
+1 for the null approach , but what I desired was single instance to load all namespaces. –  sakhunzai Apr 24 '13 at 5:57
My solution works implicitly for any and all namespaces. Are you saying wanted a way to load multiple specific namespaces via one instance? –  Mark Fox Apr 24 '13 at 23:45
yes specific ones each with different paths –  sakhunzai Apr 26 '13 at 6:35


text:
Open access peer-reviewed chapter - ONLINE FIRST

A Synthesis of Risks in Dairy Value Chains in Southern Africa: Cases of South Africa and Zimbabwe

By Chari Felix and Ngcamu Bethuel Sibongiseni

Submitted: October 25th 2018Reviewed: January 21st 2019Published: June 3rd 2019

DOI: 10.5772/intechopen.84573

Abstract

An increase in frequency and intensity of slow- and fast-onset disasters in Southern Africa has crippled milk producers’ value chain with catastrophic effects to consumers. Milk production is vulnerable to disruptions from natural disasters, poor transport and infrastructure. The chapter considers the cases of South Africa and Zimbabwe, two countries that have organized dairy production. Against this bleak backdrop, this chapter explores the contribution of the milk industry to the economy and the benefits to consumers of milk and dairy products. The chapter also identifies the key players in the dairy supply chain in Southern Africa. It explores different types of disaster risks prevalent in Southern Africa and how they affect the production of raw and processed milk along dairy supply chains. It further interrogates risk management strategies employed by the key players to mitigate these risks to make dairy supply chains sustainable. This chapter reviewed literature and analyzed governments, nongovernmental organizations, and industries’ documents with the aim to present value chain resilience strategies. This chapter also presents an insight into the policymakers and milk industries on the risk reduction strategies that are employed to mitigate the effects of risks on the milk and dairy products’ value chain.

Keywords

• dairy industry
• drought
• milk production
• risk reduction strategies
• value chain

1. Introduction

The Southern African Development Community (SADC) has experienced the growing demand for dairy products, increased the milk returns, employee productivity, quality milk yields, and demand, as well as the application of world-class technology. Mlambo and Zitsanza [1] contemplate this growing demand which has led to the dairy industry’s contribution to the economic development of both South Africa and Zimbabwe. Furthermore, the price fluctuations in the SADC region have led to an increase in the milk demand. The milk production, favorable trade, and job creation can be utilized as criterions to determine the economic benefits of the dairy industry.

The agricultural sector contributes to the gross domestic product (GDP) of the emerging and developing countries including South Africa and Zimbabwe. Hence, the dairy demand is expected to grow by 2.3% a year over the next decade. The primary drivers of growth in demand remain population growth and growth in the per capita consumption of dairy products [2]. There is a plethora of benefits in improving the levels of milk production and profitability of dairy farmers. These include the following (Figure 1):

• A growing demand for dairy products in developing countries and SADC countries are no exception.

• An increase in milk returns.

• An increase in labor productivity.

• An increase in milk yields.

• The creation of job opportunities.

• Improved demand for quality of milk and its price.

• Improved supply of milk yields by the utilization of production in technology.

• Acceleration of women empowerment.

• Development of farmers’ cooperatives.

In Zimbabwe, the agricultural sector provides employment and livelihood to 70% of the population, contributing between 40 and 60% of exports and 15–25% of gross domestic product (GDP) [3]. The dairy sector is equally critical for the success of rural communities as it reduces poverty and ensure food and nutrition security. At the height of production in 1990, milk production reached an all-time annual high of 262 million liters [4]. However, the estimated demand for milk and milk products of 180 million liters in Zimbabwe presents a supply gap of 129 million liters, implying that there is an opportunity for import substitution through improved competitiveness and increased production, especially from local smallholder dairy farmers [4].

On the contrary, the World Wildlife Fund South Africa (WWF [5]) suggests that the South African dairy products import percentage has superseded the export percentage since 2010, although the South African milk production has been changing relatively. Agriculture Statistics [6] posits that over the last 20 years, the milk production has remained constantly due to the substantial decrease of the dairy of the national herd. The sudden change in production occurred even though the number of farmers has declined since 1993 with the dairy sectors being detrimentally affected [7], whereas international dairy product prices dropped by 61% from February 2014 to May 2016. The decrease in prices was caused by higher production, fueled by higher producer prices, and a decrease in demand, especially from China [2]. Furthermore, the milk consumption in South Africa has declined, and South African farmers are unable to compete against farmers from the first world countries who receive state funding from their countries and export their products to South Africa. Hence, this slow-onset disaster (drought) had a multiplicity of repercussions including the severe depletion of the natural grazing with livestock slaughter, reduction of summer crop plantations, extreme temperatures in summer months, and grain deficits with an increase in importations. Furthermore, the inability of the agricultural sector to attract clients with purchasing power, a depreciating currency, and an increase in food prices were the effects of drought in southern Africa. It is imperative to investigate the risk issues in the dairy value chain due to the importance of the dairy industry in regional economic development, contribution to the GDP, and poverty alleviation.

2. Milk production value chain

The scarcity of farmland and water has limited the growth of the dairy industry. The key players in the value chain are input suppliers, dairy farmers and milk processors, middlemen, government, financial institutions, nongovernmental organizations, buyers in the markets, and value chain supporters. Both large-scale and many smallholder dairy farmers in the country need several inputs from input suppliers to raise the cows and produce raw milk. South African and Zimbabwean milk production is dominated by large-scale farmers who own fairly large farms with high producing pure exotic cows. The other players in the dairy value chain in Zimbabwe are middlemen (wholesalers and retailers) who buy milk produce from farmers and processors in bulk in order to retail to the consumers. The sale of milk and milk products is through supermarkets and shops around the country. The processing companies also sell milk products directly to final consumers through their salesmen who patrol streets in towns and residential areas with refrigerated push and bicycle carts. The other key players are the consumers of the milk products themselves. Without the consumers in the value chain, there is no business; hence, milk products’ consumers are important in the milk value chain. Dairy value chain supporters provide support to the main actors to guarantee that dairy products get to the final consumer. The supporters in the dairy value chain in Zimbabwe include: dairy services, the Department of Veterinary Services, Livestock Research Institute, extension services, farmers’ unions, and nongovernmental organizations.

There are a multiplicity and diverse actors in the dairy supply value chain who perform various pivotal roles that service dairy industries including educators from agricultural schools, universities and technical colleges, farmers and stock people, farm advisors, local agribusiness, policymakers, and research scientists. There are also pivotal key stakeholders in the dairy value chain in South Africa which include the Department of Agriculture, Forestry and Fisheries, National Disaster Management Centres, Industrial Development Corporation, Land Bank, Banking Association of South Africa, South African National Consumer Union, and National Chamber of Milling. The stakeholders aim to improve the productive performance of the training and development programs and training on the foundations of dairy production technology. Midgley [8] mentions that consumers, dairy processors, informal traders, retailers, bulk milk collectors, transport operators, importers and exporters, and large commercial and medium and small dairy producers can be considered as the dairy supply value chain. The author argues that the dairy industry has noticed the number of producers declining with the cattle sizes increasing and the milk production efficiencies improving.

3. Drought effects in the dairy industry

The SADC region has been prone to drought, which is associated with the climatic phenomena called EL NINO. This phenomenon occurred when sea temperatures surpassed the Western coast of South America affecting global weather patterns. The effects of EL NINO in South Africa has resulted in seven out of nine provinces being declared disaster zones which had catastrophic effects on the dairy supply including the milk. The severe impact of drought in the SADC region with South Africa as no exception has drastically paralyzed the milk supply value chain. This became conspicuous as most dairy farmers were unable to produce and supply sufficient milk due to the impact of drought which has increased the cost of milk drastically. Consequently, this led to the majority of dairy farmers in South Africa to experience a reduction in the milk production, which led to an increase in prices by retailers which had an adverse effect on consumers. The local supply situation remains uncertain as the final effect of the 2016 and 2017 drought remains to be seen. Lower grain prices will probably have a beneficial effect on production but the scarcity of roughage, higher beef prices, and the weaker condition of herds after the drought impacted negatively on production. Milk production growth remained slow during the rest of 2017 [2]. There are a number of factors that have necessitated some dairy processors to pay commercial farmers an exorbitant amount of money per liter per average for milk to ensure a consistent supply which includes, inter alia:

• The effects of drought leading to poor pasture conditions.

• Increase in grain prices.

• Importation of dairy products (milk) from other countries was very expensive as the Rand was very weak despite lower international prices.

• The volatile exchange rate made imports expensive.

• Increase in electricity tariffs increased input costs for farmers and milk processors.

The above factors have influenced retailers to increase operating costs for the entire milk value chain, which necessitated retailers to increase the dairy milk and other dairy products which consumers purchase at a hefty price. Lakew [9] opines that the dairy farmer’s profitability on their products are negatively affected; a reduction in the production of milk and unfavorable balance of trade can be originated on the decline in the production of milk (Figure 2).

Transporters collect and transport bulk raw milk from farms to processing plants, usually situated in towns. In Zimbabwe, the transport system is dominated by the National Dairy Co-operative (NDC), an organized farmers’ co-operative transport organization. The transporters use refrigerated bulk tanks to ensure that the quality of milk is maintained. The major processing companies are Dairibord Zimbabwe Private Limited (DZPL), Dendairy (Pvt) company, and Nestle Zimbabwe, which add value to raw milk by being processed into various milk products such as yogurt, cheese, pasteurized milk, ice cream, and butter.

4. Risks in dairy value chains

The complex dairy value chain comprises dairy farmers, transporters, processors, wholesalers, retailers, and consumers who use milk products created in the value chain [10]. The dairy supply chain is vulnerable to disruptions from numerous risks as it involves many stakeholders. Risks may arise from any component within its supply chain. According to Gertenbach [11], environmental factors which include temperature, rainfall (quantity and distribution), sun hours, and soil types contribute significantly to livestock production. Climate change has negatively affected the SADC region’s dairy farmers and industry in particular. For instance, the increased temperatures have decreased the dry matter intake for animals, reproductive performance declined, and the overall productivity declined. Heat stress impairs milk production, reproductive performance, metabolic and health status, and immune response. The dairy cows are less productive in the event of increased temperature levels. Hence, cows that are experiencing extreme heat are identified by the signs of the reduced feed intake, which directly contributes to the decreased milk yield. The extreme climatic variations which are prevalent in the SADC region have both direct and indirect impacts on the dairy cattle where the following have been identified:

• Fodder and pasture yields decreased,

• Increased susceptibility to diseases,

• Shortage and increased feed costs.

• Infrastructural destruction, and

• Cost increase due to overutilization of energy.

The main risks associated with Zimbabwe dairy include financial, technology, political unrest, policy barrier, and natural disasters.

4.1 Financial risks

To purchase the required infrastructure in the dairy industry requires large sums of money [12]. The high perishability of milk requires dairy farmers to make substantial capital investments right from production up to sale. The procedure to secure finance in Zimbabwe is burdensome and highly bureaucratic and complex [12]. Credit providers have become more risk-averse and are equally reluctant to offer loans to farmers producing on land that lacks collateral value. Women entrepreneurs are adversely affected where banks demand collateral security in the form of property in urban areas for them to access business loans. Fewer women than men own fixed assets [13]. High lending rates of up to 14% [14] make the cost of capital expensive. Available financing is more suitable for short-run farming projects, while there is limited availability of medium to long-term finance for the broader agricultural sector. Resultantly, farmers are unwilling to make long-term investments in dairy farming leaving Zimbabwe food insecure [15].

4.2 Input risks

The most important dairy component is the livestock itself—the heifers. Building the dairy herd takes long gestation periods of up to 9 months. The long gestation makes it difficult to grow the herd much faster to boost milk output. In like manner, dairy farmers incur high costs to breed or purchase heifers which become a production constraint [12]. An equally important input is electricity provided by a state-owned monopoly, the Zimbabwe Electricity Supply Authority (ZESA). The frequent disruptions in power supplies have seen a decrease in capacity utilization in the agricultural sector which, in turn, affects capacity utilization simultaneously fuelling input costs in the dairy industry as the dairy processors have to consider other sources of power like generators to prevent disruptions in their production lines [16]. The high-input costs push the price of the final milk products up.

Furthermore, the Zimbabwe dairy industry has very high labor costs negatively affecting viability. An increase in labor costs reduces returns, and income earned may not be adequate to cover costs [17]. Zimbabweans are among the heavily taxed in the world. Currently, above paying taxes to the Zimbabwe Revenue Authority, dairy producers pay levies to the Dairy Services Department, Environmental Management Authority, Agriculture Marketing Authority, Local Authorities, and Zimbabwe National Water Authority, among others [18].

4.3 Political risks

The poor performance in the agricultural sector is also as a result of poor government policies. During the period from 1998 to 2000, Zimbabwe experienced negative economic growth. There was political instability in Zimbabwe following the fast track land reform program. The political instability negatively affected milk production as large-scale commercial dairy farmers were among those who lost their farms land invaders [19]. Following the implementation of the fast track land reform, cattle population declined. It is estimated that the dairy herd was reduced by 50% from what it was before the land reform program in year 2000. Land tenure security is threatened by lack of title deeds, and therefore, dairy farmers are not prepared to make long-term investments, negatively affecting milk quantity and quality [20]. Political commitment to creating an enabling environment for investment growth in Zimbabwe is questionable and uninspiring [21].

The other challenge that local farmers face is their limited capacity to influence policy outcomes. Intervention by NGOs is heavily restricted by the restrictive political environment. Governance concerns continue to block any progressive success made toward foreign interventions in the form of assistance from emergency interventions to long-term development support.

4.4 Competition risks

The high costs of breeding dairy cattle translate to very uncompetitive raw milk which costs US $0.62 per liter compared to neighboring South Africa and Kenya, which costs US$0.40 and US \$0.30, respectively [22]. There is fierce competition emanating from the influx of foreign milk and milk products from plants in Europe and South America, which is choking the dairy industry to date [23]. Most dairy products from South Africa are threatening the agricultural sector, thereby prompting dairy farmers and processors to come up with initiatives that promote the buying and consumption of locally produced dairy products to mitigate the unfair competition from foreign dairy products [24, 25].

4.5 Natural disaster risks

The disastrous drought which affected the SADC region between the period of 2015 and 2017 has negatively affected the already ailing agricultural sector (commercial, small holding, and subsistence) which left farmers financially distressed. The intensity and magnitude of drought which struck South African farmers including dairy farmers were beyond their world-class disaster contingency plans. Even though South African farmers are recognized as the best in the world in terms of their planning and production and risk assessment and planning, they did not cope with the disaster. The extreme risk to the dairy production and its value chain is associated with the climatic variations with mostly the variable weather conditions more especially droughts. The recent slow-onset disaster (drought) directly affects both rain-fed and irrigated pastures, as well as prices of purchased feeds. The climatic risks also encapsulate erratic rainfall patterns, heavy rainfall and floods, and heat waves. Extreme weather conditions have negative repercussions which include damage to water and energy infrastructure; outbreaks of pests and diseases; high costs of energy for cooling under hot conditions; and disruption of transport of perishable milk due to road and bridge destruction.

While all countries suffer from disasters, low-income countries are more susceptible to the impact of disaster risks. The natural and manmade disaster risks have severely disrupted dairy production, thereby leading to increased prices of dairy produce, decreased sales, and created perpetual vulnerability. Unexpected climate change affecting Zimbabwe and other southern African countries are exposing dairy farmers to both production and marketing risks. They tend to affect many farms and dairy processing firms. Secondary data available on climatology such as rainfall pattern erraticism and extreme weather events in Zimbabwe show that the country is already experiencing the effects of climate change [26].

The unbearably high temperatures extended Zimbabwe’s dry regions that are less productive, thereby shrinking the main farming regions. These human-induced climate changes are caused by the greenhouse effect [27] and mostly affect African countries like Zimbabwe resulting in food insecurity. The challenges posed by unforeseen climate changes are depleting the most essential natural resource, water. It is increasingly becoming difficult to sustain viable agriculture given such harsh, unpredictable weather conditions for many agro-based economies like Zimbabwe. Rain-fed agriculture is becoming less reliable to maximize agricultural productivity.

Zimbabwe, being an agro-based economy, faces severe threats from these climatic changes. Dairy farming, in particular, thrives well in regions which record high rainfall. Zimbabwe, in particular, is at risk and is vulnerable to these new climatic conditions because it heavily relies on rain for its agricultural activities [28]. These erratic rainfall patterns and dry spells are impacting negatively on the productivity of dairy farms. The low rainfall experienced in Zimbabwe country makes dairy cows breeding more difficult by the day as there are changes in feed resources [29].

Over a million cattle starved to death as a result of the 1991/1992 drought [30, 31]. The impact of the drought was felt by individual farmers, as well as all the industries dependent on agricultural raw materials such as milk and beef processing [31]. The 2015/2016 drought threatened food security in Zimbabwe as thousands of cattle starved to death due the drought [32]. Grazing conditions remained poor in most of the southern half of the region [32]. The foot-and-mouth disease (FMD) of year 2015 also contributed to the calamity as it resulted in a decline in the national herd [33].

4.6 Technology risks

Poor technology in Zimbabwe, among other factors, has adversely affected capacity utilization in the milk processing industry [34]. Dairy farmers face technological risks as they have problems cooling milk in areas without electricity, adversely affecting the quality of milk. Consequently, some farmers use manual milking which is quite difficult for large herds. Low agricultural output is, therefore, attributed to the low capital endowment (Zimbabwe Vulnerability Assessment Committee [35]).

5. Risk management strategies employed by stakeholders

Various strategies which can be harnessed in order to increase domestic milk production and yield a positive contribution to the economy include, inter alia:

• Prioritizing increasing the number of dairy farmers without emphasizing changing the average milk production per cow or farm.

• Emphasizing the increasing yields per cow milk rather than expanding the population of dairy farmers.

• Increasing the total number of the milking herd (cows) without changing dairy farms.

• Increasing the number of dairy farms, the size of the milking cows, and per cow production combined.

• Reforming small holding dairy farms to larger farms and “mega farms.”

• To eliminate wastage at the production plant (farm) and by the consumer.

• To avoid the high mortality rates of young stock.

• The development of a national breeding center.

• The importation of breeding heifers.

• To have a skilled labor force.

There is no straight solution to manage risks. Each value chain possesses its uniqueness; so, the criterion for management differs from others. Various risk mitigation strategies to mitigate the risks associated with the dairy value chain are explored in this section. The dairy farmers have utilized various mitigation strategies. These strategies include the use of smaller dairy breeds like Jersey, growing fodder crops, and the utilization of crop residences.

Furthermore, the low-cost to high-cost adaption strategies have been utilized to counter heat stress on dairy cattle productivity and reproductive performance. The low-cost measures employed by farmers include reducing overcrowding, maximizing shade, improving ventilation, and high-cost measures included the designing and installation of thermos air conditioning. Both adaptation and mitigation strategies were utilized by dairy farmers to ensure that production and productivity inputs are at an optimal level. Sprinkler fans, changing the feeding periods to coincide with the cooler times of the day and reducing the exertion required by animals to gain access to food, minerals, and water are the mitigation strategies that were being employed by farmers.

To fully implement the above strategies dairy farmers relied on collaboration, legislation and policy, education and training, insurance, technology, and international assistance [15]:

5.1 Collaboration

A plethora of commentators [36, 37, 38] opine that a key strategy to effectively mitigate risk on dairy supply is through collaboration among key stakeholders. Such key stakeholders from diverse sectors and disciplines including leaders of government ministries, NGOs, and private sector organizations play a pivotal role in risk reduction. The collaboration and partnership of stakeholders yields positive results as partner organizations share skills, technical knowledge, information and resources, experiences, and best practices resulting in saving money due to elimination of duplications and wastage. Collaboration is also evident in Zimbabwe’s dairy sector. The Zimbabwe farming community has formed collaborations with NGOs to try and mitigate exposure to risk. There are many NGOs providing assistance in the agrarian sector in Zimbabwe of which Technoserve, Land O’Lakes, European Union, United States Agency for International Development (USAID), and Zimbabwe Agricultural Competitive Program (ZimACP) are active in providing support and assistance to the dairy farming sector [21].

NGOs such as Land O’Lakes partner National Association of Dairy Farmers (NADF) train community livestock workers in dairy management [39]. Likewise, milk processing companies, Dairibord Zimbabwe Holdings, Nestle Zimbabwe, and Dendairy develop small, medium, and large-scale farmers across the country through heifer programs to boost milk production [40]. The livestock was distributed to farmers in an effort to ensure continuity of supply across the supply chains. According to the Dairibord Holdings Annual [40], this milk supply intervention has realized benefits as it has contributed 8% to the milk supplies for Dairibord Zimbabwe.

5.2 Legislation

Disaster legislation is one of the instruments that can highlight the efforts and commitment a country has in disaster reduction and management practices. This section highlights the legal and institutional framework that deals with risk reduction and management in Zimbabwe. The Civil Protection Department is tasked with the mandate of preparing for and providing for prevention where possible, as well as mitigating the effects of disaster whenever it occurs, through the Civil Protection Act of 2001 [41]. This was a reflection of the government’s commitment to disaster management [42]. The Civil Protection Act of 2001 resulted in the setting up of a Civil Protection Department under the flagship of the Ministry of Local Government, Rural and Urban Development [43]. Besides the Zimbabwe Civil Protection Unit efforts, there has been an increased focus on disaster risk reduction (DRR) by other sectors of government. The Zimbabwean Civil Protection Act is complimented by other acts: Environmental Management Act (20:27), the Rural District Councils Act (29:12), the Urban Councils Act (29:14), the Water Act No. 31 of 1998, the Defence Act (11:02), the Police Act (11:10), and the Public Health Act (15:09) [44].

5.3 International assistance

Zimbabwe is among the top 40 recipients of disaster risk reduction (DRR) financing from humanitarian organizations. However, there is still a concentration of DRR financing by these humanitarian organizations within the top four recipients (Pakistan, India, Indonesia, and Bangladesh) [45]. The farming community has formed collaborations with international NGOs to try to mitigate exposure to risk. There are many NGOs providing assistance in the agrarian sector in Zimbabwe of which Technoserve, Land O’Lakes, European Union, USAID, and Zimbabwe Agricultural Competitive Program (ZimACP) are active in providing support and assistance to the dairy farming sector [21]. The activities of these organizations are coordinated by the Food and Agriculture Organization.

5.4 Policy

In a plight to increase agricultural activity and curb the risks posed by natural hazards in Zimbabwe, various stakeholders have formulated the Comprehensive Agricultural Policy Framework (2012–2032) [46]. Due to changes in the socio-economic environment, such as the land reform program, there has been a need to review the national agricultural policy. The policy is aimed at, among other issues, increasing production and productivity of livestock and improved animal health and welfare in the country [46]. The Comprehensive Agricultural Policy Framework also recommended agricultural subsidies so that local farmers will be able to compete with imports. Despite these noble efforts, a gap still exists concerning agricultural policy formulation and implementation which will guide any programs directed toward mitigation of natural hazards and meteorological disasters like drought. Zimbabwe has to date made many attempts to create a comprehensive agricultural policy, which have remained in draft form to date [21].

5.5 Education and training

Education and training strengthen all aspects of risk management at all the stages in the risk management cycle. Risk management (RM) education can be introduced in school curricula. Zimbabwe has successfully integrated DRR and emergency preparedness into its education system. Education would be a handy strategy with most dairy farmer’s literate (96%) and are able to interact with providers of farmer training courses [47]. Similarly, conferences compliment formal education and workshop training [48].

5.6 Insurance

Zimbabwe has a total of 25 registered insurance companies and 15 insurers, representing about 60%, which currently provide agricultural insurance [49]. However, there is a low penetration of agricultural insurance products in the country. Furthermore, insurers do not provide specialized agricultural insurance packages. Insurance enables the farmers to transfer risks to insurance companies [50]. Insurance reduces individual loss exposure, thus spreading risks by collecting premiums from many individuals and paying for damage caused by natural disasters that are very large for individual households and companies. Agricultural insurance policies cover against a many risks including drought, floods, heat waves, and other natural disasters. One such insurance by Zimnat Lion Insurance, Zimnat Livestock Insurance, insures farmers against fire, theft, lightning, explosion, and death of livestock [51].

5.7 Technology

Most dairy farms in the developed world make use of emerging technologies to improve efficiency and profitability in dairy enterprises. In particular, automation technology is used to improve profitability, milk quality, reduce costs of production, and improved animal welfare. These new automated technologies have incorporated computers and cellphones application to manage milk production and animal health. Various technologies recommended to dairy farmers in Zimbabwe were first tested on demonstration plots before they were adopted across the country. However, adoption of these technologies was a hurdle to poor farmers because of resource unavailability [52].

5.7.1 Emerging technologies and benefits in the dairy industry

The dawn of the agricultural revolution which is engrained on technology has increased efficiency and profitability in the South African and Zimbabwean dairy industry. The introduction of technology has boosted milk yields, enhanced milk quality, and reduced the costs associated with producing white stuff. Table 1 depicts emerging technologies and benefits in the dairy industry.

TechnologyBenefits
Cow collars
• Track and collect data on the health, habits, and happiness of the herd.

• Data can be accessed anywhere by using modern devices including laptop or smartphones.

• Share abnormal information with a vet.

• Detect illness and respond early.

• Detect when the cow is in heat.

• Boost chances of healthy pregnancies which enhance milk production.

Drone technology
• Monitor the location of the herd.

• Monitor the entire farm and identify early risks including:

• Intruders.

• Stock thieves.

• Identify perimeters that need repair.

• Identify areas of dry land that require irrigation.

• Monitor the entire farming business.

Facial recognition technology
• Using details such as:

• Pelt patterning.

• Distance between the ages and length of face.

• Detect each cow in a dairy farmer’s herd.

• Send alerts when a cow behaves erratically:

• Walking irregularly or missing feeds.

• Track the link between each cow’s food intake and their milk production.

Robotic milking technology
• Enhanced milk yields.

Table 1.

Emerging technologies and benefits in the dairy industry.

The abovementioned technologies assist the dairy industry production as there is a scarcity of committed labor in both the developing and developed countries. Furthermore, such new technologies save time and reduce labor expenses, thus increasing efficiency, productivity, and profits.

6. Conclusion

This chapter espoused the high level of preparedness and resilience by dairy farmers during and in the aftermath of droughts to selected countries. It is observed in this chapter that while drought effects have paralyzed the dairy industry, the demand of dairy products has remained constant. The increase of the demand of the dairy industry has improved the quality of life of people as it provided formal and seasonal employment. Moreover, it also increased competition among the dairy farmers coupled with profits gained. Consumers also benefited as they have purchased quality dairy products which were influenced by the competition among dairy industries. This chapter has depicted the adverse effects of drought which have affected the dairy supply value chain from the grazing fields, herd health and productivity, infrastructure, economy, and resource availability. Various technological inventions and applications have been seen as beneficial to dairy farmers which has increased the health and productivity of cows, monitoring of the entire business and detection strategies which have increased cow milk yields. The technological, financial, political, and natural disasters and input risks have been the dominant risks in the dairy supply chain and have had catastrophic effects on consumers. Various risk mitigation strategies have been implemented to mitigate the risks associated with the dairy supply chain that includes collaboration, legislation, policy, education and training, technology insurance, and international assistance. However, most strategies failed because of unavailability of resources to fully implement them.

A major limitation in this study is methodological in nature as this chapter only employed a document analysis. This research method makes it difficult to test the reliability and validity of the findings as inferences cannot be used to other countries. It is advisable for future researchers to employ various methodologies and approaches in both countries where reliability and validity testing will be conducted.

chapter PDF

More

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

How to cite and reference

Cite this chapter Copy to clipboard

Chari Felix and Ngcamu Bethuel Sibongiseni (June 3rd 2019). A Synthesis of Risks in Dairy Value Chains in Southern Africa: Cases of South Africa and Zimbabwe [Online First], IntechOpen, DOI: 10.5772/intechopen.84573. Available from:


text:
# How do you divide ( -4i+2) / (i+7) in trigonometric form?

In trigonometric form : $0.632 \left[\cos \left(- 71.565\right) + i \sin \left(- 71.565\right)\right]$
$\frac{- 4 i + 2}{i + 7} = \frac{\left(- 4 i + 2\right) \left(i - 7\right)}{\left(i + 7\right) \left(i - 7\right)} = \frac{- 4 \cdot {i}^{2} - 14 + 30 \cdot i}{{i}^{2} - {7}^{2}} = \left(- \frac{1}{50}\right) \cdot \left(- 10 + 30 i\right) = 0.2 - 0.6 i$. Let $Z = 0.2 - 0.6 i$ Modulas Z= $\sqrt{{0.2}^{2} + {\left(- 0.6\right)}^{2}} = .632$ Argument Z $\theta = {\tan}^{-} 1 \left(\frac{- 0.6}{0.2}\right) = {\tan}^{-} 1 \left(- 3\right) = - {71.565}^{0}$ Hence Z expressed in trigonometric form: $0.632 \left[\cos \left(- 71.565\right) + i \sin \left(- 71.565\right)\right]$[Ans]


text:
paddle.nn.functional. adaptive_avg_pool2d ( x, output_size, data_format='NCHW', name=None ) [source]

Applies 2D adaptive avg pooling on input tensor. The h and w dimensions of the output tensor are determined by the parameter output_size.

For avg adaptive pool2d:

$\begin{split}hstart &= floor(i * H_{in} / H_{out}) \\ hend &= ceil((i + 1) * H_{in} / H_{out}) \\ wstart &= floor(j * W_{in} / W_{out}) \\ wend &= ceil((j + 1) * W_{in} / W_{out}) \\ Output(i ,j) &= \frac{\sum Input[hstart:hend, wstart:wend]}{(hend - hstart) * (wend - wstart)}\end{split}$
Parameters
• x (Tensor) – The input tensor of adaptive avg pool2d operator, which is a 4-D tensor. The data type can be float32 or float64.

• output_size (int|list|tuple) – The pool kernel size. If pool kernel size is a tuple or list, it must contain two element, (H, W). H and W can be either a int, or None which means the size will be the same as that of the input.

• data_format (str, optional) – The data format of the input and output data. An optional string from: “NCHW”, “NHWC”. The default is “NCHW”. When it is “NCHW”, the data is stored in the order of: [batch_size, input_channels, input_height, input_width].

• name (str, optional) – For detailed information, please refer to Name. Usually name is no need to set and None by default.

Returns

Tensor, The output tensor of avg adaptive pool2d result. The data type is same as input tensor.

Examples

# adaptive avg pool2d
# suppose input data in shape of [N, C, H, W], output_size is [m, n],
# output shape is [N, C, m, n], adaptive pool divide H and W dimensions
# of input data into m * n grids averagely and performs poolings in each
# grid to get output.
# adaptive avg pool performs calculations as follow:
#
#     for i in range(m):
#         for j in range(n):
#             hstart = floor(i * H / m)
#             hend = ceil((i + 1) * H / m)
#             wstart = floor(i * W / n)
#             wend = ceil((i + 1) * W / n)
#             output[:, :, i, j] = avg(input[:, :, hstart: hend, wstart: wend])
#


text:
Doping: Connectivity of Semiconductors

Learning Objective

• Examine the method of doping a pure semiconductor in order to increase its electrical conductivity.

Key Points

• Semiconductors are doped to generate either a surplus or a deficiency in valence electrons.
• Doping allows researchers to exploit the properties of sets of elements, referred to as dopants, in order to modulate the conductivity of a semiconductor.
• There are two types of dopants, n-type dopants and p-type dopants; n-type dopants act as electron donors, and p-type dopants act as electron acceptors.
• Combining n-type and p-type semiconductors creates systems which have useful applications in modern electronics.

Terms

• dopingThe addition of small quantities of an element (an impurity) to a pure semiconductor to change its electrical conductivity characteristics.
• n-type semiconductorA doped semiconductor in which conduction is due to the movement of additional electrons.
• p-type semiconductorA doped semiconductor in which conduction is due to the movement of positively-charged holes.

Electrical Conduction in Solids

There are two general categories of semiconductors: intrinsic semiconductors, which are composed of only one material, and extrinsic semiconductors, which have had other substances added to them to alter their properties. In semiconductor production, the process of creating extrinsic semiconductors by adding substances to a pure semiconductor for the purposes of modulating its electrical properties is known as doping. Semiconductors are doped to generate either a surplus or a deficiency in valence electrons.

Energy Bands in Solids

Electrons in free atoms have discrete energy values. In contrast, the energy states available to the free electrons in a metal sample form a continuum of "energy bands." In the atomic lattice of a substance, there is a set of filled atomic energy "bands" with a full complement of electrons, and a set of higher energy unfilled "bands" which have no electrons. The highest energy band contains valence electrons available for chemical reactions. The conduction band is the band above the valence band. Electrons in the conduction band are free to move about in the lattice and can conduct current. In order for a substance to conduct electricity, its valence electrons must cross the band gap, which is the energy gap between the valence band and conduction band.

If the gap between the valence and conduction bands is large, then the substance does not conduct electricity easily (it is an insulator). On the other hand, these bands overlap in metallic samples, which make these samples excellent conductors of electricity. In the case of semiconductors, the gap is small enough for electrons to jump to the conduction band due to thermal or some other excitation.

Because the band gap is so small for semiconductors, doping with small amounts of impurities can dramatically increase the conductivity of the material. Doping, therefore, allows scientists to exploit the properties of sets of elements referred to as "dopants" in order to modulate the conductivity of a semiconductor.

Semiconductor Doping

There are two types of dopants, n-type ("n" for negative), and p-type ("p" for positive) dopants. n-type dopants act as electron donors and have extra valence electrons with energies very close to the conduction band. When incorporated into the atomic lattice of a semiconductor, the valence electrons of n-type dopants can be easily excited to the conduction band. p-type dopants assist in conduction by accepting electrons. When a p-type dopant is incorporated into the atomic lattice of a semiconductor, it is able to host electrons from the conduction band, allowing the easy formation of positive holes.

Generating an n-Type Semiconductor

When doping a semiconductor, such as the group IV element silicon (Si), with arsenic (As), a pentavalent n-type dopant from group V in the periodic table (which has one more valence electron than the semiconductor), the dopant behaves as an electron donor. When this occurs, an atom of dopant replaces an atom of silicon in the lattice, and therefore an extra valence electron is introduced into the structure. The fifth valence electron of As creates a surplus of electrons. When just a few atoms of the dopant replace silicon atoms in the lattice, an n-type semiconductor is created. The newly created semiconductor is better able to conduct current than the pure semiconductor.

Generating a p-Type Semiconductor

When a group IV semiconductor is doped with a p-type trivalent group III dopant (such as boron, B), which has one less valence electron than the semiconductor, the dopant acts as an electron acceptor. When a few atoms of trivalent dopant replace silicon atoms in the lattice, a vacant state (or electron "hole") is created and can act as electron carrier through the structure, which creates a p-type semiconductor. p-type semiconductors are characterized by a deficit of electrons and positive holes, which have the same effect as a surplus of positive charge. These positive holes accept electrons, rendering the semiconductor more effective at conducting current.

The p-n Junction

When we place p-type and n-type semiconductors in contact with one another, a p-n junction is formed. p-n junctions are basic components of most common electrical devices. While semiconductors doped with either n-type dopants or p-type dopants are better conductors than intrinsic semiconductors, interesting properties emerge when p- and n-type semiconductors are combined to form a p-n junction.

If no electricity is being passed through the system, then no current passes through the junction between n- and p-type semiconductors. In this scenario, the surplus of electrons from the n-type semiconductor and the deficiency in electrons from the p-type semiconductor combine to create a depletion region. In this state, the system is said to be at equilibrium. However, if the cathode of a battery is connected to the p-type semiconductor, and the anode is connected to the n-type semiconductor, the system is said to be "forward biased." In this scenario, electrons flow from the anode toward the cathode pole and charge flows across the junction. If the connectivity is reversed, with the battery anode connected to the p-type semiconductor and the cathode connected to the n-type semiconductor, the system is said to be "reverse biased" and negligible charge flows across the junction. Combining n-type and p-type semiconductors creates a system which has useful applications in modern electronics.

Electronic devices and instruments, such as digital alarm clocks, mp3 players, computer processors, and the electronics in cell phones, all take advantage of semiconductor technology. Doping provides a way to modulate the properties of semiconductors that have broad applications in daily life.


text:
Is the relationship $\vec{D} = \epsilon \vec{E}$ always valid?

In electromagnetism class we had a problem proposed which led me to some thoughts about the relationship between $$\vec{D}$$ and $$\vec{E}$$. I know it certainly $$\textbf{is}$$ a definition so it must be true always but let me explain:

In this excercise we have a spherical capacitor (inner radius $$r_1 < r_2$$ outer radius) with a dielectric permittivity $$\varepsilon = \varepsilon_0 \left( k_1 + k_2 \cos^2 \theta \right)$$, which is obviously dependent on the spherical coordinate $$\theta$$. A conductor is an equipotential surface so the electric potential $$V$$ can't depend on $$\theta$$. If we assume the inner terminal is positive charged with $$Q$$, we can compute: as $$\vec{\nabla}\cdot \vec{D} = \rho$$, we have $$\vec{D} = \frac{Q}{4\pi r^2}$$ and $$Q = \int \int_S \vec{D} \cdot \hat{n} \mathrm{d}S'$$ = $$\int \int_S \varepsilon \left(\theta\right) E(r) \mathrm{d}S' = 4 \pi \varepsilon_0 E(r) r^2 \left( k_2 + k_2/3 \right)$$, so $$\vec{E} = \frac{Q}{4\pi \varepsilon_0 r^2} \frac{1}{\left( k_2 + k_2/3 \right)} \neq \varepsilon\left(\theta \right)^{-1} \vec{D}$$. I know this makes sense, as because of the simmetry of this problem, the displacement field cannot depend on $$\theta$$ and, because of the fact that $$V$$ doesn't depend on $$\theta$$, $$\vec{E}$$ has only a radial component and also independent on $$\theta$$.

What is happening? Why is $$\vec{D} \neq \varepsilon(\theta) \vec{E}$$?

• Unless you are told that the medium is Linear, Isotropic and Homogeneous, then you cannot assume that $\mathbf {D} = \epsilon \mathbf{E}$. Your medium is certainly not homogeneous. – Rob Jeffries Feb 22 at 13:41
• Also, why do you assume that the D-field cannot be a function of $\theta$ ? The situation clearly is not spherically symmetric. – Rob Jeffries Feb 22 at 13:52
• @RobJeffries as far as I know, the displacement field depends on free charges, given by the relation $\vec{\nabla} \cdot \vec{D} = \rho$, by definition. So from $\vec{D}$'s point of view it is certainly symmetric. – Patrick Feb 22 at 17:54
• You also cannot assume that the free charges are distributed uniformly on the conductors. – Rob Jeffries Feb 22 at 18:14
• I retract my comment about homogenity. Linear and isotropic is sufficient. – Rob Jeffries Feb 22 at 19:19

$$\mathbf D=\epsilon \mathbf E$$ is only valid for when there material is a linear dielectric that is isotropic and homogeneous. In your case this is not valid with your $$\theta$$ dependence, so this is why you do not see this relationship.

Remember, $$\mathbf D$$ is defined as $$\mathbf D=\epsilon_0\mathbf E+\mathbf P$$

When you have the properties described above, you then have $$\mathbf P=\epsilon_0\chi\mathbf E$$ which gets you to what you were proposing $$\mathbf D=\epsilon_0\mathbf E+\epsilon_0\chi\mathbf E=\epsilon\mathbf E$$

• Even if the medium is not homogeneous, the constitutive relation $\mathbf{D}(\mathbf{r}) = \epsilon(\mathbf{r})\mathbf{E}(\mathbf{r})$ still holds for each point $\mathbf{r}$ (provided that the medium is isotropic and that the electromagnetic response is local). Thus, in this problem, the constitutive relationship must hold for each point in the dielectric layer. Any violation of this indicates a problem with the way in which the fields were computed. – jamison Feb 22 at 18:29
• This is incorrect. ${\mathbf D}= \epsilon {\mathbf E}$ works fine for ths question. – Rob Jeffries Mar 10 at 17:52
• @RobJeffries I agree; I was hasty in the posting of my answer. Unfortunately, I cannot delete it as the OP has already accepted the answer. – BioPhysicist Mar 10 at 17:56
• Hmm. Awkward... – Rob Jeffries Mar 10 at 17:58

Since $$\vec D$$ is a response of a medium to the applied electric field it can differ along each direction i.e the response is not isotropic. Thus in general $$\vec D$$ is given by the following: $$\vec D =\epsilon_0\overleftrightarrow \chi \vec E$$ where $$\overleftrightarrow \chi$$ is the susceptibility tensor. This is still under the linear response regime. For non-linear regime you may have complicated dependence of $$\vec D$$ on $$\vec E$$.

• Even for linear case your expression is not 'general' - spatial/temporal dispersion could be present. – Cryo Feb 23 at 0:26
• Yes. But the tensor can have a functional dependence to express that. – Superfast Jellyfish Feb 23 at 4:34
• It could, thats my point, but this is not what you wrote in the post. – Cryo Feb 23 at 10:25

Whilst I think you can assume that the electric field is only radial and with a magnitude that depends only on radius (because of the equipotentials and the requirement that the E-field is normal to the conducting surfaces), I don't think you can assume the same for the D-field.

If we assume that $$\vec{E} = E_r(r) \hat{r}$$ and a linear dielctric, then the integral form of Gauss's law applied to a spherical surface of radius $$R$$ passing through the dielectric, tells us $$Q = \oint \vec{D} \cdot d\vec{A} = \int^{2\pi}_0 \int^{\pi}_0 \epsilon(\theta) E_r(R) R^2 \sin \theta\ d\theta\ d\phi$$

In this case $$\epsilon(\theta) = \epsilon_0 (k_1 + k_2\cos\theta)$$. So $$Q = 2\pi \epsilon_0 E_r(R)R^2 \int^{\pi}_0 k_1 \sin \theta + \frac{1}{2}k_2\sin(2\theta)\ d\theta = 4\pi k_1 \epsilon_0 E_r(R)R^2$$

Thus $$\vec{E} = \frac{Q}{4\pi k_1 \epsilon_0 r^2}\ \hat{r}$$

Assuming a linear, isotropic medium, then $$\vec{D} = \epsilon \vec{E} = \frac{(k_1 + k_2 \cos \theta)Q}{4\pi k_1 r^2}\ \hat{r}$$

If you integrate this over a spherical surface, you will of course find that it comes to $$Q$$, but the fact that $$\vec{D}$$ depends on $$\theta$$ is telling you that the charge is not uniformly distributed over the surfaces.

If we zoom in on a piece of the inner sphere (so close that it looks flat) and draw a Guassian pillbox straddling the inner conductor surface, then we can say that, since there is no D-field inside the conductor, then if the charge per unit area is $$\sigma$$, $$\vec{D}(r_1) \cdot d\vec{A} = \sigma \ dA$$ i.e. $$\sigma = D(r_1) = \epsilon E = \frac{(k_1 + k_2 \cos \theta)Q}{4\pi k_1 r_1^2}$$

Thus I think the root cause of your difficulties is assuming that the D-field has no $$\theta$$ dependence and that the charge is uniformly distributed on the conductors.

As to what circumstances you can assume $$\vec{D} = \epsilon \vec{E}$$, though that is a red herring in the case of this question, it is that the medium must be linear and isotropic. Note the comment by @jamison , you can still use the linear relationship at each point even in an inhomogeneous medium.


text:
Solve they system of equations by graphing x+2y=6, 2x+4y=36

You won’t have to graph these equations in order to solve them.

Ok, x+2y=6, therefore x=6-2y.

2x+4y=36, so plug the value x (in terms of y) right into this equation.

2(6-2y)+4y=36

12-4y+4y=36. 12 is not equal to 36 so the problem breaks down.

$$\left\{\begin{array}{ccc}x+2y=6\\2x+4y=36\end{array}\right.\\====================\\\\x+2y=6\\y-intercept\ (x=0)\\0+2y=6\\2y=6\\y=3\to(0;\ 3)\\x-intercept\ (y=0)\\x+2(0)=6\\x=6\to(6;\ 0)\\-$$

$$2x+4y=36\\y-intercept\ (x=0)\\2(0)+4y=36\\4y=36\\y=9\to(0;\ 9)\\x-intercept\ (y=0)\\2x+4(0)=36\\2x=36\\x=18\to(18;\ 0)$$

$$The\ graph\ on\ the\ picture. \\\\Th lines\ are\ parallel. \ Conclusion: NO\ SOLUTION$$

RELATED:


text:
# The initiation of explosion by neutrons, α-particles and fission products

@article{Bowden1958TheIO,
title={The initiation of explosion by neutrons, $\alpha$-particles and fission products},
author={Frank Philip Bowden},
journal={Proceedings of the Royal Society of London. Series A. Mathematical and Physical Sciences},
year={1958},
volume={246},
pages={216 - 219}
}
• F. P. Bowden
• Published 1958
• Materials Science
• Proceedings of the Royal Society of London. Series A. Mathematical and Physical Sciences
Crystals of lead azide, silver azide, cadmium azide, silver acetylyde and nitrogen iodide have been irradiated with electrons, fission products, α-particles, and radiation (Bowden & Singh 1954). All these substances are exploded by an inten electron stream, but this is apparently a thermal effect. Nitrogen iodide exploded by fission products and by α-particles but it is exceptional. None of the other crystals explode, although nucleation and other changes occur in the Some typical results are… Expand
5 Citations
Initiation of Explosives by High‐Energy Electrons
With very short and very intense pulses of fast electrons such as from a Febetron machine, many explosives can be initiated at doses clearly insufficient for uniform heating to initiationExpand
RADIATION EFFECTS IN INORGANIC SOLIDS
• Materials Science
• 1966
Publisher Summary This chapter focuses on the radiation effects in inorganic solids. The radiation effects observed in inorganic solids are not always the result of decomposition, or at leastExpand
Crystal sensitivities of energetic materials
• Materials Science
• 2006
Abstract Organic and inorganic explosives were first developed and put into service in the 19th century, before there was much understanding of how the energy release mechanisms differed from thoseExpand
The structure, thermodynamic instability and energetics of NI3, its specific impulse and a strategy for its stabilization
• Chemistry
• 2021
Abstract The present work is dedicated to deepen the causes of the physicochemical instability of NI3. As a support study, a theoretical investigation is performed. The quantum chemical calculationsExpand
Revisiting Bragg's X-ray microscope: scatter based optical transient grating detection of pulsed ionising radiation.
• Physics, Medicine
• Ultramicroscopy
• 2011
This work indicates use of optically scattering centres that can be formed with highly variable latencies in different materials and devices using ionising radiation to form the short-wavelength-to-optical-wa wavelength basis of a Bragg X-ray microscope. Expand


text:
# cannot use \caption under minipage

I am using following code to import two images next to each other. When \caption{} is used, LaTeX gives me error caption outside float.

\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{fig1.eps}
\caption{text for fig1}
\label{fig:fig1}
\end{minipage}
\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{fig2.eps}
\caption{text for fig2}
\label{fig:fig2}
\end{minipage}

When I remove the \caption from both places, the code compiles correctly.

\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{fig1.eps}
\label{fig:fig1}
\end{minipage}
\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{fig2.eps}
\label{fig:fig2}
\end{minipage}

But both the codes do not generate any label naming the figure. (something like Figure 21).

Am I missing anything?

To place a caption outside a floating environment, you can use \captionof from the capt-of or caption packages::

\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}

\begin{document}

\noindent\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{fig1.eps}
\captionof{figure}{Some figure}
\label{fig:fig1}
\end{minipage}%
\begin{minipage}{.5\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{fig2.eps}
\captionof{figure}{Some figure}
\label{fig:fig2}
\end{minipage}

\end{document}

Notice the \noindent and % character I added to prevent undesired spacing.

• The command captionof is provided by every KOMA class, the package capt-of and the package caption – Marco Daniel May 26 '12 at 14:03
• so I have to add a package using \usepackage{caption}? because as it is, it is giving undefined control sequence error. – maths-help-seeker May 26 '12 at 14:07
• @maths-help-seeker yes, either caption (as I did in my example) or capt-of . – Gonzalo Medina May 26 '12 at 14:08
• @maths-help-seeker: Yes, but you can only do that in the document preamble. See Documents with typical LaTeX errors. – Werner May 26 '12 at 14:09
• ok thanks! it worked. It is also now showing the labels. :) – maths-help-seeker May 26 '12 at 14:10

You can also wrap a figure environment around your minipage, that way you do not need to use captionof or capt-of:

\begin{figure}[!htbp]
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{Images/img1.JPG}
\caption{cap1}
\label{fig:img1}
\end{minipage}\hfill
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{Images/img2}
\caption{cap2}
\label{fig:img2}
\end{minipage}
\end{figure}

• But this will in general allow the unit to float (despite all your !h). – Andrew Swann Feb 1 '18 at 12:40
• @AndrewSwann true, my assumption was, that two images in one minipage are meant to work like one composed image, where floating may be accepted:) – Abdulkadir Eroglu Feb 2 '18 at 13:59
• using [H] with \begin{figure}[H] or \begin{table}[H] will resolve the floating issue (enabled with \usepackage{float} if I recall correctly) – Gene Burinsky Nov 1 '18 at 21:09


text:
# Tag Info

There are two well-known distinguishers of reduced-rounds version of AES based on integral cryptanalysis. The first one is a 3-rounds distinguisher from Daemen and Rijmen while the other is a 4-rounds distinguisher from Gilbert and Minier. The 3-rounds distinguisher relies on the fact that one byte $y$ of the state in the third round is the xor of four ...


text:
# construct CW complex

How can I construct a CW complex A with H_0(A) = Z, H_2(A) = Z/4Z, H_4(A) = Z ⊕ Z and all other homology groups trivial? Any idea?

Thanks!

-
could you give some motivation? is this a homework question? the only reason I would think it is HW is because of the way you have written it. –  Sean Tilson Dec 16 '10 at 14:01
Let $f:S^2\to S^2$ be a map of degree $4$. Attach a $3$-cell $B^3$ to $Y=S^2$ using $f$ to glue the boundary $\partial B^3=S^2$ to $Y$. Then $Z=Y\cup_f B^3$ has homology given by $$H_q(Z)=\begin{cases} \mathbb Z, & \mbox{if }q=0; \\ \mathbb Z/\mathbb 4Z, & \mbox{if }q=2; \\ 0, & \mbox{otherwise.} \end{cases}$$ Now consider the connected sum $Z\vee S^4\vee S^4$.
NB: The interesting part is of course the construction of $Z$. If I recall correctly, you can find in Hatcher's book information regarding Moore spaces, of which $Z$ is a simple example.


text:
• Date: 09/10/2013
• Time: 12:30
Lecturer(s):
Location:

University of British Columbia

Topic:

A Multilevel Algorithm for L1 Minimization with Application to Sparse Representation of Signals

Organizers:

The area of sparse representation of signals is drawing tremendous attention in recent years in diverse fields of science and engineering. The idea behind the model is that a signal can be approximated as a linear combination of a few "atoms'' from a pre-specified and over-complete "dictionary'' (typically represented by columns from a matrix with more columns than rows). The sparse representation of a signal is often achieved by minimizing an L1 penalized least squares functional.

Other Information:

Location: PIMS Lounge, ESB 4133


text:
# November 2011 Archives

## A simple example where BP fails and OMP succeeds

On his fantastic blog, Dirk discusses a simple scenario where BP fails to recover the sparsest solution. His approach makes an overcomplete unit norm dictionary $$\MPhi$$ as a matrix containing the standard basis for $$\mathbf{R}^N$$ and two vectors that are nearly orthogonal to the measurements $$\vb := \mathbf{1}$$, but the span of which contains it, e.g.,

$\displaystyle A = \begin{bmatrix} c(1+\epsilon/2) & c(-1+\epsilon/2) & 1 & 0 & \dots & \dots &0\\ c(-1+\epsilon/2) & c(1+\epsilon/2) & 0 & 1 & \ddots & & 0\\ c\epsilon/2 & c\epsilon/2 & \vdots & \ddots& \ddots & \ddots& \vdots\\ \vdots & \vdots & \vdots & & \ddots & \ddots& 0\\ c\epsilon/2 & c\epsilon/2 & 0 & \dots& \dots& 0 & 1 \end{bmatrix}.$

where $$c = \left [ 2 + \frac{N \epsilon^2}{4} \right ]^{-1/2} = \frac{2}{\sqrt{8+N\epsilon^2}}$$ to make the first two columns unit norm.

## Recognition at last?

Dear Dr. Bob L. Sturm,

The international conference: 2012 3rd International Conference on Legal Medicine, Medical Negligence and Litigation in Medical Practice & 3rd International Conference on Current Trends in Forensic Sciences, Forensic Medicine & Toxicology will be held on 3rd to 5th February, 2012 in Jaipur, Rajasthan, India. This event will be organized and hosted by Saraswathi Institute of Medical Sciences, Ghaziabad, Uttar Pradesh, India. EPS Inc., a Canada-based biomedical consulting agency, is authorized by the Scientific Committee to co-organize this important and exciting educational event.

On behalf of the organizing committee, we cordially invite you to attend the conferences to present your recent work and ideas and share your knowledge in these specific fields. For the conference program details, please visit our websites at www.epsglobal.ca and www.epsworldlink.com.

We are very interested in your article Recursive nearest neighbor search in a sparse and multiscale domain for comparing audio signals that is published on Signal Processing. This article includes some novel conceptions, which may impress the worldwide experts in your field. The conferences will present an excellent opportunity for you to introduce this article to the worldwide experts, highlighting the great significance of your research achievement. We believe you will enjoy the casual and interactive settings of this meeting...

---
Of course I will skip this opportunity. I just wish I had an automatic reply to these things:

Dear    2012 3rd International Conference on Legal Medicine, Medical Negligence and Litigation in Medical Practice & 3rd International Conference on Current Trends in Forensic Sciences, Forensic Medicine & Toxicology,

I appreciate your enthusiastic and bold invitation to present my work at your conference in    Jaipur, Rajasthan, India, but I have already received a similar request from the    5th International Multi-Conference on Engineering and Technological Innovation: IMETI 2012. Their transrobotic agent emailed me first, and I don't think it polite for me to decline, especially since their form email was thoughtfully in color.

Please consider me again in the future, especially after I obtain tenure.

Sincerely,

## Paper of the Day (Po'D): Cyclic Pure Greedy Algorithms Edition

Hello, and welcome to Paper of the Day (Po'D): Cyclic Pure Greedy Algorithms Edition. We just finished and submitted today's paper for the proceedings of the 2011 Asilomar Conference: B. L. Sturm, M. G. Christensen and R. Gribonval, "Cyclic pure greedy algorithms for recovering compressively sampled sparse signals," Proc. IEEE Asilomar Conf. Signals, Systems and Comp., Pacific Grove, CA, Nov. 2011. I previously posted the slides here.

We explore the use of cyclic pure greedy algorithms matching pursuit (CMP) and complementary matching pursuit (CompMP) (both of which have been discussed on this blog many times before) for solving the inverse problems posed by compressed sensing (CS) within the non-noisy regime. Previously, we had only considered applying the cyclic minimization principle to MP, and not to CS. Motivated by the work in Dymarski et al., we realized that CompMP is also a pure greedy algorithm (previously there was only one) with just as small a computational complexity as MP (a little more overhead in the beginning), and which can be encased within a cyclic minimization framework. So how do these two algorithms perform in full support recovery?

The performance of cyclic CompMP (CompCMP) easily beats orthogonal least squares for sparse signals distributed Gaussian, and even for the least favorable Rademacher --- as long as the refinement cycles are performed after each model augmentation. We also see that CompMP without any refinement performs as good as OLS for Rademacher signals. In comparison with state of the art methods, when CompCMP refines after every augmentation, it performs competitively in support recovery, while maintaining an extremely simple and low computational complexity. For Guassian distributed signals, CompCMP performs nearly as well as the best performing SL0 and PrOMP. Curiously, when it waits to refine the model, CompCMP takes a heavier hit to performance than CMP.

## Orthogonal Matching Pursuit with the Matrix Inversion Lemma

Continuing from the naive OMP, the Cholesky OMP, and the QR OMP, we now look at using the matrix inversion lemma (MIL) to make OMP extremely efficient. This is one I haven't ever seen, but it might be the same as the block inversion approach discussed by Pati et al. 1993. I still have to take a closer look.

Note: If you see some LaTeX error messages about macros not being defined, shift reload the page.

Consider that in its $$k$$th iteration, OMP has the set of dictionary inner products $$\Gamma_l = \{\langle \vphi_l, \vphi_n \rangle\}_{n \in \Omega}$$ and squared norms $$\{\|\vphi_n\|^2\}_{n \in \Omega}$$, the sets of original and current inner products, $$\mathcal{I}_{0} = \{\langle \vu, \vphi_n \rangle \}_{n \in \Omega}$$ and $$\mathcal{I}_{k} = \{\langle \vr_{k}, \vphi_n \rangle \}_{n \in \Omega}$$, the current solution $$\vx_k$$, and the basis dual to $$\MPhi_{\Omega_k}$$, i.e., $$\MPsi_{\Omega_k} = \MPhi_{\Omega_k}(\MPhi_{\Omega_k}^H\MPhi_{\Omega_k})^{-1}$$. OMP guarantees that $$\MPhi_{\Omega_k}$$ has full column rank when $$k \le M$$, and so $$\MPsi_{\Omega_k}$$ always exists when $$k \le M$$.

## Cyclic Matching Pursuit (CMP): Fourth Results

I am back in Rennes, working again on developing and testing a very "fast" version of cyclic matching pursuit in the MPTK framework. You may remember all my previous trials and tribulations in June of this year. Now that it is working, and MPTK is bug free, I can begin experimenting with large signals and dictionaries.

Below are the residual energy decays for MP (gray) and CMP (black) for a musical signals (glockenspiel), using a dictionary of 1,662,616 Gabor atoms of scales powers of 2 from 7 to 14, and translations one quarter their scales. CMP is refining the model every 3 dB decrease in the residual energy, with a maximum of 10 refinement cycles, or until it sees a residual energy decrease less than 0.001 dB. This of course takes longer than MP. The race to -40 dB residual energy ends for CMP at 76% of the number of MP iterations. The simple trick of CMP saves nearly a quarter of the atoms.

## Orthogonal Matching Pursuit the QR Way

Continuing from the naive OMP and the Cholesky OMP, we now look at using QR decomposition to make OMP extremely efficient. I previously discussed this approach here, but below I make some additions.

Consider that in the $$k$$th step of OMP we have $$\mathcal{I}_{0} = \{\langle \vu, \vphi_n \rangle/\|\vphi_n\| \}_{n \in \Omega}$$, $$\mathcal{I}_{k-1} = \{\langle \vr_{k-1}, \vphi_n \rangle/\|\vphi_n\| \}_{n \in \Omega}$$, the set of dictionary inner products $$\Gamma_l = \{\langle \vphi_l, \vphi_n \rangle/\|\vphi_n\|\}_{n \in \Omega}$$, as well as the QR decomposition of the subdictionary produced thus far, i.e., $$\MPhi_{\Omega_{k-1}} = \MQ_{k-1}\MR_{k-1}$$. The QR decomposition of a matrix will always exist, but is not unique.

## Orthogonal Matching Pursuit the Cholesky Way

Continuing from my previous post, we now look at using Cholesky decomposition to make OMP extremely efficient.

Consider that in its $$k$$th step, OMP has the two sets of projections $$\mathcal{I}_{k-1} = \{\langle \vr_{k-1}, \vphi_n \rangle/\|\vphi_n\| \}_{n \in \Omega}$$ and $$\mathcal{I}_{0} = \{\langle \vu, \vphi_n \rangle/\|\vphi_n\|\}_{n \in \Omega}$$, the set of dictionary inner products $$\Gamma_l = \{\langle \vphi_l, \vphi_n \rangle/\|\vphi_n\|\}_{n \in \Omega}$$ and norms $$\{\|\vphi_n\|\}_{n \in \Omega}$$, and the Cholesky decomposition of the Gramian of the subdictionary $$\MPhi_{\Omega_{k-1}}^H \MPhi_{\Omega_{k-1}} = \ML_{k-1}\ML_{k-1}^H$$. Every Gramian can be expressed as a Cholesky decomposition.

## Orthogonal Matching Pursuit the Naïve Way

Over the next few days, I am posting portions of a paper I am currently writing about making greedy algorithms as efficient as possible. I post this material before submission because: 1) much of it has been discussed before in a variety of places, and I am merely assembling some of these methods in one place; 2) I think it can find immediate use, rather than wait to release the entire paper after the paper deadline in February. Today, we begin with some notation, and a look at the naïve implementation of orthogonal matching pursuit (OMP). This provides us a baseline complexity.

We are interested in efficiently modeling a signal $$\vu$$ by a linear combination of the atoms defined in a dictionary $$\mathcal{D} = \{ \vphi_\omega \in C^M \}_{\omega \in \Omega= \{1, 2, \ldots, N\}}$$: $$\vu = \MPhi \vx + \vn$$ where $$\MPhi := [\vphi_1 | \vphi_2 | \cdots | \vphi_N]$$. By $$\Omega_k \subset \Omega$$ we denote an ordered subset of cardinality $$k$$ of indices into the dictionary. We denote the $$i$$th element of a set by $$\mathcal{I}(i)$$. The matrix $$\MPhi_{\Omega_k}$$ is thus composed of the ordered atoms indexed by $$\Omega_k$$. We denote $$\MP_k$$ the orthogonal projection matrix onto the range space of $$\MPhi_{\Omega_k}$$, or equivalently, onto the span of the subdictionary $$\mathcal{D}_k \subset \mathcal{D}$$. The projection matrix $$\MP_k^\perp = \MI - \MP_k$$ is thus the orthogonal projection onto the subspace orthogonal to the span of the subdictionary, or equivalently, the left null space of $$\MPhi_{\Omega_k}$$. We denote the inner product between two vectors in $$C^M$$ as $$\langle \vu_1, \vu_2 \rangle = \vu_2^H \vu_1$$, where $$^H$$ denotes the complex conjugate transpose. The vector $$\ve_k$$ is the $$k$$th element of the standard basis of $$R^N$$, i.e., all zeros with a 1 in its $$k$$th row. Finally, all norms are implicitly the $$\ell_2$$-norm, $$\|\vx\|^2 = \langle \vx, \vx \rangle$$.

## Phase transitions in higher dimension, pt. 2000

My tests at an ambient dimension of $$N=2000$$ are nearly finished for signals distributed Normally; Rademacher is yet to simulation, but that will have to wait after my trip to Bretagne. Previously, here are my tests at a dimensionality of $$N=400$$, and here at $$N=1000$$. I don't really see any game changers here. For some reason, we see CompCMP flattens out at higher indeterminaces, but beats SL0 and PrOMP at midlevel indeterminaces, but these could be due to me only averaging the results of 25 signals at each pair of sparsity and indeterminacy. (Again, the criteria here for successful recovery is exact support recovery, i.e., no missed detections and no false alarms.)

## Which Mahler symphony is it?

This is a poor, but funny, example of applying a hierarchical model to "cover song identification." For instance, it wouldn't be useful to detect Mahler in Uri Caine. From here.

## Phase transitions in higher dimension

The Asilomar conference was great! I met several new people, and remet several others. In particular, I had an informative chat with Jeremy Vila, who has designed with Phil Schniter one of the most promising inverse problem solvers: expectation maximization Bernoulli Gaussian approximate message passing (EMBGAMP). Before the conference I had run some simulations with the algorithm at an ambient dimensionality of 400, and was not seeing appreciable increases in the phase transitions across all problem indeterminaces. Jeremy took a look at my simulations and suggested performing them in a higher dimension. What was going on was that with only a few components active, the algorithm was having a hard time estimating the parameters of the distribution underlying the sparse signal --- as can be expected. So upon returning home, I reran my simulations with an ambient dimension of 1000, and now see improved performance over all indeterminaces. (I am also running experiments this week at 2000.)

## My Asilomar 2011 Slides

Since I am finished with my presentation, I now upload my slides: Sturm2011.pdf. The paper will soon follow: B. L. Sturm, M. G. Christensen, and R. Gribonval, "Cyclic Greedy Algorithms for Recovering Compressively Sampled Sparse Signals", Proc. Asilomar Conf. Signals, Systems, and Comp., Nov. 2011.

Now, off to attend the talk, "Compressed sensing: snake oil or good idea?"

Bob L. Sturm, Associate Professor
Audio Analysis Lab
Aalborg University Copenhagen
A.C. Meyers Vænge 15
DK-2450 Copenahgen SV, Denmark
Email: bst_at_create.aau.dk

### Blog Roll

October 2011 is the previous archive.

December 2011 is the next archive.

Find recent content on the main index or look in the archives to find all content.


text:
# Preserving Plant Diversity

## Location:

Harvard Museum of Natural History, 26 Oxford St., Cambridge

Join an exploration of plant diversity and an introduction to methods of plant preservation. Using plant cuttings brought from home, carefully observe and compare morphological characteristics, discuss why they may have been favored over evolutionary time, and learn how to press specimens for scientific study. Following the workshop, the group will tour the Harvard University Herbaria to learn about the importance of preserved specimens and to see how scientists use them for scientific research.

Cost: $54 members /$60 nonmembers

Presented...

Read more about Preserving Plant Diversity

# Growing Woody Plants from Seeds

## Location:

Dana Greenhouse, Arnold Arboretum, 125 Arborway, Jamaica Plain, MA 02130

Learn about seed biology, embryo dormancy, and factors present in woody plant seeds. The class will focus on seed storage and various treatment techniques, including over-wintering and aftercare. Appropriate for those who have succeeded at growing some plants from seed and are ready for greater challenges. Post-class nurturing will be required. Fee $55 members;$68 non-members.

...

Read more about Growing Woody Plants from Seeds

# Small Trees for Small Spaces

## Location:

Hunnewell Building and Landscape, Arnold Arboretum, 125 Arborway, Jamaica Plain, MA 02130

Urban and suburban planting spaces are often constrained, often not ideal for accommodating a large oak, linden, or maple tree. But there are many smaller tree species that will thrive in a smaller space and won’t overwhelm the area. Some trees are cultivars that have been selected for their smaller size or narrow characteristics, while others are naturally genetically petite. Guided by the “right plant, right place” philosophy, Laura Mele...

Read more about Small Trees for Small Spaces


text:
In the last week our Computer Graphics class discussed how to infer projective mappings using a geometric approach. In this post I will show how the inferring can be done in a linear algebra way.

The main reference I use is the paper “Fundamentals of texture mapping and image warping”1. And I use Mathematica for symbolic computation.

## Theoretical background

In the section 2.2.3 of the paper1, a linear system is constructed to solve for elements of a projective mapping in 2D. This can be extended to 3D easily.

Let us denote the projective mapping to be determined as following:

Suppose we have a point $$(x, y, z)$$ in view space, and a point $$(u, v, w)$$ in NDC space, the equations can be written as following:

We apply these equations on all 8 vertices of the frustum, then construct and solve the linear system for the projective mapping $$\mathbf{M}$$.

## Implementation

First we build the $$\mathbf{M}$$, and an array of symbolic variables are stored in v for later use:

Then we construct matrices for points in view and NDC spaces:

Note that we use a scale factor k for the frustum in perspective projection. For the orthographic projection k should be $$1$$.

Next we define a function to generate one constraint for our linear system:

Now all data and tools are ready. We start to generate all constraints, and solve it.

The final result is:

Note that the solution is not unique, and it is parameterized by a single scalar($$m_0$$ in our case). This non-uniqueness can be seen from that we can multiply arbitrary non-zero factor on a point in homogeneous space without changing its meaning.

By letting $$m_0$$ equal $$\frac{2 n}{r - l}$$, we can get the conventional perspective projection matrix (right-handed, and maps to $$[-1, 1]^3$$, with positive $$n$$ and $$f$$):

## References

1. Heckbert, Paul S. Fundamentals of texture mapping and image warping. MS thesis. University of California, Berkeley, 1989. 2


text:
# Question

Suppose 70% of all voters voted for the Republican candidate. If an exit poll of 50 people were chosen randomly, would it be surprising if less than half who were sampled said they voted Republican? To reason an answer, use the applet described in Activity 2 to conduct at least ten simulations of taking samples of size 50 from a population with proportion 0.70. Note the sample proportions. Do you observe any sample proportion less than 0.50? What does this suggest?

Sales0
Views39


text:
# How to properly define BGA footprint in Eagle?

This question is somewhat relevant to this one. However I am sure it well deserves to be separate.

I created a custom device/symbol/footprint for an ARM MCU. However I am doubtful whether I created a footprint correctly. The MCU documentation defines dimensions as below:

When I was defining pads I used SMD pad with 100% roundness and 0.5x0.5mm size. Which resulted in below output (layers visible are top, tStop and tCream). Which looks like it won't be possible to send even a single trace between the balls (due to tStop size):

Now, my understand is that traditionally there is enough space left between balls for at least a single copper trace, which does not look like it is happening from above picture.

My question: Did I read/understand package dimensions from the documentation correctly? Did I define the pad size correctly? Or it should be smaller? In other words, what is the proper way to define footprint of the BGA device using Eagle?

UPDATE: Found this document which obviously applies mostly to TI chips, but there is a section of "Standard BGA", which I think should be very useful. It shows different sizes (including ball landing size etc).

• Not an answer, but you may find this to be an interesting read on the challenges of working with BGA on a budget: hforsten.com/making-embedded-linux-computer.html – Daniel Jan 13 '18 at 9:06
• @DanielGiesbrecht thanks. That is definitely going to be very useful! – Alexey Kamenskiy Jan 13 '18 at 9:10

For BGA packages, you typically want the stop mask to be either slightly smaller (mask defined pad) or a tiny bit larger (copper defined pad) than the copper pad.

Eagle will automatically make the stop mask larger than the pad by a specific percentage set in the DRC of the board. This is usually much larger than you would want for a BGA.

I would advise that you disable the Stop and Cream options in the pad properties for each pad, and then manually draw a circle with a width of 0 (i.e. filled) on each of the tStop and tCream layers. This way you have full control over how bit the circles are.

The datasheet should give details of how big the mask and cream/stencil circles should be.

As a side note, for a 0.8mm pitch BGA, you may or may not be able to route between the pads, though you probably can get a single trace through the gap. Typically when wiring BGAs, you escape route them by placing a small via diagonally from the pad (not in the pad!). That way you can route the traces out on other layers.

• Right, the specifications document I got does not have anything about pad size. I suspect it might be in another document (that the specifications references, called "Hardware design guide") from the same manufacturer, however that document is N/A. So I am trying to figure out sizes with what I have. Might try to find any existing library with similar ball size and see there I guess. – Alexey Kamenskiy Jan 13 '18 at 9:12
• @AlexKey what's the part number for the MCU? – Tom Carpenter Jan 13 '18 at 9:31
• It’s Marvell’s 88F6828 – Alexey Kamenskiy Jan 13 '18 at 9:33
• Contact Marvell's support - this document may be restricted. – Anonymous Jan 13 '18 at 11:58
• @Anonymous would wonder why though, the HW specifications and other related documents went to unrestricted access some time ago and that document would still stay restricted? I tried to contact them as a matter of fact, and no one get back to me (for several times) – Alexey Kamenskiy Jan 13 '18 at 13:09

Thanks to @TomCarpenter advises (and my research) I have found information that I was looking for.

First (and primary) relevant document is a TI wiki page that provides tables at the bottom pf this answer. According to those tables for BGA with pitch of 0.8mm and ball diameter 0.5mm the following applies:

1. Nominal landing diameter (copper pad size) = 0.4mm ± 0.05mm
2. via copper (outer) diameter = 18mil (~0.45mm)
3. via drill size = 10-8mil (~0.254-0.2mm)
4. copper trace width = 4-5mil (~0.1-0.127mm)
5. Clearance width = 4mil (~0.1mm)

Second found document produced by IPC supposedly has more detailed information on these number, however the document is paywalled and therefore is N/A.

Third document that was found comes from JEDEC and provides very detailed information on each measure that is seen on dimensions picture in the question. In this document in table 4.27-2 it provides a b1 dimension for ball diameter 0.50mm equal 0.35mm. According to description this is the size of opening in resistant layer that would expose copper pad for soldering with the ball (or in other words this is the minimum size of the copper pad).

Since JEDEC document provided minimum size but no upper boundary, I would consider using numbers from TI document. Using those sizes in Eagle package editor and enabling Cream and Stop on the pads I get following picture:

Which looks like normal routing with default values of stop bounds should work just fine. Worth noting that with these sizes default value of stop bounds is equal to the one recommended by TI (4mil or 0.1mm).

Relevant tables from TI page:

IPC-7351A for NSMD Pads

Nominal            Land    Nominal  Land
Ball     Reduction Pattern Land     Variation
Diameter           Density Diameter

0.75        25%       A      0.55   0.60-0.50
0.65        25%       A      0.50   0.55-0.45
0.6         25%       A      0.45   0.50-0.40
0.55        25%       A      0.40   0.45-0.35
0.5         20%       B      0.40   0.45-0.35
0.45        20%       B      0.35   0.40-0.30
0.4         20%       B      0.30   0.35-0.25
0.35        20%       B      0.30   0.35-0.25
0.3         20%       B      0.25   0.25-0.20
0.25        20%       B      0.20   0.20-0.17
0.2         15%       C      0.17   0.20-0.14
0.17        15%       C      0.15   0.18-0.12
0.15        15%       C      0.13   0.15-0.10

PCB Typical Feature Sizes For Standard (non-Via Channel) BGA Arrays

Ball         Via        Via Hole  Trace    Clearance  Micro
Pitch        Diameter     Size    Size                Vias?

0.8mm pitch   18 mil    10-8 mil  4-5 mil     4 mil    No
0.65mm pitch  16 mil*   8 mil*    4 mil*      4 mil*   No
12 mil    6 mil     4 mil       4 mil    Yes
0.5mm pitch   10 mil    5 mil     3 mil       3 mil    Yes
0.4mm pitch   10-8 mil  5-4 mil   3 mil       3 mil    Yes

*16 mil diameter/8 mil hole vias are only possible if done in
a creative way that puts traces only in between every other via.
In other words, 16/8 vias, when placed between the balls, will
move enough to allow one 4 mil trace per pair, but not one 4 mil
trace per via, so for some designs like the DM365 and DM355,
16/8 mil vias should be possible in your application since there
are some areas to place vias in the array.  However for Freon,
since it's a full array, it is not possible to use 16/8 vias
unless only every other pin is used (not likely).  16/8 vias are
uncommon in the PCB fab world, but some companies can do them
without micro vias.