text:
"Never doubt that a small group of thoughtful, committed citizens can change the world. Indeed, it is the only thing that ever has."

Review article
peer-reviewed

# Helping Health Care Providers and Clinical Scientists Understand Apparently Irrational Policy Decisions

### Abstract

Health care providers (HCP) and clinical scientists (CS) are generally most comfortable using evidence-based rational decision-making models. They become very frustrated when policymakers make decisions that, on the surface, seem irrational and unreasonable. However, such decisions usually make sense when analysed properly. The goal of this paper to provide a basic theoretical understanding of major policy models, to illustrate which models are most prevalent in publicly funded health care systems, and to propose a policy analysis framework to better understand the elements that drive policy decision-making. The proposed policy framework will also assist HCP and CS achieve greater success with their own proposals.

### Introduction & Background

The Oxford dictionary defines policy as "A course or principle of action adopted or proposed by an organization or individual" [1]. It is difficult to adopt a policy without resources so I would expand this definition to the allocation of resources by those who have the authority to do so and policy analysis explores factors that drive such decisions. Classical policy models include incremental, rational, or mixed incremental/rational. The Canadian Health Care system will be used as an example of a publicly funded health care system.

Incremental models were defined in 1959 by Lindblom who referred to them as the science of “muddling through” [2]. Incremental models involve a sequence of disconnected small steps, or as Lindblom describes, “successive limited comparisons”, which, in aggregate, do not necessarily have any meaning or general direction. Lindblom would suggest that the majority of Canadian public policy fits the incremental model.

Rational policy models are grounded in some well-defined economic, scientific, social, or other framework with a pre-hoc defined ultimate goal [3]. The current Canadian Government has espoused an “evidence-based” policy approach [4], which, on the face of it, is in keeping with a rational policy model. Setting and working towards identified carbon release targets to address global warming would be an example of a rational policy approach.

Policy decisions in the real world can be complex and may contain both incremental and rational components. Etzioni described this middle ground as a hybrid “mixed-scanning” model, which involves making small incremental decisions leading to some overall rational goal [5].

Figure 1 contrasts these three models. Each arrow defines a separate decision which either does (i.e., rational and mixed) or does not (i.e., incremental) lead to an overall goal.

In an era of evidence-based health care, HCP and CS strive to work in a scientific rational policy arena. However, it is naïve to think that policy decisions are only driven by scientific reasoning. Policymakers are influenced by many other factors, in addition to what makes sense scientifically.

Figure 2 outlines a series of “policy assessment lenses” which a policymaker may use to shape and review a proposal leading to the final decision. These lenses could also be considered as a set of potentially competing constraints that a policy maker has to consider and reconcile. The goal of the “proposer” is to sufficiently understand these “policy assessment lenses”, such that their proposal results in a favourable final image after it has gone through the applicable set of lenses. In other words, if the proposer sufficiently understands the mindset of those ultimately making the decision, they can anticipate and take into account all relevant considerations to ensure that the final image, which drives the policy decision, is as expected.

The following is a brief synopsis of the individual policy assessment lenses. HCP and CS are generally most experienced, and comfortable, with the first four “lenses”, i.e. epidemiology, efficacy, effectiveness, and ethics.

### Review

#### Epidemiology

Epidemiology is the study of the occurrence and distribution of health-related states or events in specified populations, including the study of the determinants that influence such states, and the application of this knowledge to control the health problems [6].

From a policy perspective, the greater the “burden” of disease or illness (i.e., the number of individuals affected), the more likely the issue will be recognized as being important. In addition, specific target populations may also influence recognition. Examples include children, women (e.g., breast cancer), men (e.g., prostate cancer), and the elderly (e.g., dementia). There are also issues that cut across target populations, such as initiatives focused on drunk driving (e.g., Mothers Against Drunk Driving - MADD).

#### Efficacy

Efficacy relates to how well the proposal performs under ideal controlled conditions, with multicentre randomized controlled trials being the most representative methodology of such. In other words, what are the best outcomes that can be expected in an ideal setting?

#### Effectiveness

Effectiveness relates to how well the proposal performs under real world conditions, with prospective observational and retrospective studies being the most representative methodologies of such.

#### Economics

Economics is an important consideration in publicly funded health care systems. This is especially evident in pharmacare where governments have to make funding decisions across a field of competing pharmacological interests. In the public realm, resources are scarce and getting the most net benefit amongst a number of competing options is the goal.

If a new initiative is less expensive and more effective than the current standard of care, then it “dominates” other strategies. In contrast, if a new initiative is more expensive but less effective, it is unlikely to be adopted. However, if a new initiative is more expensive and more effective, how much “more effective” does it need to be to justify adoption?  This question is addressed by four health economic indicators: cost minimization (CM), cost-effectiveness (CE), cost utility (CU), and cost-benefit (CB).

In CM, the outcomes of the options being considered are equal and the most economical option becomes the most desirable.

CE and CU are measures of the net additional benefit gained by the new proposal compared to the existing standard(s) of practice. CE is the net cost ($) per additional natural units, e.g., year of life gained. CU is the net cost ($) per additional quality-adjusted units, e.g., year of life gained (e.g., QALY). CE and CU are commonly expressed as incremental cost-effectiveness ratios (ICER). The question of what is an acceptable threshold, or incremental cost-effectiveness ratio (ICER), is debatable. In 1992, Laupacis, et al. [7] proposed that, if the ICER is below $20,000 per additional year of life saved, the proposal is desirable, between$20,000 to $100,000, it could be considered, and above$100,000, the proposal may not be considered cost-effective. The UK National Institute for Health and Clinical Excellence (NICE) [8-9] has proposed an ICER ratio threshold of between £20,000 to £30,000 (~$38,000 to$57,000 CAD) [10].

One of the limitations of the CE/CU approach is that it is difficult to compare health policy proposals with different outcomes. For example, when comparing quality adjusted life years (e.g., chemotherapy) against cavity-free children (e.g., a pediatric cavity prevention program), the CE/CU approach will not work. Policymakers, especially at higher levels, may want to compare and contrast long lists of possible health care resource allocations. This is where a CB economic analysis can be applied. In a CB analysis, all outcomes, such as potential years of life saved, disability-free days, progression-free survival, etc., are converted to dollar values. Putting a value on a year of life is somewhat controversial but it is not dissimilar to setting a CE/CU threshold. The dollar values for the various outcomes are generally estimated through a “willingness to pay” exercise where individuals are asked how much they would be willing to pay per unit of outcome. This allows a rank listing of diverse health programs and services comparing how much each item costs compared to the dollar value of the outcome. CB is commonly referred to as getting the best “bang for your buck”.

Table 1 summarizes the basic characteristics and differences between CM, CE, CU, and CB.

 Cost Outcome Incremental Difference Cost Minimization $= Lowest cost Cost Effectiveness$ Natural units $/additional year of life Cost Utility$ QA units $/additional QALY Cost Benefit$ /\$

#### Ethics

In health care, the most commonly cited ethics framework has been published by Tom Beauchamp and James Childress [11].

The four key elements of their framework include:

Autonomy – patients have a right to choose or refuse care
Beneficence – health care workers have a duty to act in the best interest of their patients
Non-maleficence – “first do no harm” (primum non nocere).
Justice – relates to the fair and equitable distribution and access to health care resources

Ethical issues can be complex, especially when there is a conflict between ethical elements. For example, a patient may want a health care service for which the health care provider feels may cause them more harm than good, resulting in a conflict between patient autonomy and non-maleficence.

