0% found this document useful (0 votes)
111 views28 pages

Sample Paper IMMC

The document outlines a model developed by Team#2024020 to evaluate household readiness for pet adoption, focusing on cats and other species. It details the research and methodology used to identify key factors affecting pet ownership suitability, including purchasing power, hygiene, and community support, and presents a generalized model for various pets. The team emphasizes the need for professional input to refine the model and improve its accuracy in matching pets with prospective owners.

Uploaded by

renniehe0221
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views28 pages

Sample Paper IMMC

The document outlines a model developed by Team#2024020 to evaluate household readiness for pet adoption, focusing on cats and other species. It details the research and methodology used to identify key factors affecting pet ownership suitability, including purchasing power, hygiene, and community support, and presents a generalized model for various pets. The team emphasizes the need for professional input to refine the model and improve its accuracy in matching pets with prospective owners.

Uploaded by

renniehe0221
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2024 IM2 C

Page 1 of 28 Picking the Perfect Pet Team#2024020


IMMC24384887

Summary
The problem of homeless pets and worsening feral pets living conditions have caught the attentions
of the IMMC-A. Henceforth we have been tasked to determine if a household is suitable for adopting
a cat and other different species.

In task 1 (the warm up), we first researched on the factors that we thought would affect the evalua-
tion. Then, we determined the deciding factors, those that had a big impact on the result; Namely
Purchasing power, area of household etc. For the next step, we quantified all the elements for
efficient and straightforward investigation. However, we believed that simply quantifying the factors
would not give us an accurate representation and score for an accurate index; Thence, we decided to
normalize the factors such that it gives a fair index. Finally, we made use of the Analytic Hierar-
chy Process to generate weight coefficients and have completed the first version of the model.

For task 1a, we selected Hong Kong as the region for the households for model validation, and chose
6 households with varying income level, house area, and environment. Then, using the above model,
we evaluated their readiness to receive a cat.

Considering task 1b, we have chosen UK, USA and Hong Kong as the regions good for cats; Not
only do they have diverse environments, but they also have sufficient data for analysis, we believe
that these characteristics will improve the accuracy of our model. After selecting the countries, we
assigned values for each factor with Probability Density Functions for all 3 countries. Finally,
we constructed normal distributions for better analysis.

Regarding task 2, we were tasked to generalize our model and allow it to consider other species. Sim-
ilar to task one, we have researched and chosen 4 distinct pets: Dog, Tegu, Hamster, and Parrot.
These pets were not only popular, but had varying lifestyles and different handling requirements, we
believed that this would allow us to make our model more diverse.

After that, we have re-quantified a selection of individual factors to match our new species, this
allows our model to give out more accurate results tailored for the new species. For the next step,
similar to re-quantifying the factors, we have also decided to remake our weighting matrices.

After initializing the new generalized model, we have evaluated the same 6 households in task 1a on
their readiness to get the 4 species on the above as pets respectively. Some households are not ready
to receive a dog or a tegu, but all households are suitable for a parrot and a hamster.

Finally for task 2b, we created radar charts for each species of pet, with 7 vertexes each representing
one factor; We calculated the overlapping area of 2 pets and obtained the compatibility score for the
pair. After that

Considering task 3, we were tasked to project future pet ownership and retention. To project the
future pet demographics, we have decided to investigate on the change of each factor over time. After
that, we simply substituted in the values of 5, 10 and 15 years and evaluated the percentage changes.
Finally we multiplied the results into the 10000 set of generalized data in task 1b and calculated the
change in the score; We believe this would give us an accurate prediction.
2024 IM2 C
Page 2 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Dear Decision Makers of the IMMC-A,

Re: Recommendation on matching pets and prospective owner households


2024020 writing to inform you about our model on determining how ready a household
This is team 24384887
is to adopt a pet, thank you for your confidence in our team, and we are determined to produce a
detailed model on how we can solve this issue.

After thorough analysis of affecting factors of the household and the cats, our team has discovered
a model that can accurately evaluate the readiness of a household for cats and other species of pets,
based on the few inputs needed.

For the model, we have considered regional factors like the hygiene and the community support
offered for pets within the region. Additionally, we have also considered factors for individual pets
like the desired climate and the noise level they are comfortable with. By combining these 2 aspects
of factors, we are confident the model will be able to generate an accurate appropriacy score for the
household to own a specific pet.

Regarding the solution, our model is already capable to evaluate the readiness for a household to
adopt a pet; Unfortunately, we do not have the expertise to provide a thorough evaluation regarding
if a household is really suitable for a specific household. Henceforth, we sincerely hope the profes-
sionals at IMMC-A with adequate knowledge can aid our model towards perfection by retrieving
actual data and adjusting the weights of our model via the pairwise comparison matrix.

Additionally, the threshold for determining if a household is suitable is also not perfectly accurate, we
hope professionals will put our model in use to increase the accuracy of our model. The threshold can
be changed depending on if there are too many or too little households that meet the requirement.
By the process of trial and error, the model can be further corrected.

Last but not least, combining on our model’s evaluation and detailed background check, more house-
holds can prepare themselves for adopting a pet with the lowest cost, which would definitely improve
the situation regrading homeless pets or pets with horrible living conditions.

To encapsulate, our model is capable of generating scores and evaluation on paper; However, words
are unfounded, and a combination of actual deployment and our mathematical model is required to
generate an accurate result.

Thank you for your attention to this matter.

Yours faithfully,
Team#2024020
IMMC24384887
2024 IM2 C
Page 3 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Contents
1 A Feline Warm up 4
1.1 Question Analysis and Restatement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Generating factor scores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Preliminary Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.2 Selecting the factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.3 Quantifying the factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Weighting generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.1 Matrix evaluation and improvement . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Model Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4.1 Highlights of Households that qualify . . . . . . . . . . . . . . . . . . . . . . . 13
1.4.2 Highlights of Household that do not qualify . . . . . . . . . . . . . . . . . . . 13
1.5 A broader Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5.1 Data Distribution of factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2 Model for Other Pets 15


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Research on popular pets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.1 The shortlist of pets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.2 The selection of pets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2.3 Re-quantifying aspects for the chosen pets . . . . . . . . . . . . . . . . . . . . 16
2.2.4 Change in Weighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3 Model Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4 Interaction of Multiple Pets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4.1 Measuring compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4.2 Deriving the area for overlapping area . . . . . . . . . . . . . . . . . . . . . . 20

3 Future Pet Ownership 21


3.1 Effect of time on factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4 Conclusion 23
4.1 Model evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 Strength of model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3 Things to Improve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

References 23

A code 26
2024 IM2 C
Page 4 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

1 A Feline Warm up
1.1 Question Analysis and Restatement
We are asked to first build a quantitative model to compute a household’s readiness for cat owner-
ship. The model, being used by pet stores and animal shelters, will intake no more than 10 factors
to be more user-friendly.

We restate the problem, and outline our approach as follows:

1. Find out all factors that affect house readiness for pets

2. Choose at most 10 factors that are most appropriate for our model

3. Quantify each factor and transform it into a score that can be normalized for summing up. We
call it a factor score.

4. Generate the final readiness score by determining how important each factor is and sum up
all the scores with appropriate weighting.

1.2 Generating factor scores


1.2.1 Preliminary Research
There is an array of factors that determine whether or not a household is suitable for keeping cats
as friends. After scavenging and exhausting all the different factors, we have the following results:

