Friday, June 21, 2013

Keterkaitan Model Sistem Dinamis dan Game Theory (1 of 2)




Latar Belakang:
Dari hasil perenungan dan diskusi di masa lampau dengan teman-teman, sering terpikir kompleksitas suatu sistem yang simple sekalipun. Oleh karena itu pada posting ini akan coba saya tuangkan kedalam bentuk tulisan agar jadi dasar pembahasan.

Definisi:
Kita asumsikan di huni oleh 2 buah forces yang bekerja berlawanan memperebutkan dominasi atau presence  yang terikat waktu dan tempat serta perilaku dasar mereka, misalnya dalam bentuk manifestasinya adalah:

Kasus:
Subjek dapat merupakan spesies, namun bisa juga merupakan meme (idealisme, kultur, perilaku dasar, kepercayaan / religion) , sebagai contoh:
1.      Spesies: dalam ekosistem terdapat pemangsa dan mangsa yang sama-sama berevolusi mengembangkan kapasitas diri.
2.       Kelas Sosial: Dalam suatu sistem ekonomi terdapat 2 kelas, si kaya dan si miskin, atau analogi lainnya adalah kelas enterpreneur/Borjuis/Majikan dan kelas pekerja/Proletar/Budak.
3.       Sistem: Pilihan untuk pemerataan Kesempatan Kerja (Padat Karya), yang apabila terlalu diprioritaskan kemungkinan besar akan mengurangi penghasilan secara kolektif, atau pilihan untuk Maksimisasi Penghasilan (Padat Modal), yang berimplikasi pada lebih sedikitnya pembukaan peluang kerja. Dilemma Pemerataan potongan kue atau Maksimisasi kue.

Kita selanjutnya memilih contoh kasus, agar bisa dipahami dengan riil bagaimana struggle dari 2 buah forces memberikan possible stable outcome. Untuk itu kita akan membahas ilustrasi kasus no. 1 yaitu pertarungan eksistensi antara pemangsa dan mangsa (semua kasus pada dasarnya hampir sama).


Asumsi:
Untuk bisa memodelkannya kita restriksi dan simpilifikasi dulu hal-hal sebagai berikut:
1.       Hanya ada 2 faktor yang berkompetisi.
2.       Kita belum memperdulikan apakah salah satu force memiliki endowment dibandingkan lainnya,
3.    Ataukah salah satu force memiliki adaptivitas yang lebih baik dari lainnya,
4.       Tidak ada perubahan struktural mendasar dari perilaku mangsa maupun pemangsa
5.       Ataukah ada faktor shock yang mengganggu kestabilan (katastrofik)

Untuk sementara semua faktor yang menguntungkan atau merugikan diatas diabaikan dulu. Yang ingin di evaluasi di sini adalah net growth ( pertumbuhan –  kematian ) dari spesies, kelas sosial ataupun sistem. Dari kompetisi dinamis diatas, ada beberapa kemungkinan hasil akhir dari kompetisi tersebut:



Kemungkinan Hasil Akhir:
1.       Apabila pemangsa overgrazing mangsa, ekosistem akan tidak stabil dimana jumlah pemangsa akan mendominasi ekosistem,
2.       Apabila mangsa terlalu cepat berkembang biak dibandingkan kemampuan pemangsa berburu, maka ekosistem akan
3.       Apabila dibiarkan  salah satu grup mendominasi ekosistem dalam jangka waktu yang lama, maka akan terjadi mutual extinction karena overgrazing pemangsa yang menyebabkan mangsa habis dan pemangsa kelaparan (sesuai poin 1) atau karena overpopulation jumlah mangsa yang menyebabkan ekosistem exhausted (sesuai poin 2).
4.       Namun ada juga titik stabil atau semi stabil atau saddle point, dimana pemangsa dan mangsa dapat saling berkoeksistensi.
5.       Penulis menduga ada titik ambang perubahan struktural, dimana saat jumlah makanan mulai habis, yaitu: pemangsa kehabisan mangsa, ataupun mangsa kehabisan tumbuhan (karena overgrazing tumbuhan oleh mangsa yang membludak). Maka kedua grup ini dapat menciptakan preferensi baru, yaitu sifat kanibalistik. Hal ini dapat menciptakan suatu kesetimbangan baru dari kesetimbangan lama, karena adanya perubahan struktur matriks yang mendefinisikan pemangsa dan mangsa. Namun dengan asumsi no.3 diatas untuk sementara hal ini diabaikan dulu.