The current debate about low-dose CT screening for lung cancer is a good example of the challenges of making programmatic and resource decisions at a targeted population level. Does low-dose CT lung cancer screening cause more good than harm? Initial results from the National Lung Screening Trial (NLST) are promising from an epidemiology point of view [12]. However, the very low overall positive predictive value for positive screening rates of only 3.8% have raised concerns about the potential harm of false positives. Croswell, et al. commented, “Risks for false-positive results on lung cancer screening tests are substantial after only two annual examinations, particularly for low-dose CT. Further study of resulting economic, psychosocial, and physical burdens of these methods is warranted.” [13].

#### Legal

Policy decisions are strongly influenced by existing legislation. If decisions are contrary to such, they can be challenged. Governments may choose to amend legislation to accommodate new policy directions but this takes time, especially if the change is beyond an order in council (e.g., commonly used to change regulations). For example, a substantive change to an act generally requires three readings in the house (legislature at the provincial level and parliament at the federal level), approval of the senate for federal statutes, and royal ascent at both levels.

As well, existing laws can be challenged. For example, the Canadian Supreme Court recently ruled (February 2015) that laws prohibiting assisted death of terminally-ill patients were unconstitutional and violated Section 7 of the Canadian Charter of Rights and Freedoms (i.e., the right to life, liberty, and security of the person [14]). The Supreme Court gave the Canadian government one year, with a subsequent extension, to make changes to Canadian Criminal Code to allow for the provision of physician-assisted death [15-16]. Amendments to Canadian Criminal Code allowing such received Royal Assent on June 17, 2016. However, the amendments are not without controversy as they apply to those for whom death is “reasonably foreseeable” but not necessarily for those with chronic, insufferable conditions for whom death is not “reasonably foreseeable”. Some feel the amendments are too restrictive, given the original direction of the Supreme Court.

In addition, health care policy may be influenced by multiple levels and branches of government (e.g., Federal, Provincial, Municipal, etc.) and this needs to be taken into account when analysing the feasibility of the proposal.

#### Public opinion

Elected officials constitute a good portion of those who directly or indirectly influence law-making and policy decisions. The opinions of the electorate, and the public, at large, can be influential, especially when combined with election cycles.

For example, Sznitman, et al. [17] have published on how public opinion on the medical effects of cannabis may influence public policy relative to legalizing medical cannabis use.

Burstein [18] has conducted a relatively comprehensive review of the impact of public opinion on public policy. He concludes that, while public opinion generally does have an impact on policy, the relative influence of relevant factors, such as issue salience, source of opinion (e.g., interest group, political party, elite, or general public), secular trends, and the ability to generalize the issue, are not well known and have not been well quantified in the literature.

#### Politics

Politicians, collectively referred to as “government”, are responsible for making laws and having a significant influence on resource allocations. At the end of the day, and put simplistically, the government can only influence behaviour in three ways: incentives (e.g., tax breaks, rebates, transfer payments, direct payment to individuals, etc.), disincentives (e.g., criminal, civil, or bylaws), or exhortation (e.g., promises). In the Canadian system, as is the case in most democratic countries, politicians are elected for fixed terms. As such, politicians, and especially the political party that has a majority or minority lead in Parliament or Legislatures, are sensitive to election cycles and the need for appropriate “positioning” for re-election purposes. This may disadvantage longer term projects that extend beyond election cycles.

A proposal, which takes into account election cycle timing and provides positive feedback for a politician or a political party, will probably fare much better than one that is naïve to such factors.

In addition, understanding, in real time, what is driving public opinion is important as resources may be directed accordingly. One may ask how does their proposal relate to or address issues important to the government. The more aligned the proposal is to the mandate or issue of the day, the more likely it will be supported.

Political ideology is also important. For example, if a ruling government believes that publicly funded services should be delivered in publically administered facilities, it may be difficult to gain approval for a publically funded service being delivered in a private setting.

#### Other

There are a number of other factors which may influence policy and resource allocation. They include security crises (e.g., airline security measures post-major incidents), natural disasters (e.g., fires, floods, tornados, and earthquakes), epidemics (e.g., meningitis, influenza, Zika virus), social/economic factors (e.g., societal unrest or economic downturns), and international affairs (e.g., refugee crises, natural disasters, war), to name a few.

#### Case study - MRI wait times

MRI services were first offered Winnipeg at Saint Boniface General Hospital in 1990 [19]. There are currently 10 MRI units in Manitoba (MB) of which eight are in the Winnipeg Regional Health Authority (WRHA) [20]

Figure 3 illustrates trends in average elective MRI wait times, in weeks, between the fiscal year 2000/2001 to 2015/2016 and corresponding average monthly MRI volumes between 2005/2006 to 2015/2016 for the WRHA. Data from monthly “WRHA Diagnostic Imaging Program Waiting List Status Reports” are submitted to Manitoba Health on a monthly basis. These data are then summarized and published on the internet as Manitoba Health “Wait Time Reports” [21]. The “E” after the fiscal year indicates an election year. The New Democratic Party formed a majority provincial government for the first three indicated elections and the Progressive Conservative Party won a majority mandate in the 20015/16 election. For the 2007/08 and 2011/12 election years, there is an associated, relatively short-lived, significant decline in MRI wait times (blue bars). However, this decline is not observed for the most recent 2015/16-election year. It is also noted that the average MRI volume (red line) increased steadily until 2011/12, where it rose more steeply until plateauing starting in 2012/13.

This data suggests that factors, other than clinical demand, appear to drive health care resource allocation. Increased capacity during the 2007/08 and 2011/12 election years was achieved by increasing shifts (i.e., adding evening and night shifts) as well as by the temporary addition of a portable MRI for the 2007/08 election year. It would appear that factors, such as election cycles and associated or anticipated public opinion, drove such resource allocation decisions. That is, increased resources were allocated to reduce the elective MRI wait times to correspond to Provincial election cycles. It is interesting to note that over three election cycles, this was not observed in the more historic 2003/04, and more recent April 2016, MB Provincial election.

### Conclusions

On the face of it, policy decisions can appear irrational. However, when a more comprehensive set of factors is considered, such decisions may be made understandable. It is important to be comfortable with factors outside of scientific reasoning, such as public opinion, politics, economics, and legal issues. This will achieve two goals: first, a better understanding and comfort level with what influences policy decisions, and second, how to make one’s own research or health service proposals more relevant and successful. It is hoped that the provided model of a set of policy assessment “lenses” will help achieve these goals.

### References