1. Community support: Outdoor activity space, veterinary care, and pet stores nearby are
important to cats. [1]

2. Purchasing Power: Lack of purchasing power may cause a lack of cat food, medication, and
other products, which may worsen the living conditions of the cat and the financial stress of
the owner. [2] [3]

3. Hygiene: Illness and infections from the environment may lead to discomfort and fatigue in
the cat. [4] [5]

4. Time In House: The time when the owner stays home affects the bonding, stress levels, and
the mental health of the owner and the cat. [6] [7]

5. Allergy: Allergic reactions, discomfort often causes mutual disgust and between the owner
and the cat. [8] [9]

6. Noise Level: Loud noises may trigger fear and anxiety in cats, which can lead to various
health issues. [12] Moreover, irreversible damage to a cat’s hearing abilities is also possible.
[13]

7. Climate: The climate situation of the household can also affect the health of cats, and temper-
ature is considered to be the most important factor in deciding whether the climate is suitable
for cats. [20] In order to keep the model’s user friendliness, we decided to only focus on tem-
perature as the only climate factor. Cats are susceptible to heatstroke and dehydration in hot
weather. [15]
2024 IM2 C
Page 5 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

8. Topology of House1 : There may be safety hazards or dangerous elements in the house which
may cause damage to the cat. [16] Moreover, insufficient size of the house may also lead to
stress and anxiety. [17]

9. Compatibility with animals: Some house plants are toxic to cats. Moreover, cats may see
other pets as prey. [36]

There were some other factors, such as the demographic of the household and the emotional status
of the owner. However, they are out of our consideration since they may have little to no effect on
the result. Besides, emotion cannot be easily modelled and to collect data on.

Note that these factors are indeed exhaustive for all pets and we will keep referring to the list at a
later stage.

1.2.2 Selecting the factors


In the following, we select the factors useful for our preliminary model at the beginning of task 1.
We can see that some factors largely differ from others by nature. For example, the factor of “allergy”
is a simple yes or no input while the area of the house is a number. We call “allergy” a boolean input
and we need not quantify it.
Therefore, we will need to quantify community support, purchasing power, hygiene, time in the
house, noise level, climate, and area of the house.

1.2.3 Quantifying the factors


It is obviously important for us to quantify the factors for further analysis, henceforth we will
introduce our methods of achieving this goal. In the following, we use a multitude of methods to
generate a factor score, Sfactor ∈ [−1, 1] which acts as a normalised score for each factor. A score
of 1 means that the household is ideal for that particular factor. A score of 0 means that it is just
acceptable. A negative score means that the factor is so bad that it would negatively impact the
general score, meaning it requires high compensation from other factor scores to bring it above the
threshold of a suitable household.

Quantifying Community Support The support by the community and neighborhood is easily
the most important factor to consider, as the community is what provides the majority of resources
and services. To measure how much community support each pet can receive, we decided to consider
the “pet to vet” ratio of the region the household is situated in.
Number of cats in region X
R(X) = (1)
Number of vets in region X
Note that the vet to pet ratio is a predetermined constant, only dependent on the region situated.
So, the input for this factor is the name of the city.

By seeing how much veterinary care a pet can receive in a community, we can effectively measure
community support. Nevertheless, this does assume something.
1
we define a house to be the living area of a household
2024 IM2 C
Page 6 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Assumption 1

The population density of cats and vet clinics/vets are uniform within the input
region. This is so that we can gather sufficent data to approximate the pet to vet ratio of
any place in the world. In an ideal situation, the customer flow of the nearest clinics
should be measured.

To compute the score, we first found out that a vet sees about 30 pets a day[52], and a pet sees a
vet about 3 times a year [53], and a vet usually have about 250 days of work in a year [54]. This
comes out to a pet to vet ratio of R = 2500. So, for this standard vet to pet ratio, we take its score
to be 0. The optimal pet to vet ratio is 0, meaning that a vet doesn’t see any other pets besides the
cat of the household. So, we need a score function to satsify:

1. S ≈ 1 when R = 0 4. S should change most sharply when R is


closer to 2500, as to effectively differenti-
2. S = 0 when R = 2500
ate the majority of the households.
3. S → −1 when R → ∞

So, we decided to use a logistics function to model the score function. After some tweaking with the
parameters, we found the below function to be most appropriate.
2
SCommunity Support = −1 (2)
1 + exp (0.002(R − 2500))

Figure 1: Graph of SCommunity Support against pet to vet ratio R

However, we have made an assumption in the data collection process. The number of pet visits (and
other data collected later) are dependent with respect to the age of cats.

Assumption 2
We assume all cats in question are adult cats, as to ensure the consistency of data collected.

Quantifying Purchasing Power Prospective owners need to afford various things such as food,
medical care, toys, etc. Not only can cats worsen the financial burden for low-income households,
but also not being able to afford these pet necessities can be detrimental to the cat’s physical and
mental health.

So, we need to measure the ability to provide for a cat. Although the direct way of using
the income is trivial, it cannot capture the specificity of cats, as the cost of cats can differ from
other pets. After knowing that the cost of raising a cat is 1800 USD per annum in USA [18], and
neglecting the marginal one-off cost of getting a cat in the first place. We see that the score for this
1800
factor can be expressed as Annual salary (USD)
. However, this model would not account for the different
2024 IM2 C
Page 7 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

commodity prices worldwide. It probably costs less than 1800 USD to have the same necessities
in other countries. Therefore, we modify the above model to account for the commodity prices by
considering the “cost of living index” of a city. We can get the cost of raising a cat by multiplying
1800 to the ratio CCUXSA , where CX is the cost of living index in the household country/city X and
CU SA is the index for USA, which is 72.9. Therefore, we have
1800CX
I = Income ratio = . (3)
72.9 × Annual salary (USD)
The input is the city name and the annual salary. To transform the income ratio into the
factor score, we have to consider the fact that 30% of the income should be spent on non-necessities
[55]. So, S = 0 when I = 0.3. Moreover, once the income ratio exceeds 50%, it starts consuming the
cost of necessities[55]. Therefore, S = −1 when I = 0.5. We then measure the score linearly with
I using these 2 points. However, S > 1 when I < 0.1. So, we have to bound S at 1 when I < 0.1,
which is still reasonable. If your pet costs less than 10% of your salary, then of course it would be
worth it. So, we have


1 if I ∈ [0, 0.1]
SPurchasing Power = − 0.2 (I − 0.3) if I ∈ [0.1, 0.5]
1
(4)


−1 if I > 0.5

Figure 2: Graph of SPurchasing power against income ratio I

Quantifying Hygiene The hygiene of the environment is obviously essential for the optimal
living conditions for both the owner and the cat, as it could be detrimental for the cat and the
owner’s health. In theory, the hygiene of the household should be measured. However, this is not
user friendly, and it is impossible for us to gather data on this aspect. Therefore, we will consider
the hygiene levels of the community to determine the score. The input for this factor is again
the city/country name.

Assumption 3
The hygiene level of the household is similar to that of the input region the household is
situated in.

To measure the hygiene level of the input region, we have found 3 indexes commonly known for
measuring health and hygiene of a specific country, region; Namely the Global Health Security Index
(GHS Index), Environmental Performance Index (EPI) and the Percentage of People Using Basic
Sanitary Devices (WSH_SANITATION_BASIC). Then, we took the average of the 3 scores of 173
countries (The number of countries present in all 3 indexes), and normalized them to form the hy-
giene index.

