text:
ARTICLE

# Functional Quails Eggs using Enriched Spirulina during the Biosorption Process

Maryam Vejdani nia1, Mozhgan Emtyazjoo2,*, Mohammad Chamani3
1Faculty of Food Technology, Islamic Azad University, Tehran, Iran
2Department of Marine Science, North Tehran Branch, Islamic Azad University, Tehran, Iran
3Department of Animal Science, Science and Research Branch, Islamic Azad University, Tehran, Iran
*Corresponding author : Mozhgan Emtyazjoo, Department of Marine Science, North Tehran Branch, Islamic Azad University, Tehran, Iran Tel: +989122106883 E-mail: m_emtyazjoo@Iau-tnb.ac.ir

© Korean Society for Food Science of Animal Resources. This is an Open-Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/3.0) which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Received: Jan 20, 2021 ; Revised: Jun 14, 2021 ; Accepted: Jul 28, 2021

Published Online: Jan 01, 2022

## Abstract

Spirulina platensis was included at 2.5%, 5%, and 7.5% of the diet as a phytobiotic either as a crude preparation or after enrichment by a biosorption process and fed to 126 Japanese quail and the eggs collected and examined for 6 weeks. Assessments were made of physical and chemical characteristics of the eggs. All treatments with added Spirulina increased unsaturated fatty acids and decreased saturated fatty acids with the largest responses for linolenic (omega 3) and oleic (omega 9) acids. The changes in fatty acids were greater with enriched than crude Spirulina. These results suggest that eggs from quail fed with Spirulina may have positive effects on human health.

Keywords: functional foods; enrichment; omega 3; Spirulina platensis; quail eggs

## Introduction

Functional foods are consumed as part of a regular diet and in addition to their nutritional efficiency, they have beneficial physiological effects or reduce the risk of chronic diseases (Adefegha, 2018; Ovando et al., 2018). Microalgae are one of the most interesting sources of functional foods (Benelhadj et al., 2016; Priyadarshani and Rath, 2012). Arthrospira (Spirulina platensis) are microscopic filamentous prokaryotes (Vaz et al., 2016). Until a few years ago, fish oil was the only major source of polyunsaturated fatty acids. But now S. platensis oil, which contains significant amounts of polyunsaturated fatty acids, is also one of the main sources of these fatty acids. Algae can produce polyunsaturated fatty acids, such as docosahexaenoic acid, eicosapentaenoic acid, arachidonic acid, and gamma-linoleic acid. Numerous studies have confirmed that Spirulina is cholesterol-free and rich in polyunsaturated fatty acids (especially gamma-linolenic acid) and this makes Spirulina suitable for the treatment and prevention of atherosclerosis, obesity and high blood pressure. Due to the direct effects of gamma-linolenic acid on the immune system and use in the treatment of many diseases, there has been a great interest in producing high concentrations of gamma-linoleic acid (Andrade, 2018). Numerous studies have been done on the enrichment of quail feed with the use of S. platensis (Boiago et al., 2019), lycopene (Sahin et al., 2008), fish oil (Kamely et al., 2016), vegetation such as liquor ice (Doğan et al., 2018), and rice bran (Gopinger et al., 2016), to enrich its eggs (Wang et al., 2007). One of the side effects of using antibiotics is the formation of antibiotic resistance. This has created a crisis in human health treatment and highlighted the need for a new generation of antibiotics. The use of foods and supplements that naturally contain antimicrobial compounds has reduced the use of antibiotics by animals and their negative impact on consumers. Phytobiotics are a viable alternative and S. platensis supplements have given good results in aquaculture, poultry feeding, and agriculture (Belay et al., 1996).

Quail eggs are a good source of nutrients for human health, with marked advantages over chicken eggs (Jeke et al., 2018). Human body can not synthesize essential fatty acids and they must be received through the diet, Accordingly, the aim of this study was to investigate the effect of the addition of fortified S. platensis on the amount of essential fatty acids, especially omega 3, in quail eggs as this could provide, a functional and practical food for the diet of today’s societies.

## Materials and Methods

Biosorption in Spirulina platensis alga

S. platensis was enriched with iron and zinc by growing in a medium with added minerals. Samples were taken during the first (M1=at the beginning of the maximum progressive growth phase, after 7 days of initial cultivation, minerals 5 h before harvest added to S. platensis algae) and the second phases (M2=The cultivate algae after entering the logarithmic phase. In both methods EDTA-FeNa·3H2O, ferric citrate, ZnSO4·7H2O, and CuSO4·5H2O were added at the rates of 13 mg/L, 0.0396 mg/L, 0.5994 mg/L, and 0.1998 mg/L respectively (Shahtoori, 2015).

Analysis of absorption in Spirulina platensis

To evaluate the iron and zinc absorption in algal samples, the ICP-OES simultaneous Arcos EOP model was used. First, each treatment was digested and prepared separately (Sinaei et al., 2018). For this purpose, 1 g of the sample was digested with nitric acid and oxygenated water in the microwave for two 10 min steps at 200°C and 800 W power and the sample was finally injected into the device. To improve the accuracy of the test, the blank sample (containing nitric acid and oxygenated water without the original sample) was also injected into the device and finally, the concentration of heavy metals and elements was calculated using the following equation:

$M\left(\text{μg/g}\right)=\left(C×V\right)/W$

Where M is the final concentration of the elements and heavy metals of the sample in μg/g, C is the concentration obtained from the device in μg/L, V is the final sample volume in l (0.025), W the primary sample weight for acid digestion in (g) (modified Saeid et al., 2013a).

Feed, animals, housing and sampling

Crude S. platensis and S. platensis enriched by biosorption were each added to the base feed (2.5%, 5%, and 5.7%) and fed to 126 female Japanese quails. There were three replicates of each of the seven treatments, with six chicks per experimental unit. All chicks were eared on the same environmental conditions (Abouelezz, 2017). Experimental diets based on corn and soybean meal were adjusted for growth period and laying period (Table 1) (Hajati and Zaghari, 2019). During the experiment, the quails had free access to water and food and the rations were flour. Lighting was 24 h until 35 d, this was then reduced to 22 h with 2 h of darkness and 1 h was then added every night until it reached 8 h darkness and 16 h lighting. Laying ails started from 47 d. The eggs were collected during the 3 periods of 15 d.

Table 1. Basic feed components
Type Growth period1) Laying period2)
Value based on (g/kg feed) Value based on (g/kg feed)
Corn 30 35
Soy 23 19
Oil 10 7
Phosphate 10 16
Carbonate 10 50
Mineral supplement 1 1.5
Vitamin supplements 1 1.5
Methionine 1 1.5
Lysine 0.5 0.6
Threonine 0.1 0.6
Acid fire - 0.6
Anti-coccidiosis 0.1 -
Salt 1 1.5

1) 0–35 days old.

2) 35 days old- end of the period.

Analysis of fatty acids

Egg samples were collected at the end of the last period for analysis of fatty acids. Extraction of yolk oil: The quail egg yolk was stored at –20°C and then dried in a Christ-freezing dryer model at –80°C for 24 h at 0.0026 m bar. Hexane was added and it was kept in the refrigerator for 24 h. Samples were centrifuged at around 5,000×g at 4°C and then filtered through filter paper under vacuum condition, then the extracted oil was methylated. Fatty acid methyl ester preparation: To methylate the samples, toluene and 0.5 M sodium methoxide were added to the extracted oil. It was put in a water bath at 50°C for half an hour. Glacial acetic acid and distilled water were used to neutralize the alkali, then hexane was added to the test tube and the contents of the tube were mixed by vortexing. The tube was kept static for a few minutes and two phases formed. The lower phase contains water and the upper phase contains hexane and fatty acid methyl ester. This step was repeated. Anhydrous sodium sulfate was used for dehydration. After filtration with a Whatman 41 filter paper, the samples were placed under the hood in a water bath at 70°C to reach a volume of 1–2 mL. Samples were injected into a gas chromatography device (GC), model Shimadzu (Wang et al., 2000). During this experiment, the type of column was WAX with FID detector, injection and detector temperature was 240°C, Oven program temperature started on 60°C for 2 min and increased to 200°C at 10°C/min. It was kept at this temperature for 1 min and then the temperature was increased until 230°C at 5°C/min and kept there for 15 min (Jafari et al., 2014).

Analysis of egg quality parameters

Egg samples were collected randomly for evaluation of qualitative parameters during the 3 periods of 15 d.

Metric parameters

Egg weight parameters (EW), shape index (SI), egg volume (EV), eggshell surface (SSA), albumen index (AI), hough unit (HU), internal quality unit (IQU) and yolk index (YI) were measured on the short and long axies of the eggs using a digital caliper. Yolk and albumen diameters were measured after breaking the eggs on a smooth glass surface using a digital caliper. Yolk and albumen elevation were also measured using a standing caliper.

1. The SI was calculated as SI=d/D×100 with d and D representing the short axis and the long axis, respectively.

2. The EV was calculated as EV=4/3×π×(D/2)×(d/2)2 in which D=long egg axis, d=short egg axis and π=3.14159.

3. SSA was calculated as SSA=4.835×EW0.662 the equation below where EW=egg weight.

4. The AI was calculated as AI=h/(0.5×(D+d)) with h=height of concentrated albumen at the junction with yolk, D and d, are the long and short diameters of albumen, respectively.

5. HU was calculated as HU=100×log(h+7·57−1·7×EW0·37) with h=height of concentrated albumen at the junction with yolk and EW was=egg weight.

6. The internal quality of the egg (IQU) was calculated as IQU=100×log(h+4·18−0·89897×EW0·6674) with h=height of concentrated albumen at the junction with yolk and EW=egg weight.

7. Yolk quality was calculated by the YI as YI=h/D with h=yolk height and D=yolk diameter (Zita et al., 2013).

Eggshell strength and eggshell thickness

Eggshell strength parameters (ESS) and eggshell thickness (EST) were determined using egg multi tester model EMT-5200. For this purpose, Device Egg Shell Force Gauge Model-2 was used to measure the strength and Echo meter, 1061 (D-56 Wuppertal 1) was used to measure thickness (Abdanan Mehdizadeh et al., 2014).

Yolk color

In order to evaluate the yolk color (YC) and to ensure the accuracy of the test, assessments were made in all periods using the Roche color fan (0–15 degrees) (Ludke et al., 2018). In addition for eggs from the final 15-d period an assessment was made by Hunter Lab using Ultra scan VIS model (Carson et al., 1994).

Measuring the egg albumen pH

For this purpose, samples were collected in each of the three periods to measure the pH, the yolk was first separated from albumen, homogenized and measured with the pH meter of the NACI model (Doğan et al., 2018).

Measurement of moisture content

Egg samples from each of the three periods were weighed before and after the oven drying at 60°C for 72 h and moisture content of the samples was calculated (Gopinger et al., 2016).

Analysis of mineral absorption

Iron and zinc contents were analyzed in eggs from the final period and in algal samples.

Statistical analysis

A two-way analysis of variance was carried out using SPSS software version 22. The differences between the means of different treatments and time periods were considered significant at the 5% probability level. The data were normalized, before being tested statistically. Excel was used to draw charts.

## Results and Discussion

Absorption in Spirulina platensis

The amount of iron and zinc in the algae enriched in two ways, during the logarithmic phase (M2) and the maximum stationary phases (M1) shows in Fig. 1.

Fig. 1. Spirulina platensis changes during the enrichment process. The same name letters on the bar of each sample indicate no significant differences between the samples and the inconsistent letters indicate the significance of the samples with each other (p<0.05).

The amount of iron and zinc in the three groups differed significantly (p<0.05). These results indicate that the most suitable method for increasing iron and zinc contents in S. platensis algae is biosorption (method M2), with the increases being particularly large for zinc according to the results of Saeid et al. (2013a), the best method for enriching S. platensis is bioremediation, which is consistent with the results of this study.

Enrichment of eggs with enriched and crude Spirulina
Egg yolk fatty acids