1. Oxford Living Dictionary - Oxford University Press. (2016). Accessed: December 15, 2016: http://en.oxforddictionaries.com/definition/policy.
2. Lindblom CE: The Science of "Muddling Through". Public Administration Review. 1959, 19:79-88. 10.2307/973677
3. Simon HA: Administrative behavior. A study of decision-making processes in administrative organization. Economic J. 2002, 112:F386–88. 10.1111/1468-0297.t01-17-00050
4. Government of Canada. Policy Horizons Canada – the Case for Evidence-Based Policy. (2013). Accessed: April 26, 2016: http://www.horizons.gc.ca/eng/content/case-evidence-based-policy.
5. Etzioni A: Mixed-scanning: A “third” approach to decision making. Public Administration Review. 1967, 27:385-92. 10.2307/973394
6. International Epidemiological Association: A Dictionary of Epidemiology, 5th Edition. Porta M (ed): Oxford University Press, Inc, New York, NY; 2008.
7. Laupacis A, Feeny D, Detsky AS, Tugwell PX: How attractive does a new technology have to be to warrant adoption and utilization? Tentative guidelines for using clinical and economic evaluations. CMAJ. 1992, 146(4):473–81.
8. McCabe C, Claxton K, Culyer AJ: The NICE cost-effectiveness threshold: what it is and what that means. Pharmacoeconomics. 2008, 26:733-44. 10.2165/00019053-200826090-00004
9. National Institute for Health and Care Excellence (NICE): The Guidelines Manual. Process and methods [PMG6]. (2012). Accessed: June 16, 2016: http://www.nice.org.uk/process/pmg6/chapter/introduction.
10. XE Currency Converter. (1995-2016). Accessed: February 29, 2016: http://www.xe.com/currencyconverter.
11. BeauchampTL, Childress JF: Principles of Biomedical Ethics, 7th edition. Beauchamp TL, Childress JF (ed): Oxford University Press, New York; 2013.
12. National Lung Screening Trial Research Team, Church TR, Black WC, Aberle DR, Berg CD, Clingan KL, Duan F, Fagerstrom RM, Gareen IF, Gierada DS, Jones GC, Mahon I, Marcus PM, Sicks JD, Jain A, Baum S: Results of initial low-dose computed tomographic screening for lung cancer. N Engl J Med. 2013, 368:1980-91. 10.1056/NEJMoa1209120
13. Croswell JM, Baker SG, Marcus PM, Clapp JD, Kramer BS: Cumulative incidence of false-positive test results in lung cancer screening. Ann Intern Med. 2010, 152:505–12. 10.7326/0003-4819-152-8-201004200-00007
14. Government of Canada: Constitution Act - 1982. Justice Laws Website. 2016, 1-16. Accessed: December 17, 2016: http://lois.justice.gc.ca/eng/const/page-15.html.
15. Supreme Court of Canada: Carter v. Canada (Attorney General), 2015 SCC 5, [2015] 1 S.C.R. 331 Docket: 35591. Canada; 2015.
16. Supreme Court of Canada: Supreme Court Judgments: Carter v. Canada (Attorney General). Supreme Court of Canada. 2015, 35591. http://scc-csc.lexum.com/scc-csc/scc-csc/en/item/14637/index.do.
17. Sznitman SR, Bretteville-Jensen AL: Public opinion and medical cannabis policies: examining the role of underlying beliefs and national medical cannabis policies. Harm Reduct J. 2015, 12:46. 10.1186/s12954-015-0082-x
18. Burstein P: The impact of public opinion on public policy: A review and an agenda. Polit Res Q. 2003, 56:29-40. 10.1177/106591290305600103
19. About St. Boniface Hospital Research. (2016). Accessed: December 2, 2016: http://www.saintboniface.ca/foundation/en/about-us/our-successes/.
21. Manitoba Wait Time Information: Diagnostic Services - MRI Scans. (2016). Accessed: December 2, 2016: http://www.manitoba.ca/health/waittime/diagnostic/mri.html.

Review article
peer-reviewed

### Author Information

###### Ethics Statement and Conflict of Interest Disclosures

Conflicts of interest: In compliance with the ICMJE uniform disclosure form, all authors declare the following: Payment/services info: All authors have declared that no financial support was received from any organization for the submitted work. Financial relationships: All authors have declared that they have no financial relationships at present or within the previous three years with any organizations that might have an interest in the submitted work. Other relationships: All authors have declared that there are no other relationships or activities that could appear to have influenced the submitted work.

Review article
peer-reviewed

7.6


text:
# zbMATH — the first resource for mathematics

Note on a generalization of the generalized vector field problem. (English) Zbl 0795.55016
For a vector bundle $$\xi$$ let $$\text{span} (\xi)$$ denote the maximal number of linearly independent sections. Let $$\zeta_{n,k}$$ be the line bundle over $$G_{n,k}$$ associated with the double covering $$\widetilde G_{n,k} \to G_{n,k}$$, where $$G_{n,k}$$ $$(\widetilde G_{n,k})$$ is the Grassmann manifold of (oriented) $$k$$-spaces in $$\mathbb{R}^ n$$. Let $$d=k(n-k)=\dim (G_{n,k} )$$.
The author proves the following results: Suppose $$3 \leq k \leq {n \over 2}$$.
(i) If $$d \equiv 1(4)$$ then $$\text{span} ((d+t) \zeta_{n,k})\geq 2+t$$ for all $$t \geq 1$$.
(ii) If $$n$$ is even, $$k$$ is odd and $$3 \leq q \leq r+2$$, then there exists a map $$f:G_{n,k} \to G_{d+r,q}$$ such that $$f^*(\zeta_{d+r,q})$$ and $$\zeta_{n,k}$$ are equivalent.
The method of proof is classical obstruction theory and characteristic classes.
Reviewer: U.Kaiser (Siegen)
##### MSC:
 55S40 Sectioning fiber spaces and bundles in algebraic topology 57R22 Topology of vector bundles and fiber bundles 57R25 Vector fields, frame fields in differential topology
Full Text:
##### References:
 [1] ASTEY L.: Geometric dimension of bundles over real projective spaces. Quart. J. Math. Oxford Ser. (2) 31 (1980), 139-155. · Zbl 0405.55020 [2] ATIYAH M., BOTT R., SHAPIRO A.: Clifford modules. Topology 3 (Suppl. 1) (1964), 3-38. · Zbl 0146.19001 [3] BARTÍK V., KORBAŠ J.: Stiefel-Whitney characteristic classes and parallelizability of Grassmann manifolds. Rend. Circ. Mat. Palermo (2) 33 (Suppl. 6) (1984), 19-29. · Zbl 0566.57012 [4] CRABB M., STEER B.: Vector-bundle monomorphisms with finite singularities. Proc. London Math. Soc. (3) 30 (1975), 1-39. · Zbl 0294.57015 [5] DAVIS D.: Generalized homology and the generalized vector field problem. Quart. J. Math. Oxford Ser. (2) 25 (1974), 169-193. · Zbl 0286.55018 [6] DAVIS D., GITLER S., MAHOWALD M.: The stable geometric dimension of vector bundles over real projective spaces. Trans. Amer. Math. Soc. 268 (1981), 39-61. · Zbl 0483.55014 [7] DAVIS D., GITLER S., MAHOWALD M.: Correction to ”The stable geometric dimension of vector bundles over real projective spaces”. Trans. Amer. Math. Soc. 280 (1983), 841-843. · Zbl 0532.55018 [8] HURWITZ A.: Über die Komposition der quadratischen Formen. Math. Ann. 88 (1923), 1-25. · JFM 48.1164.03 [9] KORBŠ J., SANKARAN P.: On continuous maps between Grassmann manifolds. Proc. Indian Acad. Sci. Math. Sci. 101 (1991), 111-120. · Zbl 0745.55003 [10] LAM K. Y.: Sectioning vector bundles over real projective spaces. Quart. J. Math. Oxford (2) 23 (1972), 97-106. · Zbl 0228.55021 [11] MILNOR J., STASHEFF J.: Characteristic Classes. Princeton Univ. Press, Princeton, N.J., 1974. · Zbl 0298.57008 [12] PAECHTER G.: The groups \pi r(Vn,m) (I). Quart. J. Math. Oxford Ser. (2) 7 (1956), 249-268. [13] RADON J.: Lineare Scharen orthogonaler Matrizen. Abh. Math. Sem. Univ. Hamburg 1 (1922), 1-14. · JFM 48.0092.06 [14] STONG R.: Cup products in Grassmannians. Topology Appl. 13 (1982), 103-113. · Zbl 0469.55005
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.

format: plain


text:
# When are debits increases? When are debits decreases? When are credits increases? When are credits