We then need to transform this index into a score. Note that even in the most unhygienic countries,
cats (and in fact pets in general) are not significantly affected by the outdoor hygiene. Therefore,
any outdoor hygiene can be accepted. In other words, we need not create a negative score. For this
2024 IM2 C
Page 8 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

factor, we need to find a way to transform the index into a non negative score.

While max-min normalisation is a trivial approach, it was rejected since it is not very accurate with
outliers. Here, we first use the z-score normalisation method.
Take the mean of the scores as µ and the hygiene index of the nth highest ranked country as s(n) for
the following normalization process.

1 X
173
µ= s(n) = 59.28921002 (5)
173 n=1
v
u
u 1 X 173
σ= t (s(n) − µ)2 (6)
173 n=1

Then, we replaced the score of each country according to the following equation, let’s call z(n) the
standard hygiene score of the nth highest ranked country.

s(n) − µ
z(n) = (7)
σ
Finally, we conclude our normalisation process by transforming the standard score to a score between
0 and 1. We accomplish this by using the normal distribution projected from the definition of the
standard hygiene score. By considering the bell curve graph, we can define an area function that
considers the fraction of area under the bell curve from −∞ to z(n).
Z  
z(n)
1 (x − µ)2
SHygiene (n) = √ exp − dx (8)
−∞ σ′ 2π 2σ ′2

Figure 3: z-score distribution: Red=Cameroon, Green=France

(a) Representation of SHygiene of Cameroon (b) Representation of SHygiene of France

Figure 4: Examples of SHygiene derived from standard hygiene score z(n)


2024 IM2 C
Page 9 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Quantifying Time in House It is without a doubt that cats, just like humans, require compan-
ionship and accompany; Henceforth it is plain to see the time of which the owner stays in the house
is a deciding factor. According to source , owners should spend at least 30 minutes a day with their
cats[56], meaning we need S = 0 when time spent at home, call it T (hours), satisfy T = 0.5. To
continue, we have to assume the following:

Assumption 4
• Everyone sleeps 7 hours a day. This is taken from the average sleeping hours worldwide.
[57]

• All tenants within a household are working adults, who leave the house for work and
return at the same time.

• All tenants only leave their home for work.

This allows us to intake the user-friendly input of Weekly working hours2 , and transform it to
daily time at home to be:
Weekly Work hours
T = 24 − −7 (9)
7
Consequently, we see that any time above 8 hours of home time is optimal by considering the 8:8:8
hour ratio of sleep, work and leisure time. It is also easy to see that 0 hours is the least desirable.
In other words, we need S = −1 when T = 0 and S = 1 when T ≥ 8. For simplicity, we model the
score function linearly.


2T − 1 if T ∈ [0, 0.5]
STime in house = 15 (T − 0.5) if T ∈ [0.5, 8]
2
(10)


1 if T > 8
Note: The time of which the owner stays in the house can also be modified into an input for more
accurate results, as we have not reached the 10 input limit.