Ok untuk sementara semua hal di atas kita freeze dulu, Silahkan dikomentari atau disanggah asumsi diatas.

Kita akan lanjutkan dengan pemodelan sistem ini pada posting selanjutnya.

Tuesday, November 29, 2011

Prison System Mechanics

I haven’t read any economics books or conducting thought experiment or even write my economic thoughts lately, so I’m rusty now. There are more important things that I need to catch-up in the present time, however seeing this unfinished draft on prison system mechanic has intrigue and motivate me to post it, so please bare with me,

we knew "Everyone is guilty, no one is innocent, there are merely varying levels of guilt in this entire society", however there are some crimes or action that is more than just lies or sarcastic words, and there are laws and instruments in place to prevent such an actions propagating within society. One of the instrument that we are going to observe is “Prison System”. Ideally, all the bad guys/girls (I’m not a sexists :P) should be kept inside and all the good guys/girls should be outside, although that is not always the case.

Let us try to model the society and its properties

Good guys/girls (GG) have properties:

a. GG help increase economy, they are the backbone of positive economic output
b. Economic efficiency will be increased when GG meet another GG, it is like “trust” based society, when people trust each other, the cost of overhead in economy decreases so economy runs efficiently without disallocation of resources. So let say this is a form of social capital.
c. GG pays for the prison system (let say there is a form of taxation, say “prison tax”)
d. GG may occasionally mutate to BG, there are many drives to do so.
e. There are GG that might behind bars though, however we shall assume the number is very small compared to BG that were outside of bars.

Bad guys/girls (BG) have the following properties:

a. There are two types of BG, they are the one that is "inside the bars" and "outside the bars". For example, "GG turning into BG" can also be classified as "BG outside the bars", they should be put into prison to ensure efficient society.
b. BG outside bars may help increase economic output in short run, through unsustainable economic process, like smuggling and selling narcotics.
c. BG outside bars may also reduce economy, by reducing economic efficiency and reducing social trust capital.
d. BG might kill GG in the process, thus reducing economic output.
e. BG “enjoys” prison system, which burden the economy. The terms "enjoys" means that they are producing below their potential output.
f. BG might kill BG during their stay in a prison system.
g. BG may increased their skill and cruelness when they met other BG, they may share tricks and know each other to form some group, it like some kind of university for the BG.
h. BG may occasionally mutate to GG (although not many), usually once a BG will always stay as a BG, and it’s almost like a curse.


Government & Prison system has the following properties:

a. Prison system is public goods (can you explain?), although lacking the characteristics of public goods, such as non-rivalrous, which means that consumption of this good by anyone does not reduce the quantity available to other agents and non-excludable, meaning that it is impossible to prevent anyone from consuming that good.
b. Prison works like a “grease” that is required to make the economic wheel rotate at their optimal efficiency. But, in order to erect prisons, establish law institutions, pay the guards and building maintenance, give the bad guys food to eat so the good guys can go to work safely and the bad guys stay inside and do something else requires quite a lot of resources.
c. An industrial-complex based prison system can be a temporary solution (incarceration, where BG inside prison forced to do work / labor), might help GG in reducing prison maintenance cost, however this might lower BG chance to get out of prison (slavery-like system) because the warden have the incentive to keep their "workers" inside. Such prison system may be viewed by "BG outside bars" as unfair and might increase their incentive to avoid being imprisoned or captured by police.
d. A weak and corrupt justice institution will poison the society, GG will view that being a BG or having BG job is more profitable, because they can simply pay some penalty cost and stay outside bars.
e. Once Prison system is flooded beyond its optimal level, BG may cause fear to GG and society at large. Once there is too many BG in the society, the orderly society may collapse into chaos.
f. The amount of conversion rate between GG and BG is affected by:



i. Increasing the number of police
institution
(increase detection rate at the cost of more
taxation from enacting such a system). This may also potentially flooding the
prison system.
ii. Increasing the severity of
punishment
, (increase the element of punishment, at no cost,
this may increase the element of sadistic and the element of smartness of
BG, whenever BG trapped in no-win situation, they
would rather die and do some desperate attempt to prevent being
captured
).
iii. Early Education, this might increase society capability to increase skill to produce and create awareness of law (reduce GG incentive in becoming BG).


I don’t have the equation yet, but the simplistic model below should capture all the element I have stated above, and it should be possible to derive a model for all of this.




Kindly give me inputs or insights on my statements/assumptions above.

Thursday, December 23, 2010

Input Output Table Analysis using PyIO ( for Large Matrix )

Recently, I have a paper assignment from my economic modelling class and spend some time to play around with PyIO, a python based application that enable IO table analysis, for sometimes. It's a great apps (not to mention it is free, fast and easy) and it had greatly reduced the amount of time for me to understand how the IO calculation actually works.

Actually you can use Matlab, Octave or mathCAD to do this, but I believe you would require more time in learning the entry command, matrix operation, balancing the table, do data transformation back and forth, etc. You wont like it, trust me !

So I decided to give PyIO a go and installed this software on my Vista 64-bit, 4 GB Memory. MS Excel is not required, but it is nice to have. I do the following to 2005 BPS 66 x 66 sector operations:

Tested and Working:
1. Sector aggregation,
2. Leontief Inverse,
3. Ghoshian Inverse,
4. Impact Analysis,
5. Output, Input, Income, Employment multiplier,
6. Key Sector Analysis (Forward & Backward Linkage), (This is imperative)
7. Multiplier Product Matrix Analysis, (This is interesting)
8. Extracting method (Removing 1 sector from the economy,
9. Push-Pull Analysis (Difficult to understand, various probability),
10. Field of Influence

Not yet tested (but it should be working though):
1. RAS update
2. Output Decomposition

Basically everything works fine, the result can be chosen, between "Interactive Excel Data Entry" or "Tab Separated Format". I often choose the later. However I did encounter serious problem when I inputted a 175 x 175 matrix. The matrix wont showed-up (as shown in the pic below). After further inspection into the code, I saw what may have caused it, apparently the windows size is hardcoded so that the horizontal grid is maxed out to a just (100-3) cells = 97 cells, arrgghh... awfully pity !

Crawling to various URL in the internet (Google search power is getting worst and worst these days, geezz..), I see a lot of junk of information regarding PyIO, no solutions of how to overcame large matrix calculation limit. I also have tried various ways from downloading py2exe apps, trying to re-write the code, but to no avail. Tired of trying, I abandon the idea of using PyIO for calculating large matrices, but that is until recently, when I uncovered that I can large matrices calculation with it..

So How?

Just use PyIO older version ("Lowtek rulez eh ?"), the one with command line, this older version is much more powerful than you think. You can download it from here: http://www.real.illinois.edu/pyio/OldversionsPyIO/pyio.zip

In the future, it will be hard to find them all, so I took the initiative to preserve this PyIO release and pack them into one zip consisting of:

  1. PyIO version 1.0
  2. Python-2.2.3
  3. Mark Hammond win32all-152.exe
  4. Numeric-23.0.win32-py2.2.exe (no longer available)
  5. Some PDF/Whitepapers mentioned in the PyIO manual
  6. Indonesian 2005 66x66 sectors and 175x175 sectors (Producers Prices), Employment, Income. (provided as-is, accuracy is not guaranteed)

You can download it from here: (multiple download link will soon be available). Credits goes to the respective apps programmers/contributors.

Instructions:

  1. Install package #2, #3, #4.. (see above)
  2. Install package #1, all into the same folder
  3. Copy your input file (in this case 175sector.txt and/or 66sector.txt into that folder too,
  4. Start -> run -> cmd
  5. Navigate to the folder, using multiple cd command
  6. type python.exe run_pyio.py, a screen like this should appear:

  7. Once you are in the menu, just type what you want to calculate, for example for "key sector analysis" then type "3" and then type"1" , enter the file name "175sector.txt", dont use excel output if you are calculating a large matrix because the result will not appear instantly, so just use the text file.
  8. Rename the output file *.out to *.txt, and use Excel to open it. All cell
    should be displayed nicely.
Okay, that's all from me, make a good use of them (what i actually mean is "Abuse It!!" :) ) , and....
Have Fun !

Wednesday, December 15, 2010

Economics of Happiness

“For 60 years, Gross Domestic Product, or GDP for short, has been the yardstick by which the world has measured and understood economic and social progress. However, it has failed to capture some of the factors that make a difference in people’s lives and contribute to their happiness, such as security, leisure,income distribution and a clean environment–including the kinds of factors which growth itself needs to be sustainable.."
- Joseph Stiglitz, “Progress, What Progress?” (March, 2009)


I'm not going to belittling GDP nor GNP as an important measures of an economy, but I should remind us, including me myself that we sometimes forget that once again Economics is never about a profit maximization nor production maximization science, it is a utility maximization science.


I always dreamed to go to NZ, admiring its beautiful landscapes, winds and cattles. And then I realize, the urges came from my expected happiness, that believes the following:

1. Money do affect happiness, at least to a certain point / cut-off value.

Beyond a certain level of income, money has little relevance with my happiness, in
fact giving me more money will give me negative happiness ?

Why ? Because more money will make me worry of economic jealousy from neighbours that will attempt to seize my money/assets forcefully even if I make my own fortune painstakingly, thus giving me an overall negative happiness.

2. Money doesn't buy me relationship, health, leisures and freedom.

Although consumerism gives people a short-run happiness to some extent, but the same economic activities that support the consumerism, drains many happiness, for example excessive work cause divorce, bad health from pollution or overworking, reduced leisure and creative activity and globally it reduce freedom (long-run happiness). This is subjective but it still can be quantified through social metrics, such as number of marriage and divorce, mental and physical health disorder records, leisure sector activities, specific crime rates, ecological deteoriation, etc.

3. Unimportant activities disallocated Resource required for sustaining life.

Why do I need to cut down forest, killing all the animal in the process, just to build a timber processing plant, where it produces carbon emission, polluting surrounding environment, just to provide woods for exported furnitures.


4. Happiness is difficult to measure, but it is not impossible.

I know that GDP/GNP is easier to calculate, convert and compare, thus it is portable statistics to make analysis of, and Happiness is subjective and can be used as political tools by the government to strengthen their legitimacy. But isn't it better to calculate something vague using imprecise tools rather than using wrong tools. it's like using GPS (precise tools to measure position) to approximate temperature (applied to measure the wrong subject) ).

Happiness Snapshot from Russia :


And also there are growing concerns among big countries to apply and incorporate Gross National Happiness (GNH) or GDH or whatever it will be called, into their national target, something that Bhutan had already done since 1972. According to Associated Press, Nov 15, 2010:

  • "There is growing international recognition that to measure national well-being and progress there is a need to develop a more comprehensive view, rather than focusing solely on gross domestic product"- Jil Matheson, UK.
  • French President Nicolas Sarkozy ... two years ago asking two Nobel prizewinning economists to devise ways to measure quality of life factors in addition to simply economic factors when France it studying its policy options.

And also some facts that although GDP have increased, happiness is decreasing :

  • American Journal of Psychiatry the rates of depression across almost all demographic groups have risen in the United States over the past 10 years, with major depression rising from 3.33 percent of U.S. adults in 1991-1992 to 7.06 percent in 2001-2002: In other words, it has more than doubled.

So.... Does Money still "Granger Cause" your Happiness ?

Sunday, November 28, 2010

Dual-Competitive Government

I just revisited my own idea during sleep. *doh*

This may be a silly idea ("Impossible") or may took many years to implement", here's how it will go...

Warning: This is a Thought Experiment, spare me the laughter... :)