When are debits increases? When are debits decreases?

When are credits increases? When are credits decreases?

Identify which types of accounts have a normal debit balance and which types have a normal credit balance.

Q14. Identify the three steps to record a transaction and perform the three steps to record the transactions for Data Integrity Company.

Record the preceding transactions in the journal of Ned Brown, M.D. Include an explanation with each entry.

Q16. Journalize the transactions of Texas Sales Consultants. Include an explanation with each journal entry.

Journalize the two transactions for Kenneth Dolkart Optical Dispensary. Include an explanation for each entry.

Q18. Open the Accounts payable T-account and post to Accounts payable. Compute the balance, and denote it as Bal .

Record the two transactions for Washington Law Firm. Include an explanation for each transaction.

Q20. Open these T-accounts: Cash; Accounts receivable; Service revenue. Post to all three accounts. Compute each T-account’s balance, and denote as Bal .

1. How much did the business earn? Which account shows this amount?

2. How much in total assets did the business acquire as a result of the two trans- actions? Identify each asset and show its balance.

Q22. Open the following T-accounts: Cash; Accounts receivable; Medical supplies; Accounts payable; Brown, capital; Service revenue; and Rent expense.

After making the journal entries in Short Exercise 2-5, post to the T-accounts. No dates or posting references are required. Compute the balance of each account, and denote it as Bal .

Q24. Prepare the trial balance, complete with a proper heading, at January 3, 2012.

Prepare the trial balance of Oakland Floor Coverings at December 31, 2012.

Q26. Compute the incorrect trial balance totals for debits and credits. Then show how to correct this error.

Write the company’s accounting equation, and label each amount as a debit or a credit.

Q28. The business’s total revenues for 2012 were $480,000, and total expenses for the year were$350,000. How much was the business’s net income (or net loss) for 2012? Write the equation to compute the company’s net income, and indicate which element is a debit and which is a credit. Does net income rep- resent a net debit or a net credit?

Q29. Identify and perform the three steps to record the previously described transactions.

Describe each transaction. For example, the May 4 transaction description could be “Paid cash for building.”

Q31. Open T-accounts using the following account numbers: Cash, 110; Accounts receivable, 120; Supplies, 130; Building, 140; Accounts payable, 210; Ward, capital, 310; Service revenue, 410; Rent expense, 510; Salary expense, 520.

Post to the accounts. Write dates and journal references (use account numbers) in the accounts. Compute the balance of each account after posting.

Q33. Prepare the trial balance of Ward Technology Solutions at May 31, 2012.

For each of these errors, state whether total debits equal total credits on the trial balance.

Identify each account that has an incorrect balance, and indicate the amount and direction of the error (such as “Accounts receivable $500 too high”). Q36. Open the following T-accounts with their July 1 balances: Cash, debit balance$4,000; Accounts receivable $0; Equipment$0; Land, debit balance $29,000; Supplies$0; Accounts payable $0; Notes payable$0; London, capital, credit bal- ance $33,000; Service revenue$0; Utilities expense \$0.

Post the transactions of Exercise 2-16 to the T-accounts. Use the dates as posting references. Start with July 2.

Q38. Compute the July 31, 2012, balance for each account, and prove that total deb- its equal total credits by preparing a trial balance.

Prepare the journal entries that served as the sources for the five transactions. Include an explanation for each entry as illustrated on page 87.

Q40. Prepare the trial balance of Adams’ Lawn Care Company at December 31, 2012.

Journalize Best Automotive’s service revenue transaction.

Q43. Record the preceding transactions in the journal of Principe Technology Solutions. Include an explanation for each entry, as illustrated in the chapter. Use the following accounts: Cash, Accounts receivable, Supplies, Building, Accounts payable, Principe, capital, Service revenue, Salary expense, and Rent expense. After journalizing the transactions of Exercise 2-23, post to the ledger using the T-account format. Date the ending balance of each account Aug 31.

Q44. Prepare the trial balance of Principe Technology Solutions at August 31, 2012.

Prepare Atkins’ trial balance at August 31, 2012.

Q46. Prepare the corrected trial balance at May 31, 2012, complete with a heading; journal entries are not required.

Create the list of accounts that Showtime Amusements will use to record these transactions.

Q48. Identify the account type and normal balance of each account identified in Requirement 1.

Journalize each transaction of Showtime as shown for September 1. Explanations are not required.

 Sep 1 Cash 370,000 Cougliato, capital 370,000

Q50 Post the transactions to the T-accounts, using transaction dates as posting refer- ences in the ledger accounts. Label the balance of each account Bal , as shown in the chapter.

Journalize each transaction, as shown for July 1. Explanations are not required.

 Jul 1 Cash 68,000 Yung, capital 68,000

Q52. Post the transactions to the T-accounts, using transaction dates as posting refer- ences in the ledger accounts. Label the balance of each account Bal , as shown in the chapter.

Prepare the trial balance of Vernon Yung, M.D. at July 31, 2012.

Q54. Open the following T-accounts: Cash; Accounts receivable; Supplies; Furniture; Land; Accounts payable; Stewart, capital; Stewart, drawing; Service revenue; Salary expense; and Rent expense.

Q55. Record each transaction in the journal, using the account titles given. Key each transaction by date. Explanations are not required.


text:
# Keeping the length of vectors fixed

b and d are two arrays that are given. I create aa and cc out of b andd. This is what I do:

aa = {};
cc = {};

Do[If[j == 1,
AppendTo[aa, b[[i, j]]],
If[j == 2, AppendTo[cc, d[[i, j]]]]],
{i, 1, 9, 1}, {j, 1, 2, 1}]

With this code I create the two vectors of length 9. The problem is that each time I execute the Do again, the length of my vectors increase by 9. How can keep their length fixed at 9?

-
Can't you do aa = b[[1;;9, 1]] and similar ? – b.gatessucks Mar 7 at 9:54
Yes!!!Thanks b.gatessucks!!:) – Mencia Mar 7 at 9:57
Execute aa={};cc={}; (that is, reset aa and cc to empty set) before you execute Do[...]. But... why don't you use aa = b[[;;9, 1]];cc = d[[;;9, 2]];` instead? – kguler Mar 7 at 10:00


text:
# How to attack a fixed LCG with partial output?

To show some colleague programmers exactly how broken C's rand() is (at least on Windows) I decided to break it. So everyone knows the exact parameters, MSVC's implementation is as follows:

uint32_t state;

int rand() {
state = state * 214013 + 2531011;
return (state >> 16) & 0x7fff;
}

Because the top bit never affects anything but the next top bit in the next state and is never returned you could see this as the LCG $X_{n+1} \equiv (214013X_n + 2531011) \mod 2^{31}$ where at each iteration we only get to see the top 15 bits.

The problem is, I have not found any references that attack fixed LCG's with partial output.

Of course it requires only 2-3 calls of the rand() function to enable a bruteforce attack with at most $2^{16}$ operations on the secret part of the state, but that's hardly a break. Something similar would not be feasible with larger constants and a larger modulus.

So far I've been unable to find a break that shows this generator to be severely broken. I'm interested in results on similar LCG's that can be transformed to an attack on this one.

P.S.: If an attack exists that could be done on a graphical calculator without any programming, it increases how convincingly I can show the generator to be broken. But this is just bonus points.

-

All quantities are non-negative integers.
$X_n$ is the 31-bit state with $X_{n+1}=(a·X_n+b)\bmod 2^{31}$, $a=214013$, $b=2531011$.
$R_n=\lfloor X_n/2^{16}\rfloor$ is the 15-bit output.
$S_n=X_n-2^{16}·R_n$ is the hidden 16-bit portion of the state.