The peak of fatty acids from gas chromatography of quail eggs fed with enriched, raw, and controlled algae shows in Fig. 2. Statistical results showed a significant difference (p<0.05) in saturated fatty acids (palmitic acid and stearic acid) and unsaturated fatty acids (oleic acid and linolenic acid) between treatments compared to the control group. In general consumption of crude and enriched S. platensis (M2) showed a significant difference (p<0.05) in the amount of saturated fatty acids (palmitic and stearic acid) and polyunsaturated fatty acids (oleic and linolenic acid) relative to the control group. According to these results both crude and enriched S. platensis were effective in reducing the saturated fatty acids of palmitic acid and stearic acid. The treatments 7.5 enrich, 2.5 enrich and 7.5 crude had the largest reduction compared to the control group for palmitic acid. However, the treatments crude 2.5 and enrich 5 did not show a significant decrease in palmitic acid compared to the control group, indicating a decrease in palmitic acid in more than 66% of the enrich and 33% of crude treatments, respectively. The results showed that stearic acid showed a significant decrease in all treatments, especially enriched treatments. The effect of feeding crude and enriched S. platensis (M2) on unsaturated fatty acids of oleic acid and linolenic acid was also significant, although 66% of treatments showed no increase in oleic acid content compared to control group, the amount of oleic acid in the enriched treatments 7.5 and 2.5 showed a significant increase compared to the control group. Also, linolenic acid showed the highest increase only in the crude treatment 5 compared to the control group. Due to reduced palmitic and stearic fatty acids and increased, oleic and linolenic fatty acids when S. platensis, especially in the enriched form, one would expect reductions in lower-density lipoprotein (LDL) and the risk of cardiovascular disease and stroke. According to the results, consumption of S. platensis did not show a significant effect on the amount of linoleic acid in the treated yolk compared to the control group. Boiago et al. (2019) reported that consumption of S. platensis at levels (0%, 5%, 10%, and 15%) for 42 days (2 21-day cycles) in quail feed, reduced saturated fatty acids and increased monounsaturated fatty acids while it decreased polyunsaturated fatty acids. Abouelezz (2017) reported that consumption of S. platensis at 1% level in Japanese quail feed reduced free fatty acids, also use of S. platensis at levels [2.5%, 5%, and 7.5%] for 12 weeks in rainbow trout feed increased some acid levels (Jafari et al., 2014).

Fig. 2. Chromatographs obtained by gas chromatographic analysis of quail egg yolk samples. A, with 2.5% of enriched Spirulina platensis; B, with 5% of enriched S. platensis; C, with 7.5% of enriched S. platensis; D, with 2.5% of crude S. platensis; E, with 5% of crude S. platensis; F, with 7.5% of crude S. platensis; G, Control.
Metric parameters of eggs

