in Written Exam edited by
411 views
0 votes
0 votes
10. In the process of designing an $n$ storey building, an architect designed $k$ types of floor modules. Even though the ground floor can use any of the $k$ modules, subsequent floors need to satisfy compatibility constraints. For each module $M_{i}$, there is some subset $B_{i}$ of modules on top of which $M_{i}$ can bebuilt. As an example consider the case when $k = 3$ and say $B_{1}=\left \{ M_{1},M_{2},M_{3} \right \},$ $B_{2}=\left \{ M_{1},M_{3} \right \}$ and $B_{3}=\left \{ M_{1},M_{2} \right \}$. Then a $4$-story building can have the floor plan (from ground to $4$) as $M_{2}M_{1}M_{2}M_{3}$ but not $M_{3}M_{2}M_{2}M_{3}$. The additional cost of adding an extra floor with say a floor module $M_{j}$ can change depending on the structure of the building so far. What is the tightest upper bound on the run-time of
an algorithm to compute the cheapest floor plan for the $n$ storey building.
A. $O(k^{n})$
B. $O(n^{k})$
C. $O(nk)$
D. $O(nk^{2})$
E  $O(n^{2}k)$
in Written Exam edited by
411 views

3 Comments

Please explain
0
0

I don't understand this question at all, @srestha ma'am can you please explain how you are doing this?  Thanks

1
1
Cheapest floor plan will be=

Say for 4 stored building, each floor  we cannot take cheapest module for ach floor

Here module plan will be cheapest plan will be---------> cheapst module will be  in more than one floor say $M_{2}$and all the other module will be between two consecutive occurrence of $M_{2}$

So, for $n$ stored building (where $n>k$) all $k$ occurrence of floor and $M_{2}$ occurs $(n-k+1)$ times

if cost of $M_{2}=2$

So, total cost $n(1+2+3+2+4+2+5+2........+k)=nk^{2}$
0
0

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true