Assume we have the first few outputs $R_0$, $R_1$.. and want to find $X_0$.

We derive: $$\big((2^{16}·R_1+S_1)\bmod 2^{31}\big)=\big((a·(2^{16}·R_0+S_0)+b)\bmod 2^{31}\big)$$ $$2^{16}·R_1-a·2^{16}·R_0-b+S_1\equiv a·S_0\pmod{2^{31}}$$ $$\exists! K, \big((2^{16}·R_1-a·2^{16}·R_0-b+S_1)\bmod 2^{31}\big)=a·S_0-2^{31}·K$$ Using that $S_1<a$, we derive
$$S_0=\Big\lfloor{{\big((2^{16}·R_1-a·2^{16}·R_0-b+2^{16}-1)\bmod 2^{31}\big)+2^{31}·K}\over a}\Big\rfloor$$ $$2^{16}-1-S_1=\Big(\big((2^{16}·R_1-a·2^{16}·R_0-b+2^{16}-1)\bmod 2^{31}\big)+2^{31}·K\Big)\bmod a$$

Therefore the following outputs the possible values for $X_0$ given the first two outputs $R_0$ and $R_1$

• compute $T=(2^{16}·R_1-a·2^{16}·R_0-b+2^{16}-1)\bmod 2^{31}$
• for $K$ from $0$ to $\lfloor (2^{16}·a-1-T)/2^{31}\rfloor$
• if $\big((T+2^{31}·K)\bmod a\big)<2^{16}$
• output $\big\lfloor(T+2^{31}·K)/a\big\rfloor+2^{16}·R_0$

This works for any $a\ge2^{16}$. With the parameters at hand, the loop is performed at most $7$ times, with typically $2\pm1$ outputs. I can run the algorithm with pen and paper, and some would be able to perform it mentally.

The method works regardless of the bit size $x$ of $X$, an output $R$ with $x/2$ high bits (give or take a constant), and $a$ big enough that the attack works: the cost is $O(x^2·a/2^{x/2})$ using standard arithmetic algorithms. I think we could avoid most values of $K$ that do not pass the test, bringing the cost to $O(x^2)$ even for huge $a$.

When $a$ is too small to carry that attack, a trivial attack applies, recovering the state $X_0$ from most to least significant bits, at a rate of about $\log_2a$ additional bits for each additional $R_n$.

Generally speaking, Linear Congruential Generators are very poor from a cryptographic standpoint, even when some post-processing is applied; see this answer for an example.

More often than not, Linear Congruential Generators are not even suitable for simulation purposes. To demonstrate this to the incredulous, generate a million values using the LCG in the question; count how many times each of the 32768 values is reached; and either compute the standard deviation of that, or graph the counts sorted by increasing values; repeat with a sound RNG, and compare.

-

You already answered your own question: given the output from 2 calls to the rand() function and $2^{16}$ steps of computation, you can recover the internal state completely, simply by brute-forcing the parts of the state that you are not aware of. That is a break.

You say it's "hardly a break", but that is too-narrow thinking. A break is a break; anything that suffices to predict future outputs of the generator is a break. It does break Window's rand() implementation.

Maybe you are wondering whether some other generator that looks sorta like Window's rand(), but is not Window's rand(), would be breakable. Well, that's a different question. The answer to that will depend upon what specifically you have in mind -- but regardless, at that point we're not talking about Window's rand() any longer. The break you've got is already good enough to show that Window's rand() should not be used for cryptographic purposes. It's plenty adequate to show how broken Window's rand() is.

If this doesn't count as "good enough" of an attack, then probably your question isn't really a question about cryptography, but something else -- because for cryptographic purposes, this is a valid break.

That said, there is a slight improvement on the attack. I believe you can build a meet-in-the-middle attack that needs about $2 \times 2^8$ steps of computation and 2 outputs from rand(), and that infers its internal state.

Here's the idea. Suppose you observe the top 16 bits of $X_0$. Now write $X_0 = c + 2^8 d + e$, where $0 \le d,e < 2^8$ and $c$ is a known constant. Notice that this means

$$X_1 = (214013 c + 2531011) + 2^8 \cdot 214013 d + 214013 e.$$

The first part ($214013 c + 2531011$) is a known constant, so we have

$$X_1 = \text{known} + \text{known} \times d + \text{known} \times e.$$

or in other words,

$$X_1 - \text{known} - \text{known} \times d = \text{known} \times e.$$

Now we're set up to do a meet-in-the-middle attack. We know the top 16 bits of $X_1$. We can enumerate all $2^8$ possibilities for $e$, calculate the resulting top 16 bits of the right-hand side, and store them in a table. We can then enumerate all $2^8$ possibilities for $d$, calculate the resulting top 16 bits of the left-hand side, and look it up in the table to check for a match. When we guess them right, we should find a match.

-
I'm looking to show that rand() is unsuitable for nearly any purpose, rather than just cryptographic purposes. And I'm looking for 2 things here: either a better attack requiring less computation (preferably to be done with just a graphical calculator), or some reference recommendations for breaking LCG's with partial output. And my "break" doesn't work anymore if we'd change state to uint64_t (and change the shift to 48). –  orlp Sep 28 '13 at 6:32
@nightcracker, in that case, it sounds like your question is not about cryptography per se, so I don't think it is on-topic here. The cryptographic aspect of the question has been answered.... –  D.W. Sep 28 '13 at 6:52
How so? The existence of a $2^{16}$ attack does not mean all further research on attacks should be stopped - especially considering that the internal state is only twice as large as that. –  orlp Sep 28 '13 at 8:24
@nightcracker, I think it does mean that. A $2^{16}$ attack means the generator is broken. It means absolutely no one should use the generator. At that point, who cares whether there is a $2^8$ attack? How will that affect your decision-making? If news of a $2^8$ attack will cause you to avoid the generator, when news of a $2^{16}$ attack wouldn't, then there is something wrong with your decision-making. P.S. If your question is about other generators like the Windows rand(), but different (say with larger parameters), then that's a different question: post a new question. –  D.W. Sep 28 '13 at 17:05

Related to "show some colleague programmers"

You could code and use a smaller 8-bit rng to show them a "mini version" of C's rand. The period will be shorter and therefore more obvious… you can print the complete period (256 bytes) on screen. Seeding the rng in +1 steps and printing the next 256 bytes will show them they're actually only rotating a sequence of 256 predicable bytes. After that, it shouldn't be a huge step to convince them that bigger numbers don't fix the predictability problem. Also, the 8-bit version provides a playground to build upon towards attacking MSVC's implementation.

Related to "references that attack fixed LCG"

There is a paper that might be interesting for you to take a look at:

It includes a C code example which allows the calculation of the seed used in an LCG.

Related to "graphical calculator"

Well, it is probably not what you were thinking of as it doesn't attack any LCG, but there is a piece of software that allows to experiment with the parameters of an LCG and which visualizes the subtle correlations between the pseudo-random numbers successively created by an LCG.

You can grab either the English or the German version at
http://www.vias.org/simulations/simusoft_lincong.html

-


text:
# A different way to measure cardinality of infinite sets [duplicate]

One of the counter-intuitive things about measuring infinite sets is that the cardinality of a subset may be equal to the cardinality of the original set, contrasting with the finite world where a subset is always smaller. For example, there are just as many odd numbers as there are integers, which is key to finding room at the Hilbert Hotel, when finite intuition says there should be half as many.