The results of Table 2 shows that S. platensis (M2) had a significant effect on egg quality parameters as assessed during the final period (EW, IQU, SI, EV, SSA, AI, and YI) (p<0.05). So that in EW, EV, and SSA parameters, 33.3% of treatments, SI of 50% of treatments (especially enrich treatments), IQU 83.3% of treatments (especially enrich treatments) and albumen and yolk indices The effects of S. platensis (M2) on egg quality parameters in samples taken in each of the three periods is shown in Fig. 3 the parameters (IQU, SSA, and EW) showed significant differences (p<0.05) between the three periods, so that all three parameters in the second period of the first period and in the third period It was longer than the first and second periods. There were significant differences (p<0.05) between periods in the HU showing decrease in albumen quality in the control group and better quality retention in egg albumen with addition of either crude or enriched S. platensis (M2) and crude compared with the control group. Dogan et al. (2016) reported that feeding 0.5%, 1%, 2% of S. platensis to quail for 8 weeks significantly increased albumen and yolk indices (p<0.05) and had a non-significant effect on HU (These results are in line with the results of this study. The present study showed that consumption of crude and enriched S. platensis had a significant effect on egg shape and weight index compared to the control group, while the results of Dogan et al. (2016) showed a significant effect (p<0.05) on egg production, but did not assess egg shape and weight index. In the present study, it was shown that consumption of crude and enriched S. platensis had a significant effect on EW, SI, and SSA in comparison to the control group, whereas Hajati and Zaghari (2019) found that consuming S. platensis at levels of 2.5, 5, 10, and 20 g/kg diet for 1 to 35 days and at levels of 1, 3, and 5 g/kg diet for up to 12 weeks gave decreases in these parameters.

Table 2. Effect of Spirulina platensis on the qualitative parameters of eggs collected in the first period
Parameter Crude 2.5% Crude 5% Crude 7.5% Enrich 2.5% Enrich 5% Enrich 7.5% Control
Egg weight (g) 11.09±0.9ab 11.13±0.48ab 12.85±1.9c 10.80±2.02a 12.78±1.8bc 11.42±1.7abc 11.75±1.6 abc
Shell thickness (mm) 22.52±1.6a 23.25±1.4a 23.52±1.4a 23.02±1.7a 23.00±1.5a 22.58±0.7a 22.55±1.5a
Shell strength (kg/cm2) 1.10±0.15a 1.24±0.34a 1.37±0.22a 1.09±0.4a 1.12±0.41a 1.19±0.14a 1.12±0.39a
Shape index (mm) 78.32±2.18a 77.95±1.74a 82.15±2.74b 80.30±2.5ab 78.65±2.11a 80.29±0.96ab 79.52±2.5a
Egg volume (cm3) 10.61±0.98a 11.12±0.6a 14.47±1.4c 10.96±1.2a 13.13±0.88b 11.19±0.5a 12.74±1.05b
Eggshell surface (cm2) 23.76±1.3ab 23.82±0.69ab 26.15±2.7b 23.27±2.9a 26.06±2.5b 24.18±2.4ab 24.66±2.2ab
Albumen index 0.1206±0.01a 0.1249±0.003 a 0.1186±0.01a 0.1267±0.01a 0.1203±0.01a 0.1413±0.02b 0.1184±0.01a
Hough unit 91.65±2.89a 89.11±2.89a 89.33±2.89a 91.84±2.8a 90.62±2.81a 91.55±3.82a 89.46±2.89a
Internal quality unit 65.36±5.8b 60.73±1.86ab 58.35±7.01a 65.95±6.6b 61.18±5.89ab 64.62±7.75ab 59.80±6ab
Yolk index 0.4644±0.02abc 0.4798±0.009bc 0.4590±0.01ab 0.4877±0.03c 0.4669±0.02abc 0.4441±0.01a 0.4421±0.03a

The same name letters above the numbers of each sample indicate no significant differences between the samples and the inconsistent letters indicate the significance of the samples with each other (p<0.05).

Fig. 3. Quality parameters of eggs during the three periods. IQU, internal quality unit; HU, hough unit; SSA, eggshell surface; EV, egg volume; SI, shape index; EW, egg weight; YC, yolk color; AI, albumen index.
Yolk color

The results of the effect of S. platensis on YC evaluated by Roche color fan showed a significant difference between treatment (p<0.05; Fig. 4). All treatments, especially with enriched Spirulina, showed a significant difference from the control group. Also, the evaluation of YC by Hunter’s lab showed a significant (p<0.05) effect of enriched S. platensis on lightness index (L*) and redness index (a*). With crude Spirulina a* increased and L* decreased. The highest redness was observed in the enriched 7.5 treatment and the highest transparency in the control group. This could be due to the presence of more iron in the enriched treatments and presence of pectin in Spirulina. The yellowness index (b*) did not show a significant difference (p>0.05) among the treatments, but the control group had a numerically higher b* than the other treatments. Hajati and Zaghari (2019) indicate an increase in YC, which is consistent with the results of this study. The results of yolk colorimetry are also consistent with the reports of (Omri et al., 2019), in which S. platensis was fed at 1.5% and 2.5% to 44-week-old chickens.

Fig. 4. Yolk color evaluation by Roche fan and Hunter lab.
Egg moisture and albumen pH

The effects of S. platensis on egg moisture and albumen pH are shown in Table 3. Statistical results indicated that there were no significant differences between the three periods in egg moisture content (p>0.05). However, the moisture content for the crude 5 treatments was significantly lower than that for all other treatments (p>0.05). Evaluation of albumen pH of samples showed no significant (p>0.05) statistical differences between treatments or periods, but there was a significant interaction between treatment in three periods (p<0.05), The lowest pH was for the 2.5% enriched sample in the first period and the highest pH for the control group in the third period.

Table 3. Changes in moisture factors and pH of eggs
Parameter Time period (15 day) Treatments
First period Second period Third period Crude 2.5% Crude 5% Crude 7.5% Enrich 2.5% Enrich 5% Enrich 7.5% Control
Moisture 70.19± 1.97a 70.36± 2.60a 70.64± 1.20a 70.09± 1.95b 68.53± 2.21a 71.02± 1.5b 70.48± 0.78b 71.24± 2.9b 70.84± 1.22b 70.59± 1.11b
pH 0.9193± 0.078a 0.9203± 0.004a 0.9213± 0.005a 0.922± 0.002a 0.9214± 0.002a 0.9196± 0.006a 0.9166± 0.011a 0.9208± 0.003a 0.919± 0.006a 0.9225± 0.002a

The same name letters above the numbers of each sample indicate no significant differences between the samples and the inconsistent letters indicate the significance of the samples with each other (p<0.05).

Absorption of minerals in quail eggs

The effect of enriched and crude S. platensis on iron and zinc contents of eggs are shown in Fig. 5. Eggs of quail fed enriched or crude algae generally showed higher iron and zinc contents than those from the control group, but there were some inconsistencies in the results and further research is required. The results do, however, indicate that enriched quail eggs could be a suitable food to ameliorate iron and zinc deficiency diseases in humans. Iron depletion in the 7.5% enriched treatment and higher absorption of this element in the crude treatment could be due to the antagonistic effect of iron with copper, iron with zinc or result from using an inappropriate source of the elements (they were supplied in inorganic form) with the results of Saeid et al. (2013b) study also indicate antagonistic effects of zinc with copper, zinc with iron, or inappropriate complement form when copper-enriched Spirulina was used in pig feed, A 2.5% enriched treatment gave increases in the absorption of iron, copper, chromium, selenium, manganese, but reduction in zinc.

Fig. 5. The amount of iron and zinc in eggs of quail fed with Spirulina platensis. The same name letters on the bar of each sample indicate no significant differences between the samples and the inconsistent letters indicate the significance of the samples with each other (p<0.05).

## Conclusion

Due to the role of essential fatty acids in the improvement and prevention of cardiovascular disease and bad cholesterol (LDL), the aim in this study was to produce a product enriched with essential fatty acids, especially omega-3. By including S. platensis in the diet we succeeded in producing quail eggs with 23% more linolenic acid (omega 3) than with the control group. The content of oleic acid was increased by 7.1%, whilst contents of palmitic and stearic saturated fatty acids were decreased significantly by 6.8% and 7.2%, respectively. This indicates considerable potential for the use of Spirulina to produce quail eggs with improved quality in relation to human health.

## Conflicts of interest

The authors declare no potential conflict of interest.

## Author Contributions

Conceptualization: Emtyazjoo M. Formal analysis: Vejdani nia M. Methodology: Vejdani nia M, Emtyazjoo M, Chamani M. Software: Vejdani nia M. Investigation: Vejdani nia M, Emtyazjoo M. Writing - original draft: Vejdani nia M, Emtyazjoo M. Writing – review & editing: Vejdani nia M, Emtyazjoo M, Chamani M.

## Ethics Approval

All animal studies have been approved by the appropriate ethics committee and have therefore been performed in accordance with the ethical standards of the Islamic Azad University, and the experiment performed with respect to the International Guidelines for research involving animals (Directive 2010/63/EU).

## References

1.

Abdanan Mehdizadeh S, Minaei S, Hancock NH, Karimi Torshizi MA. 2014; An intelligent system for egg quality classification based on visible-infrared transmittance spectroscopy. Inf Process Agric. 1:105-114

2.

Abouelezz FMK. 2017; Evaluation of Spirulina algae (Spirulina platensis) as a feed supplement for Japanese quail: Nutritional effects on growth performance, egg production egg quality blood metabolites sperm-egg penetration and fertility. Egypt Poult Sci J. 37:707-719

3.

Adefegha SA. 2018; Functional foods and nutraceuticals as dietary intervention in chronic diseases; novel perspectives for health promotion and disease prevention. J Diet Suppl. 15:977-1009

4.

Andrade LM. 2018; Chlorella and spirulina microalgae as sources of functional foods, nutraceuticals, and food supplements; an overview. MOJ Food Process Technol. 6:00144

5.

Belay A, Kato T, Ota Y. 1996; Spirulina (Arthrospira): Potential application as an animal feed supplement. J Appl Phycol. 8:303-311

6.

Benelhadj S, Gharsallaoui A, Degraeve P, Attia H, Ghorbel D. 2016; Effect of pH on the functional properties of Arthrospira (Spirulina) platensis protein isolate. Food Chem. 194:1056-1063

7.

Boiago MM, Dilkin JD, Kolm MA, Barreta M, Souza CF, Baldissera MD, dos Santos ID, Wagner R, Tavernari FC, da Silva MLB, Zampar A, Stivanin TE, da Silva AS. 2019; Spirulina platensis in Japanese quail feeding alters fatty acid profiles and improves egg quality: Benefits to consumers. J Food Biochem. 43e12860

8.

Carson KJ, Collins JL, Penfield MP. 1994; Unrefined, dried apple pomace as a potential food ingredient. J Food Sci. 59:1213-1215

9.

Dogan SC, Baylan M, Erdogan Z, Akpinar GC, Kucukgul A, Duzguner V. 2016; Performance, egg quality and serum parameters of Japanese quails fed diet supplemented with Spirulina platensis. Fresenius Environ Bull. 25:5857-5862.

10.

Doğan SC, Yaman S, Baylan M, Bulancak A. 2018; Effects of dietary licorice root (Glycyrrhriza glabra) supplementation, storage time and temperature on quality of quail eggs. Prog Nutr. 20:665-671

11.

Gopinger E, Bavaresco C, Ziegler V, Lemes JS, Lopes DCN, Elias MC, Xavier EG. 2016; Performance, egg quality, and sensory analysis of the eggs of quails fed whole rice bran stabilized with organic acids and stored for different amounts of time. Can J Anim Sci. 96:128-134

12.

Hajati H, Zaghari M. 2019; Effects of Spirulina platensis on growth performance, carcass characteristics, egg traits and immunity response of Japanese quails. Iran J Appl Anim Sci. 9:347-357.

13.

Jafari SMA, Rabbani M, Emtyazjoo M, Piryaei F. 2014; Effect of dietary Spirulina platensis on fatty acid composition of rainbow trout (Oncorhynchus mykiss) fillet. Aquacult Int. 22:1307-1315

14.

Jeke A, Phiri C, Chitindingu K, Taru P. 2018; Ethnomedicinal use and pharmacological potential of Japanese quail (Coturnix coturnix japonica) birds meat and eggs, and its potential implications on wild quail conservation in Zimbabwe: A review. Cogent Food Agric. 4:1507305

15.

Kamely M, Karimi Torshizi MA, Khosravinia H. 2016; Omega-3 enrichment of quail eggs: Age, fish oil, and savory essential oil. J Agric Sci Technol. 18:347-359.

16.

Ludke MCMM, Pimentel ACS, Ludke JV, Silva JCNS, Rabello CBV, Santos JS. 2018; Laying performance and egg quality of Japanese quails fed diets containing castor meal and enzyme complex. Braz J Poult Sci. 20:781-788

17.

Omri B, Amraoui M, Tarek A, Lucarini M, Durazzo A, Cicero N, Santini A, Kamoun M. 2019; Arthrospira platensis (Spirulina) supplementation on laying hens’ performance: Eggs physical, chemical, and sensorial qualities. Foods. 8:386

18.

Ovando CA, Carvalho JC, Vinícius de Melo Pereira G, Jacques P, Soccol VT, Soccol CR. 2018; Functional properties and health benefits of bioactive peptides derived from Spirulina: A review. Food Rev Int. 34:34-51

19.

Priyadarshani I, Rath B. 2012; Commercial and industrial applications of micro algae: A review. J Algal Biomass. 3:89-100.

20.

Saeid A, Chojnacka K, Korczyński M, Korniewicz D. Dobrzański Z. 2013a. Effect on supplementation of Spirulina maxima enriched with Cu on production performance, metabolical and physiological parameters in fattening pigs. J Appl Phycol. 25:1607-1617

21.

Saeid A, Chojnacka K, Korczyński M, Korniewicz D, Dobrzański Z. 2013b; Biomass of Spirulina maxima enriched by biosorption process as a new feed supplement for swine. J Appl Phycol. 25:667-675

22.

Sahin N, Akdemir F, Orhan C, Kucuk O, Hayirli A, Sahin K. 2008; Lycopene-enriched quail egg as functional food for humans. Food Res Int. 41:295-300

23.

Shahtoori PM, Emtyazjoo M, Bonakdar S, Rabani M. 2015; The anticancer effects of hexane extract of rainbow trout (Oncorhynchus mykiss) muscle enriched with vegetable oil Brassica sp. Cancer Res J. 3:63-67

24.

Sinaei M, Loghmani M, Bolouki M. 2018; Application of biomarkers in brown algae (Cystoseria indica) to assess heavy metals (Cd, Cu, Zn, Pb, Hg, Ni, Cr) pollution in the northern coasts of the Gulf of Oman. Ecotoxicol Environ Saf. 164:675-680

25.

Vaz BD, Moreira JB, Morais MG, Costa JAV. 2016; Microalgae as a new source of bioactive compounds in food supplements. Curr Opin Food Sci. 7:73-77

26.

Wang L, Pan B, Sheng J, Xu J, Hu Q. 2007; Antioxidant activity of Spirulina platensis extracts by supercritical carbon dioxide extraction. Food Chem. 105:36-41

27.

Wang Y, Sunwoo H, Cherian G, Sim JS. 2000; Fatty acid determination in chicken egg yolk: A comparison of different methods. Poult Sci. 79:1168-1171

28.

Zita L, Ledvinka Z, Klesalová L. 2013; The effect of the age of Japanese quails on certain egg quality traits and their relationships. Vet Arh. 83:223-232.


text:
Advanced Search
Article Contents
Article Contents

# Relative generalized Hamming weights of q-ary Reed-Muller codes

The authors are supported by the Danish National Research Foundation and the National Natural Science Foundation of China (Grant No. 11061130539) and The Danish Council for Independent Research (Grant No. DFF–4002-00367).
• Coset constructions of q-ary Reed-Muller codes can be used to store secrets on a distributed storage system in such a way that only parties with access to a large part of the system can obtain information while still allowing for local error-correction. In this paper we determine the relative generalized Hamming weights of these codes which can be translated into a detailed description of the information leakage [2,21,18,9]

Mathematics Subject Classification: Primary: 94A62, 94B65, 68P20; Secondary: 94B27.

 Citation:

• Figure 1.  Calculation of GHWs and RGHWs for $C_1={\mbox{RM}}_5(5, 2)$ and $C_2={\mbox{RM}}_5(3, 2)$

Figure 2.  The recursive algorithm VECA. We use the notation $((\beta_1, \ldots , \beta_{\kappa-1}), \beta_\kappa)=(\beta_1, \ldots , \beta_{\kappa-1}, \beta_\kappa)$ for concatenation

Figure 3.  The algorithm RHO

Table 1.  $C_1={\mbox{RM}}_5(2, 2), C_2={\mbox{RM}}_5(1, 2)$

 $r=m$ $d_r(C_1)$ $M_m(C_1, C_2)$ 1 15 15 2 19 19 3 20 22

Table 2.  $C_1={\mbox{RM}}_5(3, 2), C_2={\mbox{RM}}_5(2, 2)$

 $r=m$ $d_r(C_1)$ $M_m(C_1, C_2)$ 1 10 10 2 14 14 3 15 17 4 18 19

Table 3.  $C_1={\mbox{RM}}_5(4, 2), C_2={\mbox{RM}}_5(3, 2)$

 $r=m$ $d_r(C_1)$ $M_m(C_1, C_2)$ 1 5 5 2 9 9 3 10 12 4 13 14 5 14 15

Table 4.  $C_1={\mbox{RM}}_5(5, 2), C_2={\mbox{RM}}_5(4, 2)$

 $r=m$ $d_r(C_1)$ $M_m(C_1, C_2)$ 1 4 4 2 5 7 3 8 9 4 9 10

Table 5.  $C_1={\mbox{RM}}_5(6, 2), C_2={\mbox{RM}}_5(5, 2)$

 $r=m$ $d_r(C_1)$ $M_m(C_1, C_2)$ 1 3 3 2 4 5 3 5 6

Table 6.  The special case $u_2=q-2$ and $t=1$ with $q=16$. That is, $C_1={\mbox{RM}}_{16}(15, 2)$ and $C_2={\mbox{RM}}_{16}(14, 2)$. The function ${\mbox{diff}}(m)$ equals $M_m(C_1, C_2)-d_m(C_1)$

 m 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ${\mbox{diff}}(m)$ 0 0 14 15 29 43 45 59 73 87 90 104 118 132 146 150 $M_m(C_1, C_2)$ 16 31 46 61 76 91 106 121 136 151 166 181 196 211 226 241

Table 7.  Scheme based on $C_1 = RM_8(6, 2)$ and $C_2 = RM_8(5, 2)$. For local error-correction 7 queries are needed

 $m$ 1 2 3 4 5 6 7 $t_m$ 6 12 17 21 24 26 27 $t_m^\prime$ 6 7 13 14 15 20 21 $r_m$ 22 24 27 31 36 42 49 $r_m^\prime$ 28 33 34 35 41 42 49

Table 8.  Scheme based on $C_1 = RM_8(6, 2)$ and $C_2 = RM_8(4, 2)$. For local error-correction 7 queries are needed

 $m$ 1 2 3 4 5 6 7 8 9 10 11 12 13 $t_m$ 5 6 11 12 16 17 20 21 23 24 25 26 27 $t_m^\prime$ 5 6 7 12 13 14 15 19 20 21 22 23 26 $r_m$ 16 17 19 20 23 24 28 29 34 35 41 42 49 $r_m^\prime$ 19 20 21 25 26 27 28 33 34 35 41 42 49

Table 9.  Scheme based on $C_1 = RM_8(5, 2)$ and $C_2 = RM_8(4, 2)$. For local error-correction 6 or 7 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 6 $t_m$ 5 10 14 17 19 20 $t_m^\prime$ 5 6 7 12 13 14 $r_m$ 16 19 23 28 34 41 $r_m^\prime$ 25 26 27 33 34 41

Table 10.  Scheme based on $C_1 = RM_8(5, 2)$ and $C_2 = RM_8(3, 2)$. For local error-correction 6 or 7 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 6 7 8 9 10 11 $t_m$ 4 5 9 10 13 14 16 17 18 19 20 $t_m^\prime$ 4 5 6 7 11 12 13 14 15 18 19 $r_m$ 11 12 15 16 20 21 26 27 33 34 41 $r_m^\prime$ 13 17 18 19 20 25 26 27 33 34 41

Table 11.  Scheme based on $C_1 = RM_8(5, 2)$ and $C_2 = RM_8(2, 2)$. For local error-correction 6 or 7 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 $t_m$ 3 4 5 8 9 10 12 13 14 15 16 17 18 19 20 $t_m^\prime$ 3 4 5 6 7 10 11 12 13 14 15 17 18 19 20 $r_m$ 7 8 9 12 13 14 18 19 20 25 26 27 33 34 41 $r_m^\prime$ 9 10 11 12 13 17 18 19 20 25 26 27 33 34 41

Table 12.  Scheme based on $C_1 = RM_8(4, 2)$ and $C_2 = RM_8(3, 2)$. For local error-correction 5 or 7 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 $t_m(RGHW)$ 4 8 11 13 14 $t_m(GHW)$ 4 5 6 7 11 $r_m(RGHW)$ 11 15 20 26 33 $r_m(GHW)$ 18 19 25 26 33

Table 13.  Scheme based on $C_1 = RM_{16}(14, 2)$ and $C_2 = RM_{16}(13, 2)$. For local error-correction 15 queries are needed

 $m$ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 $t_m$ 14 28 41 53 64 74 83 91 98 104 109 113 116 118 119 $t_m^\prime$ 14 15 29 30 31 44 45 46 47 59 60 61 62 63 74 $r_m$ 106 108 111 115 120 126 133 141 150 160 171 183 196 210 225 $r_m^\prime$ 161 162 163 164 165 177 178 179 180 193 194 195 209 210 225

Table 14.  Scheme based on $C_1 = RM_{16}(13, 2)$ and $C_2 = RM_{16}(12, 2)$. For local error-correction 14 or 15 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 $t_m$ 13 26 38 49 59 68 76 83 89 94 98 101 103 104 $t_m^\prime$ 13 14 15 28 29 30 31 43 44 45 46 47 58 59 $r_m$ 92 95 99 104 110 117 125 134 144 155 167 180 194 209 $r_m^\prime$ 146 147 148 149 161 162 163 164 177 178 179 193 194 209

Table 15.  Scheme based on $C_1 = RM_{16}(12, 2)$ and $C_2 = RM_{16}(11, 2)$. For local error-correction 13 or 15 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 6 7 8 9 10 11 12 13 $t_m$ 12 24 35 45 54 62 69 75 80 84 87 89 90 $t_m^\prime$ 12 13 14 15 27 28 29 30 31 42 43 44 45 $r_m$ 79 83 88 94 101 109 118 128 139 151 164 178 193 $r_m^\prime$ 131 132 133 145 146 147 148 161 162 163 177 178 193

Table 16.  Scheme based on $C_1 = RM_{16}(11, 2)$ and $C_2 = RM_{16}(10, 2)$. For local error-correction 12 or 15 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 6 7 8 9 10 11 12 $t_m$ 11 22 32 41 49 56 62 67 71 74 76 77 $t_m^\prime$ 11 12 13 14 15 26 27 28 29 30 31 41 $r_m$ 67 72 78 85 93 102 112 123 135 148 162 177 $r_m^\prime$ 116 117 129 130 131 132 145 146 147 161 162 177

Table 17.  Scheme based on $C_1 = RM_{16}(10, 2)$ and $C_2 = RM_{16}(9, 2)$. For local error-correction 11 or 15 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 6 7 8 9 10 11 $t_m$ 10 20 29 37 44 50 55 59 62 64 65 $t_m^\prime$ 10 11 12 13 14 15 25 26 27 28 29 $r_m$ 56 62 69 77 86 96 107 119 132 146 161 $r_m^\prime$ 101 113 114 115 116 129 130 131 145 146 161

Table 18.  Scheme based on $C_1 = RM_{16}(9, 2)$ and $C_2 = RM_{16}(8, 2)$. For local error-correction 10 or 15 queries are needed, depending on the error-probability

 $m$ 1 2 3 4 5 6 7 8 9 10 $t_m$ 9 18 26 33 39 44 48 51 53 54 $t_m^\prime$ 9 10 11 12 13 14 15 24 25 26 $r_m$ 46 53 61 70 80 91 103 116 130 145 $r_m^\prime$ 97 98 99 100 113 114 115 129 130 145
•  [1] H. E. Andersen and O. Geil, Evaluation codes from order domain theory, Finite Fields Appl., 14 (2008), 92-123.  doi: 10.1016/j.ffa.2006.12.004. [2] T. Bains, Generalized Hamming Weights and Their Applications to Secret Sharing Schemes Master's thesis, Univ. Amsterdam, 2008. [3] S. L. Bezrukov and U. Leck, Macaulay posets Electr. J. Combin. 1000 (2005), DS12. [4] H. Chen, R. Cramer, S. Goldwasser, R. De Haan and V. Vaikuntanathan, Secure computation from random error correcting codes, in Adv. Crypt. -EUROCRYPT 2007, Springer, 2007, 291–310. doi: 10.1007/978-3-540-72540-4_17. [5] D. A. Cox, J. Little and D. O'Shea, Ideals, Varieties and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra 3rd edition, Springer, 2012. doi: 10.1007/978-1-4757-2181-2. [6] I. Duursma and J. Shen, Multiplicative secret sharing schemes from Reed-Muller type codes, in Proc. 2012 IEEE Int. Symp. Inf. Theory (ISIT), IEEE, 2012,264–268. [7] O. Geil, S. Martin, U. Martí nez-Peñas, R. Matsumoto and D. Ruano, On asymptotically good ramp secret sharing schemes preprint, arXiv: 1502.05507 [8] O. Geil, S. Martin, U. Martí nez-Peñas and D. Ruano, Refined analysis of RGHWs of code pairs coming from Garcia-Stichtenoths second tower J. Algebra Comb. Discrete Struct. Appl. to appear. doi: 10.13069/jacodesmath.34390. [9] O. Geil, S. Martin, R. Matsumoto, D. Ruano and Y. Luo, Relative generalized Hamming weights of one-point algebraic geometric codes, IEEE Trans. Inf. Theory, 60 (2014), 5938-5949.  doi: 10.1109/TIT.2014.2345375. [10] O. Geil, R. Matsumoto and D. Ruano, Feng–Rao decoding of primary codes, Finite Fields Appl., 23 (2013), 35-52.  doi: 10.1016/j.ffa.2013.03.005. [11] P. Heijnen, Some Classes of Linear Codes Ph. D thesis, Technische Universiteit Eindhoven, 1999. [12] P. Heijnen and R. Pellikaan, Generalized Hamming weights of q-ary Reed-Muller codes in IEEE Trans. Inform. Theory Citeseer, 1998. doi: 10.1109/18.651015. [13] T. Helleseth, T. Kløve and J. Mykkeltveit, The weight distribution of irreducible cyclic codes with block lengths $n_1((q^l- 1)/n)$, Discr. Math., 18 (1077), 179-211.  doi: 10.1016/0012-365X(77)90078-4. [14] T. Høholdt, On (or in) Dick Blahut's footprint, Codes, Curves and Signals (ed. A. Vardy), Kluwer Acad. Publ. , 1998, 3–9. doi: 10.1007/978-1-4615-5121-8_1. [15] J. Katz and L. Trevisan, On the efficiency of local decoding procedures for error-correcting codes, in Proc. 32nd Ann. ACM Symp. Theory Comp. , ACM, 2000, 80–86. doi: 10.1145/335305.335315. [16] T. Kløve, The weight distribution of linear codes over $GF(q^l)$ having generator matrix over $GF(q)^*$, Discr. Math., 23 (1978), 159-168.  doi: 10.1016/0012-365X(78)90114-0. [17] N. Koblitz, A Course in Number Theory and Cryptography Springer, 1994. doi: 10.1007/978-1-4419-8592-7. [18] J. Kurihara, T. Uyematsu and R. Matsumoto, Secret sharing schemes based on linear codes can be precisely characterized by the relative generalized Hamming weight, IEICE Trans. Fundam. Electr. Commun. Comp. Sci., 95 (2012), 2067-2075. [19] K. Lee, Bounds for generalized Hamming weights of general AG codes, Finite Fields Appl., 34 (2015), 265-279.  doi: 10.1016/j.ffa.2015.02.006. [20] Z. Liu, W. Chen and Y. Luo, The relative generalized Hamming weight of linear $q$-ary codes and their subcodes, Des. Codes Crypt., 48 (2008), 111-123.  doi: 10.1007/s10623-008-9170-1. [21] Y. Luo, C. Mitrpant, A. H. Vinck and K. Chen, Some new characters on the wire-tap channel of type Ⅱ, IEEE Trans. Inf. Theory, 51 (2005), 1222-1229.  doi: 10.1109/TIT.2004.842763. [22] A. B. Sørensen, Projective Reed-Muller codes, IEEE Trans. Inf. Theory, 37 (1991), 1567-1576.  doi: 10.1109/18.104317. [23] M. Tsfasman and S. G. Vladut, Algebraic-Geometric Codes Kluwer Acad. Publ. , 1991. doi: 10.1007/978-94-011-3810-9. [24] V. K. Wei, Generalized Hamming weights for linear codes, IEEE Trans. Inf. Theory, 37 (1991), 1412-1418.  doi: 10.1109/18.133259. [25] A. D. Wyner, The wire-tap channel, Bell System Techn. J., 54 (1975), 1355-1387.  doi: 10.1002/j.1538-7305.1975.tb02040.x. [26] S. Yekhanin, Locally decodable codes, Found. Trends Theor. Comp. Sci., 6 (2010), 139-255.  doi: 10.1561/0400000030. [27] J. Zhang and K. Feng, Relative generalized Hamming weights of cyclic codes preprint, arXiv: 1505.07277

Figures(3)

Tables(18)

## Article Metrics

HTML views(378) PDF downloads(250) Cited by(0)

## Other Articles By Authors

• on this site
• on Google Scholar

### Catalog

/

DownLoad:  Full-Size Img  PowerPoint

format: plain


text:
# Confusion in Posterior Probability Calculation

I know posterior probability as,

$P(\theta|x)= [(P(x|\theta)*(P(\theta))/(P(x))]$,

I am slightly confused with the term $P(y|x;\theta)$,

should I interpret it as, posterior of y given x on the parameter of $\theta$, and how may I interpret

$P(y|x;\theta)=[(P(x|y)*(P(y))/(P(x))]$ under the parameter theta,

or anything else?

If any one of the esteemed members may kindly suggest?

Regards, Subhabrata Banerjee.

• The term $P(y\mid x;\theta)$ occurs nowhere in the linked to article. Where did you encounter it? – Graham Kemp Jun 10 '14 at 22:36

I think you will need to provide more context for where you found the second term $P(y \mid x ; \theta)$, as far as I know, it has not standard definition and its meaning is usually inferred from the context.
My guess is that $\theta$ governs the distribution of $y$. As an example, maybe $y$ is Bernoulli with parameter $\theta$, so $P(y)$ (which might be more properly written $P(y;\theta)$) is defined by $P(y=1):=\theta$ and $P(y=0):=1-\theta$. Again, this is just my guess; you might get better answers if you provide more context. Note that $\theta$ does not appear in your second equation explicitly.
Also, note that $\theta$, $x$, and $y$ play different roles in your two equations. You just need to permute them around, but I wanted to mention this in case you did not notice.
• @SUBHABRATA From Andrew Ng's notes, he first has a notion of $p(x,z;\theta)$ and $p(x;\theta)$ where $\theta$ contains all parameters governing the $x$ and $z$ (i.e., mean/variance of Gaussian, probability of success of Bernoulli, etc.). You can see in the calculation in the center of page 4 what he means by $p(z \mid x;\theta)$. In essence, you can think of the semicolon as a "conditional" bar (i.e., $p(z\mid x;\theta) \simeq p(z\mid x,\theta)$ and $p(x;\theta) \simeq p(x\mid \theta)$); the use of the semicolon just clarifies that $\theta$ is a parameter and not a random variable. – angryavian Jun 11 '14 at 15:08


text:
# Factors of 6859

If it's not what You are looking for type in the field below your own integer, and You will get the solution.

Factors of 6859:

By prime factorization of 6859 we follow 5 simple steps:
1. We write number 6859 above a 2-column table
2. We divide 6859 by the smallest possible prime factor
3. We write down on the left side of the table the prime factor and next number to factorize on the ride side
4. We continue to factor in this fashion (we deal with odd numbers by trying small prime factors)
5. We continue until we reach 1 on the ride side of the table

 6859 prime factors number to factorize 19 361 19 19 19 1

Factors of 6859 = 1×19×19×19= $1 × 19^3$

## Related pages

roman numerals 777least to greatest calculator for fractions2x-3 squaredx 2y 8 2x y 7derivative of x cos xprime factorization 20094 in roman numeralsmath problem solver with stepsroman numerals 1966y 3x squaredln u derivative100-83xy 2-x 3y 6901 roman numerals120-92roman numerals for 1969completing the square 3x 2prime factorization of 186246-246kx2512345 54321multiplication fraction calculator5y x 100.375 as fractionsin10e3x1963 roman numeralsmultiple mixed fraction calculatorantiderivative of e 7xsimplify 5x 3xgcf of 147whats the prime factorization of 81easy equation solver99 in roman numeralscos and cox1.4375 to fractionsolving equation calculatorfactoring equations solversinx sinycos4x sin4xwhat is the prime factorization of 92lcm of 1501yfpercent problems calculatormultiplying mixed fractions calculatorwhat is 10 percent of 2000.00tan of 2pisquare root 484derivative of cos2x7 7 7 7x7 7solve the equation calculator with fractions2x 5y 30prime factorization of 38010-12.51150 in roman numeralshow to solve 2x y 3sin3x cos3x 0subtracting improper fractions calculatorsimplify 3x 5xvf 2 vi 2 2adfactor 4x2 4x 1635-100esay solutionssinx cosx 1write the prime factorization of 361percent20000 pounds in dollars3.14r2prime factorization of 380derivative of e 9x7axtanpit4360roman numerals 1000004x 5y 10180-126what is 6.25 in fraction form


text:
Inverse of a matrix

1. Jan 9, 2013

Artusartos

In this video:

At the time 2:10, I don't understand why we have to note that $$\lambda^3 - 8\lambda$$ and $$\lambda^2 + 1$$ are relatively prime.

Last edited by a moderator: Sep 25, 2014
2. Jan 9, 2013

rasmhop

The Euclidean algorithm only works for relatively prime elements, so when he says that $r(\lambda), q(\lambda)$ exists such that
$$r(\lambda)(\lambda^3-8\lambda)+q(\lambda)(\lambda^2+1)=1$$
he uses that they are relatively prime.

3. Jan 10, 2013

Artusartos

Thanks a lot, but...

1) We know that any two elements have a gcd, right? Can't we just use that formula with that gcd?

2) Also, how do we know if they are relatively prime?

4. Jan 14, 2013

HallsofIvy

Yes, every two elements of an integral domain have a "gcd". They are "relatively prime", by definition, if and only if that gcd is 1. In particular, the "diophantine" equation ax+ by= c has a solution for x and y if and only if any divisor of a and b is also a divisor of c (if n is a divisor of both a and b, a= np, b= nq, then, for any x, y, ax+ by= n(px+ qy) so n divides ax+ by and so must also divide c). In particular, if a and b have a common divisor, so they have a gcd, that also divides c, we can divide the entire equation by it to get a simpler equation in which the coefficients are relatively prime.

We could but, if that gcd is not 1, it is always easier to divide through by gcd to get a simpler equation in which the gcd of the two coefficients is 1- i.e. in which they are relatively prime.

By finding the gcd! Two elements are relatively prime if and only if their gcd is 1.

In your original post one of the elements was $\lambda^3- 8\lambda= \lambda(\lambda^2- 8)$ and it is easy to see that $\lambda^2- 8= 0$ has no integer (or rational) roots so that cannot be factored further. Similarly $\lambda^2+ 1$ cannot be factored with integer (or even real) coefficients. Since they have no factors in common, they are relatively prime.

Last edited by a moderator: Jan 14, 2013
5. Jan 14, 2013

Artusartos

Thanks a lot.


text:
# caption spacing between figures

I have been trying to put 2 figures next to each other, however i have noticed that the spacing between caption is non existing,

\begin{figure}
\centering
\begin{minipage}[b]{0.52\textwidth}
\end{minipage}%
\begin{minipage}[b]{0.52\textwidth}
\includegraphics[width=1\textwidth]{Figures/decr-sent.eps}
\caption{Sentiment index. Shaded areas highlight the periods of increasing and decreasing sentiment.}
\end{minipage}
\end{figure}

can someone help me fix this problem? Thanks in advance

• thank you so much guys, that worked magic! – Filip Pierzgalski Apr 7 '19 at 2:21
• Even better {dimexpr 0.5\textwidth-0.5\columnsep} – John Kormylo Apr 7 '19 at 17:00
• Hi, John! could u be more specific of where exactly to put this command? thank you in advance – Filip Pierzgalski Apr 7 '19 at 23:12
• @FilipPierzgalski He suggest you uses \begin{minipage}[b]{\dimexpr 0.5\textwidth-0.5\columnsep} instead of \begin{minipage}[b]{0.45\textwidth} in the two minipage (and don't forget to use \hfill between the two minipage environments as suggested by egreg). This code create a gap of exactly one column sep between the two pictures (the same gap as in a default two-column document). – quark67 Apr 8 '19 at 2:24
• I have included a option with subfigure. It might be better to work with in some cases and might help with your question. – Andre Apr 9 '19 at 13:40

sum of your minipage width is larger than text width (0.52\textwidth + 0.52\textwidth = 1.04 \textwidth. at least you need to reduce it to 1\textwidth or as is sugested in comment below your questionreduceminipage width to value smaller than 0.5. For example 0.48 can be good value.

beside use of minipage it my be worth to consider tabularx instead them:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{tabularx}

\begin{document}
\begin{figure}
\centering
\begin{minipage}[b]{0.48\textwidth}
\end{minipage}\hfill
\begin{minipage}[b]{0.48\textwidth}
\includegraphics[width=1\textwidth]{Figures/decr-sent.eps}
\caption{Sentiment index. Shaded areas highlight the periods of increasing and decreasing sentiment.}
\end{minipage}
\end{figure}

\begin{figure}
\begin{tabularx}{\linewidth}{@{}XX@{}}
&
\includegraphics[width=\linewidth]{Figures/decr-sent.eps}
\caption{Sentiment index. Shaded areas highlight the periods of increasing and decreasing sentiment.}
\end{tabularx}

above image belong to your approach (with corrected minipage width), bottom image is result at use of tabularx. in test i use article document class, since you not provide any information about your document layout˙and used document class.

Have you tried subfigure, with the package subcaption? Here is the code:

\documentclass{article}

\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{figure}[ht]
\centering
\begin{subfigure}[t]{0.49\linewidth}
\includegraphics[width=1\linewidth]{example-image-a}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\linewidth}
\includegraphics[width=1\linewidth]{example-image-b}
\caption{Sentiment index. Shaded areas highlight the periods of increasing and decreasing sentiment.}
\end{subfigure}
\end{figure}

\end{document}

I have included a small space between the figures with \hfill`, following this answer. You can remove it if you prefer the figures closer to each other.

The output is this:


text:
# How to have center title in listings when you have subcaption (workaournd conflict between listing caption and subcaption class)?

I want to use listings package (\usepackage{listings}) to show a matlab code in a paper (using elsarticle class) but the title is not aligned in center below the code. This happened after I added xleftmargin=3.5cm and xrightmargin=3.5cm to add margin from left and right. If I remove these two options, title appears at the center of page! How can I have both margin and center title with listings?

I used \centering and \begin{center}...\end{center} but they didn't work.

UPDATE: I found out that \usepackage{subcaption} is the problem. without it title will be centered. But I need subcaption!

my code:

\documentclass[3p,times]{elsarticle}

\usepackage{ecrc}
\volume{00}
\firstpage{1}
\journalname{Best Journal Ever}
\runauth{S. Gerami}
\jid{}
\jnltitlelogo{Best Journal Ever}
\usepackage{amssymb}
\usepackage[figuresright]{rotating}
\usepackage[ruled,vlined]{algorithm2e}

%%FOR MATH
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amsfonts}

%%I NEED THESE PACKAGED FOR FIGURES AND SUBCAPTIONs
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

%%FOR CODES
\usepackage{listings}
\usepackage{color}

%%FOR TABLES
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\usepackage{lipsum}
\begin{document}

\begin{frontmatter}
\title{title of my paper}

\address[bahonar]{Faculty of Mathematics and Computer Science, Best University, Somewhere, The One Country}

\begin{abstract}
abstract text....
\end{abstract}

\end{frontmatter}

\section{First section}
\lipsum{}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}

\lstset{ %
backgroundcolor=\color{white},   % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
basicstyle=\footnotesize,        % the size of the fonts that are used for the code
breakatwhitespace=false,         % sets if automatic breaks should only happen at whitespace
breaklines=true,                 % sets automatic line breaking
captionpos=b,                    % sets the caption-position to bottom
deletekeywords={...},            % if you want to delete keywords from the given language
extendedchars=true,              % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
frame=single,                    % adds a frame around the code
keepspaces=true,                 % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
keywordstyle=\color{blue},       % keyword style
language=Octave,                 % the language of the code
morekeywords={*,...},            % if you want to add more keywords to the set
numbers=left,                    % where to put the line-numbers; possible values are (none, left, right)
numbersep=5pt,                   % how far the line-numbers are from the code
numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers
rulecolor=\color{black},         % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false,                % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false,          % underline spaces within strings only
showtabs=false,                  % show tabs within strings adding particular underscores
stepnumber=1,                    % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color{mymauve},     % string literal style
tabsize=2,                       % sets default tabsize to 2 spaces
%  title=Script 1: A program in Matlab to estimate the total area under sin(x),                   % show the filename of files included with \lstinputlisting; also try caption instead of title
xleftmargin=3.5cm,
xrightmargin=3.5cm
}

\begin{lstlisting}[title={Script 1: A program in Matlab to estimate the total area under $\sin(x)$}]
a=0;
b=pi/2;
h=max(feval(@func,linspace(a,b,n)));
x=a+(b-a)*rand(n,1);
y=h*rand(n,1);
N=0;
f=sin(x);
for j=1:n
if y(j)<=f(j)
N=N+1;
end
end
ans=N/n*h*(b-a)
\end{lstlisting}
%*****************
\lipsum{}

\end{document}

output:

UPDATE2: I tested method proposed in following link and not worked: Center caption in listing

but then I saw this answer and edited to this:

\begin{figure}[thp]
\begin{center}
\begin{lstlisting}[numbers=left]
My Code
Another line
\end{lstlisting}
\end{center}
\caption{my caption or title}
\end{figure}

result:

It's good but the gap between box and caption is too much. I need to reduce it for good result.

UPDATE3: This link has the best answer to removing gap for just one figure.

\begin{figure}[!ht]
\centering
\includegraphics[width=0.5\textwidth]{image}
\vspace{-1em}
\caption{\textcolor{gray}{\footnotesize \textit{ImageCaption}}}
\vspace{-1.5em}
\end{figure}

• I get it centered. Anyway, you'd probably better use \begin{lstlisting}[title={Script 1: A program in Matlab to estimate the total area under $\sin(x)$}] instead of putting it inside the \lstset. – karlkoeller Sep 23 '13 at 19:35
• @karlkoeller I did what you said and got the same result! How you centered it? did you have margin and center title? – sajjadG Sep 23 '13 at 19:39
• I've just used your code. Please post a complete compilable example that reproduces your issue. – karlkoeller Sep 23 '13 at 19:53
• To reduce the gap, move the \caption command inside the center environment and add \vspace*{-\baselineskip} just before \caption. – Andrew Swann Sep 24 '13 at 11:15
• Did you read section 6.7 of the caption manual? – Martin Schröder Sep 25 '13 at 19:19

Effectively, there is some incopatibility between caption and listings when you use xleftmargin and xrightmargin...

Without changing any commands from one or the other package, one thing that comes to mind is to insert the listing inside a centered minipage.

So, remove the lines

  xleftmargin=3.5cm,
xrightmargin=3.5cm

from inside the \lstset

\begin{center}
\begin{minipage}{.5\textwidth}
\begin{lstlisting}[title={Script 1: A program in Matlab to estimate the total area under $\sin(x)$}]
a=0;
b=pi/2;
h=max(feval(@func,linspace(a,b,n)));
x=a+(b-a)*rand(n,1);
y=h*rand(n,1);
N=0;
f=sin(x);
for j=1:n
if y(j)<=f(j)
N=N+1;
end
end
ans=N/n*h*(b-a)
\end{lstlisting}
\end{minipage}
\end{center}

Thus, the following MWE

\documentclass[3p,times]{elsarticle}

%%I NEED THESE PACKAGED FOR FIGURES AND SUBCAPTIONs
\usepackage{graphicx}
%\usepackage{caption}  % no need because it is loaded by subcaption.
\usepackage{subcaption}

%%FOR CODES
\usepackage{listings}
\usepackage{color}

\usepackage{lipsum}
\begin{document}

\begin{frontmatter}
\title{title of my paper}

\begin{abstract}
abstract text....
\end{abstract}

\end{frontmatter}

\section{First section}
\lipsum{}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}

\lstset{ %
backgroundcolor=\color{white},   % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
basicstyle=\footnotesize,        % the size of the fonts that are used for the code
breakatwhitespace=false,         % sets if automatic breaks should only happen at whitespace
breaklines=true,                 % sets automatic line breaking
captionpos=b,                    % sets the caption-position to bottom
deletekeywords={...},            % if you want to delete keywords from the given language
extendedchars=true,              % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
frame=single,                    % adds a frame around the code
keepspaces=true,                 % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
keywordstyle=\color{blue},       % keyword style
language=Octave,                 % the language of the code
morekeywords={*,...},            % if you want to add more keywords to the set
numbers=left,                    % where to put the line-numbers; possible values are (none, left, right)
numbersep=5pt,                   % how far the line-numbers are from the code
numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers
rulecolor=\color{black},         % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false,                % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false,          % underline spaces within strings only
showtabs=false,                  % show tabs within strings adding particular underscores
stepnumber=1,                    % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color{mymauve},     % string literal style
tabsize=2,                       % sets default tabsize to 2 spaces
}
\begin{center}
\begin{minipage}{.5\textwidth}
\begin{lstlisting}[title={Script 1: A program in Matlab to estimate the total area under $\sin(x)$}]
a=0;
b=pi/2;
h=max(feval(@func,linspace(a,b,n)));
x=a+(b-a)*rand(n,1);
y=h*rand(n,1);
N=0;
f=sin(x);
for j=1:n
if y(j)<=f(j)
N=N+1;
end
end
ans=N/n*h*(b-a)
\end{lstlisting}
\end{minipage}
\end{center}
\lipsum{}

\end{document}

yields

Just some remarks:

1. I've removed some code from your MWE since I didn't know where to get the package ecrc.
2. the package caption doesn't need to be loaded since it is already loaded by the package subcaption.
3. I don't know if you are using title instead of caption for a specific reason. If the reason is to get rid of the word "Listing" inside the caption you can do the following:

a. put the following line in the preamble:

\renewcommand{\lstlistingname}{Script}

b. replace

\begin{lstlisting}[title={Script 1: A program in Matlab to estimate the total area under $\sin(x)$}]

with

\begin{lstlisting}[caption={A program in Matlab to estimate the total area under $\sin(x)$}]

• The ecrc package must be called to make the CRC functionality available. It's in the Elsevier template. You used \documentclass[3p,times]{elsarticle} and ecrc is in it! Your answer is very good. As you can see I have a workaround with figure for this issue. Your remarks is so much teaching. Thank you. – sajjadG Sep 24 '13 at 13:52
• @sajjadG Remember that inserting the listing inside a figure causes the listing to float. Also, you will have it listed in the List of Figures. If you want this behavior, then use your workaround, otherwise, I'd suggest you to use the code in my answer. – karlkoeller Sep 24 '13 at 14:01


text:
# Does Pascal's Wager fail archimedean property?

I assume most people have heard of Pascal's Wager, in case you have not: https://en.wikipedia.org/wiki/Pascal%27s_Wager

By the Stanford encyclopedia of philosphy:

"We have a decision under risk, with probabilities assigned to the ways the world could be, and utilities assigned to the outcomes. In particular, we represent the infinite utility associated with salvation as ‘∞’. We assume that the real line is extended to include the element ‘∞’, and that the basic arithmetical operations are extended as follows: For all real numbers r: ∞+r=∞. For all real numbers r: ∞×r=∞ if r>0."

Doesn't this contradict one of the axioms of the expected utility theory? In particular the archimedean property states:

Let l, l’ and l’’ be three lotteries in L such that $$l \succ l’ \succ l’’$$. Then there are $$p,q \in(0,1)$$ such that: $$pl + (1-p)l’’ \succ l’ \succ ql + (1-q)l’’$$

and it basically means that there are no infinitely preferred or infinitely despised lotteries.

But in the Pascal's Wager, $$l$$ = salvation = $$+ \infty$$, $$l'$$ = nothing (god doesn't exist), $$l''$$ = damnation = $$- \infty$$, but then there does not exist a probability $$p > 0$$ such that any mixed combination of damnation and salvation is strictly preferred than "god doesn't exist".
What do you think?

• Why do you assume damnation is $-\infty$? 0 seems to work just as well. – Giskard Dec 2 '18 at 14:29
• You're right, but even without it the archimedean property is still violated. – Zhang_anlan Dec 2 '18 at 15:44
• Yes, you seem to be correct. The wager's lotteries also seem to violate continuity. – Giskard Dec 2 '18 at 16:28


text:
# Chain Rule

Differentiate x^(lnx) using implicit differentiation and the chain rule

Tip: This isn't the place to ask a question because the teacher can't reply.

1 of 10 videos by Tiago Hands

## Key Questions

• We can do a number of things ..

1) Use the chain rule and quotient rule

2) Use the chain rule and the power rule after the following transformations.

$y = {\left(\frac{1 + x}{1 - x}\right)}^{3} = {\left(\left(1 + x\right) {\left(1 - x\right)}^{-} 1\right)}^{3} = {\left(1 + x\right)}^{3} {\left(1 - x\right)}^{-} 3$

3) You could multiply out everything, which takes a bunch of time, and then just use the quotient rule.

Let's keep it simple and just use the chain rule and quotient rule.

Chain Rule $\implies y ' = 3 {\left(\frac{1 + x}{1 - x}\right)}^{2} \cdot \left(\frac{1 + x}{1 - x}\right) '$

$y ' = 3 {\left(\frac{1 + x}{1 - x}\right)}^{2} \cdot \frac{\left(1 - x\right) \left(1\right) - \left(1 + x\right) \left(- 1\right)}{1 - x} ^ 2$

$y ' = 3 {\left(\frac{1 + x}{1 - x}\right)}^{2} \cdot \frac{\left(1 - x\right) - \left(1 + x\right) \left(- 1\right)}{1 - x} ^ 2$

$y ' = 3 {\left(\frac{1 + x}{1 - x}\right)}^{2} \cdot \frac{\left(1 - x\right) + \left(1 + x\right)}{1 - x} ^ 2$

$y ' = 3 {\left(\frac{1 + x}{1 - x}\right)}^{2} \cdot \frac{1 - x + 1 + x}{1 - x} ^ 2$

$y ' = 3 {\left(\frac{1 + x}{1 - x}\right)}^{2} \cdot \frac{1 + 1}{1 - x} ^ 2$

$y ' = 3 {\left(\frac{1 + x}{1 - x}\right)}^{2} \cdot \frac{2}{1 - x} ^ 2$

$y ' = 6 {\left(\frac{1 + x}{1 - x}\right)}^{2} \cdot \frac{1}{1 - x} ^ 2$

$y ' = 6 \frac{{\left(1 + x\right)}^{2}}{1 - x} ^ 2 \cdot \frac{1}{1 - x} ^ 2$

$y ' = 6 \frac{{\left(1 + x\right)}^{2}}{1 - x} ^ 4$

• By Chain Rule and Power Rule,

$y ' = \frac{1}{4} {\left({x}^{2} + 3 x + 5\right)}^{\frac{1}{4} - 1} \cdot \left({x}^{2} + 3 x + 5\right) '$

$= \frac{1}{4} {\left({x}^{2} + 3 x + 5\right)}^{- \frac{3}{4}} \left(2 x + 3\right)$

• This key question hasn't been answered yet.

## Questions

• · 10 hours ago
• · Yesterday
• · Yesterday
• · 2 days ago
• · 2 days ago
• · 2 days ago
• · 2 days ago
• · 3 days ago
• · 5 days ago
• · 6 days ago
• · 6 days ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
· 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago
• · 1 week ago


text:
# expected number of in- and out-going links in random PA graph

I am looking at an altered directed random graph of the preferential attachment model. Initial starting configuration is:

$$t=1,$$ one node $$v_1$$.

At each time step $$(t+1)$$ either we create a new node with probability $$p$$ which attaches immediately to an already existing node with probability $$\frac{(j_i(t)+1)}{N(t)+t}$$, where $$j_i(t)$$ stands for the in-degree of a node $$i$$ at time $$t$$ and $$N(t)$$ stands for the number of nodes at time $$t$$ which is in expectation equal to $$pt$$. Or with probability $$1-p$$ we create a new link between two already existing nodes. The probability of having a link going from $$i$$ to a node $$l$$ will be $$\frac{(k_i(t)+1)(j_l(t)+1)}{(N(t)+t)^2}$$, where $$k_i(t)$$ stands for the out-degree of a node $$i$$ at time $$t$$.

I am interested in calculating the expected number of in- and out-going edges for a node $$i$$ at time $$t+1$$.

My idea is that for $$t\geq 2$$, $$\mathbb{E}(\text{in-going links to i})= (N(t)-i)\frac{(j_i(t)+1)}{t(p+1)} + (t-N(t))\frac{(j_i(t)+1)}{t(p+1)}=(t-i)\frac{(j_i(t)+1)}{t(p+1)}$$ The first term comes from all newly created nodes and the second one from newly created links and $$\mathbb{E}(\text{out-going links from i})= 1 + (t-N(t))\frac{(k_i(t)+1)}{t(p+1)}$$ where again the second one from newly created links and the $$1$$ comes from the very first link when $$i$$ got created.

Is this correct or am I missing something?

• I don't think your probabilities add up to $1$ as written. $\frac{j_i(t)+1}{t}$ should be $\frac{j_i(t)+1}{2t}$, and $\frac{(k_i(t)+1)(j_l(t)+1)}{2t}$ should be $\frac{(k_i(t)+1)(j_l(t)+1)}{4t^2}$ (assuming you allow $i=l$; if that is not allowed then the denominator is more complicated). – Misha Lavrov Jan 4 at 20:58
• @MishaLavrov Oh thank you so much! If I leave it unchanged I get that the probabilities add up to $1+p$ so you are for sure correct- I was not aware of this ... I will soon edit my post accordingly. But if I change it as you suggested I still don't get that the probabilities add up to 1? ( I also realized that I can simplify my starting position s.t. we have $N(t)=pt$.) – Alisat Jan 5 at 7:23
• @MishaLavrov Shouldn't the denominators be $(1+p)t$ and $(p+1)^2t^2$ respectively? (Provided $N(t)=tp$) – Alisat Jan 5 at 7:50
• Right, sorry - the sum of $j_i(t)$ over all $i$ is $t$, and the sum of $1$ over all  is $N(t)$, so the denominators should be $N(t)+t$ and $(N(t)+t)^2$.' – Misha Lavrov Jan 5 at 15:18
• I will have to think about it longer but there must be some other flaw: if $p=1$, then your expected in-degree at time $t+1$ is less than the in-degree at time $t$. – Misha Lavrov Jan 5 at 16:58


text:
# Assignment 1 - 2010 - Solution

 Due date(s): 27 September 2010 (PDF) Assignment questions (PDF) Assignment solutions

The solutions were prepared by both TA's: Ali and Elliot.

# Question 1 [1]

Note

Distillation tray modelling.

The distillation column is a common unit operation in refineries, air-separation, and fine-chemical processes. The figure, taken from Wikipedia, shows a cross-section of two trays in a distillation column.

1. Redraw the figure, and add to it a boundary you would use to write the mass and energy balance equations for a single tray.
2. Which physical phenomena would you need to consider for an accurate model?
3. Which reasonable simplifying assumptions would you make to reduce the complexity of your model?

## Solution

1. The following boundary would be a good basis for energy and mass balances on a single tray:

2. In order to construct the mass balances you would need to account for:

• Liquid mass flow (both bulk and of $$n-1$$ individual components) into the tray's downcomer from the tray above.
• Liquid mass flow (both bulk and of $$n-1$$ individual components) out of the tray into the next tray's downcomer.
• Vapour mass flow (both bulk and of $$n-1$$ individual components) into the bottom of the tray from the tray below (condensation through the bubble caps).
• Vapour mass flow (both bulk and of $$n-1$$ individual components) off the top of the tray (evaporation).
• Either a form of thermodynamic equilibrium calculation to calculate the steady state vapour to liquid ratios or a form of calculation (likely empirical) to calculate the dynamic vapour flow rates from each tray.
• In the more complicated case, thermodynamic relations to calculate mixture properties within each tray.

In order to construct an energy balance you would need to account for:

• Convective flow of energy in via liquid flow into the tray's downcomer from the tray above.
• Convective flow of energy out via liquid flow out of the tray into the next tray's downcomer.
• Convective flow of energy in via vapour flow into the bottom of the tray from the tray below (condensation through the bubble caps).
• Convective flow of energy out via vapour flow off the top of the tray (evaporation).
• Thermodynamic relations to calculate the relative energy of the liquid and vapour mixtures at the internal conditions.
• Depending on how complicated the model is desired to be one could also account for convective heat loss off of the sides of the column.
3. In order to simplify the model one could make any of the following assumptions (whether these assumptions are reasonable depends on the system being modelled):

• Perfect mixing of liquid resulting in uniform temperature and concentration at each tray.
• 100% condensation of vapour entering the bottom of each tray.
• All vapour leaving a tray enters the next tray (i.e. no condensation and backflow in the vapour transfer area).
• All vapour transmission occurs over the active tray area.
• No vapour transfer within the downcomer regions.
• The vapour and liquid of each tray are at equilibrium.
• Perfectly insulated column (i.e. no radiative losses).
• Negligible radiative transfer between trays.
• The components and mixtures are non-reactive.
• The effects of mixing are negligible.

# Question 2 [2]

Note

This question will slowly build up the equations and assumptions for solving a common chemical engineering problem: heat loss from a pipe.

Our final goal is to be able to predict the temperature profile, along the length of a tube. Such tubes could occur, for example, in a shell and tube heat exchanger, as shown in the figure below from the Wikipedia article.

1. Write down all the possible controlling mechanisms you might consider for a high-accuracy model of this shell and tube heat exchanger.

2. Now let's start simple, and consider only the fluid flow in the pipe. What would the cross-sectional profile for the flow look like under (a) laminar flow and (b) turbulent flow?

3. Consider a short cross-sectional segment, of width $$\Delta z$$, where the temperature is $$T(z)$$ at the entry and $$T(z + \Delta z)$$ at the exit. The figure below contains the boundary region already drawn, in green.

1. Which specific assumption do you have to invoke so that the temperature in the radial direction is constant?
2. Assuming this assumption is true, write down the average temperature within the segment, and define it as $$\overline{T}(z)$$.
3. What is the surface area of the pipe in this segment?
4. Finally, using Newton's law of cooling, write down the rate of energy loss, $$Q$$, to the outside environment, where the wall temperature is defined as $$T_\text{wall}$$. What are the units of the heat transfer coefficient, and the units of $$Q$$?
4. Now perform an energy balance over this segment.

• Heat in =
• Heat out =
• Heat generated =
• Overall heat balance, assuming steady-state:
5. Lastly, divide this steady-state equation by $$\Delta z$$ and take limits so that $$\Delta z \rightarrow 0$$. This allows you to reach our goal and write an equation that predicts the temperature profile along the length of a tube.

Recall from calculus that:

$\lim_{\Delta z \rightarrow 0} \frac{T(z + \Delta z) - T}{\Delta z} = \frac{dT}{dz}$

## Solution

1. A shell and tube heat exchanger operates by transferring heat from the hot stream to the cold stream through conduction. Therefore one controlling mechanism is heat conduction. Other controlling mechanisms include:

• Fluid flow: which exists in the tube and shell sides
• Evaporation: Some heat exchangers involve phase changes. For example, the cold fluid evaporates (e.g. reboilers), or a vapour fluid condenses (e.g. the condenser in a refrigerator cycle). In such cases, the phase change must be considered.
• Reaction: Many industrial packed-bed reactors have a shell and tube design where the reaction occurs in the tube side. The shell side acts as a cooling or heating medium by transferring heat from or to the tube side (reaction medium).
• Radiation: Heat transfer via thermal radiation from the body of the heat exchanger to ambient or vice versa.
2. In laminar flow, the cross-sectional profile for the velocity is parabolic where the maximum velocity occurs in the centre of the pipe. Laminar flow occurs at low Reynolds numbers ($$\text{Re}<2100$$ for pipes). In turbulent flow, however, the radial distribution of velocity is noticeable only within a thin layer adjacent to the wall. Turbulent flow occurs at high Reynolds numbers ($$\text{Re}>2100$$ for pipes).

3. Considering a segment of width $$\Delta z$$:

1. We assume that we have a plug flow through the pipe, which means that the velocity is constant in the radial direction. Note that the plug flow assumption requires a turbulent flow where the boundary layer adjacent to the wall of the pipe is negligible.
2. The average temperature can be obtained from the temperatures at the two ends of the segment as $$\overline{T} = \displaystyle\frac{T(z)+T(z+\Delta z)}{2}$$
3. The surface area of the cylindrical segment is $$A = 2\pi R \Delta z=\pi D\Delta z \qquad (D=2R)$$.
4. Newton's law of cooling states that the rate of the heat transferred through the wall ($$Q$$) is proportional to the difference between the fluid's temperature and the wall temperature. We choose the proportional constant as $$(\pi D \Delta z) h$$ where $$h$$ is positive and is the heat transfer coefficient. Therefore, $$Q = \left(\pi D \Delta z\right) h\left(\overline{T}-T_{wall}\right)$$, where $$\overline{T}$$ is the fluid's temperature inside the segment. The unit of $$Q$$ is energy per time (e.g. $$J s^{-1}$$). As a result, the unit of the constant $$h$$ will be $$J s^{-1} m^{-2} K$$.
4. The energy balance at steady state is

$0=\dot{m}c_p\left(T(z)-T(z+\Delta z)\right)-Q$

where $$\dot{m}$$ is the mass flowrate inside the pipe, and $$Q$$ is the heat transferred through the wall. Substituting $$Q$$ from Newton's law gives $$0=\dot{m}c_p(T(z)-T(z+\Delta z))-(\pi D \Delta z) h(\overline{T}-T_{wall})$$.

Then rearranging, and dividing both sides by $$\dot{m}c_p\Delta z$$ yields $$\displaystyle\frac{T(z+\Delta z)-T(z)}{\Delta z}=-\displaystyle\frac{(\pi D) h}{\dot{m}c_p}(\overline{T}-T_{wall})$$.

The term $$\displaystyle\frac{T(z+\Delta z)-T(z)}{\Delta z}$$ will represent the derivative of $$T$$ with respect to $$z$$ as $$\Delta z\rightarrow 0$$. Also, $$T=\overline{T}$$ when $$\Delta z\rightarrow 0$$. Let us define $$\lambda=\displaystyle\frac{(\pi D) h}{\dot{m}c_p}$$. Therefore, the following equation results:

$\frac{dT}{dz}=-\lambda(T-T_{wall})$

This is a differential equation that predicts the fluid's temperature versus the length of the pipe, at steady state.

# Question 3 [1.5]

Consider a CSTR where an irreversible, first-order endothermic reaction of the form $$A\stackrel{k}{\rightarrow} B$$ takes place. Let $$C_{A}$$ denote the concentration of the species A in the reactor, $$T_R$$ and $$T_{in}$$ denote the temperatures of the reactor and of the inlet stream, respectively, $$Q$$, is the heat added to/removed from the reactor, $$C_{A0}$$ is the concentration of A in the inlet stream, $$V$$ is the volume of the reactor, $$k_{0}, E, \Delta H$$ are the pre-exponential constant, the activation energy, and the enthalpy of the reaction and $$C_{p}$$ and $$\rho$$ are the heat capacity and fluid density in the reactor.

Develop a model that describes the evolution of the concentration and temperature in the reactor, using a systematic modelling approach that also outlines all assumptions made.

## Solution

We start by generating a diagram of the system to aid in visualizing the set up and constructing the mass and energy balances:

In order to simplify the modelling process we make the following reasonable assumptions (based on the implications of the problem statement):

• Either the reagents A and B have similar heat capacities and densities/ mixture densities or the reagents are in dilute enough concentration that the heat capacity and density of the carrier fluid is dominant (i.e. Cp and rho are constant)
• The reactor is perfectly mixed
• Shaft work is negligible
• Kinetic and potential energies are negligible
• The reactor is sealed (i.e. convective and evaporative losses are negligible)
• All physical properties are temperature independent
• Effects of mixing may be neglected (i.e. ideal mixtures)
• The system has a constant volume (i.e. $$F_{\text{in}} = F_{\text{out}} = F$$)
• There is no reagent B in the inlet

Moving to the modelling of the concentration of A and B in the reactor. It is important to note that a proper mass/molar balance deals with absolute quantities, not concentration. The only reason we can separate $$C_{a}/C_{b}$$ and $$V_{R}$$ in such a nice way is because we assumed a constant reactor volume. In the more complicated case we would need to consider the chain rule, which would result in a $$\frac{dV_{R}}{dt}$$ term (In actuality we have used the chain rule below but since $$V_{R}$$ is assumed constant the term $$\frac{dV_{R}}{dt}$$ simply cancels to 0).

$\begin{split}\frac{dn_{a}}{dt} &= \frac{dC_{a}V_{R}}{dt} = \frac{dC_{a}}{dt}V_{R} = \underbrace{\sum_{i}\left(C_{a0,i} \times F_{in,i}\right)}_{\text{inlet}} - \underbrace{\sum_{i}\left(C_{a} \times F_{out,i}\right)}_{\text{outlet}} + \text{Generation} - \text{Consumption} \\ \frac{dn_{b}}{dt} &= \frac{dC_{b}V_{R}}{dt} = \frac{dC_{b}}{dt}V_{R} = \underbrace{\sum_{i}\left(C_{b0,i} \times F_{in,i}\right)}_{\text{inlet}} - \underbrace{\sum_{i}\left(C_{b} \times F_{out,i}\right)}_{\text{outlet}} + \text{Generation} - \text{Consumption}\end{split}$

We know that there is no generation of A and no consumption of B in the reactor and we know there is only one inlet and outlet stream. Therefore:

$\begin{split}\frac{dC_{a}}{dt} &= C_{a0}\frac{F}{V_{R}} - C_{a}\frac{F}{V_{R}} - k_{0}e^{\displaystyle-\frac{E}{RT_{R}}}C_{a} \\ \frac{dC_{b}}{dt} &= - C_{b}\frac{F}{V_{R}} - k_{0}e^{\displaystyle-\frac{E}{RT_{R}}}C_{a}\end{split}$

Moving to the energy balance (we again take note that the only reason the $$\frac{dE}{dt}$$ may be whittled down to $$\frac{dT}{dt}$$ is because all other terms are assumed constant). Note that "other sources" refers to things such as shaft work, kinetic/potential energy, etc.:

$\frac{dE}{dt} = \sum_{i}\left(\text{Convective flow in}\right) - \sum_{i}\left(\text{Convective flow out}\right) - \text{Heat of reaction} + Q + \text{other sources}$
$\begin{split}\displaystyle \frac{d\left(C_{p} \rho V_{R}\left(T_{R}-T_{\text{ref}}\right)\right)}{dt} &= \frac{d\left(C_{p} \rho V_{R} T_{R}\right)}{dt} - \frac{d\left(C_{p} \rho V_{R} T_{\text{ref}}\right)}{dt} = \frac{d\left(C_{p} \rho V_{R} T_{R}\right)}{dt} - \left(0\right) \\ \displaystyle \frac{d\left(C_{p} \rho V_{R} T_{R}\right)}{dt} &= \left(C_{p} \rho F\left(T_{\text{in}}-T_{\text{ref}}\right)\right) - \left(C_{p} \rho F\left(T_{R}-T_{\text{ref}}\right)\right) - \Delta H k_{0}V_{R}e^{-\frac{E}{RT_{R}}}C_{a} + Q + (0)\end{split}$

Simplifying:

$\frac{dT_{R}}{dt} = \left(\frac{F}{V_{R}}\right)\left(T_{\text{in}}-T_{R}\right) - \left(\frac{\Delta H k_{0}}{C_{p} \rho}\right)C_{a}e^{ -\frac{E}{RT_{R}}} + \frac{Q}{C_{p} \rho V_{R}}$

It is very important to note that $$T_{\text{ref}}$$ was used to calculate each enthalpy term. In this specific case the $$T_{\text{ref}}$$ cancels out due to the assumption made at the start of the solution (specifically the assumptions of equal inlet and outlet flow rates and an equal and constant density and heat capacity over the entire mixture). A reference temperature must always be used when calculating enthalpies. There is no such thing as an absolute enthalpy. As the current state of thermodynamics stands it is theoretically impossible to calculate absolute enthalpy (who knows what the future will bring...). As standard practice you should always start with $$T_{\text{ref}}$$ in your energy balances and if it cancels out then all the better for your solution.

# Question 4 [1.5]

The simplest example of biological wastewater treatment involves removing a single nutrient, $$\sf N$$, from a liquid waste stream and converting it to (solid) biomass, $$\sf B$$. This process is used, for example, by pop manufacturers to treat liquid waste from their processes, where $$\sf N$$ would be sugar (e.g. fructose). The microorganisms absorb $$\sf N$$ from the wastewater and use it to grow more and more biomass.

1. Draw a simple CSTR where this liquid stream enters, containing $$\sf N_\text{in}$$ [mg/L] and the stream leaving the reactor contains both liquid and solid fractions. The solids in the outlet stream can be separated, and the remaining liquid would contain much less $$\sf N$$, allowing the company to discharge that liquid to municipal wastewater treatment systems.

Draw the boundaries you will consider on your diagram as well.

2. Write an overall mass balance, where the flows, $$q$$, are expressed in units of litres per day, typically being in the order of megalitres per day.

3. Write a dynamic mass balance for $$\sf N$$ and $$\sf B$$, where their units are expressed in mg/L. Assume there is no biomass in the inlet stream. The reaction rate for converting $$\sf N \longrightarrow B$$ is given by $$r_B$$ in units of mg/(L.day).

4. Write the two equations for the steady-state values of $$\sf N$$ and $$\sf B$$ if $$r_B = \mu_\text{max} \displaystyle \frac{\sf N}{\sf K + N} \sf B$$, where $$\sf K$$ [mg/L] and $$\mu_\text{max}$$ [1/day] are constants from the Monod rate expression. Note that $$r_N = \displaystyle - \frac{1}{Y_B} r_B$$, where $$Y_B$$ is the yield of $$\sf B$$ from $$\sf N$$.

5. Are these equations solvable by hand if you are given the constants such as $$\sf N_\text{in}, K$$, $$\mu_\text{max}$$, etc in your equations?

## Solution

1. A diagram of the process is provided below. The boundary that will be used for the component and overall mass balances has also been depicted and labelled (essentially the system will be the liquid contents of the reactor).

In order to simplify the modelling process we make the following reasonable assumptions:

• The overall density of the mixture is roughly constant and equal to that of water (This may seem like a huge leap at first but you must consider the fact that $$\sf N$$ is likely dilute, otherwise the company would try to reclaim these resources, and the organisms being grown are mostly water and so the density of the overall mixture will likely be close to that of water, the carrier fluid). In practice this assumption leads to reasonably good results.
• The reactor is perfectly mixed.
• The reactor is sealed (i.e. convective and evaporative losses are negligible). This assumption has a few caveats. You cannot assume this for general biological systems and in reality even this system will have gaseous loses but we are not modelling these components. Waste decomposition processes (ex. activated sludge, anaerobic digestion) will almost always convert at least a portion of $$\sf N$$ to some gaseous component (ex. $$CO_{2}$$, $$CH_{4}$$, etc.). But since we are not modelling these components we can simply forget about gas loss terms. It is also possible that in a real system evaporative losses of water would occur over time but these would likely be negligible in comparison to the relative size of the reactors.
• All physical properties are temperature independent.
• Effects of mixing may be neglected (i.e. ideal mixtures).
• The system has a constant volume (i.e. $$F_{\text{in}} = F_{\text{out}} = F$$).
• The inlet stream is sterile (i.e. no active organisms). Again this assumption is context sensitive. In activated sludge plants, for example, there will almost always be a recycle stream to reuse organisms ("bugs" are resources too). For the purposes of this question we will assume no recycling and no organisms in the inlet stream in general (the waste stream could be contaminated...)
• Endogenous decay (i.e. bacteria death) is negligible.
2. In writing the overall mass balance we recall that volume is not a conserved quantity in realistic cases. We must always start with either mass or mole balances. These quantities are always conserved (omitting nuclear reactions of course...). What you will find though is that in ideal cases, such as when density is assumed constant, mass balances can break down to volume balances, which makes life simpler. Just be careful that you don't start with a volume balance.

$\frac{M_{\text{total}}}{dt} = \sum_{i}(M_{\text{in},i}) - \sum_{i}(M_{\text{out},i})$

Dividing through by the average constant density:

$\begin{split}\frac{1}{\rho} \cdot \frac{M_{\text{total}}}{dt}&= \frac{1}{\rho} \cdot \left(\sum_{i}(M_{\text{in},i}) - \sum_{i}(M_{\text{out},i}) \right)\\ \frac{V_{R}}{dt} &= \sum_{i}(F_{\text{in},i}) - \sum_{i}(F_{\text{out},i})\end{split}$

Naturally, with only one inlet and one outlet, this relation breaks down to our previous assumption of equal flow at steady state.

$\begin{split}\frac{V_{R}}{dt} &= \sum_{i}(F_{in,i}) - \sum_{i}(F_{out,i})\\ (0) &= F_{in} - F_{out}\\ F &= F_{in} = F_{out}\end{split}$
3. The construction of the mass balances for $$\sf N$$ and $$\sf B$$ follow the exact same logic used in question 3. Since we have a constant reactor volume:

$\begin{split}\frac{dM_{N}}{dt} &= \frac{dNV_{R}}{dt} = \frac{dN}{dt}V_{R} = \underbrace{\sum_{i}\left(N_{0,i}F_{\text{in},i}\right)}_{\text{inlet}} - \underbrace{\sum_{i}\left({N} F_{\text{out},i}\right)}_{\text{outlet}} + \,\text{Generation} - \text{Consumption} \\ \frac{dM_{B}}{dt} &= \frac{dBV_{R}}{dt} = \frac{B}{dt}V_{R} = \underbrace{\sum_{i}\left(B_{0,i}F_{\text{in},i}\right)}_{\text{inlet}} - \underbrace{\sum_{i}\left({B} F_{\text{out},i}\right)}_{\text{outlet}} + \,\text{Generation} - \text{Consumption}\end{split}$

We have assumed there is no generation of $$\sf N$$ and no consumption of $${\sf B}$$ (i.e. bacterial death, also known as endogenous decay) in the reactor and we have assumed we have only one inlet and outlet stream and that the inlet stream is sterile. Therefore:

$\frac{dN}{dt} = N_{0}\frac{F}{V_{R}} - N\frac{F}{V_{R}} - \left(\frac{1}{Y_{B}}\right)\left(\mu_{\text{max}}\frac{N}{K+N}\right)B$
$\frac{dB}{dt} = - B\frac{F}{V_{R}} + \left(\mu_{\text{max}}\frac{N}{K+N}\right)B$

(As a quick little extra bit of information, the factor $$\displaystyle \frac{F}{V_{R}}$$ is commonly referred to as the "dilution rate" in bioreactor engineering and is a very important design factor)

4. When considering the steady state of bioreactors it is often best to start with the organism balances (this is because they are more likely to not contain an inlet term and so are simpler to work with). This is also because the organism balances will be your source for determining if the steady state substrate values are directly calculable.

If you cannot explicitly write all of the substrate concentrations from the steady state organism balances then there is no need to derive the rest of the steady state balances in the hopes of an analytical solution. Simply skip to numerically determining the steady state.

$\begin{split}\displaystyle \frac{dB}{dt} &= - B\frac{F}{V_{R}} + \left(\mu_{\text{max}}\frac{N}{K+N}\right)B \\ (0) &= - \overline{B}\frac{F}{V_{R}} + \left(\mu_{\text{max}}\frac{\overline{N}}{K+\overline{N}}\right)\overline{B} \\ \overline{B}\frac{F}{V_{R}} &= \left(\mu_{\text{max}}\frac{\overline{N}}{K+\overline{N}}\right)\overline{B} \\ \frac{F}{V_{R}} &= \left(\mu_{\text{max}}\frac{\overline{N}}{K+\overline{N}}\right) \\ \frac{F}{V_{R}}\left(K+\overline{N}\right) &= \mu_{\text{max}}\overline{N} \\ \left(\mu_{\text{max}}-\frac{F}{V_{R}}\right)\overline{N} &= \frac{F}{V_{R}}K \\ \overline{N} &= \left(\frac{\frac{F}{V_{R}}K}{\left(\mu_{\text{max}}-\frac{F}{V_{R}}\right)}\right)\end{split}$

and

$\begin{split}\displaystyle \frac{dN}{dt} &= N_{0}\frac{F}{V_{R}} - N\frac{F}{V_{R}} - \left(\frac{1}{Y_{B}}\right)\left(\mu_{\text{max}}\frac{N}{K+N}\right)B \\ (0) &= \frac{F}{V_{R}}\left(N_{0} - \overline{N}\right) - \left(\frac{1}{Y_{B}}\right)\left(\mu_{\text{max}}\frac{\overline{N}}{K+\overline{N}}\right)\overline{B} \\ \left(\frac{1}{Y_{B}}\right)\left(\mu_{\text{max}}\frac{\overline{N}}{K+\overline{N}}\right)\overline{B} &= \frac{F}{V_{R}}\left(N_{0} - \overline{N}\right) \\ \overline{B} &= \frac{\frac{F}{V_{R}}\left(N_{0} - \overline{N}\right)}{\left(\frac{1}{Y_{B}}\right)\left(\mu_{\text{max}}\frac{\overline{N}}{K+\overline{N}}\right)}\end{split}$
5. As was seen in the previous part of the solution, the steady states are indeed directly calculable if given values for $$F$$, $$V_{R}$$, $$N_{0}$$, $$K$$, $$\mu_{\text{max}}$$, and $$Y_{B}$$. It is also interesting to note that the theoretical maximum for the dilution rate is set by the denominator of the steady state version of the organism balance and is equal to the maximum specific growth rate ($$\mu_{\text{max}}$$). When you think about it this makes perfect sense. If you are putting in flow faster than your organisms can grow then they will simply be washed out.

While less obvious, it can also be shown that $$\overline{N}$$ will approach the inlet concentration of $$N_{0}$$ as the dilution rate approaches $$\mu_{\text{max}}$$ (This makes intuitive sense because if you are feeding the reactor at a rate that is almost washing out the bacteria then there concentration will be lower and so most of your substrate will exit the reactor). Obviously if your goal is to digest $$\sf N$$ then you would want to make your reactor as large as possible, but realistically after a certain point there would be diminishing returns for increasing the reactor size. Therefore space, cost, and legal constraints usually set the reactor size.

As an aside, it is interesting to note that if your goal was to grow as much bacteria as possible (this could happen in specialty chemicals for example), and assuming your inlet substrate concentration is much larger than the half saturation constant (I will not go into why this requirement is needed...) then you would actually want to operate the reactor as a close as possible to wash out. This is because while the reactor concentration of the bacteria would likely be smaller, the substrate concentration would be much higher and so the overall production rate would be higher.

# Question 5 [2]

Note

To review and practice material related to number systems and round-off errors.

1. Convert the following binary numbers to base-10:

• $$\sf 01010111$$
• $$\sf 1110.0001$$
2. Convert the following hexadecimal numbers to base-10:

• $$\sf 9A8B7C6D$$
• $$\sf DEADB0EF$$
3. In either MATLAB or Python: write a short function that returns the smallest positive number used on your computer. In other words your computer will be unable to reliably distinguish between zero and a quantity smaller than this number.

4. How does your value (above) compare to what MATLAB or Python reports?

• MATLAB:

>> help eps  % read what this command does
>> eps

• Python:

>>> np.finfo(np.double).eps

## Solution

1. $$(01010111)_2=0\times 2^7 +1\times 2^6 +0\times 2^5 +1\times 2^4 +0\times 2^3 +1\times 2^2 +1\times 2^1 +1\times 2^0=87$$

$$(1110.0001)_2=1\times 2^3 +1\times 2^2 +1\times 2^1 +0\times 2^0 +0\times 2^{-1} +0\times 2^{-2} +0\times 2^{-3} +1\times 2^{-4}=14.0625$$

2. The conversion from hexadecimal to decimal is done similarly to the conversion from binary to decimal. The difference is that the base is 16 here. Also, the letters $$A-F$$ represent integer numbers $$10-15$$ respectively.

$$(\sf{9A8B7C6D})_{16}=9\times 16^7 +(10)\times 16^6 + 8\times 16^5 +(11)\times 16^4+7\times 16^3 +(12)\times 16^2 +6\times 16^1 +(13)\times 16^0$$ = 259 283 2621

$$(\sf{DEADB0EF})_{16}=13\times 16^7 +14\times 16^6 + 10\times 16^5 +13\times 16^4+11\times 16^3 +0\times 16^2 +14\times 16^1 +15\times 16^0$$ = 3 735 924 975

3. The following code obtains the smallest positive number.

MATLAB code Python code
%This code returns the smallest positive number which can be obtained as
%the distance from 0.0 to the next larger double precision number.

number = 1.3;                % initialize to any positive value as long as
% it is not already below the under flow limit
while (number>0)
epsilon = number;        % store current value of number
number=number/2;         % keep dividing by two
end

fprintf('\n My epsilon =%d\n',epsilon)	%Solution: epsilon = 4.940656e-324

%Compare your epsilon with the one returned by the MATLAB function >>eps(0)
fprintf('\n Epsilon by MATLAB =%d\n',eps(0))

# This code returns the smallest positive number which can be obtained as
# the distance from 0.0 to the next larger double precision number.

number = 1.3                 # initialize to any positive value as long as
# it is not already below the under flow limit
while (number>0):
epsilon = number         # store current value of number
number = number/2.0      # keep dividing by two

print('\n My epsilon = %g \n' % epsilon) # epsilon = 4.94066e-324

# Python does not have an eps(0.0) function
# So Python users can ignore this part of the question.

Recall that most computers internally convert base 10 input values to binary, base 2 values before performing any calculations. Therefore, the initial value of number in the above code is approximated to the nearest binary representation in the computer. Then the division of that binary representation by two will always have an exact binary representation. Therefore, unlike the initial value of number which may not be finitely representable in binary, its subsequent values obtained through the while loop are divisible by two and thus exactly representable in binary. That is why, the variable "epsilon" must eventually reach the smallest positive number $$.0000...0001 \times 2^{-111...111}$$.

The code keeps dividing number by two in order to make it closer and closer to zero. At some point, the current value of number cannot be distinguished from zero (the condition in the while loop). This is where the algorithm stops. We report the value right before the current one as the smallest positive number that can be distinguished from zero. This previous value is always stored as epsilon in the above code.

The epsilon value around 0.0 returned by MATLAB matches that computed by our code. Notice that this value is not explicitly classified as the smallest normalized representation (in computers, binary numbers are normalized to have a lead digit of 1). This is because some computers allow for "gradual underflow". This means that some computers allow the mantissa to become denormalized (i.e. have 0 as a lead digit) once the exponent has reached its smallest allowable value (thereby making the gap between 0 and the epsilon smaller). As an aside, note that your solution will likely equal realmin()*eps(). There is a very logical reason for this (left to you as an exercise to see why!).