Quantifying Noise Level Considering the noise level, being too noisy could be disturbing or even
damaging for both the cat and the owner. For reference, cats hear sound comfortably at 60 - 80
dB, and sound above 80 dB be uncomfortable to cats, or cause harm to their hearing abilities if the
sound is prolonged.[14] At the level of over 120dB, even short and sharp sound can harm a cat’s
hearing abilities.[13] Note that anything below 80 dB is considered to be acceptable, and there is no
such thing as the optimum noise level the household should achieve.
Henceforth, the SNoise Level should stay at 0 when the noise is less than 80dB. It should decrease to -1
when the noise level reaches 120 dB. To ease the modelling progress, we suppose the score function
to decrease linearly. Therefore, we have
(
0 if Noise level < 80dB
SNoise Level = (11)
max{−1, − 40 (Noise level) + 2} if Noise level ≥ 80dB
1

In theory, the noise level indoors should be measured. but to account for user-friendliness, we assume
the following:
2
Usually the weekly hours is collected instead of daily on monthly in online sources
2024 IM2 C
Page 10 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Assumption 5
The noise level indoors is similar to that outdoors, and the noise level is evenly distributed in
the community.

This allows us to intake city name only and reference existing databases to find the noise level
in later tasks. In an ideal situation, the noise level should be measured indoors with
something like an app.

Quantifying Climate In the realm of feline needs, similar to humans, climate plays a crucial role
in determining the comfort of the cat. Therefore, in this case, this aspect undoubtedly becomes
very important. On account of this, we researched about the suitable temperature, highest sur-
vival temperature, and the lowest survival temperature of cats, which is 27.5◦ C, 38◦ C and -6.67◦ C
3
respectively. Denote the household’s temperature by E ◦ C[21][22]
Given the fact that cats are more cold-resistant than heat-resistant, we need an asymmetrical score
function about the line E = 27.5. We also need the score to be non-negative since all households
maintain a healthy temperature for humans and thus cats. The score function here adds a bonus
score for when the climate outdoors is suitable for cats. We decided to use 2 normal distributions, one
for temperatures below 27.5◦ C, and one for above. Let’s denote it as N1 (27.5, σ12 ) and N2 (27.5, σ22 ).
We believed that the 2σ range should fall between the mean and the lowest/highest survivable tem-
perature respectively. So, σ1 = 27.5−(−6.67)
2
and σ2 = 38−27.5
2
. Finally, We normalised the distribution
such that S = 1 when E = 27.5. This gives us
   
f (E) = √h exp − 1 E−µ 2 if E ≥ 27.5
SClimate = σ 2π  2 σ 2  (12)
g(E) = √k exp − 1 E−µ if E < 27.5
σ 2π 2 σ

1 1
where the factors h = −
and k = are used for normalisation.
f (27.5 ) f (27.5+ )

Figure 5: Normal distributions before and after normalisation

Quantifying Household Topology The topology of a house is important for considering cat
adoption because it affects the cat’s safety, comfort, and overall well-being. Moreover, there could
be potential hazards in a household which could endanger the cat. That said, we can only quantify
the area of the house .
3
The 0.01◦ C comes from Fahrenheit conversion
2024 IM2 C
Page 11 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

While using the area of living space directly is intuitive, we also have to consider how cramped the
living area is. An easier way of measuring how cramped a living space is looking at how many people
are living inside the living area. Let’s say a household has n occupants. The average living area
used by a single person is 20m2 . So, the extra room left for the cat would be Area of house − 20n.
We found out that a cat needs at least 4m2 of extra area to itself[73]. Therefore, the minimum
requirement is that the area of house can accommodate 4m2 more than the space used up by the
owners. This corresponds to S = 0. Then we design the score function to increase as the the number
of 4m2 chunks increase. We believe that the unacceptable case is when there is no extra space for
the cat, corresponding to S = −1. Therefore we have,
1 
SArea = [Area of house (m2 )] − 20n − 1 (13)
4
bounded by -1 and 1.

1.3 Weighting generation


Now that we have created all seven factor scores, it is time for us to put everything together. Taking
the mean directly would be inaccurate since some factors has less on an effect on others. Therefore,
we have to decide on some weighting coefficients for each factor score.

There is a multitude of ways we can accomplish this. Here, we decided on the approach of Ana-
lytic Hierarchy Process. It is a well known algorithm for Multiple-criteria decision analysis
than can transform “subjective” common sense and non-numerical information into an “objective”
numerical weighting, which is less prone to human error. It should be noted that this algorithm is
usually used to find out an optimal decision based on layers of criteria. Here, we only have one layer
with 7 criteria. However, we will still use a critical part of this method to find out the weightings,
with the help of a modelling book we found online. [75]

This crucial part of the AHP is called a Pairwise Comparison Matrix. We select 2 distinct factors
at a time from the 7 factors and compare them on which is more significant on cats. Let’s say we
are comparing factor i with factor j. We define a value aij as follows:

aij
1 If i is as important as j
3 If i is slightly more important than j
5 If i is more important than j
7 If i is obviously more important than j
9 If i is absolutely more important than j
2,4,6,8 For the levels in-between

Note that aij = a−1 ji . Using this method, we can generate a pairwise comparison matrix PCats :=
[aij ]7×7 . Using some online sources, common sense, and questionnaires, we ran the pairwise compar-
ison algorithm and we developed the following matrix:
 
1 1/4 6 1/5 7 7 3
 4 3 9 9 5 
 1 7 
1/6 1/7 
 1 1/6 3 3 1/2 
 5 1 7 7 6 
PCats =  1/3 6  (14)
 
1/7 1/9 1/3 1/7 1 1 1/6
 
1/7 1/9 1/3 1/7 1 1 1/6
1/3 1/5 2 1/6 6 6 1
2024 IM2 C
Page 12 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Note that the factors down the row and to the right of the column corresponds to community sup-
port, purchasing power, hygiene, time in the house, noise level, climate, and area of the house in
sequential order. To give some examples, the 2 boxed entries correspond to 2 pairwise comparisons.
One is that purchasing power is absolutely more important than noise, thus giving a52 = 19 ; the other
is that community support is slightly more important than area, thus giving a17 = 3.

To find out the weighting coefficients, we are asked to compute the eigenvector of PCats with the
largest real eigenvalue, i.e. the solution wCats of
PCats wCats = λCats wCats (15)
with the largest λCats ∈ R. Using an online calculator, we obtain the required solution to be wCats =
(0.1484, 0.3872, 0.0459, 0.2906, 0.0234, 0.0234, 0.0812)T with λCats ≈ 7.749. These are in fact the
weights of the factors respectively. Since the factors scores are rated above 0 if and only if the
conditions are acceptable, The threshold for the final score is 0.

Figure 6: Summary of model

1.3.1 Matrix evaluation and improvement


Since the entries of the matrix are still determined by human input, there is a chance that the ratios
are inconsistent. For example, someone may input i is slightly more important than j (3); j is
slightly more important than k (3), but i is only slightly more important than k (3). To remedy this
inevitable error, Dr. Saaty proposed the following check for consistency:
λCats − n
Define the consistency index CI = where n = 7 in this case. Moreover, We define the
n−1
randomization index RI as the consistency index evaluated from the eigenvalues of a large amount
of randomized pairwise comparison matrix. For n = 7, the corresponding RI = 1.32. Finally, we are
asked to evaluate the consistency randomized index CR := CI RI
. The check is that if CR < 0.1,
the matrix is acceptable. Indeed, for our matrix PCats ,
7.749 − 7 1
CR = × = 0.094 < 0.1 (16)
7−1 1.32
which means that our matrix is acceptable. However, for later tasks, this check was extremely useful
when improving out final weighting.
2024 IM2 C
Page 13 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

1.4 Model Evaluation


To validate our model‘s ability to capture the diversity of households that could have a cat as a pet,
we chose 6 households in Hong Kong that highlights different factors. The measured data are as
below:

Household 1 2 3 4 5 6
Community Support 410 410 410 410 410 410
Purchasing Power 966 2615 14816 710 3860 7120
Hygiene 0.871 0.871 0.871 0.871 0.871 0.871
House Time a Day 0.876 6.81 9.19 3.95 8.92 13.4
Noise Level 91 63 86 54 77 68
Area of House 16.64 61.8 87.5 42.4 102.6 42.07
Number of People in House 1 3 5 2 3 1
Allergies no yes no no no no

Unfortunately, one member in household 2 is allergic to cats, and therefore his household is not
suitable. Hence, we will no longer consider the readiness score of household 2.
Note that some factors in the above are the same among all households. This is because these factors
are location dependent, and in this case all households are located in Hong Kong.
After measuring the data in the households, we put the data in our model and calculated the following
result:

Household Result Readiness


1 -0.165255625 no
3 0.798413956 yes
4 -0.112775751 no
5 0.785495298 yes
6 0.957270913 yes

From the above, households 1 and 4 are not suitable because their readiness scores are negative.
Viewing their respective data, we can see that households 1 and 4 have a much lower income,
available time, and house area compared to households 3, 5 and 6.

1.4.1 Highlights of Households that qualify


Household 3’s Purchasing Power is significantly higher than other households, at 14816 USD per
month. This resulted in a high Purchasing Power Index and thereby a high readiness score.
Household 5’s House Area is significantly larger than other households, at 102.6 m2 . This resulted
in a high House Topology Index and thereby a high readiness score.
Household 6’s Time in House is significantly longer than other households, at 13.4 hours per day.
This resulted in a high Time in House Index and thereby a high readiness score.

1.4.2 Highlights of Household that do not qualify


Household 1’s House Area is significant smaller, at around 16 m2 (Apartments with such small
sizes are common in Hong Kong). Despite that, its income is also relatively low, resulting in a low
purchasing power index and house area index, leading to a negative readiness score.
Household 4 ‘s Income is significant lower than other households, at around 710 USD per month.
This resulted in a negative Purchasing Power Index, and therefore is not suitable for getting a cat.
2024 IM2 C
Page 14 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

1.5 A broader Evaluation


In task 1b, we are asked to determine the current number of households that are prepared to own
a cat in three countries/regions of our choosing. We have chosen the following countries/regions:
Hong Kong, USA, and UK.

1.5.1 Data Distribution of factors


In the chosen 7 quantified factors, only 3 are non-regional dependent, meaning that these factors are
different among a region. These factors are: Purchasing Power, Time in house, and Household
Topology. According to the assumptions mentioned above, the other 4 factors are assumed to be
constant among the same country/region.

In the beginning, we thought of checking the score of the minimum percentile of the population
to determine the size of suitable population. However, this assumes that for each household, their
ranking of all of the factor are the same which is completely wrong.

Therefore, to simulate the number of households that are prepared to own a cat, we decided to take
the following approach:

1. Research and get data on the distribution of the 3 non-regional factors of Hong Kong, USA
and UK respectively.

2. Project the data with the best-fit probability density function (PDF) (normal distribu-
tion or a gamma distribution function), using existing curve-fitting software such as matlab
histfit

3. Randomly select 10000 samples based on the probability density function and substitute the
samples to check the suitable population size. In order to randomly select a data z according to
the distribution, we first generate a random number in the range (0, 1) to represent a random
area under the PDF where P (Z < z). Then we find the inverse of the PDF and the required
random data can be obtained by z = F −1 (rand(0, 1))

4. Using the data generated in PDF and regional factors, evaluate the readiness score of each
sample, and calculate the ratio of suitable households to all households.

Figure 7: Probability density and 10000 samples of USA working hours, each sample marked as a
green dot
2024 IM2 C
Page 15 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Figure 8: Probability density and 10000 samples of UK income, each sample marked as a green dot

Normal Mean SD
Gamma α β
UK Area 80.91408591 13.90037377
US Income 1.242360581 8.2485553
UK Time 35.70522388 10.99598599
UK Income 2.354943918 4.8598581
HK Time 41.94174 25.7638
HK Area 6.935983427 2.3241705
HK Income 27828.68 15947.92
US Area 34.42321446 143.97866
US Area 2250.263992 844.8247088

After simulating the data of all 10000 households in a large database we used the model we derived
to count the number of prepared households. Fin

2 Model for Other Pets


2.1 Introduction
With one comes more, most pet owners won’t stop on one pet, and often finds more companions for
the furry baby.
In this section, we generalized our model from the warm up in order for it to be able to calculate the
preparedness for other pets or even multiple different species living under the same roof.

2.2 Research on popular pets


Aside from cats, there are also many other popular pets on the market. However, only 4 additional
pets are needed for this task; Henceforth, we have decided to shortlist a multitude of popular pets
for finalising our decision.

2.2.1 The shortlist of pets


Here are our chosen pets which are all popular choices for people worldwide:

1. Dogs: The first choice that came to our minds, being a man’s best friend, there is no question
for this selection.
2. Fishes: Another popular choice, however its simplistic lifestyle makes us rethink if a math
model is really needed.
3. Parrots: An exotic species favoured by many senior pet owners, its difficulty of maintenance
creates huge obstacles.
2024 IM2 C
Page 16 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

4. Hamsters: A popular choice for many newbie pet owners, this may seem like a trivial exclusion.
However, few know about the difficulty to handle them; Combined with how easy they can get
ill, more consideration is needed.
5. Rabbits: They may seem cute and easy to handle; However few know about how easily they
can get injured if badly handled.
6. Tegus: A relatively rare choice, however it is the most popular lizard to own with many
enthusiast being deeply interested in them.
Note: we have decided on specific species for lizards (Tegus) and birds (Parrots) as the spectrum of
species is diverse, with too much data to consider.
We have also found a multitude of other pets, like ferrets and guinea pigs, but their popularity
is relatively low compared to the most popular ones; Henceforth we have decided not to further
investigate on them.

2.2.2 The selection of pets


We have listed out the top most popular pets to own, now we will exclude a few. To begin with,
fishes are an easy exclusion, their simple lifestyle and little affecting factors makes us believe that an
entire math model is not needed for evaluating their suitability.
The second pet we have decided to exclude are rabbits. Not only are rabbits the second least popular
choices amongst them, there are only a small number of factors that may affect them. As an example,
only grooming and attention is needed, henceforth we have decided that rabbits provide little value
for our model. In conclusion, we have chosen dogs, parrots, hamsters and reptiles as our choice.

2.2.3 Re-quantifying aspects for the chosen pets


We have considered methods to quantify aspects for cats in the warm up, such as purchasing power
and hygiene level of the environment. However, it is crystal clear that most other pets possess
different characteristics; Such as dogs, which may require more time with the owner because of their
outgoing personality and social lifestyle, and hamsters, which may require less purchasing power but
needs more social support because they can easily get ill.
Henceforth, we will now introduce the different methods we have used to re-quantify the aspects for
different pets. Moreover, for all the items below, Y represents the species of pet.
Additionally, aspects such as topology of house and hygiene do not need to be re-quantified, as they
are regional factors or are mostly independent to the pets.

A special case: Lizards Lizards are very sensitive to their environment and equipment, however
due to these restrictions, we have further investigated on the lizards’ living environment and found
out they live in isolated facilities. [37] Henceforth we have decided that only purchasing power is
meaningful to re-quantify when considering lizards.

Quantifying Purchasing Power Similar to that of cats, we will be considering the cost per an-
num (excluding the price of adopting the animal) and the cost of living index of the region. Finally,
Spurchasing power (X, Y ) would be the index we are looking for and PY would be the cost per annum
of handling pet Y . Combined with the variables provided previously, we get the following 2 formulas:
PY C X
I(X, Y ) = Income Ratio = .
72.9 × Annual salary (USD)
(
1 if I(X, Y ) ∈ [0, 0.1]
SPurchasing Power (X, Y ) = (17)
− 0.2 (I(X, Y ) − 0.3) if I(X, Y ) ∈ [0.1, 0.5]
1
2024 IM2 C
Page 17 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

The following are the quantifications of the different species:

Pet Cost per annum SPurchasing Power (X, Y )


(
1 if I(X, Dog) ∈ [0, 0.1]
Dogs 2082.5 [39] =
− 0.2
1
(I(X, Dog) − 0.3) if I(X, Dog) ∈ [0.1, 0.5]
(
1 if I(X, Hamster) ∈ [0, 0.1]
Hamsters 75 [40] =
− 0.2
1
(I(X, Hamster) − 0.3) if I(X, Hamster) ∈ [0.1, 0.5]
(
1 if I(X, P arrot) ∈ [0, 0.1]
Parrots 1475 [41] =
− 0.21
(I(X, P arrot) − 0.3) if I(X, P arrot) ∈ [0.1, 0.5]
(
1 if I(X, T egu) ∈ [0, 0.1]
Tegus 545 [42] =
− 0.2
1
(I(X, T egu) − 0.3) if I(X, T egu) ∈ [0.1, 0.5]

Table 1: Purchasing Power quantified for the Different Species

Quantifying Noise Level This is also another simple aspect to quantify, no new variables are
added. (Note: lizards live in an isolated environment so they do not need a new quantification.)
Quantification of noise levels:

Pet Harming Dangerous Result

(
1 if x < 85
Dog [46] [47] 85 dB 140 dB ndogs =
− 55
1
x + 3911
if x ≥ 85
(
1 if x < 85
Hamsters [50] [51] 85 dB 125 dB nhamsters =
− 40
1
x + 33 if x ≥ 85
 8

1 if x < 85
Parrots [48] [49] 95 dB 104 dB nparrots = − 9 x + 9 if
1 113
104 ≥ x ≥ 85


0 if x > 104

Note: The noise index of parrots will never fall to the negatives as they can regenerate their hearing
abilities. [48]

Quantifying Community Support Similar to noise levels, only minor factors need to be changed.
Re-quantification of Community Support:
Number of pet Y in region X
R(X, Y ) = (18)
Number of vets in region X
Then, akin to the warm up, we used the logistics function to model the score function.
2
SCommunity Support (X, Y ) = −1 (19)
1 + exp (0.002(R(X, Y ) − 2500))
2024 IM2 C
Page 18 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Climate Similar to the warm up, only minor changes need to be made to suit the ideal temperature
for the pets.

Pet Suitable Highest survivable Lowest survivable σ1 σ2

24.72 − (−7) 40 − 24.72


Dog [65] [66] [67] 24.72 40 -7
2 2
22.5 − 4 40 − 22.5
Parrot [68] [69] [70] 22.5 40 4
2 2
21.1 − 15.6 26.7 − 21.1
Hamsters [71] [72] 21.1 26.7 15.6
2 2
40.5 − 15 57 − 40.5
Tegu [43] [44] [45] 40.5 57 15
2 2

Finally, we just need to insert the corresponding values into SClimate and a new quantification would
be created for each new pet.

2.2.4 Change in Weighting


For different kinds of pet, the importance of different factors varies. Therefore, the weightings in our
model need to be changed accordingly. The new pairwise comparison matrix is as below. Note that
these have been adjusted using online sources, forums, questionnaires, and the consistency checks
described in task 1.
   
1 1/3 6 4 5 7 3 0.248
 3 1 7 5 6 9 4  0.398
   
1/6 1/7 1 1/4 1/2 5 1/5 0.045
   
PDogs = 1/4 1/5 4 1 4 3 1  
 wDogs = 0.109

1/5 1/6 2 1/4 1 3 1/7 0.049
   
1/7 1/9 1/5 1/3 1/3 1 1/8 0.024
1/3 1/4 1/5 1 7 8 1 0.127
   
1 1/6 1/9 1/8 1/3 1/6 1/5 0.022
 6 1 1/5 1/4 5 1 3  0.115
   
 9 5 1 2 7 5 6  0.389
   
Pparrots = 
 8 4 1/2 1 6 4 5  w parrots = 0.278
 
 3 1/5 1/7 1/6 1 1/5 1/2 0.037
   
 6 1 1/5 1/4 5 1 3  0.115
1/5 1/3 1/6 1/5 2 1/3 1 0.044
   
1 1/8 1/9 1/3 1/5 1/7 1/6 0.021
8 1 1/4 6 4 1 4  0.199
   
9 4 1 7 6 33 6  0.394
 Team#2024020   
Ptegus = 3 1/6 1/7 1 1/4 1/6 1/6 
 wtegus = 0.035

5 1/4 1/6 4 1 1/4 1  0.076
   
7 1 1/3 6 4 1 4  0.197
6 1/4 1/6 6 1 1/4 1 0.078
2024 IM2 C
Page 19 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887
   
1 1/3 1/8 1/6 1/4 1/7 1/4 0.024
3 1 1/7 1/5 1/2 1/6 1/2 0.040
   
8 7 1 4 5 6 5  0.451
   
Phamsters =
6 5 1/4 1 3 1/3 3  whamsters = 0.139
  
4 2 1/5 1/3 1 1/4 1  0.065
   
7 6 1/6 3 4 1 4  0.216
4 2 1/5 1/3 1 1/4 1 0.065

2.3 Model Evaluation


We will review the pet preparedness of the same 6 households we used in task 1.
Here is our result:

Species Dog Species Tegus


Household Readiness Score Readiness Household Readiness Score Readiness
1 -0.186442204 no 1 -0.480697202 no
2 0.54259255 yes 2 0.315079557 yes
3 0.670984634 yes 3 0.595811148 yes
4 -0.366865636 no 4 -0.742825966 no
5 0.886068002 yes 5 0.567212622 yes
6 0.923963009 yes 6 0.689869224 yes

Species Parrot Species Hamster


Household Readiness Score Readiness Household Readiness Score Readiness
1 0.400498846 yes 1 0.470396028 yes
2 0.763807247 yes 2 0.600187695 yes
3 0.802154623 yes 3 0.59453509 yes
4 0.484901592 yes 4 0.556868902 yes
5 0.890752124 yes 5 0.723502048 yes
6 0.890752124 yes 6 0.723502048 yes

Dogs and Tegus require a huge amount of capital and space, therefore households 1 and 4 are not
ready to get a dog or a tegu as a pet. However, all households are ready to get a parrot or a hamster
as a pet, due to their relatively low capital, spatial and environmental requirements.
It is also worth mentioning that the readiness score represents a household’s readiness for getting a
specific pet. For example, household 2 is less ready to get a tegu compared to households 3, 5 and 6.
If an entity wants to utilize a more conservative version of our model, a threshold can be introduced.
For example, the household’s readiness score may need to be over 0.5 to be considered ready.

2.4 Interaction of Multiple Pets


In order to determine how suitable are two pets living together, we create a relationship matrix with
entries 0 to 1 to measure how compatible the pet weightings are.

2.4.1 Measuring compatibility


In task 2a, we have calculated the weights for each factor of each pet, which can be seen as importance
of each factor to each pet. We can generate a radar chart for each pet.
2024 IM2 C
Page 20 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Figure 9: Radar Chart of all 5 pets’ weights

The radar chart can describe what kind of household the pets needs most. If two pets share the
same needs towards their habitat, it means that they are more suitable together under their habitats,
reminiscent of the theory of an ecological niche of an animal. Notice that the overlapping area between
the 2 radar charts of 2 pets can represent how similar their needs are. Therefore, we can define the
compatibility score of two pets is proportional to the overlapping area of the two corresponding
radar chart [76].

2.4.2 Deriving the area for overlapping area


To calculate the overlapping area, we divide the octagon into 7 triangular region with a 360
7
° included
angle with 4 points on each side(X1 , X2 , Y1 , Y2 where X and Y represent different aspects whereas
1 and 2 represent different items) and two segments connecting the points of the same item. This
brings us to two cases.

Figure 10: A segment with no intersection of radar charts

Non-intersecting segments Figure 10 shows an example of a slice with no intersection. X1 in


the below equation represents the length from the centre to point X1 and a similar definition to
X2 , Y1 , Y2 . This is a simple case where the overlapping area is the triangle with smaller area.
 
X 1 Y1 X 2 Y2
R = min √ , √ .
2 2 2 2
2024 IM2 C
Page 21 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Figure 11: A segment with intersection of radar charts

Intersecting segments Figure 11 shows an example of a slice with no intersection. X1 in the


below equation represents the length from the centre to point X1 and a similar definition to X2 , Y1 , Y2 .
To find this area, we first find the equation of the two segments and find their intersection G(p,q)
by solving the simultaneous equations. [76].
(
y = Y −Y√12X (x − X1 )
1 1

y= Y√2
Y2 − 2X2
(x − X2 )
The area of the overlapping region can be found by
Y1 1
Area = √ (p − q) + X2 q
2 2 2
Although the above method of finding area is for octagon, by mapping the 2d heptagon into a con-
ical space, the same method can be applied to find the area of the heptagon in the conical space.
By multiplying a transformation scaling factor to the area in the conical space, we can obtain the
area of the radar overlapping area. The above process will need to be done for all 7 triangles,
and the total overlapping area of the 2 heptagonal radar charts will be the sum of all 7 triangles’
areas. And as we mentioned, this area will be the magnitude of how complementary the two pets are.

Therefore, the compatibility matrix is,


 
1 0.502 0.242 0.471 0.183
0.502 1 0.345 0.326 0 
 

Ω = 0.242 0.345 1 0.373 0.276
0.471 0.326 0.373 1 0.492
0.183 0 0.276 0.492 1
If a household is planning to keep a new pet m and the pet existing in their household are n1 , n2 , · · · , ni
where ni ∈ 1, 2, 3, 4, 5 and the number represent different pet, .the deduction of the total score due
to incompatibility of pets will be
X
Scomp = S − 0.5 (1 − Ωm,ni ) (20)
i=1

3 Future Pet Ownership


3.1 Effect of time on factors
In order to predict the future trend of pet ownership, we need to understand will different factor
change in the future. Therefore, a time function describing the change of each input for our score
function is modeled as follow. Note that the distribution of time at home for the general population
remains the same therefore it is not considered in this part.
Note, take x as the (x + 2024)th year or x years after 2024.
2024 IM2 C
Page 22 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

Factor Factor over Time Equation

9
Community Support [59] y = (t + 24) + 9
8

Purchasing Power [58] y = −437.196796015413t + 40355.78875

Hygiene [60] y = 2 ln(t + 10) + 65.5

Noise Level [63] y = 20 ln(t + 104) + 2

Climate [61] y = e0.04(t+19) + 12.8

Area of House [64] y = −3.1 ln(t + 9.1) + 213

After substituting the values into the function above, the percentage change of each factor in 5, 10
and 15 years are as follow.

CS PP H N C A
5 years 2.17% 2.86% 1.16% 0.990% 3.17% -0.964%
10 years 3.15% 5.73% 1.98% 1.94% 7.04% -1.63%
15 years 4.24% 8.59% 2.61% 2.84% 11.8% -2.64%

By multiplying these percentage changes into the 10000 set of generated data in task 1b and calculate
the resulting change in the score, we are able to predict the size of the population that is suitable
for keeping the 5 kinds of pets.

now cats dogs tegus hamster parrot


HK 67.20% 56.40% 31.20% 87.20% 74.90%
UK 69.30% 61.30% 34.40% 90.80% 81.40%
US 68.90% 62.10% 41.90% 90.60% 82.10%

5y cats dogs tegus hamster parrot


HK 70.56% 60.35% 34.48% 88.94% 76.77%
UK 72.77% 65.59% 38.01% 92.62% 83.44%
US 72.35% 66.45% 46.30% 92.41% 84.15%

10y cats dogs tegus hamster parrot


HK 74.09% 64.57% 38.10% 90.72% 78.69%
UK 76.40% 70.18% 42.00% 94.47% 85.52%
US 75.96% 71.10% 51.16% 94.26% 86.26%

15y cats dogs tegus hamster parrot


HK 77.79% 69.09% 42.10% 92.54% 80.66%
UK 80.22% 75.10% 46.41% 96.36% 87.66%
US 79.76% 76.08% 56.53% 96.15% 88.41%
2024 IM2 C
Page 23 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

4 Conclusion
In conclusion, we have developed a set of metrics that can give a score on whether a household is
suitable for raising a cat or other species.

4.1 Model evaluation


Our model used multiple factors that we believed would be able to determine if a household is suit-
able for evaluating the appropriacy of raising an animal in a household.

4.2 Strength of model


To begin with, our method of normalization and usage of the Analytic Hierarchy Process, we can
ensure a fair weight for our indexes to generate an accurate result. Moreover, we applied the power
of programming and was able to randomly generate the data of a large number of households; This
allowed us to further validate our model with such a large amount of test cases.

4.3 Things to Improve


First off, we have had a few assumptions that would not be realistic; As an example, the assumption
of uniform sleep time and uniform distribution of pets and vet clinics are not realistic assumptions.

References
[1] url: https : / / www . bideawee . org / programs / feral - cat - initiative / get - involved /
community-outreach/community-cats-the-law/overview-of-cat-ordinances/.
[2] url: https://esimoney.com/the-financial-implications-of-owning-a-cat/.
[3] url: https://money.com/pet-spending-dogs-cats-survey/.
[4] url: https://www.cdc.gov/healthypets/pets/cats.html.
[5] url: https://www.cbsnews.com/news/how-much-pet-owners-spend-vet-bills/.
[6] url: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9324668/.
[7] url: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0185599.
[8] url: https://acaai.org/allergies/allergic-conditions/pet-allergies/.
[9] url: https://www.webmd.com/allergies/cat-allergies.
[10] url: https://www.webmd.com/pets/cats/moving-new-home-cat.
[11] url: https://www2.hse.ie/babies-children/child-safety/pets/cats/.
[12] url: https://www.cambridge.org/core/journals/animal-welfare/article/effect-of-
animal-shelter-sound-on-cat-behaviour-and-welfare/C9E67BEC1FF51E95DD638E93A956E015.
[13] url: https://petkeen.com/what-noise-levels-are-healthy-for-cats/.
[14] url: https://www.petacoustics.com/blog/2016/9/28/dafagadfg-l9tym.
[15] url: https://www.preventionweb.net/news/how-climate-change-will-affect-your-
pet-and-how-help-them-cope.
2024 IM2 C
Page 24 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

[16] url: https://www.omlet.us/guide/cats/bringing_a_new_cat_home/safety_proofing_


your_home/.
[17] url: https://www.mdpi.com/2076-2615/9/11/978.
[18] url: https://sports.yahoo.com/much-does-kitten-cost-everything-192922018.html.
[19] url: https://web.archive.org/web/20240205093123/https://www.aspcapetinsurance.
com/resources/cat-ownership-cost/.
[20] url: https://www.ingleside.com/services/cats/blog/how-can-weather-affect-your-
pet.
[21] url: https://betterpet.com/safe-temperatures-for-cats/.
[22] url: https://meowa.com/how-hot-is-too-hot-for-cats/.
[23] url: https://www.numbeo.com/cost-of-living/rankings_by_country.jsp.
[24] url: https://ghsindex.org/.
[25] url: https://epi.yale.edu/epi-results/2022/component/epi.
[26] url: https://data.worldbank.org/indicator/SH.STA.BASS.ZS.
[27] url: https://data.gov.hk/en-data/dataset/hk-censtatd-census21c-b1120108.
[28] url: https://www.censtatd.gov.hk/en/web_table.html?id=210-06309A.
[29] url: https://www.teoalida.com/hongkong/housingdatabase/.
[30] url: https://en.wikipedia.org/wiki/Household_income_in_the_United_States.
[31] url: https : / / www . numerade . com / ask / question / question - 2 - 1 - pts - the - average -
weekly-work-hours-of-full-time-us-workers-have-approximately-normal-distribution-
with - mean - 37 - hours - and - standard - deviation - 10 - hours - find - the - probability -
that-ran-96562/.
[32] url: http://www.freeby50.com/2011/02/distribution-of-home-sizes-in-us.html.
[33] url: https://assets.publishing.service.gov.uk/media/65ddfe09b8da63001dc862e6/
Table_3.5_2122.ods.
[34] url: https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkingh
datasets/usualweeklyhoursworkedseasonallyadjustedhour02sa.
[35] url: https://assets.publishing.service.gov.uk/media/5b4750e6e5274a3770774693/
Floor_Space_in_English_Homes_main_report.pdf.
[36] url: https://icatcare.org/advice/thinking-of-getting-a-cat/.
[37] url: https://petadvocacy.org/wp-content/uploads/2022/01/Lizard-Care-Sheet.pdf.
[38] url: https://www.hsbc.co.uk/financial- fitness/everyday- budgeting/spending-
your-income/.
[39] url: https://sports.yahoo.com/much-does-kitten-cost-everything-192922018.html.
[40] url: https://yourpethamster.com/cost/.
[41] url: https://petkeen.com/how-much-does-a-parrot-cost/.
[42] .
[43] url: https://www.quora.com/How-much-space-does-a-dog-need-to-live-comfortably-
indoors.
2024 IM2 C
Page 25 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

[44] url: https://thebiodude.com/blogs/reptile-and-amphibian-caresheets-with-cited-


veterinary- and- herpetology- sources/argentine- tegu- care- sheet- and- bioactive-
maintenance.
[45] url: https : / / reptifiles . com / colombian - argentine - tegu - care / tegu - humidity -
temperatures/.
[46] url: https://extension.purdue.edu/extmedia/va/va-18-w.pdf.
[47] url: https://www.psychologytoday.com/intl/blog/canine-corner/202212/how-much-
loud-noise-can-a-dog-tolerate.
[48] url: https://scopeblog.stanford.edu/2018/06/06/birds- never- go- deaf- why- do-
humans/#:~:text=When%20a%20bird%20loses%20its,Not%20so%20for%20humans..
[49] url: https://www.sciencedirect.com/science/article/abs/pii/S0168159104002163.
[50] url: https://petkeen.com/do-hamsters-like-music/.
[51] url: https://famillypet.com/are-hamsters-sensitive-to-noise/.
[52] url: https://talkatoo.com/blog/whats-the-ideal-number-of-daily-appointments-
for-veterinarians/#:~:text=During%20appointments%2C%20one%20or%20maybe,than%
20this%20will%20be%20limited..
[53] url: https://www.felinemedicalclinic.com/how-often-should-you-take-your-cat-
to-the-vet/#:~:text=Once%20your%20cat%20is%20around,exceed%20the%20age%20of%
2010..
[54] url: https://vetfocus.royalcanin.com/en/practice-management/understanding-the-
business-part-1.
[55] url: https://www.hsbc.co.uk/financial- fitness/everyday- budgeting/spending-
your-income/.
[56] url: https://www.catster.com/guides/how-much-attention-does-a-cat-need/.
[57] url: https : / / www . dreams . co . uk / sleep - matters - club / data - shows - a - shocking -
worldwide-lack-of-sleep.
[58] url: https://blog.itreconomics.com/blog/rising- real- personal- income- trend-
outlook-2023.
[59] url: https://www.researchgate.net/figure/Pet-counts-over-time_fig5_365077002.
[60] url: https://data.unicef.org/resources/jmp-report-2023/.
[61] url: https://www.ncdc.noaa.gov/cag/global/time-series.
[62] .
[63] url: https://www.researchgate.net/figure/Available-data-on-trends-in-ambient-
noise-levels-Measurements-of-ambient-noise-levels-in_fig1_225184829.
[64] url: https://www.boston.com/real-estate/real-estate-news/2023/12/14/new-homes-
in-america-are-getting-smaller/.
[65] url: https://lincolnwayvet.com/blog/what- is- a- dogs- normal- temperature/#:~:
text=A%20dog%27s%20normal%20temperature%20is%20between%2099.5%20and%20102.5%
20degrees,a%20dog%20is%20experiencing%20hypothermia..
[66] url: https://www.pawlicy.com/blog/how-hot-is-too-hot-for-dogs/.
[67] url: https://tractive.com/blog/en/safety/tips-for-dogs-and-cold-weather-in-
winter.
2024 IM2 C
Page 26 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

[68] url: https : / / be . chewy . com / ideal - temperature - ranges - for - parrots / # : ~ : text =
%E2 % 80 % 9CIn % 20my % 20experience % 2C % 20most % 20pet , 65 % 20and % 2080 % 20degrees %
20Fahrenheit..
[69] url: https://www.allaboutparrots.com/how-hot-is-too-hot-for-a-parrot/.
[70] url: https://www.allaboutparrots.com/how-cold-is-too-cold-for-parrots/.
[71] url: https://www.aspencommonsvet.com/2016/02/15/aurora-co-vet-hamsters-cold/#:
~:text=Ideal%20Temperatures,put%20your%20pet%20in%20danger!.
[72] url: https://animals.mom.com/temperatures-can-hamsters-live-1443.html.
[73] url: https : / / chewonthis . maddiesfund . org / 2016 / 11 / study - how - much - space - do -
shelter-cats-need-to-be-happier-more-playful-and-less-stressed/.
[74] url: https://thundersaidenergy.com/downloads/average-home-sizes/#:~:text=On%
20a%20global%20average%20basis,of%20living%20space%20per%20capita..
[75] . . Ed. by . , 2004. isbn: 7-300-05527-3.
[76] IMMC24273223. “A Space Odyssey”. In: IMMC 2024 Greater China Problem E (Winter)
(2024), pp. 13–17. url: https://drive.google.com/drive/folders/1OagVQ4nkqUVcs1RiNAFrnhbGWv

AI report 1
LLMs such as ChatGPT were not used, and played no role in the process of creating the
mathematical model and this solution paper.

A code
Note that the code below is not generated by AI.
gamma.py:

import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import gamma
import random as r
from scipy.stats import norm
import pandas as pd

graph = "nd"
if graph == "gamma":
a, b = 34.4232144626391, 143.97865997308003
shape = a
scale = b
x = np.linspace(0, 100, 10000)
y = gamma.pdf(x, shape, scale=scale)
else:
mean = 37
std_dev = 10
x = np.linspace(mean - 3 * std_dev, mean + 3 * std_dev, 100)
y = norm.pdf(x, mean, std_dev)
2024 IM2 C
Page 27 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

plt.plot(x, y)
plt.grid(True)
plt.show()

new_coords = []

n = 0
while n < 9999:
coord = (r.random()*100, r.random()*0.08)
x_index = np.abs(x - coord[0]).argmin()
if coord[1] <= y[x_index]:
new_coords.append(coord)
plt.plot(coord[0], coord[1], 'go', label='Under Curve', markersize=1)
n += 1
print("Plotted:", n)
print(new_coords)

plt.plot(x, y)
plt.grid(True)
plt.show()

df = pd.DataFrame(new_coords, columns=['x', 'y'])

df.to_excel('data.xlsx', index=False)

print("Data saved to data.xlsx")

radarcal.py:

import openpyxl
from sympy import symbols, Eq, solve, sqrt
import math

def cal_area(aspect, a, b):


sum_area = 0
for j in range(len(aspect[a])):
n = j + 1 if j < 6 else 0
x1 = aspect[a][n]
y1 = aspect[a][j]
x2 = aspect[b][n]
y2 = aspect[b][j]

if (y2 > y1 and x2 > x1) or (y2 < y1 and x2 < x1) or (y2 == y1 and x2 == x1): # i
tmp_area = 1/2*min(x1, x2) * min(y1, y2)*math.sin(math.pi/4)
else:
x, y = symbols('x y')

eq1 = Eq(y1/(y1-sqrt(2)*x1)*(x-x1), y)
2024 IM2 C
Page 28 of 28 Picking the Perfect Pet Team#2024020
IMMC24384887

eq2 = Eq(y2/(y2-sqrt(2)*x2)*(x-x2), y)

sol = solve((eq1, eq2), (x, y))


p = sol[x]
q = sol[y]

tmp_area = min(y1, y2)/(2*math.sqrt(2)) * (p-q) + 1/2*min(x1, x2)*q


sum_area += tmp_area
return sum_area

wb = openpyxl.load_workbook('sus.xlsx')
sheet = wb['sus']

data = []

for row in sheet.iter_rows(values_only=True):


data.append(row)

# Print the data


for row in data:
print(row)

animals = ["cats", "dog", "tegus", "parrot", "hamster"]


for i in range(5):
for j in range(i, 5):
if i == j:
pass
print(animals[i], animals[j], cal_area(data, i, j))

You might also like