My question is: is there a different way to measure the cardinality of infinite sets such that the "intuitive" relationship $S \subsetneq T \implies |S| < |T|$ holds? Does it help if you limit yourself to countable sets?

## marked as duplicate by Ross Millikan, Lord Shark the Unknown, Nosrati, mechanodroid, Community♦Sep 29 '17 at 20:38

A different way of measuring the size of sets was proposed by Di Nasso and collaborators and the name $\alpha$-theory. This theory behaves better with respect to the intuition that a proper subset should be "smaller" than a set. The historian Paolo Mancosu in particular felt that this constitutes a kind of a revolution in foundational thinking and wrote extensively about it.


text:
# limit function, uniform convergence problem

• June 14th 2009, 06:31 PM
iphone3gs
limit function, uniform convergence problem
l
• June 15th 2009, 05:47 AM
chisigma
Quote:

Originally Posted by iphone3gs

2. On set of reals, demonstrate that fn(x) is decreasing...

In order to avoid misundestanding you should better define the term 'decreasing'. In particular...

a) is fn(x) decreasing in x with n constant?...

b) is fn(x) decreasing in n with x constant?...

c) some else?...

Kind regards

$\chi$ $\sigma$
• June 15th 2009, 10:50 AM
Juancd08
Decreasing
you have to keep x fixed and choose decreasing with the n's.


text:
# Unity Inherited Class Constructor/Code Cleanup

This topic is 4296 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a small question/problem. I have been working on a project that uses a derived class whos parent class has a rather large constructor. The inherited class is intended to contain the same paramaters in its constructor as the parent class. Here is a very brief sample of my code format:
class Base{
public:
Base(int a, int b, int c) //The actual constructor is much larger
};

class Derived : Base{
public:
Derived(int a, int b, int c) : Base(a,b,c){};
};

So my question is pretty simple but I was having a little trouble finding a definitive answer through searches, books, articles etc. I understand that constructors are not inherited, but is there any way around having to write in all that extra functionality for the Derived class? Thanks in advance for any and all help, this community is awsome!

##### Share on other sites
Unfortunately, there isn't. It's been one of many reasons of programmers cursing on C++.

But, to my knowledge, introducing contructor inheritance is being reviewed by C++ standard comitee (although I don't believe they will go through with it).

##### Share on other sites
That's what I was afraid of. Thank you for the reply Deffer.

Edit: Oops, I posted this thread in the wrong forum. I meant to post it in the General section, sorry.

##### Share on other sites
Quote:
 Original post by Westones3I understand that constructors are not inherited, but is there any way around having to write in all that extra functionality for the Derived class?

you could use a template or even a macro to avoid having to type everything again :-)
However seriously: if you have any sort of significant initialization in your constructor, you may want to consider splitting its functionality into a separate init() function, that you simply call from your constructor.

##### Share on other sites
A few things you can do, one already mentioned:

1) have an init() / reset() function. It doesn't get you around having to type in params, but it does delay it ;-)

2) defaults, in two flavors: internal and parameter defaults. Parameter defaults will save you some typing:

Thing::Thing( a=0, b=0, c=0 );

the other is just internal initialization:

Thing::Thing() {
// set myself up automatically.
// wait for user to override any defaults though other functions.
}

But other than that, get used to typing!

• 10
• 14
• 11
• 10
• 11
• ### Similar Content

• Hello fellow devs!
Once again I started working on an 2D adventure game and right now I'm doing the character-movement/animation. I'm not a big math guy and I was happy about my solution, but soon I realized that it's flawed.
My player has 5 walking-animations, mirrored for the left side: up, upright, right, downright, down. With the atan2 function I get the angle between player and destination. To get an index from 0 to 4, I divide PI by 5 and see how many times it goes into the player-destination angle.

In Pseudo-Code:
angle = atan2(destination.x - player.x, destination.y - player.y) //swapped y and x to get mirrored angle around the y axis
index = (int) (angle / (PI / 5));
PlayAnimation(index); //0 = up, 1 = up_right, 2 = right, 3 = down_right, 4 = down

Besides the fact that when angle is equal to PI it produces an index of 5, this works like a charm. Or at least I thought so at first. When I tested it, I realized that the up and down animation is playing more often than the others, which is pretty logical, since they have double the angle.

What I'm trying to achieve is something like this, but with equal angles, so that up and down has the same range as all other directions.

I can't get my head around it. Any suggestions? Is the whole approach doomed?

Thank you in advance for any input!

• By devbyskc
Hi Everyone,
Like most here, I'm a newbie but have been dabbling with game development for a few years. I am currently working full-time overseas and learning the craft in my spare time. It's been a long but highly rewarding adventure. Much of my time has been spent working through tutorials. In all of them, as well as my own attempts at development, I used the audio files supplied by the tutorial author, or obtained from one of the numerous sites online. I am working solo, and will be for a while, so I don't want to get too wrapped up with any one skill set. Regarding audio, the files I've found and used are good for what I was doing at the time. However I would now like to try my hand at customizing the audio more. My game engine of choice is Unity and it has an audio mixer built in that I have experimented with following their tutorials. I have obtained a great book called Game Audio Development with Unity 5.x that I am working through. Half way through the book it introduces using FMOD to supplement the Unity Audio Mixer. Later in the book, the author introduces Reaper (a very popular DAW) as an external program to compose and mix music to be integrated with Unity. I did some research on DAWs and quickly became overwhelmed. Much of what I found was geared toward professional sound engineers and sound designers. I am in no way trying or even thinking about getting to that level. All I want to be able to do is take a music file, and tweak it some to get the sound I want for my game. I've played with Audacity as well, but it didn't seem to fit the bill. So that is why I am looking at a better quality DAW. Since being solo, I am also under a budget contraint. So of all the DAW software out there, I am considering Reaper or Presonus Studio One due to their pricing. My question is, is investing the time to learn about using a DAW to tweak a sound file worth it? Are there any solo developers currently using a DAW as part of their overall workflow? If so, which one? I've also come across Fabric which is a Unity plug-in that enhances the built-in audio mixer. Would that be a better alternative?
I know this is long, and maybe I haven't communicated well in trying to be brief. But any advice from the gurus/vets would be greatly appreciated. I've leaned so much and had a lot of fun in the process. BTW, I am also a senior citizen (I cut my programming teeth back using punch cards and Structured Basic when it first came out). If anyone needs more clarification of what I am trying to accomplish please let me know.  Thanks in advance for any assistance/advice.

• Hi , I was considering this start up http://adshir.com/, for investment and i would like a little bit of feedback on what the developers community think about the technology.
So far what they have is a demo that runs in real time on a Tablet at over 60FPS, it runs locally on the  integrated GPU of the i7 . They have a 20 000 triangles  dinosaur that looks impressive,  better than anything i saw on a mobile device, with reflections and shadows looking very close to what they would look in the real world. They achieved this thanks to a  new algorithm of a rendering technique called Path tracing/Ray tracing, that  is very demanding and so far it is done mostly for static images.
From what i checked around there is no real option for real time ray tracing (60 FPS on consumer devices). There was imagination technologies that were supposed to release a chip that supports real time ray tracing, but i did not found they had a product in the market or even if the technology is finished as their last demo  i found was with a PC.  The other one is OTOY with their brigade engine that is still not released and if i understand well is more a cloud solution than in hardware solution .
Would there  be a sizable  interest in the developers community in having such a product as a plug-in for existing game engines?  How important  is Ray tracing to the  future of high end real time graphics?

• Good day,

I just wanted to share our casual game that is available for android.