The present Governmental Weakness
  1. The current government (Executive) evaluation process took a long time, 5 years or more to make the leader submit their self-evaluation. It will be to late for change to take place. We need adaptive Government with specific Key Performance Indicator which can be evaluated at any point of time by the House of Representative.

  2. The ruling government once elected was difficult to be changed. Furthermore, some people will become upset if their leader changed before their time is up. We need a system that will Zeroing the unneccessary cost of political change.

  3. There is strong suspicion that after being elected, the Executive in their 2nd to 3rd year of their ruling time will collect fortune for themselves , while in the 4th year busy polishing their record in order to win the next election. We need a system that force them NOT to do this or at least make it difficult.

  4. It's difficult for the Executive member to voice their "official" dissenting opinion/concern that serve as self-reflection and early notification for the House of Representative to embrace a "heads-up" signal when crisis arrived. We need a system that promote self-reflection mechanism without the fear of being fired or marked as rebel.

  5. Some leaders are "Leader in Crisis", typically have strong recovery management, while other "Leaders in Growth", typically have many creative ideas to make new breakthrough. We need a system that facilitate a means for both type of leaders to co-exist.
  6. There are condition where HoR doesn't do what people concerned of, in this case people can do their own "civil disobedience" and therefore crippling some of the KPI which related to a specific Leader governance that they dont like, so it will be switched to other Leader. They dont have to wait for 5 years to do it.

The Implementation

  1. The Presidential Candidate will have to campaign from the beginning stating whether they are favoring in the side of "Growth" or "Crisis", they must to pick only one. (And also their program, target, but that's not what we mainly concerned of right now).

  2. In the election, People will be asked to pick two Presidential Candidate, one from "Growth" and one from "Crisis" (ideally from different party, or different interest, and independent), simply put they will be asked to whom they will be convinient to be lead during Good Time and Bad Time. (I do strongly advocate that not at presidency level but at ministrial level, but I will accept this adjustment for simplification)

  3. Once elected, both of them (Leader in Growth and Leader in Crisis) will be given a "President" status (for a simple reason, that people have elected them), any Institution within the country will treat them as equal. HoR, based on current KPI, will appoint which President will be in charge first. (Is the country in Crisis or in Growth?)

  4. When Leader in Growth is in-charge/active, the Leader in Crisis may not protest anything, their job is simply as an observer (listen and report) and make report to House of Representative about their concern, so that the House of Representative may call the current active President.

  5. Leader in Crisis may not openly criticize, threat, undermine, hinders, remove Leaders in Growth to perform their duties, and vice versa. Such attempt can be considered as Inconstitutional by HoR. Leader in Crisis may only voice their concern to the HoR (request a meeting) and to the masses but it can be done once every several determined months, that if and only if the KPI had an strong indication that may lead toward Crisis. It is HoR job to decide whether to make Press Release or not regarding the meeting content.

  6. Each of them are required to state their KPI (low and high), Programs and Ministers. For example: Leader in Crisis will set their Economic KPI at 1% - 4%, while Leader in Growth will set their KPI at 3% - 6%. The intersect lies within 3%-4% boundaries. The job of House of representative is to set the median value, for example 3%.

  7. Leader in Crisis during "his/her inactive time" is guaranteed of equal access to information for every ministrial report. Every accsss of information is replicated between both Leader, it works like a carbon copy. Ministers must submit their report to both President.

  8. Suppose the economic growth drop to 2%, below the median value (3%), then the Leader in Crisis will automatically takeover the economic responsibilities and the condition #5 is reversed (Leader in Growth will be temporarily discharged/relieved of duty), Leader in Growth may not protest anything. The condition #5 is reversed again if economic growth is above its median value (3%), at 4%.

Interesting Features of this kind of Government

  1. Swift and legal transition in the Executive Body,
  2. It shifted the President power from monopolistic to oligopolistic, so assuming both of them craving for power, it will be a competitive government.

  3. Allow for both conservative and progressive style of government to co-exist.

  4. Different skill-sets is required for different conditions, and we let the people choose what the best for them in Bad or Good Time.

  5. There is disincentive for Executive to not performing well, they will be out of job and power.

  6. Self-Critic/Assesment can be conducted at any point of time without the fear of being fired, left hands know what right hands going to do.

  7. Still maintaining effectivity, because only one decision maker can exist at one time,

  8. Still maintining efficiency, because not all government is replicated, only the Leaders and the reports.

  9. If you think Vice President mechanism is sufficient to replace my proposal, well, I humbly think it is NOT, because VP is being hand-picked as an Aide by President and of course if must follow the President orders and have lesser power. In my type of government, it doesn't work that way.

That would be all I guess,... and ridiculous as it may seems, but since I haven't read it anywhere in the Internet, so I'll named is as "Dual-Competitive Government (DCG) " and I'll claimed it as my idea... :P