Description: Fight your way from the ravenous plant monster for survival through flips. The rules are simple, drag and release your phone screen. Improve your skills and show it to your friends with the games quirky ranks. Select an array of characters using the orb you acquire throughout the game.


text:
# Tag Info

10

A good answer to this question depends on what you want to use the labels for. When I think about "optimization," I think about a solution space and a cost function; that is, there are many possible answers that could be returned and we can know what the cost is of any particular answer. In this view, the answer is "yes"--pattern recognition is a case ...

10

This is a really common reaction after first encountering the No Free Lunch theorems (NFLs). The one for machine learning is especially unintuitive, because it flies in the face of everything that's discussed in the ML community. That said, the theorem is true, but what it means is open to some debate. To restate the theorem for people who don't know it, ...

8

I see no reason why decaying learning rates should create the kinds of jumps in losses that you are observing. It should "slow down" how quickly you "move", which in the case of a loss that otherwise consistently shrinks really should, at worst, just lead to a plateau in your losses (rather than those jumps). The first thing I observe in your code is that ...

8

TL:DR: Hyper-heuristics are metaheuristics, suited for solving the same kind of optimization problems, but (in principle) affording a "rapid prototyping" approach for non-expert practitioners. In practice, there are issues with the prevailing approach, motivating an emerging perspective on 'whitebox' hyper-heuristics. In more detail: Metaheuristics are ...

7

There are several elementary techniques to try and move a search out of the basin of attraction of local optima. They include: Probabalistically accepting worse solutions in the hope that this will jump out of the current basin (like Metropolis-Hastings acceptance in Simulated Annealing). Maintaining a list of recently-encountered states (or attributes ...

6

It is suggested that the number of hidden units in a layer should be in powers of 2 because it helps converge faster. I would quite like to see a reference to this suggestion, in case it has been misunderstood. As far as I know, there is no such effect in normal neural networks. In convolutional neural networks it might potentially be true in a minor way ...

6

You can run gradient descent without back propagation, in some cases: Simple structures such as linear or logistic regression, where the gradients can be calculated directly from the inputs and cost function value. In "black box" gradient-based learning algorithms where you don't know how (or don't want to) calculate gradient analytically, so you choose to ...

6

As @nbro has already said that Hill Climbing is a family of local search algorithms. So, when you said Hill Climbing in the question I have assumed you are talking about the standard hill climbing. The standard version of hill climb has some limitations and often gets stuck in the following scenario: Local Maxima: Hill-climbing algorithm reaching on the ...

5

Well, you are definitely mixing two different things. Here are those bits: The function that deep learning approximates is basically a function that best fits the INPUT DATA points. You should not think about its differentiability or optimization aspects. We don't care what type of function it is; we just want the best fit of input data (ofcourse ...

5

Usually you keep track of training loss and validation loss and apply proper regularization technique (L1, L2, dropout, dropconnect, ...). The more interesting technique is to observe your validation loss with respect to the number of parameters in the network (often controlled by the number of layers/feature maps). If the validation starts dropping with ...

5

I can offer two (at first sight, conflicting) perspectives on this: Firstly: If the letter string 'abc' becomes 'abd' what would "doing the same thing" to 'ijk' look like? This is just one example of a problem (so-called 'letter-string analogy problems') that is not easily framed as an optimization problem - there is a range of answers that appear ...

5

Hill climbing is not an algorithm, but a family of "local search" algorithms. Specific algorithms which fall into the category of "hill climbing" algorithms are 2-opt, 3-opt, 2.5-opt, 4-opt, or, in general, any N-opt. See chapter 3 of the paper "The Traveling Salesman Problem: A Case Study in Local Optimization" (by David S. Johnson and Lyle A. McGeoch) for ...

4

For a finite value to be 'optimal,' typically you need some benefit from more paired up with some cost for more, and eventually the lines cross because the benefit decreases and the cost increases. Most models will have a reduction in error with more training data, that asymptotically approaches the best the model can do. See this image (from here) as an ...

4

To build on Neil's answer a bit, you're right that the better your evaluation function gets, the less work your optimization function will need to perform. If your evaluation function gets good enough, you won't need to search at all. This is not just an academic idea though! It's actually fairly widely used, and has been key to solving several games. The ...

4

Gradient descent (GD) is an optimisation algorithm, that is, it is used to find a (local) minimum of a multi-variable and differentiable function $f$. GD is an iterative and numerical optimisation algorithm. It is iterative because it proceeds in iterations. It is numerical because it is not an algorithm which produces an exact solution, due to numerical ...

4

This is a very large question that could be answered in a variety of ways depending on the context. For some optimization problems operating under specific conditions you can make theoretical guarantees that your optimization will solve your problem. A specific example of this is running the gradient descent algorithm on a convex function. If the function ...

3

I understand your question to be: If some moves are compulsory, and my agent has no choice about which move to make next, do I need to perform a search, or can I just return the compulsory move? The answer depends on what your goal is. If your goal is to make an interactive agent that will play the game against you, then you are correct: there's no need ...

3

The differences you have observed between the two different versions of the TRPO paper are due to different formalizations of the problem and the objective. In the first version of the paper you linked, they start out in Section 2 by defining Markov Decision Processes (MDPs) as tuples that, among other things, have a cost function $c : \mathcal{S} \... 3 In general I agree with @nbro answer, nevertheless sticking strictly to this specific question I'd like to share some speculations: what the author of the question provides us with is the Loss Function Shape so I'll try to use the full information here to compare the 2 minima looking at the LF steepness we observe the Left LM is in a steeper region than ... 3 Empirically, I observed that algorithms like Adam and RMSProp tended to give me a final higher performance (in my case, the accuracy) on (the validation dataset) with respect to SGD. However, I also observed that Adam and RMSProp are highly sensitive to certain values of the learning rate (and, sometimes, other hyper-parameters like the batch size) and they ... 3 NEAT is a genetic algorithm (GA). A genetic algorithm maintains a population of individuals (or chromosomes) and evolves it using operations like the crossover or the mutation, so that the fittest individuals keep living and most other individuals die. The nature of the individuals depends on the problem. For example, in the case of NEAT, the individuals are ... 3 Yes it has been tried. In fact there is a whole field, dubbed Genetic Programming. There is an annual competition to obtain "Human-Competitive" algorithms, and many instances of those have been found over the years. 3 First, you need to consider what are the "parameters" of this "optimization algorithm" that you want to "optimize". Let's take the most simple case, a SGD without momentum. The update rule for this optimizer is: $$w_{t+1} \leftarrow w_{t} - a \cdot \nabla_{w_{t}} J(w_t) = w_{t} - a \cdot g_t$$ where$w_t$are the weights at iteration$t$,$J$is the cost ... 3 writing here my suggestion, because i haven't earned the right to comment yet. Your main "problem" could be your loss function. It converges, this is why your loss value is decreasing. So I suggest to let it maybe train longer. Alternatively you could change the loss function to fit your need. For example you could use: loss = tf.reduce_mean(tf.square(... 3 For the first question, RMSE and Euclidean distance have no difference, not that i know of. For the second question, you only need the common loss function for normal tasks. MSE is a common loss function used in linear regression tasks as well as loss function similar in nature like the RMSE. For classification tasks, Cross Entropy Loss is preferred. For ... 2 Honestly, nobody knows. Any talk of sentient AI's is still basically sci-fi and we can't really offer anything more than informed speculation. But think about it this way: sentience, in and of itself, doesn't necessarily involve any "goals" or "desires" or "objectives" beyond what the AI creator programmed in. Be careful not to over anthropomorphize and ... 2 A common concept in AI is "recursive self-improvement." That is, the AI 1.0 would build a version 1.01, which would build a version 1.02, and so on. This is probably not going to be thought of as the newer version 'destroying' the older version; if an AI can self-modify, it's probably going to be more like going to sleep and waking up smarter, or learning a ... 2 I'm not an expert in this area, but it would appear to depend on the choice of activation function:$e^x$is not Lipschitz continuous. See Analytic functions which are not Lipschitz continuous.$\tanh(x)$is. That said, this paper appears to give some conditions (specifically for dynamic ANNs) for which networks with activation function involving$e^x$can ... 2 In general, the larger the training set, the better. See The Unreasonable effectiveness of Data, though this article is quite dated (written in 2009). Xavier Amatriain, a researcher at Netflix has a Quora answer where he discusses that more data can sometimes hurt algorithms. For deep neural networks in particular, it does not seem that we have hit these ... 2 The error in the code is simply having a$+$rather than a$-$sign. Line 4 of the algorithm says: $$E\left[ g^2 \right]_t = \rho E\left[ g^2 \right]_{t - 1} + (1 - \rho) g_t^2,$$ but your code implements (note the$+\$ inside the brackets at the end): $$E\left[ g^2 \right]_t = \rho E\left[ g^2 \right]_{t - 1} + (1 + \rho) g_t^2.$$ A correct ...

Only top voted, non community-wiki answers of a minimum length are eligible


text:
# What to do with a last chunk of 503 bits in SHA1?

I was trying to implement a SHA1 algorithm last night, and I got stuck at preprocessing the chunks in SHA1.

As I have understood it, the message that has to be hashed, has to be broken into chunks of 512 bits, and if the last chunk is not equal to 512 bits, a 1 is appended to the bits, followed by '0', and at the end the number of bits of the last chunk of message is appended. So an example:

abc = 97 98 99
abc = 01100001 01100010 01100011
chunk = 0110000101100010011000111... ( 482 x 0) ...11000

But what would happen if the last chunk is 504 bits? Then 9 bits (2^9 = 512), should be used to describe the length of the message, but that does not fit, because there are only 512 - 504 - 1 = 7 bits left to describe the length.

I've looked into Wikipedia and the SHA documentation, but could not find my answer in there.

• Appending a 1 bit (and the length) is not conditioned by anything, contrary to the questions's statement. Read section 5.1.1 in the the SHA documentation (I fixed the link in the question), it is unambiguous. – fgrieu Oct 13 '17 at 14:06

The answer is in both sources you linked.

Pseudocode from the Wikipedia article:

• append the bit '1' to the message e.g. by adding 0x80 if message length is a multiple of 8 bits.
• append 0 ≤ k < 512 bits '0', such that the resulting message length in bits is congruent to −64 ≡ 448 (mod 512)
• append ml, the original message length, as a 64-bit big-endian integer. Thus, the total length is a multiple of 512 bits.

From the SHA documenation:

Suppose that the length of the message, $M$, is $l$ bits. Append the bit "$1$" to the end of the message, followed by $k$ zero bits, where $k$ is the smallest, non-negative solution to the equation $l+1+k\equiv 448 \mod 512$.

In both instances, the number is the smallest non-negative solution to the same congruency, just noted slightly differently. If you have an example where $-1$ would be a solution to the congruency, then the actual value of $k$ is $511$.

• Does 448 mod 512 mean that the message needs to be broken into chunks of 448 bits, with 64 bits after the 448 containing 1 ...... k, where k is 448 in case of the end of the message has not been reached? Always the last 64 bits are added? – user274595 Oct 13 '17 at 14:59
• @user274595 How do you take from those quotes, that anything changes how the message is split into chunks? It does not adress that at all, it is only about the padding at the end. You have the length, you know that you add at least $1+64$ bits, and then you can calculate the number that is required to 'fill up' to a multiple of $512$. And yes, the length encoded with 64 bit is always the last part, as specified clearly in both documents. – tylo Oct 13 '17 at 15:20


text:
# Calculate the expected value of a random variable bounded by two independent exponential random variables

Let $X$ and $Y$ be independent exponential random variables, $E[X]=5$ and $E[Y]=8$. Define a random random varible $I$ by $$I=\begin{cases} 1 \quad \text{if } X \le Y \\ 2 \quad \text{if } X > Y \end{cases}$$ What is $E[I]$? How do I calculate the mean and variance of $min(X,Y)$?

-
$\mathbf{E}I=1 \cdot P(X \leq Y) + 2 \cdot P(X>Y) = P(X-Y<0) + 2 P(X-Y)>0$ so you have to look at the distribution of RV $Z=X-Y$ –  Alex Oct 17 '12 at 3:04

Write $X \sim \mathrm{Exp}(c_1)$ and $Y \sim \mathrm{Exp}(c_2)$. From the condition, we have $c_1 = \frac{1}{5}$ and $c_2 = \frac{1}{8}$. Then by brutal force,

\begin{align*} \Bbb{P}(X \leq Y) &= \int_{0}^{\infty} \left( \int_{0}^{y} c_1 \exp\{-c_1 x\} \, dx \right) c_2 \exp\{-c_2 y\}\, dy \\ &= \int_{0}^{\infty} (1 - \exp\{-c_1 y\}) c_2 \exp\{-c_2y\}\, dy \\ &= \int_{0}^{\infty} c_2(\exp\{-c_2y\} - \exp\{-(c_1+c_2)y\}) \, dy \\ &= \left[ \exp\{-c_2 y\} - \frac{c_2}{c_1+c_2} \exp\{-(c_1+c_2)y\} \right]_{0}^{\infty} \\ &= \frac{c_1}{c_1 + c_2} = \frac{8}{13}. \end{align*}

Therefore the expectation is

$$\Bbb{E}[I] = 1 \cdot \Bbb{P}(X \leq Y) + 2 \cdot (1 - \Bbb{P}(X \leq Y)) = \frac{18}{13}.$$

In case of $\min \{ X, Y \}$, observe that

$$\Bbb{P}(\min \{ X, Y \} > t) = \Bbb{P}(X > t, Y > t) = \Bbb{P}(X > t)\Bbb{P}(Y > t) = \exp\{-c_1 t\}\exp\{-c_2 t\}.$$

Thus the CDF $F$ of $\min \{ X, Y \}$ is given by

$$F(x) = \Bbb{P}(\min \{ X, Y \} \leq x) = 1 - \exp\{-(c_1 + c_2) x\}.$$

That is, $\min \{ X, Y \}$ is an exponential random variable of parameter $c_1 + c_2$, and both the expectation and the variance follows easily.

-
$X$ and $Y$ can't have the same parameter: for $X$ it is $\frac{1}{5}$, for $Y \ \frac{1}{8}$ –  Alex Oct 17 '12 at 3:44
@Alex, I completely missed that condition. Thanks. –  Sangchul Lee Oct 17 '12 at 5:59


text:
# Having issues with a seemingly simple problem

1. Nov 13, 2011

### Xyius

1. The problem statement, all variables and given/known data
A particle of mass m is repelled from the origin by a force inversely proportional to the cube of its distance from the origin. Set up and solve the equations of motion if the particle is initially at rest at a distance $x_0$ from the origin.

(This is one dimensional motion)

2. Relevant equations
Newtons Second Law to set up the equation of motion

3. The attempt at a solution
The first part is simple. I just had..
$$m \ddot{x}=\frac{k}{x^3}$$

And this part is right. I am having trouble solving it however. I know it is just a method from my differential equations course but I am having trouble for some reason!

2. Nov 13, 2011

### rude man

Try conservation of energy - potential + kinetic.